[PYTHON] How to set the range for x-axis

2009-11-09 Thread Moses
Hi Everyone,

I have written a script in python to plot a graph. However, the
range for the x-axis starts from 0.5 to 1.0. However, I would like
to start from 0 to 1. Any pointer to this shall be appreciated.

Thanks,
Moses
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [PYTHON] How to set the range for x-axis

2009-11-09 Thread Moses
Hi Chris,

I am using python 2.6 and am using scipy and pylab. See the code below.
Cheers.

from scipy import *
from pylab import *

x1 = [0.5,0.6,0.7,0.8,0.9,1.0]
x2 = [0,1,2,3,4,5,6,7,8,9,10]

plot(x1,y01,linewidth=5.0)
show()

Thanks.
.


On Mon, Nov 9, 2009 at 5:49 PM, Chris Rebert  wrote:

> On Mon, Nov 9, 2009 at 7:45 AM, Moses  wrote:
> > I have written a script in python to plot a graph. However, the
> > range for the x-axis starts from 0.5 to 1.0. However, I would like
> > to start from 0 to 1. Any pointer to this shall be appreciated.
>
> Some /very/ basic information such as what plotting library you're
> using would be necessary to answer your question. What version of
> Python you're using would also be useful.
>
> Cheers,
> Chris
> --
> http://blog.rebertia.com
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [PYTHON] How to set the range for x-axis

2009-11-09 Thread Moses
Hi Chris,

The code is

from scipy import *
from pylab import *

x = [0.5,0.6,0.7,0.8,0.9,1.0]
y = [2,6,8,10,10,10]

plot(x,y,linewidth=5.0)
show()

and not

from scipy import *
from pylab import *

x1 = [0.5,0.6,0.7,0.8,0.9,1.0]
x2 = [0,1,2,3,4,5,6,7,8,9,10]

plot(x1,y01,linewidth=5.0)
show()


Moses

On Mon, Nov 9, 2009 at 6:43 PM, Moses  wrote:

>
> Hi Chris,
>
> I am using python 2.6 and am using scipy and pylab. See the code below.
> Cheers.
>
> from scipy import *
> from pylab import *
>
> x1 = [0.5,0.6,0.7,0.8,0.9,1.0]
> x2 = [0,1,2,3,4,5,6,7,8,9,10]
>
> plot(x1,y01,linewidth=5.0)
> show()
>
> Thanks.
> .
>
>
>
> On Mon, Nov 9, 2009 at 5:49 PM, Chris Rebert  wrote:
>
>> On Mon, Nov 9, 2009 at 7:45 AM, Moses  wrote:
>> > I have written a script in python to plot a graph. However, the
>> > range for the x-axis starts from 0.5 to 1.0. However, I would like
>> > to start from 0 to 1. Any pointer to this shall be appreciated.
>>
>> Some /very/ basic information such as what plotting library you're
>> using would be necessary to answer your question. What version of
>> Python you're using would also be useful.
>>
>> Cheers,
>> Chris
>> --
>> http://blog.rebertia.com
>>
>
>
-- 
http://mail.python.org/mailman/listinfo/python-list


[PYTHON] threading: Parallel processing

2011-01-16 Thread Moses
Hi All,

Is there is a way to print or use the value of new in the main function of
the script below?


from thread import start_new_thread, allocate_lock

num_threads = 0
thread_started = False
lock = allocate_lock()

def heron(a):
global num_threads, thread_started
lock.acquire()
num_threads += 1
thread_started = True
lock.release()
"""Calculates the square root of a"""
eps = 0.001
old = 1
new = 1
while True:
old,new = new, (new + a/new) / 2.0
print old, new
if abs(new - old) < eps:
break
lock.acquire()
num_threads -= 1
lock.release()
return new

start_new_thread(heron,(81,))
start_new_thread(heron,(999,))
start_new_thread(heron,(1733,))


while not thread_started:
pass
while num_threads > 0:
pass

Thanks,

Moses.
-- 
http://mail.python.org/mailman/listinfo/python-list


Python For TinyML

2022-10-23 Thread Kisakye Moses
Hello am a (M) and glad that I've joined this group.
Any help in python for TinyML, i will honored
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python For TinyML

2022-10-24 Thread Kisakye Moses
On Sunday, October 23, 2022 at 8:23:26 PM UTC+3, rbowman wrote:
> On Sun, 23 Oct 2022 08:46:10 -0700 (PDT), Kisakye Moses wrote: 
> 
> > Hello am a (M) and glad that I've joined this group. 
> > Any help in python for TinyML, i will honored
> https://tinynet.autoai.org/en/latest/

Thank you so much
-- 
https://mail.python.org/mailman/listinfo/python-list


web development in python 2.6 and 3.0

2009-12-21 Thread Simon Moses
hi,

i am new to python but have programming experience in few other languages. 
i am trying to start with python 2.6 or 3.0. my requirement is accessing 
database (mysql and/or postgresql) and web development. 

what all i should install for my requirement?
to connect to database (mysql and/or postgresql)
for web development


thanks and regards,
Simon Moses.


  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/-- 
http://mail.python.org/mailman/listinfo/python-list


Re: web development in python 2.6 and 3.0

2009-12-21 Thread Simon Moses
to code a web page which connects to a database and displays some rows, what 
minimum software and libraries i should install?

python 2.6, mysql 5.0, apache 2.2 and Django? thats enough?






From: Stephen Hansen 
To: Simon Moses 
Cc: python-list@python.org
Sent: Mon, 21 December, 2009 1:37:38 PM
Subject: Re: web development in python 2.6 and 3.0

On Mon, Dec 21, 2009 at 9:22 AM, Simon Moses  wrote:

>
>hi,
>
>i am new to python but have programming experience in few other languages. 
>i am trying to start with python 2.6 or 3.0. my requirement is accessing 
>database (mysql and/or postgresql) and web development. 
>
>what all i should install for my requirement?
>to connect to database (mysql and/or postgresql)
>for web development

3.0 is a bit hard right now as there are a lot of libraries that have not yet 
been ported which may be required for certain frameworks, but this question is 
a bit hard on its own to answer... because you have a lot of choices :)

For 2.6, what's your requirements? What's "web development" for you, ie what 
kind of development on the web are you talking about doing? If you're looking 
to do a database-driven web app, I've seen both Django and web2py in use and 
both have active communities and seem to be quite mature and interesting. 

But there's a lot of other options. Personally, I'm using Pylons and am very 
happy with it-- its a bit more low-level but that makes it better for me 
because I'm integrating it into an existing non-web based system. Then there's 
TurboGears which is built on top of Pylons in its 2.0 version, but a bit more 
focused on the end goal of providing a complete solution instead of a complete 
set of tools for you to make a solution out of. (That might be woefully 
mischaracterizing their perspectives on my part, if so I apologize!)

Depending on what you need to do, there's for sure a framework for you to make 
life easier out there. At the moment, Python seems to have a million solutions 
to this problem and all seem quite interesting in their own regard. Then again, 
you could go retro and skip the framework and just use what's in the standard 
library and make CGI scripts... but doing it the cave-man way will make you 
seem less cool :)
 
--S


  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/-- 
http://mail.python.org/mailman/listinfo/python-list


Re: web development in python 2.6 and 3.0

2009-12-21 Thread Simon Moses
so python 2.6, mysql 5.0, apache 2.2, mod_wsgi, MySQL-python-1.2.2.win32-py2.6 
and Django should be sufficient for my requirement.


  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/-- 
http://mail.python.org/mailman/listinfo/python-list