Webcam parts:
- Raspberry Pi 4
- Raspberry Pi High Quality Camera (12.3-megapixel)
- Raspbian Buster Lite 2021-01-11
Webcam works with:
- Windows 10
- Windows 10 "Camera" app
- Google Hangouts via Chrome
@echo off | |
SET st3Path=c:\Program Files\Sublime Text 3\sublime_text.exe | |
rem add it for folders | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f | |
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f | |
pause |
#!/usr/bin/env python3 | |
import sys | |
import http.server | |
from urllib.parse import urlparse | |
import praw | |
import time | |
""" | |
https://github.com/reddit/reddit/wiki/API | |
http://praw.readthedocs.io/en/latest/getting_started/authentication.html |
import requests | |
import lxml.html | |
t = requests.get("https://www.hearthpwn.com/news/5425-final-witchwood-card-reveal-stream-live-updates").text | |
html = lxml.html.fromstring(t) | |
links = html.xpath("//span/span[@class='pretty-bg']/a") | |
for link in links: | |
print(link.get("href")) |
import random | |
import warnings | |
def __prime_factors(n): | |
""" | |
https://stackoverflow.com/a/412942/6078370 | |
Returns all the prime factors of a positive integer | |
""" | |
factors = [] | |
d = 2 |
import base64 | |
from http.server import HTTPServer | |
from http.server import SimpleHTTPRequestHandler | |
import socket | |
key = base64.b64encode(b"user:password") | |
class HTTPServerV6(HTTPServer): | |
address_family = socket.AF_INET6 |
can't uninstall, only deactivate | |
find | |
c:\Windows\System32\DriverStore\FileRepository\nv_dispi.inf_amd64_d223212c0a2275b5\NvCamera\ | |
in admin cmd: | |
NvCameraEnable.exe off |
import csv | |
import requests | |
import glob | |
# Quick and dirty script to convert a CSV file of album names to a Spotify playlist | |
SEARCH = "https://api.spotify.com/v1/search" | |
ALBUMS = "https://api.spotify.com/v1/albums" | |
AUTH = "Bearer xxxxxxxx" # Fill in with OAUTH token | |
PLAYLIST = "https://api.spotify.com/v1/users/xxxx/playlists/xxxxxxxx/tracks" # fill in |
// open playlist or album | |
// paste this into the console in dev tools (F12) of browser: | |
var seenSongs = {}; | |
var seenSongTitles = {}; | |
var playlistTable = document.querySelectorAll('.song-table tbody')[0]; | |
function printSongs() { | |
let playlist = playlistTable.querySelectorAll('tr.song-row'); | |
for(let i = 0; i < playlist.length; i++) { | |
let l = playlist[i]; |