0.094
thk thk Δευ. 5 Δεκ. 2016 14:42 0 views
Γιατί ο Καπιταλισμός δημιουργεί άσκοπες δουλειές
thk thk Σαβ. 26 Νοέ. 2016 1:15 0 views
EISA awards: Το Huawei P9 πήρε τον τίτλο του καλύτερου smartphone | Techblog.gr
thk thk Τρι. 22 Νοέ. 2016 22:00 0 views
Ο χριστουγεννιάτικος στολισμός στο Ηράκλειο τους βγήκε λίγο... kinky (pics) | Plus: Viral | gazzetta.gr
thk thk Κυρ. 20 Νοέ. 2016 3:11 0 views
Access denied | www.patrisnews.com used CloudFlare to restrict access
thk thk Δευ. 14 Νοέ. 2016 15:18 0 views
If you have a folder that contains thousands of files (in my case it was the motion daemon folder that contained thousands of pictures and videos from a surveillance camera) this script will organize them in sub folders named by the last modification date.

import os 
import sys
import time
from datetime import datetime
import shutil

def orgbyday(directory):
    ans=raw_input("Going to organize files in directory : " + directory  +  " by  modification day in subfolders.Type 'y' to continue:")
    if ans != 'y':
print 'exiting'
sys.exit(0)
    print "listing dir: " + directory
    l = [file for file in os.listdir(directory) 
         if os.path.isfile(os.path.join(directory, file)) ] 
   
    ilen = len(l)
    slen = (str(ilen))
    print "found " + slen + " files"
    i=1
    startt= time.time()
    for f in l:
 
percent = (float(i) / float(ilen)) * 100.0
spercent = "%.2f" % percent
   
print str(i) + " of " + slen 
print spercent + " %  "
passed=time.time()-startt
remaining = (ilen  - i) * (passed / i)  
m, s = divmod(remaining, 60)
h, m = divmod(m, 60)
print "%d:%02d:%02d" % (h, m, s)
#print str(remaining)
print f
ff=os.path.join(directory,f)
mtime = os.path.getmtime(ff)
print "modified: %s" % time.ctime(mtime) 
mdate = datetime.fromtimestamp(mtime)
creation_day = mdate.strftime('%Y-%m-%d')
subfolder = os.path.join(directory,creation_day )
dest = os.path.join(subfolder , f )
try:
   shutil.move (ff , dest)
except:
   os.mkdir(subfolder)  
   shutil.move (ff , dest)
print "                               "
print " "
print "\x1b[2J\x1b[H"
i +=1
 
if __name__ == '__main__':
    orgbyday(sys.argv[1])


από thk thk 2016-11-13 12:52
Ε τους!!!!! ΔΕ μου παν οτι ειναι για τρεξιμο εξειδικευμενα σε ανωμαλο δρομο ,,αν πεσεις σε πλακακι με λιγο νερο κινδυνευεις να σκοτωθεις!!!
από thk thk 2016-11-14 14:22
Image result for nike flex rn 3
από mari@pi mari@pi 2016-11-15 11:28
super
thk thk Σαβ. 12 Νοέ. 2016 20:36 1 views
Chania
Chania
thk thk Σαβ. 12 Νοέ. 2016 0:52 0 views
Γιάννης Ιωαννίδης Best of - YouTube
thk thk Παρ. 11 Νοέ. 2016 21:07 0 views
ευτυχως δεν εχω!!!!!  
thk thk Πεμ. 10 Νοέ. 2016 21:13 0 views 1 σχόλια
Day 1 In Trump's America
από mari@pi mari@pi 2016-11-11 11:31
thimizei ena post pou vghke gia tin proti mera stin agglia meta to brexit