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 subprocess | |
| import shlex | |
| cows = ['apt', 'beavis.zen', 'bong', 'bud-frogs', 'bunny', 'calvin', 'cheese', 'cock', 'cower', | |
| 'daemon', 'default', 'dragon', 'dragon-and-cow', 'duck', 'elephant', 'elephant-in-snake', | |
| 'eyes', 'flaming-sheep', 'ghostbusters', 'gnu', 'head-in', 'hellokitty', 'kiss', 'kitty', | |
| 'koala', 'kosh', 'luke-koala', 'mech-and-cow', 'meow', 'milk', 'moofasa', 'moose', | |
| 'mutilated', 'pony', 'pony-smaller', 'ren', 'sheep', 'skeleton', 'snowman', | |
| 'sodomized-sheep', 'stegosaurus', 'stimpy', 'suse', 'three-eyes', 'turkey', 'turtle', 'tux', |
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 itertools import combinations | |
| from copy import copy | |
| import pdb | |
| def grabpoints(size, mod, pointnums): | |
| """ returns nums under size | |
| that are divisible by mod, | |
| duplicated on pointnums | |
| """ | |
| box = {n for n in range(size) if n%mod == 0} |
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
| # copy filter from here and paste into stdin | |
| # http://dev.theomader.com/gaussian-kernel-calculator/ | |
| input_string = input("paste in filter, it won't have spaces but that's okay: ") | |
| float_filter = [float('0.'+x) for x in input_string.split('0.')][1:] | |
| smallest = min(float_filter) | |
| discrete_filter = [round(x/smallest) for x in float_filter] | |
| print(discrete_filter) |
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
| #include <stdio.h> | |
| /* Useful vidoes: | |
| 1d kernel for data processing: | |
| https://www.youtube.com/watch?v=D0F-NPerCIE | |
| numberphile on image bluring (same thing in 2d): | |
| https://www.youtube.com/watch?v=C_zFhWdM4ic | |
| excellent explanations in there. It introduced me to the concept. | |
| */ |
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
| #! /usr/bin/python | |
| # -*- coding: utf8 -*- | |
| """ GAN-CLS """ | |
| import tensorflow as tf | |
| import tensorlayer as tl | |
| from tensorlayer.layers import * | |
| from tensorlayer.prepro import * | |
| from tensorlayer.cost import * | |
| import numpy as np |
NewerOlder