Skip to content

Instantly share code, notes, and snippets.

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

shubham shubhamkumar13

๐Ÿ˜‘
is existing
View GitHub Profile
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
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
@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]
@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 / 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 / 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 / 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 / .bash_aliases
Created November 1, 2020 14:47 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@shubhamkumar13
shubhamkumar13 / WIFI-HELP.md
Last active October 31, 2022 01:20
Whenever I need help with wifi on pop os I do this here

https://www.reddit.com/r/archlinux/comments/exr82b/tried_55_from_testing_and_wifi_rtl8822be_stopped/

Answer from u/edu4rdshl

I have found a workaround for it issue. The issue is caused most times because this function fails trying to read the ASPM configuration from the PCI device. The current rtwpci module doesn't have an option to manage ASPM as well. So, digging a bit deeper I have found that setting ASPM using the Link Control Register fix the problem and rtwpci is able to read it properly. By default, RT8822BE cards enable L0s and L1 ASPM states but L0s states are shown as "Unknown" then rtwpci fails. I have made a little script that fix the issue, just be sure to follow:

Note: execute next commands as root.

Execute lspci | grep -i wifi | awk '{print $1}' and keep that result in mind.

@shubhamkumar13
shubhamkumar13 / gc_minor_collections_report.md
Last active October 27, 2020 12:38
name, minor-collections, running-time (cached vs uncached)
name runtime change cached uncached minor collections change (cached vs uncached)
35 quicksort.4000000 6.15% 9.37238 9.98706 0 (0.0%)
1 bdd.26 4.86% 24.0601 25.2893 2 (0.04%)
27 menhir.ocamly 2.4% 927.577 950.364 0 (0.0%)
20 knucleotide. 2.39% 178.394 182.768 0 (0.0%)
14 fft. 1.48% 24.2063 24.569 363 (35.38%)
2 binarytrees5.21