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 bs4 import BeautifulSoup | |
import requests | |
import re | |
import urllib2 | |
import os | |
import argparse | |
import sys | |
import json | |
# adapted from http://stackoverflow.com/questions/20716842/python-download-images-from-google-image-search |
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 | |
# -*- coding:utf-8 -*- | |
# extract YouTube videoids from html | |
import re | |
import json | |
import urllib2 | |
from BeautifulSoup import BeautifulSoup | |
def get_videoids(url): |
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/python3 | |
""" | |
Export your Windows Bluetooth LE keys into Linux! (arch edition) | |
Thanks to: http://console.systems/2014/09/how-to-pair-low-energy-le-bluetooth.html | |
discussed here: https://unix.stackexchange.com/questions/402488/dual-boot-bluetooth-device-pairing | |
Usage: | |
$ ./export-ble-infos.py <args> | |
$ sudo bash -c 'cp -r ./bluetooth /var/lib' |
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
/* | |
* tiny_IRremote | |
* Version 0.2 July, 2016 | |
* Christian D'Abrera | |
* Fixed what was originally rather broken code from http://www.gammon.com.au/Arduino/ | |
* ...itself based on work by Ken Shirriff. | |
* | |
* This code was tested for both sending and receiving IR on an ATtiny85 DIP-8 chip. | |
* IMPORTANT: IRsend only works from PB4 ("pin 4" according to Arduino). You will need to | |
* determine which physical pin this corresponds to for your chip, and connect your transmitter |
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 | |
import urllib2,json | |
CHANNEL_ID=203342 | |
def main(): | |
conn = urllib2.urlopen("http://api.thingspeak.com/channels/%s/feeds/last.json" % (CHANNEL_ID)) | |
response = conn.read() | |
print "http status code=%s" % (conn.getcode()) | |
data=json.loads(response) |