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 crypto = require('node:crypto'); | |
const CryptoJS = require("crypto-js"); | |
const EMAILS = 200_000; | |
const MIN_EMAIL_LEN = 5; | |
const MAX_EMAIL_LEN = 23; | |
const emails = Array.from( | |
{ length: EMAILS }, |
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
class Holder { | |
List<String>? positions; | |
Holder(this.positions); | |
} | |
class Position { | |
String id = ""; | |
} | |
void updateHolder(Holder holder, Position position) { |
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
// TODO: next implement HITS ranking algorithm from: https://d-nb.info/1112813659/34 | |
const https = require('https'); | |
const url = require('url'); | |
const fs = require('fs'); | |
const LANGS_URL = 'https://raw.githubusercontent.com/github/explore/main/collections/programming-languages/index.md'; | |
const MD_PROLOGUE = "---\nitems:\n"; | |
const MD_EPILOGUE = ( |
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
type i32 = number; | |
type f64 = number; | |
function isNeg(x: f64): boolean { | |
return x < 0.0 && x == Math.floor(x); | |
} | |
// Returns the value ln(gamma(x)). | |
function logGamma(x: f64): f64 { |
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
[package] | |
name = "bench" | |
version = "0.1.0" | |
authors = ["MaxGraey <[email protected]>"] | |
[profile.bench] | |
codegen-units = 1 | |
opt-level = 3 | |
lto = true | |
debug = false |
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
require "language/node" | |
class Emscripten < Formula | |
desc "LLVM bytecode to JavaScript compiler" | |
homepage "https://emscripten.org/" | |
stable do | |
url "https://github.com/emscripten-core/emscripten/archive/1.39.18.tar.gz" | |
sha256 "aa0df2828096d161636467d4fc062bbeea31e372c122a05c9685bb6cb2d4064e" | |
end |
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 buffer; | |
const LENGTH = 1024 * 4 + 17; | |
const WARMUP_COUNT = 8; | |
function createStringBuffer(len = LENGTH) { | |
buffer = new ArrayBuffer(len * 2); | |
const U16 = new Uint16Array(buffer); | |
const alphabet = 'A BCDE, FGHI JKLM.; (NOPQ- RSTU, VWXYZ. abcd; efgh,) ijkl mnop. qrst- uvwxy,( z0123 4567, 89.)'; | |
for (var i = 0; i < len; i++) { | |
U16[i] = alphabet.charCodeAt(Math.floor(Math.random() * alphabet.length)); |
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
(module | |
(type $t0 (func (param i32 i32))) | |
(type $t1 (func (param i32 i32) (result i32))) | |
(func $std.builtin.default_panic (type $t0) (param $p0 i32) (param $p1 i32) | |
(local $l2 i32) (local $l3 i32) (local $l4 i32) | |
global.get $g0 | |
local.set $l2 | |
i32.const 16 | |
local.set $l3 | |
local.get $l2 |
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
// tslint:disable-next-line:no-reference | |
/// <reference path="../node_modules/assemblyscript/index.d.ts" /> | |
@sealed @unmanaged | |
class Ge { | |
x: Int64Array; | |
y: Int64Array; | |
z: Int64Array; | |
t: Int64Array; |
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 fj = [ 1, 0.01123596, 1, 0.19101124, 0.05617978, 0.39325843, 0.01123596, 0.59550562, 0.21348315] | |
const wj = [-0.232961,-0.1212703, -0.29214973,-0.12772172, 0.21085705, 0.6024462, 0.07024019, 0.3625982, -0.53436423] | |
const zj = [-1, -0.01123596, 1, 0.19101124, -0.05617978, -0.39325843, 0.01123596, 0.59550562, -0.21348315] | |
function approxAbs(x) { | |
const B0 = wj[0] / (x + 1 - 1e-15); | |
const B1 = wj[1] / (x - zj[1]); | |
const B2 = wj[2] / (x - 1 + 1e-15); | |
const B3 = wj[3] / (x - zj[3]); | |
const B4 = wj[4] / (x - zj[4]); |
NewerOlder