Table of Contents generated with DocToc
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(): |
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
#!/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
# Remove anything linked to nvidia | |
sudo apt-get remove --purge nvidia* | |
sudo apt-get autoremove | |
# Search for your driver | |
apt search nvidia | |
# Select one driver (the last one is a decent choice) | |
sudo apt install nvidia-370 |
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
#!/usr/bin/env bash | |
# Update PHP Repo | |
sudo rm /etc/apt/sources.list.d/ondrej-php5-5_6-trusty.list | |
sudo add-apt-repository -y ppa:ondrej/php | |
sudo apt-get -y update | |
# Remove PHP 5.6 | |
sudo apt-get --remove purge -y php5 php5-cli php5-curl php5-gd php5-intl php5-mcrypt php5-memcached php5-mysqlnd php5-readline php5-sqlite php5-cgi php5-common php5-fpm php5-imagick php5-json php5-memcache php5-mongo php5-pgsql php5-redis php-pear | |
sudo apt-get -y autoremove |
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
# Start the old vagrant | |
$ vagrant init centos-6.3 | |
$ vagrant up | |
# You should see a message like: | |
# [default] The guest additions on this VM do not match the install version of | |
# VirtualBox! This may cause things such as forwarded ports, shared | |
# folders, and more to not work properly. If any of those things fail on | |
# this machine, please update the guest additions and repackage the | |
# box. |
- Linux - be proficient using Ubuntu for example and the CLI and understand how the shell works, what are environment variables, subshells, processes/tasks, etc...
- Docker (and docker-compose) - what are containers and how they work (conceptually) and how to create and run ones
- Git - what does version control system mean and how to use Git
- RDB (relational databases) - what are relational databases, and understand tables, how to create them and make relations between them as needed... also understand that through SQLite and PostgreSQL (preferred) or MySQL
- Python - how to write Python very well and understand its [OOP] implementation...
- Virtualenv - And how to create virtual environments for python to isolate it from the system's installed version...
- Virtualenvwrapper to manage virtual environments easily
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
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |
OlderNewer