Skip to content

Instantly share code, notes, and snippets.

View dvershinin's full-sized avatar
🏠
Working from home

Danila Vershinin dvershinin

🏠
Working from home
View GitHub Profile
@fawix
fawix / verbose.py
Created April 13, 2017 13:34
Python - Verbose Flag
#!/usr/bin/python
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-v', '--verbose', action='count', default=0)
for c in ['', '-v', '-v -v', '-vv', '-vv -v', '-v -v --verbose -vvvv']:
print parser.parse_args(c.split())
@tanbro
tanbro / remake_pyconly_wheel.py
Last active February 21, 2020 02:24
A small tool Re-Pack a Python Wheel to a PYC-Only One
# -*- coding: utf-8 -*-
"""
Re-Pack `Wheel` to a PYC-Only One
"""
from __future__ import print_function, unicode_literals
import argparse
import compileall