
python
文章平均质量分 56
风不二
一个不正经的业余程序员
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[小程序]小程序破千之笔顺图片采集篇(2)
介绍笔顺动画素材的采集,使用python和nodejs爬虫,从百度和搜狗的汉语下面采集gif图片原创 2021-01-31 17:25:36 · 429 阅读 · 0 评论 -
【python】多线程获取数据渲染折线图笔记整理
文章整个流程通过神策api获取数据,生成折线趋势图,业务功能和简单,matplotlibrequeststhreading获取数据def getData(start, end): sql = "select count(distinct(stu_id)) as num, date from events where "+_os+" date between '"+start+"' and '"+end+"' and business='ai' group by date order原创 2020-10-13 16:37:02 · 461 阅读 · 0 评论 -
[python] ModuleNotFoundError: No module named 问题解决
作为一个python小白, 有时候明明安装了 某些packagepip3 install numpypip3 install opencv-python等等但仍然报错:ModuleNotFoundError: No module named解决方案:1、全局安装方式 sudo -H python3 -m pip install opencv-python资源镜像站:新版ubuntu要求使用https源,要注意。清华:https://pypi.tuna.tsinghua.edu.cn原创 2020-05-25 17:47:13 · 8121 阅读 · 0 评论 -
【python】threading多线程学习队列(二)
主要知识点:queue 队列get,put 方法 每次取一个、添加一个队列其实就是按照顺序执行,达到自已的结果预期。就想排队买东西一样,from queue import Queueworker = Queue()resulter = Queue()worker.put(job)resulter.put()resulter.get() #每次取一个全部代码impor...原创 2020-01-11 10:12:35 · 387 阅读 · 0 评论 -
【python】threading多线程学习 (一)
这块相比较nodejs应该更容易理解一些,后面有时间会进行对比分析下。threadingstart()join()threading.active_count() 激活线程数量threading.enumerate() 线程详情threading.current_thread() 当前线程python创建多线程方法也很简单import threadingimport time...原创 2020-01-11 10:12:52 · 387 阅读 · 0 评论 -
【python】class和module、import学习(二)
模块和类的区别原创 2020-01-11 10:13:06 · 1358 阅读 · 0 评论 -
【python】基础方法学习(一)
python 方法集合def、lambda、map、id、copy 方法学习def 所有定义方法都可以用def fun(x,y): return x+yprint(fun(4,4)) #output 8lambda 一般用于简单的方法声明fun = lambda x,y: x*yprint(fun(4,4))#output 16map 调用方法x=5y=6fun(x,...原创 2020-01-11 10:13:15 · 316 阅读 · 0 评论 -
【python】画线----Matplotlib 模块学习系列(一)
使用到的方法plt.figure() //可以理解为声明窗口plt.plot() // 线的坐标值plt.show() // 显示import matplotlib.pyplot as pltimport numpy as npx = np.linspace(-1,1,50) //取值范围以及点数y = 2*x+1 //方程plt.figure(num=4, figsize...原创 2020-01-11 10:17:18 · 677 阅读 · 0 评论 -
【python】散点图----Matplotlib 模块学习系列(三)
主要关注方法plt.scatter()参数:x坐标y坐标s sizemarker 形状c color 颜色alpha 透明度代码实现from matplotlib import pyplot as pltimport numpy as npn = 100X = np.random.normal(0, 1, n)Y = np.random.normal(0, 1...原创 2020-01-11 10:16:58 · 335 阅读 · 0 评论 -
【python】动画----Matplotlib 模块学习系列(二)
主要注意点:FuncAnimation 参数figure : plt.figure()func : 动画函数 参数frames : 帧数init_func 初始化函数interval : 间隔毫秒blit : true | falsefrom matplotlib import pyplot as pltfrom matplotlib import animationi...原创 2020-01-11 10:17:10 · 436 阅读 · 0 评论 -
【python】web网络请求学习
和nodejs相比感觉怪怪的,最简单的get请求python 3import urllib.requestfrom urllib.error import HTTPErrorimport jsonreq = urllib.request.Request(url=r"http://api.ibeeger.com",headers={'User-Agent':' Mozilla/5.0 (...原创 2020-01-11 10:13:34 · 2744 阅读 · 0 评论 -
【python】python3 Tensorflow 环境配置踩坑整理 mac环境
问题一 pip3 install tensorflow -t pathoname如果出现下面问题 File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/local/lib/pytho...原创 2020-01-11 10:17:30 · 1500 阅读 · 0 评论