are you going to track the time of the employees or to track the work flow of
yours..
it will be quite easier if you specify your query a clear one.
Michael Key wrote:
>
> I am trying to develop a project tracking program that would allow you to
> track hours and minutes spent on several differ
On Wed, Jan 6, 2010 at 11:59, bob gailer wrote:
> Fraction(str(random())).limit_denominator(100)
Thanks!
So here's what I wanted to do, or its beginning:
==
from fractions import Fraction
from random import random
r = random()
print(r)
f = str(Fraction(str(r)).limit_denomi
Richard D. Moores wrote:
from fractions import Fraction
Fraction('.83452345').limit_denominator(100)
Fraction(81, 97)
I'd like to know how to do that in a script, where numbers like
.83452345 are the output of random.random().
Fraction(random()).limit_denominator(100)
Do
>>> from fractions import Fraction
>>> Fraction('.83452345').limit_denominator(100)
Fraction(81, 97)
I'd like to know how to do that in a script, where numbers like
.83452345 are the output of random.random().
>>> Fraction(random()).limit_denominator(100)
Doesn't work, nor did I really expect it
"spir" wrote
s = [1,2,3,4,5,6,7,8,9]
print s, s[-3], s[-4] # [1, 2, 3, 4, 5, 6, 7, 8, 9] 7 6
s.insert(-3, 0)
print s, s[-3], s[-4] # [1, 2, 3, 4, 5, 6, 0, 7, 8, 9] 7 0
So, I did insert 0 at index -3, but s[-3] is still 7, & 0 is in fact at
index -4.
Seems reasonable. insert() inserts befor
On Wed, Jan 6, 2010 at 8:54 AM, spir wrote:
> Hello,
>
> Just found something rather misleading with negative indices:
>
> s = [1,2,3,4,5,6,7,8,9]
> print s, s[-3], s[-4] # [1, 2, 3, 4, 5, 6, 7, 8, 9] 7 6
> s.insert(-3, 0)
> print s, s[-3], s[-4] # [1, 2, 3, 4, 5, 6, 0, 7, 8, 9] 7 0
>
> So, I
Hello,
Just found something rather misleading with negative indices:
s = [1,2,3,4,5,6,7,8,9]
print s, s[-3], s[-4] # [1, 2, 3, 4, 5, 6, 7, 8, 9] 7 6
s.insert(-3, 0)
print s, s[-3], s[-4] # [1, 2, 3, 4, 5, 6, 0, 7, 8, 9] 7 0
So, I did insert 0 at index -3, but s[-3] is still 7, & 0 is in fact
I've used (?P=name) recently in an implementation of the porter2 stemming
algorithm from http://snowball.tartarus.org/algorithms/english/stemmer.html
This includes the rule:
## if the word ends with a double remove the last letter (so hopp -> hop)
where we
## Define a double as one of
## bb dd