Skip to content

Instantly share code, notes, and snippets.

@feelinc
feelinc / UploadDirS3.py
Last active November 2, 2023 14:53
Upload folder contents to AWS S3
#!/usr/bin/python
import os
import sys
import boto3
# get an access token, local (from) directory, and S3 (to) directory
# from the command-line
local_directory, bucket, destination = sys.argv[1:4]
@mculp
mculp / voices.txt
Created December 3, 2014 00:14
List of voices available by the `say` command on OS X
Agnes en_US # Isn't it nice to have a computer that will talk to you?
Albert en_US # I have a frog in my throat. No, I mean a real frog!
Alex en_US # Most people recognize me by my voice.
Alice it_IT # Salve, mi chiamo Alice e sono una voce italiana.
Alva sv_SE # Hej, jag heter Alva. Jag är en svensk röst.
Amelie fr_CA # Bonjour, je m’appelle Amelie. Je suis une voix canadienne.
Anna de_DE # Hallo, ich heiße Anna und ich bin eine deutsche Stimme.
Bad News en_US # The light you see at the end of the tunnel is the headlamp of a fast approaching train.
Bahh en_US # Do not pull the wool over my eyes.
Bells en_US # Time flies when you are having fun.
@waylonflinn
waylonflinn / install-python-data-science.sh
Last active December 4, 2016 05:27
Install Data Science and NLP libraries for python3 in a virtualenv (Numpy, Scipy, Matplotlib, Pandas, Gensim, OpenBLAS and PyTables)
#!/usr/bin/env bash
## create an ubuntu 14.04 hvm instance, then from your home directory:
# 1. download this script
# wget https://gist.githubusercontent.com/waylonflinn/506f563573600d944923/raw/install-python-data-science.sh
# 2. make it executable
# chmod a+x install-python-data-science.sh
@ngpestelos
ngpestelos / remove-docker-containers.md
Last active March 5, 2024 20:45
How to remove unused Docker containers and images

May 8, 2018

I wrote this four years ago, so instead use this command:

$ docker rmi $(docker images -q -f dangling=true)
@nschneid
nschneid / POSMappings.txt
Created September 7, 2013 15:50
Scripts for working with part-of-speech tagsets: describing the morphosyntactic attributes encoded by tags, and converting between different tagsets. Cf. https://gist.github.com/nschneid/4231292
# http://nlp.cs.nyu.edu/wiki/corpuswg/AnnotationCompatibilityReport
# Table 1: Part of Speech Compatibility
# (Initial Version from Manning and Schutz 1998, pp. 141-142)
# Extended to cover Claws1 and ICE
# cf. http://www.scs.leeds.ac.uk/ccalas/tagsets/brown.html
# Nathan Schneider, 2011-02-19:
# * Fixed some errors in brown column, e.g.: DT1 => DTI, PP0 => PPO, NRS => NPS
# * Added last column (Twitter tagset) and several special tags at the end
Category Examples Claws c5, Claws1 Brown PTB ICE Twitter
Adjective happy, bad AJ0 JJ JJ ADJ.ge A
@ianozsvald
ianozsvald / alchemy_call_limit.py
Created January 5, 2013 23:12
Call the AlchemyAPI's GetAPIKeyInfo end point to ask how many API calls we have left today
"""Query AlchemyAPI to determine number of API calls still available"""
# -*- coding: utf-8 -*-
import json
import requests
def get_api_key():
# Load API key (40 HEX character key) from local file
key = open('api_key.txt').readline().strip()
return key
@banaslee
banaslee / XGH - en.txt
Last active April 26, 2024 16:52
eXtreme Go-Horse Process
eXtreme Go Horse (XGH) Process
Source: http://gohorseprocess.wordpress.com
1. I think therefore it's not XGH.
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster.
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster.
XGH is faster than any development process you know (see Axiom 14).
@thbkrkr
thbkrkr / Default (Linux).sublime-keymap
Last active August 31, 2022 03:54
Custom & Eclipse shortcuts key bindings (keyboard mapping) for Sublime Text 2 and 3
[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+à"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+!"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
@jamiew
jamiew / google_twunter_lol
Created July 28, 2011 20:34
All the dirty words from Google's "what do you love" project: http://www.wdyl.com/
easterEgg.BadWorder.list={
"4r5e":1,
"5h1t":1,
"5hit":1,
a55:1,
anal:1,
anus:1,
ar5e:1,
arrse:1,
arse:1,
@bellbind
bellbind / genetic.py
Created December 15, 2010 10:46
[python]Genetic Algorithm example
"""Genetic Algorithmn Implementation
see:
http://www.obitko.com/tutorials/genetic-algorithms/ga-basic-description.php
"""
import random
class GeneticAlgorithm(object):
def __init__(self, genetics):
self.genetics = genetics
pass