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")): |
aly / lfm_getlyrics.py
0 likes
0 forks
1 files
Last active
Opens a webbrowser with the azlyrics page for the now-playing song
| 1 | import pylast, webbrowser, re, sys |
| 2 | |
| 3 | key = "9eefecb15b3891540eb66748f37bf539" |
| 4 | use = sys.argv[1] if len(sys.argv) > 1 else "blha303" |
| 5 | |
| 6 | def strip(string): |
| 7 | return re.sub(r'[\W_]+', '', string.replace("&", " and ")) |
| 8 | |
| 9 | lfm = pylast.LastFMNetwork(api_key=key, username=use) |
| 10 | track = lfm.get_user(use).get_now_playing() |
aly / config.php
0 likes
0 forks
3 files
Last active
Multiple server support for github.com/delan/lookout http://stats.blha303.biz
| 1 | <?php |
| 2 | $servers = array("http://stats.home.blha303.biz", "http://stats.web.blha303.biz", "http://stats.ipv6.b303.me", "http://stats.irc.b303.me"); |
aly / get-billboard.py
0 likes
0 forks
1 files
Last active
Returns a list of tuples for each item in a specified Billboard Top 100 list. Planning a Arch Rollback Machine-style repository for popular music
| 1 | #!/usr/bin/env python2 |
| 2 | from bs4 import BeautifulSoup as Soup |
| 3 | import requests |
| 4 | from collections import namedtuple |
| 5 | from datetime import datetime, timedelta |
| 6 | |
| 7 | Song = namedtuple('Song', ['title', 'artist', 'position', 'spotify', 'vevo', 'rdio']) |
| 8 | |
| 9 | def billboard(date): |
| 10 | soup = Soup(requests.get("http://www.billboard.com/charts/hot-100/%s" % date).text) |
aly / ytPlaylistToPodcast.py
0 likes
0 forks
1 files
Last active
Generates an iTunes compatible podcast from a Youtube playlist, storing the audio files in a local directory. Could be adapted to store the files in Dropbox or on another media provider if desired | Requires python 2.7, requests, wget, and youtube-dl | Configuration at top of file
| 1 | #!/usr/bin/env python2 |
| 2 | # This file is released as public domain by Steven Smith (blha303) in Apr 2015 |
| 3 | # In areas where public domain isn't a thing, I release it under the MIT license. |
| 4 | # Although credit would be nice if you use this in something cool. And email me a link too pls. |
| 5 | import time,os,requests,json,subprocess |
| 6 | from urllib import urlretrieve |
| 7 | |
| 8 | DTFORMAT = "%a, %b %d %Y %H:%M:%S +0000" # Do not modify, needs to be at top |
| 9 | |
| 10 | playlisturl = "https://www.youtube.com/playlist?list=UU9CuvdOVfMPvKCiwdGKL3cQ" |
aly / gistfile1.txt
0 likes
0 forks
1 files
Last active
netctl config for polytechnic west (australia) wifi (needs student ID and password) | modified https://aur.archlinux.org/packages/netctl-eduroam/
| 1 | Connection='wireless' |
| 2 | Interface=wlp2s0 # or your wireless interface name |
| 3 | Security='wpa-configsection' |
| 4 | Description='tafe' |
| 5 | IP='dhcp' |
| 6 | TimeoutWPA=30 |
| 7 | WPAConfigSection=( |
| 8 | 'ssid="PWAStudent"' |
| 9 | 'key_mgmt=WPA-EAP' |
| 10 | 'eap=PEAP' |