Skip to content

Instantly share code, notes, and snippets.

Greg Sadetsky gregsadetsky

Block or report user

Report or block gregsadetsky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dennybritz /
Last active Apr 14, 2017
Tensorflow 0.9 on AWS GPU instance installation
# Install build tools
sudo apt-get update
sudo apt-get install -y build-essential git python-pip libfreetype6-dev libxft-dev libncurses-dev libopenblas-dev gfortran python3-matplotlib libblas-dev liblapack-dev libatlas-base-dev python3-dev python3-pydot linux-headers-generic linux-image-extra-virtual unzip python3-numpy swig python3-pandas python-sklearn unzip python3-pip python3-venv
# Install CUDA 7
# wget
sudo dpkg -i cuda-repo-ubuntu1504_7.5-18_amd64.deb && rm cuda-repo-ubuntu1504_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install -y cuda
RobJDavey / U1F300.txt
Last active Jan 16, 2018
OS X Emoji (with names from 10.11.4)
View U1F300.txt
Miscellaneous Symbols and Pictographs
🌀️ = [1F300] CYCLONE
🌁️ = [1F301] FOGGY
🌅️ = [1F305] SUNRISE
lonetwin /
Last active Feb 4, 2018
print out ascii tables in python using data in the form: [ ('column 0 title', 'column 1 title' ..), ('row 0, column 0 data', 'row 0, column 1 data' ...) ...]
# I needed to print out ascii tables from data in the form:
# [ ('column 0 title', 'column 1 title' ..),
# ('row 0, column 0 data', 'row 0, column 1 data' ...) ...]
# and surprisingly it got complicated because of variable lengths of the data.
# I googled for 'standard' ways of doing this and I found suggestions like:
# ...which were a bit dated and hard to read or full scale modules like:
diffused / gist:5517341
Created May 4, 2013
Python peewee orm. How to do a "where in (1,2,3)" style query. It was kind of tricky to find the syntax in the docs/google
View gist:5517341
products = << [161,162,163,164,165]).where(
~(Product.brand_name >> None)
j0hnm4r5 / photonFftExample.ino
Last active Apr 7, 2018
An example for doing FFT analysis on a Particle Photon
View photonFftExample.ino
#include <math.h>
Example application for doing FFT on a Particle Photon and sending the data to Processing on a computer
Designed for Phyiscal Computing Studio, Spring 2016, IDeATe @ Carnegie Mellon University:
Inspired by Adafruit's FFT: Fun with Fourier Transforms tutorial:
FFT function from Paul Bourke:
TCP connection code provided by Alex Alspach
quellish / FBClasses.txt
Created Aug 15, 2015
Facebook iOS App Class List
View FBClasses.txt
ericremoreynolds /
Last active Mar 5, 2019
Key-like functionality recipe for Python's bisect functions
class KeyifyList(object):
def __init__(self, inner, key):
self.inner = inner
self.key = key
def __len__(self):
return len(self.inner)
def __getitem__(self, k):
return self.key(self.inner[k])
gregsadetsky /
Last active Apr 26, 2019
See: -- I was looking for a way to run Selenium tests for a Django app on a staging server hosted on Heroku using a PostgreSQL database. The DjangoTestSuiteRunner creates and destroys the whole database before/after testing, which would not work on Heroku where databases are added via other means (her…
import dj_database_url
'default': dj_database_url.config(env='TEST_DATABASE_URL')
# replace path below to point to HerokuTestSuiteRunner class
sintaxi / regions.txt
Last active May 15, 2019
Surge Regions
View regions.txt
List of regions your project is served from when you deploy using surge. : : CA : Toronto : : US : New York : : US : San Francisco : : GB : London : : NL : Amsterdam : : DE : Frankfurt : : SG : Singapore
endolith /
Created Oct 16, 2012
Export Google Maps starred locations
# -*- coding: utf-8 -*-
Go to Google Bookmarks:
On the bottom left, click "Export bookmarks":
After downloading the html file, run this script on it to generate a KML.
You can’t perform that action at this time.