Skip to content

Instantly share code, notes, and snippets.

Jupyter setup

Open up your terminal and copy/paste the following

# Install Brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install pip
easy_install pip
# Install jupyter and other packages
pip install jupyter numpy scipy sklearn
@philkuz
philkuz / aws.py
Last active January 7, 2019 10:17
follow guide.md
from aws import bucket_exists, upload_path
bucket_name = 'cnns-music-vids'
directory_to_upload = 'data/'
output_s3_directory = 'data/'
if bucket_exists(bucket_name):
print('the bucket exists!')
else:
raise ValueError('nah the bucket does not exist')
@philkuz
philkuz / node-npm-install.md
Created August 4, 2017 23:58 — forked from rcugut/node-npm-install.md
Install node & npm on Mac OS X with Homebrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

input: "feat"
input_shape {
dim: 1
dim: 4096
}
force_backward: true
layer {
name: "defc7"
type: "InnerProduct"
bottom: "feat"
#!/usr/bin/env bash
#Code adapted from https://gist.github.com/rashmibanthia/5a1e4d7e313d6832f2ff (Removed Anaconda install for those servers that have it installed)
jupyter notebook --generate-config
key=$(python -c "from notebook.auth import passwd; print(passwd())")
cd ~
mkdir certs
cd certs

Phillip Kuznetsov

sexy-phil

I am cool. Do you like my picture?

@philkuz
philkuz / mlbootcamp.ipynb
Created August 24, 2016 22:29
Data Transformation Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philkuz
philkuz / Dockerfile
Created August 24, 2016 00:20
Ruby on Rails dockerfile
FROM ruby:2.3
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
COPY Gemfile* ./
RUN bundle install
@philkuz
philkuz / .gitattributes
Created August 23, 2016 03:50
Filter out python notebooks
*.ipynb filter=dropoutput_ipynb
@philkuz
philkuz / projectmang.sh
Created June 8, 2016 21:27
Manages a current project as a script
# Function that sets the current project
function set-project() {
if [ $# -ne 1 ]; then
echo "command should be formatted as 'set-project <project-dir>'"
exit 1
fi
if [ "$1" = "." ]; then
dir=$(pwd)
else
dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"