08 2021 档案

摘要:from builtins import input,open,print import requests from bs4 import BeautifulSoup headers={ 'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) A 阅读全文
posted @ 2021-08-29 18:57 该显示昵称已被使用了 阅读(60) 评论(0) 推荐(0)
摘要:系统自带的图片浏览器 from PIL import Image img = Image.open('code_img.png') img.show() matplotlib图片显示 from PIL import Image import matplotlib.pyplot as plt img 阅读全文
posted @ 2021-08-29 18:32 该显示昵称已被使用了 阅读(44) 评论(0) 推荐(0)
摘要:解决黏包的问题 struct 模块 https://blog.csdn.net/weixin_33812391/article/details/111905211 # server import json import struct import socket sk = socket.socket( 阅读全文
posted @ 2021-08-28 10:04 该显示昵称已被使用了 阅读(23) 评论(0) 推荐(0)
摘要:python # python 天生支持多态 class Alipay(): def pay(self,money): print('已经用支付宝支付了%s元' % money) class Applepay(): def pay(self,money): print('已经用applepay支付了 阅读全文
posted @ 2021-08-28 08:09 该显示昵称已被使用了 阅读(21) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/Eva-J/articles/7293890.html java # java里的所有类的继承都是单继承,所以抽象类完美的解决了单继承需求中的规范问题 # 但对于多继承的需求,由于java本身语法的不支持,所以创建了接口Interface这个概念来解决 阅读全文
posted @ 2021-08-28 07:31 该显示昵称已被使用了 阅读(60) 评论(0) 推荐(0)
摘要:Python对协程的支持是通过generator实现的 # 生产者send # 消费者yield 【yield不但可以返回一个值,它还可以接收调用者发出的参数】 def consumer(): r = '' while True: n = yield r if not n: return print 阅读全文
posted @ 2021-08-27 15:42 该显示昵称已被使用了 阅读(61) 评论(0) 推荐(0)
摘要:利用【queue】【BaseManager】 # master #!/usr/bin/env python3 # -*- coding: utf-8 -*- import queue from multiprocessing.managers import BaseManager # 发送任务的队列 阅读全文
posted @ 2021-08-25 15:03 该显示昵称已被使用了 阅读(41) 评论(0) 推荐(0)
摘要:算法中容易遇到的坑 # [2:2]前后相等,什么都获取不到的 list_t = [1,2,3,4,5] print(list_t[2:2]) # [] 阅读全文
posted @ 2021-08-20 10:30 该显示昵称已被使用了 阅读(50) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/qq_52480014/article/details/114264635 import tkinter as tk # Python 3 import # import Tkinter as tk # Python 2 import root = tk. 阅读全文
posted @ 2021-08-17 22:15 该显示昵称已被使用了 阅读(64) 评论(0) 推荐(0)
摘要:根据node个数,选出数字中node个数的数据进行验证 import time from multiprocessing import Process import os from multiprocessing import Pool import os, time, random # 多线程二分 阅读全文
posted @ 2021-08-17 15:45 该显示昵称已被使用了 阅读(76) 评论(0) 推荐(0)
摘要:思路1,master等待远端返回结果 from multiprocessing import Pool import os, time, random # 在远端执行的任务进程,,hang住等待返回 def long_time_task(ip,url): print('Run task %s-%s 阅读全文
posted @ 2021-08-17 15:25 该显示昵称已被使用了 阅读(41) 评论(0) 推荐(0)
摘要:https://www.liaoxuefeng.com/wiki/1016959663602400/1017628290184064 join # 1. 一个 from multiprocessing import Process import os # 子进程要执行的代码 def run_proc 阅读全文
posted @ 2021-08-17 10:28 该显示昵称已被使用了 阅读(227) 评论(0) 推荐(0)
摘要:版本1 # -*- coding: utf-8 -*- import time import paramiko import sys import re from tenacity import retry, stop_after_attempt, wait_fixed import functoo 阅读全文
posted @ 2021-08-16 11:02 该显示昵称已被使用了 阅读(351) 评论(0) 推荐(0)
摘要:Termux https://blog.csdn.net/weixin_44706011/article/details/103399250 Qpython https://github.com/qpython-android/qpython3/releases 阅读全文
posted @ 2021-08-15 19:24 该显示昵称已被使用了 阅读(65) 评论(0) 推荐(0)
摘要:01.npm install http-server -g全局安装 02.在要打开的项目文件夹处打开命令窗口,输入 hs -o回车 【hs 目录 -a 地址 -p 端口】,https://github.com/http-party/http-server 03.将对应的网址复制到浏览器打开 注意点: 阅读全文
posted @ 2021-08-09 22:04 该显示昵称已被使用了 阅读(127) 评论(0) 推荐(0)
摘要:for(var key in data)循环遍历函数 1.获取对象中的键(key)与值(value): var data = {name:'小花',age:'17岁',sex:'男'}; for (var a in data) { console.log(a); /*属性名*/ console.lo 阅读全文
posted @ 2021-08-08 21:05 该显示昵称已被使用了 阅读(535) 评论(0) 推荐(0)
摘要:本质类似 阅读全文
posted @ 2021-08-08 20:51 该显示昵称已被使用了 阅读(17) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/qq_41853758/article/details/83280104 和【reduce】配合合并【多个】df # 原生的merge只能合并两个 from functools import reduce df_tables = [df1, df2, df 阅读全文
posted @ 2021-08-03 16:29 该显示昵称已被使用了 阅读(79) 评论(0) 推荐(0)
摘要:基础知识 # 1. response的属性 import requests response=requests.get("http://www.baidu.com/") print(response) # <Response [200]> print(type(response)) # <class 阅读全文
posted @ 2021-08-03 11:01 该显示昵称已被使用了 阅读(39) 评论(0) 推荐(0)