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
[core] | |
analytics = false | |
remote = remote_storage | |
[cache] | |
dir = /srv/dvc-cache | |
shared = group | |
type = symlink | |
['remote "remote_storage"'] | |
url = gs://my-dvc-shared-bucket/dvc-cache-folder |
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
{ | |
"editor.rulers": [ | |
88, | |
120 | |
], | |
"editor.formatOnSave": true, | |
"python.formatting.provider": "black", | |
"python.formatting.blackArgs": [ | |
"--line-length", | |
"120" |
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
|-- LICENSE (if relevant) | |
| | |
|-- README.md <- the top-level README for developers using this project | |
| | |
|-- CHANGELOG.md <- a changelog for tracking changes over the history of a project. | |
| Example: https://github.com/bmmalone/pyllars/blob/dev/CHANGELOG.md | |
| | |
|-- setup.cfg <- project-specific configuration for python. | |
| | |
|-- .gitignore <- avoid uploading data, credentials, outputs, system files, etc. |
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 bash | |
set -vx | |
gh_token=/path/to/my/gh-token.txt | |
account=my_account | |
# login to github | |
gh auth login --with-token < "$gh_token" |
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
SHELL=/bin/bash | |
BASH_ENV=/path/to/my/.bashrc_conda | |
00 03 * * * cd /my/working/dir; conda activate my_env; /path/to/my/script.py >>/path/to/my.stdout 2>>/path/to/my.stderr; conda deactivate |
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
# check running kernel version | |
uname -r | |
# check installed kernel headers | |
apt list --installed | grep "linux-headers" | |
# if the correct ones aren't installed, then install them | |
sudo apt install linux-headers-$(uname -r) | |
# probably reboot, but I'm not sure if it's necessary |
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 bash | |
image_loc="/data/docker" | |
### | |
# https://docs.docker.com/engine/install/debian/ | |
### | |
# set up the docker repository |
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
# Configuration file for jupyter-notebook. | |
def add_home_dir(*fn): | |
import os.path | |
return os.path.join(os.path.expanduser('~'), *fn) | |
#------------------------------------------------------------------------------ | |
# Configurable configuration | |
#------------------------------------------------------------------------------ |
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
given labeled_training_indices (e.g., maybe there are 20 labeled training instances) | |
given labeled_test_indices (there are always ~3000 of these due to the split created by Harutyunyan et al.) | |
train_fold, val_fold <- stratified split(labeled_training_indices, train=70%, "test"=30%) # "test" is really the validation set here | |
# for example, if we have 20 labeled training instances, then we have 14 instances for training and 6 for validation | |
# ... so we really don't have a lot when the number of labeled training instances is small | |
hp_grid = ParameterGrid({ | |
'penalty': ['l1', 'l2'], |
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 bash | |
function mkipycondaenv { | |
if [ "$#" -ne 1 ]; then | |
echo "usage: mkipycondaenv <condaenv_name>" | |
return 1 | |
fi | |
conda create --name "$1" pip wheel jupyter ipykernel |
NewerOlder