Resulting output:
[`octocat/Hello-World #1053`](https://github.com/octocat/Hello-World/issues/1053)
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: deep-green; icon-glyph: sun; | |
const STATION_VIBORG = "49" | |
const STATION_CPH = "48" | |
const GRASS_ID = "28" | |
const PREVIEW_WIDGET = false | |
// Pass your station ID here. See the constants above. |
# circuitpython_disable_usb_boot.py | |
# Turn on/off certain USB features based on touching RX & TX pins | |
# Squeeze TX & RX pins with fingers to enable CIRCUITPY & REPL | |
# Otherwise, they are turned off | |
# CircuitPython 7.x only | |
# Rename this as "boot.py" in your CIRCUITPY drive on a QT PY | |
# @todbot 17 May 2021 | |
import time | |
import board |
import math | |
import board | |
from keybow2040 import Keybow2040, number_to_xy, hsv_to_rgb | |
import usb_cdc | |
# Some constants | |
FULLBRIGHT = 1 | |
MINBRIGHT = 0.05 | |
# Set up Keybow |
# Trinkey Theramin! | |
# 2021 @todbot | |
# | |
import time | |
import board | |
import neopixel | |
import touchio | |
import usb_midi | |
import adafruit_midi | |
from adafruit_midi.note_on import NoteOn |
# SPDX-FileCopyrightText: 2021 Sandy Macdonald | |
# | |
# SPDX-License-Identifier: MIT | |
# Adaptation from Sandy MacDonald Examples | |
# A simple example of how to set up a keymap and HID keyboard on Keybow 2040. | |
# You'll need to connect Keybow 2040 to a computer, as you would with a regular | |
# USB keyboard. | |
# Drop the keybow2040.py file into your `lib` folder on your `CIRCUITPY` drive. |
# Trinkey dance party | |
# 2021 @todbot | |
import time | |
import board | |
import neopixel | |
import random | |
leds = neopixel.NeoPixel(board.NEOPIXEL, 4, brightness=0.3, auto_write=False) | |
bpm = 130 | |
ms_per_beat = int(60e3 / bpm / 16) | |
i=0 |
import subprocess, sys | |
applescript=''' | |
tell application "System Events" | |
set processName to name of processes whose frontmost is true | |
do shell script "echo " & processName | |
end tell | |
''' | |
args = [item for x in [("-e",l.strip()) for l in applescript.split('\n') if l.strip() != ''] for item in x] | |
proc = subprocess.Popen(["osascript"] + args ,stdout=subprocess.PIPE ) | |
progname = proc.stdout.read().strip() |
const YOUTUBE_API = "https://youtube.googleapis.com/youtube/v3" | |
const API_KEY = "YOUR_KEY_HERE" | |
const channelIdArray = [ | |
"UCT6iAerLNE-0J1S_E97UAuQ", // YongYea | |
"UC9PBzalIcEQCsiIkq36PyUA", // Digital Foundry | |
"UCoTIpyf8_RGzJ1LPTmvadaA", // CENTRAL | |
"UCNvzD7Z-g64bPXxGzaQaa4g", // gameranx | |
"UCcGL_0yoZTskvlgAixaEjEg", // whatoplay | |
"UCawsJGDMV6IOm6z9yiOyIsQ", // Cronosfera | |
"UC-zfTtp6tir7yJIrpsgS0dA", // Intoxi Anime |
# Adapted from Sandy J Macdonald's gist at https://gist.github.com/sandyjmacdonald/b465377dc11a8c83a8c40d1c9b990a90 to configure all buttons and switch off all lights in loop | |
import time | |
import board | |
import busio | |
import usb_hid | |
from adafruit_bus_device.i2c_device import I2CDevice | |
import adafruit_dotstar |