Skip to content

Instantly share code, notes, and snippets.

Will Price willprice

Block or report user

Report or block willprice

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@willprice
willprice / remove_old_kernels.sh
Created Sep 9, 2019
Remove old kernels from ubuntu
View remove_old_kernels.sh
#!/bin/bash
set +ex
KEEP_LAST_N=2
OLD_KERNELS=$(dpkg -l | grep -i 'linux-image-[[:digit:]]' | awk '{ print $2 }' | sort -rV | tail -n "+$(($KEEP_LAST_N + 1))")
if [ -n "$OLD_KERNELS" ]; then
apt-get -qy remove --purge $OLD_KERNELS
fi
apt-get -qy autoremove --purge
View PBS_PRO_CHEAT_SHEET.md

PBS Pro command cheat sheet

List nodes and their features

$ pbsnodes

@willprice
willprice / KINETICS_LABELS.md
Last active Aug 8, 2019
Kinetics Dataset Labels (name to ID)
View KINETICS_LABELS.md

Kinetics Numeric/String labels

These are mapping files that go between class IDs to class names. These are generated from the training CSV files from each dataset by collecting the unique classes, sorting them, and then numbering them from 0 upwards.

@willprice
willprice / axis_tick_spacing.py
Created Jul 22, 2019
Set tick spacing on matplotlib axis
View axis_tick_spacing.py
from matplotlib import ticker
ax.yaxis.set_major_locator(ticker.MultipleLocator(tick_spacing))
View SLURM_CHEATSHEET.md

Find the node assigned to a job

$ sacct -j <jobid> --format NodeList
       NodeList
---------------
         dgj213
         dgj213
@willprice
willprice / hub_demo.py
Created Jun 25, 2019
Pytorch hub demo using pretorched-x
View hub_demo.py
import torch
repo = "willprice/pretorched-x:pytorch-hub-support"
print(torch.hub.list(repo, force_reload=True))
model = torch.hub.load(repo, 'resneti3d50')
print(model)
print(dir(model))
print(help(model))
@willprice
willprice / advice.md
Last active Jun 21, 2019
Research proposal advice from Young Jang (https://youngkyoonjang.bitbucket.io/)
View advice.md

Come up with a 1 page document outlining your idea composed of the following

  • A few sentences on the motivation for the idea
  • A figure for the motivation of the method (e.g. an example of a scenario where existing methods fail) articulating some challenge
  • Describe the 3 most relevant works, no more.
  • A list of contributions (3) that describe how your work is different from related work.
  • A list of deliverables (1-3) that should naturally emerge from the list of contributions.
View Makefile
# You want latexmk to *always* run, because make does not have all the info.
# Also, include non-file targets in .PHONY so they are run regardless of any
# file of the given name existing.
NAME:=paper
DOC_SRC:=$(shell find . -maxdepth 1 -iregex './[^.].*\.tex')
MEDIA_SRC:=$(shell find images -type f)
SVG_SRC := $(shell find images -type f -iname '*.svg')
PDF_SVG := $(patsubst %.svg,%.pdf,$(SVG_SRC))
DEPS := $(DOC_SRC) $(MEDIA_SRC) $(PDF_SVG) $(BIB_FILES)
BIB_FILES:= ~/references.bib
You can’t perform that action at this time.