-
模仿主站模板 首页 内页(想实现模板小偷)
所属栏目:[Python] 日期:2020-12-17 热度:198
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/usr/local/bin/python#-*- coding: UTF-8 -*-#模仿主站模板#QQ29295842##################################################import threadingimpor[详细]
-
直线和矩形是否相交
所属栏目:[Python] 日期:2020-12-17 热度:130
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #coding:cp936"""A(ax,ay),B(px,py)为两个点 (x1,y1),(x2,y2)为矩形的左上角和右下角坐标,判断A,B两点是否和矩形相交 """def Judge(ax,ay,px,py,x1[详细]
-
基于Python的cmake多目录工程的自动配置实现
所属栏目:[Python] 日期:2020-12-17 热度:102
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/usr/bin/python"""2015.06.30Modified some functions.Now this configration can be run on both Windows and Linux.***************************[详细]
-
配置文件备份
所属栏目:[Python] 日期:2020-12-17 热度:131
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/usr/bin/python#Author:[email?protected]import osimport timesource = ['/etc/sysconfig/network-scripts','/etc/sysconfig/network','/etc/reso[详细]
-
python3 取计算机名末尾数字+10 拼接成IP地址
所属栏目:[Python] 日期:2020-12-17 热度:126
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #python3 取计算机名末尾数字+10 拼接成IP地址#python3 练手import socketimport reimport winregimport os#取计算机名方法1hostname=socket.gethostn[详细]
-
Python 实现简单 Web 服务器
所属栏目:[Python] 日期:2020-12-17 热度:187
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 Python 实现简单 Web 服务器 def myapp(environ,start_response): status = '200 OK' headers = [('Content-type','text/html')] start_response(stat[详细]
-
简单发送飞信的代码
所属栏目:[Python] 日期:2020-12-17 热度:105
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/usr/bin/env python# -*- coding: utf-8 -*-# @Date : 2015-01-15 19:29:00# @Author : Your Name ([email?protected])# @Link : http://example.o[详细]
-
python爬取百度云盘资源
所属栏目:[Python] 日期:2020-12-17 热度:132
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 import urllibimport urllib.requestimport webbrowser import redef yunpan_search(key):keyword = keykeyword = keyword.encode('utf-8')keyword =[详细]
-
同椭球下空间直角坐标转换为大地坐标
所属栏目:[Python] 日期:2020-12-17 热度:96
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 import mathwgs84={"a":6378137,"b":6356752.3142,}def num2blh(num): ''' 23.434=23: ''' dd=int(num) mm=int((num-dd)*60) ss=(num*60-int(num*60))[详细]
-
获取城市的PM2.5浓度和排名(含单线程和多线程)
所属栏目:[Python] 日期:2020-12-17 热度:85
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/usr/bin/env python# -*- coding: utf-8 -*-# by ustcwqimport urllib2import threadingfrom time import ctimefrom bs4 import BeautifulSoupdef[详细]
-
修改hosts轻松上谷歌
所属栏目:[Python] 日期:2020-12-17 热度:51
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/usr/bin/env python#-*- encoding:utf-8 -*-import sysreload(sys)sys.setdefaultencoding('utf-8')import urllib2,sys,platformurl='http://www.3[详细]
-
我也来个python的妹子图吧
所属栏目:[Python] 日期:2020-12-17 热度:76
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #! /usr/bin/env python# -*- coding: utf-8 -*-import urllib2import reimport osdef getMeinv(): # 首先应该分页解析所有的链接和名字 # 定义页码 p[详细]
-
python正则替换语言文件=号后的内容合并.py
所属栏目:[Python] 日期:2020-12-17 热度:191
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 """python正则替换语言文件=号后的内容合并.pyhttp://www.bathome.net/thread-38064-1-2.html依山居 12:29 2015/11/24这个版本使用正则匹配替换使用cn[详细]
-
svn hostcopy 并自动删除超过七天的归档
所属栏目:[Python] 日期:2020-12-17 热度:76
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/usr/bin/pythonimport os,sys,datetime,time from stat import * import shutil path='E:svnbak' filelist=[] filelist=os.listdir(path)def d[详细]
-
使用IP138数据库查询IP地址所在地
所属栏目:[Python] 日期:2020-12-17 热度:114
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #-*- coding:gbk -*-import urllib2import retry:while True:ipaddr = raw_input("Enter IP Or Domain Name:")if ipaddr == "" or ipaddr == 'exit':b[详细]
-
有人问如何遍历取得类的子类或实例
所属栏目:[Python] 日期:2020-12-17 热度:95
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 # coding:utf-8"""有人问如何遍历取得类的子类或实例黄哥python远程视频培训班https://github.com/pythonpeixun/article/blob/master/index.md黄哥pyt[详细]
-
python邮件发送
所属栏目:[Python] 日期:2020-12-17 热度:65
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/usr/bin/env python# -*- coding: utf-8 -*- import smtplibfrom email.mime.text import MIMETextclass Mail_Model: def __init__(self): self.ma[详细]
-
图灵机器人 python 试玩
所属栏目:[Python] 日期:2020-12-17 热度:69
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 以上是编程之家(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。 如果觉得编程之家网站内容还不错,欢迎将编程之家[详细]
-
简单的多任务mysql转xml
所属栏目:[Python] 日期:2020-12-17 热度:161
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 # -*- coding: utf-8 -*-'''Created on 2014/12/27@author: Yoki'''import geventimport pymysqlfrom pymysql.cursors import DictCursorimport reimp[详细]
-
用python从多个文件中提取有用信息到一个文件中
所属栏目:[Python] 日期:2020-12-17 热度:104
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 f0=open("STAS_FOR_mul_div.txt","r")f1=open("STAS_FOR_nqueen.txt","r")f2=open("STAS_FOR_registers_dis.txt","r")f3=open("STAS_FOR_registers_di[详细]
-
python 中缀编程工具库pipe使用方法
所属栏目:[Python] 日期:2020-12-17 热度:88
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 from pipe import *print([1,2,3] | sum)print([1,3,4,5] | tee | add) 以上是编程之家(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所[详细]
-
解密
所属栏目:[Python] 日期:2020-12-17 热度:167
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 from string import ascii_lowercase as letterscheckio = lambda text: max(letters,key=text.lower().count) 以上是编程之家(jb51.cc)为你收集整理[详细]
-
使用 xlrd, xlwt 处理 excel 数据
所属栏目:[Python] 日期:2020-12-17 热度:164
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 以上是编程之家(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。 如果觉得编程之家网站内容还不错,欢迎将编程之家[详细]
-
分割csv文件
所属栏目:[Python] 日期:2020-12-17 热度:198
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 # coding:utf-8# python 2.7import csvimport mathimport sysimport osfrom sys import exit#平均分割CVS文件 def deal_csv(head,data,n,filepath): n[详细]
-
批量转换目录下音频格式的
所属栏目:[Python] 日期:2020-12-17 热度:177
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 ##import os;def fa(dir):dst_dir = os.getcwd() + '/mp3/';lists = os.walk(dir);for root,dirs,files in lists:for file in files:pix = os.path.sp[详细]
