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
You open the blind-pack capsules and dump out the toys inside: | |
You acquire an item: tiny plastic Charity the Zombie Hunter | |
You acquire 2 tiny plastic fire servants | |
You acquire an item: tiny plastic Scott the Miner | |
You acquire an item: tiny plastic beebee queue | |
You acquire an item: tiny plastic cavebugbear | |
You acquire 2 tiny plastic the Free Men | |
You acquire 2 tiny plastic Queen Bees | |
You acquire 2 tiny plastic angry space marines | |
You acquire an item: tiny plastic Norville Rogers |
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
"""Parse the file at <http://hogsofdestiny.com/kol/pricegun/dailyprice.log>""" | |
from urllib2 import urlopen | |
def read_prices(lines): | |
"""Given an iterator yielding the lines of the input file, return a dictionary mapping item IDs to prices.""" | |
result = {} | |
for line in lines: | |
# Ignore comments | |
if line.startswith('#'): |
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
Traceback (most recent call last): | |
File "/usr/bin/sugar-activity", line 146, in <module> | |
main() | |
File "/usr/bin/sugar-activity", line 104, in main | |
module = __import__(module_name) | |
File "/home/liveuser/Activities/Maze(GTK3).activity/activity.py", line 6, in <module> | |
from gi.repository import Gtk | |
File "/usr/lib64/python2.7/site-packages/gi/__init__.py", line 23, in <module> | |
from ._gi import _API, Repository | |
ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',)) |
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
/** | |
* Prim's algorithm | |
* | |
* __(')< written by lambda fairy | |
* \___) | |
*/ | |
function reset_graph(g) { | |
function reset(thing) { | |
thing.set_type(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
/** | |
* Extremely inefficient priority queue. | |
* | |
* In a real program this would probably be implemented as a heap, | |
* but this is good enough for this demonstration. | |
*/ | |
function PQueue(comparator) { | |
this.comparator = comparator || function(x, y) { return x - y } | |
this.array = [] | |
} |
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 Data.Vector.Unboxed as V | |
main :: IO () | |
main = print $ sumVector ones | |
sumVector :: (Num a, Unbox a) => Vector a -> a | |
sumVector = V.foldl' (+) 0 | |
{-# NOINLINE ones #-} | |
ones :: Vector Int |
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
#!/usr/bin/env python | |
""" | |
---------------- | |
Treasure Chest | |
---------------- | |
\ ^__^ | |
\ (oo)\_______ | |
(__)\ )\/\ | |
||----w | |
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
--[[ | |
parallel2 - a better parallel module | |
==================================== | |
@author Lambda Fairy (https://github.com/lfairy) | |
**parallel2** is a complete rewrite of the ComputerCraft parallel API. | |
It gives you many features over the original, including: |
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
-- | Solution for Lab 6 Exercise 2 | |
module Temperatures where | |
import Control.Applicative | |
import Control.Arrow | |
import Data.Char | |
import Text.Printf | |
type Row = [Double] |
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
#!/usr/bin/env python | |
from argparse import ArgumentParser | |
from collections import namedtuple | |
import os | |
import requests | |
import yaml | |
TECHNIC_URL = 'https://github.com/TechnicPack/Technic/raw/master' |