Skip to content

Instantly share code, notes, and snippets.

@l1m2p3
l1m2p3 / dynamo_access.py
Last active July 31, 2018 10:04
functions for updating/accessing word vecs on DynamoDB (*updated to use spacy to find token. See https://spacy.io/usage/ for how to install spacy)
import boto3
import numpy
import pickle
import spacy
table_name = 'wordvec' # table name on DynamoDB
# batch size specified by DynamoDB. See DynamoDB's doc for more details
write_batch_size = 25
read_batch_size = 100
@johnlane
johnlane / dockbar-gtk2.py
Last active October 24, 2023 21:43
Example GTK to create a dock-like bar and strut
#!/usr/bin/env python2
#
# dockbar.py
#
# Example program places a coloured bar across the top of the
# current monitor
#
# demonstrates
#
# (a) creating the bar as an undecorated "dock" window
@sartak
sartak / a.md
Last active March 22, 2024 22:16
Anki 2 annotated schema
@domenic
domenic / README.md
Created March 29, 2012 16:01
Cross-platform git hooks for Node.js

Here's how this works:

  • Include a git_hooks/ directory in your project, with these two files (plus other hooks if you want, written in a similar style).
  • Add "npm" to your devDependencies in package.json, so that the pre-commit hook can do its magic.
  • Add test and lint scripts to your package.json, e.g.
    "scripts": {
        "test": "mocha",
 "lint": "jshint ./lib --show-non-errors"
@AnsonT
AnsonT / gist:1115264
Created July 30, 2011 06:32
CoffeeScript debugging with node-inspector
node-inspector &
coffee --nodejs --debug app.coffee &
google-chrome http://127.0.0.1:8080/debug?port=5858 &
google-chrome http://127.0.0.1:3000 &