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 time import time, sleep | |
| import requests | |
| import logging | |
| import json | |
| # submission dict layout initial idea | |
| # {"id": { | |
| # time:{ #unix timestamp, str |
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 sys | |
| import sqlite3 | |
| import datetime | |
| #TO-DO: | |
| #Fix a few user options...I think like 1-3 or something. | |
| # | |
| conn = sqlite3.connect('moviedb.db') | |
| c = conn.cursor() | |
| class Movie(object): |
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 |
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 webbrowser | |
| import os | |
| import urllib2 | |
| import json | |
| import urllib | |
| from time import strftime, sleep | |
| def write_to_file(data): | |
| if os.path.exists("fb_data.txt"): | |
| with open("fb_data.txt","a") as out_file: |
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 |
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
| 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
| 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
| #!/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
| 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: |