Skip to content

Instantly share code, notes, and snippets.

@tals
tals / png_dataset.py
Created March 16, 2020 14:27
A StyleGAN PNG loader. Saves the need for intermediate TFRecords if you have the CPU/GPU for it
"""
A StyleGAN PNG data loader.
Saves the need for intermediate TFRecords if you have the CPU/GPU for it.
Apply the following patch:
diff --git a/run_training.py b/run_training.py
index bc4c0a2..61e5a33 100755
--- a/run_training.py
+++ b/run_training.py
@tals
tals / multitb.py
Last active March 16, 2020 22:16
Quickly inspect tensorboard logs when they're scattered around
import subprocess
import os
import tempfile
import argparse
def main():
parser = argparse.ArgumentParser(__name__, usage='multitb <logdir1> <logdir2> ...')
parser.add_argument('inputs', nargs='+')
args, rest = parser.parse_known_args()
@tals
tals / meldium_to_1password.py
Last active June 6, 2017 23:01
Meldium to 1Password converter
"""
1Password is good at a lot of things. Importing CSV is not one of them (as of 5.5.BETA-29).
Converts a Meldium CSV to something 1Password will import correctly.
To export: http://support.meldium.com/knowledgebase/articles/656755-export-meldium-data-to-a-spreadsheet
"""
import csv
import sys
@tals
tals / install_arcanist.bash
Last active May 18, 2022 10:21
install arcanist (OSX)
#!/bin/bash
dir="~/Applications/arcanist/"
eval dir=$dir
if [ -d "$dir" ]; then
printf "arc already installed. Remove and install again? (y/n) "
read answer
if [ "$answer" != "y" ]; then
exit
fi
rm -fR "$dir"