have merged 2 topdown site
have merged 2 topdown site
Script: Email notifications when machine is free
login to free SMTP server(qq, google) to send email to others.
ping mail.ustc.edu.cn
According to ref1.
1 | # install ca-certificates |
1 | sudo apt-get install mailutils |
send but the same, more crazy thing is the -v
and -d
flag is not supported. and --debug-level=trace0
isn’t recognized. many same question in StackOverflow
sudo tail -n 30 /var/log/mail.log
or mail.error
show more info.
We try ref2 ssmtp
, sudo vim /etc/ssmtp/ssmtp.conf
1 | TLS_CA_FILE=/etc/pki/tls/certs/ca-bundle.crt |
The config get work but not well configed, e.g., TLS_CA_FILE
sending a email using gmail took about 13 mins.
1 | $ ssmtp [email protected] < mail.txt |
1 | $ sendmail [email protected] < mail.txt |
get to work after well config gmail setting.
command | snode6 time(mins) | icarus1 |
---|---|---|
4 | 1s | |
ssmtp | 13 | |
sendmail | 6 |
ref using QQ apppassword and python.
Create a Bash Script: Create a Bash script that checks the CPU usage and sends an email if it’s below 30%. For example, create a file named cpu_check.sh
:
1 |
|
Make the script executable:
1 | chmod +x cpu_check.sh |
Modify [email protected]
with your actual email address.
Schedule the Script: Use the cron
scheduler to run the script at regular intervals. Edit your crontab by running:
1 | crontab -e |
Add an entry to run the script, for example, every 5 minutes:
1 | */5 * * * * /staff/shaojiemike/test/cpu_check.sh >> /staff/shaojiemike/test/cpu_check.log |
Replace /path/to/cpu_check.sh
with the actual path to your Bash script.
Save and Exit: Save the crontab file and exit the text editor.
Now, the script will run every 5 minutes (adjust the cron schedule as needed) and send an email notification if the CPU usage is below 50%. You should receive an email when the condition is met.
Please note that this is a basic example, and you can modify the script to include more details or customize the notification further as needed. Additionally, ensure that your server is configured to send emails; you may need to configure SMTP settings for the mail
or sendmail
command to work correctly.
暂无
暂无
上面回答部分来自ChatGPT-3.5,没有进行正确性的交叉校验。
无
zsim-tlb simulate in icarus0
1 | pinbin: build/opt/zsim.cpp:816: LEVEL_BASE::VOID VdsoCallPoint(LEVEL_VM::THREADID): Assertion `vdsoPatchData[tid].level' failed. |
1 | VOID VdsoCallPoint(THREADID tid) { |
vDSO
(virtual dynamic shared object) is a kernel machanism for exporting a carefully set kernel space routines (eg. not secret api, gettid()
and gettimeofday()
) to uservDSO
__vdso_getcpu()
C library, and kernel will auto move it to user-spacevDSO
overcome vsyscall
(first linux-kernel machanism to accelerate syscall) drawback.vDSO
have only four function enum VdsoFunc {VF_CLOCK_GETTIME, VF_GETTIMEOFDAY, VF_TIME, VF_GETCPU};
1 | // Instrumentation function, called for EVERY instruction |
INS_Address
is from pin-kit
, but INS_InsertCall
is pin api.
.level
is just show the level of nested vsyscall. I think comment the assert
which trigerd when callfunc
before entryfunc
is just fun.
暂无
暂无
上面回答部分来自ChatGPT-3.5,没有进行正确性的交叉校验。
无
Anaconda和Miniconda都是针对数据科学和机器学习领域的Python发行版本,它们包含了许多常用的数据科学包和工具,使得安装和管理这些包变得更加简单。
解决了几个痛点:
Anaconda是一个全功能的Python发行版本,由Anaconda, Inc.(前称Continuum Analytics)提供。
Miniconda是Anaconda的轻量级版本(50MB),它也由Anaconda, Inc.提供。
修改~/.condarc
1 | ssl_verify: true |
1 | # 激活环境(base),路径为指定的 conda 安装路径下的 `bin/activate` 文件 |
conda pack
conda pack
用于将现有的 Conda 环境打包成一个压缩文件(如 .tar.gz
),便于在其他系统上分发和安装。conda-unpack
来修复路径,使其在新环境中正常工作。conda-pack
可以将 Conda 环境打包成一个 .tar.gz
文件,以便于跨机器或系统移动和还原环境。以下是使用 conda-pack
打包和还原环境的步骤:
假设要打包的环境名为 my_env
:
1 | conda pack -n my_env -o my_env.tar.gz |
这会在当前目录生成一个 my_env.tar.gz
文件。你可以将这个文件复制到其他系统或机器上解压还原。
在一个特定的 conda
环境目录(例如 /home/anaconda3
)下还原和激活打包的环境,可以按以下步骤操作:
假设场景
conda
激活路径:/home/anaconda3/bin/activate
my_env.tar.gz
my_env
步骤
解压文件到 conda
环境目录
首先,将打包文件解压到指定的 conda
环境目录下的 envs
目录:
1 | mkdir -p /home/anaconda3/envs/my_env |
这里的 --strip-components 1
会去掉 tar.gz
包中的顶层目录结构,使内容直接解压到 my_env
文件夹内。
激活并修复环境
激活该环境,并运行 conda-unpack
来修复路径:
1 | source /home/anaconda3/bin/activate /home/anaconda3/envs/my_env |
现在,my_env
环境已在 /home/anaconda3
目录下的 envs
文件夹中完成还原,可以正常使用。
conda env export
conda env export > freeze.yml
用于导出当前 Conda 环境的配置,包括所有安装的包和它们的版本信息,以 YAML 格式保存。conda env create -f freeze.yml
可以根据导出的 YAML 文件创建一个新环境。在conda命令无效时使用pip命令来代替
1 | while read requirement; do conda install --yes $requirement || pip install $requirement; done < requirements.txt |
The double pipe (“||
”) is a control operator that represents the logical OR operation. It is used to execute a command or series of commands only if the previous command or pipeline has failed or has returned a non-zero status code.
conda create -n 新环境名称 --clone 原环境名称 --copy
在任意层级的SHELL配置文件里添加
1 | export http_proxy=http://yourproxy:port |
1 | ps -eo pid,lstart,cmd |grep bhive |
1 | sudo ps -ef | grep 'bhive-re' | grep -v grep | awk '{print $2}' | sudo xargs -r kill -9 |
华为实习要结束了,作为二次元,在中国秋叶原怎么能不好好逛逛呢?
上海真是包容性极强的地方。原本内心对二次元的热爱,竟然这么多人也喜欢。不必隐藏,时刻伪装。可以暂时放松自我的感觉真好。
爱或者热爱是最浓烈的情感。对象一般是可以交互的人物,物体说不定也可以。但是至少要能与他持续产生美好的回忆和点滴,来支持这份情感。
比如说,我一直想让自己能热爱我的工作,就需要创造小的阶段成功和胜利来支持自己走下去。
三次元的人物包括偶像歌手,和演员。需要演出,演唱会来与粉丝共创回忆,演员也需要影视剧作品。
二次元人物大多数来自于动画,因为游戏一般不以刻画人物为目的,比如主机游戏 当然galgame和二次元手游除外。
日本动画以远超欧美和国创的题材和人物的细腻刻画(不愧是galgame大国,Band Dream it’s my go到人物心里描写简直一绝)创造了许多令人喜爱的角色。
女朋友 > 喜欢二次元(连载 > 完结) >> 追星
23.08.27 to do
暂无
暂无
上面回答部分来自ChatGPT-3.5,没有进行正确性的交叉校验。
无
UnimportantView: Anime Recommendation
不同于恋爱番,催泪番,这样的分类。其实我更在意作品想表达的主题,作者想展现给读者什么。 无论是各种道理,还是就是某个环境,虚幻世界。
羁绊:对人的爱,爱情、亲情、友情。
番剧名 | 精神内核 | 评语 | 喜爱的角色 | 音乐 |
---|---|---|---|---|
Happy Sugar Life | 守护你是我的爱语 | 难以理解的爱的世界里,两位迷途少女相遇,救赎,领悟爱的蜜罐生活 | 砂糖、盐 | 金丝雀、ED、悲伤小提琴 |
我推的孩子(第一集)
Violet Garden
BanG Dream It’s my go !!!!! 初羁绊(友情,百合,重女)的破碎和reunion
未来日记
家有女友、渣愿
百合类的成长:终将成为你,
我心危
命运石之门
RE0
寒蝉鸣泣之时
魔法少女小圆
复杂、紧张的鸿篇巨制。多非单一的精神内核可以概括。多为群像剧。
Fate Zero
钢炼
EVA
刀剑
四谎
CLANND
龙与虎
巨人
超炮
凉宫
鲁鲁修
轻音
暂无
暂无
上面回答部分来自ChatGPT-3.5,没有进行正确性的交叉校验。
无
TLB的介绍,请看
大体上是应用访问越随机, 数据量越大,pgw开销越大。
ISCA 2013 shows the pgw overhead in big memory servers.
or ISCA 2020 Guvenilir 和 Patt - 2020 - Tailored Page Sizes.pdf
1 | # shaojiemike @ snode6 in ~/github/hugoMinos on git:main x [11:17:05] |
default there is no hugopage(usually 4MB) to use.
1 | $ cat /proc/meminfo | grep huge -i |
explained is here.
cat /sys/kernel/mm/transparent_hugepage/enabled
but achieve this needs some details.echo 20 > /proc/sys/vm/nr_hugepages
. And you need to write speacial C++ code to use the hugo page1 | # using mmap system call to request huge page |
But there is a blog using unmaintained tool hugeadm
and iodlr
library to do this.
1 | sudo apt install libhugetlbfs-bin |
So meminfo
is changed
1 | $ cat /proc/meminfo | grep huge -i |
using iodlr
library
1 | git clone |
Measurement tools from code
1 | # shaojiemike @ snode6 in ~/github/PIA_huawei on git:main x [17:40:50] |
平均单次开销(开始到稳定):
dtlb miss read need 2450 cycle ,itlb miss read need 4027 cycle
案例的时间分布:
65000 100000
超内存前,即使是全部在计算,都是0.24% the gemm
‘s core line is
1 | for(int i=0; i<N; i++){ |
and real time breakdown is as followed. to do
manual code to test if tlb entries is run out
1 | $ ./tlbstat -c '../../test/manual/bigJump.exe 1 10 100' |
In this case, tlb miss rate up to 47/53 = 88.6%
using big hash table
Any algorithm that does random accesses into a large memory region will likely suffer from TLB misses. Examples are plenty: binary search in a big array, large hash tables, histogram-like algorithms, etc.
暂无
暂无
上面回答部分来自ChatGPT-3.5,没有进行正确性的交叉校验。
无
秋招面试时遇到高铁柱前辈。问了相关的问题(对AI专业的人可能是基础知识)
数字信号处理器 (Digital signal processor)
HLO 简单理解为编译器 IR。
把中间算子库替换成编译器?
暂时不好支持张量
AI自动调整变化来调优
自动调参。缺点:
随机各级循环应用优化策略(并行,循环展开,向量化
介绍了Ansor效果很好
暂无
暂无