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
package main | |
import ( | |
"fmt" | |
"math" | |
"os" | |
"strings" | |
) | |
func hash(id string) uint64 { |
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
<body onload="u=l=m.getContext`2d`;onkeydown=e=>k=e.which-38;setInterval(`l||b>w?(q=k=l=0,a=p=v=50,b=5e2,c=d=2):p+=k*2;m.width=m.height=w=610;a+=c-=a<0|a>w?2*c:0;b-=d-=b<0|(a>p&a<p+v&b>590)?d*2:0;for(i=-1;++i<30;x=i%10*60,y=~~(i/10)*20,!(q&2**i)&&${f='u.fillRect('}x,y,v,j=15),x<a&a<x+v&b>y&b<y+j&&(q|=2**i,d=-d));${f}p,590,v,j);${f}a,b,9,9)`,9)"><canvas id=m> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<canvas></canvas> | |
<script> | |
const canvas = document.querySelector("canvas"); | |
const ctx = canvas.getContext("2d"); |
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 json, requests, re | |
def main(): | |
print(page_length("Ivory_Coast", True)) | |
countries = json.loads(open("countries.json", "r").read()) | |
for country in countries: | |
link = country[1].split("wiki/")[1] | |
length = page_length(link, True) | |
print(country[0], length) | |
results = open("results.txt", "a") |
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, json, re | |
def main(): | |
states = [l.split(",") for l in open("states.txt", "r").read().split("\n")] | |
state_codes = {l.split(",")[0].lower(): l.split(",")[1].lower() for l in open("state_codes.csv", "r").read().split("\n")} | |
pops = {l.split(",")[0].lower(): int(l.split(",")[1]) for l in open("pops.csv", "r").read().split("\n")} | |
styling = "" | |
lengths = {} | |
ratios = [] | |
for state in states: |
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
California: 977223 | |
Etymology of California: 1749 | |
Island of California: 34471 | |
History of California: 445195 | |
Indigenous peoples of California: 176626 | |
California Republic: 448276 | |
Conquest of California: 204275 | |
History of California 1900%E2%80%93present: 450400 | |
Geography of California: 122299 | |
Climate of California: 268471 |
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
California: 5810441 | |
Texas: 4097857 | |
Florida: 3797057 | |
New York: 5655709 | |
Pennsylvania: 3110247 | |
Illinois: 3240734 | |
Ohio: 3532898 | |
Georgia: 2651432 | |
North Carolina: 3688125 | |
Michigan: 1977142 |
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, json, re | |
def main(): | |
states = [l.split(",") for l in open("states.txt", "r").read().split("\n")] | |
state_codes = {l.split(",")[0].lower(): l.split(",")[1].lower() for l in open("state_codes.csv", "r").read().split("\n")} | |
styling = "" | |
for state in states: | |
length = page_length(state[0], True) | |
print(f"{state[1].title()}: {length}") | |
styling += f".{state_codes[state[1]]} {{fill: {get_color(length)};}}\n" |
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
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c> |