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 zsh | |
| function latest_backup_id() { | |
| local branch="${1}" | |
| [[ "${branch}" == "" ]] && return 1 | |
| local prefix="${b}.backup" | |
| git branch --list --color=never "${prefix}*" \ | |
| | sed "s/^..${prefix}//" \ | |
| | sort -nr \ |
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
| @pytest.mark.parametrize("in_,out" [ | |
| ("k: v\n" , {"k": "v"}) | |
| , ("k: v\n" , {"k": "v"}) | |
| , ("k.k: foo" , {"k": {'k': "foo"}}) | |
| , ("k.k1: v\nk.k2: v2\nk1.k: v3", {"k": "v"}) | |
| ]) |
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 weakref | |
| import gc | |
| class Foo: | |
| def __init__(self, factory): | |
| self.factory = factory | |
| class Factory: | |
| def mk_foo(self): | |
| self.foo = Foo(self) |
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
| John Carmack | |
| December 29, 2016 at 2:18am · | |
| Someone just tweeted a little excerpt from this piece I wrote six years ago, and since the original location at the Armadillo Aerospace website is now down, I thought I would put it up here for posterity. | |
| I tried hard to be reasonable and inoffensive, and carefully place qualifiers, so hopefully this doesn't bring too many people to battle stations! | |
| ----------------------------------------------- | |
| John Carmack on 10-28-2010 |
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
| class Sess: | |
| def __init__(self, foo): | |
| self.foo = foo | |
| print("init Sess") | |
| class Lock: | |
| def __init__(self): | |
| print("init Lock") | |
| class AppC: |
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
| Josef Šlerka | |
| 5 hrs · | |
| Vychovali jsem monstra! | |
| Soňa s Táňou řeší už hodinu otázku, zda je NULA sudé číslo či nikoli. Shodnou se v odpovědi. Důkazy se ovšem liší. Soňa, ta menší, to dokazuje funkcionálně. Nule je podle ní to, co zajišťuje, že při dělení dvěma jsou 10, 20, 30 atd. vždy rozdělitené na přesné poloviny beze zbytku a tím pádem i 0/2 bude bezezbytku. Krkolomná, ale víceméně variace na 2k. | |
| Táňa oproti tomu tvrdí, že -1 a +1 jsou lichá čísla a tak musí být NULA sudá, prože přeci nebudou tři lichá čísla po sobě. OK, pěkný wittgensteinovský pohled. | |
| Můj pokus hodit do toho vidle poukazem na to, že NULA je vynález a třeba Římané ji neznali, rozproudil novou debatu. Táňa to označila za štěstí, protože kdyby nejdřív existovala NULA, pak by to byla katastrofa, protože od NULY by s přičtením NULY nedalo dostat dál. Zatímco přičítáním jedničky to jde. Soňa oproti tomu tvrdí, že je to jedno, protože samozřejmě čísel se vynalezlo nejdřív víc najednou, aby se od sebe mohly odlišit. | |
| Tak a ja jdu vařit večeři.... | |
| h |
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
| DĚVČÁTKO A CIHLY. | |
| Mladá rodinka s pětiletým děvčátkem se nastěhovala do domu vedle parcely, kde se stavěl nový dům. Děvčátko se začalo zajímat o vše, co se dělo v sousedství, a začalo si povídat se zedníky. Povídali si s ní a občas jí dali drobné práce, aby jí poskytli pocit důležitosti. Dokonce jí věnovali i pracovní rukavice a přilbu, což ji strašně těšilo. | |
| Na konci prvního týdne jí dali obálku s nějakými drobnými jako plat. Dítě vzalo výplatu pyšně domů a maminka navrhla, aby otevřeli na její jméno účet v bance. Paní v bance byla velmi nadšená, když jí děvčátko vykládalo o svojí práci na stavbě a že za to má dokonce i výplatu. | |
| „Určitě jsi pracovala velmi těžce, když jsi tohle všechno vydělala" | |
| "Ano, pracuji s Jožinem, Mirkem a Dušanem, budujeme velikánský dům!" | |
| "Bože můj", pokračovala paní, "A budeš na stavbě dělat i příští týden?" | |
| Děvčátko se zamyslelo a potom vážně prohlásilo: | |
| "Myslím, že jo .... tedy jestli ti čůráci ze stavebnin dovezou ty zkurvený cihly..." | |
| https://www.facebook.com/radouch09/posts/10 |
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
| Šéfredaktor: Včera byla uzávěrka! Kde mám ten text, ty zmrde? | |
| Redaktor: Sorry, byl jsem nemocnej. Už na tom makám. | |
| Šéfredaktor: Jdi do píči! Seš bez honoráře, nulo! | |
| Redaktor: Víš co, ty kundo, piš si ty sračky sám, vole! |
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
| {-# LANGUAGE FlexibleContexts #-} | |
| -- V1: | |
| -- divides x y = (==) 0 $ flip mod x y | |
| -- V2: | |
| -- | |
| -- divides :: Integral a => a -> a -> Bool | |
| -- divides x y = cmp $ mod_ x y | |
| -- where |
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
| % man nosetests | |
| % man nosetests | |
| % nose2 -s | |
| % man nosetests | |
| % man -k nose | |
| function::cpu_clock_ns (3stap) - Number of nanoseconds on the given cpu's clock | |
| function::gettimeofday_ns (3stap) - Number of nanoseconds since UNIX epoch | |
| function::local_clock_ns (3stap) - Number of nanoseconds on the local cpu's clock | |
| function::nsecs_to_string (3stap) - Human readable string for given nanoseconds | |
| function::read_stopwatch_ns (3stap) - Reads the time in nanoseconds for a stopwatch |