Last active
November 27, 2019 12:14
-
-
Save chezsick/a47f8acdae299ec5e939f55d55e2ee9a to your computer and use it in GitHub Desktop.
DataFuck ;;;;;;;;;;;;;; prog datafuck begin end
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
| import sys | |
| import math | |
| fs = open(sys.argv[1]) | |
| begin = int(sys.argv[2]) | |
| end = int(sys.argv[3]) | |
| lines = fs.readlines() | |
| mux = int(lines[0]) | |
| def tri(n): | |
| return pow(n+1,2)/2 | |
| for i in range(begin,end+1): | |
| a = 0.0 | |
| e = [] | |
| for j in range(mux): | |
| e.append((i / math.factorial(j+1)) % (j+2)) | |
| a = a + float(lines[(tri(j+1)+e[j])]) | |
| sys.stdout.write(chr(int(a)%256)) |
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
| import sys | |
| import random | |
| import math | |
| fact = int(sys.argv[1]) | |
| sys.stdout.write("%s\n" %(fact)) | |
| def tri(n): | |
| return pow(n+1,2)/2 | |
| for n in range(tri(fact)): | |
| sys.stdout.write("%s\n" %(random.random()*256)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment