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
#!/usr/env/bin python | |
# -*- coding:utf-8 -*- | |
""" | |
This module extracts salsa-related features on-the-fly (CPU). | |
Inspired by the original SALSA implementation: | |
github.com/thomeou/SALSA/blob/master/dataset/salsa_lite_feature_extraction.py | |
(MIT License) |
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
#!/usr/bin python | |
# -*- coding:utf-8 -*- | |
""" | |
""" | |
import numpy as np | |
import h5py |
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
#!/usr/env/bin python | |
# -*- coding:utf-8 -*- | |
""" | |
Interactive plot for visual inspection: | |
Complex vectors are plotted as lines on a 3D space, such that 2 dimensions are | |
the real and imaginary components, and the third dimension goes through the | |
vector values (could be e.g. time or frequency). |
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
""" | |
Wiener deconvolution study. | |
Copyright (C) 2021 aferro (ORCID: 0000-0003-3830-3595) | |
This program is free software: you can redistribute it and/or modify |
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
""" | |
HSV image histogram script. | |
""" | |
import os |
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
#!/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 |
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
#!/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 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
(//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 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
# -*- 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 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
# -*- 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``. |