General (170) RSS

Global Article Categories

tutkudalmaz

Just Landed

Posted in Python Adventures | Category: General

I've just landed to this site. I'm gonna share my all advantures about Python. See you again next time. ;)

 
chandramde

Simple Fibonacci Number Class

Posted in Electric Python | Category: General

This simple class of Fibonacci number generator is offering a faster function. Instead of using an iteration, function uses a simple...

 
chandramde

Simple Logic Gates Truth-Table Class

Posted in Electric Python | Category: General

As a newbie, I'm getting deeper in love with Python. I like Basic, I like Pascal, and I like C. But after a few weeks with Python, now...

 
chandramde

Integer To Binary-String Function

Posted in Electric Python | Category: General

Converting an integer value into binary-string is good for programming practice. So, here is my version of this kind of function....

 
chandramde

Calculate R Series And Parallel (2)

Posted in Electric Python | Category: General

Here's another example of how to calculate R Series and Parallel with list as parameter. This program also show the usage of reduce...

 
chandramde

Calculate R Series and Parallel

Posted in Electric Python | Category: General

Here is a simple program to calculate R Series and Parallel. [code python] #**************************************** #...

 
shyam111

Choice of simulation engine

Posted in Python Simulations | Category: General

A Simulation engine, as we all know, is the heart of a simulation system. In case of python, there are not many opensource simulation...

 
shyam111

The Beginning

Posted in Python Simulations | Category: General

This is the beginning. The beginning of a complete platform for development of a python based simulation system which can simulate any...

 
ikiel

new version of my cp() function that returns a generator.

Posted in utilities & musings | Category: General

[code python] def cp(*lists):         ps = [0]*len(lists)   ls = [len(l) for l...

 

The answer is here!

Posted in AI | Category: General

Hi, First of all, I apologize for not posting the answer after I got it. I posted this question here long back, then my...

 
ikiel

matrix multiplier with lc

Posted in utilities & musings | Category: General

[code python] def mm(m1, m2):   n = len(m2)   if not n == len(m1[0]):     raise...

 
ikiel

easy way to remember Python's precedence order.

Posted in utilities & musings | Category: General

a good way to remember Python's order of operations: [code python] a = lambda: b or c and not d in e is f != g == h < i | j ^ k...

 
ikiel

factoring large numbers

Posted in utilities & musings | Category: General

this program will factor numbers up to 10e19 in almost no-time requires a file of prime numbers, the file i have is about...

 
ikiel

absrel

Posted in utilities & musings | Category: General

i made this for a guy named eep for his philosophy of "absolute relativity".  it uses Pygame. [code python]...

 
ikiel

phonic anagrams

Posted in utilities & musings | Category: General

shows an anagram of a given word, but works using phonems instead of letters. requires the cmu phonic dictionary (freely...

 
ikiel

textshift.py

Posted in utilities & musings | Category: General

A fun way of ciphering text [code python] import sys text = ' '.join(sys.argv[1:]) if not text:   text =...

 
ikiel

timer

Posted in utilities & musings | Category: General

[code python] #timer.py import pygame, time, sys p = map(int, ''.join(sys.argv[1:]).split(':')) s = p.pop() if p: s +=...

 
ikiel

calculator

Posted in utilities & musings | Category: General

[code python] from __future__ import division import sys from math import * print eval(' '.join(sys.argv[1:])) [/code]...

 
ikiel

truth tables

Posted in utilities & musings | Category: General

[code python] names = "false nor xleft nleft xright nright xor nand and nxor right nxright left nxleft or...

 
ikiel

one-liner permutator

Posted in utilities & musings | Category: General

[code python] perms = lambda a: a[1:] and [c+r for i, c in enumerate(a) for r in perms(a[:i]+a[i+1:])] or a [/code]...

 
ikiel

conway's game of life using pygame

Posted in utilities & musings | Category: General

simple conway's game of life simulator, with garbage collector currently just  puts random spots on the board, then...

 
ikiel

@staticclass

Posted in utilities & musings | Category: General

decorator to make all objects in a class static methods. i haven't tested this it probably won't work on python 2.6....

 
ikiel

singleton decorator

Posted in utilities & musings | Category: General

a way to make singleton classes, by simply using a "singleton" function as a decorator. it only works with new-style...

 
ikiel

non-integer xrange

Posted in utilities & musings | Category: General

they always complain that you can't do xrange with non-integers because there would be some sort of ambiguity in where it stops due to...

 
ikiel

the easy way to import

Posted in utilities & musings | Category: General

[code python] class x:   def __getattr__(self, name):     return __import__(name) x = x()...

 
«Previous   1 2 3 4 5 6 7  Next»