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
PShape globe; | |
float w,h,eyeZ; | |
void setup() { | |
fullScreen(P3D); | |
w = width; | |
h = height; | |
eyeZ = 1460; // = h/2 + offset | |
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
# ik heb twee CSV's met de volgende headers: | |
# | |
# 1) org_row,filename,straatnaam,afbeelding,oude straatnaam | |
# 2) "uuid","name","width","height","link" | |
# Ik wil graag een nieuwe CSV met de onderstaande velden waarbij de sleutelkolommen 'filename' en 'name' gebruikt kunnen worden om te matchen | |
# 2) "uuid","name","width","height","link","straatnaam" | |
# | |
# response from ChatGPT 3.5. In 1x goed! |
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 python3 | |
import shutil,os,cv2,sys,glob | |
from tqdm import tqdm | |
from PIL import Image | |
from pathlib import Path | |
from joblib import Parallel, delayed | |
crop_width = 200 | |
crop_height = 100 | |
output_scale = .33 |
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 mysql.connector, json | |
def get_column_names(db_name, table_name): | |
query = f"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '{db_name}' AND TABLE_NAME = '{table_name}'" | |
cursor.execute(query) | |
return [row["COLUMN_NAME"] for row in cursor] | |
db_name = 'your_db' | |
db_user = 'root' | |
db_pass = '' |
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
ZoomWindow win1, win2; | |
void setup() { | |
size(100, 100); | |
win1 = new ZoomWindow(dataPath("saenredam.jpg"), 0, 0, displayWidth/2, displayHeight); | |
win2 = new ZoomWindow(dataPath("zadelstraat.jpg"), displayWidth/2, 0, displayWidth/2, displayHeight); | |
} | |
void draw() { | |
} |
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 org.processing.wiki.triangulate.*; | |
PShape globe, sphere; | |
void settings() { | |
fullScreen(P3D); | |
} | |
void setup() { | |
surface.setSize(1200, 1200); |
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
PShader shader; | |
PImage colormap, heightmap, palette; | |
PShape shape; | |
void setup() { | |
size(1169, 1169, P3D); | |
shader = loadShader("watermars.glsl"); | |
colormap = loadImage("mars-2k-noaa.jpg"); | |
heightmap = loadImage("mars-4k-bump.png"); | |
palette = loadImage("water.png"); |
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
PShader shader; | |
PImage colormap, normalmap; | |
PShape shape; | |
void setup() { | |
size(1169, 1169, P3D); | |
shader = loadShader("frag-shader.glsl", "vert-shader.glsl"); | |
colormap = loadImage("colormaps/mercury.jpg"); | |
normalmap = loadImage("normalmaps/mercury.jpg"); |
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
# pip install scikit-learn | |
import numpy as np | |
from sklearn import metrics | |
from sklearn.cluster import DBSCAN | |
import matplotlib.pyplot as plt | |
from sklearn.datasets import make_blobs | |
from sklearn.preprocessing import StandardScaler | |
centers = [[1, 1], [-1, -1], [1, -1], [-1,1]] #* (640,480) |
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 cv2 | |
import numpy as np | |
from Tracker import Tracker | |
from TouchEvents import TouchEvents | |
from pythonosc import udp_client as osc | |
from scipy.signal import convolve2d | |
w,h=640,480 | |
mouseX, mouseY = 0,0 | |
exposure=-8 |