Skip to content

Instantly share code, notes, and snippets.

View fanda's full-sized avatar

Pavel Novotný fanda

View GitHub Profile
@hnykda
hnykda / souhrnna-hlaseni.py
Created March 30, 2017 17:13
Super simple na miru sity skript pro souhrnna hlaseni
# priklad vstupniho XML souboru - je nutne si ho upravit dle sveho
"""<?xml version="1.0" encoding="UTF-8"?>
<Pisemnost nazevSW="EPO MF ČR" verzeSW="39.15.1">
<DPHSHV verzePis="01.02">
<VetaD d_poddp="29.03.2017" dokument="SHV" k_uladis="DPH" mesic="8" rok="2017" shvies_forma="R" />
<VetaP c_pop="379" c_pracufo="2401" c_ufo="455" dic="<DIC>" jmeno="Daniel" naz_obce="<A>" prijmeni="<PRIJMENI>" psc="<PSC>" stat="ČESKÁ REPUBLIKA" titul="Bc." typ_ds="F" ulice="<ULICE>" />
<VetaR c_rad="1" c_vat="<VAT>" k_pln_eu="3" k_stat="GB" pln_hodnota="<CASTKA>" pln_pocet="1" por_c_stran="1" />
</DPHSHV>
<Kontrola>
<Uzivatel jmeno="null" prijmeni="null" />
@mattbierner
mattbierner / life_comonadic.cpp
Created November 3, 2014 00:25
c++ Compile Time Comonaic Life
/**
* Conway's game of life implemented in C++ templates at compile time using Comonads.
*
* Logic based on: http://blog.emillon.org/posts/2012-10-18-comonadic-life.html
*/
#include <iostream>
/// Identity functor
template <typename X>
struct id {
@nutrun
nutrun / pimped_console_string.rb
Created November 17, 2010 19:50
Pimp my console strings
# Do something like: puts "ROCK".blink.bright.cyan
class String
def red
"\e[31m#{self}\e[0m"
end
def blue
"\e[34m#{self}\e[0m"
end