Skip to content

Instantly share code, notes, and snippets.

@5shekel
5shekel / scrapeImages.py
Created June 9, 2023 16:07 — forked from genekogan/scrapeImages.py
scraping full size images from Google Images
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
@5shekel
5shekel / extract_youtube_videoid.py
Created February 23, 2019 11:45 — forked from satomacoto/extract_youtube_videoid.py
Extract youtube video id from html
#!/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):
@5shekel
5shekel / export-ble-infos.py
Last active July 28, 2024 14:35 — forked from Mygod/export-ble-infos.py
Export your Windows Bluetooth LE keys into Linux!
#!/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'
@5shekel
5shekel / tiny_IRremote.cpp
Created March 1, 2018 11:08 — forked from SeeJayDee/tiny_IRremote.cpp
tiny_IRremote - Arduino IRremote ported to the ATtiny
/*
* 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
@5shekel
5shekel / read_thingspeak.py
Last active January 19, 2018 20:53 — forked from rw950431/read_thingspeak.py
Read last update from thingspeak
#!/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)