Skip to content

Instantly share code, notes, and snippets.

"""
2025-05-27 run on Dell XPS15 2023
Ray version: 2.46.0
Python Multiprocessing available: fork
Benchmarking with 1,000 messages per iteration
Warmup: 1,000 messages before each test
Size (bytes) | Protocol | Msgs/sec | MB/sec
"""
2025-05-27 run on Dell XPS15 2023
ZMQ version: 4.3.5
pyzmq version: 26.4.0
Available IPC support: True
Benchmarking with 1,000 messages per iteration
Warmup: 1,000 messages before each test
@btakita
btakita / README.md
Last active November 8, 2024 04:03
Arch Nvidia 4090 egpu
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@btakita
btakita / issemantic.js
Last active March 21, 2024 04:14
https://issemantic.net/ visualization helper scripts
/**
* Use these utility functions in the developer console.
* url__update & snippet__update will load the document & start the visualizer.
* These functions will make the visualizer UI taller & scroll to the top of the visualizer.
*
* ```js
* url__update('https://example.com')
?* snippet__update('Your HTML')
* ```
*/
@btakita
btakita / Raw.ts
Last active November 1, 2023 09:43
van export-shared-types branch example
/// <reference lib="dom" />
import { type Van as MiniVan } from 'mini-van-plate'
import type { VanShape } from 'mini-van-plate/shared'
import { type Element as VanPlateElement, type ElementProto } from 'mini-van-plate/van-plate'
export function Raw<V extends VanShape>(van:V, html:string):Return<V>{
if (globalThis['window']) return htmlDocumentFragment(html) as Return<V>
const { __proto__ } = van.tags.div() as any as { __proto__:ElementProto }
return {
__proto__,
render: __proto__.render,
@btakita
btakita / gist:950e242985b65dda6606b370e31f7033
Last active May 24, 2023 02:00
Upstash Pay as you go vs EC2 Redis
9179 records (1 SET, 9179 HSET): company_gender
Upstash: 11590.06ms 172MB
EC2: 9001.75ms 141MB
8775 records: company_person
Upstash: 39417.53ms 1037MB
EC2: 38153.58ms 1040MB
11400 records (1 SET, 0-22800 HSET): iex__company
Upstash: 26545.97ms 1037MB
@btakita
btakita / openai__TransformStream__JSONStreamParser.js
Last active April 26, 2023 00:21
Streaming JSON parser generated by openai
class JSONStreamParser {
constructor() {
this.buffer = '';
this.state = this.parseValue;
}
transform(chunk, controller) {
this.buffer += chunk;
for (let i = 0; i < this.buffer.length; i++) {
const char = this.buffer.charAt(i);
@btakita
btakita / mckenzie_starlite__replacement__bumper.svg.ts
Last active October 26, 2022 06:06
mckenzie_starlite__replacement__bumper.svg.ts
import { writeFile } from 'fs/promises'
import { dirname, join } from 'path'
import PDFDocument from 'pdfkit'
import SVGToPdf from 'svg-to-pdfkit'
// 96.75
// 8 x 7.5
const in__px = 96
const page__width__in = 11
const page__height__in = 8.5
const page__margin_x__in = .5