E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
RTThread
记载一次udpsock通信程序
服务器接收端,采用pyhon来进行接收,主要使用udp进行通信mportos,socket,sys,time,stringimpo
rtthread
ingtime_log=''time_log1=''time_record
Cockroach_mwt
·
2019-04-24 19:54
linux
udp
socket
linux
Python多线程学习
线程中可用threading来创建线程t=threading.Thread(target=xxx,args=(xxx,))t.start()线程开始t.join()等待带线程完成importtimeimpo
rtthread
ingdefloop1
The Eobs
·
2019-04-22 22:32
python
多线程
Python 强制停止多线程运行
/usr/bin/envpython#-*-coding:utf-8-*-__author__='shouke'impo
rtthread
ingimporttimeimportinspectimportctypesdef_async_raise
授客
·
2019-04-20 14:00
python读取es中的所有数据并计算md5然后进行持久化
/usr/bin/pythonimpo
rtthread
ingimportjsonimporttimefromelasticsearchimportElasticsearchfromelasticsearchimporthelpersimportosimportsysimportargparsehost_list
bainianminguo
·
2019-04-16 17:00
多线程,多进程
#_*_coding:utf-8_*_'''进程和线程''''''单线程'''importtimeimpo
rtthread
ing'''defmusic(name,loop):foriinrange(loop
三木雪白水
·
2019-04-16 01:05
python爬取CSDN文章保存至本地
Sun'fromworkTestimportCsdnBlogSpiderfromtkinterimport*importtkinterastkimporttkinter.messageboxasmessageboximporttkinter.fontimpo
rtthread
ingimportqueuegui_que
春风化作秋雨
·
2019-04-11 11:12
Python
Python爬虫
python3 一 线程与互斥锁详解
可以简单理解为同一进程中有多个计数器,每个线程的执行时间不确定,而每个进程的时间片相等,线程是操作系统调度执行的最小单位.线程的创建步骤Impo
rtthread
ing#导入模块threading#创建一个线程对象
Vince Li
·
2019-04-09 18:25
python学习笔记
多线程
互斥锁
机器学习 —— 感知机分类算法
#-*-coding:utf-8-*-importrandomimportqueuefromtimeimportsleepfromthreadingimpo
rtThread
importnumpyasnp
Paul-LangJun
·
2019-04-08 11:57
机器学习
神经网络
Python
python实现抖音点赞功能
本文实例为大家分享了python实现抖音点赞功能的具体代码,供大家参考,具体内容如下#coding=utf-8fromtimeimportsleep,ctimeimpo
rtthread
ingimportosimportsysimporttimeimportsubprocessimportre
Anber_chen
·
2019-04-07 15:04
多线程扫描端口 Demo1.0
/usr/bin/python3importsocketimportsysimpo
rtthread
ingimporttimeopenPortNum=0#设置socket连接超时时间socket.setdefaulttimeout
r4bbit
·
2019-04-05 22:47
Python
python、多线程和socket实现聊天室功能
服务器部分代码:fromthreadingimpo
rtThread
,LockimportsocketclassServer:def__init__(self,ip_addr="192.168.0.103
Z_JoonGi
·
2019-04-05 18:09
python 视频转图片保存(图形化界面)
importcv2importsysimportosimportnumpyasnpfromtkinterimport*fromtkinter.filedialogimport*fromtkinterimportfiledialogimpo
rtthread
ingclassWidgetsDemo
coolsunxu
·
2019-04-05 11:01
python
picture
UI
Python
python xml转voc格式(图形化操作)
fromtkinter.filedialogimportaskdirectoryfromtkinterimport*importos,shutilimportxml.etree.ElementTreeasETimportpickleimportosimpo
rtthread
ingclassWidgetsDemo
coolsunxu
·
2019-04-05 09:58
Python
Python socket TCP 多客户端 多线程通信
socket、sys模块importsysimporttimeimportstructimportrandomimportsocketimportcodecs#解析发送报文importtracebackimpo
rtthread
ingframeid
qianshishangdi
·
2019-04-04 10:16
UDP聊天器
importsocketimpo
rtthread
ingdefrecv_data(udp_socket):#接收数据并显示whileTrue:recv=udp_socket.recvfrom(1024)print
程序设计法师
·
2019-04-03 22:34
tkinker(2)
#脚本工具代码重构importopenpyxlfromtkinterimportfiledialogfromtkinterimportmessageboximpo
rtthread
ingimportreimporttkinterastk
洪恩online
·
2019-03-28 16:03
【micropython教程】带你了解 MicroPython
作者:
RTThread
-summerMicroPython介绍我最近在玩RT-ThreadMicroPython,觉得不错,可以让MicroPython跑在很多开发板上,在此分享给大家。
Fillmore-RTT
·
2019-03-28 15:14
RT-THREAD
socket实现python聊天室
server端importsocketimportjson,structfromconcurrent.futuresimpo
rtThread
PoolExecutordebug=Trues=socket.socket
不会玩csdn
·
2019-03-27 19:38
python
python3 Async/Await入门指南
示例如下:impo
rtthread
ingimportasyncioasyncdefhello():print('Helloworld!
H-KING
·
2019-03-25 15:28
python专栏
Python多线程
而当我们的任务并没有相互依赖前后关系时,使用多线程会大大提高执行效率,Python提供了threading模块,我们可以使用threading模块中的Thread函数进行多线程方式的执行任务#-*-coding:utf-8-*-impo
rtthread
ingimportrequestsfromtimeimportctimei
__davieyang__
·
2019-03-20 13:14
Python
threading
多线程
多线程
添加addthreadingimpo
rtthread
ingdefmain():added_thread=threading.Thread(target=thread_job)#添加线程added_thread.start
ZAK_ML
·
2019-03-16 20:47
python爬取五百丁word模板(有图+有代码)
更新时间2019年3月15日五百丁首页爬取效果python代码#-*-coding:utf-8-*-importdatetimeimportjsonimportosimpo
rtthread
ingimporttimeimporttracebackfromqueueimportQueueimportrequestsfromlxmlimportetreefrompip
billycoder
·
2019-03-15 11:44
python-随记
python爬取五百丁ppt模板(有图+有代码)
更新时间2019年3月15日五百丁首页下载截图python代码#-*-coding:utf-8-*-importdatetimeimportjsonimportosimpo
rtthread
ingimporttimeimporttracebackfromqueueimportQueueimportrequestsfromlxmlimportetreefrompip
billycoder
·
2019-03-15 10:24
python-随记
线程的两种创建方式
方式一:importtimefromthreadingimpo
rtThread
defsing(name):foriinrange(3):print(name,'singasong',i)time.sleep
做只早起的鸟儿
·
2019-03-13 21:49
Python
python pynput 实现键鼠录制
frompynput.mouseimportListenerasMouse_Listenerfrompynput.keyboardimportKeyfrompynput.keyboardimportListenerasKeyboard_Listenerimportpickleimpo
rtthread
ingimporttimefrompynput.mouseim
anton8801
·
2019-03-11 15:51
python
3D人脸识别Demo
#-*-coding:utf-8-*-importrequestsfromjsonimportJSONDecoderimportcv2importtimeimpo
rtthread
ingimportmatplotlib.pyplotaspltfromOpenGL.GLimport
nineships
·
2019-03-11 10:47
深度学习
私密
concurrent模块
ThreadPoolExecutor代码笔记impo
rtthread
ingfromconcurrentimportfuturesimportloggingimporttimeFORMAT='%(processName
windcharger
·
2019-03-10 11:21
concurrent
threading
Python线程./进程
python 同步锁
##加锁之前impo
rtthread
ingimporttimedefsub():globalnumtemp=numtime.sleep(0.0001)num=temp-1num=100l=[]foriinrange
网名为什么那么长
·
2019-03-07 17:42
操作系统
编程
python
python定时器
1.超时执行#--*--coding:utf-8--*--impo
rtthread
ingdeftime_handler():print('hello')timer=threading.Timer(5,time_handler
yancoding
·
2019-03-06 22:19
基于python3的百度街景地图爬虫
#_*_coding:utf-8_*___author__='Minty'importurllibfromurllib.requestimporturlopenimpo
rtthread
ingfromoptparseimportOptionParserfrombs4i
Minty爱学习
·
2019-03-06 16:17
Python多线程print错乱问题
现象看如下python2代码:importtimeimpo
rtthread
ingdefa():time.sleep(1)print'hello'ts=[]foriinrange(10):t=threading.Thread
HorningFeng
·
2019-03-05 19:03
代码备份
#-*-coding:UTF-8-*-impo
rtthread
ingimportrequestsimportreimportti
东大坡
·
2019-03-04 19:41
python多线程threading.Thread传关键字参数(**kwargs)的时候要用字典
impo
rtthread
ingdeftask(self,call_back):self.download()ifcall_back:#回调pbmsself.call_back()defmain(self
reachHigher
·
2019-03-04 18:02
Python
web
python3:用threading+UDP实现的一个可同时收发聊天信息的脚本
importsocketimpo
rtthread
ingdefsend_data(udp_socket,dest_ip,dest_port):"""发送数据"""whileTrue:data_send=input
五力
·
2019-03-03 23:02
python
threading RLock 可重入锁
threadingRlock多线程代码impo
rtthread
ingimporttimelock=threading.RLock()print(lock.acquire())defsub(l):print
windcharger
·
2019-02-28 19:55
RLock
threading
Python线程./进程
各种锁(python)
互斥锁:牺牲了执行效率而获得数据安全问题:#多个线程抢占资源,会发生数据混乱fromthreadingimpo
rtThread
importos,timedefwork():globalntemp=ntime.sleep
五指灵猿
·
2019-02-26 19:31
python小坑小闹
python学习笔记(九)线程
#coding=utf-8fromtimeimportsleep,ctimeimpo
rtthread
ingdeffunction1(name):while1:print(name)sleep(1)deffunction2
arris1992
·
2019-02-26 17:58
threading.local 代码笔记
演示局部变量impo
rtthread
ingimporttimedefworker():x=0foriinrange(100):time.sleep(0.0001)x+=1print(threading.current_thread
windcharger
·
2019-02-26 14:35
threading
local
Python线程./进程
python爬虫实战-多线程实例-解析文章标题及内容
python爬虫实战-多线程实例-解析文章标题及内容importtimeimpo
rtthread
ingfromqueueimportQueueimportrequestsfromlxmlimportetreeimportjsonimportos
hoochon
·
2019-02-25 15:36
python实战
threading.Timer 延迟执行实例代码
threading.Timer实现延迟执行的实例代码importtimeimpo
rtthread
ingimportloggingFORMAT="%(asctime)s%(threadName)s%(thread
windcharger
·
2019-02-25 11:28
threading
Timer
延迟执行
Python线程./进程
threading join方法
threading的join方式使用实例代码importtimeimpo
rtthread
ingdeffoo(n):foriinrange(n):print(i)time.sleep(1)t_list=[
windcharger
·
2019-02-24 23:28
join
threading
Python线程./进程
threading daemon和non-daemon代码笔记
threading的daemon和non-daemon看python主线程是如何等待importtimeimpo
rtthread
ingdeffoo(n):foriinrange(n):print(i)time.sleep
windcharger
·
2019-02-24 22:31
theading
daemon
non-daemon
Python线程./进程
python 64式: 第21式、python 的多线程安全问题
以一个简单的例子来说明:impo
rtthread
ingimporttimeG_VALUE=0defeditValue(): globalG_VALUE foriinrange(1000000):
天地一扁舟
·
2019-02-24 09:33
python
64式
threading start() 和 run() 的区别
threadingTreadrun()和start()区别impo
rtthread
ingimporttimedefworker():count=0whileTrue:ifcount>5:breaktime.sleep
windcharger
·
2019-02-23 23:54
Tread
run
start
Python线程./进程
threading Tread属性
name,ident,is_active参数的演示impo
rtthread
ingimporttimedefworker():count=0whileTrue:ifcount>5:breaktime.sleep
windcharger
·
2019-02-23 23:53
Tread
threading
Python线程./进程
【漏洞学习——SSRF】360某处ssrf漏洞可探测内网信息
envpython#-*-coding:utf-8-*-#@Author:Lcy#@Date:2016-07-0520:55:30#@LastModifiedby:Lcyimportrequestsimpo
rtthread
ingimportQueueimportrandomimporttimeurl
FLy_鹏程万里
·
2019-02-22 17:13
【渗透测试实战1】
threading 之 semaphore信号量
semaphore信号量的简单代码演示impo
rtthread
ingimportloggingimporttimeFORMAT='%(threadName)s%(thread)d%(message)s'logging.basicConfig
windcharger
·
2019-02-22 16:50
semaphore
threading
Python线程./进程
python 多线程串行和并行的实例
如下所示:#coding=utf-8impo
rtthread
ingimporttimeimportcx_Oraclefrompprintimportpprintimportcsvtable_name="
zhaoyangjian724
·
2019-02-22 09:06
Python 限制线程的最大数量的方法(Semaphore)
如下所示:impo
rtthread
ingimporttimesem=threading.Semaphore(4)#限制线程的最大数量为4个defgothread():withsem:#锁定线程的最大数量
houyanhua1
·
2019-02-22 09:30
python自定义线程池控制线程数量的示例
1.自定义线程池impo
rtthread
ingimportQueueimporttimequeue=Queue.Queue()defput_data_in_queue():foriinxrange(10
AdgerZhou
·
2019-02-22 09:41
上一页
60
61
62
63
64
65
66
67
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他