随笔分类 -  python

摘要:<!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <style> p { text-align: left; padding 阅读全文
posted @ 2022-07-12 11:02 leo0362 阅读(79) 评论(0) 推荐(0) 编辑
摘要:import socket def main(): client=socket.socket() client.connect(("127.0.0.1",8081)) while True: inputs=input(">>>").strip() client.send(len(inputs).to 阅读全文
posted @ 2022-07-09 18:45 leo0362 阅读(4) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env python#-*- coding:utf-8 -*-# author:leo# datetime:2020/3/17 9:16# software: PyCharm#闭包def outer(): a=12 def inner(): print(a) return 1 阅读全文
posted @ 2020-03-17 11:33 leo0362 阅读(158) 评论(0) 推荐(0) 编辑
摘要:一、linux 下磁盘的表示方式 /dev/sda1 /dev 设备文件目录 sd : 表示sata,sas,usb,scsi 接口的硬盘 a: linux 用字母表是第几磁盘,a代表第一块 1:linux 用数字表示某块磁盘的第几分区 二、磁盘使用 磁盘初始化-》磁盘分区:一个磁盘只能分4个区,主 阅读全文
posted @ 2019-07-08 15:25 leo0362 阅读(127) 评论(0) 推荐(0) 编辑
摘要:python 进程之间的通讯 阅读全文
posted @ 2019-05-28 10:32 leo0362 阅读(214) 评论(0) 推荐(0) 编辑
摘要:python 多进程简 阅读全文
posted @ 2019-05-28 10:14 leo0362 阅读(435) 评论(0) 推荐(0) 编辑
摘要:import threading,time import random def door(nums): num=1#电梯在一楼 while True: print("this door is %s 楼"%num) if num==nums: fangxiang=True elif num==1: ... 阅读全文
posted @ 2019-05-24 11:30 leo0362 阅读(631) 评论(0) 推荐(0) 编辑
摘要:pytho线程信号量 阅读全文
posted @ 2019-05-24 10:35 leo0362 阅读(197) 评论(0) 推荐(0) 编辑
摘要:线程锁 阅读全文
posted @ 2019-05-24 10:22 leo0362 阅读(121) 评论(0) 推荐(0) 编辑
摘要:python守护线程 阅读全文
posted @ 2019-05-24 10:14 leo0362 阅读(145) 评论(0) 推荐(0) 编辑
摘要:python 线程的调用方式 阅读全文
posted @ 2019-05-24 09:59 leo0362 阅读(576) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env python #-*- coding:utf-8 -*- # datetime:2019/5/22 14:20 # software: PyCharm #服务端 import socket import os post=('192.168.222.131',9090)#设置端口和 socket_obj=socket.socket() socket_obj.bind(... 阅读全文
posted @ 2019-05-22 16:14 leo0362 阅读(126) 评论(0) 推荐(0) 编辑
摘要:php 阅读全文
posted @ 2019-04-30 15:51 leo0362 阅读(337) 评论(0) 推荐(0) 编辑
摘要:class WeatherPipeline(object): def process_item(self, item, spider): print(item) return item #插入到redis import redis import json class RedisPipeline(object): def __init__(self... 阅读全文
posted @ 2019-04-30 15:50 leo0362 阅读(119) 评论(0) 推荐(0) 编辑
摘要:1 #!/usr/bin/env python 2 #-*- coding:utf-8 -*- 3 # author:leo 4 # datetime:2019/4/24 16:26 5 # software: PyCharm 6 import redis 7 #链接服务器 8 config={"host":"127.0.0.1","port":6379,'password':'... 阅读全文
posted @ 2019-04-24 17:15 leo0362 阅读(223) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env python #-*- coding:utf-8 -*- # author:leo # datetime:2019/4/24 15:22 # software: PyCharm #pymysql 数据库操作 import pymysql #配置信息 config={"h 阅读全文
posted @ 2019-04-24 16:17 leo0362 阅读(170) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示