View Single Post
Hariainm's Avatar
Posts: 485 | Thanked: 708 times | Joined on Feb 2010 @ Galiza
#645
Originally Posted by nekron View Post
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
LOL!
♪ Everyday I'm shuffling ♪
__________________
Adrian Filgueira, @hariainm
 

The Following 2 Users Say Thank You to Hariainm For This Useful Post: