python
god_speed丶
这个作者很懒,什么都没留下…
展开
-
python 大数开立方 避免科学计数法
c=431396049519259356426983102577521801906916650819409770125821662319298730692378063287943809162107163618549043548748362517694341497565980142708852098826686158246523270988062866178454564393347346790109...原创 2018-04-28 21:37:09 · 3165 阅读 · 0 评论 -
python socket编程
client端学会数据的发送哦# -*- coding: UTF-8 -*-import socket import reimport times = socket.socket()host = "xx.xxx.xxx.xxx" # 获取本地主机名port = xxxxs.connect((host, port))while 1: data ...原创 2018-05-25 21:52:15 · 134 阅读 · 0 评论 -
python turtle 学习
pip install turtle 学习这个库 1. 画布(canvas) turtle.screensize(800, 600, "green") 宽 高 颜色 1.这个库相当有趣,可以用很短的代码画一些好看的东西 turtle.pensize(width) 绘制图形时的宽度 turtle.pencolor() 画笔颜色 turtle.fillcolor(colo...转载 2018-06-03 10:43:21 · 1043 阅读 · 0 评论 -
python 多进程爆破代码
from collections import Counterimport multiprocessingdef decompose_sum(s): return [(a,s-a) for a in range(2,int(s/2+1))]def cal(st,ed,proc): print st,ed,proc for x in range(st,ed): # Gene...原创 2019-01-13 10:49:06 · 1370 阅读 · 0 评论 -
python 单行输出
python2import sys,timefor i in range(10): print "%d\r"%i, sys.stdout.flush() time.sleep(1)python3import sys,timefor i in range(10): print "%d\r"%i, sys.stdout.flush() tim...原创 2019-07-26 22:39:37 · 1636 阅读 · 0 评论