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 fs = require('fs'); | |
const path = require('path'); | |
const ticker = 'gme'; | |
const re = new RegExp(`${ticker.toUpperCase()}\\s+,\\s*(\\d+\\.?\\d*)\\s*,\\s*(\\d+\\.?\\d*)\\s*,\\s*`); | |
console.log('Date,Market Loan-Loan Balance,Hedge-Loan Balance,'); | |
(async () => { |
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
Date | Market Loan-Loan Balance | Hedge-Loan Balance | ||
---|---|---|---|---|
4/1/2021 | 6300000.00 | 521949429.00 | ||
5/1/2021 | 6300000.00 | 543554502.00 | ||
6/1/2021 | 5846300.00 | 580727376.00 | ||
7/1/2021 | 8143400.00 | 574553466.00 | ||
8/1/2021 | 9093400.00 | 580071211.00 | ||
11/1/2021 | 13755000.00 | 627710704.00 | ||
12/1/2021 | 13755000.00 | 661710954.00 | ||
13/1/2021 | 21615000.00 | 1075260407.00 | ||
14/1/2021 | 26900100.00 | 1350479619.00 |
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 fetch = require('node-fetch'); | |
const fs = require('fs'); | |
const startDate = new Date(2021, 0); | |
const endDate = new Date(); | |
const msPerDay = 86400000; | |
const fetchDelayMS = 1000; | |
function pad(s, d) { | |
while (s.length < d) { |
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
{ | |
"chart": { | |
"result": [ | |
{ | |
"meta": { | |
"currency": "USD", | |
"symbol": "GME", | |
"exchangeName": "NYQ", | |
"instrumentType": "EQUITY", | |
"firstTradeDate": 1013610600, |
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
// install: | |
// | |
// npm install ndarray parse-magica-voxel | |
// | |
// usage: | |
// | |
// node vox-to-box.js my-file.vox > my-file.terrain | |
// | |
const parseMagicaVoxel = require('parse-magica-voxel') |
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 HelNumber = require('helschema/number') | |
const HelString = require('helschema/string') | |
const HelStruct = require('helschema/struct') | |
const HelDictionary = require('helschema/dictionary') | |
const EntitySchema = HelStruct({ | |
x: HelNumber, | |
y: HelNumber, | |
color: HelString | |
}) |
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 regl = require('regl')() | |
const video = document.createElement('video') | |
video.src = 'mario.mp4' | |
video.currentTime = window.localStorage.getItem('currentTime') | 0 | |
function persistVideoLocation () { | |
window.localStorage.setItem('currentTime', video.currentTime) | |
} |
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 regl = require('regl')() | |
const drawCircle = regl({ | |
attributes: { | |
p: [0] // dummy attribute | |
}, | |
frag: ` | |
precision highp float; | |
uniform vec3 color; |
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
{ | |
blend: { | |
enable: true, | |
func: { | |
src: 'dst color', | |
dst: 'one minus src alpha' | |
}, | |
equation: 'add' | |
} | |
} |
NewerOlder