This file contains hidden or 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
ls -1 | awk -F'_' '{print $1 $2}' | sort -u | |
# FLP_001_t2.nii | |
# FLP_001_t1_nii | |
# FLP_004_t2.nii | |
# FLP_004_t1.nii | |
# || | |
# || | |
# FLP_001 | |
# FLP_004 |
This file contains hidden or 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
# SGE 8.1.9 | |
qhold 888333 -t 7-12 | |
qalter -h U 888333 -t 7-12 |
This file contains hidden or 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
# This is an example for the CIFAR-10 dataset. | |
# There's a function for creating a train and validation iterator. | |
# There's also a function for creating a test iterator. | |
# Inspired by https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4 | |
from utils import plot_images | |
def get_train_valid_loader(data_dir, | |
batch_size, | |
augment, |
This file contains hidden or 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
# from https://www.kaggle.com/nothxplz/dogs-vs-cats-redux-kernels-edition/cats-vs-dogs-05-pytorch-example/run/761413 | |
from __future__ import print_function | |
import argparse | |
import csv | |
import os | |
import os.path | |
import shutil | |
import time |
This file contains hidden or 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 | |
mkdir -p /tmp/certbot/public_html/ | |
cd /tmp/certbot/public_html | |
# forward external port 80 to internal port [unifi-controller-ip]:9000 | |
python -m SimpleHTTPServer 9000 | |
sudo cp -r /etc/letsencrypt/live/unifi.domain.com/ ~/Desktop/certbot/ | |
# renew certificate |
This file contains hidden or 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
# ======================================================== | |
# Setup a Dumb AP, Wired backbone for OpenWRT / LEDE | |
# ======================================================== | |
# Set lan logical interface as bridge (to allow bridge multiple physical interfaces) | |
uci set network.lan.type='bridge' | |
# assign WAN physical interface to LAN (will be available as an additional LAN port now) | |
uci set network.lan.ifname="$(uci get network.lan.ifname) $(uci get network.wan.ifname)" | |
uci del network.wan.ifname | |
# Remove wan logical interface, since we will not need it. | |
uci del network.wan |
This file contains hidden or 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 | |
# Backup a Plex database. | |
# Author Scott Smereka | |
# Version 1.0 | |
# Script Tested on: | |
# Ubuntu 12.04 on 2/2/2014 [ OK ] | |
# Plex Database Location. The trailing slash is |
This file contains hidden or 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 | |
# Restore a Plex database. | |
# Author Scott Smereka | |
# Version 1.0 | |
# Script Tested on: | |
# Ubuntu 12.04 on 2/2/2014 [ OK ] | |
# Plex Database Location. The trailing slash is |
This file contains hidden or 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
# https://myfabrix.com/community/tech-notes/photonos-expanding-disk-partition/ | |
echo 1 > /sys/class/block/sda/device/rescan | |
tdnf install parted | |
parted /dev/sda | |
resizepart 2 100% | |
quit |
This file contains hidden or 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
# https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=FSL%3Bd7372159.0810 | |
FSLDIR=/usr/share/fsl/5.0/etc/luts | |
LUT=render3 | |
slicer ${FSLDIR}/colourbar.nii.gz -l ${LUT} -s 2 -i 0 100 -u -z 0 colourbar.png |