Hello World

这个是标题,但是为什么要有标题

这个是子标题,但是为什么要有子标题

2023年5月12日 #

python导出postgresql中的一个表到本地csv表格

摘要: 代码如下 修改xxx即可: conn = psycopg2.connect(host=DB_SERVICES, user=DB_USERNAME,password=DB_PWD, database=DB_NAME) cur = conn.cursor(cursor_factory=psycopg2. 阅读全文

posted @ 2023-05-12 10:32 swuxyj 阅读(16) 评论(0) 推荐(0) 编辑

2023年3月16日 #

python并行计算demo,用于求0~n之间的素数之和

摘要: 想试试服务器的并行计算能力,就让cpu慢慢计算,计算0~n之间所有素数之和 设置target为结尾,num_of_processors为进程数,即可开始跑 如下所示 from multiprocessing import Pool import math import numpy import ti 阅读全文

posted @ 2023-03-16 17:59 swuxyj 阅读(47) 评论(0) 推荐(0) 编辑

2022年1月19日 #

记录一些常用的指令

摘要: Linux按照指令来关闭某个进程 nohup python -u "main.py" > log.out 2>&1 & ps -ef|grep "python -u main.py"| awk '{print $2}'|xargs kill -9 conda config --add channel 阅读全文

posted @ 2022-01-19 22:24 swuxyj 阅读(138) 评论(0) 推荐(0) 编辑

2021年8月25日 #

flask中运行cesium项目,浏览器报text/plain错误,解决方法如下

摘要: 报错: Refused to execute script from 'http://127.0.0.1:5000/3D/lib/Cesium/Workers/createVerticesFromQuantizedTerrainMesh.js' because its MIME type ('tex 阅读全文

posted @ 2021-08-25 10:15 swuxyj 阅读(588) 评论(0) 推荐(0) 编辑

2021年5月11日 #

overrides报错:TypeError: Highway.forward: `input` must be present

摘要: 代码from allennlp.modules import TimeDistributed 报错了: /usr/local/lib/python3.7/dist-packages/overrides/signature.py in ensure_all_positional_args_define 阅读全文

posted @ 2021-05-11 12:19 swuxyj 阅读(905) 评论(0) 推荐(1) 编辑

2021年4月28日 #

InvalidVersionSpecError: Invalid version spec: =2.7

摘要: xyj@minecraft:~$ conda install numpy Solving environment: failed InvalidVersionSpecError: Invalid version spec: =2.7 最近使用conda遇到了报错,发现conda的issues有人提出 阅读全文

posted @ 2021-04-28 00:16 swuxyj 阅读(18473) 评论(1) 推荐(0) 编辑

2021年4月22日 #

qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" This application failed to start because no Qt platform plugin could be initialized.

摘要: 使用pyqt5的程序遇到了这个问题: qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" This application failed to start because no Qt platform plugin 阅读全文

posted @ 2021-04-22 10:22 swuxyj 阅读(1236) 评论(0) 推荐(0) 编辑

2021年4月14日 #

匈牙利算法解决两个坐标列表匹配的问题

摘要: 遇到一个问题,有一个坐标列表A:[[10,20],[20,30],[42,41]],和一个坐标列表B:[[14,24],[41,42],[20,31],[42,41]],需要看这两个坐标列表之间谁与谁更加匹配,这时候就可以使用匈牙利算法来实现。 原理不再赘述,直接显示代码: from scipy.o 阅读全文

posted @ 2021-04-14 23:18 swuxyj 阅读(591) 评论(0) 推荐(0) 编辑

2021年4月13日 #

pytorch-summary 针对DenseNet生成摘要报错: AttributeError: 'list' object has no attribute 'size'

摘要: pytorch-summary 针对DenseNet生成摘要报错: AttributeError: 'list' object has no attribute 'size' google搜索这个问题,发现也有人遇到过:https://github.com/sksq96/pytorch-summar 阅读全文

posted @ 2021-04-13 22:22 swuxyj 阅读(2796) 评论(0) 推荐(0) 编辑

2021年4月3日 #

使用sklearn的pca模块fit数据报错“ValueError: array must not contain infs or NaNs”

摘要: 使用sklearn的pca模块fit数据报错“ValueError: array must not contain infs or NaNs”: Traceback (most recent call last): File "xxx.py", line 57, in <module> pca.fi 阅读全文

posted @ 2021-04-03 14:40 swuxyj 阅读(3212) 评论(0) 推荐(0) 编辑

导航

Hello World