|
Browse by Tags
All Tags » python (RSS)
-
I stumbled upon a small (but zesty!) python WTF today, thought I would share. First a little background. This is Python running with SQLite as a DB. Therefore we should all know this (which the programmer in question here obviously did not understand): [quote user="http://www.sqlite.org/autoinc...
-
[quote user="dlikhten"]It unnecessarily does not have 3 paramaters, instead of having a f-ed up way to pass an array.[/quote] def SetData((data_name, data_location, data_amount_left), d_list=interpretedData): ...
-
It's valid JavaScript and Python too.
-
PJH: What does Python use for indentation if it isn't whitespace? Pythons can use their sharp teeth to create indentations. Also, the Python programming language is whitespace sensitive only in certains circumstances: at the beginning of a line, or inside a string, or in the middle of a keyword or variable...
-
Lankiveil: modelnine: sys.argv gave it away: that's supposed to be Python (I'd guess). Gimme the gold star already. ;-) That was my first throught too, but then he said it's "not whitespace sensitive". Doesn't get me any closer though. It's Python, and Python isn't whitespace-sensitive. (It is, however...
-
Pearl zealots, eat your heart out. (PS: Skip the last semicolon in the input) print "The leg needs to be at (%f, %f)." % reduce(lambda a,b: (a[0] + b[0], a[1] + (b[1] - a[1]) * (b[0] / (a[0] + b[0])), a[2] + (b[2] - a[2]) * (b[0] / (a[0] + b[0]))), map(lambda s: map(lambda f: float(f), s.split(', ')...
-
Well I couldn't get the only Chef interpreter ever made to compile, so I have no idea if the later stages of this thing works. Anyhow, it features a Python string-to-brainfuck encoder, one of the longest one-liners in Perl ever, and a Chef recipe for a very simple MSDOS shell script ("echo WTF"). Obviously...
-
The challenge is simple: create the smallest program you can in your language(s) of choice that draws the Mandelbrot set . The rules: Program size will be measured by the size of the source, in bytes, with Unix-style line endings (i.e., LF only, and on every line, including the last) You may output any...
-
This one was good fun. Can anyone tell I just learned regexps? # wordbuilder.py import re def removeDupes(list_): result = [] while list_: item = list_.pop() if not item in list_: result.append(item) return result list_file = file(raw_input("Please give me a plaintext, newline-separated \ list of English...
-
Python (without using read...): s="s=%c%s%c%cprint(s%c(34,s,34,10,37))" print(s%(34,s,34,10,37))
|
|
|