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
__module_name__ = "Twitch Formatter" | |
__module_version__ = "2.16.4" | |
__module_description__ = ( | |
'(irc.twitch.tv) Subscription notifications, name shortening, user "badges", and more' | |
) | |
""" | |
By @Davarice | |
Formatting plugin for use with HexChat and Twitch.TV |
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
from numpy import random as npr | |
SECRET = [npr.randint(1,7) for _ in range(4)] | |
TURN = 0 | |
guesses = [] | |
def tryseq(sequence): | |
""" | |
[2, 2, 5, 4] for example | |
:type sequence: list |
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 python3 | |
"""A semi-interactive tool to manipulate the contents of a video file using | |
FFprobe and FFmpeg. | |
Provide a file and it will be analyzed with FFprobe. A prompt will then be | |
provided to allow interactive renaming of streams in the file. An empty | |
Input to the prompt will run the FFmpeg Command and move on to the next | |
File. | |
Created because I am too dumb to memorize all the options FFmpeg has. |
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
from itertools import product | |
_hexd = "0123456789ABCDEF" | |
# Pairs of Hexadecimal Digits as Unicode Characters. | |
byte_pairs = tuple(map("".join, product(_hexd, _hexd))) | |
# Braille Characters. The Index of each Character is also its Integer Value. |
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
"""Small Module providing text "conversion" into a pseudo-Middle-English style. | |
Based mostly, but loosely, on the orthography of Middle English c. AD 1150. | |
""" | |
from functools import partial | |
from re import compile | |
from typing import Any, Callable, Dict, Match, Union | |
__all__ = ("antiquate", "SubMap") |
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
"""RxFmt: Implements a factory function to convert a Regular Expression Pattern, | |
a String, and a Dict into a new function. The new function takes a String, | |
breaks it into the groups in the Pattern, and formats the groups into a new | |
String. | |
Example: | |
>>> hl = reformatter( | |
... r"(?P<INDEX>\d+)\W*(?P<WORD>.*)", # RegEx Pattern defining named groups. | |
... "{WORD} : {INDEX:0>3}", # Python String taking the groups as fields. | |
... {"WORD": str.upper} # (Optional) Dict mapping group names to functions. |
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
function color() { | |
reset=(reset) | |
if ( [[ -z "$1" ]] || [[ "$@" == "$reset" ]] ); then | |
echo -en "\e[0m" | |
else | |
style=22 | |
class=3 | |
color=0 |