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
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
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 pandas as pd | |
import numpy as np | |
import spacy | |
import en_core_web_sm | |
path_to_data = './data/' | |
spacy.prefer_gpu() | |
nlp = en_core_web_sm.load() |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Nov 12 18:19:23 2018 | |
@author: Nhan Tran | |
""" | |
""" | |
y = b0 + b1*x1 | |
y: dependent variable |
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 signs as signs | |
import pandas as pd | |
# load some text | |
df = pd.read_csv('tweets.csv').text | |
# load vectors | |
e = signs.Embeds("glove.twitter.27B.25d.txt") | |
# get Keras embeddings layer |
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 pandas as pd | |
#from constants import * | |
#from src.commons import utils | |
#import matplotlib.pyplot as plt | |
#import numpy as np | |
# Read the list of all paintings (scraped data) | |
data = pd.read_csv('{}/data.csv'.format(DATA_FOLDER)) | |
for year in data['year'].unique(): | |
full_data = pd.DataFrame() |
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
s = 'Python is awesome!' | |
red = "#FA5882" | |
a = eval("exec('import sys; import matplotlib.pyplot as plt; import numpy as np; print(s); t = np.arange(0,2*np.pi, 0.1); x = 16*np.sin(t)**3; y = 13*np.cos(t)-5*np.cos(2*t)-2*np.cos(3*t)-np.cos(4*t); plt.fill(x,y,color=red); plt.show(); sys.exit()')") | |
print('R is great too!') | |
X11() # Use windows() or qartz() if on Windows or Mac | |
t = seq(0, 2*pi, by=0.1) | |
x = 16*sin(t)^3 | |
y = 13*cos(t) - 5*cos(2*t) - 2*cos(3*t) - cos(4*t) | |
plot(x=x, y=y, type="n", xlab="", ylab="") | |
polygon(x=x, y=y, col=red, border=red) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 numpy as np | |
def sigmoid(x): | |
return 1.0 / (1.0 + np.exp(-x)) | |
def sigmoid_prime(x): | |
return sigmoid(x) * (1.0 - sigmoid(x)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 datetime import datetime | |
import json | |
from functools import lru_cache | |
from multiprocessing import Pool | |
import sys | |
from nltk.tokenize import word_tokenize, sent_tokenize | |
from nltk.corpus import stopwords | |
from nltk.util import ngrams | |
from nltk import WordNetLemmatizer, pos_tag |