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 fs | |
const fs = require('fs').promises; | |
//this opens a file called app.json, parses it as json, changes a value, and then saves it. | |
//put this in an async function | |
const increment = async () => { | |
//first open the file | |
const appJson = await fs.readFile('app.json', 'utf8'); |
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 bs4 import BeautifulSoup | |
import urllib | |
import parse | |
req = urllib.urlopen("https://www.youtube.com/channel/UCPWXiRWZ29zrxPFIQT7eHSA/videos") | |
data = req.read() | |
vIDs = [] | |
soup = BeautifulSoup(data, "html.parser") | |
for link in soup.find_all("a", class_="yt-uix-sessionlink yt-uix-tile-link spf-link yt-ui-ellipsis yt-ui-ellipsis-2"): |
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 <SoftwareSerial.h> | |
#define ARDUINO_RX 5//should connect to TX of the Serial MP3 Player module | |
#define ARDUINO_TX 6//connect to RX of the module | |
SoftwareSerial mySerial(ARDUINO_RX, ARDUINO_TX); | |
static int8_t Send_buf[8] = {0} ; | |
const int buttonPin = 2; | |
int buttonState = 0; | |
int buttonStateOld = 0; | |
#define CMD_SEL_DEV 0X09 | |
#define DEV_TF 0X02 |
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
#define Servo1In 2 | |
#define Servo2In 3 | |
unsigned long lastServo1 = 0; | |
unsigned long Servo1Time = 0; | |
unsigned long lastServo2 = 0; | |
unsigned long Servo2Time = 0; | |
unsigned long longestTime = 0; | |
unsigned long shortestTime = 0-1; |
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
#!/usr/bin/env python | |
import socket | |
import struct | |
import time | |
import random | |
ip = "10.0.1.255" | |
pixel_channels_start = 0 | |
pixel_channels_end = 15 |