This file contains hidden or 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
# Fitting Google's "Turbo" Palette with a Cosine Approximation | |
# https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html | |
# Inspired by: https://observablehq.com/@mbostock/turbo | |
# Compare: https://i.imgur.com/5GW6Se2.png | |
# First import the usual suspects | |
import numpy as np | |
from scipy.optimize import curve_fit | |
import matplotlib.pyplot as plt |
This file contains hidden or 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 numpy as np | |
import cv2 | |
import face_alignment | |
# Initialize the chip resolution | |
chipSize = 300 | |
chipCorners = np.float32([[0,0], | |
[chipSize,0], | |
[0,chipSize], | |
[chipSize,chipSize]]) |
This file contains hidden or 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 numpy as np | |
import cv2 | |
import face_alignment | |
# Initialize the face alignment tracker | |
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, flip_input=True, device="cuda") | |
# Start the webcam capture, exit with 'q' | |
cap = cv2.VideoCapture(0) | |
while(not (cv2.waitKey(1) & 0xFF == ord('q'))): |
This file contains hidden or 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
// Run at http://sketch.paperjs.org | |
function graphData(data){ | |
// Define the colors of the different species | |
let colors = { | |
'setosa': '#7fc97f', | |
'versicolor':'#beaed4', | |
'virginica':'#fdc086' | |
} | |
// Graph each datum |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Collections.Concurrent; | |
using UnityEngine; | |
using WacomMTDN; | |
// Simple Wacom Multitouch Unity Integration built from the Wacom's DotNet Example: | |
// https://developer-docs.wacom.com/display/DevDocs/Feel+Multi-touch+Sample+Code+Downloads | |
// WacomMTDN.dll can be found at: https://drive.google.com/file/d/1fvoRfIev28fKMvTrfF9IBZkAaWow5UJ4/view?usp=sharing | |
public class WacomMultiTouchProvider : MonoBehaviour { |
This file contains hidden or 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
using UnityEngine; | |
public class MovingPlatform : MonoBehaviour { | |
public float timeInterval = 5f; | |
public AnimationCurve XMotion; | |
public AnimationCurve YMotion; | |
public AnimationCurve ZMotion; | |
public bool PingPong = true; | |
float platformTime; |
NewerOlder