vSpace


  • Home

  • Archives

  • Search

Bug Summary

Posted on 2020-05-24 | In Assignment

这篇blog会长期更新。我会在其中更新一些让我印象深刻的bug。

Read more »

Sklearn

Posted on 2018-06-13 | In Assignment

Sklearn

step 1

crreate a classification dataset(n_samples >= 1000, n_features >= 10)

Read more »

Scipy

Posted on 2018-06-01 | In Assignment

Scipy Homework

Exercise 10.1: Least squares

Generate matrix $A \in R^{m \times n}$ with m > n. Also generate some vector $b \in R^m$ Now find $x=\arg \min_x||Ax - b||_2$ Print the norm of the residual.

Read more »

Matplotlib

Posted on 2018-05-24 | In Assignment

Matplotlib Homework

Exercise 11.1: Plotting a function

Plot the function $f(x)=\sin^2(x-2)e^{-x^2}$ over the interval [0, 2]. Add proper axis labels, a title, etc.

Read more »

Numpy Practise

Posted on 2018-05-19 | In Assignment

numpy practise

prerequisize

Generate matrices A, with random Gaussian entries, B, a Toeplitz matrix, where A ∈ R n×m and B ∈ R m×m , for n = 200, m = 500

Read more »

Leetcode Array

Posted on 2018-04-22 | In Assignment

561 数组拆分

题面

给定长度为 2n 的数组, 你的任务是将这些数分成 n 对, 例如 (a1, b1), (a2, b2), …, (an, bn) ,使得从1 到 n 的 min(ai, bi) 总和最大。

Read more »

Week Five Assignment

Posted on 2018-04-01 | In Assignment

ch10

``` python

10-1

assume that there is a file called learning_py.txt in current directory

with open(‘learning_py.txt’, ‘r’) as f: s = f.read() print(s) with open(‘learning_py.txt’, ‘r’) as f: for line in f: print(line, end=’’) with open(‘learning_py.txt’, ‘r’) as f: lines = f.readlines() for line in lines: print(line, end=’’)

Read more »

Week Four Assignment (PART II)

Posted on 2018-03-28 | In Assignment

Chp 8

``` python

8-12

def make_sandwiches(*food): print(‘sandwiches has’, food) make_sandwiches(‘egg’) make_sandwiches(‘egg’, ‘bread’) make_sandwiches(‘egg’, ‘bread’, ‘hot dog’)

Read more »

Week Four Assignment (PART I)

Posted on 2018-03-26 | In Assignment

Ch7

7-1 ~ 7-5

``` python

7-1

carName = input(‘what car do you like?\n’) print(‘let me see if I could find you a(n) {}’.format(carName))

Read more »

Week Three Assignment

Posted on 2018-03-19 | In Assignment

第五章

5-3至5-7

``` python

5-3(1)

alien_color = ‘red’ if alien_color == ‘green’: print(‘you get 5 points’)

5-3(2)

alien_color = ‘green’ if alien_color == ‘green’: print(‘you get 5 points’)

Read more »
1 2
Benson Yan

Benson Yan

Student in Sun Yat-sen University, China. Major in computer science.

16 posts
6 categories
3 tags
GitHub School She
© 2017 - 2020 Benson Yan
Powered by Jekyll
Theme - NexT.Muse