Skip to content

Instantly share code, notes, and snippets.

View shubhamkumar13's full-sized avatar
๐Ÿ˜‘
is existing

shubham shubhamkumar13

๐Ÿ˜‘
is existing
View GitHub Profile
@shubhamkumar13
shubhamkumar13 / git_branch.txt
Created November 1, 2020 14:57
single line command that shows git branch
export PS1="\[\033[95m\]\u@\h \[\033[32m\]\W\[\033[33m\] [\$(git symbolic-ref --short HEAD 2>/dev/null)]\[\033[00m\]\$ "
@shubhamkumar13
shubhamkumar13 / ocaml_build_log.md
Created November 3, 2020 04:52
ocaml build log report
sk@pop-os ~/ocaml ((HEAD detached at 2bb2bde74))
 $ make
make coldstart
make[1]: Entering directory '/home/sk/ocaml'
make -C runtime  all
make[2]: Entering directory '/home/sk/ocaml/runtime'
gcc -MM -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE   -DNATIVE_CODE -DTARGET_amd64 -DMODEL_default -DSYS_linux    signals.c -MT 'signals.npic.o' -MF .dep/signals.npic.d
gcc -MM -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE    signals.c -MT 'signals.bpic.o' -MF .dep/signals.bpic.d
gcc -MM -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE   -DNATIVE_CODE -DTARGET_amd64 -DMODEL_default -DSYS_linux   -DCAML_INSTR  signals.c -MT 'signals.ni.o' -MF .dep/signals.ni.d
@shubhamkumar13
shubhamkumar13 / ssh
Created November 4, 2020 08:17
ssh public key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDAF8o3cA3XG8J5xpcovNlfddvtiQE9tyJXRWaNPEEw1a8ugGDImHgxkFsP4tyVOg2ckzBYtyYLr5XyOJvA8X/DlrKntm5jthe28SGkO2ok/FabYtVzrNpZJmJCk8FWkfFrd/5AOc8o06ywNmhFngIehExDg92odQpKxFo9r+6X+vA2yq0E4axMwgmpIWsXPIkzYG9P8GrMMUkQ2/a0JXprvnM/i54W5DiX65HgEnfA96YUaRkzBowr+gLuPOBqgIwKJZ6YYT52LgL1cIjZmCQ4AtvsfI9kEBMwjGQUW27qfo/3e3++Gq4Z/Y16m6kXScPDIB02lRoSzZKK/6ZyNqDprkI2fuN8NhhuQHS7YC39qo+7tbBrc4UeyU3EyRdR8X/qKQEEflNdv6aFGifoJ+D6StbSWb/4z3ValKLTENnB8iuX+pxeDNlXT7H8KF7C3PdQ6T2QBXHn5YjhtPT3Mc6UaAfXSYj5e0AOsdTk+/o0OoUNDZGrjD0XFVgQzB+BA2s= sk@pop-os
@shubhamkumar13
shubhamkumar13 / 2bb2bde.md
Created November 11, 2020 16:11
2bb2bde gdb
sk@pop-os ~/ocaml ((HEAD detached at 2bb2bde74))
 $ ocamlopt fft.ml

sk@pop-os ~/ocaml ((HEAD detached at 2bb2bde74))
 $ gdb --args ./a.out 512
GNU gdb (Ubuntu 9.2-0ubuntu2) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
@shubhamkumar13
shubhamkumar13 / inserts_and_perms.md
Created November 13, 2020 04:41
corrections in algorithms design in haskell
inserts :: a -> [a] -> [[a]]
inserts x [] = [[x]]
inserts x (y:ys) = (x:y:ys) : map (y:) (inserts x ys)

perms1 [] = [[]]
perms1 (x:[]) = [[x]]
perms1 (x:xs) = [zs | ys <- perms1 xs, zs <- inserts x ys]
Initial minor heap size: 256k words
Initial major heap size: 992k bytes
Initial space overhead: 80%
Initial max overhead: 500%
Initial heap increment: 15%
Initial allocation policy: 0
Initial smoothing window: 1
<shubham here
&gt;ordered work = -1 words
fft->nb->i
fft->nb->butterfly->i
fft->nb->i
fft->nb->butterfly->i
fft->nb->i
fft->nb->butterfly->i
fft->nb->i
fft->nb->butterfly->i
fft->nb->i
@shubhamkumar13
shubhamkumar13 / diff.md
Created November 18, 2020 08:56
2bb2bde-trunk-caml_request_minor_gc diff
33,37d32
< Growing gray_vals to 32k bytes
< Growing gray_vals to 64k bytes
< Growing gray_vals to 128k bytes
< Growing gray_vals to 256k bytes
< Growing gray_vals to 512k bytes
49d43
< Growing gray_vals to 1024k bytes
58d51
@shubhamkumar13
shubhamkumar13 / compare_diffs.py
Last active November 18, 2020 09:08
compare the diffs inside the logs generated
>>> f = open("/home/sk/ocaml/diff_linear.log", "r")
>>> f1 = f.readlines()
>>> counter = 0
>>> for x in f1:
... counter += 1
...
>>> print(counter)
163
>>> counter = 0
>>> for x in f1: