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 alpha = 1.2; // 1.2 seems to map well to top 100 sites... Maybe it works for rest of web? | |
const size = 360_000_000; // 360 million is the number of sites in the web as of 2023 | |
/* | |
83 billion is the number of navigations for rank 0 (the most popular site) | |
for one month in 2025 (yes, I know I don't have the size of the web | |
for 2025, but this is a good estimate based on current trends). | |
*/ | |
const max = 83_000_000_000; |
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
{ | |
"title": "Request Body Builder", | |
"description": "Builds the POST body for a request", | |
"version": "0.0.1", | |
"nodes": [ | |
{ | |
"type": "output", | |
"id": "output", | |
"configuration": { | |
"schema": { |
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 json | |
from datetime import datetime | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
# Function to convert a string to a datetime object | |
def convert_string_to_date(date_string): | |
return datetime.strptime(date_string, "%Y-%m-%d") |
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
did:3:kjzl6cwe1jw149x0rcxc5b3ltxrgh7nwt4pab0eg04gqvztfbr52wizt8iwkk1b |
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 picokeypad as keypad | |
import random | |
import time | |
debug = 0 | |
keypad.init() | |
keypad.set_brightness(1.0) | |
guess = random.randint(0, 15) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
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
console.help = function(arg) { | |
if(arg === null || arg === undefined) return console.log(arg); | |
if(typeof(arg) === 'string') return console.log(arg); | |
if('__help' in arg) { console.log(arg.__help); } | |
if('__help' in arg.constructor) { console.log(arg.constructor.__help); } | |
console.log(arg); | |
} | |
.bind(console); |
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
// Welcome! require() some modules from npm (like you were using browserify) | |
// and then hit Run Code to run your code on the right side. | |
// Modules get downloaded from browserify-cdn and bundled in your browser. | |
require('xmldom-alpha') |
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 range = function* (stop = 0, step = 1) { | |
const shouldStop = (n)=>stop >= 0 ? (n < stop) : (n > stop); | |
const interval = (n)=>stop >= 0 ? n + step : n - step; | |
let itr = function*() { | |
let i = 0; | |
while (shouldStop(i)) { | |
yield i; | |
i = interval(i); | |
} | |
}; |
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 range = (stop) => { stop = stop || 0; const shouldStop = (n) => stop >= 0 ? (n < stop) : (n > stop); const interval = (n) => stop >= 0 ? n + 1 : n - 1; let itr = {}; itr[Symbol.iterator] = function* () { let i = 0; while(shouldStop(i)) { yield i; i = interval(i);}}; return itr; }; | |
for(let i of range(100)) | |
console.log(i) | |
for(let i of range(-100)) | |
console.log(i) |
NewerOlder