I hereby claim:
- I am AnthonyBriggs on github.
- I am anthonybriggs (https://keybase.io/anthonybriggs) on keybase.
- I have a public key whose fingerprint is BFCD 1D56 F8B3 9AF8 F345 5407 CCD7 9551 5316 B736
To claim this, I am signing this object:
#!/usr/bin/python | |
import hashlib | |
""" | |
Python implementation of the lavarand n-way, sha-1, xor-rotate-and-fold | |
algorithm, aka. The Digital Blender (tm). | |
For details, see https://web.archive.org/web/20121015231322/http://www.lavarand.org/what/digital-blender.html |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# sudo apt-get install xmacro | |
# Run this in a window alongside your browser, | |
# then you have 2 seconds to quickly mouse over | |
sleep 2; | |
for (( ;; )) | |
do |
20 point stories:
"""Rough script to scrape pycodestyle.py and intro.rst for error codes and descriptions, then generate something .rst-ish""" | |
import collections | |
import re | |
import pycodestyle | |
ErrorCode = collections.namedtuple("ErrorCode", field_names=("code", "short_msg", "long_msg")) |
"""Script to mass-convert all the Python 2 files in a directory to Python 3.""" | |
import os | |
import sys | |
try: | |
target = sys.argv[1] | |
if target.endswith('"'): | |
target = target[:-1] |
"""Fancy turtle L-system thing | |
Messing around at lunchtime :) | |
Inspired by https://bitaesthetics.com/posts/fractal-generation-with-l-systems.html""" | |
# Maybe this runs under Python 2? Who knows? Not sure what the turtle | |
# changes between 2 and 3 are | |
from __future__ import print_function |
"""Write an Shakespeare!""" | |
### What are these words call'd that stands hard by? | |
try: | |
words = open('shakespeare.txt').read().split() | |
print(len(words), "total words in shakespeare.txt") | |
except FileNotFoundError: | |
print("No, hath not? Rosalind lacks, then, the shakespeare.txt") |
# Write your code here :-) | |
# Pygame -> pgzero joystick hackery :) | |
import pygame | |
import pgzero | |
pygame.joystick.init() | |
joysticks = [pygame.joystick.Joystick(x) for x in range(pygame.joystick.get_count())] | |
inited = [j.init() for j in joysticks] | |
print(joysticks) |
""" | |
Demo code for Mu/PygameZero using kenney.nl graphics. | |
There's a short video demo at https://www.youtube.com/watch?v=b2IPNCJtUL4. | |
NOTE: this relies on two patches to Mu which aren't yet in | |
the main PgZero repository, one which adds joystick | |
support, and another which adds a flip property to | |
the Actor class. | |
""" |