This file contains 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 |
This file contains 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 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 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 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
-63278844 | |
-63278845 | |
-63278846 | |
-63278847 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 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 os | |
base_dir = '/data1/aromanov/study/2015_fall/nlp/homeworks/hw1/' | |
brit3_filename = os.path.join(base_dir, 'brit3-excerpt.txt') | |
brit3_marked_filename = os.path.join(base_dir, 'brit3-excerpt-marked.txt') | |
problem4_text_filename = os.path.join(base_dir, 'problem4.txt') | |
def load_documents_from_dir(directory): | |
files = [os.path.join(directory, f) for f in os.listdir(directory)] |
This file contains 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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 47, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ |
This file contains 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 gamePackageName = Resources.GetString(Resource.String.game_package_name); | |
var gameIntent = PackageManager.GetLaunchIntentForPackage(gamePackageName); | |
if (gameIntent == null) | |
{ | |
try { | |
StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse("market://details?id=" + gamePackageName))); | |
} catch (ActivityNotFoundException) { | |
StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse("http://play.google.com/store/apps/details?id=" + gamePackageName))); | |
} | |
} |
NewerOlder