This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while True: | |
for infile in glob.glob("pride/*.png"): | |
im = Image.open(infile) | |
pixel_grid = list(im.getdata()) | |
for channel in range(8): | |
pixels = pixel_grid[channel:-1:8] | |
for num, pixel in enumerate(pixels): | |
pixel = darken_color(pixel[0], pixel[1], pixel[2], factor=0.3) | |
set_pixel(mote_hosts, channel + 1, num, pixel[0], pixel[1], pixel[2]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic send | |
response = client.send_message({'from':NEXMO, 'to':ME, 'text':'Merry Christmas'}) | |
response['messages'][0]['status'] | |
# Send as my dad | |
response = client.send_message({'from':os.environ['DADS_NUMBER'], 'to':ME, 'text':'I\'m proud of you'}) | |
response['messages'][0]['status'] | |
# Send as Python Glasgow | |
response = client.send_message({'from':'PyGlasgow', 'to':ME, 'text':'Hello!'}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import click | |
import nexmo | |
import string | |
@click.command() | |
@click.argument( | |
"font", | |
type=click.Choice( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"action": "talk", | |
"voiceName": "Brian", | |
"text": "May the fourth be with you!" | |
}] |
I hereby claim:
- I am aaronbassett on github.
- I am aaronbassett (https://keybase.io/aaronbassett) on keybase.
- I have a public key ASAHOgsumPlM3Ffu7yfeFqfkHJWZyA5x_5mEDVfAMjcGiwo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# !important | |
# Native | |
# Django | |
from django.db import models | |
from django.conf import settings | |
# 3rd Party | |
from model_utils.models import TimeStampedModel | |
from autoslug import AutoSlugField |
I hereby claim:
- I am aaronbassett on github.
- I am aaronbassett (https://keybase.io/aaronbassett) on keybase.
- I have a public key whose fingerprint is F804 D17C 6396 487D FF5D EF9C F2D0 7E56 518A E6C3
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is untested but you get the basic idea | |
# Why? Cause fuck dependencies that's why ;) | |
if [[ $# -lt 1 ]]; then | |
echo "Usage: $0 INFILE" | |
exit 1 | |
fi |