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 python | |
try: | |
from urllib import urlopen | |
except: | |
from urllib.request import urlopen | |
from colorama import init | |
init() | |
colormap = { |
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
#!/bin/bash | |
until ps aux | grep -v grep | grep -v "waitfor" | grep "$1" > /dev/null | |
do | |
sleep 0.1 | |
done |
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 python2.7 | |
# Now with Plex auth support! Check getplex.py -h | |
from __future__ import print_function | |
from plexapi.server import PlexServer | |
from plexapi.myplex import MyPlexUser | |
from plexapi.exceptions import NotFound | |
from urlparse import urlparse | |
from getpass import getpass | |
from socket import gethostbyname |
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 python | |
# requires pychromecast and probably python 2.7, sorry | |
import pychromecast | |
import argparse | |
def play_video(url, cast): | |
if cast.media_controller.status.player_state == "PAUSED" or cast.media_controller.status.content_id == url: | |
cast.media_controller.play() | |
else: |
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
import requests | |
from bs4 import BeautifulSoup as Soup | |
from tabulate import tabulate | |
import sys | |
headers = ["Candidate", "Party", "Votes", "%", "Swing (%)"] | |
def get_data(): | |
soup = Soup(requests.get("http://vtr.aec.gov.au/HouseDivisionFirstPrefs-18126-236.htm").text, "html.parser") | |
for row in soup.findAll('tr', id=lambda x: x and x.startswith("repeaterCandidates")): |
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 python2 | |
from sys import stdout, exit, argv | |
def main(start, end): | |
for i in xrange(int(start),int(end)+1): | |
q = False | |
if i % 3 == 0: | |
stdout.write("Fizz") | |
q = True | |
if i % 5 == 0: |
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
import pylast, webbrowser, re, sys | |
key = "9eefecb15b3891540eb66748f37bf539" | |
use = sys.argv[1] if len(sys.argv) > 1 else "blha303" | |
def strip(string): | |
return re.sub(r'[\W_]+', '', string.replace("&", " and ")) | |
lfm = pylast.LastFMNetwork(api_key=key, username=use) | |
track = lfm.get_user(use).get_now_playing() |
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
<?php | |
$servers = array("http://stats.home.blha303.biz", "http://stats.web.blha303.biz", "http://stats.ipv6.b303.me", "http://stats.irc.b303.me"); |
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 python2 | |
from bs4 import BeautifulSoup as Soup | |
import requests | |
from collections import namedtuple | |
from datetime import datetime, timedelta | |
Song = namedtuple('Song', ['title', 'artist', 'position', 'spotify', 'vevo', 'rdio']) | |
def billboard(date): | |
soup = Soup(requests.get("http://www.billboard.com/charts/hot-100/%s" % date).text) |
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 python2 | |
# This file is released as public domain by Steven Smith (blha303) in Apr 2015 | |
# In areas where public domain isn't a thing, I release it under the MIT license. | |
# Although credit would be nice if you use this in something cool. And email me a link too pls. | |
import time,os,requests,json,subprocess | |
from urllib import urlretrieve | |
DTFORMAT = "%a, %b %d %Y %H:%M:%S +0000" # Do not modify, needs to be at top | |
playlisturl = "https://www.youtube.com/playlist?list=UU9CuvdOVfMPvKCiwdGKL3cQ" |