原创 Seaborn barplot柱狀圖/條形圖-基於matplotlib的更強力製圖庫
相信大家在開始python的使用後,便隨後接觸到了matplotlib這個與python兼容的很好的製圖庫。但是,如果想把圖做的更細,更上流,那麼則需要seaborn這個庫,比起matplotlib更容易上手,並且和pandas的兩種主要
原创 Tensorflow 基礎 logistic regression
tf.placeholder(tf.float32, (N,2)) // para1: data type para2: data shape tf.Variable(tf.random_normal(2,1)) //notice:
原创 從小說網站爬小說
最近在看《重生之神級學霸》,但是好幾個app都要付費,只能看其他網站上的網頁版,由於閒的蛋疼,就像試試怎麼把網頁上的書轉化成txt格式的。 第一步我直接打開http://www.biqudao.com/bqge1081/2544018.h
原创 c++總結 1
1多態性都有哪些?(靜態和動態,然後分別敘述了一下虛函數和函數重載) 靜態多態:編譯時多態 模板編程T a,T b 輸入a的類型不同,則運行結果不同 動態多臺:運行時多態 由虛函數實現,派生類重寫基類的成員函數,達到多
原创 冒泡排序,快排
C++:void bubble(int *pdata,int length) //冒泡排序 { for (int i = 0; i <length; i++) { for(int j = 0;j <leng
原创 python 函數式編程
b = [1,2,3423,4,25,25,-4,-4,-8] a = "A" print map(lambda x:x.lower(),a) 只對一個值有效 print reduce(lambda
原创 劍指offer之樹
今天在劍指offer上刷了樹的層次遍歷 struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) :
原创 python 12.24
raw_input 可以讀取用戶輸入數據: >>> user = raw_input('Enter login name:') Enter login name:root >>> print 'your login is ',us
原创 Python 12.26
Python 中字符串被定義爲引號之間的字符集合。Python 支持使用成對的單引號或雙引號,三引號(三個連續的單引號或者雙引號)可以用來包含特殊字符。使用索引運算符( [ ] )和切片運算符( [ : ] )可以得到子字符串。字符
原创 python判斷正負數
a1 = raw_input("please input a number") a = int(a1) if(a!=0):if(a > 0):print '這是正數'if(a < 0 ):print '這
原创 樹的三種遍歷(遞歸和非遞歸)
typedef struct BiTNode { char data; struct BiTNode *lchild, *rchild; //左右孩子 }BiTNode,*BiTree; //先序遍