View Single Post
Posts: 39 | Thanked: 124 times | Joined on Oct 2009
#616
After technical problems had been solved I can exclusively present you the TOP SECRET Jolla shipment algorithmn. You can even simulate the whole shipment process!

Code:
# coding: utf-8
#
# Secret Jolla shipment algorithm
#
# Changelog:
# 20131211   Fixed technical problems with queue
#

from random import shuffle
from time import sleep

def get_secret_jolla_shipping_order_queue(preorders):
	"""
	This is the top secrect Jolla shipping alogrithm
	that takes care of your presales order number.
	"""
	shipping_order = range(0, preorders)
	shuffle(shipping_order)
	for in_picking in shipping_order:
		yield in_picking
		
if __name__ == '__main__':
	PRESALES = 10000
	SHIPMENTS_PER_DAY = 400
	shipment_order = get_secret_jolla_shipping_order_queue(PRESALES)
	for order_no in shipment_order:
		print 'Picking order number %d ...' % order_no
		sleep(24*60*60/SHIPMENTS_PER_DAY)
	print 'Hurray, all Jollas left harbour!'
Cheers and happy waiting!
Nek
 

The Following 4 Users Say Thank You to Nekron For This Useful Post: