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
| def on_created(self, event): | |
| file_size = -1 | |
| while file_size != os.path.getsize(event.src_path): | |
| file_size = os.path.getsize(event.src_path) | |
| time.sleep(1) | |
| self.process(event) |
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 sys | |
| import time | |
| from watchdog.observers import Observer | |
| from .events import ImagesEventHandler | |
| class ImagesWatcher: | |
| def __init__(self, src_path): | |
| self.__src_path = src_path | |
| self.__event_handler = ImagesEventHandler() |
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 os | |
| from PIL import Image | |
| from PIL.ImageOps import grayscale | |
| from watchdog.events import RegexMatchingEventHandler | |
| class ImagesEventHandler(RegexMatchingEventHandler): | |
| THUMBNAIL_SIZE = (128, 128) | |
| IMAGES_REGEX = [r".*[^_thumbnail]\.jpg$"] | |
| def __init__(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
| $ wget ...cuda-repo-ubuntu1404_7.5-18_amd64.deb | |
| $ sudo dpkg -i /tmp/cuda-repo-ubuntu1404_7.5-18_amd64.deb | |
| $ rm -f /tmp/cuda-repo-ubuntu1404_7.5-18_amd64.deb | |
| $ wget ...nvidia-machine-learning-repo_4.0-2_amd64.deb | |
| $ sudo dpkg -i /tmp/nvidia-machine-learning-repo_4.0-2_amd64.deb | |
| $ rm -f /tmp/nvidia-machine-learning-repo_4.0-2_amd64.deb | |
| $ sudo apt-get install digits |
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
| NUMBER_OF_CORES=4 | |
| sudo apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev | |
| sudo apt-get install -y --no-install-recommends libboost-all-dev | |
| sudo apt-get install -y libatlas-base-dev | |
| sudo apt-get install -y python-dev | |
| sudo apt-get install -y python-pip git | |
| sudo apt-get install -y libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler | |
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
| [user] | |
| name = xxxx | |
| email = xxxx | |
| [github] | |
| user = xxxx | |
| token = xxxx | |
| [web] | |
| browser = google-chrome | |
| [core] | |
| excludesfile = /Users/alfakini/.gitignore |