Re: anyone know pandas ? Don't understand error: NotImplementedError...

2013-04-18 Thread someone
On 04/18/2013 04:07 PM, Neil Cerutti wrote: On 2013-04-18, Wayne Werner wrote: On Wed, 17 Apr 2013, someone wrote: Go to line 214, and take a look-see at what you find. My guess is it will be something like: def rule_code(): raise NotImplementedError() Which is terribly

Re: anyone know pandas ? Don't understand error: NotImplementedError...

2013-04-18 Thread someone
On 04/18/2013 03:44 PM, Wayne Werner wrote: On Wed, 17 Apr 2013, someone wrote: File "/usr/lib/pymodules/python2.7/pandas/tseries/offsets.py", line 214, in rule_code raise NotImplementedError NotImplementedError Can anyone tell why this error appears and how

anyone know pandas ? Don't understand error: NotImplementedError...

2013-04-17 Thread someone
Hi, Here's my script (from http://brenda.moon.net.au/category/data-visualisation/: #!/usr/bin/python import pandas import datetime import numpy datesList = [datetime.date(2011,12,1), \ datetime.date(2011,12,2), \ datetime.date(2011,12,3)

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-13 Thread someone
On 04/14/2013 12:34 AM, Chris Angelico wrote: On Sun, Apr 14, 2013 at 5:34 AM, someone wrote: I think maybe I'll experiment a bit with both mySql (small/medium sized databases) and for critical/important stuff I should go with PostgreSQL PostgreSQL isn't majorly slower than MySQL,

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-13 Thread someone
On 04/14/2013 12:54 AM, Chris Angelico wrote: On Sun, Apr 14, 2013 at 8:31 AM, someone wrote: Ok, thank you. I just came across a blog that said pytables is also a very good option? http://www.pytables.org/moin/PyTables?action=AttachFile&do=view&target=non-indexed.png From what

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-13 Thread someone
On 04/14/2013 12:22 AM, Walter Hurry wrote: On Sat, 13 Apr 2013 21:34:38 +0200, someone wrote: On 04/13/2013 04:56 PM, Walter Hurry wrote: On Sat, 13 Apr 2013 16:39:12 +0200, someone wrote: I'm not so rich, so I prefer to go for a free database solution rather than an expensive li

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-13 Thread someone
On 04/13/2013 10:01 PM, Dennis Lee Bieber wrote: On Sun, 14 Apr 2013 00:03:25 +1000, Chris Angelico declaimed the following in gmane.comp.python.general: [ ] * Create a table with a number of rows with an ID and a counter, initialized to 0 * Repeatedly, in parallel, perform a transaction

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-13 Thread someone
On 04/13/2013 07:02 PM, rusi wrote: On Apr 13, 9:15 pm, Chris Angelico wrote: On Sun, Apr 14, 2013 at 12:39 AM, someone wrote: On 04/13/2013 04:03 PM, Chris Angelico wrote: . . Failure at any level means the overall system is not ACID compliant. Ok, it would be nice to hear/read

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-13 Thread someone
On 04/13/2013 06:15 PM, Chris Angelico wrote: On Sun, Apr 14, 2013 at 12:39 AM, someone wrote: On 04/13/2013 04:03 PM, Chris Angelico wrote: Failure at any level means the overall system is not ACID compliant. Roger... But google says sqlite is supposed to be ACID compliant (although maybe

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-13 Thread someone
On 04/13/2013 04:56 PM, Walter Hurry wrote: On Sat, 13 Apr 2013 16:39:12 +0200, someone wrote: I'm not so rich, so I prefer to go for a free database solution rather than an expensive license ( but I do care about ACID compliance) Sounds to me that PostgreSQL is your man, then. O

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-13 Thread someone
On 04/13/2013 04:36 PM, Roy Smith wrote: In article , Chris Angelico wrote: 2) The database engine must employ some form of write-ahead log. [...] one way or another, there must be a way to detect half-done transactions. 3) The operating system and filesystem must support a forced file sync

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-13 Thread someone
On 04/13/2013 04:03 PM, Chris Angelico wrote: On Sat, Apr 13, 2013 at 11:30 PM, someone wrote: On 04/13/2013 01:39 PM, Chris Angelico wrote: Note that there's a caveat: You have to tell SQLite to be ACID compliant, effectively. So, you're saying to me that by default SQLite

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-13 Thread someone
On 04/13/2013 01:39 PM, Chris Angelico wrote: On Sat, Apr 13, 2013 at 9:08 PM, someone wrote: I just had to google what ACID compliance means and accordingly to this: http://en.wikipedia.org/wiki/SQLite "SQLite is ACID-compliant and implements most of the SQL standard, using a dynami

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-13 Thread someone
On 04/13/2013 03:44 AM, Steven D'Aprano wrote: On Fri, 12 Apr 2013 23:26:05 +, Cousin Stanley wrote: The firefox browser keeps different sqlite database files for various uses Yes, and I *really* wish they wouldn't. It's my number 1 cause of major problems with Firefox. E.g. h

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-12 Thread someone
On 04/13/2013 01:26 AM, Cousin Stanley wrote: someone wrote: So SQLite is very good for "practicing" Yes it is but it is also very good for much more than just practice Check the wikipedia info http://en.wikipedia.org/wiki/Sqlite Very i

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-12 Thread someone
On 04/12/2013 06:58 PM, Cousin Stanley wrote: someone wrote: As you can see, on my system I had to use: print row[0] , row[1] instead of: print row[ 'xtime' ] , row[ 'col4' ] I'm not sure exactly why The magic there is setting up the row_factory afte

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-12 Thread someone
On 2013-04-11 20:44, Cousin Stanley wrote: Cousin Stanley wrote: The stand-alone sqlite interpreter can first be used to create an empty database named some.sql3 and create a table named xdata in that data base sqlite3 some.sql3 '.read xdata_create.sql' This step can

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-12 Thread someone
On 2013-04-11 19:58, Cousin Stanley wrote: someone wrote: I want to put this table into an appropriate container such that afterwards I want to: 1) Put the data into a mySql-table You might consider using sqlite3 as a database manager since it is "batteries included&q

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-11 Thread someone
On 04/11/2013 07:58 PM, Cousin Stanley wrote: someone wrote: You can be creative with the data selections and pass them off to be plotted as needed If mysql is used instead of sqlite3 you should only have to monkey with the data type declarations in xdata_create.sql and

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-11 Thread someone
On 2013-04-11 10:49, someone wrote: On 2013-04-11 03:39, Cousin Stanley wrote: Is there any clever way of avoiding this for loop, for either this container or another clever container type? Ah, I see - I can also just add a numpy array, i.e: -- import

Re: python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-11 Thread someone
his problem, that it cannot store strings and numbers in the same matrix - matrices must entirely be numeric, which my data isn't (due to 1st column)... Thanks for any input, if someone has any good ideas... -- http://mail.python.org/mailman/listinfo/python-list

python-noob - which container is appropriate for later exporting into mySql + matplotlib ?

2013-04-10 Thread someone
Hi, Here's my data: --- 20130315T071500 39000. 10 26 48000. 1 40 20130315T071501 39000. 10 26 48000. 2 42 20130315T071501 39000. 10 26 47520. 15 69 20130315T071501 39000. 10 26 47160. 1 70 20130315T071501 3

Re: pygame - importing GL - very bad...

2013-01-06 Thread someone
On 01/06/2013 12:37 PM, alex23 wrote: On Jan 6, 5:49 am, someone wrote: I thought that python also used "true" pass-by-reference, although I haven't figured out exactly when I have this problem. I can just see that sometimes I get this problem and then I need to copy the varia

Re: pygame - importing GL - very bad...

2013-01-05 Thread someone
On 01/05/2013 02:27 PM, Chris Angelico wrote: On Sun, Jan 6, 2013 at 12:06 AM, someone wrote: In any case I think we understand each other. That's one of the links I just posted :) It's not just a naming difference, though. With Pascal's pass-by-reference semantics, this

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-05 Thread someone
On 01/05/2013 01:49 PM, Jan Riechers wrote: On 05.01.2013 03:11, someone wrote: But about the regular expressions (a bit deeper look into that): Like said of Chris: [a-z] defines a "catching group", in this case all ascii lowercase letters ranging from "a" to "z&quo

Re: pygame - importing GL - very bad...

2013-01-05 Thread someone
On 01/05/2013 12:47 PM, Chris Angelico wrote: C has typed variables, so it's a compile-time error to try to put any other type into that variable. Python doesn't. That flexibility comes at the cost of error-catching. There are hybrid systems, but in general, type declarations imply variable decla

Re: New in Python , Need a Mentor

2013-01-05 Thread someone
On 01/02/2013 05:30 PM, Chris Angelico wrote: On Thu, Jan 3, 2013 at 3:24 AM, Wolfgang Strobl wrote: Chris Angelico : I strongly recommend IDLE - much better editing/recall facilities than the command-line Python has), and work through the tutorial: Well, this is certainly a matter of taste.

Re: pygame - importing GL - very bad...

2013-01-05 Thread someone
On 01/05/2013 02:30 AM, Dave Angel wrote: from opengl import gl, glu, glut gl.rotate(...) gl.clear(gl.COLOR_BUFFER_BIT) Erhm, that's the same as above. Is that what you meant to write? No, it's not the same; here he did not capitalize the function names. Previously they look like class ins

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-04 Thread someone
On 01/03/2013 03:56 AM, Dave Angel wrote: The first lint program I recall hearing of was available in the early 1980's, and was for the C language. At the time, the C language was extremely flexible (in other words, lots of ways to shoot yourself in the foot) and the compiler was mostly of the p

Re: Regular expression syntax, was Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-04 Thread someone
On 01/03/2013 12:39 PM, Peter Otten wrote: someone wrote: On 01/03/2013 10:00 AM, Peter Otten wrote: Terry Reedy wrote: [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with [an underscore ? No, it allows underscores. As I read that re, 'rx', etc, do match. They

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-04 Thread someone
On 01/03/2013 12:27 PM, Chris Angelico wrote: On Thu, Jan 3, 2013 at 10:19 PM, someone wrote: Doesn't this "[ ... ]" mean something optional? What does {2,30}$ mean? I think $ means that the {2,30} is something in the end of the sentence... You can find regular expression p

Re: pygame - importing GL - very bad...

2013-01-04 Thread someone
On 01/03/2013 03:09 PM, Mike C. Fletcher wrote: On 13-01-02 08:53 PM, someone wrote: So this solution is not something I like too... But I can see some other people came up with good solutions, which I didn't knew about.. Why is this solution not to your liking? Python has namespaces

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-04 Thread someone
On 01/03/2013 05:52 PM, Terry Reedy wrote: That seems like a improper error message from the tool. "Invalid name" does *not* properly describe that situation. The name is *not* "Invalid" in any sense of the word, and a "checker" that tells you it is is creating needless false-positives. An er

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-03 Thread someone
On 01/03/2013 10:00 AM, Peter Otten wrote: Terry Reedy wrote: [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with an underscore ? No, it allows underscores. As I read that re, 'rx', etc, do match. They No, it's one leading letter or underscore [a-z_] plus at least two lett

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-03 Thread someone
On 01/03/2013 03:55 AM, Ian Kelly wrote: On Wed, Jan 2, 2013 at 7:24 PM, someone wrote: 3) self.rx / rself.ry / self.rz: Invalid name "rx" (should match [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with an underscore ? It wants the name to be at least 3 chara

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 08:31 PM, Ian Kelly wrote: On Wed, Jan 2, 2013 at 10:57 AM, Chris Angelico wrote: Yeah, same applies to most linters I think. You end up disagreeing with the author on half the points. Oh well. Doesn't make the tool useless, just means you need to fiddle with it to get it how you

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/03/2013 12:52 AM, Steven D'Aprano wrote: On Wed, 02 Jan 2013 09:26:32 -0500, Dave Angel wrote: Global const values should be ALL_CAPS, so it's obvious that nobody intends to modify them. Like math.pi I suppose? *wink* :-) It's the non-const global attributes that expect to be under

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 03:26 PM, Dave Angel wrote: On 01/02/2013 09:09 AM, someone wrote: On 01/02/2013 01:07 PM, Peter Otten wrote: OMG... I don't want to type those underscores everywhere... Anyway, thank you very much for explaining the meaning of what it wants... Global const values shou

Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 11:30 PM, Andrew Berg wrote: On 2013.01.02 15:57, Michael Torrie wrote: *. The only place where I've seen an import * that actually belonged was in an __init__.py that brought sub-module symbols into the main package namespace, and even then I figure there's got to be a better w

Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 10:57 PM, Michael Torrie wrote: On 01/01/2013 04:49 PM, someone wrote: On 01/01/2013 12:13 PM, Chris Angelico wrote: > You could simply > > import OpenGL.GL as GL You're right - but I forgot to write that even though this maybe should/is recommended many pl

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 01:07 PM, Peter Otten wrote: someone wrote: On 01/01/2013 01:56 PM, Peter Otten wrote: from module import * # pylint: disable=W0622 Oh, I just learned something new now... How come I cannot type "#pylint: enable=W0622" in the line just below the import ? With wha

Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 08:39 AM, Steven D'Aprano wrote: On Wed, 02 Jan 2013 00:49:36 +0100, someone wrote: What does this mean? Why does it say 'format" cannot be deleted after I did the wildcard import ? It means that there is no "format" in the current scope, which impl

Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 10:52 AM, alex23 wrote: On Jan 2, 1:01 pm, Nobody wrote: You can't delete built-in names. Actually, you can. If you ever need to shoot yourself in the foot in this particular way, you can always do: del __builtins__.format Not saying you _should_, just that you _can_ :)

Re: how to solve complex equation?

2013-01-01 Thread someone
x27;t match up). Propbably it's meant to be the one someone else posted a link to: http://classes.engr.oregonstate.edu/cce/winter2012/ce492/Modules/06_structural_design/06-3_body.htm This thingy can't be solved on paper so you need some iterative algorithm to find the solution. So waht y

Re: pygame - importing GL - very bad...

2013-01-01 Thread someone
On 01/02/2013 04:01 AM, Nobody wrote: On Wed, 02 Jan 2013 00:49:36 +0100, someone wrote: In [11]: del format --- NameError Traceback (most recent call last) in () > 1 del for

Re: pygame - importing GL - very bad...

2013-01-01 Thread someone
On 01/01/2013 11:39 PM, alex23 wrote: On Jan 1, 9:00 pm, someone wrote: I can see that pygame hasn't been updated for a long while - not many users use it? It helps if you look in the right place: pygame "Last Updated 2012-12-29": https://bitbucket.org/pygame/pygame/sr

Re: pygame - importing GL - very bad...

2013-01-01 Thread someone
On 01/01/2013 01:56 PM, Peter Otten wrote: > someone wrote: > It turns out pylint is lying. The situation is equivalent to > > $ cat module.py > for format in [42]: > pass > del format > > $ cat main.py > original_format = format > from module import * &

Re: pygame - importing GL - very bad...

2013-01-01 Thread someone
On 01/01/2013 12:13 PM, Chris Angelico wrote: > On Tue, Jan 1, 2013 at 10:00 PM, someone wrote: >> See this code (understand why I commented out first line): >> >> # from OpenGL.GL import * >> from OpenGL.GL import glEnable, GL_DEPTH_TEST, \ >> glSh

Re: pygame - importing GL - very bad...

2013-01-01 Thread someone
On 01/01/2013 12:49 PM, Steven D'Aprano wrote: > On Tue, 01 Jan 2013 12:00:32 +0100, someone wrote: > >> See this code (understand why I commented out first line): >> >> # from OpenGL.GL import * > [...] >> The reason why I commented out the first line is

pygame - importing GL - very bad...

2013-01-01 Thread someone
See this code (understand why I commented out first line): # from OpenGL.GL import * from OpenGL.GL import glEnable, GL_DEPTH_TEST, \ glShadeModel, GL_SMOOTH, glClearColor, \ GL_CULL_FACE, GL_BLEND, glBlendFunc, \ GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, \ glClear, GL_COLOR_BUFFE

Re: numpy - 2D matrix/array - initialization like in Matlab...

2012-10-15 Thread someone
On 10/15/2012 11:26 PM, MRAB wrote: On 2012-10-15 22:09, someone wrote: See this: == In [5]: Dx = numpy.matrix('1 0 0; 0 0.5 -0.5; 0 -0.5 1.5') In [6]: Dx Out[6]: matrix([[ 1. , 0. , 0. ], [ 0. , 0.5, -0.5],

numpy - 2D matrix/array - initialization like in Matlab...

2012-10-15 Thread someone
See this: == In [5]: Dx = numpy.matrix('1 0 0; 0 0.5 -0.5; 0 -0.5 1.5') In [6]: Dx Out[6]: matrix([[ 1. , 0. , 0. ], [ 0. , 0.5, -0.5], [ 0. , -0.5, 1.5]]) == O

Re: numpy (matrix solver) - python vs. matlab

2012-05-04 Thread someone
On 05/04/2012 06:15 AM, Russ P. wrote: On May 3, 4:59 pm, someone wrote: On 05/04/2012 12:58 AM, Russ P. wrote: Ok, but I just don't understand what's in the "empirical" category, sorry... I didn't look it up, but as far as I know, empirical just means based on expe

Re: numpy (matrix solver) - python vs. matlab

2012-05-04 Thread someone
On 05/04/2012 05:52 AM, Steven D'Aprano wrote: On Thu, 03 May 2012 19:30:35 +0200, someone wrote: So how do you explain that the natural frequencies from FEM (with condition number ~1e6) generally correlates really good with real measurements (within approx. 5%), at least for the firs

Re: numpy (matrix solver) - python vs. matlab

2012-05-03 Thread someone
On 05/04/2012 12:58 AM, Russ P. wrote: Yeah, I realized that I should rephrase my previous statement to something like this: For any *empirical* engineering or scientific work, I'd say that a condition number of 1e6 is likely to be unacceptable. Still, I don't understand it. Do you have an exa

Re: numpy (matrix solver) - python vs. matlab

2012-05-03 Thread someone
On 05/03/2012 07:55 PM, Russ P. wrote: On May 3, 10:30 am, someone wrote: On 05/02/2012 11:45 PM, Russ P. wrote: For any practical engineering or scientific work, I'd say that a condition number of 1e6 is very likely to be completely unacceptable. So how do you explain that the na

Re: numpy (matrix solver) - python vs. matlab

2012-05-03 Thread someone
On 05/02/2012 11:45 PM, Russ P. wrote: On May 2, 1:29 pm, someone wrote: If your data starts off with only 1 or 2 digits of accuracy, as in your example, then the result is meaningless -- the accuracy will be 2-2 digits, or 0 -- *no* digits in the answer can be trusted to be accurate. I

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread someone
On 05/02/2012 04:47 PM, Steven_Lord wrote: Russ, you and the OP (and others) may be interested in one of the books that Cleve Moler has written and made freely available on the MathWorks website: http://www.mathworks.com/moler/ The chapter Linear Equations in "Numerical Computing with MATLAB"

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread someone
On 05/02/2012 01:52 PM, Steven D'Aprano wrote: On Wed, 02 May 2012 08:00:44 +0200, someone wrote: On 05/02/2012 01:05 AM, Paul Rubin wrote: someone writes: Actually I know some... I just didn't think so much about, before writing the question this as I should, I know theres also

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread someone
On 05/02/2012 08:36 AM, Russ P. wrote: On May 1, 11:03 pm, someone wrote: On 05/02/2012 01:38 AM, Russ P. wrote: .. On May 1, 4:05 pm, Paul Rubinwrote: It would really appreciate if anyone could maybe post a simple SVD example and tell what the vectors from the SVD represents

Re: numpy (matrix solver) - python vs. matlab

2012-05-02 Thread someone
On 05/02/2012 01:03 PM, Kiuhnm wrote: On 5/2/2012 8:00, someone wrote: Still, I dont think I completely understand SVD. SVD (at least in Matlab) returns 3 matrices, one is a diagonal matrix I think. I think I would better understand it with geometric examples, if one would be so kind to maybe

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread someone
On 05/02/2012 01:38 AM, Russ P. wrote: On May 1, 4:05 pm, Paul Rubin wrote: someone writes: Actually I know some... I just didn't think so much about, before writing the question this as I should, I know theres also something like singular value decomposition that I think can help

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread someone
On 05/02/2012 01:05 AM, Paul Rubin wrote: someone writes: Actually I know some... I just didn't think so much about, before writing the question this as I should, I know theres also something like singular value decomposition that I think can help solve otherwise illposed problems, You

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread someone
On 05/01/2012 10:54 PM, Russ P. wrote: On May 1, 11:52 am, someone wrote: On 04/30/2012 03:35 AM, Nasser M. Abbasi wrote: What's the limit in matlab (on the condition number of the matrices), by the way, before it comes up with a warning ??? The threshold of acceptability really de

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread someone
On 05/01/2012 09:59 PM, Colin J. Williams wrote: On 01/05/2012 2:43 PM, someone wrote: [snip] a = [1 2 3]; b = [11 12 13]; c = [21 22 23]. Then notice that c = 2*b - a. So c is linearly dependent on a and b. Geometrically this means the three vectors are in the same plane, so the matrix

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread someone
On 04/30/2012 03:35 AM, Nasser M. Abbasi wrote: On 04/29/2012 07:59 PM, someone wrote: I do not use python much myself, but a quick google showed that pyhton scipy has API for linalg, so use, which is from the documentation, the following code example X = scipy.linalg.solve(A, B) But you still

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread someone
On 05/01/2012 08:56 AM, Russ P. wrote: On Apr 29, 5:17 pm, someone wrote: On 04/30/2012 12:39 AM, Kiuhnm wrote: You should try to avoid matrix inversion altogether if that's the case. For instance you shouldn't invert a matrix just to solve a linear system. What then? Cramer&#x

Re: numpy (matrix solver) - python vs. matlab

2012-05-01 Thread someone
On 04/30/2012 02:57 AM, Paul Rubin wrote: someone writes: A is not just close to singular: it's singular! Ok. When do you define it to be singular, btw? Singular means the determinant is zero, i.e. the rows or columns are not linearly independent. Let's give names to the three r

Re: numpy (matrix solver) - python vs. matlab

2012-04-29 Thread someone
On 04/30/2012 02:38 AM, Nasser M. Abbasi wrote: On 04/29/2012 05:17 PM, someone wrote: I would also kindly ask about how to avoid this problem in the future, I mean, this maybe means that I have to check the condition number at all times before doing anything at all ? How to do that? I hope

Re: numpy (matrix solver) - python vs. matlab

2012-04-29 Thread someone
On 04/30/2012 12:39 AM, Kiuhnm wrote: So Matlab at least warns about "Matrix is close to singular or badly scaled", which python (and I guess most other languages) does not... A is not just close to singular: it's singular! Ok. When do you define it to be singular, btw? Which is the most a

numpy (matrix solver) - python vs. matlab

2012-04-29 Thread someone
Hi, Notice cross-post, I hope you bear over with me for doing that (and I imagine that some of you also like python in the matlab-group like myself)... -- Python vs. Matlab: -- Python: from numpy import

Re: Newbie, homework help, please.

2012-04-22 Thread someone
On Saturday, April 21, 2012 5:48:29 PM UTC-5, BartC wrote: > "someone" wrote in message > news:9533449.630.1335042672358.JavaMail.geo-discussion-forums@ynmf4... > > On Saturday, April 21, 2012 3:44:49 PM UTC-5, BartC wrote: > > > Hi, Bart: Thank you, your po

Re: Newbie, homework help, please.

2012-04-21 Thread someone
On Saturday, April 21, 2012 3:44:49 PM UTC-5, BartC wrote: > "someone" wrote in message > news:9071485.2215.1335040139144.JavaMail.geo-discussion-forums@yniw15... > > > Thanks Bart for trying, it helped me out a little more by showing me a > > little more than I

Re: Newbie, homework help, please.

2012-04-21 Thread someone
On Saturday, April 21, 2012 12:28:33 PM UTC-5, someone wrote: > Ok, this is my dillema, not only am I new to this programming buisness, > before the last few days, I did not even know what python was, and besides > opening up the internet or word documents, that is most of what I know.

Re: Newbie, homework help, please.

2012-04-21 Thread someone
On Saturday, April 21, 2012 12:28:33 PM UTC-5, someone wrote: > Ok, this is my dillema, not only am I new to this programming buisness, > before the last few days, I did not even know what python was, and besides > opening up the internet or word documents, that is most of what I know.

Re: Newbie, homework help, please.

2012-04-21 Thread someone
On Saturday, April 21, 2012 12:28:33 PM UTC-5, someone wrote: > Ok, this is my dillema, not only am I new to this programming buisness, > before the last few days, I did not even know what python was, and besides > opening up the internet or word documents, that is most of what I know.

Re: Newbie, homework help, please.

2012-04-21 Thread someone
On Saturday, April 21, 2012 12:28:33 PM UTC-5, someone wrote: > Ok, this is my dillema, not only am I new to this programming buisness, > before the last few days, I did not even know what python was, and besides > opening up the internet or word documents, that is most of what I know.

Newbie, homework help, please.

2012-04-21 Thread someone
Ok, this is my dillema, not only am I new to this programming buisness, before the last few days, I did not even know what python was, and besides opening up the internet or word documents, that is most of what I know. Yet, I have a professor who should be on Psych medication for giving us 3 pro

calling python (matplotlib) from c++

2011-12-11 Thread someone
ime())\n"); // Py_Main(argc, argv); // start up the python interpreter Py_Finalize(); However - I cannot seem to pass two arrays of data, so I can plot the data using matplotlib... I cannot even start matplotlib... Please help/advice/come up with suggestions, someone who knows what to do :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: cannot get html content of tag with BeautifulSoup

2010-06-18 Thread someone
On Jun 18, 5:41 pm, someone wrote: > Hello, > > does anyone know how to get html contents of an tag with > BeautifulSoup? In example I'd like to get all html which is in first > tag, i.e. This is paragraph one. as > unicode object > > p.contents gives me a list

cannot get html content of tag with BeautifulSoup

2010-06-18 Thread someone
Hello, does anyone know how to get html contents of an tag with BeautifulSoup? In example I'd like to get all html which is in first tag, i.e. This is paragraph one. as unicode object p.contents gives me a list which I cannot join TypeError: sequence item 0: expected string, Tag found Thanks!

Re: variable variables

2010-06-18 Thread someone
On Jun 18, 2:37 pm, Bruno Desthuilliers wrote: > someone a crit : > > > On Jun 18, 2:05 pm, Bruno Desthuilliers > 42.desthuilli...@websiteburo.invalid> wrote: > (snip) > > >> Still has a "code smell" thing to me, but hard to say not knowing the >

Re: variable variables

2010-06-18 Thread someone
On Jun 18, 2:05 pm, Bruno Desthuilliers wrote: > someone a crit : > > > > > > > On Jun 18, 12:49 pm, James Mills wrote: > >> On Fri, Jun 18, 2010 at 8:31 PM, someone wrote: > >>> I was looking for a "short way" to do

Re: variable variables

2010-06-18 Thread someone
On Jun 18, 12:49 pm, James Mills wrote: > On Fri, Jun 18, 2010 at 8:31 PM, someone wrote: > > I was looking for a "short way" to do it because I have a lot > > "some_object.attr.attr or some_object.other_attr.attr" in code. it > > looks like I cannot

Re: variable variables

2010-06-18 Thread someone
On Jun 18, 12:01 pm, "Gabriel Genellina" wrote: > En Fri, 18 Jun 2010 06:48:34 -0300, someone   > escribió: > > > is it possible to make first attr variable? > > > some_object.attr.attr > > > so instead of attr I could use self.foo which has

variable variables

2010-06-18 Thread someone
Hello, is it possible to make first attr variable? some_object.attr.attr so instead of attr I could use self.foo which has value "attr" Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Community (A Modest Proposal)

2010-06-13 Thread Someone Something
Here's the thing. Python has one of the nicest communities of most software projects (except maybe ubuntu), try Perl or C. Unless you completely know what you're talking about, have spent atleast 1/2 an hour researching your problem, those guys will refrain from helping. On Sun, Jun 13, 2010 at 1:

Re: parse xml with invalid chars

2010-06-04 Thread Someone Something
What d'ya mean hang? On Fri, Jun 4, 2010 at 10:16 AM, Roman Makurin wrote: > Hi all > > Last time i have a big problem, i need parse xml files > which have invalid xml chars outside of CDATA and xml > parser hangs everytime on such files. Is there any way > to parse such files ??? > > thanks > >

Python vs. Fedora and CentOS

2010-05-29 Thread Someone Something
Redhat as always believed in (sorry if this offends anyone): "Use legacy stuff that works, we don't really give a flying hoot if the rest of the world has moved on" On Sat, May 29, 2010 at 6:55 PM, D'Arcy J.M. Cain wrote: > On Sat, 29 May 2010 11:43:29 -0700 > John Nagle wrote: > >The maj

Re: print executed query

2010-05-04 Thread someone
On 4 Mai, 07:01, Fred C wrote: > On Apr 29, 2010, at 9:49 AM, Philip Semanchuk wrote: > > > > > > > On Apr 29, 2010, at 12:01 PM, someone wrote: > > >> Hello! > > >> Is there a way to print a query for logging purpose as it was or will > >&g

Re: print executed query

2010-04-29 Thread someone
On Apr 29, 7:23 pm, Miki wrote: > > Is there a way to print a query for logging purpose as it was or will > > be sent to database, if I don't escape values of query by myself? > > ... > > Im using psycopg2, btw > > http://initd.org/psycopg/docs/advanced.html#connection-and-cursor-fac... > > HTH, >

print executed query

2010-04-29 Thread someone
Hello! Is there a way to print a query for logging purpose as it was or will be sent to database, if I don't escape values of query by myself? cursor.execute(query, [id, somestring]) I could print query and values separate, but it would be great, if I could see how query is constructed and can t

Re: My first project

2010-04-17 Thread Someone Something
no one cares? :( On Sat, Apr 17, 2010 at 8:41 AM, Someone Something wrote: > This is my first large-scale (sort of) project in python. It is still under > daily development, but the core is pretty stable (although, I'm still adding > features). Here's the code: http://

Re: An open source AI research project

2010-04-17 Thread Someone Something
I would like to know more please. Does it have a website? On Sat, Apr 17, 2010 at 4:03 AM, David Zhang wrote: > Hello! > > I have started an open source project to develop human-level > Artificial Intelligence, using Python and Java as programming > language, OpenCog and OpenWonderland as basemen

Re: cross-platform coloured text in terminal

2010-04-17 Thread Someone Something
That sounds like a nice idea, try it out and see what you make of it. (It may have been done before but probably not as a standalone module as it doesn't require that much code) On Sat, Apr 17, 2010 at 6:52 AM, Jonathan Hartley wrote: > On Apr 16, 5:59 pm, Lie Ryan wrote: > > On 04/16/10 19:28,

My first project

2010-04-17 Thread Someone Something
This is my first large-scale (sort of) project in python. It is still under daily development, but the core is pretty stable (although, I'm still adding features). Here's the code: http://github.com/Poincare/PyEventLoop or http://code.google.com/p/pyeventloop/ Tell me what you guys think of it (I'l

Re: CGI templating with python

2010-04-01 Thread Someone Something
Cheetah would work, but it would be a major pain to debug (I hate those 500 Server Error pages) something django (as mentioned above) or turbogears (with Kid) would get you rolling quickly. On Wed, Mar 31, 2010 at 8:38 PM, KB wrote: > Hi there, > > Years ago I wrote a LAMP app using python. I fi

CPAN for python?

2010-03-30 Thread Someone Something
Hi, I've learned python a few months ago but I still use Perl because of CPAN and the tremendous amount of stuff that's already been done for you. is there something like CPAN for python? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to automate accessor definition?

2010-03-20 Thread Someone Something
Just initialize everything in the constructor, unless you have *really *good reason not to do that. On Sat, Mar 20, 2010 at 6:54 PM, Chris Rebert wrote: > On Sat, Mar 20, 2010 at 3:15 PM, kj wrote: > > I need to create a class solely for the purpose of encapsulating > > a large number of dispara

Re: Best Way to extract Numbers from String

2010-03-20 Thread Someone Something
Its an extremely bad idea to use regex for HTML. You want to change one tiny little thing and you have to write the regex all over again. if its a throwaway script, then go ahead. 2010/3/20 Luis M. González > On Mar 20, 12:04 am, Jimbo wrote: > > Hello > > > > I am trying to grab some numbers fr

  1   2   >