[Ilugc] The World's Smallest P2P Application [Balakumar.M]

  • From: sridharinfinity@xxxxxxxxx (Sridhar Ratna)
  • Date: Tue Feb 1 10:13:42 2005

On Tue, 1 Feb 2005 10:01:47 +0530, balakumar Muthu
<balakumar.muthu@xxxxxxxxx> wrote:

Hi,

I found a application called - TinyP2P a functional peer-to-peer file
sharing application, written in just fifteen lines of code, in the
Python programming language. Wow! This is cool. Check it out here

World's smallest linear equation solver (3 lines) is here
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/365013

def solve(eq,var='x'):
    eq1 = eq.replace("=","-(")+")"
    c = eval(eq1,{var:1j})
    return -c.real/c.imag

solve("x - 2*x + 5*x - 46*(235-24) = x + 2")
3236.0


-- 
Sridhar Ratna - http://srid.bsdnerds.org

Other related posts: