This file contains 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
#!/bin/env python | |
# This work is licensed under the terms of the MIT license. | |
# For a copy, see <https://opensource.org/licenses/MIT>. | |
""" | |
A hook to git that removes orphan files "*.pyc" and "*.pyo" for "*.py" | |
beeing deleted or renamed by git checkout. It also removes their empty parent | |
directories. | |
Place it to "my_local_repository/.git/hooks/post-checkout" and make it executable. | |
Nothing is cleaned for .py files deleted manually or by "git rm" etc. | |
Related to http://stackoverflow.com/q/1504724/448474 |
This file contains 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 argparse | |
import glob | |
import logging | |
import multiprocessing as mp | |
import os | |
import time | |
import cv2 | |
from medium_facenet_tutorial.align_dlib import AlignDlib |
This file contains 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
""" | |
A common use case in a Fabric script is to: | |
1. Activate the virtualenv | |
2. cd to the project dir | |
Here is a simple context manager to achieve this with a one line with statement: | |
""" | |
# fabconfig.py | |
def dev(): |
NewerOlder