Skip to content

Instantly share code, notes, and snippets.

View act65's full-sized avatar

Alex act65

View GitHub Profile
@act65
act65 / DeepFool.ipynb
Last active August 31, 2016 03:47
Adversarial examples.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@act65
act65 / gating.md
Last active February 12, 2017 01:33
Exploring gating

Gating is ??? a discrete, sparse choice of ... Limiting of information flow!? Why is it important? It can provide differentiable sparsity? Sparsity is the real goal?

Gating allows us to choose (at run time) which computations to apply. This means we can save ... (somewhat like attention).

Specifically I am interested in applying this to gating/heirarchical/... for image processing.

@act65
act65 / hash.py
Last active February 19, 2017 01:40
Random projection -> binary hashing
import tensorflow as tf
from tensorflow.contrib.tensorboard.plugins import projector
from tensorflow.examples.tutorials.mnist import input_data
from sklearn.utils import shuffle
import numpy as np
import os
tf.app.flags.DEFINE_string('logdir', '/tmp/test', 'location for saved embeedings')
tf.app.flags.DEFINE_string('datadir', '/tmp/mnist', 'location for data')
tf.app.flags.DEFINE_integer('batchsize', 500, 'batch size.')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@act65
act65 / filter.ipynb
Last active October 18, 2017 19:00
low pass and high pass op for nns
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@act65
act65 / capture.sh
Last active March 26, 2018 23:37
automated screen capture
#!/bin/bash
DATE=$(date +"%Y%m%d%H%M")
gnome-screenshot -f "/home/act65/repos/capture/images/$DATE.jpg"
# then add */2 * * * * /{path_to_this_file} to crontab using crontab -e
@act65
act65 / scraper.py
Last active March 7, 2019 21:06
scrape papers from semantic scholar
import os
import json
import requests
import argparse
from bs4 import BeautifulSoup as bs
def fetch(url):
page = requests.get(url)
return bs(page.content, "html.parser")
@act65
act65 / kaggle-dataset-scraper.py
Last active March 7, 2018 21:14
get datasets from kaggle using their api
import os
import csv
import time
import argparse
import subprocess
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("--search_terms", type=str)
return parser.parse_args()