Skip to content

Instantly share code, notes, and snippets.

View peterarnott's full-sized avatar

Peter peterarnott

View GitHub Profile
@peterarnott
peterarnott / config.yml
Created April 19, 2012 11:12
config.yml setup
permissions:
glass.drops.allowed:
default: false
@peterarnott
peterarnott / index.html
Created July 7, 2012 06:11
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Flip Clock &middot; CodePen</title>
<style>
@peterarnott
peterarnott / quests.yml
Created July 16, 2012 09:23
Citizens quests.yml
"Slime Slaying":
texts:
description: "<g>Start Breifing:<br><Agent37> We need to clear up this slime problem in the Southern District.
<br>It's getting out of control! We MUST clear it up!
<br> Your mission is to destroy 12 slimes and then report back to me!
<br>&6Quest: <g>The Slime Slayer, Part 1
<br>&6Objective: Destroy 12 slimes."
acceptance: "<Agent37> Welcome to your first assignment, <name>. Good luck.
<delay=40>&6Quest: <g>The Slime Slayer, Part 1 &6started!
<delay=40><g>Remember, you can use &6/quest status <g>to check your progress."
@peterarnott
peterarnott / quests.yml
Created July 16, 2012 10:45
New citizens quest
"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!
@peterarnott
peterarnott / index.html
Created July 19, 2012 13:47
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Light Loader &middot; CodePen</title>
<!--
Copyright (c) 2012 maheshbabu, http://codepen.io/maheshbabu
Permission is hereby granted, free of charge, to any person obtaining
@peterarnott
peterarnott / smiley.py
Created August 14, 2012 11:23
Thank-you for submitting your script.
yorn = raw_input("Do you want to see a smiley face? Y/N\n")
face = '''
__ooooooooo__
oOOOOOOOOOOOOOOOOOOOOOo
oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo
oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo
oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo
oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo
oOOOOOOOOOOO* *OOOOOOOOOOOOOO* *OOOOOOOOOOOOo
@peterarnott
peterarnott / gist:3402323
Created August 20, 2012 08:39
LolCode fizzbuzz
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"
@peterarnott
peterarnott / fizzbuzz.py
Created August 21, 2012 01:38
My FizzBuzz script: Smaller is better, not following best practises! (score 105)
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
@peterarnott
peterarnott / challenge.py
Created August 27, 2012 10:36
My solution to the week5 challenge
#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]))
@peterarnott
peterarnott / ban.py
Created February 24, 2013 11:43
A python example of accessing the panda api.
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)