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
[ | |
{ | |
"title": "All Day Event", | |
"start": "2014-09-01" | |
}, | |
{ | |
"title": "Long Event", | |
"start": "2014-09-07", | |
"end": "2014-09-10" | |
}, |
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 os | |
import ConfigParser | |
import json | |
import sqlite3 | |
import codecs | |
def _expand(path): | |
return os.path.expanduser(path) |
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 | |
import sqlite3 | |
import os | |
''' | |
Status ID's: | |
1 = not aired | |
3 = wanted | |
5 = skipped |
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 | |
import sqlite3 | |
import os | |
# API key available at: http://trakt.tv/api-docs/authentication | |
API_KEY = "25665d450ed0c00907f32be617cd2a37" | |
TRAKT_USER = "nikolak" # trakt username | |
TRAKT_URL = "http://api.trakt.tv/user/library/shows/all.json/{key}/{user}".format( | |
key=API_KEY, | |
user=TRAKT_USER) |
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
def quicksort(array): | |
if len(array) <= 1: | |
return array | |
pivot = array[0] | |
array.remove(pivot) | |
less, greater = [], [] | |
for x in array: | |
if x <= pivot: | |
less.append(x) | |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2014 Nikola Kovacevic <[email protected]> | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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 os | |
import sys | |
from PySide import QtGui, QtCore | |
class MainWindow(QtGui.QMainWindow): | |
def __init__(self): | |
super(MainWindow, self).__init__() | |
self.showFullScreen() |
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 datetime | |
import time | |
alarm = datetime.datetime(2014, month, day, hour, minute) | |
while True: | |
now = datetime.datetime.now() | |
diff = alarm - now | |
if diff.total_seconds() < 0: | |
print "Alarm triggered" | |
break |
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
from Tkinter import * | |
# First create application class | |
class Application(Frame): | |
def __init__(self, master=None): | |
Frame.__init__(self, master) |
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 | |
import sys | |
import json | |
import time | |
import urllib | |
import httplib2 | |
from urllib import urlencode | |
from urlparse import urlparse, urlunparse, parse_qs |