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 math, struct | |
| from PIL import Image | |
| fName = "file1039" | |
| D = open(fName, "rb").read() | |
| width = int(math.sqrt(len(D)/8)) | |
| #print width | |
| # split image to two parts | |
| Img = D[:width*width*4] | |
| Img2 = D[width*width*4:] |
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 json, sys | |
| inp = json.load(open("input.json")) | |
| #inp = json.load(open("file145")) | |
| #print inp | |
| turn = 0 | |
| curPage = 0 | |
| lastPage = 0 | |
| while turn <= inp['time']: | |
| if len(inp['switches']) > 0: |
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 __future__ import division | |
| import datetime, hashlib, math | |
| inp = open("file1325.txt").read().strip() | |
| # split to sections | |
| inp = inp.split("\r\n\r\n") | |
| timeRate = [] | |
| inp[0] = inp[0].split("\r\n") | |
| for x,i in enumerate(inp[0]): |
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
| input = "\x4c\x9a\x59\x3a\x35\x89\x91\x24\x5a\x9a\x5d\x3a\x35\x29\x95\x2b\x53\x8c\x35\xba\x94\xca\xd5\x2d\x4d\xae\x59\x92\x45\x6a\xd1\x21\x4c\x9a\x59" | |
| #input="\x53\xac\x3d\x7a\xc4" | |
| pos = 0 | |
| out="" | |
| for i in input: | |
| # do a circular right shift | |
| b = list(bin(ord(i)).split("0b")[1]) | |
| # pad to 8 bits | |
| while len(b) < 8: | |
| b.insert(0, "0") |
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 jinja2 import Environment, FileSystemLoader | |
| from glob import glob | |
| from os.path import basename | |
| env = Environment(loader=FileSystemLoader('template')) | |
| for i in glob("template/*.j.html"): | |
| output = env.get_template(basename(i)).render() | |
| open("output/" + basename(i).replace(".j.html", ".html"), "w").write(output) |
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
| <?php | |
| $WANT = array( | |
| "65902", // Kami-sama no Memo-chou | |
| "68218", // Mayo Chiki! | |
| "50052", // Madoka Magica | |
| "53225", // Hidan no Aria | |
| "69900", // Mawaru Penguindrum | |
| "50459", // GOSICK | |
| "58315", // Steins;Gate | |
| ); |
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> | |
| int score; | |
| int main(void){ | |
| printf("Your score: "); | |
| scanf("%d", &score); | |
| if(score>100){ | |
| printf("You cheat!"); | |
| }else{ | |
| if(score>79){ | |
| printf("Grade 4"); |
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 commands, os,stat | |
| c=commands.getoutput("find .") | |
| c=c.split("\n") | |
| #644 | |
| ro = stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH | |
| #775 | |
| rw = stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH | |
| for i in c: | |
| #if i == ".": continue | |
| if os.path.isfile(i): |
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 random | |
| print "1000000" | |
| for i in range(1000000): | |
| print random.randrange(1,1000000) |
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
| whs-macbook-pro :: ~ 1 » brew doctor | |
| /usr/local/Library/Homebrew/global.rb:43: warning: Insecure world writable dir /usr/local/share in PATH, mode 040777 | |
| /usr/local/bin/brew:74: warning: Insecure world writable dir /usr/local/share in PATH, mode 040777 | |
| /usr/local/Library/Homebrew/global.rb:43: warning: Insecure world writable dir /usr/local/share in PATH, mode 040777 | |
| /usr/local/bin/brew:74: warning: Insecure world writable dir /usr/local/share in PATH, mode 040777 | |
| Unbrewed dylibs were found in /usr/local/lib. | |
| If you didn't put them there on purpose they could cause problems when | |
| building Homebrew formulae, and may need to be deleted. |