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 time | |
import base64 | |
import pathlib | |
import re | |
import itertools | |
import io | |
from loguru import logger | |
from codelab_adapter_client import AdapterNode | |
from codelab_adapter_client.utils import get_or_create_node_logger_dir, open_path_in_system_file_manager, install_requirement |
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
server { | |
listen 80; listen [::]:80; | |
server_name forums.codelab.club; # <-- change this | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl http2; listen [::]:443 ssl http2; | |
server_name forums.codelab.club; # <-- change this |
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
// ==UserScript== | |
// @name Teachablemachine Result | |
// @namespace http://tampermonkey.net/ | |
// @version 0.5 | |
// @description try to take over the world! | |
// @author You | |
// @match *://teachablemachine.withgoogle.com/* | |
// @grant none | |
// @require https://cdn.jsdelivr.net/npm/[email protected]/dist/socket.io.slim.js | |
// @run-at document-end |
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
# python3 mycertsdog.py . | |
import logging | |
import sys | |
import time | |
import subprocess | |
from watchdog.events import FileSystemEventHandler | |
from watchdog.observers import Observer | |
logging.basicConfig(level=logging.DEBUG) |
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
# pip3 install sh codelab_adpater_client | |
for line in sh.codelab_message_monitor(_iter=True): | |
print(line) |
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
""" | |
explore2.py: Script to explore the OSCON schedule feed | |
>>> from osconfeed import load | |
>>> raw_feed = load() | |
>>> feed = FrozenJSON(raw_feed) | |
>>> len(feed.Schedule.speakers) | |
357 | |
>>> sorted(feed.Schedule.keys()) | |
['conferences', 'events', 'speakers', 'venues'] |
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
git log --shortstat --author "wwj718" --since "3 day ago" \ | |
| grep "files\? changed" \ | |
| awk '{files+=$1; inserted+=$4; deleted+=$6} END \ | |
{print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}' |
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 time | |
from imutils.video import VideoStream | |
import imagezmq | |
sender = imagezmq.ImageSender(connect_to='tcp://wwj-macbook.local:5555') | |
rpi_name = socket.gethostname() # send RPi hostname with each image | |
picam = VideoStream(usePiCamera=True).start() | |
time.sleep(2.0) # allow camera sensor to warm up |
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 cv2 | |
import sys | |
import imagezmq | |
image_hub = imagezmq.ImageHub() | |
while True: # show streamed images until Ctrl-C | |
rpi_name, image = image_hub.recv_image() | |
cv2.imshow(rpi_name, image) # 1 window for each RPi | |
k = cv2.waitKey(1) | |
# k = cv2.waitKey(0) | |
if k == ord('t'): |
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
"block" | |
a := [ :x :y | [ :z| x+y+z] ]. | |
b := a value:1 value:2. | |
b value: 3 |
NewerOlder