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 argparse | |
import torch | |
import torchvision | |
import shutil | |
# https://github.com/vita-epfl/openpifpaf/blob/master/openpifpaf/export_onnx.py | |
try: | |
import onnx | |
import onnx.utils | |
except ImportError: |
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 | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
enable_fan(){ | |
# turn on fan for safety | |
echo "Enabling fan for safety..." |
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 | |
# pre-receive hook that check for merge artefacts such as '<<<<<<<' or '>>>>>>>' | |
# Possible improvements : https://gist.github.com/hartfordfive/9670011#gistcomment-2045250 | |
COMMAND="grep -RI '<<<<<<<\|>>>>>>>'" | |
TEMPDIR=`mktemp -d` | |
# See https://www.kernel.org/pub/software/scm/git/docs/githooks.html#pre-receive |