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 string | |
from collections import defaultdict | |
frequencies = defaultdict(int) | |
for line in open("book.txt"): | |
for word in line.lower().translate(None, string.punctuation).split(): | |
frequencies[word] += 1 | |
sortedlist = sorted(frequencies.items(), key=lambda x: (-x[1],x[0]), reverse=False) | |
with open('results.txt', 'w') as f: | |
for item in sortedlist: | |
formatted = "\"%s\": %d\n" % (item[0], int(item[1])) |
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
config: | |
version: 0.2 | |
worlds: | |
- ignoredworld | |
- alsoignored |
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
config: | |
version: 0.6 | |
creative-only: true | |
deny-drops: true | |
bypass: | |
use: true | |
permission: antidrops.bypass | |
block: | |
creative: | |
chest-use: true |
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 requests | |
player = raw_input("Player: ") | |
payload = {"format": "json", "player": player, "closed": "false"} | |
url = "http://urlredacted.com/api/v1/ban/" | |
r = requests.get(url, params=payload) |
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
#peterarenot | |
import requests; i = open("input.txt"); o = open("output.txt", 'w'); d = {} | |
for l in i.readlines(): d[l] = float(requests.get("http://finance.yahoo.com/d/quotes.csv", params={'s': l, 'f': 'j1'}).text[:-3]) | |
for k in sorted(d, key=d.get, reverse=True): o.write("%s - %sB\n" % (k.strip(), d[k])) |
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
n = input("Number Play To: "); i=0 | |
while i < n: | |
s=''; i+=1 | |
if i%3==0: s+='fizz' | |
if i%5==0: s+='buzz' | |
if s: print s | |
else: print 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
HAI | |
CAN HAS STDIO? | |
I HAS A VAR IZ 0 | |
IM IN YR LOOP | |
UPZ VAR!!1 | |
IZ VAR BIGR THAN 100? | |
GTFO. | |
KTHX | |
IZ VAR LEFTOVAR 15 LIEK 0? | |
VISIBLE "FIZZBUZZ" |
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
yorn = raw_input("Do you want to see a smiley face? Y/N\n") | |
face = ''' | |
__ooooooooo__ | |
oOOOOOOOOOOOOOOOOOOOOOo | |
oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo | |
oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo | |
oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo | |
oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo | |
oOOOOOOOOOOO* *OOOOOOOOOOOOOO* *OOOOOOOOOOOOo |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Light Loader · CodePen</title> | |
<!-- | |
Copyright (c) 2012 maheshbabu, http://codepen.io/maheshbabu | |
Permission is hereby granted, free of charge, to any person obtaining |
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
"Source Code": | |
texts: | |
description: "<g>Start Breifing:<br><Jeb_> Hello <name>! As you know my name is Jeb_ | |
<br>There are some problems with the minecraft code that I need Notch's help to fix | |
<br>Would you please go to the exit of pvp spawn and talk to him! You will need to give him | |
<br>an apple for him to help you. Good Luck! | |
<br>&6Quest: <g>Source Code, Part 1 | |
<br>&6Objective: Give Notch an apple" | |
acceptance: "<Jeb_> Thank you so much for helping me out! | |
<delay=40>&6Quest: <g>Source Code, Part 1 &6started! |
NewerOlder