码迷,mamicode.com
首页 >  
搜索关键字:sparse coding    ( 13221个结果
使用 Code Snippet 简化 Coding
在开发的项目的时候,你是否经常遇到需要重复编写一些类似的代码,比如是否经常会使用 for、foreach ? 在编写这两个循环语句的时候,你是一个字符一个字符敲还是使用 Visual Studio 提供的Code Snippet 工具自动帮你生成呢?神奇之处 你只需要在代码编辑器中输入for,...
分类:其他好文   时间:2014-05-12 16:06:37    阅读次数:439
一个python小脚本——合并一个文件夹下的所有文本
#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
matplotlib 显示中文
# --*-- 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
两个栈实现一个队列
剑指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
笨方法学python(5)加分题
这篇对应的是习题16,读写文件 # -*- coding: utf-8 -*- #对文件更多操作复制A文件的内容到B文件 #from sys import argv from os.path import exists prompt = "> " from_file = raw_input("please input the filename where you want to copy...
分类:编程语言   时间:2014-05-05 12:54:02    阅读次数:402
参数对二项分布的影响
# --*-- coding:utf-8 --*--import distributionimport matplotlib.pyplot as pltfrom matplotlib.ticker import MultipleLocator# 二项分布举例:将一个硬币抛三次,用随机变量X记录在三次...
分类:其他好文   时间:2014-05-04 20:54:51    阅读次数:512
python for android : BeautifulSoup + ListView
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
python编写登录接口(上)
中途经过了好几天都没有动手了,得坚持下去啊刚看了Alex老师的视频,其中有个题目如下:编写登录接口-输入用户密码-认证成功后显示欢迎信息-输错三次后锁定#-*-coding:cp936-*-#用户名保存在一个文件名为user.txt文件中importos,stringtmp=file(‘C:\Users\hityxg\Desktop\user...
分类:编程语言   时间:2014-05-03 20:33:16    阅读次数:471
【LeetCode】Reverse Integer
题目 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bonus points...
分类:其他好文   时间:2014-05-03 17:35:30    阅读次数:345
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!