上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 37 下一页
摘要: 系统自带的图片浏览器 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)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 37 下一页