This file contains 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 math | |
import subprocess | |
from PIL import Image, ImageStat, ImageChops | |
import numpy as np | |
import datetime | |
import urllib | |
import os | |
import glob | |
import shutil |
This file contains 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/python | |
# -*- coding: utf-8 -*- | |
import time | |
import threading | |
__author__ = 'otger' | |
class Pusher(object): | |
def __init__(self, q, b, filepath='./quijote.txt'): | |
self.q = q |
This file contains 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
# Name: EXIFmover | |
# Forked from EXIFmover.py by Brian Klug (@nerdtalker / [email protected]) | |
# Purpose: | |
# Move Files into directory based on dates | |
# Designed to un-clusterfuck the Dropbox camera upload directory which is a mess as all files are | |
# uploaded to same folder. | |
# Moves files into /YEAR/MONTH eg /2014/03 | |
# Creates directory if it doesn't exist, moves into that directory if it exists | |
# Files without "YYYY-mm-dd" pattern on its name are scanned looking for exif data |
This file contains 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
var osname = Ti.Platform.osname; | |
var version = Ti.Platform.version; | |
var dpi = Ti.Platform.displayCaps.dpi; | |
var height = Ti.Platform.displayCaps.platformHeight; | |
var width = Ti.Platform.displayCaps.platformWidth; | |
if (height < width){ | |
var w_inch = height / Ti.Platform.displayCaps.xdpi; | |
var h_inch = width / Ti.Platform.displayCaps.ydpi; | |
}else{ | |
var w_inch = width / Ti.Platform.displayCaps.xdpi; |
This file contains 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
//considering tablet to have one dimension over 900px - this is imperfect, so you should feel free to decide | |
//yourself what you consider a tablet form factor for android | |
var isTablet = osname === 'ipad' || (osname === 'android' && (width > 899 || height > 899)); |
This file contains 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 | |
# encoding: utf-8 | |
''' | |
ctail -- colored tail | |
ctail is a simple 'tail -f' alternative which colors given regular expressions matches | |
@author: Otger Ballester | |
This file contains 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
class ProviderNDB(ndb.Model): | |
name = ndb.StringProperty() ##Published name | |
enabled = ndb.BooleanProperty(default = True) | |
last_crawl = ndb.DateTimeProperty(auto_now_add=True) | |
p = ProviderNDB(id='test', name='provider test') | |
p.put() | |
class testNDB(ndb.Model): | |
provider = ndb.StructuredProperty(ProviderNDB) |
This file contains 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 socket | |
import pickle | |
import random | |
import time | |
import struct | |
import threading | |
import urllib2 | |
#from sc_watchdog.logger import log |