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
class Player | |
def initialize | |
@max_health = 20 | |
@last_health = @max_health | |
@taking_damage = false | |
@directions = [:backward, :forward] | |
@current_direction = :forward | |
@reached_wall = false | |
end | |
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 | |
import os | |
from pdb import Pdb | |
banner = """Usage: | |
%(command)s @<module>:<linenumber> ... <filename> <args> | |
Use @<module>:<linenumber> to set one or multiple breakpoints. | |
<module> may be an absolute path to a module file, or relative to sys.path. |
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
>>> def wat(obj): | |
... sys.stdout.write("WAT") | |
... | |
>>> sys.displayhook = wat | |
>>> "I broke the REPL" | |
WAT>>> |
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 colibri.feeds.tasks import generate_olx_feed_task | |
>>> generate_olx_feed_task() | |
[09/Jan/2014 16:20:22] INFO Generating OLX feed for angelaalvesimoveis.com.br... | |
[09/Jan/2014 16:20:27] INFO Saved OLX feed at /Users/hcarvalhoalves/Projetos/colibri/media/cache/feeds/4086.xml | |
[09/Jan/2014 16:20:27] INFO Generating OLX feed for brewimoveis.com.br... | |
[09/Jan/2014 16:20:30] INFO Saved OLX feed at /Users/hcarvalhoalves/Projetos/colibri/media/cache/feeds/2944.xml | |
[09/Jan/2014 16:20:30] INFO Generating OLX feed for bomimoveis.com.br... | |
[09/Jan/2014 16:20:42] INFO Saved OLX feed at /Users/hcarvalhoalves/Projetos/colibri/media/cache/feeds/3409.xml | |
[09/Jan/2014 16:20:42] INFO Generating OLX feed for flavioelecyimoveis.com.br... | |
[09/Jan/2014 16:20:45] INFO Saved OLX feed at /Users/hcarvalhoalves/Projetos/colibri/media/cache/feeds/1446.xml |
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
$ tail -f /var/log/celery/live-celeryd.log | |
[2014-01-09 17:24:59,335: INFO/MainProcess] Saved OLX feed at /mnt/local/live/media/cache/feeds/olx-2288.xml | |
[2014-01-09 17:24:59,339: INFO/MainProcess] Generating OLX feed for negociaoimoveis.com.br... | |
[2014-01-09 17:25:00,207: INFO/MainProcess] Saved OLX feed at /mnt/local/live/media/cache/feeds/olx-2788.xml | |
[2014-01-09 17:25:00,210: INFO/MainProcess] Generating OLX feed for insigniaci.com.br... | |
[2014-01-09 17:25:02,054: INFO/MainProcess] Saved OLX feed at /mnt/local/live/media/cache/feeds/olx-3418.xml | |
[2014-01-09 17:25:02,057: INFO/MainProcess] Generating OLX feed for imoveisbaixada.com.br... | |
[2014-01-09 17:25:03,385: INFO/MainProcess] Saved OLX feed at /mnt/local/live/media/cache/feeds/olx-4174.xml | |
[2014-01-09 17:25:03,389: INFO/MainProcess] Generating OLX feed for mundialimoveis.net.br... | |
[2014-01-09 17:25:11,698: INFO/MainProcess] Saved OLX feed at /mnt/local/live/media/cache/feeds/olx-3354.xml |
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 System.Environment (getArgs, getProgName) | |
import System.Exit (exitFailure, exitSuccess) | |
import System.IO | |
import Network | |
import Control.Concurrent | |
import Text.Read | |
echoCommand :: Handle -> [String] -> IO () | |
echoCommand handle cmd = do | |
hPutStrLn handle (unwords $ tail cmd) |
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 sqlalchemy import types | |
from sqlalchemy.sql.expression import func, text | |
from geoalchemy2 import functions as geofunc | |
from geoalchemy2.elements import WKTElement | |
class Coordinate(types.TypeDecorator): | |
impl = Geometry | |
def process_bind_param(self, value, dialect): |
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 | |
ALPHABET = 'ABCDEGHKLPQRSTUVWXYZ' + '23456789' | |
ALPHABET_REVERSE = dict((c, i) for (i, c) in enumerate(ALPHABET)) | |
BASE = len(ALPHABET) | |
START_FROM = 1 | |
def encode(n): | |
n = n * START_FROM |
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 | |
ALPHABET = 'ABCDEGHKLPQRSTUVWXYZ' + '23456789' | |
ALPHABET_REVERSE = dict((c, i) for (i, c) in enumerate(ALPHABET)) | |
BASE = len(ALPHABET) | |
START_FROM = 1 | |
def encode(n): | |
n = n * START_FROM |
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
Kerbal Space Program - 0.25.0.642 (OSXPlayer) Steam | |
OS: Mac OS X 10.10.0 | |
CPU: Intel(R) Core(TM)2 Duo CPU P8800 @ 2.66GHz (2) | |
RAM: 8192 | |
GPU: NVIDIA GeForce 320M OpenGL Engine (256MB) | |
SM: 30 (OpenGL 2.1 [2.1 NVIDIA-10.0.19 310.90.10.05b12]) | |
RT Formats: ARGB32, Depth, ARGBHalf, RGB565, ARGB4444, Default, DefaultHDR, ARGBFloat, RGFloat, RGHalf, RFloat, RHalf, R8 |