Skip to content

Instantly share code, notes, and snippets.

View hugovk's full-sized avatar

Hugo van Kemenade hugovk

View GitHub Profile
@hugovk
hugovk / 1000.md
Created May 4, 2023 13:30
Output of `pypinfo --days 7 --limit 1000 numpy version file system`

Served from cache: False Data processed: 3.71 GiB Data billed: 3.71 GiB Estimated cost: $0.02

version file system_name download_count
1.21.6 numpy-1.21.6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl Linux 5,544,509
1.24.3 numpy-1.24.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Linux 3,530,114
1.24.3 numpy-1.24.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Linux 2,459,540
@hugovk
hugovk / stives.py
Last active November 28, 2020 22:07
NaNoGenMo 2020: St. Ives
import json
import textwrap
import inflect # python3 -m pip install inflect
def intro():
print(
"""As I was going to St. Ives,
I met a man with seven wives,
@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'):
import sys
A_LOWERCASE = ord("a")
ALPHABET_SIZE = 26
def _decompose(number):
"""Generate digits from `number` in base alphabet, least significants bits first.
@hugovk
hugovk / nnngm.sh
Created November 21, 2019 21:59
#NNNGM: Another 50,000 Meows: better version
p -c 'import random as r;print(" meow".join([r.choice(",:;.?!") for _ in range(9**5)])[2:])'
@hugovk
hugovk / nnngm.sh
Created November 21, 2019 21:57
#NNNGM: Another 50,000 Meows: basic version
p -c 'print("meow "*9**5)'
@hugovk
hugovk / whatfreshhell.json
Created November 21, 2016 13:30
1. Create a new Twitter bot account 2. Sign in to http://cheapbotsdonequick.com 3. Paste this code in there and away you go! (re: https://twitter.com/Fritinancy/status/800489538254606336)
{
"note:": ["Different number of spaces, to avoid duplicated tweets"],
"origin": [
"What#space#Fresh#space#Hell?"
],
"space": [
" ",
" ",
@hugovk
hugovk / dunebot.json
Created October 6, 2016 08:41
"WLTS a bot like @PotterPapers but for Dune novels." https://twitter.com/Marktech/status/783766409142820864
{
"origin" : [
"#firstNames# of Dune",
"#personalNouns.capitalize.s# of Dune",
"#adjs.capitalize# #venues.capitalize# of Dune"
],
"firstNames" : [
"Aaliyah",
"Aaron",
"Abby",
@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 / 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