Skip to content

Instantly share code, notes, and snippets.

View SteVwonder's full-sized avatar

Stephen Herbein SteVwonder

View GitHub Profile
detex paper.tex > paper.txt
java -jar /path/to/languagetool-commandline.jar --xmlfilter -d COMMA_PARENTHESIS_WHITESPACE,WHITESPACE_RULE -l en-US ./paper.txt | less
{
"levels": [
{
"cores_per_child": 36,
"num_children": 8
},
{
"cores_per_child": 1,
"num_children": 36
}
@SteVwonder
SteVwonder / parse_podcast.py
Created April 10, 2018 04:24
Count words in the transcript of Sam & Ezra's podcast
#!/usr/bin/env python
import re
sam_wc = 0
ezra_wc = 0
speaker = None
with open('podcast-transcript.txt', 'r') as infile:
# herbein1 at sierra4361 in /nfs/tmp2/herbein1/sierra-test [13:42:17]
→ bsub -nnodes 1 -G guests -Is jsrun -n1 --bind=none taskset -c 0-87 bash -c 'CUDA_VISIBLE_DEVICES=0,1,2,3 CUDA_DEVICE_ORDER=PCI_BUS_ID hwloc-ls --restrict binding'
Job <143722> is submitted to default queue <pbatch>.
<<Waiting for dispatch ...>>
<<Starting on sierra4369>>
Machine (128GB total) + Group0 L#0 + NUMANode L#0 (P#0 128GB) [80/18667]
Package L#0
L3 L#0 (10MB) + L2 L#0 (512KB)
L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0
PU L#0 (P#0)
@SteVwonder
SteVwonder / job-event-log.org
Last active August 30, 2018 17:33
Notes from the Flux Team Brainstorming Sessions

Use-Cases

User-initiated

Handled by ingest module

  • Submitting a job for immediate scheduler processing (not held)
    • Ingest module creates the first event to “ingested” (maybe “submitted”)
  • Submitting a job as held

Proxied through job manager module

  • Cancelling a job
    • From submitted
    • From allocated
@SteVwonder
SteVwonder / dump_py_bindings.py
Last active February 15, 2019 23:41
Statistics and Raw Output on Coverage of Python Bindings
#!/user/bin/env python
import re
import inspect
from collections import defaultdict
import flux
from _flux import _core
from _flux._core import ffi
from flux import jsc
→ pgrep -af Wavebox
27094 /opt/wavebox/Wavebox --mailto > /dev/null
27096 /opt/wavebox/Wavebox --type=zygote --no-sandbox
27128 /opt/wavebox/Wavebox --type=renderer --service-pipe-token=DC3DAE745D3E9434C0739F346A1565A0 --lang=en-US --app-path=/opt/wavebox/resources/app.asar --enable-plugins --node-integration=true --webview-tag=true --no-sandbox --background-color=#f2f2f2 --context-id=2 --enable-pinch --num-raster-threads=4 --enable-main-frame-before-activation --content-image-texture-target=0,0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,3553;0,12,3553;0,13,3553;0,14,3553;0,15,3553;0,16,3553;0,17,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,3553;1,5,3553;1,6,3553;1,7,3553;1,8,3553;1,9,3553;1,10,3553;1,11,3553;1,12,3553;1,13,3553;1,14,3553;1,15,3553;1,16,3553;1,17,3553;2,0,3553;2,1,3553;2,2,3553;2,3,3553;2,4,3553;2,5,3553;2,6,3553;2,7,3553;2,8,3553;2,9,3553;2,10,3553;2,11,3553;2,12,3553;2,13,3553;2,14,3553;2,15,3553;2,16,3553;2,17,3553;3,0,3553;3,1,355
@SteVwonder
SteVwonder / R-notes.org
Created October 2, 2018 20:59
Notes from discussion on R

Identify the requirements on R

Consumers/Produces

  • Definition: express a resource set
  • R_local: subset of R per broker rank
    • IMP consumes this
  • Producers + Consumers
    • Scheduler produces
    • Scheduler consumes
      • Resources incrementally handed back from the exec
    • Exec consumes
#!/bin/bash
# checkout LGPL branch
if [[ "$(git rev-parse --abbrev-ref HEAD)" != "lgpl2_libflux" ]]; then
git checkout lgpl2_libflux
fi
# get all the files changing to LGPL
git diff --name-only upstream/master | grep 'src/common' > full_path_changed_to_lgpl.txt
# get all the headers included by the files changing to LGPL
→ jq '.graph.nodes[] | .id' ./test.jgf
"146337"
"146338"
"146339"
"146340"
"146341"
"146342"
"146343"
"146344"
"215384"