Skip to content

Instantly share code, notes, and snippets.

@kevinburke
kevinburke / results.txt
Last active July 28, 2022 02:33
Performance of ''.join vs .format() in Python
$ python test_time.py
join_test: 21.3 seconds
format_test: 36.6 seconds
/*************************************************
* This is a simple Monte Carlo simulation to see
* whether we should
* go for X BIG deal and/or Y SMALL deals.
*
* What is the best blend?
*
* Author: Ido Green | plus.google.com/+greenido
* Date: 16 July 2013
*
@victoroliv2
victoroliv2 / cross-site-xmlhttprequest.py
Created October 7, 2011 19:09
web.py server which allow cross-site xmlhttprequest
import web
urls = (
'/(.*)', 'Service'
)
app = web.application(urls, globals())
class Service:
def GET(self, name):
web.header('Access-Control-Allow-Origin', '*')