-
2048控制台版
所属栏目:[Python] 日期:2020-12-17 热度:132
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 以上是编程之家(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。 如果觉得编程之家网站内容还不错,欢迎将编程之家[详细]
-
python正则提取CSV文件数据计算导购客单价.py
所属栏目:[Python] 日期:2020-12-17 热度:93
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 '''python正则提取CSV文件数据计算导购客单价.py题目来源 https://github.com/FGFW/FCNNIC依山居 4:36 2015/11/22看了看python自带的csv库貌似也没能[详细]
-
python-pcap模块解析mac地址
所属栏目:[Python] 日期:2020-12-17 热度:190
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 import pcap import binascii a = pcap.pcap() a.setfilter('arp') for i,j in a: if binascii.hexlify(j[21])=="02": print 'Mac Reply!' for index[详细]
-
python模拟Get请求保存网易歌曲的url
所属栏目:[Python] 日期:2020-12-17 热度:198
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 python模拟Get请求保存网易歌曲的url #coding:utf-8 import requests import json url = 'http://music.163.com//api/dj/program/byradio?radioId=271[详细]
-
Python 实现的"冒泡排序"
所属栏目:[Python] 日期:2020-12-17 热度:157
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 ''''' Bubble Sort @author: aihua.sun ''' import string import random number = []; count = 0; def bubbleSort(): #initializeNumberArray(); gen[详细]
-
用Python 实现的目录拷贝程序
所属栏目:[Python] 日期:2020-12-17 热度:114
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 用python写的小程序,可以用这个程序在固定的目录之间来回的拷贝. copy one directory to another directory @author: ''' import os; import shutil,e[详细]
-
python生成128条形码(code128)
所属栏目:[Python] 日期:2020-12-17 热度:110
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #-*- encoding: utf-8 -*-import loggingimport sysimport osimport pygamefrom pygame.locals import *from hubarcode.code128 import Code128Encode[详细]
-
网易云音乐 Linux 更新 - 2015-4-4
所属栏目:[Python] 日期:2020-12-17 热度:77
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 以上是编程之家(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。 如果觉得编程之家网站内容还不错,欢迎将编程之家[详细]
-
python3调用百度翻译api的命令行翻译工具
所属栏目:[Python] 日期:2020-12-17 热度:92
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #! /usr/bin/env python3#coding=utf-8import sysimport jsonimport urllib.requestimport urllib.parseimport http.clientfrom io import StringIOTR[详细]
-
python随机生成手机号码
所属栏目:[Python] 日期:2020-12-17 热度:140
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 random.choice(['139','188','185','136','158','151'])+"".join(random.choice("0123456789") for i in range(8)) 以上是编程之家(jb51.cc)为你收集[详细]
-
列表的顺序访问与随机访问
所属栏目:[Python] 日期:2020-12-17 热度:74
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 class Tobj(object): def __init__(self,serial,val=0): self.serial = serial self.val = val def __repr__(self): return "%s(%s)" % ( self.__clas[详细]
-
爬取豆瓣的各分类书单以及近期热门电影和top250的电影
所属栏目:[Python] 日期:2020-12-17 热度:115
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 # -*- coding: utf-8 -*-import urllibimport urllib2import reimport sys# reload(sys)# sys.setdefaultencoding('utf-8')class book: #豆瓣书籍的类[详细]
-
python 学习
所属栏目:[Python] 日期:2020-12-17 热度:157
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/usr/bin/env pythonwhile True: year=raw_input('please input a year: ') a= int(year) if a%4==0 and a%100!=0: print year,'is runnian' elif a[详细]
-
python实现发送邮件
所属栏目:[Python] 日期:2020-12-17 热度:174
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #_*_encoding:utf-8_*_ #script for python3.2 #------------------------------------------------------------------------------- # Name: 发送邮[详细]
-
帮同事写的一个切换数据库启动的小工具
所属栏目:[Python] 日期:2020-12-17 热度:153
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/usr/bin/env python#coding=utf-8import osdir = '.'dirApp = "%sData" % dirfile_type = ".app"default_file = "default"use_file = "AppData.md[详细]
-
查看端口状态的python代码
所属栏目:[Python] 日期:2020-12-17 热度:162
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #coding:utf-8import socketimport threadingimport timeclass SkPort(threading.Thread): def __init__(self,ip,port): threading.Thread.__init__(s[详细]
-
python生成字母验证图片
所属栏目:[Python] 日期:2020-12-17 热度:142
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 from PILimport Image,ImageDraw,ImageFont import random def generate_authenticode(): ??? letters = random.sample('abcdefghijklmnopqrstuvwxyzA[详细]
-
python如何将数组分成几个区间,取每个区间的最大值存到另一个数
所属栏目:[Python] 日期:2020-12-17 热度:189
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 第一种方法:# coding:utf-8"""黄哥python远程视频培训班https://github.com/pythonpeixun/article/blob/master/index.md黄哥python培训试看视频播放[详细]
-
google hosts不解释
所属栏目:[Python] 日期:2020-12-17 热度:194
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 #!/usr/bin/python3#coding=utf-8import osimport sysimport urllib.requestreq_hosts=urllib.request.urlopen("https://raw.githubusercontent.com/v[详细]
-
简单的sqlite3数据库操作实例
所属栏目:[Python] 日期:2020-12-17 热度:55
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 import sqlite3class database: def __init__(self,**kwargs): self.filename = kwargs.get('filename') self.table = kwargs.get('table','test') de[详细]
-
ElasticSearch 数据导入导出工具
所属栏目:[Python] 日期:2020-12-17 热度:66
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 ''' Export and Import ElasticSearch Data. Simple Example At __main__ @author: [email?protected] @note: uncheck consistency of data,please do[详细]
-
python简单爬虫
所属栏目:[Python] 日期:2020-12-17 热度:87
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 import reimport urllibimport urllib.requestfrom collections import dequequeue = deque()#存放待爬取的网址visited = set()#存放爬取过的网址。判[详细]
-
一首mp3歌每半小时播放一次
所属栏目:[Python] 日期:2020-12-17 热度:173
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 import mp3play,timefilename = "Should It Matter.mp3"clip = mp3play.load(filename)while 1: if time.localtime().tm_min % 30 == 0: clip.play()[详细]
-
二进制小数
所属栏目:[Python] 日期:2020-12-17 热度:118
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 # -*- coding:utf-8 -*-class BinDecimal: def printBin(self,num): aa = num*2 rest = [] rest.append(str(int(aa))) while aa != 1: aa = (aa - int[详细]
-
打印列表内容
所属栏目:[Python] 日期:2020-12-17 热度:89
今天PHP站长网 52php.cn把收集自互联网的代码分享给大家,仅供参考。 values = [4,10,3,8,-6]for i in range(len(values)):print(i,values[i]) 以上是编程之家(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决[详细]
