- 博客(15)
- 收藏
- 关注
原创 【高级编程技术】第15周作业
from sklearn import datasets, cross_validationfrom sklearn.naive_bayes import GaussianNBfrom sklearn.svm import SVCfrom sklearn.ensemble import RandomForestClassifierfrom sklearn import metricsd...
2018-06-16 14:33:09
272
原创 【高级编程技术】第13周作业
import numpy as npimport scipy.optimize as optimport scipy.spatial.distance as dis#exer 1m=50n=30A=np.random.rand(m,n)b=np.random.rand(m)def func(p,A): x=np.reshape(p,(n,1)) return np.dot...
2018-05-30 23:41:15
225
原创 【高级编程技术】第12周作业
import numpy as npimport matplotlib.pyplot as pltimport scipy.stats as sts#exercise 1f, ax = plt.subplots(1, 1, figsize=(5,4))x=np.linspace(0,2,50)y=np.multiply(np.power(np.sin(np.subtract(x,...
2018-05-26 19:00:38
261
原创 【高级编程技术】第11周作业
9.1import numpy as npfrom scipy.linalg import toeplitzimport randomn=200m=500A=np.random.normal(size=(n,m))row=np.random.random(m)col=np.random.random(m)B=toeplitz(row,col)#exercise 9.1...
2018-05-18 09:34:38
199
原创 【leetcode】8. String to Integer (atoi)
1.DescriptionImplement 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, starti...
2018-05-02 22:06:42
147
原创 【Leetcode】3. Longest Substring Without Repeating Characters
1.DescriptionGiven a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length is 3.Given "bbbbb", the answer is "b...
2018-04-29 15:39:03
107
原创 【Leetcode】5. Longest Palindromic Substring
1.DescriptionGiven a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.Example 1:Input: "babad"Output: "bab"Note: "aba" is also a valid answer....
2018-04-29 15:32:17
105
原创 【leetcode】4.Median of two sorted arrays
1.DescriptionThere are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1:nums1 =...
2018-04-25 22:59:14
128
原创 【高级编程技术】第一周作业
1.Python主页发现与收获: Python社区现在充满活力。在Python官网主页上,不止有Python相关软件的下载,Python官方文档,还有Python各种社区的讨论板块,以及Python在各个领域的成功范例。对于Python初学者,可以充分利用Begginer's Guide和Developer's Guide。开发者指南中有一份叫做PEP 8的文档,是Python社区对于编码风...
2018-03-06 15:00:38
538
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人