Skip to content

Instantly share code, notes, and snippets.

View mrdrozdov's full-sized avatar

Andrew Drozdov mrdrozdov

View GitHub Profile
@mrdrozdov
mrdrozdov / snippets.md
Created September 27, 2018 05:44
Latex Snippets

Add todos.

\newcommand\todo[1]{\textcolor{blue}{TODO: #1}}
@mrdrozdov
mrdrozdov / multi-fail.py
Last active September 10, 2018 20:04
multi-fail.py
import torch
import numpy as np
class Model(torch.nn.Module):
def forward(self, x):
return torch.from_numpy(x).float().cuda()
ngpus = 2
x = np.ones((10, 10))
@mrdrozdov
mrdrozdov / SLURM.md
Last active September 8, 2018 17:37
Andrew's Slurm Cheat Sheet

Request a gpu for interactive use.

srun --gres=gpu:1 --partition=gpu --pty /bin/bash

Request a node exclusively.

srun --partition=gpu --node=1 --exclusive --pty /bin/bash
@mrdrozdov
mrdrozdov / extract.sh
Created August 11, 2018 16:21
extract.sh
~/Downloads/CoreDataUtil.app/Contents/MacOS/CoreDataPro --model ./Contents/Frameworks/AgendaFoundation.framework/Versions/A/Resources/UIDatabaseModel.momd/UIDatabaseModel.mom \
--store /Users/adrozdov/Library/Containers/com.momenta.agenda.macos/Data/Documents/Agenda/DerivedInfo/UI\ Database/UIDatabase.db \
--storeType SQLite
@mrdrozdov
mrdrozdov / find-demo.py
Last active July 24, 2018 15:07
find-demo.py
"""
keys:
[3, 4]
r (10, 5):
[[22. 7. 20. 21. 6.]
[ 8. 14. 6. 5. 5.]
[ 1. 0. 1. 5. 4.]
[17. 15. 0. 7. 6.]
[ 0. 7. 7. 7. 4.]
@mrdrozdov
mrdrozdov / test_checkpoints.py
Created May 21, 2018 18:42
test_checkpoints.py
import unittest
import tempfile
import os
import torch
def models_eq(a, b):
"""
Not the most elegant method. Compares two models' parameters.
@mrdrozdov
mrdrozdov / bucket.md
Last active May 11, 2018 14:57
NYC (RC) Bucket List

Restaurants, Dessert, and Coffee

  • $ Kopi Kopi Flatiron - New location for the reliable Washingonton Square establishment.
  • $ Sophie's Cuban Cuisine - It's hard to beat a place that serves their food fast and cooks it well. Also has a location by Union Square.
  • $ Spicy Village - Recommended by Evan Casey. More food than you can possibly eat and similar cuisine as Mission Street Food. Expect wait because it's a hole in the wall that doesn't take reservations.
  • $ Spreadhouse Cafe - A spacious coffee shop in the Lower East Side where it's pleasant to stay for a while whether working or catching up with friends.
  • $ Wolfnights - A bit like Shake Shack for wraps and with a nice variety.
@mrdrozdov
mrdrozdov / example_runspec.json
Created April 13, 2018 20:34
example_runspec.json
{
"jobName": "deeprecs-train-job",
"artifact": "artifact-deeprecs-train",
"artifactTag": "latest",
"mlApplication": "com.ebay.oss.krylov.workflow.app.GenericMLApplication",
"executionParameters": {
"hadoop": {
"hadoopCluster": "ares",
"batchUser": "b_merch"
},
@mrdrozdov
mrdrozdov / tiny-imagenet-5.txt
Last active March 9, 2018 02:46
tiny-imagenet-5.txt
$ tree -fi ~/data/tiny-imagenet-5 | grep -v test | pbcopy
/Users/adrozdov/data/tiny-imagenet-5
/Users/adrozdov/data/tiny-imagenet-5/train
/Users/adrozdov/data/tiny-imagenet-5/train/n09193705
/Users/adrozdov/data/tiny-imagenet-5/train/n09193705/images
/Users/adrozdov/data/tiny-imagenet-5/train/n09193705/images/n09193705_0.JPEG
/Users/adrozdov/data/tiny-imagenet-5/train/n09193705/images/n09193705_1.JPEG
/Users/adrozdov/data/tiny-imagenet-5/train/n09193705/images/n09193705_10.JPEG
/Users/adrozdov/data/tiny-imagenet-5/train/n09193705/images/n09193705_100.JPEG
/Users/adrozdov/data/tiny-imagenet-5/train/n09193705/images/n09193705_101.JPEG
@mrdrozdov
mrdrozdov / sst.dev.txt
Created February 28, 2018 03:59
sst.dev.txt
14155
20
108
8575
976
34242
27648
3181
8575
2026