Skip to content

Instantly share code, notes, and snippets.

View fzyukio's full-sized avatar
🐍
Back to python baby!

Fukuzawa Yukio fzyukio

🐍
Back to python baby!
View GitHub Profile
@fzyukio
fzyukio / test.js
Created December 18, 2022 19:03 — forked from apieceofbart/test.js
Async testing with jest fake timers and promises
PLEASE CHECK THIS REPO WITH THE EXAMPLES THAT YOU CAN RUN:
https://github.com/apieceofbart/async-testing-with-jest-fake-timers-and-promises
// Let's say you have a function that does some async operation inside setTimeout (think of polling for data)
function runInterval(callback, interval = 1000) {
setInterval(async () => {
const results = await Promise.resolve(42) // this might fetch some data from server
callback(results)
}, interval)
<!DOCTYPE html>
<html lang="en">
<head>
<title>Kinectron For Three.js - Simple Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<!-- Origin Trial Token, feature = WebVR (For Chrome M59+), origin = https://juniorxsound.github.io, expires = 2017-08-16 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M59+)" data-expires="2017-08-16" content="Ahwo2B0LoM2bLB015eLJ4CAvJa0xF9VVn0FO1/AaYfPklvBUwcfYFkXKenD57vhGo1WQt9Hg9IFauhKdRgLN8w8AAABreyJvcmlnaW4iOiJodHRwczovL2p1bmlvcnhzb3VuZC5naXRodWIuaW86NDQzIiwiZmVhdHVyZSI6IldlYlZSMS4xIiwiZXhwaXJ5IjoxNTAyOTEyNTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZX0=">
<style>
@fzyukio
fzyukio / .gitignore
Created September 30, 2018 03:47
plotly.js use modebar buttons handlers
node_modules
bundle.js
@fzyukio
fzyukio / .block
Last active August 20, 2018 06:12
Force-Directed Graph with Drag/Zoom/Pan/Center/Resize/Labels/Shapes/Filter/Highlight
license: mit
@fzyukio
fzyukio / .block
Created August 20, 2018 06:03
Graph Demo
license: mit
@fzyukio
fzyukio / .block
Created August 20, 2018 06:03
Graph Demo
license: mit
@fzyukio
fzyukio / .block
Created August 20, 2018 06:00
Colored links in force-directed graph
license: mit
@fzyukio
fzyukio / .block
Created August 20, 2018 05:59
Lasso selection for Force-Directed Graph
license: mit
@fzyukio
fzyukio / .block
Created July 28, 2018 10:05
Fuzzy graph II
license: mit
@fzyukio
fzyukio / .block
Created July 28, 2018 10:02
Node-link polar layout with centrality (weighted eigenvector)
license: mit