-
- § Required text
-
- J. Kleinberg and E. Tardos, Algorithm Design, Addison Wesley, 2006.
-
- (J. Kleinberg, 20 Best Brains under 40, Discover Magazine, 2008)
-
- § Reference book
-
- S. Dasgupta, C. Papadimitriou, and U. Vazirani, Algorithms, McGraw-Hill, 2007.
-
- § Required text
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
typedef void (*msg_type)(void); | |
void msg_1() { | |
printf("You have done well in this assignment!\n"); | |
} |
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
ag -0 -l $1 | xargs -0 sed -ri -e "s/$1/$2/g" | |
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
#!/usr/bin/python | |
"""Custom topology example | |
Two directly connected switches plus a host for each switch: | |
host --- switch --- switch --- host | |
_/ \_ | |
host / \ host |
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
GPG: Extract private key and import on different machine | |
After extending the expiry date of a GPG key you might have to copy your key to another machine to use the same key there. Here is how: | |
Identify your private key by running gpg --list-secret-keys. You need the ID of your private key (second column) | |
Run this command to export your key: gpg --export-secret-keys $ID > my-private-key.asc | |
Copy the key to the other machine (scp is your friend) | |
To import the key, run gpg --import my-private-key.asc | |
If the key already existed on the second machine, the import will fail saying 'Key already known'. You will have to delete both the private and public key first (gpg --delete-keys and gpg --delete-secret-keys) |
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
Make sure to place username ALL=(ALL) NOPASSWD:ALL beneath %sudo ALL=(ALL:ALL) ALL since it will use the last entry that applies to the user. | |
You could also just replace %sudo ALL=(ALL:ALL) ALL with %sudo ALL=(ALL) NOPASSWD:ALL and not worry about your entry placement. | |
https://github.com/Microsoft/WSL/issues/1476 |
# Keybindings #
###############
# Keybindings to make special keys work - https://wiki.archlinux.org/index.php/Zsh#Key_Bindings
bindkey -v # vi mode
bindkey "\e[1~" beginning-of-line # Home
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
test |
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
test |
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
java |
NewerOlder