Python
freshZero_
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python datetime
解析字符串为datetime使用函数datetime.strptime(str,’format’);需要注意的是在format中的格式一定要遵循Python中定义的大小写,在这里是大小写敏感的,不能乱用原创 2017-05-12 16:02:59 · 400 阅读 · 0 评论 -
C-ordered contiguous
A contiguous array is just an array stored in an unbroken block of memory: to access the next value in the array, we just move to the next memory address. Consider the 2D array arr = np.arange(12转载 2017-05-27 16:51:44 · 3210 阅读 · 0 评论 -
numpy.add.at
numpy.ufunc.atufunc.at(a, indices, b=None) Performs unbuffered in place operation on operand ‘a’ for elements specified by ‘indices’. For addition ufunc, this method is equivalent to a[indices] += b,原创 2017-09-05 13:45:15 · 6570 阅读 · 0 评论 -
Anaconda环境变量配置
Anaconda环境变量配置 当没有按照默认设置安装Anaconda时(比如更改安装目录在D盘的时候),需要自己设置环境变量。 D:\Anaconda\ Python需要 D:\Anaconda\Scripts Anaconda 自带脚本(conda、jupyter notebook、ipython) D:\Anaconda\Library\bi...原创 2018-11-01 09:55:39 · 25940 阅读 · 3 评论 -
Linux中python相关
Linux更改python默认版本 sudo rm -rf /usr/bin/python sudo ln -s /usr/bin/python3 /usr/bin/python原创 2018-11-05 21:16:39 · 423 阅读 · 0 评论 -
python使用出现问题总结
pip3相关 当使用pip3命令的时候,出现ImportError: cannot import name ‘main’ 解决办法: 卸载pip3,重新安装pip3 sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall ...原创 2018-11-15 16:54:02 · 751 阅读 · 0 评论 -
pycharm 远程调试docker 中的Python脚本
一、远程服务器以及docker配置ssh 1 原理 将docker中的ssh端口22映射到服务器中的某一个端口,例如9999,本地使用docker的用户名和密码登录9999端口,也就登录了相应的docker 2 ssh配置步骤 运行docker镜像,并且指定相应的端口映射关系 NV_GPU=5 nvidia-docker run -ti --name my_tensorflow1.9_py3 ...原创 2018-11-14 20:40:38 · 4616 阅读 · 3 评论 -
lambda表达式在sort中的使用
文章目录一、lambda表达式一般用法二、 lambda表达式在sort中的使用sort基本用法key可以为一个函数使用lambda表达式 一、lambda表达式一般用法 Blueprint lambda argument: manipulate(argument) Example add = lambda x, y: x + y print(add(3, 5)) # Output: 8...原创 2018-12-03 11:05:39 · 17843 阅读 · 3 评论 -
python opencv
1 获得图片中某一块旋转矩形区域 1.1 将原始图片旋转到水平矩形位置进行裁剪 M = cv2.getRotationMatrix2D((x_center, y_center), float(theta)*180/math.pi, 1) cols,rows,_ = img.shape dst = cv2.warpAffine(img, M, (rows,cols)) crop_img = dst[...原创 2018-12-13 12:12:06 · 281 阅读 · 0 评论 -
jupyter notebook
jupyter notebook启动错误 显示:OSError: [Errno 99] Cannot assign requested address 解决办法: 创建Jupyter notebook的配置文件jupyter_notebook_config.py,在终端中输入: jupyter notebook --generate-config 打开jupyter_notebook_con...原创 2019-06-21 15:29:20 · 400 阅读 · 0 评论
分享