The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Browse by Tags

All Tags » python (RSS)
  • Unique Paranoia

    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...
    Posted to Forum by MasterPlanSoftware on 07-07-2008
  • Re: Accidentally obfuscated code

    [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): ...
    Posted to Forum by SpComb on 05-02-2008
  • Re: A very good spambot protection...

    It's valid JavaScript and Python too.
    Posted to Forum by Exteris on 01-13-2008
  • Re: Guess the language

    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...
    Posted to Forum by Zecc on 12-18-2007
  • Re: Guess the language

    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...
    Posted to Forum by SpComb on 12-18-2007
  • Re: Speed Challenge 22: Balance point

    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(', ')...
    Posted to Forum by Faxmachinen on 05-28-2007
  • Re: Speed Challenge 12

    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...
    Posted to Forum by Faxmachinen on 05-07-2007
  • Shortest program that draws the Mandelbrot set

    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...
    Posted to Forum by The Real WTF on 04-08-2007
  • Re: The most annoying Scrabble player in the world...

    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...
    Posted to Forum by Faxmachinen on 04-03-2007
  • Re: Self-Printing Program

    Python (without using read...): s="s=%c%s%c%cprint(s%c(34,s,34,10,37))" print(s%(34,s,34,10,37))
    Posted to Forum by mlambir on 03-23-2007
Page 1 of 2 (14 items) 1 2 Next >
Powered by Community Server (Non-Commercial Edition), by Telligent Systems