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
// ==UserScript== | |
// @name Re-add puzz.link's | |
// @namespace https://gist.github.com/phenomist/0383895d93aabba00b46fed8f9954f49 | |
// @version 0.2 | |
// @description Re-add puzz.link's link interface | |
// @author phenomist | |
// @match https://puzz.link/db/* | |
// @grant none | |
// ==/UserScript== |
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
import copy | |
f = open("ltri8x8-34.psv") | |
a = f.read().split("\n") | |
orient_list = (((0,0),(0,1),(1,1)),((1,0),(0,1),(1,1)),((0,0),(1,0),(1,1)),((0,0),(0,1),(1,0))) | |
def boardgen(s): | |
board = [[0 for i in range(8)] for j in range(8)] | |
piece = 1 | |
for e in s.split("(")[2:]: | |
orientation = int(e[4]) |
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
import collections | |
moves = {"N":(-1,0),"E":(0,1),"W":(0,-1),"S":(1,0)} | |
def level_collection(lvnum): # Level collection including some variations found. | |
if lvnum == 11: | |
return [ | |
"#######", | |
"#@....G", | |
"#....X#", |
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
from collections import Counter as x,deque as y | |
def interpret(i): | |
j,u,t,s,g,h,k,r=0,0,x(),{43:(lambda a,b,c,d,e,f:(a+1,b+1,c,d)),45:(lambda a,b,c,d,e,f:(a+1,b-1,c,d)),62:(lambda a,b,c,d,e,f:(a+1,b,c+1,d)),60:(lambda a,b,c,d,e,f:(a+1,b,c-1,d)),46:(lambda a,b,c,d,e,f:(a+1,b,c,d+chr(b))),44:(lambda a,b,c,d,e,f:(a+1,ord(input()[0]),c,d)),91:(lambda a,b,c,d,e,f:(a+1+e*(b==0),b,c,d)),93:(lambda a,b,c,d,e,f:(a+1-f*(b!=0),b,c,d))},x(),x(),y(),"" | |
for e in range(len(i)): | |
if i[e]=="[":k.append(e) | |
if i[e]=="]":q=k.pop();h[e]=g[q]=e-q | |
while j<len(i):j,t[u],u,r=s[ord(i[j])](j,t[u],u,r,g[j],h[j]) | |
return r |
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
import sys | |
def hello_world(): | |
return ' '.join(map(lambda x:chr(ord(x[0])&223)+x[1:],sys._getframe().f_code.co_name.split("_"))) |
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
import re | |
def hello_world(): | |
x=y=1 | |
for i in [5, 2, 1, 1, 22, 6, 1, 5, 2, 1, 5, 3, 2, 1, 271, 3, 1, 3, 1, 1, 1]: | |
x,y=y,x+y*i | |
return ''.join(map(lambda x: chr(int(re.sub(r"\D","",str(x)))+30),zip(str(x*y)[::2],str(x*y)[1::2]))) |
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
import requests | |
f = open("buildinglist.csv", "w") | |
cookies = {"PHPSESSID":"insert", "phpbb2mysql_data":"cookies", | |
"phpbb2mysql_sid":"here"} #get your own cookies from inspecting network headers | |
player = "qwerqwerqwer" #replace with player running it (technically, the player whose cookies are used) | |
pemp = " Overpowered" #same thing | |
errorstreak = 0 |
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
from PIL import Image | |
f = open("buildinglist.csv") | |
colordict = {"Castle":(255,0,0), | |
"Gold Mine":(255,255,0), | |
"Iron Mine":(192,192,192), | |
"Sawmill":(128,64,0), | |
"Quarry":(64,64,64), | |
"Forge":(255,0,255), |
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
x = document.body.innerHTML.split("<table class=\"l\">")[1].split("</table>")[0].split("<td class=\"city\">"); | |
names = []; | |
counts = []; | |
for(i = 1; i < x.length; i++){ | |
z = x[i].split("</td>"); | |
names[i-1] = z[0]; | |
counts[i-1] = z.length-2; | |
} | |
x = "" | |
for(i = 0; i < names.length; i++){ |
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
import string | |
import operator | |
printable = set(string.printable) | |
f = open("5020.neat.csv", "rt", encoding='utf8') | |
g = open("elem3stats.txt", "w", encoding='utf8') | |
ff = f.read() | |
st = [i.split("@") for i in ff.split('\n')][0:4997] |