View webcam_aruco_capture.py
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 cv2.aruco as aruco | |
markerSize = 4 | |
totalMarkers=100 | |
key = getattr(aruco, f'DICT_{markerSize}X{markerSize}_{totalMarkers}') | |
arucoDict = aruco.Dictionary_get(key) | |
def findArucoMarkers(img, draw=True): |
View dither.py
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 PIL import ImageOps | |
from PIL import Image | |
import numpy as np | |
import pylab as pl | |
import sys | |
usage = '''USAGE: | |
python dither.py <input_image_fn> [dim] | |
''' | |
if len(sys.argv) < 2: |
View LightEasel.ino
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
#include "FastLED.h" | |
FASTLED_USING_NAMESPACE | |
// FastLED "100-lines-of-code" demo reel, showing just a few | |
// of the kinds of animation patterns you can quickly and easily | |
// compose using FastLED. | |
// | |
// This example also shows one easy way to define multiple | |
// animations patterns and have them automatically rotate. |
View GravitationalAcceleration
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 pylab import * | |
from numpy import * | |
Me = 5.98E+24 # KG | |
G = 6.67E-11 # KG^2/(MS^2) | |
Re = 6378137 # M | |
Rp = 6356752 # M | |
DEG = pi/180 | |
lat = arange(-90, 91, 1) * DEG |
View COVID19 Timeseries Plot
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
''' | |
Download data from github: https://github.com/CSSEGISandData/COVID-19 | |
Place this file in | |
COVID-19/csse_covid_19_data/csse_covid_19_time_series/plotme.py | |
REQUIRES: | |
matplotlib | |
numpy | |
pillow |
View LongPress.py
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
#### USAGE! Attach to self.image (not self.root) that way button clicks do not count as long presses. | |
#### otherwise the button call backs hang long enough to trigger the long press | |
## self.longpress_obj = LongPressDetector(self.image, long_press_cb) | |
class LongPressDetector: | |
"""Helper class that calls a callback after a long press/click""" | |
# call_back will get the long_click duration as parameter | |
def __init__(self, root, call_back, long_press_duration = 1000 ): | |
"""Creates the LongPressDetector |
View gphoto_upload.py
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
### downloaded from web. Contact me if you developed this and would like attribution. wyojustin | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from google.auth.transport.requests import AuthorizedSession | |
from google.oauth2.credentials import Credentials | |
import json | |
import os.path | |
import argparse | |
import logging | |
def parse_args(arg_input=None): |
View ClockIOT.ino
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
#include <Time.h> | |
#include <Wire.h> | |
#include <WiFiManager.h> | |
#include <FastLED.h> | |
#include <PubSubClient.h> | |
#include <EEPROM.h> | |
#include <EEPROMAnything.h> | |
#include <NTPClient.h> | |
#include <WebSocketsServer.h> |
NewerOlder