
python
文章平均质量分 56
风不二
一个不正经的业余程序员
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[小程序]小程序破千之笔顺图片采集篇(2)
介绍笔顺动画素材的采集,使用python和nodejs爬虫,从百度和搜狗的汉语下面采集gif图片原创 2021-01-31 17:25:36 · 429 阅读 · 0 评论 -
【python】多线程获取数据渲染折线图笔记整理
文章整个流程通过神策api获取数据,生成折线趋势图,业务功能和简单, matplotlib requests threading 获取数据 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小白, 有时候明明安装了 某些package pip3 install numpy pip3 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 Queue worker = Queue() resulter = Queue() worker.put(job) resulter.put() resulter.get() #每次取一个 全部代码 impor...原创 2020-01-11 10:12:35 · 387 阅读 · 0 评论 -
【python】threading多线程学习 (一)
这块相比较nodejs应该更容易理解一些,后面有时间会进行对比分析下。 threading start() join() threading.active_count() 激活线程数量 threading.enumerate() 线程详情 threading.current_thread() 当前线程 python创建多线程方法也很简单 import threading import 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+y print(fun(4,4)) #output 8 lambda 一般用于简单的方法声明 fun = lambda x,y: x*y print(fun(4,4)) #output 16 map 调用方法 x=5 y=6 fun(x,...原创 2020-01-11 10:13:15 · 316 阅读 · 0 评论 -
【python】画线----Matplotlib 模块学习系列(一)
使用到的方法 plt.figure() //可以理解为声明窗口 plt.plot() // 线的坐标值 plt.show() // 显示 import matplotlib.pyplot as plt import numpy as np x = 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 size marker 形状 c color 颜色 alpha 透明度 代码实现 from matplotlib import pyplot as plt import numpy as np n = 100 X = 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 | false from matplotlib import pyplot as plt from matplotlib import animation i...原创 2020-01-11 10:17:10 · 436 阅读 · 0 评论 -
【python】web网络请求学习
和nodejs相比感觉怪怪的,最简单的get请求 python 3 import urllib.request from urllib.error import HTTPError import json req = 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 评论