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
#!/usr/bin/env python | |
# eog not bundled with your distro? | |
# no sudo access? | |
# do it all with python! | |
# easiest to use with miniconda env with matplotlib | |
import sys | |
import matplotlib.pyplot as plt | |
from PIL import Image |
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 | |
import re | |
import gzip | |
import hashlib | |
from tqdm import tqdm | |
from bs4 import BeautifulSoup, SoupStrainer | |
fnames = [] | |
for fname in os.listdir('PubMed'): | |
if fname.endswith('.xml'): |
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 tensorflow as tf | |
b = tf.constant(21306806, dtype=tf.float32) | |
print((1+b)-b) | |
print(1+(b-b)) |
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
# Launch jupyter notebook in a new tmux session for Colab to connect to | |
# https://research.google.com/colaboratory/local-runtimes.html | |
SESSION=colab | |
tmux new -d -s $SESSION | |
tmux send-keys -t $SESSION "jupyter notebook \ | |
--NotebookApp.allow_origin='https://colab.research.google.com' \ | |
--port=8888 \ | |
--NotebookApp.port_retries=0 \ |
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 | |
# Log files are stored in subdirectories of current directly: ./*/log* | |
# Log files contain output like: ROC AUC * {label} * = 0.NNN | |
# Where the AUC for a label on the test set is the last ocurrence of the above fragment in the file | |
# | |
# For example, in an experiment to predict "death", our results are in a | |
# folder "experiment" with 10 subfolders "trial_N", where N is the trial number. | |
# Within each "trial_N" subfolder, there is a file "log" with output lines: | |
# |
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/python | |
# | |
# usage: | |
# python dispatch.py \ | |
# --gpus 0-3 \ | |
# --bootstraps 0-9 \ | |
# --scripts \ | |
# train-simple.sh \ | |
# train-varied.sh \ | |
# train-deeper.sh |