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/bash | |
set -eux | |
# DANGER THROUGHOUT | |
dir="${1:-output}" | |
# Consecutive whitespace | |
find "$dir" -type f -regex '.*\.\(html\|js\|css\)$' -exec sed -i -E -e 's/^\s+//g' \ |
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 local M3U playlists into YouTube as playlist. | |
The script accepts one argument, path to an M3U playlist, such as one produces with: | |
find mp3/genre/directory -type f > My_genre_name_playlist_name.m3u | |
It then searches for the best video match to each item in the playlist | |
and adds it to a newly created PRIVATE YouTube playlist bearing the | |
M3U playlist file name. |
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 -*- | |
#VERSION: 2.0 | |
#AUTHORS: Joost Bremmer (toost.b@gmail.com) | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/bash | |
set -e | |
if [ $# != 0 ]; then | |
echo "Usage: $(basename "$0") | |
This program accepts no arguments. It takes all the *.mp3 files | |
in the current directory and makes them louder by first detecting | |
their mean and max volumes and then amplifying the mean volume by |
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
""" | |
unittest.TestSuite module that recursively loads all doctests from my package | |
""" | |
from doctest import DocTestSuite, ELLIPSIS, NORMALIZE_WHITESPACE | |
SKIP_DIRS = ( | |
'MyPackage/unimportable-modules/', | |
'MyPackage/skip_this_too', |
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 module provides the Null class for the null object design pattern. | |
""" | |
from collections import MutableMapping, MutableSequence | |
class _MetaNull(type): pass | |
class Null(type): | |
"""Null object design pattern. |