自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 问答 (12)
  • 收藏
  • 关注

原创 第十五周,sklearn

Create a classification dataset (n samples ! 1000, n features ! 10) Split the dataset using 10-fold cross validation Train the algorithms GaussianNB SVC (possible C values [1e-02, 1e-0...

2018-06-18 11:45:53 296

原创 第十四周作业

作业取自https://nbviewer.jupyter.org/github/schmit/cme193-ipython-notebooks-lecture/blob/master/Exercises.ipynbPart 1For each of the four datasets...Compute the mean and variance of both x and yCompute th...

2018-06-10 22:14:02 467

原创 scipy作业

Exercise 10.1: Least squaresimport scipy.linalgimport numpy as npm = 20n = 10A = np.random.randint(0, 100, size=(m,n))x = np.random.randint(10, size=(n, 1))b = [list(np.random.normal(0, 1, 1)) ...

2018-06-04 20:17:18 262

原创 matplotlib作业

Exercise 11.1: Plotting a functionimport matplotlib.pyplot as pltfrom math import *import numpy as npdef function(x_list): return [pow(sin(x-2), 2) * exp(-1 * pow(x, 2)) for x in x_list]x ...

2018-05-28 16:35:13 399

原创 numpy作业

9.1,Matrix operations都是一些基本操作n = 200m = 500A = numpy.array([numpy.random.normal(0, 1, m) for _ in range(n)])B = scipy.linalg.toeplitz([1., -.25, *numpy.zeros(m-2)])# exercise 9.1print('\033[1;35...

2018-05-21 20:19:51 312

原创 leetcode #207

There are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair: ...

2018-05-04 00:08:29 126

原创 leetcode #8

Pick OneImplement atoi which converts a string to an integer.The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting fr...

2018-05-01 21:28:05 110

原创 leetcode题两则

#16  3Sum ClosestGiven an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. You may assume that ...

2018-04-26 14:36:50 100

原创 11~1至11~3

11-1,城市和国家import unittestfrom city_functions import city_countryclass TestCase(unittest.TestCase): def test_format(self): formatname = city_country('Santiago', 'Chile') self.ass...

2018-04-13 11:36:22 403

原创 10-1至10-13

10-1,Python学习笔记file_name = 'text.txt'with open(file_name) as file_object: contents = file_object.read() print(contents)with open(file_name) as file_object: for line in file_object: ...

2018-04-05 18:13:48 208

原创 9-1至9-15

9-1,餐馆class Restaurant(): def __init__(self, name, type): self.restaurant_name = name self.cuisine_type = type def describe_resurant(self): print('restaurant_name: ' +...

2018-04-02 17:19:20 163

原创 8-1至8-17

8-1,消息def display_message(): print('I studied functions today.')display_m=essage()8-2,喜欢的图书def favorite_book(title): print('My favorite books is "' + title + '".')favorite_book("Alice in W...

2018-03-28 21:33:59 815

原创 7-1至7-10

7-1,汽车租赁car_name = input("Which car do you want to rend?")print('Let me see if I can find you a ' + car_name)7-3,10的整数倍number = input('Please input a number')if int(number) % 10 == 0: print(nu...

2018-03-27 17:14:00 564

原创 6-1至6-12

6-1,人people = {'first_name':'Wang', 'last_name':'Xiaoming', 'age':18, 'city':'Guangzhou'}for a, b in people.items(): print(a + ':' + str(b))6-5,河流rivers = {'Yangtse':'China', 'Ganges':'India', '...

2018-03-21 22:59:27 266

原创 5-1至5-13

5-5,外星人颜色#1alien_color = 'green'if alien_color == 'green': print('You get 5 points.')alien_color = 'yellow'if alien_color == 'green': print('You get 5 points.')5-5,外星人颜色#3alien_color = 'ye...

2018-03-19 16:53:19 165

原创 4-1至4-15

4-2,动物4-5,计算1~1000000的总和4-8,立方4-10,切片4-13,自助餐

2018-03-14 21:53:49 178

原创 3-1至3-11

3-1,姓名3-5,修改嘉宾名单3-6,添加嘉宾3-11,有意引发错误

2018-03-14 10:33:12 143

原创 2-1至2-11

2-1,简单消息2-2,多条件简单消息2-3,个性化消息2-4,调整名字的大小写2-5,名言2-6,名言22-7,剔除人名的空白2-8,数字82-9,最喜欢的数字2-10,添加注释2-11,Python之禅...

2018-03-07 23:51:20 181

原创 如果我是python高手

图像识别软件                     图像识别技术是目前比较火热的话题。身为python高手,我自然想要在其中插上一脚。图像识别技术应用广泛,而我比较感兴趣的是识别物体。1.图像识别之计数        一张图片上有多少个点?有多少个西瓜?有多少个人?诸如此类问题不一而足。而我要做的就是做...

2018-03-07 23:29:28 469

原创 python官网

    python官网是我看过的比较简洁的官网之一。进入首页映入眼帘的首先是几个python代码的示例,用以表示python的一些特性。有趣的是,python官网几乎处处都表达了对初学者的善意和招揽。比如设置成功的故事一栏,叙述python所取得的成就;强调python是快的,友善的,易于学习的和开源的。并且它还特地说明有些人学了python后再也不想用其它工具。可谓吸引游客之余又彰显它的自信。...

2018-03-06 19:05:12 5167

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除