排序:
默认
按更新时间
按访问量

bs64在线解码地址以及md5加密

http://tool.oschina.net/encrypt?type=3   import hashlib md5 = hashlib.md5() md5.update('12345') print(md5.hexdigest())  

2018-08-11 14:52:24

阅读数:208

评论数:0

tcp服务端简单代码

import socketimport threadingsever_socket=socket.socket(socket.AF_INET,socket.SOCK_STREAM)sever_socket.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEAD...

2018-07-11 17:09:56

阅读数:13

评论数:0

tcp客户端简单原理代码

import socketclient_socket=socket.socket(socket.AF_INET,socket.SOCK_STREAM)client_socket.connect(('192.168.1.10',8081))while True:    send_data=input...

2018-07-11 17:06:11

阅读数:10

评论数:0

分词统计频率和个数

from sklearn.feature_extraction import DictVectorizer as D from sklearn.feature_extraction.text import CountVectorizer,TfidfVectorizer from sklearn.p...

2018-07-02 18:30:10

阅读数:70

评论数:0

数据库迁移

# -*- coding:utf-8 -*- from flask import Flask,render_template,request,flash,redirect,url_for from flask_sqlalchemy import SQLAlchemy from flask_wtf...

2018-05-31 17:22:38

阅读数:15

评论数:0

memory

56qX5aSW5LiL6LW35LqG6Zuo77yM5ZCs552A6Zm25ZaG5oOz5L2g55qE5aSc77yM5pyJ5Lqb6K646K+d5oOz5a+55L2g6K+077ya5ZKM5L2g5YiG5omL5piv5oiR5aSn5a2m55Sf5rav5Lit5YGa5...

2018-05-21 17:38:13

阅读数:26

评论数:0

分页

class UserSee(View): def get(self,request,page): request.user.is_authenticated()  user=request.user cn=get_redis_connecti...

2018-05-21 17:33:04

阅读数:14

评论数:0

ms

56qX5aSW5LiL6LW35LqG6Zuo77yM5ZCs552A6Zm25ZaG5oOz5L2g55qE5aSc77yM5pyJ5Lqb6K646K+d5oOz5a+55L2g6K+077ya5ZKM5L2g5YiG5omL5piv5oiR5aSn5a2m55Sf5rav5Lit5YGa5...

2018-05-18 18:01:46

阅读数:56

评论数:2

学习网页制作

1.学习css样式包括内嵌式,外联式,标签(div,span等),选择期器分为基础选择器,层级选择期,并级选择器,如何添加浮动以及如何清除浮动(.clearfix::after{ visibility: hidden; display: block; cl...

2018-05-04 16:33:31

阅读数:18

评论数:0

html中图片的移动

<!DOCTYPE html><html lang="en"><head> <meta charset...

2018-05-03 17:15:23

阅读数:160

评论数:0

数据库交互中构造参数列表,防止注入

from pymysql import * conn=connect(host='localhost',port=3306,database='taobao1',user='root',password='000000',charset='utf8') cu=conn.cursor() find_...

2018-04-25 16:09:20

阅读数:23

评论数:0

自动切换协程

import gevent # 自动切换 def work1(num): for i in range(num): print(gevent.getcurrent(),i) gevent.sleep(1) g1=gevent.spawn(work1,5) g...

2018-04-20 17:57:57

阅读数:22

评论数:0

手动切换协程

from greenlet import greenlet # 手动切换协程 import time def work1(): for i in range(5): print('work1',i) time.sleep(1) g2.swi...

2018-04-20 17:57:21

阅读数:20

评论数:0

特殊的迭代器-生成器

import time def work1(): while True: print('任务1正在执行中') yield time.sleep(0.01) def work2(): while True: prin...

2018-04-20 17:56:42

阅读数:5

评论数:0

创建生成器

def FeiBo(num): a=0 b=1 current_index=0 while current_index<num: result=a a,b=b,a+b current_index ...

2018-04-20 17:46:22

阅读数:17

评论数:0

创建迭代器

from collections import Iterable class MyIter: def __init__(self,items): self.iter1=items self.cur1=0 def __iter__(self): ...

2018-04-20 17:45:49

阅读数:24

评论数:0

如何判断对象是否可迭代

from collections import Iterable print(isinstance([1,2,3],Iterable))

2018-04-20 17:44:09

阅读数:15

评论数:0

正则匹配在手机号码中的运用

匹配一个11位的手机号,第一位数字为1,第二位不为2import re a=input('请输入您的手机号码') print(re.match('[1][3-9][0-9]{9}$',a).group())

2018-04-19 15:59:02

阅读数:18

评论数:0

多客户端及多次接受发送的实现

import socket import threading server_socket=socket.socket(socket.AF_INET,socket.SOCK_STREAM) server_socket.setsockopt(socket.SOL_SOCKET,socket.SO_...

2018-04-19 11:24:38

阅读数:72

评论数:0

socket循环接收问题

import socket server_socket=socket.socket(socket.AF_INET,socket.SOCK_STREAM) server_socket.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,True) s...

2018-04-19 10:36:15

阅读数:267

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭