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 | |
import torch | |
import torch.nn | |
import torch.cuda | |
from torch.autograd import Variable | |
class Net(torch.nn.Module): | |
def __init__(self): |
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
def tokenize_story_line(story_line): | |
tokens = re.findall(r'(\w+)', story_line) | |
return tokens | |
def load_stories(file): | |
data = [] | |
with file.open() as f: | |
story = [] |
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
#!/bin/bash | |
sudo add-apt-repository -y ppa:deadsnakes/ppa | |
sudo apt-get update | |
sudo apt-get install -y python3.6 python3.6-dev python3.6-venv | |
python3.6 -m venv venv_smekh | |
. venv_smekh/bin/activate | |
pip install azure mrjob warcio |
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
python3.6 -m venv /tmp/venv_smekh | |
. /tmp/venv_smekh/bin/activate | |
pip install azure mrjob warcio |
OlderNewer