Skip to content

Instantly share code, notes, and snippets.

@EdwardJRoss
EdwardJRoss / query_athena.py
Created March 16, 2020 12:09
Showing different ways to query data from Athena
#!/usr/bin/env python
"""Exploring different ways to fetch data from Athena"""
from decimal import Decimal
import codecs
import datetime
import random
import string
from urllib.parse import urlparse
import pytz
from boto3.session import Session
@EdwardJRoss
EdwardJRoss / download_folder_s3.py
Created September 5, 2019 04:31
Download S3 Folder recursively with a progress bar using Python 3.6
#!/usr/bin/env python
# Download a folder recursively from S3
# Requires Python 3.6+
from urllib.parse import urlparse
from pathlib import Path
import boto3
import fire
from tqdm import tqdm
def progress_bar_hook(t):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EdwardJRoss
EdwardJRoss / Supercars.ipynb
Created February 26, 2019 21:57
Basic image classification example on Supercars with fastai
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EdwardJRoss
EdwardJRoss / Woodpeckers - Hairy vs Downy.ipynb
Created February 11, 2019 11:40
fast.ai Fine Grained Image Classification example of distinguishing Hairy Woodpeckers from Downy Woodpeckers
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EdwardJRoss
EdwardJRoss / char_rnn_classification_tutorial.ipynb
Created January 14, 2019 12:13
Character Level Classification of Surname Ethnicity using Fastai
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EdwardJRoss
EdwardJRoss / multimonitor.sh
Created January 2, 2019 22:50
Connect to the best 2 monitors using xrandr
#!/bin/bash
# Connects the last n monitors using xrandr side-by-side.
# xrandr normally lists the inbuilt monitor first so this will
# prefer external displays.
set -exu
nummonitor=2
# Get last n output displays that are currently connected
connectedOutputs=$(xrandr --current |\
@EdwardJRoss
EdwardJRoss / WhatCar.ipynb
Created November 22, 2018 04:39
Training original car model classifier for whatcar.xyz
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EdwardJRoss
EdwardJRoss / weight-guess.ipynb
Last active November 14, 2018 02:09
Guess someone's weight from their photograph using Neural Nets and data from My Body Gallery
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EdwardJRoss
EdwardJRoss / crowd-counting.ipynb
Last active November 13, 2018 17:04
Predicting size of crowd from photograph using Convolution Neural Networks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.