Skip to content

Instantly share code, notes, and snippets.

@adujardin
adujardin / pre-receive-merge
Last active November 23, 2017 09:06 — forked from hartfordfive/pre-receive-puppet
Server-side pre-receive hook to check for merge artefacts such as '<<<<<<<' or '>>>>>>>'
#!/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
@adujardin
adujardin / maxPerf.sh
Last active February 13, 2018 15:39 — forked from jmtatsch/maxPerf.sh
Nvidia's Max Performance Script for Tegra X1
#!/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..."
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: