Skip to content

Instantly share code, notes, and snippets.

View NguyenDa18's full-sized avatar
🎧
Listening to Funny Podcasts

Danh Nguyen NguyenDa18

🎧
Listening to Funny Podcasts
View GitHub Profile
@NguyenDa18
NguyenDa18 / jest.js
Last active April 21, 2018 21:33
Jest 101
/// functions.js ////
const functions = {
add: (num1, num2) => num1 + num2,
isNull: () => null,
checkValue: x => 4,
createUser: () => {
const user = { firstName: 'Deku' };
user['lastName'] = 'Midoriya';
return user;
}
@NguyenDa18
NguyenDa18 / Free O'Reilly Books.md
Created January 11, 2018 01:39 — forked from augbog/Free O'Reilly Books.md
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@NguyenDa18
NguyenDa18 / neuralnet.py
Last active January 7, 2018 20:14
Simple Neural Network
import numpy as np
# X = (hours sleeping, hours studying), y = score on test
X = np.array(([2, 9], [1, 5], [3, 6]), dtype=float)
y = np.array(([92], [86], [89]), dtype=float)
# scale units
X = X/np.amax(X, axis=0) # maximum of X array
y = y/100 # max test score is 100