Skip to content

Instantly share code, notes, and snippets.

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>
let signInButton, logoutButton, commentInput, saveCommentButton;
let userName = "";
let comments = []; // Array to store comments fetched from Firebase
let font;
let video;
let canvas;
let context;
const targetQRCode = "https://idemia-mobile-id.com/testqr-success"; // The specific QR code content to react to
<!DOCTYPE html>
<html lang="en">
<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://www.gstatic.com/firebasejs/8.0.0/firebase-storage.js"></script>
<script>
// Initialize Firebase
let searchInput, searchResults;
let data;
let click;
let bar;
let GalleryButton;
let numRows = 2; // Initial number of rows
let numCols = 7;
let boxSize = 50;
let rectangles = [];