Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-24 Thread School
What is the error you received? What lines does it say are causing the error? Also, this smells like classwork. On Sep 20, 2013, at 21:26, znx...@yahoo.com wrote: > Can anyone please help me figure out what I am NOT doing to make this program > work properly.PLEASE !! > > I need to be able

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-24 Thread bob gailer
In addition to Alan's comment: Saying "it work properly" is totally uninformative. Tell us what is happening that you want different. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscript

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code (znx...@yahoo.com)

2013-09-23 Thread Dino Bektešević
Hello, > I have attached a copy of the code I've compiled so far. Next time just post the code in here, I think that's the general consensus around here. You should only attach it or use a pastebin if it's really really long. Considering that usually the only valid entries here are snippets of co

Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-23 Thread Alan Gauld
On 21/09/13 04:26, znx...@yahoo.com wrote: Can anyone please help me figure out what I am NOT doing to make this program work properly.PLEASE !! First you need to tell us what "graphics" module you are using since there is no standard library module by that name. Second, you should probabl

Re: [Tutor] help with postgreSQL and .csv

2013-09-03 Thread Peter Otten
Ismar Sehic wrote: > hello. Ismar, please post in plain text. The markup appears as funny stars over here. > i wrote the following code, to insert some values from a csv file to my > postgres table : > > *** > *import psycopg2* > *conn = psycopg2.connect("host = ***.***.***.*** user=**

Re: [Tutor] help with postgreSQL and .csv

2013-09-02 Thread R. Alan Monroe
> my goal is to make it write all the picture url values separated by > a ';' in just one field and to input the data correctly.   I haven't used postgresql much. Could it be you're just missing path_picture as part of your data value? i.e. UPDATE hotel SET path_picture = + hotel_url UPDATE hotel

Re: [Tutor] Help Please

2013-07-10 Thread Dave Angel
On 07/05/2013 05:10 PM, Ashley Fowler wrote: This is what I have so far. Can anyone make suggestions or tell me what I need to correct? * * First thing to correct is the notion that you're due an instant answer. You get frustrated after 3 minutes, and post a new messa

Re: [Tutor] Help (Antonio Zagheni)

2013-06-24 Thread Alan Gauld
On 24/06/13 14:34, Antonio Zagheni wrote: But I am trying to paste the clipboard content to MS word and when I do it MS word becomes not responding. OK, so the question is not how to manipulate the clipboard but how to manipulate MS Word. There are multiple ways to approach that. What techno

Re: [Tutor] Help (Antonio Zagheni)

2013-06-24 Thread Peter Otten
Antonio Zagheni wrote: >> I am a begginer in Pythonu >> I did a function that returns a string and I want to copy this to the >> clipboard. I have tried a lot of suggestions found at Google but nothing >> works properly. Is there an easy way to do that? >> I am using Python 2.7 and Windows 7. > >

Re: [Tutor] Help (Antonio Zagheni)

2013-06-24 Thread Antonio Zagheni
Cc: "tutor@python.org" Subject: Re: [Tutor] Help Message-ID:     Content-Type: text/plain; charset=UTF-8 On Thu, Jun 20, 2013 at 6:10 PM, Antonio Zagheni wrote: > > I am a begginer in Python. > I did a function that returns a string and I want to copy this to the > clipb

Re: [Tutor] Help with Python in ArcGIS 10.1!

2013-06-23 Thread bob gailer
On 6/17/2013 10:26 AM, Jacobs, Teri (CDC/NIOSH/DSHEFS) (CTR) wrote: Hi, Hi - welcome to the tutor list. Be aware that we are a few volunteers. Your question is one very long line. Please in future ensure it is wrapped so we don't have to scroll. I have wrapped it here. I have a command l

Re: [Tutor] Help

2013-06-23 Thread eryksun
On Thu, Jun 20, 2013 at 6:10 PM, Antonio Zagheni wrote: > > I am a begginer in Python. > I did a function that returns a string and I want to copy this to the > clipboard. > I have tried a lot of suggestions found at Google but nothing works properly. > Is there an easy way to do that? > I am usi

Re: [Tutor] help regarding game code

2013-05-12 Thread Dave Angel
On 05/12/2013 03:40 PM, Alex Norton wrote: im new to python and im in the middle of making a RPS game for a college unit. You sent this message 20 minutes after posting a similar one, with a DIFFERENT title, on python-list. You really ought to pick a target and pull the trigger once. Only i

Re: [Tutor] help regarding game code

2013-05-12 Thread Mark Lawrence
On 12/05/2013 22:44, Matthew Ngaha wrote: bWater.clicked.connect( water_clicked ) AttributeError: 'int use a paste site like http://bpaste.net/+python to show us the code. No, please put the code inline. If the original is too long cut it down as requested here http://www.sscce.org/ -- I

Re: [Tutor] help regarding game code

2013-05-12 Thread Matthew Ngaha
>> bWater.clicked.connect( water_clicked ) AttributeError: 'int use a paste site like http://bpaste.net/+python to show us the code. i am no expert @ programming myself but that error is telling you you used an int and tried to access an int method called connect somewhere in your code. ints do n

Re: [Tutor] Help on python

2013-04-15 Thread Danny Yoo
For example, see: http://nltk.org. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Help on python

2013-04-15 Thread Alan Gauld
On 15/04/13 09:54, Jabesa Daba wrote: is it possible to reorder a sentence in the form of SVO (Subject Verb Object) into the form of SOV (Subject Object Verb) by using a python program? if so, how? Python is a general purpose programming language so yes, you can program it to do any computatio

Re: [Tutor] Help on python

2013-04-15 Thread Mark Lawrence
On 15/04/2013 09:54, Jabesa Daba wrote: is it possible to reorder a sentence in the form of SVO (Subject Verb Object) into the form of SOV (Subject Object Verb) by using a python program? if so, how? regards, Yes. By writing code. You could have answered your own question by typing somethin

Re: [Tutor] Help required

2013-04-04 Thread Mark Lawrence
First up please give a sensible subject, say "problem parsing csv file". I'm assuming the crud shown below is due to you posting in html, please use plain text instead. On 20/03/2013 06:12, Arijit Ukil wrote: I am new to python. My intention is to read the file digi.txt and store in separate

Re: [Tutor] Help required

2013-04-04 Thread Bod Soutar
On 20 March 2013 06:12, Arijit Ukil wrote: > I am new to python. My intention is to read the file digi.txt and store in > separate arrays all the values of each columns. However, the following > program prints only the last value, i.e. 1350696500.0. > Please help to rectify this. > > f = open ("di

Re: [Tutor] Help required

2013-04-04 Thread Mitya Sirenef
On 03/20/2013 02:12 AM, Arijit Ukil wrote: I am new to python. My intention is to read the file digi.txt and store in separate arrays all the values of each columns. However, the following program prints only the last value, i.e. 1350696500.0. Please help to rectify this. f = open (/"digi.txt"

Re: [Tutor] Help with iterators

2013-03-27 Thread Matthew Johnson
ors (Steven D'Aprano) > 4. Re: Help with iterators (Mitya Sirenef) > 5. Please Help (Arijit Ukil) > > > ---------- > > Message: 1 > Date: Thu, 21 Mar 2013 21:39:12 -0400 > From: Mitya Sirenef > To: tutor@python.org > Subject: Re: [Tutor] Help with iter

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-27 Thread Peter Otten
Sayan Chatterjee wrote: > for t in range(0,200): > fname = 'file_' + str(t) > > So it will assign fname values file_0, file_1 so on. Dropping the quotes > is giving me > > IOError: [Errno 2] No such file or directory: 'file_0' > > > Indeed the file is not present. In C we write,if we have to

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-27 Thread Sayan Chatterjee
Oh yes, thanks. That worked. :) On 27 March 2013 21:58, Bod Soutar wrote: > You were opening the file for reading, rather than writing. It > therefore was expecting to find a file. > Change > fo = open('fname','r+') > to > fo = open('fname','w') > > Bodsda > > On 27 March 2013 16:17, Sayan Chat

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-27 Thread Bod Soutar
You were opening the file for reading, rather than writing. It therefore was expecting to find a file. Change fo = open('fname','r+') to fo = open('fname','w') Bodsda On 27 March 2013 16:17, Sayan Chatterjee wrote: > for t in range(0,200): > fname = 'file_' + str(t) > > So it will assign fname

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-27 Thread Sayan Chatterjee
Putting "w" instead of "r+" probably solves the problem. The error is not showing now. On 27 March 2013 21:47, Sayan Chatterjee wrote: > for t in range(0,200): > fname = 'file_' + str(t) > > So it will assign fname values file_0, file_1 so on. Dropping the quotes > is giving me > > IOError: [

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-27 Thread Sayan Chatterjee
for t in range(0,200): fname = 'file_' + str(t) So it will assign fname values file_0, file_1 so on. Dropping the quotes is giving me IOError: [Errno 2] No such file or directory: 'file_0' Indeed the file is not present. In C we write,if we have to record data in a file FILE *fp fp = fopen(

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-27 Thread Walter Prins
Hello, On 27 March 2013 15:59, Sayan Chatterjee wrote: > Hi Amit, > > fo = fopen('fname','r+') > fo.write("%d %d",j,counter) > > > Is giving the following error: > > File "ZA.py", line 30, in > fo = open('fname','r+') > IOError: [Errno 2] No such file or directory: 'fname' > > Where is th

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-27 Thread Joel Goldstick
On Wed, Mar 27, 2013 at 11:59 AM, Sayan Chatterjee < sayanchatter...@gmail.com> wrote: > Hi Amit, > > fo = fopen('fname','r+') > fo.write("%d %d",j,counter) > > > Is giving the following error: > > File "ZA.py", line 30, in > fo = open('fname','r+') > IOError: [Errno 2] No such file or dire

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-27 Thread Sayan Chatterjee
Hi Amit, fo = fopen('fname','r+') fo.write("%d %d",j,counter) Is giving the following error: File "ZA.py", line 30, in fo = open('fname','r+') IOError: [Errno 2] No such file or directory: 'fname' Where is the mistake? Cheers, Sayan On 27 March 2013 12:20, Amit Saha wrote: > On

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-26 Thread Sayan Chatterjee
Yes, ffmpeg will do if multiple plots can be generated using mathplotlib . I'll look up the links you provided and get back to you, if I can't figure it out. :) On 27 March 2013 12:12, Amit Saha wrote: > On Wed, Mar 27, 2013 at 4:36 PM, Sayan Chatterjee > wrote: > > Thanks a lot for your pro

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-26 Thread Amit Saha
On Wed, Mar 27, 2013 at 4:36 PM, Sayan Chatterjee wrote: > Thanks a lot for your prompt reply. > > 1. Yes. This is exactly what I wanted. Creating a bunch of data sets and > then writing script to plot them using gnuplot, but if something can produce > directly 'plots' it will certainly be helpful

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-26 Thread Sayan Chatterjee
Thanks a lot for your prompt reply. 1. Yes. This is exactly what I wanted. Creating a bunch of data sets and then writing script to plot them using gnuplot, but if something can produce directly 'plots' it will certainly be helpful. 2. Yes. By stitching them up I meant an animation.Sorry for the

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-26 Thread Amit Saha
On Wed, Mar 27, 2013 at 4:23 PM, Amit Saha wrote: > Hi Sayan, > > On Wed, Mar 27, 2013 at 4:14 PM, Sayan Chatterjee > wrote: >> Dear All, >> >> I am a newbie to Python but have a fair know how of other languages i.e C >> etc. >> >> I want to run an astrophysical simulation in Python. All I have t

Re: [Tutor] HELP: Creating animation from multiple plots

2013-03-26 Thread Amit Saha
Hi Sayan, On Wed, Mar 27, 2013 at 4:14 PM, Sayan Chatterjee wrote: > Dear All, > > I am a newbie to Python but have a fair know how of other languages i.e C > etc. > > I want to run an astrophysical simulation in Python. All I have to do it to > generate a set of 'plots' depending on a varying pa

Re: [Tutor] help with installing and/or running PyNomo

2013-03-23 Thread Alan Gauld
On 23/03/13 22:35, Edythe Thompson wrote: Using Python 2.6.5 Mac OS X version 10.6.8 I want to run the PyNomo package that uses python. This list is for learning core Python so you are probably better off asking on a PyNomo forum or mailing list. Or at the very least the MacPython list. Ho

Re: [Tutor] Help with iterators

2013-03-21 Thread Mitya Sirenef
On 03/21/2013 10:20 PM, Steven D'Aprano wrote: On 22/03/13 12:39, Mitya Sirenef wrote: > >> You can do it with groupby like so: >> >> >> from itertools import groupby >> from operator import itemgetter >> >> maxDate = "2013-03-21" >> mmax = list() >> >> obs.sort(key=itemgetter('date')) >> >> fo

Re: [Tutor] Help with iterators

2013-03-21 Thread Steven D'Aprano
On 22/03/13 12:39, Mitya Sirenef wrote: You can do it with groupby like so: from itertools import groupby from operator import itemgetter maxDate = "2013-03-21" mmax= list() obs.sort(key=itemgetter('date')) for k, group in groupby(obs, key=itemgetter('date')): group = [dob for dob

Re: [Tutor] Help with iterators

2013-03-21 Thread Steven D'Aprano
On 22/03/13 11:39, Matthew Johnson wrote: Dear list, I have been trying to understand out how to use iterators and in particular groupby statements. I am, however, quite lost. groupby is a very specialist function which is not very intuitive to use. Sometimes I think that groupby is an excell

Re: [Tutor] Help with iterators

2013-03-21 Thread Mitya Sirenef
On 03/21/2013 08:39 PM, Matthew Johnson wrote: Dear list, > > I have been trying to understand out how to use iterators and in > particular groupby statements. I am, however, quite lost. > > I wish to subset the below list, selecting the observations that have > an ID ('realtime_start') value th

Re: [Tutor] help related to unicode using python

2013-03-20 Thread शंतनू
Reply inline. On 21/03/13 12:18 AM, Steven D'Aprano wrote: > On 20/03/13 22:38, nishitha reddy wrote: >> Hi all >> i'm working with unicode using python >> i have some txt files in telugu i want to split all the lines of that >> text files in to words of telugu >> and i need to classify all of the

Re: [Tutor] Help

2013-03-20 Thread Alan Gauld
On 20/03/13 19:57, travis jeanfrancois wrote: I create a function that allows the user to a create sentence by inputing a string and to end the sentence with a period meaning inputing "." .The problem is while keeps overwriting the previuos input 'While' does not do any such thing. Your cod

Re: [Tutor] Help

2013-03-20 Thread Robert Sjoblom
On Mar 20, 2013 10:49 p.m., "xDog Walker" wrote: > > On Wednesday 2013 March 20 13:39, Robert Sjoblom wrote: > > A word of advice: next is a keyword in python > > ~/Packages/Python/Notable-0.1.5b> python > Python 2.5 (r25:51908, May 25 2007, 16:14:04) > [GCC 4.1.2 20061115 (prerelease) (SUSE Linux

Re: [Tutor] Help

2013-03-20 Thread xDog Walker
On Wednesday 2013 March 20 13:39, Robert Sjoblom wrote: > A word of advice: next is a keyword in python ~/Packages/Python/Notable-0.1.5b> python Python 2.5 (r25:51908, May 25 2007, 16:14:04) [GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" f

Re: [Tutor] Help

2013-03-20 Thread Dave Angel
On 03/20/2013 03:57 PM, travis jeanfrancois wrote: Hello, I am a beginning python student and I am having trouble with a program I am writing . The problem requires me to use "while" and that I create a function that allows the user to a create sentence by inputing a string and to end the sent

Re: [Tutor] Help

2013-03-20 Thread Robert Sjoblom
> Hello, I am a beginning python student and I am having trouble with a > program I am writing. Hello, and welcome. Since you don't say if this is an assignment or not, I will just point you in the right direction, and point out a few things you might make use of. > def B1(): > period = "." You

Re: [Tutor] help related to unicode using python

2013-03-20 Thread Steven D'Aprano
On 20/03/13 22:38, nishitha reddy wrote: Hi all i'm working with unicode using python i have some txt files in telugu i want to split all the lines of that text files in to words of telugu and i need to classify all of them using some identifiers.can any one send solution for that Probably no

Re: [Tutor] help related to unicode using python

2013-03-20 Thread Mark Lawrence
On 20/03/2013 11:38, nishitha reddy wrote: Hi all i'm working with unicode using python i have some txt files in telugu i want to split all the lines of that text files in to words of telugu and i need to classify all of them using some identifiers.can any one send solution for that

Re: [Tutor] help with itertools.izip_longest

2013-03-16 Thread Abhishek Pratap
On Sat, Mar 16, 2013 at 2:53 PM, Peter Otten <__pete...@web.de> wrote: > Abhishek Pratap wrote: > >> I am trying to use itertools.izip_longest to read a large file in >> chunks based on the examples I was able to find on the web. However I >> am not able to understand the behaviour of the following

Re: [Tutor] help with itertools.izip_longest

2013-03-16 Thread Peter Otten
Abhishek Pratap wrote: > I am trying to use itertools.izip_longest to read a large file in > chunks based on the examples I was able to find on the web. However I > am not able to understand the behaviour of the following python code. > (contrived form of example) > > > > for x in itertools.izi

Re: [Tutor] help with itertools.izip_longest

2013-03-16 Thread Abhishek Pratap
On Sat, Mar 16, 2013 at 2:32 PM, Oscar Benjamin wrote: > On 16 March 2013 21:14, Abhishek Pratap wrote: >> Hey Guys >> >> I am trying to use itertools.izip_longest to read a large file in >> chunks based on the examples I was able to find on the web. However I >> am not able to understand the beh

Re: [Tutor] help with itertools.izip_longest

2013-03-16 Thread Oscar Benjamin
On 16 March 2013 21:14, Abhishek Pratap wrote: > Hey Guys > > I am trying to use itertools.izip_longest to read a large file in > chunks based on the examples I was able to find on the web. However I > am not able to understand the behaviour of the following python code. > (contrived form of examp

Re: [Tutor] Help

2013-03-13 Thread Steven D'Aprano
On 14/03/13 02:12, Joshua Wilkerson wrote: Can you help me with something? This code (it also draws from the text_game file) says it has a syntax error, but I can't seem to find what it is, I think the code is having a fit but I'm not sure. I'm appreciative to all hep. The most valuable help

Re: [Tutor] Help

2013-03-13 Thread Oscar Benjamin
On 13 March 2013 15:12, Joshua Wilkerson wrote: > Can you help me with something? This code (it also draws from the text_game > file) says it has a syntax error, but I can't seem to find what it is, I > think the code is having a fit but I'm not sure. I'm appreciative to all > hep. Could you perh

Re: [Tutor] Help

2013-03-13 Thread Alan Gauld
On 13/03/13 15:12, Joshua Wilkerson wrote: Can you help me with something? This code (it also draws from the text_game file) says it has a syntax error, Don't make us guess, post the error message. It will tell us where. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.u

Re: [Tutor] help with storing money variable

2013-02-19 Thread Alan Gauld
On 19/02/13 12:36, Ghadir Ghasemi wrote: def printMenu(): print ("|__|") print ("| 2. Insert 10p |") print ("| 3. Insert 20p |") print ("| 4. Insert 50p |") print ("|__|") while True:

Re: [Tutor] help with storing money variable

2013-02-19 Thread Dave Angel
On 02/19/2013 07:36 AM, Ghadir Ghasemi wrote: Hi guys, Iam halfway through my vending machine program that I started earlier. I ran into a problem. When the user inserts some money, The money variable is not stored for until the user buys an item. So what happens is when the users inserts some

Re: [Tutor] help with inch to cms conversion .

2013-02-11 Thread Danny Yoo
On Mon, Feb 11, 2013 at 9:06 AM, Pravya Reddy wrote: > Can you please help me with the code. > > #!/usr/bin/env python > """ > inchtocm.py > > """ > > def Inchtocm(inches): > """Returns 2.54 * inches""" > return (2.54 * float(inches_number1)) I don't know if your curriculum talks about w

Re: [Tutor] help with inch to cms conversion .

2013-02-11 Thread Dave Angel
On 02/11/2013 11:06 AM, Pravya Reddy wrote: Can you please help me with the code. #!/usr/bin/env python """ inchtocm.py """ First, remove that try/except until the code is free of obvious bugs. It's masking where the error actually occurs. Alternatively, include a variable there, and print

Re: [Tutor] help with running perl script that writes to a text file

2013-02-06 Thread eryksun
On Wed, Feb 6, 2013 at 12:47 PM, Alan Gauld wrote: > so "the DOS prompt" is both traditional and sufficiently specific making it > the most easily understandable of the likely terms. "DOS prompt" is a common idiom, but it bears mentioning now and then that the OS is NT [1], not DOS. That's all; I

Re: [Tutor] help with running perl script that writes to a text file

2013-02-06 Thread Alan Gauld
On 06/02/13 10:58, eryksun wrote: and pedantic comment about the habit of saying "DOS prompt". The cmd shell is a Win32 console application, unlike DOS command.com. Yes, but the problem is that Windows now has so many command prompts (cscript, cmd, power shell etc) that "the Windows prompt"

Re: [Tutor] help with running perl script that writes to a text file

2013-02-06 Thread eryksun
On Tue, Feb 5, 2013 at 6:44 PM, 3n2 Solutions <3n2soluti...@gmail.com> wrote: > > I want to automate the following manual process from DOS promp: I agree with Peter's answer. I'd just like to add a generally useless and pedantic comment about the habit of saying "DOS prompt". The cmd shell is a Wi

Re: [Tutor] help with running perl script that writes to a text file

2013-02-06 Thread Peter Otten
3n2 Solutions wrote: > Hello, > > I want to automate the following manual process from DOS promp: > > c:/scripts/perl>perl fix.pl base.gtx >base.txt > > Here is my python script: > > path="c:/scripts/perl/" > subprocess.call(['perl','fix.pl','base.gtx >base.txt',path]) > > I also tried this a

Re: [Tutor] help with running perl script that writes to a text file

2013-02-05 Thread Alan Gauld
On 05/02/13 23:44, 3n2 Solutions wrote: I want to automate the following manual process from DOS promp: c:/scripts/perl>perl fix.pl base.gtx >base.txt Use a DOS batch file, that's what they are there for. If you are not doing any other processing Python is inefficient and overkill for this

Re: [Tutor] Help- Regarding python

2013-02-05 Thread Oscar Benjamin
On 5 February 2013 05:08, eryksun wrote: > On Mon, Feb 4, 2013 at 7:21 PM, Oscar Benjamin > wrote: >> eigenvalues, eigenvectors = np.linalg.eig(C) > > First sort by eigenvalue magnitude: > > >>> idx = np.argsort(eigenvalues)[::-1] > >>> print idx > [ 0 1 2 3 8 10 11 12 14 22 20 21

Re: [Tutor] Help- Regarding python

2013-02-04 Thread eryksun
On Mon, Feb 4, 2013 at 7:21 PM, Oscar Benjamin wrote: > eigenvalues, eigenvectors = np.linalg.eig(C) First sort by eigenvalue magnitude: >>> idx = np.argsort(eigenvalues)[::-1] >>> print idx [ 0 1 2 3 8 10 11 12 14 22 20 21 18 19 23 24 17 16 15 13 9 7 5 6 4] >>> eigenva

Re: [Tutor] Help- Regarding python

2013-02-04 Thread Oscar Benjamin
On 4 February 2013 06:24, Gayathri S wrote: > Hi All! > If i have data set like this means... > > 3626,5000,2918,5000,2353,2334,2642,1730,1687,1695,1717,1744,593,502,493,504,449,431,444,444,429,10 > 438,498,3626,3629,5000,2918,5000,2640,2334,2639,1696,1687,1695,1717,1744,592,502,49

Re: [Tutor] Help- Regarding python

2013-02-04 Thread Danny Yoo
> How to do PCA on this data? if it is in array how to do that? and also how > to use princomp() in PCA? Principal component analysis, http://en.wikipedia.org/wiki/Principal_component_analysis may not be "built in". Do you know for sure that it is? According to this blog entry, you can do

Re: [Tutor] Help- Regarding python

2013-02-04 Thread Steven D'Aprano
On 04/02/13 17:24, Gayathri S wrote: Hi All! If i have data set like this means... 3626,5000,2918,5000,2353,2334,2642,[...],496. No need to dump your entire data set on us. Just a few representative values will do. How to do PCA on this data? if it is in array how to do tha

Re: [Tutor] Help- Regarding python

2013-02-04 Thread Alan Gauld
On 04/02/13 06:24, Gayathri S wrote: Hi All! If i have data set like this means... 3626,5000,2918,5000,2353,2334,2642,1730,1687,1695,1717,1744,593,502,493,504,449,431,444,444,429,10 ... 458,5022,3640,3644,5000,2922,5000,2346,2321,2628,1688,1666,1674,1696,744,590,496. How to d

Re: [Tutor] Help

2013-02-02 Thread Alan Gauld
On 02/02/13 01:47, Jack Little wrote: def simpstart(): global ammo1 global ammo2 global ammo3 global health global tech_parts global exp global radio_parts ammo1=10 ammo2=0 ammo3=0 health=100 tech_parts=0 exp=0 radio_parts=0 This function is completely

Re: [Tutor] Help

2013-02-01 Thread Dave Angel
On 02/01/2013 08:47 PM, Jack Little wrote: I get this error Traceback (most recent call last): File "C:\Users\Jack\Desktop\python\g.py", line 56, in path1pt1() NameError: name 'path1pt1' is not defined With this amount of code: def simpstart(): global ammo1 global ammo2 glob

Re: [Tutor] Help

2013-02-01 Thread Brandon
You get the error because you call path1pt1() before it is defined. Define your path1pt1() method at the top of your code before simpstart(). Brandon On Fri, Feb 1, 2013 at 5:47 PM, Jack Little wrote: > I get this error > > Traceback (most recent call last): > File "C:\Users\Jack\Desktop\pyt

Re: [Tutor] HELP-Regarding python

2013-01-30 Thread bob gailer
On 1/30/2013 1:51 AM, Gayathri S wrote: I am sorry that you chose to ignore my request to start a new email with a relevant subject. Please next time do so. The easier you make it for us to help you the more likely we will want to help. -- Bob Gailer 919-636-4239 Chapel Hill NC __

Re: [Tutor] HELP-Regarding python

2013-01-29 Thread spawgi
missed a parenthesis, it should look like - with open(, ) as : //operation with the file. On Wed, Jan 30, 2013 at 12:31 PM, wrote: > A safer approach would be - > with open(, as : > //operation with the file. > > This way, you do not have to remember to close the file explicitly. > > > On Wed,

Re: [Tutor] HELP-Regarding python

2013-01-29 Thread spawgi
A safer approach would be - with open(, as : //operation with the file. This way, you do not have to remember to close the file explicitly. On Wed, Jan 30, 2013 at 12:27 PM, Dave Angel wrote: > On 01/30/2013 01:51 AM, Gayathri S wrote: > >> Hi All! >> I don't know how to

Re: [Tutor] HELP-Regarding python

2013-01-29 Thread Dave Angel
On 01/30/2013 01:51 AM, Gayathri S wrote: Hi All! I don't know how to read text file in python. If the data values are stored in a text file format, for example(1,30,60,90,120...200) means what i would do for reading it in python. could you just explain it. infile = open

Re: [Tutor] HELP- Regarding working with python

2013-01-29 Thread Gayathri S
Hi all...! I don't know how to import our own data sets in python. its always importing the in built data sets. could you just tell me how to do that...! Thanks...! On Mon, Jan 28, 2013 at 1:50 PM, Steven D'Aprano wrote: > On 28/01/13 18:26, Gayathri S wrote: > >> Hi all..! >>

Re: [Tutor] Help!

2013-01-29 Thread Kwpolska
On Mon, Jan 28, 2013 at 10:22 PM, Ghadir Ghasemi wrote: > Hi guys I wanted to make a program called Binary/decimal converter. That’s easy, int('11', 2) and bin(3) should be enough. > But I want to do it the hard way e.g. not using built in python functions. > Can you give me an idea about how I

Re: [Tutor] Help!

2013-01-28 Thread Joel Goldstick
On Mon, Jan 28, 2013 at 4:51 PM, Danny Yoo wrote: > > Hi guys I wanted to make a program called Binary/decimal converter. But > I want to do it the hard way e.g. not using built in python functions. Can > you give me an idea about how I can do that? > > > See if you can write the steps to do this

Re: [Tutor] Help!

2013-01-28 Thread Danny Yoo
> Hi guys I wanted to make a program called Binary/decimal converter. But I > want to do it the hard way e.g. not using built in python functions. Can you > give me an idea about how I can do that? Do you have an idea of what kind of things would be useful test cases for this converter? Thinki

Re: [Tutor] Help!

2013-01-28 Thread Mark K. Zanfardino
Ghadir, I did a quick google search for how to convert digital to binary. The first link was to http://www.ehow.com/how_5164721_convert-digital-binary.html which gives a pretty clear example of the process for converting digital to binary. Of course, you will need to translate this psuedo-co

Re: [Tutor] HELP- Regarding working with python

2013-01-28 Thread Steven D'Aprano
On 28/01/13 18:26, Gayathri S wrote: Hi all..! wanna know how to compile python script in python command line, and is there any need for setting path for python like JAVA? whats the difference between .py file and .pyc file? Python is a byte-code compiled language, like Java many y

Re: [Tutor] HELP- Regarding working with python

2013-01-27 Thread Gayathri S
Hi all..! wanna know how to compile python script in python command line, and is there any need for setting path for python like JAVA? whats the difference between .py file and .pyc file? Thanks...! On Sat, Jan 19, 2013 at 8:54 AM, bob gailer wro

Re: [Tutor] Help!

2013-01-26 Thread Russel Winder
Following up on Jos Kerc's answer: On Fri, 2013-01-18 at 07:56 -0500, Carpenter, Steven wrote: […] > print(math.acos(((a**2)+(b**2)-(c**2))/(2(a*b 2(a*b) → 2 * (a * b) > TypeError: 'int' object is not callable Juxtaposition does not imply multiplication in Python as it does in mathemat

Re: [Tutor] Help!

2013-01-26 Thread Jos Kerc
You are missing a multiplication sign. Near the end of your formula. On Fri, Jan 18, 2013 at 1:56 PM, Carpenter, Steven < steven.carpen...@oakland.k12.mi.us> wrote: > To Whom it May Concern, > > I’m trying to get this code working. *Here’s my question:* > > Consider a triangle with side

Re: [Tutor] HELP- Regarding working with python

2013-01-18 Thread bob gailer
On 1/18/2013 8:03 AM, eryksun wrote: Yes, it's a mistake in the PCA example from the docs: http://mlpy.sourceforge.net/docs/3.5/dim_red.html#principal-component-analysis-pca There seems to be no way to report a bug in that documentation! Or am I missing something? -- Bob Gailer 919-636-4239 C

Re: [Tutor] HELP- Regarding working with python

2013-01-18 Thread eryksun
On Fri, Jan 18, 2013 at 3:25 AM, Lie Ryan wrote: > On 18/01/13 17:11, Gayathri S wrote: >> >> >>> import numpy as np >> >>> import matplotlib.pyplot as plt >> >>> import mlpy >> >>> np.random.seed(0) >> >>> mean,cov,n=[0,0],[[1,1],[1,1.5]],100 >> >>> x=np.random.multivariate_normal(mean,cov,

Re: [Tutor] HELP- Regarding working with python

2013-01-18 Thread Lie Ryan
On 18/01/13 17:11, Gayathri S wrote: hi... I am using principal component analysis for dimensionality reduction in python. am having this following error... >>> import numpy as np >>> import matplotlib.pyplot as plt >>> import mlpy >>> np.random.seed(0) >>> mean,cov,n=[0,0],[[1,1]

Re: [Tutor] HELP- Regarding working with python

2013-01-18 Thread Marc Tompkins
On Thu, Jan 17, 2013 at 10:11 PM, Gayathri S wrote: > >>> import numpy as np > >>> import matplotlib.pyplot as plt > >>> import mlpy > >>> np.random.seed(0) > >>> mean,cov,n=[0,0],[[1,1],[1,1.5]],100 > >>> x=np.random.multivariate_normal(mean,cov,n) > >>> pca.learn(x) > Traceback (most recent call

Re: [Tutor] HELP- Regarding working with python

2013-01-17 Thread Gayathri S
hi... I am using principal component analysis for dimensionality reduction in python. am having this following error... >>> import numpy as np >>> import matplotlib.pyplot as plt >>> import mlpy >>> np.random.seed(0) >>> mean,cov,n=[0,0],[[1,1],[1,1.5]],100 >>> x=np.random.multivariate_no

Re: [Tutor] help for a beginner

2013-01-11 Thread Graham Dubow
Murail, Check out Udacity.com and the CS101 course. Great video lectures reinforced by "homework" and problems (with answers) that you can do yourself. Also has a very good forum and active user base to ask questions. It is a good starting point for a beginner and teaches the basics behind how to

Re: [Tutor] help for a beginner

2013-01-11 Thread vishwajeet singh
On Sat, Jan 12, 2013 at 12:28 AM, MDB wrote: > Hi, > I am a beginner to progrmming and want to learn basic python. I am a > scientist (with less math background) with absolutely no programming > experience. Are there any web based tutorials/videos/books to learn python. > The best book for begin

Re: [Tutor] HELP- Regarding working with python

2013-01-08 Thread Gayathri S
Hi.. I would like to use Principal component analysis independent component analysis in python. Wanna know whether it will support this efficiently or not? On Wed, Jan 2, 2013 at 4:59 PM, Alan Gauld wrote: > On 02/01/13 07:20, Gayathri S wrote: > >> Hi.. >> I am using python 2.7

Re: [Tutor] help about to how many times the function called

2013-01-04 Thread bob gailer
On 1/4/2013 4:25 AM, Steven D'Aprano wrote: On 04/01/13 20:17, lei yang wrote: Hi experts I have a function will print PASS status def print_pass(t_elapsed): """ Print PASS to stdout with PASS (green) color. """ print_stdout(bcolors.PASS + "PASS" + bcolors.ENDC + " (%.2f

Re: [Tutor] help about to how many times the function called

2013-01-04 Thread Steven D'Aprano
On 04/01/13 20:17, lei yang wrote: Hi experts I have a function will print PASS status def print_pass(t_elapsed): """ Print PASS to stdout with PASS (green) color. """ print_stdout(bcolors.PASS + "PASS" + bcolors.ENDC + " (%.2f s)" % t_elapsed) I want to calculate the pa

Re: [Tutor] HELP- Regarding working with python

2013-01-02 Thread Alan Gauld
On 02/01/13 07:20, Gayathri S wrote: Hi.. I am using python 2.7 and scikit-learn for machine learning. And OS is Windows 7. Wanna know how to import our own data sets in scikit-learn? Further to my last mail there is a gmane group gmane.comp.python.scikit-learn I'd try looking ther

Re: [Tutor] HELP- Regarding working with python

2013-01-02 Thread Alan Gauld
On 02/01/13 07:20, Gayathri S wrote: Hi.. I am using python 2.7 and scikit-learn for machine learning. And OS is Windows 7. Wanna know how to import our own data sets in scikit-learn? Hi, This list is for learning Python and its standard library. Your question looks to be specific

Re: [Tutor] help

2012-12-30 Thread Mike G
Hi Randy > I am an older newbie teaching myself Python programming. > Me too :) > My problem is I hear no system bell; the enter doesn't respond by quitting > the program; > The problem with the program code the enter key hasn't worked in earlier > programs. > > I appreciate any advice I may r

Re: [Tutor] help

2012-12-29 Thread Kwpolska
On Fri, Dec 28, 2012 at 1:30 PM, Evans Anyokwu wrote: > I just tried your code and it worked for me. Like Alan and Steven have > pointed out already, sounding the system bell depends on how you are running > the code and your platform. > > On my computer I have Putty installed which I use to conne

<    1   2   3   4   5   6   7   8   9   10   >