Re: from __future__ import annotations bug?

2023-06-30 Thread Joseph Garvin via Python-list
Should mention this also affects Protocol[Buzz] On Fri, Jun 30, 2023, 5:35 PM Joseph Garvin wrote: > ``` > from __future__ import annotations > from typing import Generic, TypeVar > > T = TypeVar("T") > class Foo(Generic[T]): ... > class Bar(Foo[Buzz]): ..

from __future__ import annotations bug?

2023-06-30 Thread Joseph Garvin via Python-list
``` from __future__ import annotations from typing import Generic, TypeVar T = TypeVar("T") class Foo(Generic[T]): ... class Bar(Foo[Buzz]): ... # NameError here class Buzz: ... ``` This will error, despite the __future__ import, because cpython is trying to look up Buzz before it's defined, even

RE: Top level of a recursive function

2022-12-13 Thread Schachner, Joseph (US)
Reducing repetitiveness has made this code harder to read. I had to think about what it is doing. It might be slightly faster, but in my opinion it is not worth it. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Stefan Ram Sent

RE: How to manage python shebang on mixed systems?

2022-11-07 Thread Schachner, Joseph (US)
s you want to manually change. Perhaps you could encourage them to upgrade. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Chris Green Sent: Monday, November 7, 2022 4:06 AM To: python-list@python.org Subject: Re: How to manage p

RE: Are Floating Point Numbers still a Can of Worms?

2022-10-24 Thread Schachner, Joseph (US)
precision. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Pieter van Oostrum Sent: Sunday, October 23, 2022 10:25 AM To: python-list@python.org Subject: Re: Are Floating Point Numbers still a Can of Worms? Mostowski Collapse writes: >

RE: A trivial question that I don't know - document a function/method

2022-10-24 Thread Schachner, Joseph (US)
I head a small software team much of whose output is Python. I would gratefully accept any of the formats you show below. My preference is #1. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Paulo da Silva Sent: Saturday, October

Re: Problem when scraping the 100 Movie titles.

2022-09-22 Thread Fabian Joseph
#Try using, it's save in json format of the website: import json import requests from bs4 import BeautifulSoup url = "https://www.empireonline.com/movies/features/best-movies-2/"; soup = BeautifulSoup(requests.get(url).content, "html.parser") data = json.loads(soup.select_one("#__NEXT_DATA__").

RE: How to make a variable's late binding crosses the module boundary?

2022-08-30 Thread Schachner, Joseph (US)
s for this .py file for shared interface and the variables This works well, making sure separate python files shared exactly the same things we want to be global. ---- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Stefan

RE: Parallel(?) programming with python

2022-08-09 Thread Schachner, Joseph (US)
thread approach avoids thinking about multiprocessing, locking and unlocking data structures, all that stuff that does not contribute to the goal of the program. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Andreas Croci Sent: Monday

RE: Python/New/Learn

2022-05-05 Thread Schachner, Joseph
Buy the book "Python 101" and do the examples. When you're done with that buy the book "Python 201" and study it. There is much more than is in both those books that you could learn about Python, but that's a very good way to start. --- Joseph S. Teled

RE: lambda issues

2022-04-20 Thread Schachner, Joseph
Re: "...which takes a callable (the lambda here)" Python lamdas have some severe restrictions. In any place that takes a callable, if a lambda can't serve, just use def to write a function and use the function name. Joseph S. Teledyne Confidential; Commercially Sensitiv

RE: Functionality like local static in C

2022-04-14 Thread Schachner, Joseph
be global. In the function declare global var, so that it will not only read the global but will also write it. That variable does not go away. On the next time the function is called, It will hold whatever value it had when the function finished previously. Joseph S. Teledyne Confid

RE: Reportlab / platypus bug?

2022-03-14 Thread Schachner, Joseph
I realize this is Python code, but I doubt that the question is a Python question. I have used Python +numpy, scipy, matplotlib for years. I have not used reportlab and have no idea about the reported problem except that I will be very surprised if it turns out to be a Python language issue.

RE: Behavior of the for-else construct

2022-03-07 Thread Schachner, Joseph
Can someone please change the topic of this thread? No longer about for-else. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Dennis Lee Bieber Sent: Sunday, March 6, 2022 1:29 PM To: python-list@python.org Subject: Re: Behavior of the for-else con

RE: Behavior of the for-else construct

2022-03-03 Thread Schachner, Joseph
Useful: On rare occasions (when a loop has a "break" in it) Used: Yes Know how it works: Yes Even is such a thing: Yes Your suggestion: Also useful. Will require a different keyword. I don't know what that would be. "finally" is available 😊 Write up a featu

RE: Script profiling details

2022-01-11 Thread Joseph L. Casale
> You might try `py-spy`. That worked well, I started trying to get more data from the profile output with the stats module but didn't quite get there. Thank you everyone, jlc -- https://mail.python.org/mailman/listinfo/python-list

Script profiling details

2022-01-10 Thread Joseph L. Casale
I am trying to track down a slow script startup time. I have executed the script using `python -m cProfile -o profile /path/script.py` and read through the results, but the largest culprit only shows various built-ins. I expected this given the implementation, but I was hoping to get some finer de

RE: Problem with concatenating two dataframes

2021-11-08 Thread Schachner, Joseph
be shocked if you couldn't do it. Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Mahmood Naderan Sent: Saturday, November 6, 2021 6:01 PM To: python-list@python.org; MRAB Subject: Re: Problem with concatenating two datafram

RE: New assignmens ...

2021-10-26 Thread Schachner, Joseph
previously pointed out you can still just use = . --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Chris Angelico Sent: Monday, October 25, 2021 6:25 PM To: Python Subject: Re: New assignmens ... On Tue, Oct 26, 2021 at 9:19 AM dn via

RE: ANN: Dogelog Runtime, Prolog to the Moon (2021)

2021-09-14 Thread Schachner, Joseph
us. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Mostowski Collapse Sent: Tuesday, September 14, 2021 8:56 AM To: python-list@python.org Subject: Re: ANN: Dogelog Runtime, Prolog to the Moon (2021) I am testing a Prolog

RE: on floating-point numbers

2021-09-03 Thread Schachner, Joseph
Actually, Python has an fsum function meant to address this issue. >>> math.fsum([1e14, 1, -1e14]) 1.0 >>> Wow it works. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Hope Rouselle Sent: Thursday, September

RE: on floating-point numbers

2021-09-03 Thread Schachner, Joseph
e sum of sums to get the final sum. This is much more likely to work accurately than adding up all the values in one summation except the last, and then adding the last (which could be a relatively small value). --- Joseph S. Teledyne Confidential; Commercially Sensitive Business

code to initialize a sequence

2021-08-29 Thread joseph pareti
(B)) print('-') print(C) print(type(C)) print('-') print(D) print(type(D)) Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cell +39 339 7

RE: matplotlib questions

2021-08-27 Thread Schachner, Joseph
Complete documentation link (this link works) : https://matplotlib.org/stable/contents.html --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Steve Sent: Thursday, August 26, 2021 11:48 AM To: python-list@python.org Subject

Re: question on trax

2021-08-18 Thread joseph pareti
yes, but I do not see Fn anywhere. Another question is on this line: z = add((x, y)) If I code: z = add(x, y) Then the following exception occurs : *Expected input to be a tuple or list; instead got .* Am Di., 17. Aug. 2021 um 19:21 Uhr schrieb MRAB : > On 2021-08-17 16:50, joseph par

question on trax

2021-08-17 Thread joseph pareti
print("expected inputs :", add.n_in) print("promised outputs :", add.n_out, "\n") # Inputs x = np.array([3]) y = np.array([4]) print("-- Inputs --") print("x :", x, "\n") print("y :", y, "\n") # Outputs z = add((x,

RE: Defining a Python enum in a C extension - am I doing this right?

2021-07-30 Thread Schachner, Joseph
ickly build an enum type from one string and instantiate enums of that type from the other string. In short, if you have problems creating an enum in C and passing it to Python, give the problems to Python! Let it create the enum. --- Joseph S. Teledyne Confidential; Commercially Sens

Re: [Errno 2] No such file or directory:

2021-07-29 Thread joseph pareti
indeed. There are better options than the one I attempted. Thanks for the advice Am Mi., 28. Juli 2021 um 18:19 Uhr schrieb Chris Angelico : > On Thu, Jul 29, 2021 at 2:10 AM joseph pareti > wrote: > > > > The following code fails as shown in the title: > > > &g

[Errno 2] No such file or directory:

2021-07-28 Thread joseph pareti
_filename) FileNotFoundError: [Errno 2] No such file or directory: 'ls -l /media/joepareti54/Elements/x/finance-2020/AI/Listen_attend_spell/VCTK-Corpus/wav48 | awk "{print $9 -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services h

Is there a conference in the US that is similar to EuroPython?

2021-07-19 Thread Schachner, Joseph
U.S.A. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -- https://mail.python.org/mailman/listinfo/python-list

Re: Posting code on stackoverflow

2021-06-06 Thread joseph pareti
didn't involve long lines > of code, I need to learn a) how to enter code if it's not just clicking on > the 'code' box before pasting text and b) how to keep code lines from > wrapping so a horizontal scroll bar is made available. > > TIA, > > Rich &g

RE: learning python ...

2021-05-24 Thread Schachner, Joseph
float)). The first argument is the variable, the second should be type name. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: hw Sent: Sunday, May 23, 2021 3:34 PM To: python-list@python.org Subject: Re: learning python ... On 5/23/21 7:

RE: neoPython : Fastest Python Implementation: Coming Soon

2021-05-06 Thread Schachner, Joseph
loyee complaint about our scripts being written in Python, and I don't expect to. -- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -- https://mail.python.org/mailman/listinfo/python-list

HELP Please, Python Program Help

2021-04-10 Thread Joseph Roffey
Hi, Im looking for some help with my program, I have been set a task to make a Strain Calculator. I need it to input two numbers, choosing either Metres or Inches for the 'Change in Length' divided by the 'Original Length' which can also be in Metres or Inches, the out put number also needs to g

RE: .title() - annoying mistake

2021-03-19 Thread Schachner, Joseph
;. Someone who looks into this should check if the second part of a hyphenated expression needs to be capitalized. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data -Original Message- From: Abdur-Rahmaan Janhangeer Sent: Friday, March 19, 2021 11:02

RE: How to implement logging for an imported module?

2021-03-07 Thread Joseph L. Casale
ed, written to different files, combined into one, or some even emailed. Last word of advice, don't fight it by hacking up or patching (somehow?), it will simply not work right for any other case even slightly different than the one you somehow beat into submission. I hope that helps, Jose

Overriding property types on instances from a library

2021-02-20 Thread Joseph L. Casale
I have some code that makes use of the typing module. This code creates several instances of objects it creates from a library that has some issues. For example, I have multiple list comps that iterate properties of those instance and the type checker fails with: Expected type 'collections.It

RE: Python cannot count apparently

2021-02-08 Thread Schachner, Joseph
str to ch each time, each iteration gets the next character. To prevent each character from appearing on a separate line (in Python 3) you need end="". That is, don't put in the usual end-of-line ending. --- Joseph S. Teledyne Confidential; Commercially Sensitive Business Data

RE: IDE tools to debug in Python?

2021-02-05 Thread Schachner, Joseph
Indeed there are many. One I have not seen listed here yet, that is quite light, starts quickly, but does have good debugging capability is PyScripter. Completely free, downloadable from SourceForge, 32 or 64 bit versions (must match your Python type). --- Joseph S. Teledyne Confidential

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-26 Thread joseph pareti
t; @classmethod > > def get_person(self, employee): > > print (employee['name']) > > > > return PERSONDatabase(employee['created_at'], > > employee['id'], > >

Python 3.8.5

2021-01-06 Thread Joseph Milroy Felix Moraes (Moraes) via Python-list
Good day, I keep getting this error message when trying to open Python 3.8.5 on my computer windows 7 , 64 bit. --- python.exe - System Error --- The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try

asyncio cancellation pattern

2020-12-28 Thread Joseph L. Casale
I've started writing some asyncio code in lieu of using threads and managing concurrency and primitives manually. Having spent a lot of time using c#'s async implementation, I am struggling to see an elegant pattern for implementing cancellation. With the necessity for the loop (that of which I un

RE: pexpect with kadmin

2020-12-23 Thread Joseph L. Casale
> If you have windows 10 can you use Windows Subsystem for Linux (WSL) > to install one of the Linux distros and use that? Interesting idea, sadly I am too far past the deadline on this to go through the red tape needed to get that in place. Thanks, jlc -- https://mail.python.org/mailman/listi

pexpect with kadmin

2020-12-22 Thread Joseph L. Casale
Anyone ever used pexpect with tooling like kadmin and have insight into how to manage interacting with it? After setting up debug logging, I was able to adjust the expect usage to get the input and output logs to at least appear correct when setting a password for a principal, however even with a

RE: dict.get(key, default) evaluates default even if key exists

2020-12-18 Thread Schachner, Joseph
xecuted. Following that it prints '1', because the default value was NOT USED. If it was used, you would see 'Nobody expects this' followed by 0. --- Joseph S. -Original Message- From: Mark Polesky Sent: Tuesday, December 15, 2020 12:07 PM To: python-list@p

RE: setuptools issue

2020-12-17 Thread Joseph L. Casale
> Installed on this Slackware-14.2/x86_64 workstation with python-3.9.1 are: > python-setuptools-22.0.5-x86_64-1 I just ran into this recently, I don't recall the actual source but it was the version of setuptools having been so old. Your version is from Jun 3, 2016... Update it, that was what w

RE: To check if number is in range(x,y)

2020-12-14 Thread Schachner, Joseph
nd you read Python 101 and when you've done that, read Python 201. I think they are very good "learn Python" books. If you're surprised that the end point is not included in range, you need to read Python 101. --- Joseph S. -Original Message- From: Tim Chase Sent: Sat

RE: linear algebric equations

2020-12-08 Thread Schachner, Joseph
your executable, because Python will call it; and in a second of so after it finishes Python can read in results and format whatever report you like. --- Joseph S. -Original Message- From: Tito Sanò Sent: Monday, December 7, 2020 11:59 AM To: python-list@python.org Subject: linear

RE: Letter replacer - suggestions?

2020-12-07 Thread Schachner, Joseph
ts with a letter, then it will be a string. If I say I want to replace "?" that may not exist in the string, but that's OK. Joseph S. -Original Message- From: Bischoop Sent: Monday, December 7, 2020 10:48 AM To: python-list@python.org Subject: Letter replacer -

RE: Python Client Rest API Invocation - POST with empty body - Invalid character found in method name [{}POST]. HTTP method names must be tokens

2020-11-20 Thread Joseph L. Casale
> Invalid character found in method name [{}POST]. HTTP method names must be > tokens. /snip > I could see in from wireshark dumps it looked like - {}POST > HTTP/1.1 The error message and your own debugging indicate the error. Your method *name* is {}POST, you have somehow included two brac

RE: Question on ABC classes

2020-10-23 Thread Schachner, Joseph
I'm a C++ programmer and Python programmer as well. Python classes are not exactly like C++ classes. If you define a class where every method has an implementation, then it really isn't abstract. It can be instantiated. You can force it to be abstract by doing from abc import ABCMeta and dec

RE: Python 3..9.0

2020-10-09 Thread Schachner, Joseph
dle, it's there in your Python installation. Or download PyScripter, or Jetbrains' PyCharm, or Wing (see recent new version announcement). --- Joseph S. -Original Message- From: jjall...@aol.com Sent: Thursday, October 8, 2020 12:59 PM To: python-list@python.org Subject

Re: dictionaries an matrices

2020-09-16 Thread joseph pareti
o know if i can to create a dictionary with two matrices, > where every element of the first matrix corresponds to dictionary's keys > and the elements of the second matrix will be the values every key. > thanks > -- > https://mail.python.org/mailman/listinfo/python-list

RE: What this error want to say? Can't we use return without function?

2020-09-08 Thread Schachner, Joseph
delete "return coun". Then your script will run. --- Joseph S. -Original Message- From: Shivlal Sharma Sent: Monday, September 7, 2020 3:09 AM To: python-list@python.org Subject: What this error want to say? Can't we use return without function? N = int(input("enter

RE: Output showing "None" in Terminal

2020-08-25 Thread Schachner, Joseph
he "return answer" line at the end, where the "answer=km_mi" used to be. That should help. The code calculates "answer". It prints "answer". You should return "answer" at the end, after it has been calculated. --- Joseph S. -Original Mes

RE: Embedded python: How to debug code in an isolated way

2020-08-24 Thread Schachner, Joseph
expects to access. Then you can use any PC based debugger (PyScripter, Jetbrains' PyCharm, Visual Studio with Python support, etc) to debug in the simulated environment. --- Joseph S. -Original Message- From: Grant Edwards Sent: Sunday, August 23, 2020 12:59 PM To: python-list@pytho

i don't understand this python class

2020-06-29 Thread joseph pareti
*):* *print**(*'vehicle is '*,*self*.*make*,*' insurance premium '*,*self *.*insurance*)* *def* claim*(*self*,* discount*):* X *=* self*.*insurance *+* discount *return* X And hence I am not sure about the behavior of the first code in this email. -- Re

Re: Python-list Digest, Vol 201, Issue 9

2020-06-09 Thread Joseph Jenne via Python-list
On 2020-06-09 09:00, zljubi...@gmail.com wrote: Well the problem that I am facing with is, that I have to establish interface between python and outer system. Original question was about creation of input object (data that I have received from outer system). If I accept recommendation to use

Re: From an existing Pandas DataFrame, how can I create a summary DataFrame based on the union of overlapping date ranges (given a start and an end date) and an additional column?

2020-06-09 Thread joseph pareti
eturn Charges0 ABC 01/01/2020 > 02/20/202060.671 HIJ 01/01/2020 03/01/202040.002 HIJ > 05/01/2020 05/05/202050.013 DEF 01/12/2020 02/02/2020 > 212.18 > > I have been trying to use a combination of sorting and grouping but > the best I've achieved is reordering the dataframe. Even though I am > able to sort/group based on values, I still run into the issues of > finding overlapping date ranges and pulling out all trips based on a > single company per aggregate/overlapping date range. > > Thank you in advance for any help! > > Aaron > -- > https://mail.python.org/mailman/listinfo/python-list > -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cell +39 339 797 0644 -- https://mail.python.org/mailman/listinfo/python-list

Re: [RELEASE] Python 3.9.0b1 is now available for testing

2020-06-01 Thread Joseph Jenne via Python-list
ous levels of optimization. I have experienced slowdowns from source built python of the same version as the distribution python even when using some optimization flags with the configure script. This appears to be normal behavior and is not cause for concern about the performance of python 3.9.0b1 -- Joseph Jenne -- https://mail.python.org/mailman/listinfo/python-list

Constructing mime image attachment

2020-05-28 Thread Joseph L. Casale
I have some json encoded input for nodemailer (https://nodemailer.com/message/embedded-images) where the path key is a string value which contains the base64 encoded data such as: { html: 'Embedded image: ', attachments: [{ filename: 'image.png', path: 'data:image/png;bas

RE: why no camelCase in PEP 8?

2020-05-19 Thread Schachner, Joseph
easily readable. notEveyoneThinksReadingCamelCaseIsEasy. -- Joseph S. -Original Message- From: Lance E Sloan Sent: Monday, May 18, 2020 3:47 PM To: python-list@python.org Subject: why no camelCase in PEP 8? I've been using Python for about 18 years. Several things have changed

Re: Help with installation please

2020-05-15 Thread Jhoana Kacheva Melissa Joseph
Ok, thanks Souvik. Appreciate your help. On Fri, May 15, 2020, 11:47 PM Souvik Dutta wrote: > I dont know if you should shift from powershell to cmd. Python kinda does > not work in powershell. > > Souvik flutter dev > > On Sat, May 16, 2020, 8:54 AM Jhoana Kacheva Melissa

Re: Help with installation please

2020-05-15 Thread Jhoana Kacheva Melissa Joseph
a Kacheva Melissa Joseph, < > kachev...@gmail.com> wrote: > >> When I turn off the other one, it brought me to the store. >> >> Yes, I did the path >> >> On Fri, May 15, 2020, 11:01 PM Souvik Dutta >> wrote: >> >>> Have you switched

Re: Help with installation please

2020-05-15 Thread Jhoana Kacheva Melissa Joseph
> the other and try again. > > On Sat, 16 May, 2020, 8:29 am Souvik Dutta, > wrote: > >> Have you added python into path? >> >> On Sat, 16 May, 2020, 8:15 am Jhoana Kacheva Melissa Joseph, < >> kachev...@gmail.com> wrote: >> >>> Thanks for

Help with installation please

2020-05-15 Thread Jhoana Kacheva Melissa Joseph
Hello, I downloaded python 3.8 in my windows, I selected the box for the path but when I try to run it in powershell it brought me to app store to get it again. Please let me know Thanks Melissa -- https://mail.python.org/mailman/listinfo/python-list

Re: basic Python question

2020-05-08 Thread joseph pareti
yet, something is still unclear; in Python you can do things like: *clf0.fit(X_train, y_train)* which is not the way I programmed in other languages where a left-hand side and a right hand side is required. Am Fr., 8. Mai 2020 um 21:52 Uhr schrieb joseph pareti < joeparet...@gmail.com>:

Re: basic Python question

2020-05-08 Thread joseph pareti
yes, it is random forest classifier from scikit learn. Thank you. Am Fr., 8. Mai 2020 um 21:50 Uhr schrieb MRAB : > On 2020-05-08 20:02, joseph pareti wrote: > > In general I prefer doing: > > > > > > X_train, X_test, y_train, y_test = train_test_split(X, y, > t

basic Python question

2020-05-08 Thread joseph pareti
= metrics.accuracy_score(y_test, y_pred) Are the two codes really equivalent? -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cell +39 339 797 0644 -- https://mail.pytho

Re: Pip not working on windows

2020-05-03 Thread joseph pareti
d upgrading it by python -m pip install --upgrade pip which worked but > I still can not use pip. > -- > https://mail.python.org/mailman/listinfo/python-list > -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joeparet

RE: [RELEASE] Python 3.9.0a6 is now available for testing

2020-04-29 Thread Schachner, Joseph
1 0 1 0 1 01 0 OK I don't see any violation of quoting or parentheses matching. Still trying to figure out what this lambda does. --- Joseph S. -Original Message- From: Robin Becker Sent: Wednesday, April 29, 2020 10:52 AM To: Łukasz Langa ; python-list@pyt

Re: python and numpy

2020-04-21 Thread joseph pareti
ogrammer/data scientist. > > Can someone please walk me through how to download Python, SO THAT I will > > be able to import numpy? > > > > Thanks, > > Derek > > > > Sent from Mail for Windows 10 > > > > -- > > https://mail.python.

RE: Floating point problem

2020-04-20 Thread Schachner, Joseph
m the IEEE format's assumption that the top bit of the mantissa of a normalized floating point value must be 1. Since we know what it must be, there is no reason to use an actual bit for it. The 53 bits in the mantissa do not include the assumed top bit. Isn't floating point fun

Re: Helping Windows first time users

2020-04-15 Thread joseph pareti
ges and reply text? > > Barry > > -- > https://mail.python.org/mailman/listinfo/python-list > -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cell +39 339 797 0644 -- https://mail.python.org/mailman/listinfo/python-list

Re: NLP Project with Python

2020-04-08 Thread joseph pareti
t; -- > https://mail.python.org/mailman/listinfo/python-list > -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cell +39 339 797 0644 -- https://mail.python.org/mailman/listinfo/python-list

policy based variable composition

2020-04-03 Thread Joseph L. Casale
I am looking to replace a home built solution which allows a program to derive a series of variable values through configuration or policy. The existing facility allows dependences so one of the requested variables can depend on another, they are ordered and computed. It also allows callbacks so c

jupyter notebook permission denied

2020-04-02 Thread joseph pareti
. However, a permission denied issue prevents loading/updating the *ipynb files. Any idea why? Same happens if I do it as Administrator. -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cel

mport pytorch fails on my windows 10 PC

2020-03-28 Thread joseph pareti
a3/pkgs/python-3.6.8-h9f7ef89_1/python.exe ./Users/joepareti/Miniconda3/pkgs/python-3.7.1-h8c8aaf0_6/python.exe ./Users/joepareti/Miniconda3/python.exe -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520

Re: Reduce waiting queue at supermarket from Corona with Python-Webapp

2020-03-20 Thread joseph pareti
the hindmost :) > > -- > > Robin Becker > > > > > -- > Mit freundlichen Grüßen > Herr Dipl. Math. Orges Leka > > Mobil: 015751078391 > Email: orges.l...@googlemail.com > Holzheimerstraße 25 > 65549 Limburg > -- > https://mail.python.org/m

Re: Reduce waiting queue at supermarket from Corona with Python-Webapp

2020-03-18 Thread joseph pareti
> Best regards, > > > > Christian > > -- > > https://mail.python.org/mailman/listinfo/python-list > > > > > -- > Mit freundlichen Grüßen > Herr Dipl. Math. Orges Leka > > Mobil: 015751078391 > Email: orges.l...@googlemail.com

Re: Reduce waiting queue at supermarket from Corona with Python-Webapp

2020-03-17 Thread joseph pareti
> >>> If you do not have currently time, but know someone who would possibly > be > >>> interested in working at this project, I would be happy if you let me > >>> know. > >>> > >>> Kind regards, > >>> Orges Leka > >>>

Can you help me solve this?

2020-03-16 Thread Joseph Nail
Hello, I have one problem. Somehow in my function when I wrote y=x, they are the same variable and then it also changes age or height (which were x) in the main program. See more in attached file. Maybe it is bug or maybe it should run that way. -- https://mail.python.org/mailman/listinfo/python-l

Re: using classes

2020-03-13 Thread joseph pareti
self.insassen += anzahl def aussteigen(self, anzahl): self.insassen -= anzahl fiat = PKW("Fiat Marea",50,0,1) fiat = PKW("Fiat Marea",50,0) fiat.einsteigen(3) fiat.aussteigen(1) fiat.beschleunigen(10) print(fiat) Am Do., 12. März 2020 um 17:38 Uhr schrieb Pieter va

Re: using classes

2020-03-12 Thread joseph pareti
thank you, that fixes it. I also noticed that both statements work: super(PKW, self).__init__(bez,ge) or super().__init__(bez,ge) Am Do., 12. März 2020 um 12:58 Uhr schrieb MRAB : > On 2020-03-12 10:54, joseph pareti wrote: > > The following code that uses a class

using classes

2020-03-12 Thread joseph pareti
lf.insassen = ins def __str__(self): return Fahrzeug.__str__(self) + " " + str(self.insassen) + " Insassen" def einsteigen(self, anzahl): self.insassen += anzahl def aussteigen(self, anzahl): self.insassen -= anzahl fiat = PKW("Fiat Marea",50,

apologies for my latest email; it was not intended for this mailing list

2019-11-11 Thread joseph pareti
-- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cell +39 339 797 0644 -- https://mail.python.org/mailman/listinfo/python-list

Re: Hi there! We are here to answer any questions you have about Udacit...

2019-11-11 Thread joseph pareti
i have done the first 6 lessons of python --- https://classroom.udacity.com/courses/ud1110/lessons/bbacebc6-406a-4dc5-83f6-ef7ba3371da6/concepts/50247542-7933-4afe-9130-ff1dff429b03 what do you recommend next? My goal is ML/AI thank you --- Am Do., 7. Nov. 2019 um 22:01 Uhr schrieb joseph

web scraper

2019-10-26 Thread joseph pareti
: (i) loop over a bunch of ISIN codes (ii) access a specific website (=morningstar?), that does the ISIN-to-fund-name translation (iii) "inspect" that page containing the result and grab the fund name. I would appreciate any advice on how to program all this. Thanks. -- Regards, Jos

TypeError: unhashable type: 'list'

2019-10-23 Thread joseph pareti
line 183, in search return _compile(pattern, flags).search(string) File "c:\Users\joepareti\Miniconda3\pkgs\python-3.7.1-h8c8aaf0_6\lib\re.py", line 276, in _compile return _cache[type(pattern), pattern, flags] TypeError: unhashable type: 'list' Thanks for any insi

Re: issue with regular expressions

2019-10-22 Thread joseph pareti
Ok, thanks. It works for me. regards, Am Di., 22. Okt. 2019 um 11:29 Uhr schrieb Matt Wheeler : > > > On Tue, 22 Oct 2019, 09:44 joseph pareti, wrote: > >> the following code ends in an exception: >> >> import re >> pattern = 'S

issue with regular expressions

2019-10-22 Thread joseph pareti
'NoneType' object has no attribute 'start' any help? Thanks -- Regards, Joseph Pareti - Artificial Intelligence consultant Joseph Pareti's AI Consulting Services https://www.joepareti54-ai.com/ cell +49 1520 1600 209 cell +39 339 797 0644 -- https://mail.python.org/mailman/listinfo/python-list

RE: Class initialization with multiple inheritance

2019-07-20 Thread Joseph L. Casale
-Original Message- From: Barry Scott Sent: Tuesday, July 16, 2019 11:53 AM To: Joseph L. Casale Cc: python-list@python.org Subject: Re: Class initialization with multiple inheritance > And here is the MRO for LeftAndRight. > > >>> import m > LeftAndRight.__ini

Class initialization with multiple inheritance

2019-07-15 Thread Joseph L. Casale
I am trying to find explicit documentation on the initialization logic for a Base class when multiple exist. For the example in the documentation at https://docs.python.org/3/tutorial/classes.html#multiple-inheritance, if Base1 and Base2 both themselves inherited from the same base class, only Base

RE: Python-list Digest, Vol 189, Issue 17

2019-06-17 Thread Schachner, Joseph
Please see https://docs.python.org/2/library/colorsys.html And follow the links in there, read the FAQ. You'll find that python represents RGB values in three numeric values. Very simple. I believe scale is 0.0 to 1.0. --- Joseph S. -Original Message- From: Python-list On B

RE: Design a function that finds all positive numbers

2019-04-09 Thread Schachner, Joseph
alues, and two 2 values, but I think you only want to print 2 once. --- Joseph S. -Original Message- From: Ben Bacarisse Sent: Tuesday, April 9, 2019 7:33 AM To: python-list@python.org Subject: Re: Design a function that finds all positive numbers Ranjith Bantu writes: > A numeric ar

Type hinting

2019-04-08 Thread Joseph L. Casale
Hi, Is it possible to associate combinations of types for a given signature, for example: T = TypeVar('T', Foo, Bar, Baz) S = TypeVar('S', FooState, BarState, BazState) closure = 'populated dynamically' def foo(factory: Callable[[List[T], str], None], state: S) -> List[T]: results = []

RE: scalable bottleneck

2019-04-04 Thread Schachner, Joseph
If you are using Python 3, range does not create at list, it is a generator. If you're using Python 2.x, use xrange instead of range. xrange is a generator. In Python 3 there is no xrange, they just made range the generator. --- Joseph S. -Original Message- From: Sayth Re

RE: Syntax for one-line "nonymous" functions in "declaration style"

2019-04-01 Thread Schachner, Joseph
, saying that it is a generator and describing what it does. I realize I'm calling on the programmer to address this issue by adding doc strings. Nonetheless adding doc strings is a good habit to get in to. --- Joseph S. -Original Message- From: Ian Kelly Sent: Sunday, March 31,

RE: asyncio Question

2019-03-15 Thread Joseph L. Casale
> -Original Message- > From: Python-list bounces+jcasale=activenetwerx@python.org> On Behalf Of Simon > Connah > Sent: Thursday, March 14, 2019 3:03 AM > To: Python > Subject: asyncio Question > > Hi, > > Hopefully this isn't a stupid question. For the record I am using Python > 3.7

RE: Multiprocessing vs subprocess

2019-03-12 Thread Schachner, Joseph
subprocess call can be blocking (the caller waits), or not. If not the caller can do whatever it wants including decide not to wait forever, and it can even exit. Of course, if one of the processes you launched is locked up that is a problem all by itself, even thought the manager can exit

  1   2   3   4   5   >