#coding:utf8import sys,osdef process(path): for f
in os.listdir(path): fin = open(path+"/"+f,"r") print...
分类:
编程语言 时间:
2014-05-09 12:41:07
阅读次数:
362
# --*-- coding: utf-8 --*--from
matplotlib.font_manager import FontPropertiesimport matplotlib.pyplot as pltfont
= FontProperties(fname=r"/usr/share/f...
分类:
其他好文 时间:
2014-05-09 11:51:09
阅读次数:
323
1,创建一个user表,包含两列name,phone
2,用python(你喜欢的任何语言)插入100W条记录(lz的笔记本比较老,大概用了1分钟吧):
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import MySQLdb
conn = MySQLdb.connect(host='localhost',user='root',db='mi...
分类:
数据库 时间:
2014-05-08 15:52:43
阅读次数:
393
Downloading the module:sudo apt-get install
python-tksimple example:#!/usr/bin/python# -*- coding: utf-8 -*-"""ZetCode
Tkinter tutorialThis script sho...
分类:
编程语言 时间:
2014-05-07 14:46:05
阅读次数:
454
剑指offer上的第七题,之前在Cracking the Coding interview上做过该题,这次把原来的程序搬了过来,并根据九度OJ的测试系统写了测试代码,在九度OJ上AC。
时间限制:1 秒内存限制:128 兆
题目描述:
用两个栈来实现一个队列,完成队列的Push和Pop操作。
队列中的元素为int类型。
输入:
每个输入文件包含一个测试样例。
对于每个测试样例,第一行输入一个n(1<=n<=100000),代表队列操作的个数。
接下来的n行,每行输入一个队列操作:
1. PUSH X 向队列...
分类:
其他好文 时间:
2014-05-07 06:36:48
阅读次数:
431
CareerCup
目录
Chapter 1 | Arrays and Strings
1.1 Implement an algorithm to determine if a string has all unique characters. What if you can not use additional data structures?
1.2 Write co...
分类:
其他好文 时间:
2014-05-07 04:25:44
阅读次数:
320
最近下了《中国式英语口语纠错》里面的文件都是“tingvoa.com_cnusa043.mp3”,MP3播放器不识别,
因此用python脚本写了一个rename的脚本
# -*- coding: utf-8 -*-
import os
def filerename(path):
for file in os.listdir(path):
#pr...
分类:
编程语言 时间:
2014-05-06 22:48:40
阅读次数:
423
# --*-- coding:utf-8 --*--import distributionimport
matplotlib.pyplot as pltfrom matplotlib.ticker import MultipleLocator#
二项分布举例:将一个硬币抛三次,用随机变量X记录在三次...
分类:
其他好文 时间:
2014-05-04 20:54:51
阅读次数:
512
BeautifulSoup 善于网页数据分析 ,抓取CSDN极客头条内容放入ListView ,
用户点击选择 webViewShow 网页href
geek.py 超过100行,得闲时看吧
# -*- coding: utf-8 -*-
import android
import urllib2, re
from BeautifulSoup import BeautifulSoup
im...
分类:
移动开发 时间:
2014-05-04 09:53:02
阅读次数:
468
中途经过了好几天都没有动手了,得坚持下去啊刚看了Alex老师的视频,其中有个题目如下:编写登录接口-输入用户密码-认证成功后显示欢迎信息-输错三次后锁定#-*-coding:cp936-*-#用户名保存在一个文件名为user.txt文件中importos,stringtmp=file(‘C:\Users\hityxg\Desktop\user...
分类:
编程语言 时间:
2014-05-03 20:33:16
阅读次数:
471