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
| const float DITHER_SCALE = 8.0; | |
| const vec3 LUM_VECTOR = vec3(0.299, 0.587, 0.114); | |
| const mat4 BAYER_MATRIX = mat4( | |
| 0.0/16.0, 8.0/16.0, 2.0/16.0, 10.0/16.0, | |
| 12.0/16.0, 4.0/16.0, 14.0/16.0, 6.0/16.0, | |
| 3.0/16.0, 11.0/16.0, 1.0/16.0, 9.0/16.0, | |
| 15.0/16.0, 7.0/16.0, 13.0/16.0, 5.0/16.0 | |
| ); | |
| vec2 square_coord(vec2 frag_coord) { |
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 { mkdir } from 'node:fs/promises'; | |
| import { homedir } from 'node:os'; | |
| import fs from 'node:fs'; | |
| import { pipeline } from 'node:stream/promises'; | |
| import { Readable } from 'node:stream'; | |
| import { JSDOM } from 'jsdom'; | |
| const RBA_HOST = 'https://www.rba.gov.au'; | |
| function * getYears() { |
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
| export class Queue { | |
| #buffer = []; | |
| #p = Promise.withResolvers(); | |
| #stopped = false; | |
| push(value) { | |
| if (this.#stopped) throw new Error('Queue is stopped'); | |
| this.#buffer.push(value); | |
| this.#p.resolve(); | |
| } |
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
| export async function * mergeAsyncIterators(iterables) { | |
| const iterators = iterables.map(it => it[Symbol.asyncIterator]()); | |
| const promises = new Map(iterators.map((it, i) => [i, it.next()])); | |
| while (promises.size > 0) { | |
| const next = Array.from(promises.entries(), async ([i, p]) => [i, await p]); | |
| const [index, result] = await Promise.race(next); | |
| if (result.done) { | |
| promises.delete(index); |
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
| const l = 0.05, z = 0.0001, d = 0.07, s = 0.15; | |
| const L = 10000, a = 2/3; | |
| const Ly = ((1-l) *L), La = (l * L); | |
| const A0 = 100, K0 = 1000; | |
| const A = (t: number) => A0 * Math.exp(z * La * t); | |
| const K = (t: number) => { | |
| const g = z * La; | |
| const exDt = Math.exp(-a * d * t) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| from dataclasses import dataclass | |
| from datetime import datetime | |
| from typing import Optional | |
| import os | |
| def get_property_sales_data(file_path): | |
| reader = PropertySalesRowReader() | |
| try: | |
| for kind, row in reader.get_rows(file_path): |
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
| from dataclasses import dataclass, field | |
| from collections import namedtuple | |
| from typing import List, Union, Any, Optional | |
| import re | |
| @dataclass | |
| class LandParcel: | |
| id: str | |
| part: bool = field(default=False) | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Copyright 2021 Angus Thomsen | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights to | |
| use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
| of the Software, and to permit persons to whom the Software is furnished to do | |
| so, subject to the following conditions: |
NewerOlder