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. |
aly / getplex.py
0 likes
0 forks
1 files
Last active
Gets plex streaming urls. Pipe into cast.py (https://gist.github.com/blha303/8b100c205b8c35b3c8ce) for best results. List episodes and movies from plex by omitting titles (i.e getplex.py -m "" or getplex.py -s "Bla")
| 1 | #!/usr/bin/env python2.7 |
| 2 | # Now with Plex auth support! Check getplex.py -h |
| 3 | from __future__ import print_function |
| 4 | from plexapi.server import PlexServer |
| 5 | from plexapi.myplex import MyPlexUser |
| 6 | from plexapi.exceptions import NotFound |
| 7 | |
| 8 | from urlparse import urlparse |
| 9 | from getpass import getpass |
| 10 | from socket import gethostbyname |
aly / aec-canning-2015.py
0 likes
0 forks
1 files
Last active
Scrape and sort results for Canning by-election. Requirements: python 2.7 probably, requests, beautifulsoup4, tabulate
| 1 | import requests |
| 2 | from bs4 import BeautifulSoup as Soup |
| 3 | from tabulate import tabulate |
| 4 | import sys |
| 5 | |
| 6 | headers = ["Candidate", "Party", "Votes", "%", "Swing (%)"] |
| 7 | |
| 8 | def get_data(): |
| 9 | soup = Soup(requests.get("http://vtr.aec.gov.au/HouseDivisionFirstPrefs-18126-236.htm").text, "html.parser") |
| 10 | for row in soup.findAll('tr', id=lambda x: x and x.startswith("repeaterCandidates")): |