Skip to content

Instantly share code, notes, and snippets.

@rsepassi
rsepassi / tf-repeat.ipynb
Created February 22, 2019 04:24
tf.repeat
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rsepassi
rsepassi / example.py
Last active October 11, 2018 15:23
tensorflow/datasets
import tensorflow as tf
import tensorflow_datasets as tfds
# tfds works with Eager and Graph modes
tf.enable_eager_execution()
# 0. Select the dataset you'd like to use
print(tfds.list_builders())
# 1. Construct the DatasetBuilder
# Countdown
function countdown(){
echo "Countdown started: $1 minutes"
background_countdown $1 &
}
function background_countdown(){
date1=$((`date +%s` + $1 * 60));
while [ "$date1" -ge `date +%s` ]; do
:
done
@rsepassi
rsepassi / data_stack.py
Created May 8, 2014 19:23
Import sci stack
import numpy as np
import scipy as sp
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
@rsepassi
rsepassi / autoreload_startup.ipy
Created May 8, 2014 19:23
Setup autoreload in iPython
%load_ext autoreload
%autoreload 2
# Exclude autoimports
%aimport -np
%aimport -pd
%aimport -sp
%aimport -sklearn
%aimport -skimage
%aimport -mpl
https://www.dropbox.com/s/2xuy5mhoqaxagbe/Drivers%20license.jpg
@rsepassi
rsepassi / rspec.md
Created September 25, 2013 18:15
RSpec Outline

RSpec

Day 1: Testing Models + API

  • RSpec

Project Requirements

  • Associations + validations
  • Scopes
@rsepassi
rsepassi / grading_script.rb
Last active December 23, 2015 18:38
RSpec Assessment Scorer
# Will run rake in each folder, check how
# many specs failed, and output scores
# (passed specs of total specs) into
# 'final_grades.txt' along with a note if
# 'rake' errored out.
#
#
# Expectations:
#
# Single folder that contains one folder
@rsepassi
rsepassi / JitBitSQLAnswers.sql
Created June 9, 2013 14:42
JitBit SQL Interview Questions Answered
-- JitBit SQL Interview Questions (Posted on Hacker News)
-- http://www.jitbit.com/news/181-jitbits-sql-interview-questions/?utm_source=hackernewsletter&utm_medium=email
-- Schema:
-- employees table
-- EmployeeID
-- DepartmentID
-- BossID
-- Name
-- Salary
@rsepassi
rsepassi / template.rb
Last active December 14, 2015 10:48
Simple rails template
devise = yes?("Devise? ")
cancan = yes?("Cancan? ")
omniauth = yes?("Omniauth? ")
foundation = yes?("Foundation? ")
bootstrap = foundation ? false : yes?("Bootstrap? ")
ember = yes?("Ember? ")
handlebars = ember ? false : yes?("Handlebars? ")
underscore = yes?("Underscore? ")
homecontroller = yes?("Home Controller with index page? ")
github = yes?("GitHub create and push? ")