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 { 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) { |
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
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 |
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
#!/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 |
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
%%javascript | |
MathJax.Hub.Config({ | |
TeX: { | |
equationNumbers: { | |
autoNumber: "AMS" | |
} | |
} | |
}); |
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
jupyter contrib nbextension install --user | |
jupyter nbextension enable equation-numbering/main |
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
library identifier: 'mine@HEAD', retriever: legacySCM([ | |
'$class': 'GitSCM', | |
'userRemoteConfigs': [[url: 'file:/tmp/my-pipeline-library']], | |
]) |
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
perl -pe '/time=\S+\.\.(\S+) rows=(\d+) loops=(\d+)/; print $3*$1, "\t";' explain.out |
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
#!/bin/sh -ex | |
export WINEPREFIX=$PWD | |
export WINEARCH=win32 | |
wineboot | |
winetricks -q dotnet35sp1 | |
winetricks -q corefonts | |
winetricks -q windowscodecs || cabextract \ | |
~/.cache/winetricks/windowscodecs/wic_x86_enu.exe -F 'windowscodecs*.dll' -d drive_c/windows/system32 | |
wine ADE_2.0_Installer.exe |
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
def chain(iterable): | |
i, f = 0, None | |
scope = {} | |
loc = [] | |
for i, f in enumerate(iterable): | |
name = '_' + str(i) | |
scope[name] = f | |
loc.append(name + '(*a,**k)') | |
if i == 0: | |
return f |
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 base64 import b64encode | |
from subprocess import check_call | |
from subprocess import check_output | |
from tempfile import mkdtemp | |
def lambda_handler(_event, _context): | |
tmp = mkdtemp(dir='/tmp') | |
check_call(['pip', 'install', 'psycopg2', '--target', tmp]) | |
tar = check_output(['tar', '-C', tmp, '-cz', '.']) |
NewerOlder