Python
文章平均质量分 60
icanactnow
将有限的精力投入到无限的热爱中...
展开
-
Python基础
还是先感谢一下廖雪峰老师,廖老师的Git教程真的非常棒,开始学习廖老师的Python教程,一定也是非常棒的。廖雪峰Python教程 python输入输出 //千万记住下面的那个逗号。 print('strings',var)//可以输出多条变量自动加空格分开。 示例: print('1024*768=',1024*768) #是注释,本文中#号后面一般是运行输出值 以:结束,后面缩进的视原创 2016-10-16 15:01:18 · 469 阅读 · 0 评论 -
python-Process
创建进程 方法1 from multiprocessing import Queue, Process import os import time def test(): time.sleep(2) print(f'这个进程运行test方法,进程号{os.getpid()}') if __name__ == '__main__': # 创建进程 p = Pr...原创 2019-04-02 20:21:53 · 366 阅读 · 0 评论 -
python-threading
文章目录创建线程示例线程非安全示例线程安全示例死锁 创建线程示例 import threading from threading import Thread import time def test(x): print(f'this is {x}') time.sleep(1) def get_thread(): # 创建十个线程运算test函数 threads...原创 2019-04-02 16:20:33 · 115 阅读 · 0 评论 -
asyncio
base python 3.7+ 文章目录协程并发运行wait_for 协程 import asyncio from datetime import datetime now = lambda : datetime.now() async def main(): time1 = now() await asyncio.sleep(1) time2 = now() ...原创 2019-04-02 11:05:49 · 105 阅读 · 0 评论 -
python 杂记
进程 name main 线程锁 正则表达式 sqlite3 mysql 示例 SQLAlchemy HTTP格式 WSGI 接口使用 Flask框架使用 yield next send yield from aiohttp flask OAuth 爬虫爬取特定内容 splitcharnum pip 安装 virtualenv 虚拟环境 virtualenvwrapper安装 找到pytho...原创 2017-07-29 14:58:29 · 532 阅读 · 0 评论 -
Python 版本相关
windows python版本控制 使用pycharm右键属性以管理员方式运行 使用conda进行版本控制 使用virtualenv 和 virtualenvwrapper进行版本控制 sublime python环境创建 ubuntu python 版本控制之pyenv windows python版本控制 使用pycharm右键属性以管理员方式运行 使用cond...原创 2018-02-08 21:54:37 · 253 阅读 · 0 评论 -
sublime 相关
Ubuntu 环境 安装 wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - sudo apt-get install apt-transport-https echo "deb https://download.sublimetext.com/ apt/stable/"原创 2017-09-20 14:23:29 · 216 阅读 · 0 评论 -
python 资源相关
pip 安装包下载地址 https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted原创 2018-01-25 13:48:21 · 241 阅读 · 0 评论 -
Pycharm 相关
ubuntu 环境 安装 安装 - 官网下载后解压移动到/opt/路径下 - 进入 bin文件 终端运行 ./pycharm.sh 开始安装 破解 - 在/etc/hosts后增加0.0.0.0 account.jetbrains.com - 获取注册码(http://idea.lanyus.com/) 结合pyenv选择版本 - file - > default原创 2018-01-24 17:20:30 · 203 阅读 · 0 评论 -
numpy/matplotlib/pandas
pandas DataFrame 数据框化 import pandas as pd from pandas import Series, DataFrame data = {"name":["yahoo","google","facebook"], "marks":[200,400,800], "price":[9, 3, 7]} f1 = DataFrame(data) p原创 2018-01-16 00:29:12 · 214 阅读 · 0 评论 -
数据结构与算法
p=(1,2) x, y =p x, y (1, 2) datas = [ 'eric', 'man', (120,112,121)] name, sex, (math, english, chinese) = datas name, sex, math, english, chinese ('eric', 'man', 120, 112, 121) # *语法 detial =原创 2018-01-16 00:24:24 · 122 阅读 · 0 评论 -
requests 库使用
import requests s = requests.Session() #传递url参数 dic = {'key1':'value1','key2':'value2','key3':['value3','value4']} r1 = requests.get('http://httpbin.org/get',params = dic) print(r1.url)#http://httpbin原创 2017-09-20 13:59:03 · 284 阅读 · 0 评论 -
pyqt5
安装 pip 安装真麻烦直接,exe安装 安装参考原创 2017-09-21 17:55:29 · 483 阅读 · 0 评论 -
linux杂记
vim 编辑器使用apt-get install vim #安装vim编辑器,乌班图默认是vi感觉很难用 touch test #创建用于测试的test文件 vim test.txt #创建并打开文件 vi test #使用vi编辑器打开文件 # 安 i 进入编辑模式 # 编辑完成 按esc :wq!保存并推出 或 :q!不保存退出 cat test #查看文件内容有时间了继续学习啊linux 安装原创 2017-09-05 21:43:33 · 246 阅读 · 0 评论 -
路径替换小脚本
在处理前端代码时经常要替换路径,手动太费时间就手写了个小脚本。 将html中 <link rel="stylesheet" type="text/css" href="static/css/reset.css"> 替换成 <link rel="stylesheet" type="text/css" href="{% static '<link rel="stylesheet" type="t原创 2017-08-28 12:23:37 · 271 阅读 · 0 评论 -
robot framework
异常记录 command: pybot.bat --argumentfile c:\users\eric\appdata\local\temp\RIDEwsndv https://testerhome.com/topics/17370 再对应版本python/Scripts下新建pypot.py内容为 @Echo off python -m robot.run %* ...原创 2019-06-25 23:57:58 · 334 阅读 · 0 评论