Skip to content

Instantly share code, notes, and snippets.

.-"-._( ) )
/ , , 66\
`======\ )_\\=\_o)=
`~~"~ `"
@ericrobskyhuntley
ericrobskyhuntley / README.md
Last active March 22, 2020 00:26 — forked from rgdonohue/README.md
Batch Geocoding Script with GeoPy
@giannisp
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active March 1, 2024 14:39
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
@oscarmorrison
oscarmorrison / missing-image.html
Created June 4, 2016 03:38
html backup image
<img src="img/missing-image.png" onerror="javascript:this.src='img/default.png'">
@giantryansaul
giantryansaul / install_jupyter_notebook_on_aws.md
Created December 14, 2015 05:35
Run Jupyter from an amazon free tier AWS server

Installing Jupyter notebook to AWS

This is an early draft of this guide, which currently does not include any screenshots. I may be making a lot of assumptions about what you do or do not know in this guide and so I welcome any constructive criticism to help make it more useful. Please feel free to fork this guide and annotate it where it does not work, I would welcome any pull requests to improve this documentation.

Setup amazon linux server (free tier)

  • From Amazon's EC2 page, go to Launch Instance
  • Choose an Amazon Linux 64-bit server and continue
  • Select t2.micro (this is the free tier)
  • Continue to the Add Storage page and adjust this up to 30GB if you're so inclined (default is 8GB, which is plenty)
  • Tag your instance with a name like "notebook"
@shentonfreude
shentonfreude / dynamodb_read_backoff.py
Created December 11, 2015 17:00
Wrap boto3 dynamodb in an exponential backoff to avoid ProisionedThroughputExceededException
#!/usr/bin/env python
# An exponential backoff around Boto3 DynamoDB, whose own backoff eventually
# fails on long multipage scans. We'd like to use this as a wrapper somehow,
# see: https://gist.github.com/numberoverzero/cec21b8ca715401c5662
from time import sleep
import boto3
from boto3.dynamodb.conditions import Attr
@mbejda
mbejda / 10000-MTV-Music-Artists-page-1.csv
Last active April 10, 2024 15:02
10,000 MTV's Top Music Artists. Great dataset for machine learning, research and analysis. (name,facebook,twitter,website,genre,mtv).
name facebook twitter website genre mtv
Adele http://www.facebook.com/9770929278 http://www.twitter.com/officialadele Pop http://www.mtv.com/artists/adele/biography
Joey + Rory http://www.facebook.com/15044507815 http://www.twitter.com/joeyandrory Country http://www.cmt.com/artists/joey-rory/biography
Draaco Aventura http://www.facebook.com/856796091053581 http://www.twitter.com/DraacoAventura http://www.bandpage.com/draacoaventura Pop Latino http://www.mtv.com/artists/draaco-aventura/biography
Justin Bieber http://www.facebook.com/309570926875 http://www.twitter.com/justinbieber http://www.justinbiebermusic.com Pop http://www.mtv.com/artists/justin-bieber/biography
Peer van Mladen http://www.facebook.com/264487966 http://www.twitter.com/Predrag_Jugovic http://pejaintergroup.eu/Peer_van_Mladen.html House http://www.mtv.com/artists/peer-van-mladen/biography
Chris Janson http://www.facebook.com/296647641825 http://www.twitter.com/janson_chris http://www.chrisjanson.com Country http://www.cmt.com/a
@taniarascia
taniarascia / index.html
Last active April 3, 2024 21:05
HTML Skeleton file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="author" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
@gbuesing
gbuesing / ml-ruby.md
Last active February 28, 2024 15:13
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems

@James1x0
James1x0 / emberscrollspy.js
Last active January 30, 2017 17:28
Ember Scrollspy
import Ember from 'ember';
import windowBinderMixin from '../mixins/window-binder';
export default Ember.View.extend(windowBinderMixin, {
templateName: 'scroll-spy',
classNames: [ 'scroll-spy-view', 'affix' ],
// Bind the window events on view insertion
didInsertElement: function () {
this.setupWindowBindings();