Skip to content

Instantly share code, notes, and snippets.

View bhbmaster's full-sized avatar

Kostia K bhbmaster

View GitHub Profile
@bhbmaster
bhbmaster / README.md
Last active July 17, 2023 21:43
Full Path Json

Note this is fullpathjson2.py from my article http://www.infotinks.com/full-path-json/

To download:

wget https://gist.githubusercontent.com/bhbmaster/b4c2566a3b24f750c631b8b7f71d78e3/raw/fullpathjson.py -O fullpathjson.py

curl https://gist.githubusercontent.com/bhbmaster/b4c2566a3b24f750c631b8b7f71d78e3/raw/fullpathjson.py -o fullpathjson.py

To run (with python3)

#!/bin/bash
RUNTIME=60
HOST=$(hostname)
OUT="$(hostname)-${RUNTIME}s" # filename prefix
echo "(1) 5 compute nodes running at the same time"
fio --bs 4k --rw randwrite --numjobs 10 --size 1G --directory /dvs/fio --group_reporting --name fio-${HOST} --direct 1 --runtime ${RUNTIME} --time_based --ioengine libaio --iodepth=1 --output-format=json | jq -c . &> $OUT-j1-w-5cn-io1.json
echo "(2) 5 compute nodes running at the same time"
@bhbmaster
bhbmaster / README.md
Last active October 11, 2022 08:48
Fragmentation Analysis Via filefrag and Python 2.x matplotlib (VERSION 4.1 updated 2022-09-05)
@bhbmaster
bhbmaster / .tmux.conf
Created February 26, 2022 23:07
my tmux.conf
# $Id: screen-keys.conf,v 1.7 2010-07-31 11:39:13 nicm Exp $
#
# By Nicholas Marriott. Public domain.
#
# This configuration file binds many of the common GNU screen key bindings to
# appropriate tmux key bindings. Note that for some key bindings there is no
# tmux analogue and also that this set omits binding some commands available in
# tmux but not in screen.
#
# Note this is only a selection of key bindings and they are in addition to the
@bhbmaster
bhbmaster / Mac 10 vscode settings
Last active December 11, 2020 03:31
My VScode Settings (User Json)
{
"editor.acceptSuggestionOnCommitCharacter": false,
"terminal.integrated.shell.osx": "/bin/zsh",
"gitlens.currentLine.enabled": false,
"window.zoomLevel": -1,
"http.proxyAuthorization": null,
// "terminal.integrated.shell.osx": "/bin/bash",
"git.autofetch": true,
"python.pythonPath": "~/.pyenv/shims/python",
"editor.columnSelection": false,
@bhbmaster
bhbmaster / solve.py
Last active December 11, 2020 03:28
Google Interview Question 2 - Remove duplicates. Uniq on a string
#
#
# example input: aaaabbcaaa
# output: abca
#
#
# req: python 3.5+
#
#
@bhbmaster
bhbmaster / solve.py
Last active December 11, 2020 03:28
Google Interview Question 1 - String Multiplier
#!/usr/bin/python
#
# solve string multiplier - google interview question
# the numbers are are multiplier preceded by brackets. no number before bracket has an imaginary 1.
# input: 3[ab]4[abc]
# output: ababababcabcabcabc
# input: z2[ab2[xy]a2[2[c]]]2[ko]
# output: zabxyxyaccccabxyxyacccckoko
# input: 3a or 3