This file contains 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
#!/usr/bin/python | |
borders = ['bottom','bottom-left','bottom-right', | |
'left','right', | |
'title-1','title-2','title-3','title-4','title-5', | |
'top-left','top-right'] | |
basecolour = '#EEEEEE' |
This file contains 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
#!/usr/bin/env python | |
# Copyright 2014 Alistair Buxton <[email protected]> | |
# Build a database from the Code-Point Open postcode data and query it. | |
# Run ./postcode.py create to build the database from source files. | |
# Now with caching to speed up development. | |
import sqlite3 | |
import csv | |
import shelve |
This file contains 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
#!/usr/bin/env python | |
# BB-8 Python driver by Alistair Buxton <[email protected]> | |
from bluepy import btle | |
import time | |
class BB8(btle.DefaultDelegate): | |
def __init__(self, deviceAddress): |
This file contains 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
Required files: | |
Minecraft.jar | |
forge-1.7.10-10.13.4.1448-1.7.10-installer.jar | |
minecrift-1.7.10-R1c-installer.jar | |
Steps: | |
1. Run Minecraft launcher: java -jar Minecraft.jar | |
Edit the profile and select 1.7.10. Launch the game and then exit. |
This file contains 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
#!/usr/bin/env python | |
# Pipe the output of this script to raspi-teletext or any teletext emulator that | |
# supports t42 packet streams. | |
# | |
# ./teletextgame | ./teletext - | |
# | |
# Features: | |
# | |
# * 3D graphics. |
This file contains 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
#!/usr/bin/env python | |
#Connecting to: 08:7C:BE:8F:3C:FB, address type: public | |
#Service <uuid=Generic Attribute handleStart=12 handleEnd=15> : | |
# Characteristic <Service Changed>, hnd=0xd, supports READ INDICATE | |
# -> '\x01\x00\xff\xff' | |
#Service <uuid=Generic Access handleStart=1 handleEnd=11> : | |
# Characteristic <Device Name>, hnd=0x2, supports READ WRITE | |
# -> 'Quintic BLE' | |
# Characteristic <Appearance>, hnd=0x4, supports READ |
This file contains 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
#!/usr/bin/env python3 | |
import http.server | |
import socketserver | |
from itertools import product | |
from subprocess import check_call, check_output | |
channels = 'ABCD' | |
ids = '1234' |
This file contains 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
#!/usr/bin/env python | |
# Finds colour replacements for an LDraw file. | |
# Usage: | |
# colourswap.py <LDraw file> <colour> [<rarity>] | |
# colour: an LDraw colour number, eg yellow = 14 | |
# rarity: pieces must be in at least this many sets |
This file contains 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
# set up a python virtualenv: | |
virtualenv --system-site-packages -p python3 google-assistant-sdk | |
# enter the virtualenv: | |
source google-assistant-sdk/bin/activate | |
# install dependencies: | |
pip3 install google-assistant-sdk[auth_helpers]==0.1.0 grpc-google-cloud-speech-v1beta1==0.14.0 protobuf==3.1.0 | |
# the google code actually works out of the box on a default ubuntu install: |
This file contains 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
.SUFFIXES: .pov .png | |
FINAL_IMAGES=block-bg-all.png block-spec-all.png block-spec-ext.png block-mask-inverted.png | |
PREVIEW_IMAGES=block-preview-render.png | |
TEMP_IMAGES=block-mask-inverted.png | |
TS=128 | |
all: $(FINAL_IMAGES) preview | |
dist: $(FINAL_IMAGES) dist-clean |
OlderNewer