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
# update brew because `brew update` is broken after updating to El Capitan | |
cd `brew --prefix` | |
git fetch origin | |
git reset --hard origin/master | |
sudo shutdown -r now # restart the computer | |
# open terminal and run the following | |
brew update | |
brew cleanup |
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
import re | |
import json | |
import requests | |
from pprint import pformat | |
from time import sleep | |
from gpiozero import Energenie | |
lamp = Energenie(1) | |
QUERY_URL='https://www.govtrack.us/api/v2/role?current=true&role_type=president' |
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
from pptx import Presentation | |
# for adding shapes | |
from pptx.util import Inches | |
from pptx.enum.shapes import MSO_AUTO_SHAPE_TYPE | |
prs = Presentation() |
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
import socket | |
import fcntl | |
from ioctl_helper import _IOW, _IOR | |
import struct | |
import array | |
from subprocess import call | |
from time import sleep | |
from os import popen | |
# --------------------------------------------------- |
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
import socket | |
import fcntl | |
import struct | |
import array | |
# --------------------------------------------------- | |
# HCI Constants (https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/lib/hci.h) | |
# HCI ioctl Commands: |
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
from inputs import devices, get_gamepad | |
print(devices.gamepads) | |
print(get_gamepad()) # the script will pause here until a joystick or button is pressed on the Gamepad |
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
<!doctype html> | |
<html lang="en"> | |
<!-- | |
Pre-requisites: | |
Raspberry Pi 2 or 3: https://www.raspberrypi.org/ | |
Raspberry Pi setup: TODO: Pi project will appear under https://github.com/TheBubbleWorks |
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 | |
# | |
# Description: Low level example of sending BLE messages to a MeArm Brain Board fitted with the HM-11 Bluetooth LE module | |
# | |
# 17/02/2016 Wayne Keenan ([email protected]) | |
# | |
# Deps: | |
# 1) MeArm should have the MeArm_BLE sketch programmed, found here: https://codebender.cc/sketch:244546 | |
# 2) Adafruit Python BLE libray (see below) | |
# |
NewerOlder