Skip to content

Instantly share code, notes, and snippets.

View iluxame's full-sized avatar

Ilia Meerovich iluxame

View GitHub Profile
from click import command, option, Option, UsageError
class MutuallyExclusiveOption(Option):
def __init__(self, *args, **kwargs):
self.mutually_exclusive = set(kwargs.pop('mutually_exclusive', []))
help = kwargs.get('help', '')
if self.mutually_exclusive:
ex_str = ', '.join(self.mutually_exclusive)
kwargs['help'] = help + (
@iluxame
iluxame / byte-sizetuts.md
Created December 28, 2016 13:24 — forked from honkskillet/byte-sizetuts.md
A series of golang tutorials with youtube videos.
@iluxame
iluxame / iterm2.md
Created August 2, 2016 08:06
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
Go to Split Pane by Order of Use + ] , + [
>>> import time
>>> def test():
... """Comapring concat. + vs list.extend vs +="""
... x = range(10000000)
... y = range(10000000)
... x0 = time.clock()
... z = x + y
... t1 = time.clock() - x0
... x1 = time.clock()
... x.extend(y)
@iluxame
iluxame / Python_game_code_coverage
Last active August 29, 2015 14:14
python game code coverage example
Game setup - woרks with Fedora:
1. Download game:
wget -O ardentryst1.71.tar.gz http://goo.gl/fJnyAs
2. Install Pygame:
Fedora: sudo yum install pygame
3. Untar game:
tar -xzvf ardentryst1.17.tar.gz
4. cd ardentryst1.17