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 bash | |
| for line in $(cat .env); do | |
| eval "export $line" | |
| done |
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 json | |
| import logging.config | |
| import os | |
| # https://docs.python.org/3/howto/logging-cookbook.html#configuring-filters-with-dictconfig | |
| class MaxLevelFilter(logging.Filter): | |
| def __init__(self, level=None): | |
| super().__init__() | |
| self.level = level |
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
| [flake8] | |
| exclude = | |
| __pycache__, | |
| build, | |
| dist, | |
| mocks, | |
| venv | |
| ignore = | |
| F405, | |
| F403 |
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
| """ | |
| This script counts the word frequencies in a given text-file | |
| (via argv) and outputs it as a descending list. | |
| Further steps for production: | |
| * code review | |
| * exception handling (e.g. unexpected encoding) | |
| * integrate with tests | |
| """ |