Note: I'm currently taking a break from this course to focus on my studies so I can finally graduate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
from gensim.models import KeyedVectors | |
# Creating the model | |
en_model = KeyedVectors.load_word2vec_format('wiki.en/wiki.en.vec') | |
# Getting the tokens | |
words = [] | |
for word in en_model.vocab: | |
words.append(word) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
from gensim.models import KeyedVectors | |
import numpy as np | |
from sklearn.manifold import TSNE | |
import matplotlib.pyplot as plt | |
# Loading the vectors | |
## [Warning] Takes a lot of time | |
en_model = KeyedVectors.load_word2vec_format('wiki.en/wiki.en.vec') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Cylon = require('cylon'); | |
Cylon.robot({ | |
connections: { | |
arduino: { adaptor: 'firmata', port: 'COM8' } | |
}, | |
devices: { | |
led: { driver: 'led', pin: 13 } | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import numpy as np | |
import tensorflow as tf | |
sess = tf.Session() | |
inp = tf.Variable(np.array([0.0, 0.0, 0.0, 0.0, 1.0]).reshape(1, 1, 5, 1), name="inp") | |
fil = tf.Variable(np.array([0.0, 0.5, 1.0]).reshape(1, 3, 1, 1), name="fil") | |
op = tf.nn.conv2d(inp, fil, strides=[1, 1, 1, 1], padding='SAME') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"country": "eufra", | |
"name": "France" | |
}, { | |
"country": "euprt", | |
"name": "Portugal" | |
}, { | |
"country": "euesp", | |
"name": "Spain" | |
}, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
def likelihood(theta): | |
return theta**7 * (1 - theta)**3 | |
thetas = np.linspace(0, 1, 100) | |
L = [likelihood(thetas[i]) for i in range(len(thetas))] | |
plt.plot(thetas, L) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
def likelihood(theta): | |
return theta**7 * (1 - theta)**3 | |
thetas = np.linspace(0, 1, 100) | |
L = [likelihood(thetas[i]) for i in range(len(thetas))] | |
theta_for_maximum_likelihood = thetas[np.argmax(L)] |
- You have a VPS (something like DigitalOcean, Linode, etc.)
- You have a Flask application and a basic understanding of command line instructions
- You've got nginx installed and know where your configuration files are
- First, you should install gunicorn on your box or virtualenv with pip:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# simply do the following to generate dates for month 12 | |
# curl -s apl-days.py | python - 12 2017 | |
from datetime import date | |
from calendar import monthrange | |
from sys import argv | |
# check if any argument is provided |