Skip to content

Instantly share code, notes, and snippets.

let screen = 0
let img;
let sizeVar = 50
let sizeChange = 1
let myFont;
let votes1 = 0
let votes2 = 0
let betbutton;
let missionbutton;
let screen = 0
let img;
let sizeVar = 50
let sizeChange = 1
let myFont;
let votes1 = 0
let votes2 = 0
let betbutton;
let missionbutton;
import time
import board
import neopixel
pixel_pin = board.D2 #the ring data is connected to this pin
num_pixels = 16 #number of leds pixels on the ring
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.3, auto_write=False)
RED = (255, 0, 0) #RGB
import time
import board
import neopixel
pixel_pin = board.D2 #the ring data is connected to this pin
num_pixels = 16 #number of leds pixels on the ring
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.3, auto_write=False)
let socket;
let plane1, plane2;
function setup() {
createCanvas(400, 400);
// Connect to server
socket = io.connect('http://localhost:3000');
// Listen for plane position updates
var express = require ('express');
const PORT = process.env.PORT || 3000;
var app = express();
var server = app.listen(PORT, () => console.log(`Listening on ${PORT}`));
app.use(express.static('public'));
console.log("my socket server is running");
const axios = require('axios');
const cheerio = require('cheerio');
const fs = require('fs');
const url = 'https://www.lwhs.org/athletics/calendar-results';
// Function to fetch and scrape the website
async function scrapeData() {
try {
// Fetching HTML from the URL
//google login process variables
let signInButton, logoutButton, commentInput, saveCommentButton;
let userName = "";
// Variables to manage button positions and sizes dynamically -- adapted from AJ's original buttons
let buttonX1, buttonX2, buttonX3, buttonY, buttonW, buttonH;
// Variables for dynamic layout in the favorite teams display -- adapted from Andy's original buttons
//google login process variables
let signInButton, logoutButton, commentInput, saveCommentButton;
let userName = "";
// Variables to manage button positions and sizes dynamically -- adapted from AJ's original buttons
let buttonX1, buttonX2, buttonX3, buttonY, buttonW, buttonH;
// Variables for dynamic layout in the favorite teams display -- adapted from Andy's original buttons
<!DOCTYPE html>
<html>
<head>
<script src="https://www.gstatic.com/firebasejs/8.0.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.0.0/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.0.0/firebase-database.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/addons/p5.sound.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jsqr/dist/jsQR.js"></script>
<script>