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
""" | |
Un petit script pour rendre plus intuitif le chiffrement et/ou | |
la signature d'un message avec GPG. | |
Dépendances : | |
$ pip3 install python-gnupg npyscreen humanfriendly | |
""" | |
# To package this into a standalone program, see "pyinstaller" (https://www.pyinstaller.org/): `pyinstaller easycrypt.py`. |
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 file contains localized names of weekdays and months and the first day of week's index in 714 locales. | |
Shape: | |
{ | |
str (locale's name): { | |
"days": list[str*7], | |
"months": list[str*12], | |
"first_week_day": int | |
}, | |
... |
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 returns a string of a number in letters (**in french**) from a positive integer. | |
$ python3 number.py 1254 | |
mille deux-cent cinquante-quatre | |
It works for numbers from 0 to 999 999 999 999 (1 trillion minus 1). | |
""" | |
import sys |
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
{ | |
"2003": [ | |
{ | |
"children": [ | |
{ | |
"children": [ | |
{ | |
"children": [ | |
{ | |
"children": [], |
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
# To place in ~/.weechat/python/autoload/ | |
import weechat | |
import pynotify | |
APP_NAME = "JoinNotificator" | |
AUTHOR = "rezemika" | |
__version__ = "0.1.0" | |
weechat.register( |
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 gist contains some useful things which are frequently used in Python or are boring to copy by hand. | |
Index: | |
- L11-L45 : ANSI characters to color and format outputs to Linux terminals. | |
- L47-L100 : Weekdays and months names. | |
Feel free to post any idea or suggestion! | |
""" |
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
# citeabook.py | |
# | |
# Licence AGPLv3 by rezemika. | |
# | |
import sys | |
import requests | |
import datetime | |
# TODO : Check ISBN. |
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 python3 | |
""" | |
Outputs to stdin a quote-like text from a Weechat screen. | |
How to use this script? | |
./weechat_converter.py --help | |
--aligned Aligns all reply starts |
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 python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Table and HorizontalHistogram are two simple Python classes. | |
The first make it easy to use a table, allowing, for example, | |
to vertically align several string elements. | |
The second allows to create an ASCII art horizontal histogram |