This is a prototype version, done without any fancy precision tools and whatnot, so you can easily see that it s not the most high quality product you ll ever get your hands on. If anyone wants to reproduce this at home, here s how it was done: First get a hold of some cheap wall clock like this one: Some things to think about when buying this beauty *cough*:
As a base image I used this and traced it to produce this SVG with the legs in different layers and a marker for the holes. For this prototype, it would probably have been ok to use the original photo directly, but having the vector version ready means it s easy to use a 3d printer and laser-cutter to make the next version of the hands and face, which will definitely look and behave a lot better. Next step is printing the three layers body and two legs. Since this specific clock is wider than an A4 sheet, I had to use some white cardboard as background (the clock s own box hurray for resourcefulness) and painstakingly cut the printed body s outline, to avoid the slight tone difference between cardboard and paper. If you use the provided SVG and a laser-cutter, you d hopefully avoid this sort of issue. I didn t have any black cardboard lying around, so I had to print the legs, cut the outline again and strengthen them with some thin cardboard from tea boxes (taken directly from the trash hurray for resourcefulness again). Again something that 3d printing will hopefully side-step. It s important to use light materials for the legs, since most clock mechanisms don t have enough force to move heavy hands, which would cause the clock to quickly loose precision. Depending on the width of the clock s axis, a paper hole puncher might be the ideal tool to make holes in the legs. Since the prototype was largely made with paper, there was no point in going for precision when making the holes, as there s no way to fit the legs tightly to the clock s axis. For this, the original hands were cut in length and used as a base on which to super-glue the legs, so the original holes could be used. After these few easy steps, it s only a matter of reassembling the clock and voil !
#!/usr/bin/env python2.7 #-*- encoding: utf-8 -*- import os, sys, time import re from argparse import ArgumentParser from getpass import getpass import imaplib from email.header import decode_header from mailbox import mbox from twisted.mail import imap4 # for their imap4-utf7 implementation parser = ArgumentParser(description="""Recursively import mbox files in a directory structure to an IMAP server.\n The expected structure is that generated by 'readpst -r'.""") parser.add_argument('-s', dest='imap_server', default='localhost', help='IMAP server to import emails to') parser.add_argument('-u', dest='imap_user', required=True, help='user for logging in to IMAP') parser.add_argument('-p', dest='imap_passwd', help="will be prompted for if not provided") parser.add_argument('-c', dest='charset', default='utf8', help='charset in which the folders are stored (for versions older than 2003)') parser.add_argument('-f', dest='force', action='store_true', help='import mail even if we think it might be a duplicate') parser.add_argument('-m', dest='mappings', help='a JSON file with mappings between folder names and mailbox names (no slashes or dots)') parser.add_argument('folder', nargs='+', help="the base folders to import") args = parser.parse_args() if not args.imap_passwd: args.imap_passwd = getpass() if args.mappings: import json folderToMailbox = json.load(open(args.mappings,'r')) else: folderToMailbox = def mailboxFromPath(path): paths =  for p in path.split(os.path.sep): p = folderToMailbox.get(p, p) # only other invalid char besides '/', which can't be created by readpst anyway p = p.replace('.','') paths.append(p) return '.'.join(paths) def imapFlagsFromMbox(flags): # libpst only sets R and O f =  if 'R' in flags or 'O' in flags: f.append(r'\Seen') if 'D' in flags: f.append(r'\Deleted') if 'A' in flags: f.append(r'\Answered') if 'F' in flags: f.append(r'\Flagged') return '('+' '.join(f)+')' def utf7encode(s): return imap4.encoder(s) def headerToUnicode(s): h = decode_header(s) try: if h: # charset != None try: return unicode(*h) except LookupError: return unicode(h,'utf8','replace') else: return unicode(h, 'utf8') except UnicodeDecodeError: try: return unicode(h, 'cp1252') # the usual culprits for malformed headers except UnicodeDecodeError: pass try: return unicode(h, 'latin1') # the usual culprits for malformed headers except UnicodeDecodeError: pass return unicode(h, 'ascii', 'ignore') # give up... def main(): imap = imaplib.IMAP4_SSL(args.imap_server) imap.login(args.imap_user, args.imap_passwd) imap.select() for base in args.folder: print "importing folder "+base for root, dirs, files in os.walk(base): if 'mbox' in files: folder = unicode(os.path.relpath(root, base), args.charset) mailbox = mailboxFromPath(folder) print u'importing mbox in 0 to 1 '.format(folder, mailbox) mailbox_encoded = utf7encode(mailbox) m = mbox(os.path.join(root, 'mbox'), create=False) for msg in m: if imap.select(mailbox_encoded) != 'OK': print "creating mailbox "+mailbox r = imap.create(mailbox_encoded) if r != 'OK': sys.stderr.write("Could not create mailbox: "+str(r)) continue imap.subscribe(mailbox_encoded) imap.select(mailbox_encoded) # skip possibly duplicated msgs query = 'FROM " 0 " SUBJECT " 1 "'.format( utf7encode(headerToUnicode(msg['from']).replace('"','')), utf7encode(headerToUnicode(msg['subject']).replace('"',r'\"')) ) if msg.has_key('date'): query += ' HEADER DATE " 0 "'.format(utf7encode(msg['date'])) if msg.has_key('message-id') and msg['message-id']: query += ' HEADER MESSAGE-ID " 0 "'.format(utf7encode(msg['message-id'])) r = imap.search(None, '( 0 )'.format(query)) if r and not args.force: print "skipping "+mailbox+": '"+headerToUnicode(msg['subject'])[:20]+"' (mid: "+str(msg['message-id'])+")" continue r = imap.append(mailbox_encoded, '', imaplib.Time2Internaldate(time.time()), str(msg)) if r != 'OK': sys.stderr.write("failed to import 0 ( 1 ): 2 ".format(msg['message-id'], msg['date'], r)) continue num = re.sub(r'.*APPENDUID \d+ (\d+).*', r'\1', r) r = imap.uid('STORE', str(num), "FLAGS", imapFlagsFromMbox(msg.get_flags())) if r != 'OK': sys.stderr.write("failed to set flags for msg 0 in 1 ".format(num, mailbox)) imap.logout() if __name__ == '__main__': main()
"Deleted items": "Trash", "Sent items": "Sent"
Quantum computing could be used to effectively implement a bogosort algorithm with a time complexity of O(n). It uses true quantum randomness to randomly permute the list. By the many-worlds interpretation of quantum physics, the quantum randomization spawns 2^N (where N is the number of random bits) universes and one of these will be such that this single shuffle had produced the list in sorted order. The list is then tested for sortedness (requiring n-1 comparisons); should it be out of order, the computer destroys the universe implementation of this step being left as an exercise for the reader. The only observers will then be in the surviving universes and will see that the randomization worked the first time and that the list is in sorted order. Note, however, that while this algorithm is O(n) in time, permuting the list requires O(n log n) bits of quantum randomness. It also assumes that destroying the universe is O(1) in operation.Found here.