This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import timeit | |
t1 = """ | |
class Test(): | |
_bar = None | |
@property | |
def bar(self): | |
if self._bar is not None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Constants | |
a = 1 | |
n = 1 | |
function spiral(theta) | |
-- Work out the polar equation | |
local r = a * theta ^ (1/n) | |
-- Convert to cartesian coordinates | |
local x = r * math.sin(theta) | |
local y = r * math.cos(theta) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Constants | |
a = 1 | |
n = 1 | |
function spiral(theta) | |
-- Work out the polar equation | |
local r = a * theta ^ (1/n) | |
-- Convert to cartesian coordinates | |
local x = r * math.sin(theta) | |
local y = r * math.cos(theta) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time, logging | |
class debug_watch: | |
def __init__(self, name, logger=logging.info): | |
self.name = name | |
self.logger = logger | |
def __enter__(self): | |
self.t = time.time() | |
self.logger("Starting %s" % self.name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Config | |
{ | |
bool good_config; | |
bool spew; | |
std::string spew_channel; | |
std::string admin_channel; | |
std::string irc_server; | |
int irc_port; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In recent days (the last 12-24 hours), there have been a couple of posts on a one | |
'Marak Squires', who goes by the tag JimBastard. He stands accused of stealing code, | |
and being a general douchebag. Stealing code isn't good. Being a douchebag isn't | |
acutally illegal. However, the way that the campaign against him has been carried | |
out worries me. | |
The post to reddit that brought this issue to attention was entitled 'Code Thief at | |
Large: Marak Squires / JimBastard'. It can be found here: | |
http://www.reddit.com/r/programming/comments/ebge2/code_thief_at_large_marak_squires_jimbastard/. | |
It was a link to a github gist that can be found here: |
NewerOlder