Re: [Tutor] HELP PLEASE

2019-08-13 Thread David L Neil
On 13/08/19 7:11 AM, Marissa Russo wrote: This is my code: import math def get_numbers(): print("This program will compute the mean and standard deviation") file1 = input("Please enter the first filename: ") file2 = input("Please enter the second filename: ") x =

Re: [Tutor] Name for this type of class?

2019-08-03 Thread David L Neil
NB am heading somewhat OT NBB Python3+ On 3/08/19 12:38 PM, Alan Gauld via Tutor wrote: On 03/08/2019 00:47, Malcolm Greene wrote: Anyways, I'm looking for help coming up for the proper name for a class that collects the following type of telemetry data Classes should never be named for

Re: [Tutor] Python code

2019-08-01 Thread David L Neil
On 2/08/19 3:23 AM, Spencer Wannemacher wrote: I'm new to python and I was trying to perform a simple one code. All that is included in the code is print(61). I save it as 61.py and change the directory before typing in python 61.py and I don't get an output. There is no error and the output

Re: [Tutor] Inserting long URL's into comments & docstrings?

2019-07-29 Thread David L Neil
On 30/07/19 8:36 AM, James Hartley wrote> On occasion, I put long URL's into comments/docstrings simply to document where I found specific information. However, to be a good disciple of PEP8, anything which can't fit within 72 characters needs to be split across multiple lines. Since a number

Re: [Tutor] A question about daunting KeyError

2019-07-24 Thread David L Neil
On 24/07/19 3:21 PM, TAISHI KAWAMURA wrote: Hi tutors on Tutor, I'm Taishi from Japan working in a data analytics team. Currently, I'm trying to analyse purchase data of a fashion brand. However, mysterious KeyErrors started occurring continuously when I was coding, and I haven't been able to

Re: [Tutor] Python Generator expressions

2019-07-23 Thread David L Neil
Hi Animesh, Unfortunately the list server/email has removed the formatting from your sample, but no matter... On 24/07/19 5:06 AM, Animesh Bhadra wrote: # This code creates a generator and not a tuple comprehensions. my_square =(num *num fornum inrange(11)) print(my_square) # at

Re: [Tutor] Lengthy copyright notices?

2019-07-17 Thread David L Neil
On 18/07/19 10:08 AM, Alan Gauld via Tutor wrote: On 17/07/2019 21:01, David L Neil wrote: One line offers plenty of space to exert a claim (such can be very simple and does not need to be lawyer-speak!) which should also refer to the template's/package's external file or web-page. Yes, I've

Re: [Tutor] Lengthy copyright notices?

2019-07-17 Thread David L Neil
On 16/07/19 12:47 PM, Alan Gauld via Tutor wrote: On 15/07/2019 23:34, Mats Wichmann wrote: Rule #1: it's all opinion in the end... Not quite. Different jurisdictions (remember, this list has an international membership!) have different understandings of (even, respect for) copyrights and

Re: [Tutor] Lengthy copyright notices?

2019-07-15 Thread David L Neil
On 16/07/19 10:34 AM, Mats Wichmann wrote: On 7/15/19 3:25 PM, James Hartley wrote: help(module_name) will place any text in the *first* module-level docstring into the description section of the help page in Python 3.4.5. Subsequent docstrings found at module level are ignored. I have been

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-08 Thread David L Neil
On 8/07/19 10:54 AM, Alan Gauld via Tutor wrote: On 07/07/2019 20:54, David L Neil wrote: (However, some of us grew-up at a time when RAM was expensive and even in our relaxed state, such 'costs' still impinge on our consciousness - Indeed, my first computer was at the local university

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread David L Neil
On 8/07/19 2:48 AM, Alan Gauld via Tutor wrote: On 07/07/2019 09:19, David L Neil wrote: First-off, it has to be said that "100's of elements" suggests using an RDBMS - particularly if 'age' (eg 23 and 99) is not the only likely selection mechanism. Multiple selection mechanisms mig

Re: [Tutor] pointers or references to variables or sub-sets of variables query.

2019-07-07 Thread David L Neil
First-off, it has to be said that "100's of elements" suggests using an RDBMS - particularly if 'age' (eg 23 and 99) is not the only likely selection mechanism. On 7/07/19 2:39 PM, mhysnm1...@gmail.com wrote: Hi all. In C, you can use pointers to reference variables, arrays, ETC. In python,

[Tutor] Was: Basic Question about Visualization for enduser

2019-06-25 Thread David L Neil
On 26/06/19 4:56 AM, Alan Gauld via Tutor wrote: On 25/06/2019 15:52, Sinardy Xing wrote: My question is, how currently all of this great technology glue together and as a final product for the enduser. Because I cant imagine that we install Anaconda Jupyter Notebook at frontend for the

Re: [Tutor] replacing a loop

2019-06-24 Thread David L Neil
Hi John, On 25/06/19 4:15 AM, johnf wrote: Hi folks, I have the following loop (actually repeated many times ) def locChoices(self):     locDS = self.eslocation.getDataSet()     loc_Choices=['']     locKeys=[0]     for row in locDS:    

Re: [Tutor] Follow-up on my removing elements from lists question.

2019-06-15 Thread David L Neil
On 15/06/19 9:35 PM, mhysnm1...@gmail.com wrote: This is a follow-up on my previous question for removing elements. Below is the code I am currently using. I am removing the elements at the end of the outer loop. The data structure goes along this: [ ['123123',[2019-2-18', 'transaction text',

Re: [Tutor] Looking for some direction

2019-05-19 Thread David L Neil
On 18/05/19 4:15 AM, Alan Gauld via Tutor wrote: On 16/05/2019 04:17, Alex Kleider wrote: Alt-Tab and the X cut 'n paste mechanism provides enough integration between windows. I tried this (Ubuntu 18.4) and Alt-Tab cycles between terminal and browser but I can't make it cycle from one

Re: [Tutor] Looking for some direction

2019-05-19 Thread David L Neil
On 13/05/19 6:13 AM, Alan Gauld via Tutor wrote: On 12/05/2019 10:15, David L Neil wrote: Interestingly, I split these into two - my laziness for running/testing is 'Save, Alt-Tab, Up-arrow, Enter' which would be 'ruined' by using the cmdLN for anything else. In a bash shell I use Ctr-R

Re: [Tutor] Looking for some direction

2019-05-12 Thread David L Neil
On 12/05/19 7:59 PM, Alan Gauld via Tutor wrote: On 12/05/2019 00:24, David L Neil wrote: "3 consoles": what is the purpose of each? (my first reaction stemmed from many editors including a built-in console) One for vim, yes - that 'replaces' the window/app running an IDE/GUI-ba

Re: [Tutor] Collating date data from a csv file

2019-05-12 Thread David L Neil
Hi Dave, I also volunteer to do PAT safety testing during my "20% time". Clambering around Snowdonia as a boy, I eschewed* the Rheilffordd yr Wyddfa/SMR in favor of shanks' pony... * OK, I was made to...! For the good of my soul??? On 9/05/19 8:04 AM, Dave Hill wrote: I have a csv file

Re: [Tutor] Looking for some direction

2019-05-12 Thread David L Neil
On 12/05/19 10:57 AM, Alan Gauld via Tutor wrote: On 11/05/2019 19:59, Cranky Frankie wrote: ... 1) For the IDE I'm most comfortable with Netbeans/Java, In that case use Netbeans. I use Netbeans myself when working with Java and have played with its Python implementation and its OK.

Re: [Tutor] self.name is calling the __set__ method of another class

2019-04-30 Thread David L Neil
Hi Arup, On 30/04/19 5:55 AM, Arup Rakshit wrote: class NonBlank: def __init__(self, storage_name): self.storage_name = storage_name def __set__(self, instance, value): if not isinstance(value, str): raise TypeError("%r must be of type 'str'" %

Re: [Tutor] [OT] Problem with auto-complete package installation in Atom [Was: Re: After virtualenv, how to use ide]

2019-03-24 Thread David L Neil
apologize in advance!  But that is okay.  I am not a professional nor expert programmer myself.  Because of this, I recall agonizing over the choice of code editor, or, possibly even worse, deciding whether to use an IDE or editor.  This is a difficult decision about which many wax poetic and

Re: [Tutor] Merge a dictionary into a string

2019-03-17 Thread David L Neil
On 18/03/19 6:05 AM, Mats Wichmann wrote: On 3/16/19 11:39 AM, Valerio Pachera wrote: Consider this: import collections d = OrderedDict(a='hallo', b='world') I wish to get a single string like this: 'a "hallo" b "world"' Notice I wish the double quote to be part of the string. In other words I