aly / start_weechat.py
0 likes
0 forks
1 files
Last active
A flask web server to start/stop weechat for a Glowing Bear connection. Intended for people who have push notifications set up in their bouncer that only come through when no clients are connected
| 1 | from flask import * |
| 2 | from subprocess import check_output, CalledProcessError |
| 3 | |
| 4 | app = Flask(__name__) |
| 5 | |
| 6 | @app.route('/') |
| 7 | def index(): |
| 8 | if request.args.get("pw", None) and request.args["pw"] == "somepassword": |
| 9 | if "start" in request.args: |
| 10 | try: |
aly / torrenttags.py
0 likes
0 forks
1 files
Last active
A script to look up claims on a torrent via TorrentTags.
| 1 | #!/usr/bin/env python3 |
| 2 | __usage__ = """ |
| 3 | usage: torrenttags [-h] [--html] hash |
| 4 | |
| 5 | positional arguments: |
| 6 | hash Torrent hash to look up |
| 7 | |
| 8 | optional arguments: |
| 9 | -h, --help show this help message and exit |
| 10 | --html Prints html response to stdout, includes Chilling Effects |
aly / compliment.b303.me.py
0 likes
0 forks
2 files
Last active
Gets random comment from /r/gonewild, since they're pretty much all compliments. http://compliment.b303.me Warning: May contain sexual content
| 1 | #!/usr/bin/env python3 |
| 2 | import requests |
| 3 | from flask import * |
| 4 | import random |
| 5 | |
| 6 | from apscheduler.schedulers.background import BackgroundScheduler |
| 7 | |
| 8 | app = Flask(__name__) |
| 9 | scheduler = BackgroundScheduler() |
| 10 | url = "https://reddit.com/r/gonewild/comments.json?limit=200" |
aly / add_bytes.py
0 likes
0 forks
1 files
Last active
A script to sum byte values (e.g 7TB + 512GB = 7.5TB)
| 1 | #!/usr/bin/env python3 |
| 2 | |
| 3 | import argparse |
| 4 | import sys |
| 5 | |
| 6 | SYMBOLS = ('kilo', 'mega', 'giga', 'tera', 'peta', 'exa', 'zetta', 'iotta') |
| 7 | |
| 8 | def get_bytes(data_queue): |
| 9 | """Parses list of strings, ints or floats representing data amounts (e.g 1MB, 2mb, 3M) to a list of bytes. Parses all types listed in SYMBOLS. |