- 博客(12)
- 资源 (9)
- 收藏
- 关注
转载 multithreading
转自: 廖学峰大神多线程一个进程至少有一个线程。 线程是操作系统直接支持的执行单元,因此,高级语言都支持多线程。 python的多线程是真正的posix thread,并不是模拟出来的线程。 原来,在标准库中有多线程模块,_thread以及threading。其中,_thread是低级模块,threadind是其封装版,比较高级。 使用高级模块不易出错,并且比较方便。import time
2015-09-24 17:32:25 681
原创 [blabla]a quick code about linear regression using gradient descent
use linear regression to predict the house pricethe original data is from the cousera machine learning course. when I finished the exercise with MATLAB, the idea about implementing the algorithm with
2015-09-22 11:42:09 783
原创 [leetcode284]Peeking Iterator
问题描述:Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that support the peek() operation – it essentially peek() at the element that will be r
2015-09-21 13:59:17 903
原创 [笔记]图
graph概念vertex 节点A vertex (also called a “node”) is a fundamental part of a graph. It can have a name, which we will call the “key.” A vertex may also have additional information. We will call this addi
2015-09-19 20:38:15 815
原创 [leetcode126]word ladder 2
word ladder 2Given two words (beginWord and endWord), and a dictionary’s word list, find all shortest transformation sequence(s) from beginWord to endWord, such that:Only one letter can be changed at a
2015-09-18 23:42:02 634
原创 [leetcode127]Word Ladder Problem
Word Ladder Problem问题描述: Given two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transformation sequence from beginWord to endWord, such that:Only one letter
2015-09-18 23:16:44 469
原创 [笔记] binarySearchTree AVLTree
binary search treesearch tree operations1.tree() 2.put(key,value) 3.get(key) 4.in() 5.delete() 6.len()binary search tree nodeclass TreeNode(object): def __init__(self,key,val,left=None,right=N
2015-09-06 17:06:04 847
转载 python 2 编码问题
原作者:wuyou @newsmthPython2 的编码问题一直非常让人恼火,不过你的问题稍微简单一些。 在交互式命令模式(Interactive shell)下,可以这样来明白你遇到的问题的根源: >>> import sys >>> sys.stdout.encoding 在 Windows 下,如果你的系统是简体中文,一般输出会是 cp936 >>> impor
2015-09-06 13:32:32 689
原创 [笔记] lista += listb 与 lista = lista + listb
在一次编程中,错误的以为这两个方法的效果是相同的。细细想来才发现不对的地方, 以前都忽略掉了。 >>> g[12, 3, 4, 5, 9]>>> id(g)41829576L>>> g+=[0] # 相当于 append>>> id(g)41829576L>>> g = g + [9]>>> id(g)41853768L
2015-09-01 00:00:57 984
A simple adaptive first-order differential microphone.pd
2018-04-08
email data for naive bayes filter
2017-01-15
Ian Goodfellow introduction to GANs ( Generative Adversarial Networks)
2016-12-09
HangMan 猜单词 一个简易的吊死鬼游戏 python版
2016-03-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人