- 博客(37)
- 收藏
- 关注
原创 【python】在SLURM上使用multiprocessing并行
【代码】【python】在SLURM上使用multiprocessing并行。
2024-04-17 22:11:23
853
原创 【vs code】Modern Fortran插件设置
fortran胡乱缩进看的很难受,发现vscode的Modern Fortran除了高亮外还有很多很强力的功能。仔细配置了一下。
2023-08-06 22:57:24
5288
3
原创 hexo next主题空白,本地无法预览
hexo之前配的好好的,运行环境是win10,一个月不用再打开,本地预览和github pages全是空白打不开,很方。试过重启,更新升级,hexo clean + hexo g重新生成都不行,后来发现端口被福昕占用了改端口也不行。最后终于找到原因了:用于DNS加速服务的jsdelivr寄了解决方案确认4000端口是否占用powershell查看4000端口占用情况> netstat -aon|findstr "4000"TCP 127.0.0.1:4000 0.0.
2022-05-28 18:59:06
849
原创 科目三 注意点整理
文章目录预备灯光操作起步预备右车门,说教官好,我是xxx,这是我的身份证;到左车门,喊报告,逆时针绕车,前后保险杠处按感应器按钮上车,看左右后视镜是否合适,中间后视镜,调整作妖位置、靠背,系安全带灯光操作听到语音提示就开前照灯,要是远光开着就关掉远光灯 夜间没有路灯、照明不良条件行驶远近交替 超车,夜间无交通信号灯控制路口,最后要停在近光状态示廓灯 路边临时停车近光灯 其他结束后灯光复位,不要抢答、超时起步打左灯,闪烁3秒以上,踩离合,挂1档看左后视镜...
2021-12-08 22:41:33
154
转载 LaTeX 排版python代码
转载自怎么在 LaTeX 中排版 Python 代码? - 孟晨的回答 - 知乎https://www.zhihu.com/question/65508676/answer/232267619\usepackage{listings, xcolor}\lstdefinestyle{lfonts}{ basicstyle = \footnotesize\ttfamily, stringstyle = \color{purple}, keywordstyle = \color{bl
2021-12-06 20:59:12
782
转载 matlab导出pdf时,去除pdf白色边框
参考链接https://ww2.mathworks.cn/matlabcentral/answers/12987-how-to-save-a-matlab-graphic-in-a-right-size-pdf代码示例h = figure;plot(1:10);set(h,'Units','Inches');pos = get(h,'Position');set(h,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[
2021-12-06 15:24:29
1467
1
原创 英语论文词汇句式收集
文章目录句式背景介绍创新点困难、缺点、代价引出优点说明、注意步骤建议短语词汇副词动词名词介词形容词连词句式背景介绍Quantifying the flow dynamics essentially requires the knowledge of spatio-temporal fluid velocity and pressure fields, and has been the centerpiece of experimental and theoretical fluid mechani
2021-11-26 14:34:14
397
原创 python--spilt和strip用法
strips.strip(delete_object) 删除s字符串中开头、结尾处,想要删除序列的字符。s.lstrip(delete_object) 删除s字符串中开头处,想要删除序列的字符。s.rstrip(delete_object) 删除s字符串中结尾处,想要删除序列的字符。注意!(1)只能删除开头或是结尾的字符或是字符串。不能删除中间的字符或是字符串。(2)只要在delete_object序列内均删除,不论字符串的前后顺序。(3)当delete_o
2021-08-30 14:34:48
209
原创 python--xlrd, xlwt, xlutils用法
python–xlrd, xlwt, xlutils用法xlrd只能读取表格,不能直接修改原表格,复制原表格之后可以修改。支持xlsx, xls文件格式xlwt只能修改表格,不能读取表格,支持xlsx, xls文件格式xlutils可以将xlrd.Book转为xlwt.Workbook,从而可以xlrdimport xlrdexcel = xlrd.open_workbook('E:/test.xlsx')返回值为xlrd.book.Book对象,不可修改获取sheettable_l
2021-08-27 21:26:32
430
原创 python--xlrd/xlwt/xlutils
python–xlrd/xlwt/xlutilsxlrd只能读取,不能改,支持 xlsx和xls 格式xlwt只能改,不能读xlwt只能保存为.xls格式xlutils能将xlrd.Book转为xlwt.Workbook,从而得以在现有xls的基础上修改数据,并创建一个新的xls,实现修改xlrd打开文件import xlrdexcel=xlrd.open_workbook('E:/test.xlsx') 返回值为xlrd.book.Book对象,不能修改获取sheett
2021-04-01 20:24:20
292
原创 python--list
python–list元素之间只能用逗号分隔classmates = ['Michael', 'Bob', 'Tracy']1.查找,定位下标索引从0开始,classmates[0]='Michael'-1,-2,-3…表示倒数第一、第二、第三个classmates[-1]='Tracy'classmates[-2]=''Bob'查找好多位置[x:]或者[:x]classmates[1:]=['Bob', 'Tracy']返回目标位置s.index(obj,start,stop)i
2021-04-01 17:52:50
120
原创 python--Folium
python–Folium官方说明:folium.link.Map(location=None, width=‘100%’, height=‘100%’, left=‘0%’, top=‘0%’, position=‘relative’, tiles=‘OpenStreetMap’, attr=None, min_zoom=0, max_zoom=18, zoom_start=10, min_lat=- 90, max_lat=90, min_lon=- 180, max_lon=180, max_bo
2021-04-01 16:43:10
538
原创 matlab之lp_solve
ARGUMENTS: The first four arguments are required:f: n vector of coefficients for a linear objective function.a: m by n matrix representing linear constraints.b: m vector of right sides for the inequality constraints.e: m vector that determines the sens
2021-03-27 21:07:02
280
原创 获取字典的key和value
有两种方法获取字典的key和valuefor item in dict.items(): key = item[0] value = item[1]dict.values()dict.keys()
2019-11-26 15:46:51
2579
转载 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: tr
举个例子,在文件中我传入的文件路径是这样的sys.path.append(‘c:\Users\mshacxiang\VScode_project\web_ddt’)原因分析:在windows系统当中读取文件路径可以使用\,但是在python字符串中\有转义的含义,如\t可代表TAB,\n代表换行,所以我们需要采取一些方式使得\不被解读为转义字符。目前有3个解决方案1、在路径前面加r,即保持...
2019-11-21 23:16:12
760
转载 IndexError: list assignment index out of range之解决方法
m1=[]for i in xrange(n):m1[i]=1报错:IndexError: list assignment index out of range分析空数组不能直接指定位置解决方法1m1.append(1)解决方法2先生成一个定长的list:m1=[0]*len(data)m1[1]=1作者:veronachiu链接:https://www.jianshu....
2019-11-21 15:54:54
906
转载 python安装路径,pip安装的包路径
1.window下命令where python2.查看pip安装了多少包 pip list3.使用pip安装完包后,只需再执行一次命令pip install xx,就会显示安装路径如:pip install jupyter安装完成后,再次输入pip install jupyter就会显示此包已经安装的路径了。果然在这里。而且发现一个大的秘密:原来所有的通过pip安装的包都在这个目录下...
2019-11-19 16:36:06
924
原创 python--pandas.DataFrame
DataFrame(data=None, index=None, columns=None, dtype=None, copy=False)[source]data : numpy ndarray (structured or homogeneous), dict, or DataFrameDict can contain Series, arrays, constants, or list-...
2019-11-07 23:47:02
111
原创 python--os.listdir()函数
语法listdir()方法语法格式如下:os.listdir(path)path – 需要列出的目录路径返回值返回指定路径下的文件和文件夹列表。例子:(1)import os, sys#打开文件path = “/var/www/html/”dirs = os.listdir( path )#输出所有文件和文件夹for file in dirs:print(file)执...
2019-11-07 23:24:04
508
转载 python——spilt和strip用法
python_spilt和strip用法strips.strip(delete_object) 删除s字符串中开头、结尾处,想要删除序列的字符。s.lstrip(delete_object) 删除s字符串中开头处,想要删除序列的字符。s.rstrip(delete_object) 删除s字符串中结尾处,想要删除序列的字符。注意!(1)只能删除开头或是...
2019-11-02 16:31:17
742
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人