Skip to content

Instantly share code, notes, and snippets.

View encukou's full-sized avatar

Petr Viktorin encukou

  • Python Software Foundation
  • Czech Republic
  • 13:13 (UTC +02:00)
View GitHub Profile
Always Look on the Bright Side of Life
(words and music by Eric Idle)
Some things in life are bad
They can really make you mad
Other things just make you swear and curse.
When you're chewing on life's gristle
Don't grumble, give a whistle!
And this'll help things turn out for the best...
HEIGHT = 25;
DIAMETER = 60;
cylinder (HEIGHT, d=DIAMETER);
import random
from microbit import display, Image, sleep
def mk_anim(bits):
bits = bits.replace(':', '')
return [int(b) for b in bits]
def do_anim(values, animation):
values = mk_anim(values)
# A header-only library has no debuginfo
%global debug_package %{nil}
Name: py3c
Version: 0.6
Release: 2%{?dist}
Summary: Guide and compatibility macros for porting extensions to Python 3
# Licences differ for subpackages
License: MIT and CC-BY-SA
From e8703b44f9388d7db98fd581db68322ebd107f15 Mon Sep 17 00:00:00 2001
From: Petr Viktorin <[email protected]>
Date: Wed, 11 May 2016 12:04:32 +0200
Subject: [PATCH] Add Python 3 subpackage
---
python-datanommer-models.spec | 80 ++++++++++++++++++++++++++++++++++++++-----
1 file changed, 71 insertions(+), 9 deletions(-)
diff --git a/python-datanommer-models.spec b/python-datanommer-models.spec
#! /usr/bin/python3 -O
# finite_function_recursion:lazy_runtime_recoding:raw_unicode_escape
from functools import partial
def main():
"""Print an encouraging message to stdout"""
print()
for m in get_strings():
@encukou
encukou / 0_tables
Last active August 29, 2015 14:13 — forked from Sanqui/0_tables
map
"A specific physical instance of a location_area"
* width
* height
location_map
"A game-specific physical instance of a location_area"
* location_area
* version
* map
@encukou
encukou / pyvo.md
Last active August 29, 2015 14:05 — forked from honzajavorek/pyvo.md

Pyvo v Brně

Kronika: http://lanyrd.com/series/brno-pyvo/

2011

  • Ruby sraz v Brně, dotaz na Twitteru zda existuje Python sraz (odpověď: neexistuje, založ)
  • Při hledání názvu jsem se dověděl, že Rasťo Turek založil v Bratislavě Pyvo a Pyoniery - řekl jsem si, že nic lepšího nevymyslím
  • 26.4. sraz u stolečku ve Falku, kam přišlo 8 lidí a bavili jsme se o všem možném
  • další Pyva s přednáškami
#! /usr/bin/env python3
# Python 3.4+
import inspect
def fix_public_signature(func):
"""Remove private arguments from the signature of a function
Private arguments are keyword-only, and prefixed by an underscore.
"""
@encukou
encukou / mrkac.py
Created June 6, 2014 12:37
asyncio blinkers
#! /usr/bin/python3
# for an async presentation at Ostravské Pyvo, 2014-06-05
# - http://srazy.info/pyvo-v-ostrave/4591
# - http://lanyrd.com/2014/ostrava-pyvo-june/
import random
import time
import asyncio