thread_asyncio
摘要:thread_asyncio # 使用多线程:在携程中集成阻塞io import asyncio from concurrent.futures import ThreadPoolExecutor import socket from urllib.parse import urlparse def
阅读全文
socket服务
摘要:1.socket_server import socket import threading server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind(('0.0.0.0', 8000)) server.listen
阅读全文
socket_http
摘要:socket_http import socket from urllib.parse import urlparse import time def get_url(url): # 通过socket请求html url = urlparse(url) # 解析url host = url.netl
阅读全文
async await
摘要:1.async await # python为了将语义变得更加明确,就引入了async和await关键词用于定义原生的协程 import types async def downloader(url): return "bobby" @types.coroutine def downloader(u
阅读全文
yield_from
摘要:python3.3 新加的yield from 语句 1.yield from def my_chain(*args, **kwargs): for my_iterable in args: yield from my_iterable # yield from 相当于下面的: # for valu
阅读全文
Async/Await
摘要:Async/Await入门指南:https://zhuanlan.zhihu.com/p/27258289 import asyncio import random class Potato: @classmethod def make(cls, num, *args, **kws): potato
阅读全文
Dockerfile
摘要:1.centos带python环境 pip3.6 freeze > plist.txt wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz FROM centos LABEL maintainer="yu" RUN yum -y
阅读全文
药学宝
摘要:01-yxb.py import time from YDM import YDMHttp import requests import time import pymysql import logging import json from file_handle import wite_to_ex
阅读全文
云打码
摘要:云片:http://www.yundama.com/ 1.云打码使用 # coding:utf-8 import json, time, requests class YDMHttp: apiurl = 'http://api.yundama.com/api.php' username = '' p
阅读全文
Anaconda 下载
摘要:Anaconda官网:https://repo.anaconda.com/archive/清华大学镜像站:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=N&O=D C:\01-python\06-Anaconda Python需要C
阅读全文
开心聊聊天信息爬取
摘要:开心聊聊天信息 # _*_ coding:UTF-8 import time from selenium.webdriver.support.ui import WebDriverWait from appium import webdriver import re import pymysql i
阅读全文
微信消息通知
摘要:1.微信消息通知 from wxpy import * from wechat_sender import listen, Sender # 这里登录单独申请的微信号 bot = Bot() # 这里查询你的个人微信, search 填入你的微信昵称 my = bot.friends().searc
阅读全文
阿里云 开源镜像
摘要:下载地址:https://opsx.alibaba.com/mirror everything: 对完整版安装盘的软件进行补充,集成所有软件 GnomeLive , GNOME桌面版 KdeLive , KDE桌面版 livecd 光盘上运行的系统 NetInstall 在线安装 CentOS-7-
阅读全文