Skip to content

Instantly share code, notes, and snippets.

View hugovk's full-sized avatar

Hugo van Kemenade hugovk

View GitHub Profile
@hugovk
hugovk / define.py
Last active December 10, 2015 18:58 — forked from luisnaranjo733/define.py
#!/usr/bin/env python
'''
I frequently look up word meanings online.
It's kind of a hassle to fire up the browser, and search online after a while.
It's a lot easier for me to do it from the command line, when my terminal is one keyboard shortcut away.
I wrote this script using the wordnik api that does just that.
I suggest you put this somewhere in your PATH, make it executable.
Make sure you get a Wornik API key at http://developer.wordnik.com/
@hugovk
hugovk / Snowball
Last active December 16, 2015 20:48 — forked from nossidge/Snowball
Python version of nossidge's C++ from https://gist.github.com/nossidge/5272238
#!/usr/bin/env python
"""
Python version of nossidge's C++ from https://gist.github.com/nossidge/5272238
Original blurb:
~~ Snowball Poem ~~
Snowball (also called a Chaterism): A poem in which each line is a single word,
and each successive word is one letter longer. One of the constrained writing
techniques invented by the Oulipo (Workshop of Potential Literature).
@hugovk
hugovk / twitter_archiver.py
Created May 11, 2016 07:06 — forked from jehiah/twitter_archiver.py
python script to archive your tweets
#!/usr/bin/env python
"""
twitter_archiver.py written by Jehiah Czebotar 2010 <jehiah@gmail.com> http://jehiah.cz/
this uses the great 'python twitter tools' library by Mike Verdone
http://mike.verdone.ca/twitter/
usage:
$ pip install twitter
@hugovk
hugovk / StartPoll.py
Created June 9, 2016 06:48
Twitterの投票機能 投票を発行(対策された?, あとで修正します)
def StartPoll():
from requests_oauthlib import OAuth1Session
#端末向けの公式アプリ系のCK/CSじゃないとダメ(デフォルトでTwitter for iPhone)
CK = 'IQKbtAYlXLripLGPWd0HUA'
CS = 'GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU'
AT = ''
AS = ''
auth = OAuth1Session(CK, CS, AT, AS)
@hugovk
hugovk / py_finder.py
Last active February 28, 2020 17:56 — forked from aaltat/py_finder.py
Find files which are not Python 3 compatible
import argparse
import subprocess
import sys
from pathlib import Path
def find_files(src_root: Path, python3: Path):
not_py3_compatible = []
for file in src_root.rglob('*.py'):