Re: How to modify Adaline Stochastic gradient descent

2019-03-14 Thread MRAB
On 2019-03-15 02:48, voko...@gmail.com wrote: Dear May I know how to modify my own Python programming so that I will get the same picture as refer to the attached file - Adaline Stochastic gradient descent [snip] This newsgroup is text-only, and all other attachments, including pictures, are

How to modify Adaline Stochastic gradient descent

2019-03-14 Thread vokoyov
Dear May I know how to modify my own Python programming so that I will get the same picture as refer to the attached file - Adaline Stochastic gradient descent (I am using the Anaconda Python 3.7) Prayerfully Tron Orino Yeong tcynoteb...@yahoo.com 0916643858 from matplotlib.

Re: Generator question

2019-03-14 Thread Pierre Reinbold
Wow, thank you Ian for this very detailed answer, and thank you for taking the time for that! Much appreciated! If I get this right, I have to somehow fix the value of a_list during the loop, like when you use the classic default value argument trick with lambdas (damn, I should have thought of th

Re: Not Defined error in basic code

2019-03-14 Thread DL Neil
Thank you sir. I think you may be on to something there. I've done mainframe, machine, 3GL, and 4GL languages, but the last couple I've taken on have given me headaches. I guess I'll have to just read a bunch first and then try and write something simpler than what I'm attempting to take on...

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 3:49 PM, DL Neil wrote: Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? Sorry - it is this - https://www.learnpython.org/en/ .. The section is on classes and objects - https://www.l

Re: Not Defined error in basic code

2019-03-14 Thread DL Neil
Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? Sorry - it is this - https://www.learnpython.org/en/ .. The section is on classes and objects - https://www.learnpython.org/en/Classes_and_Objects

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 2:28 PM, DL Neil wrote: Jack, On 15/03/19 3:05 AM, Jack Dangler wrote: Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? Sorry - it is this - https://www.learnpython.org/en/ ..

Re: Not Defined error in basic code

2019-03-14 Thread DL Neil
Jack, On 15/03/19 3:05 AM, Jack Dangler wrote: Just getting started with tutorials and such, and don't understand this - Did you answer the post asking which tutorial you were following/copying? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: UG Announcement - Python Mauritius User-Group (pymug)

2019-03-14 Thread DL Neil
On 14/03/19 6:53 PM, Abdur-Rahmaan Janhangeer wrote: As per requirements, i'm announcing the existence of the Python User-Group for Mauritius, an island in the Indian Ocean. Below are some info. Congratulations! -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Not a python question, just programming logic trap?

2019-03-14 Thread jonas . thornvall
Den torsdag 14 mars 2019 kl. 06:09:02 UTC+1 skrev Rick Johnson: > jonas.t...@gmail.com wrote: > > Nah i can't see the error is due to the "If clause" branching possibly it > > should been an elseif at instead of separate if. No there is something > > going wrong with the variables. > > Well, the

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 12:50 PM, Calvin Spealman wrote: You still need to get of the two lines at the start of your class, they are unnecessary and reference variables you never defined: class weapon:     weaponId  # Get rid of this line!     manufacturerName  # And this one, too! On Thu, Mar 14, 2019 at

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
You still need to get of the two lines at the start of your class, they are unnecessary and reference variables you never defined: class weapon: weaponId # Get rid of this line! manufacturerName # And this one, too! On Thu, Mar 14, 2019 at 12:43 PM Jack Dangler wrote: > > On 3/14/19 1

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 10:39 AM, Calvin Spealman wrote: A few notes, Jack: On Thu, Mar 14, 2019 at 10:32 AM Jack Dangler > wrote: On 3/14/19 10:11 AM, Calvin Spealman wrote: Where are you seeing something like this? The two lines under `class weapon:` are not correc

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
A few notes, Jack: On Thu, Mar 14, 2019 at 10:32 AM Jack Dangler wrote: > > On 3/14/19 10:11 AM, Calvin Spealman wrote: > > Where are you seeing something like this? The two lines under `class > weapon:` are not correct because they are variable names that you've never > defined. > > Maybe you i

Re: Not Defined error in basic code

2019-03-14 Thread Jack Dangler
On 3/14/19 10:11 AM, Calvin Spealman wrote: Where are you seeing something like this? The two lines under `class weapon:` are not correct because they are variable names that you've never defined. Maybe you intended this to "declare" the attributes for the class? That isn't something you nee

Re: Not Defined error in basic code

2019-03-14 Thread Jason Friedman
On Thu, Mar 14, 2019 at 8:07 AM Jack Dangler wrote: > > > class weapon: > weaponId > manufacturerName > > def printWeaponInfo(self): > infoString = "ID: %d Mfg: %s Model: %s" % (self.weaponId, > self.manufacturerName) > return infoString > > > > import class_wea

Re: Not Defined error in basic code

2019-03-14 Thread Dan Sommers
On 3/14/19 9:05 AM, Jack Dangler wrote: Just getting started with tutorials and such, and don't understand this - class weapon:     weaponId     manufacturerName The previous two lines attempt to refer to existing names, but neither name exists.     def printWeaponInfo(self):  

Re: Not Defined error in basic code

2019-03-14 Thread Calvin Spealman
Where are you seeing something like this? The two lines under `class weapon:` are not correct because they are variable names that you've never defined. Maybe you intended this to "declare" the attributes for the class? That isn't something you need to do in Python. If you simply remove these line

Not Defined error in basic code

2019-03-14 Thread Jack Dangler
Just getting started with tutorials and such, and don't understand this - class weapon:     weaponId     manufacturerName     def printWeaponInfo(self):     infoString = "ID: %d Mfg: %s Model: %s" % (self.weaponId, self.manufacturerName)     return infoString import class_weapon

Re: Generator question

2019-03-14 Thread Pierre Reinbold
Le 14/03/19 à 10:45, Peter Otten a écrit : > Pierre Reinbold wrote: > >> Wow, thank you Ian for this very detailed answer, and thank you for taking >> the time for that! Much appreciated! >> >> If I get this right, I have to somehow fix the value of a_list during the >> loop, like when you use the

Re: Generator question

2019-03-14 Thread Peter Otten
Pierre Reinbold wrote: > Wow, thank you Ian for this very detailed answer, and thank you for taking > the time for that! Much appreciated! > > If I get this right, I have to somehow fix the value of a_list during the > loop, like when you use the classic default value argument trick with > lambda

Re: Generator question

2019-03-14 Thread Pierre Reinbold
Wow, thank you Ian for this very detailed answer, and thank you for taking the time for that! Much appreciated! If I get this right, I have to somehow fix the value of a_list during the loop, like when you use the classic default value argument trick with lambdas (damn, I should have thought of th

asyncio Question

2019-03-14 Thread Simon Connah
Hi, Hopefully this isn't a stupid question. For the record I am using Python 3.7 on Ubuntu Linux. I've decided to use asyncio to write a TCP network server using Streams and asyncio.start_server(). I can handle that part of it without many problems as the documentation is pretty good. I have

Re: uWISGI with Qt for Python

2019-03-14 Thread Thomas Jollans
On 13/03/2019 22:42, Israel Brewster wrote: > 1) Is there a “better way”? This GitHub repo: > https://github.com/unbit/uwsgi-qtloop seems to indicate that it should be > possible to run a Qt event loop from within a uWSGI app, thus eliminating the > extra “subprocess” spinoff, but it hasn’t been