- 博客(92)
- 收藏
- 关注
原创 shell命令基本操作1
sed指定行插入: sed -i “i” 或者"a"插入列paste 或者awkhttp://bbs.chinaunix.net/thread-342540-1-1.htmlshell定义函数func(){ 函数体 }shell算术运算: ((c=$a+$b))http://c.biancheng.net/view/2480.htmlsed打印匹配行号: sed -n -e ‘/match_string/=’ <file>awk打印多列: awk -F ‘:’ ‘{print.
2022-05-31 20:47:43
245
原创 excel基本操作1
excel隔行设置样式条件格式-> 条件规则->输入公式参考https://jingyan.baidu.com/article/36d6ed1f2379c35acf4883e0.htmlexcel隔列取值使用Index结合row和column的功能https://jingyan.baidu.com/article/63acb44a08539861fcc17ef4.htmlexcel列交错合并数据使用颜色,查找颜色,定位颜色,F5,输入公式,删除行。参考https://..
2022-05-31 20:31:58
134
原创 知识杂记1
修改git默认编辑器:git config --global core.editor vimscp断点续传: 使用rsync参考https://blog.csdn.net/hepeng597/article/details/8960885git出错:“You are currently editing a commit”git statusgit refloggit rebase --aborthttps://stackoverflow.com/questions/31252..
2022-05-31 19:42:41
119
原创 wsl2 ubuntu系统迁移
wsl --shutdownwsl -l -v# wsl --export 子系统名称 导出文件路径及名称wsl --export Ubuntu-20.04 E:\wsl2tar\Ubuntu-20.04.tar# wsl --unregister 子系统名称wsl --unregister Ubuntu-20.04# wsl --import 子系统名称 要导入的子系统位置(想要存放子系统的目录) 导入子系统tar包(第三步中导出的tar包路径)wsl --import Ubuntu-20.
2022-05-31 17:56:58
498
原创 ubuntu与windows文件互访
问题1:找不到wsl2的本地文件目录参考https://juejin.cn/post/7024498662935904269在文件资源器中输入\\wsl$之后仍然看不到子系统Ubuntu-20.04问题2:打不开wsl2 ubuntu-20.04,提示程序被占用参考https://blog.csdn.net/qq_38666896/article/details/113810463wsl与windows文件互操作wsl访问windows文件夹: cd /mnt 进入各盘符windwos访问ws
2022-05-31 17:34:04
907
原创 git基本操作1
合并提交: git rebase -i 退出rebase: git rebase --abort撤销rebase: git reflog修改提交:git commit --amend版本回退: git revert vs git reset
2022-05-31 13:47:14
95
原创 windows scp下载较大文件出错
在~/.ssh/config中加入Host *# 断开时重试连接的次数ServerAliveCountMax 10# 每隔30秒自动发送一个空的请求以保持连接ServerAliveInterval 30参考https://zhuanlan.zhihu.com/p/431249844
2022-05-31 13:41:34
458
原创 pandas基本操作3
字典转DataFrame出错ValueError: If using all scalar values, you must pass an index使用DataFrame.columns 初始化并结合使用df.append(字典)增加行str.format输出花括号本身print(f'cat {xyz_file} | awk \'{{ print $(NF-1) }} \', xyz_file )scp下载文件失败“client_loop: send disconnect: Broke.
2022-05-29 22:29:11
104
原创 pandas基本操作2
# df转exceldf1.to_excel("output.xlsx", sheet_name='Sheet_name_1') # df转excel并写入多个sheetwith pd.ExcelWriter('output.xlsx') as writer: df1.to_excel(writer, sheet_name='Sheet_name_1') df2.to_excel(writer, sheet_name='Sheet_name_2')# 在已有excel表格中追加s
2022-05-27 16:29:13
205
原创 pandas基本操作
df转csv文件: df.to_csv()df转excel文件: df.to_excel()df增加列:df.insertdf[column_name] = datadf增加行: df.appenddf合并: df.concatdf索引行或者列: df.ilocdict转df: df = pd.dataframe(data=dict_data)
2022-05-26 20:15:27
98
原创 linux命令
# 去掉多余空格tr -s [:space:] <string># 去掉所有空格sed s/[[:space:]]//g <file># 删除匹配行sed -i '/${TEXT}/'d ${FILE}# find命令反选find . ! -iname "DFT"
2022-05-26 15:01:41
100
原创 zsh中文乱码
zsh无法显示中文vim ~/.zshrcexport LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8source ~/.zshrczsh terminal乱码更换zsh主题,使用robbyrussell试试wsl终端乱码解决方法sudo dpkg-reconfigure locales使用空格键选中en_US.UTF-8、zh_CN.UTF-8,使用Tab键切换至OK,再将en_US.UTF-8选为默认。https://blog.csdn.n
2022-05-16 12:19:09
1562
2
原创 Windows下julia编程环境搭建
Windows下julia编程环境搭建jupyter notebook环境配置julia vscode环境配置参考jupyter notebook环境配置安装包下载并安装(安装时可以勾选add julia to path)https://julialang.org/downloads/添加julia环境变量PATH安装jupyter notebook(安装anaconda即可)打开julia命令行安装IJulia kernelUsing PkgPkg.add("IJulia"
2022-05-15 01:59:53
1003
原创 电子结构中的各种“correlation”
“Before closing this chapter, it is appropriate to review the different modes of correlation encountered in our description of electronic systems. Fermi correlation arises from the Pauli antisymmetryof the wave function and is taken into account already a
2022-05-12 20:14:33
172
原创 linux二进制分析工具
二进制分析工具debug工具:gdb内存分析工具:valgrind, purify反汇编工具:objdump编译器: gcc汇编器: as, nasm ,yasm连接器: ld动态库查看工具: ldd16进制: hexdump系统库调用跟踪: strace显示汇编语言elf信息:readelfnmstringsRadare2参考debug工具:gdb内存分析工具:valgrind, purify反汇编工具:objdump编译器: gcc汇编器: as, nasm ,yasm连接器: ld动态库
2022-05-01 22:27:18
521
原创 命令行下运行.ipynb文件
每次运行.ipynb文件都要打开jupyter notebook就比较麻烦解决方案1. 安装runipypip3 install runipy runipy test.ipynb# 获取每一个cell的输出runipy -o test.ipynb# 将输出保存为html文件runipy test.ipynb --html report.html2. 利用jupyter 自带的功能jupyter nbconvert --to notebook --execute test.ipynb -
2022-01-15 11:29:14
15364
原创 windows powershell快捷键
复制ctrl+c/鼠标右键粘贴ctrl+v/鼠标右键删除整行命令esc删除光标前一个单词ctrl+backsapce删除光标后一个单词ctrl+delete删除光标前一个字符backsapce删除光标后一个字符delete删除光标前所有字符ctrl+home删除光标后所有字符ctrl+end清理屏幕ctrl+l光标前/后移动一个单词ctrl+左/右键光标前/后移动一个字符左/右键切换历史命令上下键快速定位到命令行开头home快速定位到命令行结尾endenter执行命令F11.
2022-01-15 11:01:20
4230
原创 数值求解一维定态薛定谔方程
背景学习量子化学原理与应用课程时,一维定态薛定谔方程经常归结为解二阶偏微分方程。因此,学习数值解法一方面能够验证解析解,另一方面也能够应对更多更复杂的势垒函数对应方程的解。参考资料https://github.com/FelixDesrochers/Numerov/https://zhuanlan.zhihu.com/p/59099100https://zhuanlan.zhihu.com/p/78619365http://www.fisica.uniud.it/~giannozz/Corsi
2022-01-07 19:18:20
2341
原创 不同编程语言是如何调用的
https://www.zhihu.com/question/20542360https://en.wikipedia.org/wiki/Language_interoperabilityhttps://en.wikipedia.org/wiki/Foreign_function_interfacehttps://www.quora.com/How-does-code-from-different-programming-languages-interact-with-each-other-with.
2022-01-07 19:17:34
517
原创 word试卷排版记录
量子化学课程期末试卷word排版记录word版本学校提供基本格式的word模板数学公式输入工具word自带公式输入法alt+=mathtype 7.0mathtype使用到的功能公式编号等号对齐格式-文字-加粗大括号加矩阵可以变成分段公式latex版本使用mathpix辅助识别数学公式可以加快速度和提高效率,同时也能降低书写错误率用latex模板仿制word格式数学公式输入更为方便数学公式的引用也更为方便可以方便控制编译输出的内容和格式latex转wor
2022-01-02 14:30:34
393
原创 linux作业后台管理
参考http://blog.itpub.net/26736162/viewspace-2142674/常用命令参考http://blog.chinaunix.net/uid-26785297-id-3375270.htmlfg、bg、jobs、&、nohup、ctrl + z命令
2021-12-24 14:13:22
799
原创 台式机新装windows系统
学校正版软件网页下载正版windows操作系统windows官网下载U盘系统工具根据电脑厂商按对应的Fn键启动bios设置设置启动项为U盘启动根据提示进行设置新装操作系统后无法联网没有以太网参考https://www.xiaozhishi.net/it/881469.htmlwin10系统没有以太网选项可能是因为没配置好,可以参照以下步骤进行配置。1、进入win10系统属性界面后,点击“设备管理器”选项。2、然后在出现的页面中,执行“操作-添加过时硬件”命令。3、然后出.
2021-12-22 18:43:38
567
原创 统计数据集中元素的种类
需要从Basis Set Exchange制作自己的基组,以下简单记录基组制作过程。# 1. 查找数据集冲所有的几何结构文件find . -type f -iname "geometry.in" # 2. 打印文件的最后一列awk '{print $NF}' file# 3. 结合以上两个命令进行循环for i in `find . -type f -iname "geometry.in"`;do awk '{print $NF}' $i; done# 4. 将结果保存到文件并进行去重处理f
2021-12-21 00:58:19
226
原创 记录使用git时碰到的问题及解决办法
fatal: refusing to merge unrelated historiesgit pull --allow-unrelated-histories本地和github上分别生成了master和main分支四步:参考https://zhuanlan.zhihu.com/p/339370999克隆原仓库创建并推送main分支修改默认分支删除master分支...
2021-12-19 17:08:48
164
原创 本地仓库上传到github
背景:需要将本地创建的git仓库上传到github上在github中创建新的空仓库将本地仓库关联到github仓库# 初始化git仓库git init# 添加项目所有文件git add .# 提交信息git commit -m "init"# 关联github上新创建的仓库git remote add origin new_repository# 上传代码到githubgit push -u origin master参考https://blog.csdn
2021-12-18 00:39:03
335
原创 使用latex beamer制作PPT
beamer简单的使用背景这个学期在当助教,习题部分涉及到大量数学公式以及部分代码,借此机会学习一下使用beamer制作ppt需要的功能首页自动目录https://www.lianxh.cn/news/4700422eee871.html代码使用代码图片生成工具数学公式https://blog.csdn.net/gsww404/article/details/78684278https://zhuanlan.zhihu.com/p/24502400https://www.mohu.
2021-12-16 23:54:01
1927
1
原创 更换cargo源
问题:当加入新的crate依赖后,执行cargo build显示updating crate.io index异常缓慢,甚至超时失败原因:访问github速度奇慢解决方法:更换国内源vi ~/.cargo/config[source.crates-io]registry = "https://github.com/rust-lang/crates.io-index"# 指定镜像replace-with = '镜像源名' # 如:tuna、sjtu、ustc,或者 rustcc # 注
2021-12-15 22:31:27
5609
1
原创 Ubuntu 20.04安装latex
# 1. 下载Textlivewget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz# 2. 解压tar -zxvf install-tl-unx.tar.gz# 3. 安装sudo perl install-tl # 安装过程比较久# 安装TeXStudiosudo add-apt-repository ppa:sunderme/texstudio
2021-12-15 19:50:50
2285
原创 限制cpu使用率
背景:服务器上有大量数据和文件,我需要打包并下载到本地,打包时通过top命令发现zip命令对应的进程会占满cpu使用率,为了避免影响其他用户的使用,我需要限制打包进程及其子进程的cpu使用率# 下载和安装cpulimitwget -O cpulimit.zip https://github.com/opsengine/cpulimit/archive/master.zipunzip cpulimit.zipcd cpulimit-mastermakesudo cp src/cpulimit /u
2021-12-09 13:42:38
889
原创 windows下U盘格式化
问题:安装ubuntu系统镜像之后,Windows系统无法正常识别出U盘完整的容量大小。原因:安装Ubuntu镜像后,U盘被分为多个分区,而 Windows此时只能识别出U盘第一个系统启动分区。解决方法:home+x打开磁盘管理选择相应的磁盘分区进行格式化参考https://www.zhihu.com/question/27888608...
2021-12-09 10:33:02
337
原创 服务器上安装mpi4py
服务器上安装mpi4py尝试方法1(失败)python -m pip install mpi4py结果报错,缺失某一个库文件导致编译失败。解决方法,如果有权限的话可以sudo安装libopenmpi-dev解决,否则只能手动编译尝试方法2(失败)参考https://mp.weixin.qq.com/s/f5bqgJYG5uAK1Zubngg65gcurl -O https://files.pythonhosted.org/packages/a6/5d/d58de70175c333255120
2021-11-17 09:35:29
842
原创 Gauss_Seidel method with python
# Gauss-Seidel method with python from wikipedia # https://en.wikipedia.org/wiki/Gauss%E2%80%93Seidel_methodimport numpy as npiteration_limit = 1000# initialize the matrixA = np.array([[10., -1., 2., 0.], [-1., 11., -1., 3.],
2021-11-16 09:49:54
1425
原创 cpu time区分
时间区分wall-clock time(or real time)指的就是现实当中时钟走的的时间user cpu time指user code运行消耗的cpu时间system cpu time指system code运行消耗的cpu时间如系统执行read, write等I/O的时间几个结论wall time < cpu time说明程序进行了并行操作wall time > cpu time说明发生了磁盘读写,网络传输的等待延迟测试#!/bin/bash# s
2021-11-14 17:03:30
760
原创 Windows powershell美化
Windows powershell美化主要目的:显示git的信息参考https://mphy.gitee.io/powershell-beautify/字体安装下载字体https://hub.fastgit.org/ryanoasis/nerd-fonts/releases/download/v2.1.0/Meslo.zip解压文件,选择需要的字体,右击为所有用户安装设置-字体设置-Meslo确认是否已经安装字体设置权限Set-ExecutionPolicy RemoteSig
2021-11-05 00:40:48
461
原创 linux命令manual page阅读1
linux命令manual page阅读11. cmp命令按字节比较两个文件# 查看manual pageman cmp# 查看详细的manual pageinfo cmp# 按字节比较两个文件cmp file1 file2cmp -b file1 file2相关命令diff(1)diff3(1)sdiff(1)2. mktemp命令创建临时文件或目录# 查看命令信息man mktemp# dry run干跑命令(不产生实际效果)mktemp -u#
2021-10-30 00:46:15
276
原创 ubuntu 20.04安装golang
ubuntu 20.04安装golang下载安装包 https://golang.org/doc/install安装解压# 如果权限不够的话,那么加sudo,要么更改安装位置rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz添加环境变量export PATH=$PATH:/usr/local/go/bin检测go version...
2021-10-29 15:51:42
518
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人