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
// Stephen Boyd, @sspboyd | |
// August 2022. | |
// The following are a collection of mathematical constants I use in virtually | |
// all of my coding/art practice. | |
// The constants are typically used to modulate the relationships between | |
// visual elements on screen or bias the selection between different options. | |
const SQR_2 = 1.4142135623730951; | |
const TWO_PI = 6.283185307179586; |
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
I am attesting that this GitHub handle sspboyd is linked to the Tezos account tz1W5Mxj2FooGscWVFxfnu3tow9djuCdtndA for tzprofiles | |
sig:edsigtf6kii9tghrKaxC74E9BQ2BZfyyozXizVp7AxkmG9CfBWTpgrqT9XHGhSHL8TYijQaJnvq9VU9RqLRYUQkJ3fD76gk164s |
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
let fib_num = function (n0, n1, fib_idx) { | |
let next_num; | |
for (let i = 0; i <= fib_idx; i++) { | |
next_num = n0 + n1; | |
n0 = n1; | |
n1 = next_num; | |
} | |
console.log(`fibonacci number is: ${next_num}.`); | |
return next_num; | |
}; |
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
// This code makes it simple to export a lot of versions of a canvas without having to manually | |
// change the downloaded file's name so you don't overwrite it. | |
const export_canvas = function () { | |
const file_name = "sspboyd"; // change this to whatever you'd prefix your image file name with | |
const dt = new Date(); // create a new date object representing the current time | |
// Parse the date object to get strings for year, month, day, hour, minute, seconds | |
const year = dt.getFullYear(); |
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
license: gpl-3.0 | |
height: 200 | |
redirect: https://observablehq.com/@d3/beeswarm |
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 json | |
import time | |
import random | |
import requests | |
from requests.exceptions import HTTPError | |
api_request_limit = 100 | |
# total_num_players = 7274 # skaters | |
total_num_players = 201 # only using 201 for now so that we aren't hammering the api while testing | |
start_index = 0 |
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
license: apache-2.0 | |
border: no | |
height: 550 |
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
license: apache-2.0 | |
border: no | |
height: 900 |
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
Player | Pos | GP | G | A | P | |
---|---|---|---|---|---|---|
Nikita Soshnikov | R | 70 | 7 | 7 | 14 | |
Wayne Primeau | C | 59 | 3 | 5 | 8 | |
Michael Grabner | L | 80 | 9 | 9 | 18 | |
Keith Aulie | D | 57 | 2 | 2 | 4 | |
Richard Panik | R | 76 | 11 | 6 | 17 | |
Andrew MacWilliam | D | 12 | 0 | 2 | 2 | |
Roman Polak | D | 240 | 12 | 33 | 45 | |
Mason Raymond | L | 82 | 19 | 26 | 45 | |
Nick Spaling | C | 35 | 1 | 6 | 7 |
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
const s = (p55) => { // using p55 to refer to the sketch - throwback to Processing megabucket era :) | |
// Declare some globals | |
let canvasW = 521; | |
let canvasH = 521; | |
p55.preload = () => { | |
// load any fonts, data, etc... | |
}; | |
p55.setup = () => { |
NewerOlder