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
"""This file performs some basic interfacing in Python 2: | |
1. Defining the methods that have to be overriden with the ABC module | |
2. Defining an input and output signature for those methods | |
3. Testing the validity of different implementations via unittest | |
Note the following: | |
!! In order to check the input/output signatures, the overriden methods have to be run once | |
at construction, which may be undesirable (usually this kind of interfacing happens within | |
a protocol that can take care of that). | |
""" |
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
declare -A table=(["2017_10_10_06_35_48"]="1507653643855 1507653618853 1507653549538 1507653656449 1507653643683 1507653657262" ["2017_10_10_04_08_29"]="1507644652041 1507644656963 1507644746592 1507644767765 1507644803720 1507645191645 1507645193645" ["2017_09_14_12_10_46_Anita"]="1505384055344 1505384056438 1505384060281 1505384062750 1505384067126 1505384067313 1505384072126 1505384073001 1505384073376 1505384074032 1505384074157 1505384074626 1505384198554 1505384226587 1505384228774 1505384257776 1505384260854 1505384260979 1505384267432" ["2017_09_14_12_19_08_Nida_aufs_Dach"]="1505384352176 1505384352333 1505384352489 1505384365130 1505384376787 1505384397522 1505384397710 1505384398304 1505384401147 1505384405273" ["2017_10_25_02_08_30"]="1508933312919 1508933312966 1508933313013 1508933313075 1508933313200 1508933313263 1508934104162 1508934104209 1508934104272 1508934104334 1508934104397 1508934104459 1508934105444 1508934105490 1508934105553 1508934105615 1508934105678 1508934312548" ["2017_09_14_11 |
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/python | |
# -*- coding: utf-8 -*- | |
""" | |
Given the paths to 2 wav audio files, this script tells whether one is a subset | |
of the other, and in which range. | |
Usage help: | |
python <THIS_SCRIPT> -h | |
""" |
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
# -*- coding:utf-8 -*- | |
""" | |
This module contains test cases regarding usage of Yahoo's ``graphkit`` | |
library for DAG-based computation: https://github.com/yahoo/graphkit | |
""" | |
import unittest |
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
# -*- coding:utf-8 -*- | |
""" | |
Python's duck typing system allows for very pleasant prototyping. But at some | |
point, it is convenient to enforce some interfacing. This can be achieved | |
Through abstract base classes and annotations to a great extent. | |
Another approach is to use dependency injection and inversion of control | |
patterns. This gist exemplifies how to do that using ``dependency_injector``. |
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
(defun kill-all-buffers () | |
(interactive) | |
(mapc 'kill-buffer (buffer-list))) | |
(defun simple-backtick () | |
(interactive) | |
(insert "``") | |
(backward-char 1)) | |
(defun double-backtick () |
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
# -*- coding:utf-8 -*- | |
""" | |
This script deals with extracting value-based masks from images in various ways. | |
At some point it might be sensible to use OpenCV to scale further up. | |
https://www.learnopencv.com/tag/inrange/ | |
Explanation of PIL HSV space: | |
https://pillow.readthedocs.io/en/latest/reference/ImageColor.html?highlight=hsv#color-names |
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
(//server config and start | |
Server.default = s; // = Server.internal; | |
s.options.memSize = 1500*1024;// up to 1500MB RAM allocable | |
s.reboot; | |
//s.quit; | |
) | |
( | |
//s.volume.gui; | |
//s.plotTree; |
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 python | |
# -*- coding: utf-8 -*- | |
""" | |
ATM commitizen just supports bumping via config file. Since we want a more | |
interactive approach, re-wrote the class with an explicit interface. | |
VRS=`python -c "from ml_lib import __version__ as v; print(v)"` | |
python ci_scripts/commitizen_bump.py -P ml_lib/_metadata.py -v $VRS --changelog | |
--dry_run |
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 python | |
# -*- coding: utf-8 -*- | |
""" | |
Self-contained script that exemplifies the implementation of a pseudo-schema | |
for Neo4j using py2neo. Specifically: | |
1. Defines some helper functions for typechecking and CRUD operations | |
2. Defines the base clase for the schema. Basically, it is a Node and |
OlderNewer