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
import SimpleITK as sitk | |
import numpy as np | |
from imageio import imwrite | |
from argparse import ArgumentParser | |
""" | |
requirements.txt | |
SimpleITK | |
numpy |
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
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: pgadmin | |
name: pgadmin | |
spec: | |
ports: | |
- name: pgadmin |
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 tensorflow.keras import layers | |
import tensorflow as tf | |
class MeanOnlyBN(layers.BatchNormalization): | |
def __init__(self, **kwargs): | |
kwargs['scale'] = False | |
kwargs['center'] = False | |
kwargs['fused'] = False | |
super().__init__(**kwargs) |
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
import os | |
import argparse | |
import glob | |
import re | |
import time | |
MIN = -1024 | |
MAX = 3072 | |
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
/** | |
* Modified from: | |
SRT subtitle import for AE CS5 | |
By August Bering | |
*/ | |
/* | |
example text file input containing: | |
0:15 |
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
{ | |
// create an undo group | |
app.beginUndoGroup("respliceScript"); | |
var curItem = app.project.activeItem; | |
var selectedLayers = curItem.selectedLayers; | |
var times = ["00.10-00.24", "00.34-01.03", "01.25-01.37"]; |
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
import random | |
import sys | |
def print_xml_format(color, index, value): | |
if value == 0 or value == 1: | |
ctype = 'Discontinuous' | |
else: | |
ctype = 'Continuous' | |
print('''<folder key="ControlPoint[{}]" > |
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 | |
# add border to image for 4x5 aspect ratio using imagemagick | |
# add_border.sh image.jpg | |
infile=$1 | |
outfile=${1%.jpg}_border.jpg | |
bgcolor="white" | |
hh=`convert $infile -ping -format "%h" info:` | |
ww=`convert $infile -ping -format "%[fx:0.8*h]" info:` |
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
import configparser | |
import os | |
from argparse import ArgumentParser | |
"""Example | |
# Reads configs from a config file using configparser. Use -c or --config to specify path to file. | |
# Arguments are overridden based on order of priority: | |
# defaults < config file < command line arguments |
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
# place file in /etc/bash_completion.d/ | |
_jrnl() | |
{ | |
local cur prev opts | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
prev="${COMP_WORDS[COMP_CWORD-1]}" | |
opts="`jrnl -ls`" | |
if [ "$COMP_CWORD" -eq 1 ]; then | |
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) |
NewerOlder