This file contains 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/env python | |
#URL: http://www.pythonchallenge.com/pc/def/map.html | |
from string import letters, maketrans | |
smallLetters = letters[:26] | |
shiftLetters = map(lambda let: smallLetters[(let+2)%26], xrange(len(smallLetters))) |
This file contains 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
# allow a specific PORT to accept connection from an IP address | |
iptables -I INPUT -p tcp -s <IP> --dport <PORT> -j ACCEPT |
This file contains 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
git pull -r --tags -p <GIT REPO> |
This file contains 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
#Pull changes without merging | |
git pull -r --tags -p https://github.com/codecakes/etk.git |
This file contains 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
ufw allow from <ip>.0/24 to any port <PORT> |
This file contains 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
git fetch --all | |
for remote in `git branch -r`; do git branch --track $remote; done |
This file contains 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
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash | |
source ~/.bashrc | |
nvm install 0.12 |
This file contains 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
jsfiddle.net/zpvLv55h/ |
This file contains 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
https://jsfiddle.net/jnLnb1wq/ |
This file contains 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
''' | |
Any Generator outputs an element x of type (Rational, Integer, Real, Complex, Character Set(s), any other type) from its Set X | |
s.t. x \subset X from a Given Set X or more. | |
So a pool of elements already given, from an academic point of view how is the RANDOMNESS in a function achieved? | |
''' | |
import random | |
def swap(minIndex, j, arr): | |
'''Swap elements from two given positions''' |
OlderNewer