- sort
- merge sort n log n
- insertion sort
- heap sort (n log n)
- bubble sort n log n
- graph search
- DFS
- BFS
- shortest path - Djikstra's algorithm
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 | |
N=50 | |
i=1 | |
down_dir="$HOME/wget/Kingdom/" | |
while [ $i -lt $N ]; do | |
echo -==: downloading chapter $i :==- | |
# old locations |
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 | |
export DATE=$(date -d $(date +"%D") +"%s") | |
export FILENAME=/tmp/qod_$DATE.json | |
TITLE_TAG=~/bin/data/ascii_name.txt | |
urxvtc -e \ | |
bash -c "\ | |
. ~/bin/helpers/qod.sh \ | |
&& qod \ |
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
yarn run v0.18.1 | |
$ flow; test $? -eq 0 -o $? -eq 2 | |
src/index.js:15 | |
15: let files = await Promise.all(folders.map(async (name) => await listFiles(name))) | |
^^^^^^^^^^^^^^^^^^^^^ array type. This type is incompatible with | |
607: declare function $await<T>(p: Promise<T> | T): T; | |
^^^^^^^^^^^^^^ union: type application of identifier `Promise` | type parameter `T` of async return. See lib: /tmp/flow/flowlib_1ee65d0a/core.js:607 | |
Member 1: | |
607: declare function $await<T>(p: Promise<T> | T): T; | |
^^^^^^^^^^ type application of identifier `Promise`. See lib: /tmp/flow/flowlib_1ee65d0a/core.js:607 |
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
let listFiles = (folder: string) => listContents(folder, (f) => fs.statSync(f).isFile()) | |
let listFolders = (folder: string) => listContents(folder, (f) => fs.statSync(f).isDirectory()) | |
let listContents = (folder: string, filterFunc) => { | |
return new Promise(function (resolve, reject) { | |
fs.readdir(folder, function (error, result) { | |
if (error) { | |
reject(error) | |
} else { |
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 gcc:5 | |
WORKDIR /usr/src/app | |
COPY torch /usr/src/app | |
RUN apt-get update | |
RUN apt-get dist-upgrade -y | |
RUN apt-get install -y sudo | |
RUN /bin/bash -c "./install-deps" |
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
merge(A, []) -> {A, 0}; | |
merge([], B) -> {B, 0}; | |
merge([Ha|Ta], [Hb|Tb]) -> | |
if | |
Ha < Hb -> {MergedList, N}=merge(Ta, [Hb|Tb]), | |
{[Ha | MergedList], N}; | |
true -> {MergedList, N}=merge([Ha|Ta], Tb), | |
{[Hb | MergedList], N + 1} | |
end. |
I hereby claim:
- I am andykais on github.
- I am andykais (https://keybase.io/andykais) on keybase.
- I have a public key whose fingerprint is F786 85F5 86CB 5D59 4316 9903 8DE2 6E2C 149A 2F85
To claim this, I am signing this object:
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
#blacklist top level folder | |
/* | |
#whitelist files & folders | |
!.gitignore | |
!README.md | |
!.i3/ | |
!.i3status.conf |