Python
qianjq3
这个作者很懒,什么都没留下…
展开
-
关于阅读Python主页的发现及收获
首先,python是一门面向对象的解释型计算机程序设计语言,其特点是具有丰富而强大的库,被称为是胶水语言,将其他语言的各种模板粘合在一起。其具有简单,易学,开源,解释性与可移植性强,丰富的库的优点,但其运行速度相对于C和C++而言比较慢。关于python的应用,python推进了web和英特网的发展,支持许多英特网协议和提供了强大的库。其次,python广泛用于于科学和数值计算。另外python还...原创 2018-03-11 14:43:20 · 164 阅读 · 0 评论 -
Python编程实战9
Part 1 For each of the four datasets... Compute the mean and variance of bothxandy Compute the correlation coefficient betweenxandy Compute the linear regression line:y=β0+β1x+ϵy=β0+β1...原创 2018-06-11 19:30:50 · 386 阅读 · 0 评论 -
matplotlib
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt x = np.linspace(0,2,100) y = np.power(np.sin(x-2),2)*np.exp((-1)*np.power(x,2)) fig = plt.figure() axes = fig.add_axes([0...原创 2018-05-27 19:48:02 · 406 阅读 · 0 评论 -
Scipy
>>> import numpy as np >>> import scipy.linalg as sl >>> m = 30 >>> n = 15 >>> A = np.random.random((m,n)) >>> b = np.random.random((m,1)) >...原创 2018-06-03 11:08:26 · 253 阅读 · 0 评论 -
python编程实战5(类,异常)
9-1餐馆: class Restaurant(): def __init__(self,restaurant_name,cuisine_type): self.restaurant_name = restaurant_name self.cuisine_type = cuisine_type def describe_restaurant(se...原创 2018-04-06 11:47:57 · 182 阅读 · 0 评论 -
Python编程实战6
10-11:喜欢的数字: import json filename = 'number.json' number = input("What is your favourite number?") with open(filename,'w') as f_obj: json.dump(number,f_obj) with open(filename) as f_obj: num...原创 2018-04-15 14:26:16 · 159 阅读 · 0 评论 -
python编程实战4
7-1汽车租赁: car = input("What kinds of car do you want to bent?") print("Let me see if I can find you a "+ car) What kinds of car do you want to bent?Subaru Let me see if I can find you a Subaru ...原创 2018-04-01 16:24:19 · 419 阅读 · 0 评论 -
python编程实战3
5-8方式跟管理员打招呼 以特殊方式跟管理员打招呼: names = ['Eric','admin','alice','ben','mircal'] for name in names: if name == 'admin': print("Hello admin, would you like to see a status report?") else:...原创 2018-03-23 17:04:10 · 436 阅读 · 0 评论 -
python编程实战2
3-3 trip_modes = ['bus','car','bike','subway','plane'] for trip_mode in trip_modes: print('I would like to own a '+ trip_mode) 打印所有的出行工具,如下: I would like to own a bus I would like to own a car...原创 2018-03-18 10:54:47 · 190 阅读 · 0 评论 -
python编程实战1
试验一: 运用strip()函数,如下: python = '\n\t python ' print(python) print(python.lstrip()) print(python.rstrip()) print(python.strip()) print(python) 运行结果为: python python python python python ...原创 2018-03-11 22:41:52 · 1743 阅读 · 0 评论 -
假如我我是个python程序高手,我打算实现的程序及目标
查阅知乎,各种神级python编程高手推荐的额练手级项目,比如用于NBA常规赛结果预测——利用python进行比赛数据分析,实现色情图片的识别,利用python破解观看中科大网络课程,获取中科大研究生系统的全部学生姓名,学号,选课信息。也有对影片的人物关系进行理清,或者对网易云音乐进行批量下载等等,感觉这些操作挺有趣的。但总感觉难登大雅之堂。毕竟要是一个Python高手,这些小操作也...原创 2018-03-11 15:23:56 · 169 阅读 · 0 评论 -
Sklearn
from sklearn import datasets from sklearn import cross_validation from sklearn.naive_bayes import GaussianNB from sklearn.svm import SVC from sklearn.ensemble import RandomForestClassifier from skl...原创 2018-06-19 16:25:29 · 302 阅读 · 0 评论