Re: Should setuptools version propagate to a module's __version__? If so, how?

2020-05-10 Thread John Ladasky
On Saturday, May 9, 2020 at 8:17:19 PM UTC-7, Cameron Simpson wrote: > I also autopatch the module itself to > set __version__ to match when I make that release tag. Yes, that's exactly what the module I wrote for my company's internal use does. The official version number is hard-coded into

Re: Should setuptools version propagate to a module's __version__? If so, how?

2020-05-08 Thread John Ladasky
On Friday, May 8, 2020 at 6:07:33 PM UTC-7, John Ladasky wrote: > Is there a recommended way to keep the internal reference and the setup.py > reference in sync? Is there any reason someone would NOT want these numbers > to match? Replying to myself... I just found thi

Should setuptools version propagate to a module's __version__? If so, how?

2020-05-08 Thread John Ladasky
I just came across a package in PyPI which is in a state of neglect. The official version on the PyPI page is 1.3.1 -- but the installed module reports its version as 1.2.0. This is confusing. There are several bugs in this package besides the mismatched version number. I've forked a copy

Re: Multiprocessing vs. concurrent.futures, Linux vs. Windows

2020-05-04 Thread John Ladasky
On Monday, May 4, 2020 at 4:09:53 PM UTC-7, Terry Reedy wrote: > On 5/4/2020 3:26 PM, John Ladasky wrote: > > Several years ago I built an application using multiprocessing. It only > > needed to work in Linux. I got it working fine. At the time, > > concurrent.

Multiprocessing vs. concurrent.futures, Linux vs. Windows

2020-05-04 Thread John Ladasky
Several years ago I built an application using multiprocessing. It only needed to work in Linux. I got it working fine. At the time, concurrent.futures did not exist. My current project is an application which includes a PyQt5 GUI, and a live video feed with some real-time image processing.

Re: ModuleNotFoundError, even though I can see module in dist-packages folder, Setuptools / EGG issue?

2020-04-08 Thread John Ladasky
On Wednesday, April 8, 2020 at 10:47:42 AM UTC-7, John Ladasky wrote: > Hi folks, > > Something broke in my Python installation in the past two or three days. I'm > working in Ubuntu 19.10 and Python 3.7, without virtual environments. > > I have two modules of Python sou

ModuleNotFoundError, even though I can see module in dist-packages folder, Setuptools / EGG issue?

2020-04-08 Thread John Ladasky
Hi folks, Something broke in my Python installation in the past two or three days. I'm working in Ubuntu 19.10 and Python 3.7, without virtual environments. I have two modules of Python source code that I am developing. I regularly change this code and "distribute" it to myself using

Re: How to specific multiple dtypes in numpy.ndarray?

2019-12-21 Thread John Ladasky
On Thursday, December 19, 2019 at 2:53:18 AM UTC-8, lampahome wrote: > I meet performance is low when I use struct.unpack to unpack binary data. > > So I tried to use numpy.ndarray > But meet error when I want to unpack multiple dtypes > > Can anyone teach me~ > > Code like below: > # python3 >

Re: "Don't install on the system Python"

2019-12-01 Thread John Ladasky
On Sunday, December 1, 2019 at 12:47:43 AM UTC-8, Cameron Simpson wrote: > On 01Dec2019 09:29, Manfred Lotz <...@posteo.de> wrote: > >On Sat, 30 Nov 2019 20:42:21 -0800 (PST) > >John Ladasky <...@sbcglobal.net> wrote: > >> For years, I've read warnings

"Don't install on the system Python"

2019-11-30 Thread John Ladasky
Long-time Ubuntu user here. For years, I've read warnings about not installing one's personal stack of Python modules on top of the system Python. It is possible to corrupt the OS, or so I've gathered. Well, I've never heeded this advice, and so far nothing bad has happened to me. I don't

Re: Meanwhile Norwegian trolls created ...

2019-08-19 Thread John Ladasky
On Saturday, August 17, 2019 at 2:40:14 AM UTC-7, Abdur-Rahmaan Janhangeer wrote: > But it is not so easy to combine different memory management paradigms. Oh, I feel this. I love the look and feel of PyQt5, but object management has bitten me more than once. --

Re: Amber Brown: Batteries Included, But They're Leaking

2019-05-19 Thread John Ladasky
is not part of the Python stdlib. On Monday, September 18, 2017 at 10:21:55 PM UTC+1, John Ladasky wrote: > OK, I found this statement intriguing. Honestly, I can't function without > Numpy, but I have always assumed that many Python programmers do so. > Meanwhile: most of the time,

Re: What's needed for jpegtran in Python 3?

2018-09-27 Thread John Ladasky
On Thursday, September 27, 2018 at 10:48:16 AM UTC-7, Chris Green wrote: > I think that must be what I have already installed, it doesn't make > the module available in Python 3, it just says this when I try and > install it:- > > root@t470:~# pip install jpegtran-cffi > Requirement

Re: clever exit of nested loops

2018-09-27 Thread John Ladasky
On Wednesday, September 26, 2018 at 12:50:20 AM UTC-7, vito.d...@gmail.com wrote: > I have "abused" the "else" clause of the loops to makes a break "broke" more > loops I did this once upon a time. In recent years, when I start writing tricky nested loops, I frequently find myself reaching

Re: How to sort over dictionaries

2018-08-28 Thread John Ladasky
The top-level object you are showing is a list [], not a dictionary {}. It has dictionaries inside of it though. Do you want to sort the list? Python's sorted() function returns a sorted copy of a sequence. Sorted() has an optional argument called "key". Key accepts a second function which

Re: Can pip install packages for all users (on a Linux system)?

2018-07-25 Thread John Ladasky
On Wednesday, July 25, 2018 at 7:15:35 AM UTC-7, Stephan Houben wrote: > Op 2018-07-24, John Ladasky schreef : > > I believe that I now have tensorflow 1.8 installed twice on my system, > > once for each user. If anyone can share how to convince pip to behave > > like Synapti

Can pip install packages for all users (on a Linux system)?

2018-07-24 Thread John Ladasky
I've been using "sudo pip3 install" to add packages from the PyPI repository. I have multiple user accounts on the computer in question. My goal is to install packages that are accessible to all user accounts. I know that using the Synaptic Package Manager in Ubuntu will install for all

Re: Matplotlib 3D limitations, please recommend alternative

2018-07-07 Thread John Ladasky
On Saturday, July 7, 2018 at 6:36:16 AM UTC-7, Rick Johnson wrote: > John Ladasky wrote: > > > Back then I wrote: > > > > "I have concluded that Qt, PyQt, and OpenGL are all > > rapidly-evolving, and huge, software packages. There may > > be comp

Re: Matplotlib 3D limitations, please recommend alternative

2018-07-06 Thread John Ladasky
On Wednesday, July 4, 2018 at 6:38:18 PM UTC-7, William Ray Wing wrote: > > On Jul 4, 2018, at 5:53 PM, John Ladasky wrote: [snip] > > I explored Python OpenGL bindings about three years ago, and quickly got > > bogged down. Even with Python to assist, dealing with OpenGL wa

Re: Matplotlib 3D limitations, please recommend alternative

2018-07-06 Thread John Ladasky
On Wednesday, July 4, 2018 at 3:30:32 PM UTC-7, Rick Johnson wrote: > On Wednesday, July 4, 2018 at 4:53:19 PM UTC-5, John Ladasky wrote: > > There are many 3D graphics packages on PyPI. Some appear to be quite > > specialized. I would appreciate your recommendations. Thanks! &g

Matplotlib 3D limitations, please recommend alternative

2018-07-04 Thread John Ladasky
I'm a regular Matplotlib user. Normally, I graph functions. I just attempted to graph an icosahedral surface using the plot_trisurf() methods of Matplotlib's Axes3D. I have discovered that Matplotlib is basically hard-wired for graphing functions, and therefore will not work for

Re: Posting warning message

2018-06-10 Thread John Ladasky
On Sunday, June 10, 2018 at 7:47:01 AM UTC-7, T Berger wrote: > When I go to post a reply, I get a warning asking if I want my email address > (or other email addresses listed) visible to all, and do I want to edit my > post. What should I do? Are you posting through Google Groups? Sometimes I

Re: Plot not working

2018-05-04 Thread John Ladasky
On Friday, May 4, 2018 at 9:13:02 PM UTC-7, Sharan Basappa wrote: > I am new to Python and using it to learn machine learning. > > Below is a sample program I am running to plot IRIS data set. > The code runs but no plot comes up. I am not sure what the issue is with the > code. > > # Imports >

Re: Thank you Python community!

2018-03-20 Thread John Ladasky
On Monday, March 19, 2018 at 9:28:09 AM UTC-7, Etienne Robillard wrote: > I would like to thank you guys sincerely for helping a lot of people to > stay clean, and focus on programming high-level stuff in Python instead > of doing some really nasty drugs. Yeah, it's either Python or that

Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread John Ladasky
On Friday, February 9, 2018 at 12:50:16 AM UTC-8, Tim Golden wrote: [snip and rearrange] > So dropping GG altogether would probably not add very much, as we're > generally blocking undesirable posts from there and we'd rather not > block genuine posts which happen to be made through the

Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread John Ladasky
On Sunday, January 28, 2018 at 7:07:11 AM UTC-8, Steven D'Aprano wrote: > > (The day a programmer posts a WAV file of themselves reading their code > out aloud, is the day I turn my modem off and leave the internet forever.) What's a... modem? --

Re: Problem with assignment. Python error or mine?

2017-12-21 Thread John Ladasky
On Thursday, December 21, 2017 at 7:37:39 AM UTC-8, MRAB wrote: > Python never makes a copy unless you ask it to. > > What x1=X does is make the name x1 refer to the same object that X > refers to. No copying. Well, except with very simple, mutable data types like scalars... compare this: >>>

Re: converting numbers into words (Posting On Python-List Prohibited)

2017-11-09 Thread John Ladasky
On Wednesday, November 8, 2017 at 11:40:18 PM UTC-8, Lawrence D’Oliveiro wrote: > On Thursday, November 9, 2017 at 7:51:35 PM UTC+13, r16...@rguktrkv.ac.in > wrote: > > > How can I covert numbers into word like ex:-123 One hundred twenty three? > > Here’s

Re: How to build a simple neural network in 9 lines of Python code

2017-06-29 Thread John Ladasky
On Tuesday, June 27, 2017 at 7:28:58 PM UTC-7, Steve D'Aprano wrote: > On Wed, 28 Jun 2017 06:22 am, Marko Rauhamaa wrote: > > > You saw the APL example, right? APL's standard runtime/library contains > > most of Numpy functionality because that's what APL has been designed > > for. > > > > Is

Re: How to build a simple neural network in 9 lines of Python code

2017-06-29 Thread John Ladasky
On Tuesday, June 27, 2017 at 12:34:46 PM UTC-7, Marko Rauhamaa wrote: > John Ladasky <j@s...l.net>: > > OK, that's cheating a bit, using Numpy. It's a nice little program, > > but it leverages a huge, powerful library. > > What would *not* be cheating? A langu

Re: How to build a simple neural network in 9 lines of Python code

2017-06-27 Thread John Ladasky
On Tuesday, June 27, 2017 at 9:24:07 AM UTC-7, Sam Chats wrote: > https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1 OK, that's cheating a bit, using Numpy. It's a nice little program, but it leverages a huge, powerful

Re: os.walk the apostrophe and unicode

2017-06-24 Thread John Ladasky
On Saturday, June 24, 2017 at 12:07:05 PM UTC-7, Rod Person wrote: > Hi, > > I'm working on a program that will walk a file system and clean the id3 > tags of mp3 and flac files, everything is working great until the > follow file is found > > '06 - Todd's Song (Post-Spiderland Song in

Re: getting the center of mass of each part of a molecule

2017-05-18 Thread John Ladasky
On Thursday, May 18, 2017 at 3:55:01 AM UTC-7, qasi...@gmail.com wrote: > @jladasky and @Gregory: > > 3) Divide the ligand molecule into two parts (except for ligand heavy atom > closest to the COM of the whole ligand) based on the COM previously > calculated. OK, now I agree with Gregory

Re: getting the center of mass of each part of a molecule

2017-05-16 Thread John Ladasky
On Monday, May 15, 2017 at 7:23:52 PM UTC-7, jeanbi...@gmail.com wrote: > What may make this tricky is that the vinyl group can rotate at the point > where it attaches to the benzene ring so the full molecule may not lie in a > plane. But the OP has coordinates for each atom which are used in

Re: getting the center of mass of each part of a molecule

2017-05-16 Thread John Ladasky
On Monday, May 15, 2017 at 10:23:12 PM UTC-7, qasi...@gmail.com wrote: > @Cameron: > Thanks, I will try what you suggest. I am not sure that I'll tackle it > because I am new to python. I teach programming to people with varying levels of expertise, from middle-school students to working

Re: [Theory] How to speed up python code execution / pypy vs GPU

2016-11-08 Thread John Ladasky
On Monday, November 7, 2016 at 5:23:25 PM UTC-8, Steve D'Aprano wrote: > On Tue, 8 Nov 2016 05:47 am, j...@i...edu wrote: > > It has been very important for the field of computational molecular > > dynamics (and probably several other fields) to get floating-point > > arithmetic working right on

Re: comapring 2 sequences of DNA ouput the silent and non mutations

2016-10-29 Thread John Ladasky
Disha, Before you struggle to reinvent the wheel, you might want to check out the Biopython package. http://biopython.org/wiki/Biopython I haven't used it for a few years, but the version that I did use was very comprehensive. -- https://mail.python.org/mailman/listinfo/python-list

Re: PyQt5, OpenGL, where to start, minimal example code?

2016-10-08 Thread John Ladasky
= QSurfaceFormat() # The default p = QOpenGLVersionProfile(f) self.GL = c.versionFunctions(p) super().initializeGL() On Tuesday, October 4, 2016 at 12:56:53 AM UTC-7, Phil Thompson wrote: > On 4 Oct 2016, at 5:57 am, John Ladasky <j...@s...net> wrote: > >

Re: PyQt5, OpenGL, where to start, minimal example code?

2016-10-03 Thread John Ladasky
On Monday, October 3, 2016 at 1:30:29 AM UTC-7, Phil Thompson wrote: > On 3 Oct 2016, at 4:29 am, John Ladasky <j...@s...net> wrote: > > And as you can see: trying to call versionFunctions() is exactly where my > > program failed. > > Try passing a Q

Re: PyQt5, OpenGL, where to start, minimal example code?

2016-10-02 Thread John Ladasky
On Sunday, October 2, 2016 at 7:21:15 PM UTC-7, blue wrote: > You have here a PyQt5 Reference Guide > http://pyqt.sourceforge.net/Docs/PyQt5/index.html > Some example can be found here 4 and 5 > http://codeprogress.com/python/libraries/pyqt/ That's a nice page of examples, but there are no

Re: PyQt5, OpenGL, where to start, minimal example code?

2016-10-02 Thread John Ladasky
On Sunday, October 2, 2016 at 7:45:50 PM UTC-7, Lawrence D’Oliveiro wrote: > On Monday, October 3, 2016 at 2:14:13 PM UTC+13, John Ladasky wrote: > > > > I am making my first attempt at 3D rendering. > > Bear in mind there are two kinds of 3D rendering: realtime (with OpenGL

PyQt5, OpenGL, where to start, minimal example code?

2016-10-02 Thread John Ladasky
Hi there, I am making my first attempt at 3D rendering. My system configuration: OS : Ubuntu 16.04 64-bit Python : 3.5.1 Qt : 5.5.1 PyQt : 5.5.1 OpenGL : 4.5.0 (I have a modern GPU) All software was installed from the Canonical repository. I didn't build any binaries myself. >From

Re: Well, I finally ran into a Python Unicode problem, sort of

2016-07-03 Thread John Ladasky
On Sunday, July 3, 2016 at 12:42:14 AM UTC-7, Chris Angelico wrote: > On Sun, Jul 3, 2016 at 4:58 PM, John Ladasky wrote: > Very good question! The detaily answer is here: > > https://docs.python.org/3/reference/lexical_analysis.html#identifiers > > > A philosophical ques

Re: Well, I finally ran into a Python Unicode problem, sort of

2016-07-03 Thread John Ladasky
Lawrence, I trust you understand that I didn't post a complete working program, just a few lines showing the intended usage? -- https://mail.python.org/mailman/listinfo/python-list

Well, I finally ran into a Python Unicode problem, sort of

2016-07-03 Thread John Ladasky
A while back, I shared my love for using Greek letters as variable names in my Python (3.4) code -- when, and only when, they are warranted for improved readability. For example, I like to see the following: from math import pi as π c = 2 * π * r When I am copying mathematical formulas

Re: Getting back into PyQt and not loving it.

2016-06-27 Thread John Ladasky
On Sunday, June 26, 2016 at 7:41:17 PM UTC-7, Michael Torrie wrote: > If GTK+ had first-class support on Windows and Mac, including native > themes and seamless UI integration (file and print dialogs), I'd say > GTK+ would be the only game in town for Python programmers. > Unfortunately, unless

Re: value of pi and 22/7

2016-06-18 Thread John Ladasky
On Friday, March 18, 2011 at 5:17:48 AM UTC-7, Neil Cerutti wrote: > RIIght. What's a cubit? > > -- > Neil Cerutti How long can you tread water? (Showing my age...) -- https://mail.python.org/mailman/listinfo/python-list

Re: [spam] Re: look what I've found [ignore]

2016-05-29 Thread John Ladasky
On Sunday, May 29, 2016 at 11:55:04 AM UTC-7, Peter Pearson wrote: > > No, it reached me, too, through NNTP. I also saw it, through the Google Groups gateway. -- https://mail.python.org/mailman/listinfo/python-list

Re: Guido on python3 for beginners

2016-02-18 Thread John Ladasky
On Wednesday, February 17, 2016 at 11:28:17 PM UTC-8, Chris Angelico wrote: > 5) print statement/function. Py3 forces you to put parentheses on it, > which is no different from C's printf() or Pike's write() or any > number of other languages where console I/O needs no language support. > Maybe a

Re: [STORY-TIME] THE BDFL AND HIS PYTHON PETTING ZOO

2016-02-15 Thread John Ladasky
On Monday, February 15, 2016 at 6:02:24 PM UTC-8, Rick Johnson wrote: > On Friday, February 12, 2016 at 1:51:35 AM UTC-6, John Ladasky wrote: > > Reguarding a migration from Python2 to Pyhton3, John said: > > I had to wait until my favorite packages were ported > > (num

Re: [STORY-TIME] THE BDFL AND HIS PYTHON PETTING ZOO

2016-02-11 Thread John Ladasky
On Saturday, February 6, 2016 at 12:54:41 PM UTC-8, Rick Johnson wrote: > On Wednesday, February 3, 2016 at 12:02:35 AM UTC-6, John Ladasky wrote: > > > Rick, you don't like Python? > > If i didn't like Python, then i would happily let it self- > destruct, yes? The pr

Re: [STORY-TIME] THE BDFL AND HIS PYTHON PETTING ZOO

2016-02-03 Thread John Ladasky
Yeah, I know, I shouldn't answer this troll-bait. Rick, you don't like Python? Fine, go program in a language that you do like. There are many to choose from! Meanwhile, Python is satisfying many programmers' needs. -- https://mail.python.org/mailman/listinfo/python-list

Re: Where are we in the Python 3 transition?

2016-01-04 Thread John Ladasky
I switched to Python 3 between three and four years ago, I think. I was actually eager to make the switch, as I could see the value of clean Unicode support and lazy evaluation. I had to wait until Matplotlib supported Py3, then I changed. --

Re: Hi

2015-07-26 Thread John Ladasky
On Saturday, July 25, 2015 at 10:39:48 AM UTC-7, 김지훈 wrote: Hi. I recently changed my path to be a programmer so I decided to learn python. I downloaded files(Python 2.7.10 - 2015-05-23) to setup on your website. Unless you need to maintain someone's older software, I would personally

Re: beginners choice: wx or tk?

2015-07-11 Thread John Ladasky
On Saturday, July 11, 2015 at 2:51:32 AM UTC-7, Ulli Horlacher wrote: Chris Angelico ros...@gmail.com wrote: There are other choices, too - pygtk/pygobject (GTK) and pyqt (Qt) come to mind Both create BIG executables, much bigger than with wx or tk. I worked with wxPython back when I was

Re: Python programming classes for children

2015-07-01 Thread John Ladasky
On Wednesday, July 1, 2015 at 6:03:06 AM UTC-7, beli...@aol.com wrote: My 11yo son is taking the online class Intermediate Programming with Python http://www.artofproblemsolving.com/school/course/catalog/python2 offered by the Art of Problem Solving company (AoPS). Classes meet for 1.5 hours

Re: most ambiguous line of code ever written?

2015-06-03 Thread John Ladasky
On Wednesday, June 3, 2015 at 8:21:43 AM UTC-7, Mark Lawrence wrote: right = not right Isn't that just beautiful? A few weeks ago, we were discussing the fact that, in Python 2, True = False, and False = True, were both legal statements in Python. I remarked: every politician's dream!

Re: Where is 'palindrome' defined?

2015-06-02 Thread John Ladasky
On Monday, June 1, 2015 at 2:22:02 AM UTC-7, Marko Rauhamaa wrote: Sota-apina nakataan raastimeen. Apelle pane emit. Saarnaa takanani paatos. (= The war monkey will be chucked into a grater. Hand the pistils to father-in-law. Pathos does preach

Re: anomaly

2015-05-12 Thread John Ladasky
On Monday, May 11, 2015 at 3:16:16 AM UTC-7, Antoon Pardon wrote: Try overriding None, True or False in python3 and see what happens. Much fun was able to be had in Python 2, though: Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type help, copyright, credits

Re: CHALLENGE HELP - GOOGLE DEVELOPER DAY

2015-05-05 Thread John Ladasky
On Tuesday, May 5, 2015 at 4:59:51 PM UTC-7, Chris Angelico wrote: On Wed, May 6, 2015 at 2:59 AM, worship.bro...@gmail.com wrote: Good afternoon everyone. I'm with the following exercise of the option is a modification of a google developer day exercise. SOMEONE HELP ME IN THIS

Re: Tit for tat

2015-04-28 Thread John Ladasky
On Tuesday, April 28, 2015 at 1:10:14 PM UTC-7, Robert Kern wrote: On 2015-04-28 07:58, Steven D'Aprano wrote: I do believe he is trying to make a crude joke. I agree, that's what he's doing. And I find it ironic, since he started this thread, and seemed to invite a serious discussion of the

Re: Tit for tat

2015-04-27 Thread John Ladasky
Following up to myself... Here's a link to Patrick Grim's results that you can actually download (Springer really retains a 1997 research paper behind a paywall?): http://www.pgrim.org/pgrim/SPATIALP.HTM -- https://mail.python.org/mailman/listinfo/python-list

Re: Tit for tat

2015-04-26 Thread John Ladasky
On Sunday, April 26, 2015 at 6:41:08 PM UTC-7, Seymore4Head wrote: Richard Dawkins explains with passion the idea of game theory and tit for tat, or why cooperation with strangers is often a strong strategy. He talks of a computer program tournament. I don't know what I could say that

Re: [Matplotlib] Ploting an exponential distribution frequency curve

2015-04-25 Thread John Ladasky
On Saturday, April 25, 2015 at 4:16:04 PM UTC-7, Mario Figueiredo wrote: [snip] This works as intended. But plots a jagged curve due to the small discrepancies normal of a random number generation. Other than replacing the random module with the probability density function for the

Re: Sudoku solver

2015-03-25 Thread John Ladasky
On Wednesday, March 25, 2015 at 4:39:40 AM UTC-7, Marko Rauhamaa wrote: I post below a sudoku solver. I eagerly await neater implementations (as well as bug reports). So, it's a brute-force, recursive solver? The code is nice and short. But I bet it takes a long time to run. I and a

Re: Topic Modeling LDA Gensim

2015-03-17 Thread John Ladasky
Hey you two, get a room. -- https://mail.python.org/mailman/listinfo/python-list

Re: Parallelization of Python on GPU?

2015-02-26 Thread John Ladasky
On Thursday, February 26, 2015 at 8:41:26 AM UTC-8, Sturla Molden wrote: If you are doing SVM regression with scikit-learn you are using libSVM. There is a CUDA accelerated version of this C library here: http://mklab.iti.gr/project/GPU-LIBSVM You can presumably reuse the wrapping code from

Parallelization of Python on GPU?

2015-02-25 Thread John Ladasky
I've been working with machine learning for a while. Many of the standard packages (e.g., scikit-learn) have fitting algorithms which run in single threads. These algorithms are not themselves parallelized. Perhaps, due to their unique mathematical requirements, they cannot be paralleized.

Re: Parallelization of Python on GPU?

2015-02-25 Thread John Ladasky
On Wednesday, February 25, 2015 at 7:03:23 PM UTC-8, Steven D'Aprano wrote: I would like to point out that GPUs typically don't support IEE-754 maths, which means that while they are likely significantly faster, they're also likely significantly less accurate. Historically, that has been

Re: Parallelization of Python on GPU?

2015-02-25 Thread John Ladasky
Thanks for the various links, Ethan. I have encountered PyCUDA before, but not the other options. So far, I'm not seeing code examples which appear to do what I would like, which is simply to farm out one Python process to one GPU core. The examples all appear to parallelize array

Re: Python discussed in Nature

2015-02-13 Thread John Ladasky
On Thursday, February 12, 2015 at 7:12:01 PM UTC-8, Steven D'Aprano wrote: John Ladasky wrote: And I use Unicode in my Python. In implementing some mathematical models which have variables like delta, gamma, and theta, I decided that I didn't like the line lengths I was getting

Re: Python discussed in Nature

2015-02-12 Thread John Ladasky
On Thursday, February 12, 2015 at 3:08:10 AM UTC-8, Fabien wrote: ... what a coincidence then that a huge majority of scientists (including me) dont care AT ALL about unicode. But since scientists are not paid to rewrite old code, the scientific world is still stuck to python 2. I'm a

Re: Taming the verbosity of ipython tracebacks

2015-02-10 Thread John Ladasky
On Tuesday, February 10, 2015 at 11:00:32 AM UTC-8, Chris Angelico wrote: On Wed, Feb 11, 2015 at 5:53 AM, John Ladasky j...@sbcglobal.net wrote: I'm running Python 3.4.0, and ipython3 1.2.1, on Ubuntu Linux 14.04 64-bit. That's nice recent Python, but I just tried installing ipython

Taming the verbosity of ipython tracebacks

2015-02-10 Thread John Ladasky
Hi folks, I'm running Python 3.4.0, and ipython3 1.2.1, on Ubuntu Linux 14.04 64-bit. Whenever I execute code from within ipython which triggers an exception -- any exception -- I get a page full of information. The exceptions in my code trigger exceptions within ipython. Every error message

Re: Taming the verbosity of ipython tracebacks

2015-02-10 Thread John Ladasky
tracebacks On Wed, Feb 11, 2015 at 5:53 AM, John Ladasky j...@sbcglobal.net wrote: I'm running Python 3.4.0, and ipython3 1.2.1, on Ubuntu Linux 14.04 64-bit. That's nice recent Python, but I just tried installing ipython using pip3, and got version 2.4.1, and was unable

Re: Please help.

2015-02-09 Thread John Ladasky
On Monday, February 9, 2015 at 9:44:16 AM UTC-8, chim...@gmail.com wrote: Hello. Am trying to change the key words to my tribal language. Eg change English language: print() to igbo language: de(). I have been stuck for months I need a mentor or someone that can guide me and answer some of my

Re: Please help.

2015-02-09 Thread John Ladasky
On Monday, February 9, 2015 at 10:26:47 AM UTC-8, Dave Angel wrote: That will help him with the functions. But not with the keywords. The OP didn't specify Python version, but in 3.x, print() is a function, and can be rebound. Since he said keyword, he's either mistaken, or he's running

Re: Formatting string with accented characters for printing

2015-01-27 Thread John Ladasky
Jerry, I can tell from your code that you are using Python 2. If you are a new Python programmer, and you do not HAVE to use Python 2, use Python 3 instead. In Python 3, text objects are something called Unicode rather than just sequences of bytes. Unicode makes it much easier to handle

Re: What killed Smalltalk could kill Python

2015-01-21 Thread John Ladasky
On Wednesday, January 21, 2015 at 11:18:54 AM UTC-8, Grant Edwards wrote: On 2015-01-21, Steven D'Aprano st...@pearwood.info wrote: In 2009, Robert Martin gave a talk at RailsConf titled What Killed Smalltalk Could Kill Ruby. But does he answer the more important question and can we use it

Namespace puzzle, list comprehension fails within class definition

2015-01-12 Thread John Ladasky
I've never come across this before. Here's a minimal example (in Python 3.4): Code: - d = {0:a, 1:b, 2:c, 3:d} e = [d[x] for x in (0,2)] class Foo: f = {0:a, 1:b, 2:c, 3:d} print(f) g = [f[x] for x in (0,2)] foo

Re: Namespace puzzle, list comprehension fails within class definition

2015-01-12 Thread John Ladasky
Following up to myself: I finally did the right keyword search, and found a relevant article: http://stackoverflow.com/questions/13905741/accessing-class-variables-from-a-list-comprehension-in-the-class-definition Maybe I HAVE tried to define a list comprehension inside a class definition

Re: Namespace puzzle, list comprehension fails within class definition

2015-01-12 Thread John Ladasky
On Monday, January 12, 2015 at 12:41:30 PM UTC-8, Ethan Furman wrote: In Foo 'f' is part of an unnamed namespace; the list comp 'g' has its own namespace, effectively making be a nonlocal; class name lookup skips nonlocal namespaces. Workaround: use an actual for loop. Thanks, Ethan.

Re: pickle, modules, and ImportErrors

2015-01-07 Thread John Ladasky
On Wednesday, January 7, 2015 12:56:29 PM UTC-8, Devin Jeanpierre wrote: [snip] If you never run model directly, and only ever import it or run it as my_svr.model, then you will be fine, and pickles will all serialize and deserialize the same way. Thank you Devin... I re-ran TrainingSession

pickle, modules, and ImportErrors

2015-01-07 Thread John Ladasky
I am progressing towards organizing a recent project of mine as a proper Python package. It is not a huge package, about 700 lines of code so far. But it breaks into logical pieces, and I don't feel like scrolling back and forth through a 700-line file. I am running Python 3.4.0 on Ubuntu

How about some syntactic sugar for __name__ == '__main__' ?

2014-11-12 Thread John Ladasky
I have taught Python to several students over the past few years. As I have worked with my students, I find myself bothered by the programming idiom that we use to determine whether a module is being executed or merely imported: if __name__ == '__main__': The use of two dunder tokens -- one

Re: How about some syntactic sugar for __name__ == '__main__' ?

2014-11-12 Thread John Ladasky
It appears that I'm not the first person to have thoughts along these lines. Here's a relevant article: http://aliles.tumblr.com/post/7455032885/sugar-for-pythons-main -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Dinamically set __call__ method

2014-11-06 Thread John Ladasky
On Tuesday, November 4, 2014 11:12:31 AM UTC-8, Ethan Furman wrote: If you really absolutely positively have to have the signature be correct for each instance, you may to either look at a function creating factory, a class creating factory, or a meta-class. +1. Overriding __call__()

Re: Teaching Python

2014-09-29 Thread John Ladasky
I am actually teaching Python as a side job. My students have ranged from eighth graders, up to a Silicon Valley hardware engineer who had no coding experience, but who needed to do some test engineering. My wife is an elementary school teacher. We occasionally talk about age-appropriate

Re: bicyclerepairman python24 windows idle :(

2014-09-04 Thread John Ladasky
On Thursday, September 4, 2014 1:52:37 PM UTC-7, Ned Batchelder wrote: This seems like enough of a non-sequitur that I wonder if you posted it in the wrong place? Maybe someone is trying out a new chatbot program? -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple question

2014-08-24 Thread John Ladasky
On Saturday, August 23, 2014 6:10:29 AM UTC-7, explode...@gmail.com wrote: Can some one explain why this happens: True, False = False, True print True, False False True Shush! That's one of Python's most closely-guarded secrets! Every politician on Earth will want to learn to program

Re: Function error

2014-06-14 Thread John Ladasky
On Saturday, June 14, 2014 11:17:50 AM UTC-7, sandhyaran...@gmail.com wrote: I am new to python, pls help me to resolve the below error def fib(n): ... Print a Fibonacci series up to n. File stdin, line 2 Print a Fibonacci series up to n.

Re: is there a list/group for beginners?

2014-05-27 Thread John Ladasky
Hi, Deb. Ten years ago (or eleven?), I was completely new to Python. I could not begin to understand over 90 percent of what I was reading here in comp.lang.python. Still, I asked my newbie questions here. For the most part, I got excellent responses. I think you're in the right place. --

Re: Method(s) called by square brackets, slice objects

2014-04-10 Thread John Ladasky
Thanks to both Ethan and Steven for their replies. Steven: I was trying to use the interpreter and wasn't getting results that I understood -- because I didn't know that __getslice__ was simply gone in Python 3. I implemented a __getslice__ method in my subclass that never got called. Ethan:

Method(s) called by square brackets, slice objects

2014-04-09 Thread John Ladasky
I would like to build a multi-dimensional array that allows numpy-style indexing and, ideally, uses Python's familiar square-bracket and slice notations. For example, if I declare a two-dimensional array object, x, then x[4,7] retrieves the element located at the 4th row and the 7th column.

Mutable objects inside tuples - good or bad?

2014-04-06 Thread John Ladasky
I find this programming pattern to be useful... but can it cause problems? Python 3.3.2+ (default, Feb 28 2014, 00:52:16) [GCC 4.8.1] on linux Type help, copyright, credits or license for more information. a = [1,2,3] b = [4,5,6] c = (a,b) c ([1, 2, 3], [4, 5, 6]) c[0][0] = 0 c ([0, 2, 3],

Re: Python programming

2014-03-08 Thread John Ladasky
On Friday, March 7, 2014 4:38:54 PM UTC-8, Dennis Lee Bieber wrote: On Fri, 7 Mar 2014 10:03:35 -0800 (PST), John Ladasky j...@sbcglobal.net declaimed the following: More than once, I have queried Google with the phrase Why isn't FORTRAN dead yet? For some reason, it lives on. I can't

Re: Python programming

2014-03-07 Thread John Ladasky
On Thursday, February 13, 2014 12:30:39 AM UTC-8, larry@gmail.com wrote: On Wed, Feb 12, 2014 at 10:56 PM, William Ray Wing w...@mac.com wrote: OK, and how many of you remember the original version of the tongue-in-cheek essay Real Programmers Don't Use Pascal from the back page of

Re: How to begin

2014-02-13 Thread John Ladasky
On Thursday, February 13, 2014 7:06:03 AM UTC-8, pete suchsland wrote: if x = 99: Surely, Pete, you meant to write if x == 99: ? -- https://mail.python.org/mailman/listinfo/python-list

Welcome to the Internet. No one here likes you. (was: Newcomer Help)

2014-02-13 Thread John Ladasky
On Thursday, February 13, 2014 8:32:46 AM UTC-8, larry@gmail.com wrote: This reminds me of post that was circulating in the early 90's: Welcome to the Internet. No one here likes you. We're going to offend, insult, abuse, and belittle the living hell out of you. And when you rail

Re: Combination Function Help

2014-02-12 Thread John Ladasky
On Wednesday, February 12, 2014 7:56:05 AM UTC-8, kjak...@gmail.com wrote: [snip] choices(n, k) Changed it like you said, didn't work What are you doing with the value returned by the function, choices()? Right now, you aren't doing anything with it. You are throwing it away. That's the

  1   2   3   >