Skip to content

Instantly share code, notes, and snippets.

View encukou's full-sized avatar

Petr Viktorin encukou

View GitHub Profile
---
- pokemon: [Turtwig, Chimchar, Piplup]
level: 5
type: gift
version: [diamond, pearl, platinum]
is_starter: true
- pokemon: Eevee
level: 5
type: gift
@encukou
encukou / ioerror.py
Created June 5, 2011 15:47
IO error in Kivy
# Encoding: UTF-8
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.label import Label
from kivy.clock import Clock
from kivy.animation import Animation
class CountWidget(Widget):
@encukou
encukou / karty.txt
Created November 5, 2011 22:11
Poké Bang
Seznam karet vymyšlený na Čundru
Bang!=Útok
Mancato=Vedle
Birra=Potion
Saloon=Pokécentrum
WellsFargo=Obchoďák
@encukou
encukou / gist:1365007
Created November 14, 2011 20:16
Some ideas for a Resource class
from pyramid.decorator import reify
from pyramid.renderers import render
from pyramid.response import Response
class Resource(object):
"""A Pyramid resource
Resources are lightweight objects tied to a request. They provide URL
traversal and view rendering.
"""
@encukou
encukou / lolbot.py
Created November 15, 2011 20:14 — forked from e000/lolbot.py
(lambda n,s,I:n.classobj('h',(),dict(__init__=(lambda M,S,P,C:M.__dict__.update(
dict(R=(S,P),H=C,O=s.socket()))),C=(lambda M:(M.O.connect(M.R),setattr(M,'D',M.O
.makefile()),setattr(M,'S',(lambda l: M.O.send('%s\r\n'%l))),M.S("NICK hue"),M.S
("USER a b c d :LOL!"),setattr(M,'R',lambda n,m: M.S('PRIVMSG %s :%s'%(n,m))),M.
P())),G = (lambda M,S:S.split(' :',1)[1] if' :'in S else ''),P=(lambda M:next(I.
dropwhile((lambda Lu:((lambda L:((lambda: M.S("PONG :%s"%M.G(L))if L.startswith(
'PING')else(lambda P,G,S:({'001':(lambda: M.S('JOIN %s'%M.H)),'PRIVMSG':(lambda:
M.HC(L[1:].split('!',1),P[2],G[1:].split(),G)if G.startswith('!')else None)}.get
(P[1],lambda: None)())if len(P)>1 else None)(L.split(),M.G(L),M.O))()))(Lu.strip
()),True)[1]),iter(M.D)),None)),HC=(lambda M,(N,H),C,P,L: {'hello':lambda:M.R(C,
@encukou
encukou / README.rst
Created December 15, 2011 23:29 — forked from wolever/README.md
EMPMYMIP: Easily Maintain a PyPI Mirror of Your Important Packages!

EMPMYMIP: Easily Maintain a PyPI Mirror of Your Important Packages!

Status

EMPMYMIP seems to mostly kind of work for me. It might even do the same for you!

The implementation is kind of a huge hack, though, and it might very well

@encukou
encukou / migrate-bugs.py
Created January 6, 2012 23:50
TAVRTGBI (a giant ugly hack)
#! /usr/bin/env python
# Encoding: UTF-8
from __future__ import unicode_literals
# The Amazing veekun redmine-to-github bug importer!
# (i.e. a giant ugly hack)
# configurable parts are marked KNOB
-- Script by KazoWAR
--[[
it imports a team for you and the opponent
the pkm files should be in same directory as the script.
1.pkm - 6.pkm for your team, e1.pkm - e6.pkm for opponent.
save as 220 byte party encrypted pokemon.
run the script during the start of a battle animation scene (like mug shot, plazma symbol, pretty much as the music is playing for the battle in the overworld) before a battle.
--]]
@encukou
encukou / notes
Created October 7, 2012 11:04
tcup ideas
> tcup server github add
When I'm managing a GH project, I really want to sync everybody's repo.
See what people are building on top, even if they're not done or shy to create
an official PR.
When contributing, I want to know how my changes will conflict with a major
refactor one of the dozen core devs has waiting in their branch. (Only
discussed on IRC, too.)
See https://github.com/defunkt/github-gem for ideas
$ pokedex pkm
Convert binary Pokémon data (aka PKM files) to/from JSON/YAML.
usage: pokedex pkm (encode|decode) [options] <file> ...
Commands:
encode Convert a JSON or YAML representation of a
Pokémon to the binary format.
decode Convert the binary format to a JSON/YAML
representation.