Skip to content

Instantly share code, notes, and snippets.

@tavin
tavin / pgbench.sh
Created February 24, 2021 14:27
pgbench.sh
#!/bin/bash
set -ex
scale=20 # table size factor; should not be less than $clients
clients=10 # number of concurrent sessions
jobs=$((`nproc`/2)) # threads i.e. how many cpus to use
duration=300 # length of test in seconds
progress=10 # progress reporting interval
filesystem=postgresql/pgbench
time for t in `seq 5`; do sh ./q10-train2csv.sh mnist 0.000001 0.000003 0.00001 0.00003 0.0001 0.0003 | tee -a q10.csv; done
@tavin
tavin / index.ts
Created March 21, 2023 18:06
sample code for setting mystjs parser options in jupyterlab extension
import { JupyterFrontEnd, JupyterFrontEndPlugin } from '@jupyterlab/application';
import { IMySTNotebookOptions } from 'jupyterlab-myst';
import { MySTNotebookDefaults } from 'jupyterlab-myst/lib/myst';
import { proofsDirective } from './directives';
export class MyNotebookDefaults extends MySTNotebookDefaults {
get(notebook: any) {