A how-to for a countdown clock.
A Pen by Matt Smith on CodePen.
A how-to for a countdown clock.
A Pen by Matt Smith on CodePen.
async function main(canvas) { | |
const ee31 = new EightyEightByThirtyOne(canvas, 32, 125); | |
const ctx = ee31.ctx; | |
const font = await Font.create(ctx, "./assets/spleen-8x16.png", 8, 16, 95, 1, " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"); | |
const magic = await Sprite.create(ctx, "./assets/magic.png", 27, 24, 4, 4); | |
await magic.mapColors(([r, g, b, a]) => { | |
if (r > 0) { | |
return [91, 206, 250, 255]; |
// ==UserScript== | |
// @name Campuswire-oops | |
// @version 0.1 | |
// @author Hampton Moore | |
// @match https://campuswire.com/* | |
// @grant none | |
// @run-at document-body | |
// ==/UserScript== | |
import logging | |
from datetime import datetime | |
from django.conf import settings | |
from django.utils import timezone | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.remote.webelement import WebElement | |
from selenium.webdriver.support.select import Select | |
from spire.models import ( |
local charged_certus_quartz = "ae2:charged_certus_quartz_crystal" | |
local regular_certus_quartz = "ae2:certus_quartz_crystal" | |
while true do | |
local charger = peripheral.find("ae2:charger") | |
if charger then | |
local item = charger.list()[0] | |
if item and item.name == charged_certus_quartz then | |
turtle.suck() | |
for slot = 1, 16 do |
The information that follows represents knowledge that I wish I had when first contributing to the project. Keep in mind that this guide may not be applicable to your environment, and it should not be considered a comprehensive tutorial for the dev-env installation, nor a walkthrough. While many of these issues and fixes might seem obvious, when beginning contributions to a new project there is a lot of new information to absorb and systems to figure out, I figure the easier some steps are the better.
If your Python environment resembles mine, it likely contains a myriad of randomly installed packages, with multiple Python versions and environments set up. In this context, I found pipenv to be the most straightforward tool. A simple pipenv install --python 3.11
command sets up the required Python environment in the AVD folder, followed by pipenv shell
. After this, I configured VSCode to use the Python enviro
<header> | |
<h1><img src="https://spire.umass.edu/heproda/images/wordmark.svg" style="height:0.8em"> Cal Converter - Fall 2022</h1> | |
</header> | |
<div> | |
<p>Please manually verify the output of this POS POC. It only works (probably, no promises) if you're currently on a device in the EDT (once we shift to EST it'll probably break) timezone. In addition it only works for the Fall 2022 session of classes at UMass Amherst. You can get your class calendar file at <a href="https://www.umass.edu/it/support/spire/download-your-class-and-final-exam-schedules#Download%20Your%20Class%20Schedule">https://www.umass.edu/it/support/spire/download-your-class-and-final-exam-schedules#Download%20Your%20Class%20Schedule</a>. The only issue is that one skips holidays and breaks, doesn't swap days with swapped classes, and ignores the last day of classes.</p> | |
<input type="file" onchange="readText(event)"> | |
<p>Site made by <a href="https://hamptonmoore.com">Hampton Moore</a> | This site is not made, maintained, or approved of by |
let replicate | |
: forall (a : Type) . Natural -> a -> List a | |
= \n -> \x -> Natural/fold n (\xs -> [ x ] + xs) [] | |
let generate | |
: forall (a : Type) . Natural -> (Natural -> a) -> List a | |
= \n -> \f -> List/map (\x -> f x.index) (List/indexed (replicate n { })) | |
let data = [{"Name": "John Doe", "Grade": 95 }, {"Name": "Mary Jane", "Grade": 98 }, {"Name": "Alice Templeton", "Grade": 90 }] | |
let sum = List/fold { cons: \x y -> x + y : Natural, nil: 0 } | |
let len = \d -> List/length d | |
let introduce = \person -> "Hello, "+person."Name" + " how are you doing, you got a " | |
let replicate | |
: forall (a : Type) . Natural -> a -> List a | |
= \n -> \x -> Natural/fold n (\xs -> [ x ] + xs) [] | |
from pybricks.pupdevices import Remote, Motor | |
from pybricks.parameters import Port, Button, Direction, Icon | |
from pybricks.robotics import DriveBase | |
from pybricks.hubs import PrimeHub | |
from pybricks.tools import wait | |
hub = PrimeHub() | |
# Connect to the remote. | |
my_remote = Remote(timeout=None) |