随笔分类 -  python

工具代码
摘要:https://web.stanford.edu/class/physics91si/2013/handouts/Pdb_Commands.pdf import ipdb; ipdb.set_trace() import argparse if __name__ == "__main__": par 阅读全文

posted @ 2022-05-07 10:56 HolaWorld 阅读(109) 评论(0) 推荐(0) 编辑

tensorboard
摘要:import torch from torch.utils.tensorboard import SummaryWriter import matplotlib.pyplot as plt import numpy as np def main(): log_path = './log' logge 阅读全文

posted @ 2021-08-01 21:06 HolaWorld 阅读(140) 评论(0) 推荐(0) 编辑

NVIDIA GeForce GT 730 配置 CUDA
摘要:1.下 cuda toolkit 8.0 https://developer.nvidia.com/cuda-80-download-archive 2.下 cuDNN 6.0 https://developer.nvidia.com/rdp/cudnn-archive 3. 把 cuDNN 里的 阅读全文

posted @ 2021-07-31 11:51 HolaWorld 阅读(3615) 评论(0) 推荐(0) 编辑

本地浏览器远程访问服务器tensorboard(MobaXterm)
摘要:在左侧栏有Tools,点击后,下拉到最后,在Network中,点击MobaSSHTunnel,点击New SSH tunnel. https://blog.csdn.net/z13653662052/article/details/98761242 阅读全文

posted @ 2021-06-02 12:56 HolaWorld 阅读(408) 评论(0) 推荐(0) 编辑

python多进程
摘要:from multiprocess import Pool, cpu_count with Pool() as pool: # input_list: [input1, input2, input3...] for output in pool.imap_unordered(func, input_ 阅读全文

posted @ 2021-05-11 11:57 HolaWorld 阅读(60) 评论(1) 推荐(1) 编辑

python调用父类(超类)
摘要:super().__init__(这里面填的是父类的__init__函数需要的参数) 阅读全文

posted @ 2021-04-21 23:55 HolaWorld 阅读(426) 评论(0) 推荐(0) 编辑

ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.
摘要:https://blog.csdn.net/ha010/article/details/103367311 https://blog.csdn.net/baidu_36161077/article/details/81058404 http://www.voidcn.com/article/p-vo 阅读全文

posted @ 2020-11-01 23:51 HolaWorld 阅读(236) 评论(0) 推荐(0) 编辑

python参数
摘要:1.必选参数、2.默认参数、3.可变参数、4.命名关键字参数、5.关键字参数 2.默认参数: def enroll(name, gender, age=6, city='Beijing'): 3.可变参数: def enroll(name, gender, args): 4.命名关键字参数: def 阅读全文

posted @ 2020-04-09 15:15 HolaWorld 阅读(188) 评论(0) 推荐(0) 编辑

pygame
摘要:```python import pygame from pygame.locals import (K_SPACE, KEYDOWN, QUIT) class Obj: def __init__(self): self.x = 400 self.y = 300 self.dir = 0 def update(self): # 更新位置 if self.dir == 0: self.up() el 阅读全文

posted @ 2020-04-01 20:54 HolaWorld 阅读(185) 评论(0) 推荐(0) 编辑

pyinstaller打包python应用程序
摘要:参考: https://blog.csdn.net/weixin_41879093/article/details/104216881 https://blog.csdn.net/qq_41140138/article/details/100833814 阅读全文

posted @ 2020-04-01 18:30 HolaWorld 阅读(164) 评论(0) 推荐(0) 编辑

Linux下安装python
摘要:1、下载 https://www.python.org/downloads/source/ 两个压缩包随便下一个 2、 解压 3、 创个文件夹来装,如/usr/local/python3 4、 cd 刚刚解压得到的文件夹 5、 ./configure prefix=/usr/local/python 阅读全文

posted @ 2020-03-07 15:57 HolaWorld 阅读(241) 评论(0) 推荐(0) 编辑

python播放音频文件
摘要:https://pythonbasics.org/python play sound/ https://blog.csdn.net/yzy_1996/article/details/86992770 阅读全文

posted @ 2020-03-07 09:29 HolaWorld 阅读(1544) 评论(0) 推荐(0) 编辑

安装pyaudio
摘要:http://people.csail.mit.edu/hubert/pyaudio/ 一、Windows https://www.lfd.uci.edu/~gohlke/pythonlibs/ pyaudio pip install PyAudio 0.2.11 cp37 cp37m win_am 阅读全文

posted @ 2020-03-06 22:14 HolaWorld 阅读(2453) 评论(0) 推荐(0) 编辑

给 python工程 打包并上传 PyPI (The Python Package Index)
摘要:主站: 测试站: 打包教程: 1、创建文件和文件夹 2、README.md Example Package This is a simple example package. You can use "Github flavored Markdown" to write your content. 阅读全文

posted @ 2020-03-06 20:07 HolaWorld 阅读(253) 评论(0) 推荐(0) 编辑

python怎么import自己写的包
摘要:mypac.py: main.py: 执行mypac.py: executing \_\_main\_\_ this is a function of mypac 执行main.py: executing mypac \ this is a function of mypac 执行完main.py后 阅读全文

posted @ 2020-03-06 17:15 HolaWorld 阅读(1576) 评论(0) 推荐(0) 编辑

pip源使用国内镜像
摘要:临时使用 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package 注意,simple 不能少, 是 https 而不是 http 设为默认 升级 pip 到最新的版本 (>=10.0.0) 后进行配置: pip ins 阅读全文

posted @ 2020-03-06 12:51 HolaWorld 阅读(2407) 评论(0) 推荐(0) 编辑

导航

点击右上角即可分享
微信分享提示