Skip to content

Instantly share code, notes, and snippets.

@yz3440
yz3440 / ada_scraper.py
Last active March 31, 2020 05:03
ada artpiece url scraper
from requests_html import HTMLSession
session = HTMLSession()
domain = 'https://www.digitalartarchive.at'
url = 'https://www.digitalartarchive.at/database/database-info/archive.html?tx_kesearch_pi1%5Bpage%5D='
for i in range(1, 3):
i = str(i)
@yz3440
yz3440 / MosaicFace3D.pde
Created November 7, 2018 04:41
FaceOSC and Generative Pattern
import oscP5.*;
OscP5 oscP5;
int found;
float mouthHeight;
float rotateX, rotateY, rotateZ;
float eyeL, eyeR;
boolean paused = false;
boolean frameTaken = false;
int x = 0;
@yz3440
yz3440 / Gui.pde
Created September 30, 2018 22:14
Sensors, Body, Motion Midterm Progress #0
import controlP5.*;
import java.util.*;
ControlP5 cp5;
boolean guiToggle;
int resolution = 400; //intermediate value for convinience and future conversions
float cropFactor = 1; //zoom in the face that OpenCV returns
@yz3440
yz3440 / SBM_Assignment1_Candle.ino
Last active September 9, 2018 17:17
Assignment #1 for Sensors, Body, and Motion Fall 2018
const int audioPins[] = {A0, A1}; //analog in pins for mics
const int analogOutPins[] = {3, 5}; //analog out pins for leds
int audioValues[] = {512, 512}; //microphone input
int currentOutValues[] = {255, 255}; //led output
int currentDifferences[] = {0, 0}; //audio difference from the default balance
int prevDifferences[] = {0, 0}; //difference from the previous moment for NR
const int bottomThreshold = 5; //to what value the led is considered turned off
boolean offs[] = {false, false}; //if one led is blown off
@yz3440
yz3440 / Ball.pde
Last active February 11, 2018 05:39
Kinetic Interfaces Assignment 2: Buttons and the Mouse Acceleration
class Ball {
PVector position, velocity;
float size;
color col;
int state, collisionCount, collisionMax;
float velocityAdjustment = 1;
float maxspeed = 5;
//constructor with a random velocity