[Python-Dev] Re: Tips: Searching deprecated API usage.

2020-07-06 Thread Victor Stinner
Thanks for your advice! I confirm that raw GitHub code search is
painful with all copies of CPython code base :-(

I copied your notes in my
https://pythondev.readthedocs.io/test_next_python.html list :-)

victor

Le dim. 5 juil. 2020 à 07:55, Inada Naoki  a écrit :
>
> Hi, folks.
>
> After 3.9 becomes beta, I am searching deprecated APIs we can remove
> in Python 3.10.
> I want to share how I am checking how the API is not used.
>
> Please teach me if you know an easy and better approach to find
> deprecated API usage.
>
> ## Sourcegraph
>
> Github code search is not powerful enough and there is a lot of noise.
> (e.g. many people copy CPython source code).
> On the other hand, Sourcegraph only searches from major repositories,
> and has powerful filtering.
> This is an example of `PyEval_ReleaseLock` search.
>
> https://sourcegraph.com/search?q=PyEval_ReleaseLock+file:.*%5C.%28cc%7Ccxx%7Ccpp%7Cc%29+-file:ceval.c+-file:pystate.c&patternType=literal&case=yes
>
>
> ## Top 4000 packages
>
> You can download a list of top 4000 PyPI packages in JSON format from this 
> site.
> https://hugovk.github.io/top-pypi-packages/
>
> I used this script to download sdist packages from the JSON file.
> https://github.com/methane/notes/blob/master/2020/wchar-cache/download_sdist.py
>
> Note that this script doesn't download packages without sdist (e.g.
> only universal wheel).
> It is because I have searched Python/C API.
> We can reduce the pain of the removal by fixing most of top 4000 packages.
>
>
> Regards,
> --
> Inada Naoki  
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-dev@python.org/message/USDJAUABEULVSS2TLODZBYBEEDN2MNHR/
> Code of Conduct: http://python.org/psf/codeofconduct/



-- 
Night gathers, and now my watch begins. It shall not end until my death.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/IMEF35VYDGOFIZSGXGHXH3EE5WNA7333/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: [OT] I'm unsubscribing from this tire fire (formerly known as python-dev)

2020-07-06 Thread Ivan Pozdeev via Python-Dev

I'm using my mailer's "ignore thread" feature and counting on the fact that the 
flamers will eventually exhaust themselves (most already have).

On 06.07.2020 8:41, Christian Heimes wrote:

Y'all,

trigger warning: strong opinion

The Urban Dictionary defines the term "tire fire":

   A horrifying mess, either literally or figuratively
   foul-smelling, that seems to last forever.

The term describes my current view of python-dev perfectly. It has
always been a problematic and mentally draining place for, sometimes
even toxic. But the recent PEP-8 discussion trumps every past incident
(reference to US politics intended).


To every person still replying on the PEP-8 thread:

   You are making us sick and should be ashamed of yourself!

And I don't mean 'sick' in the figurative sense. You are literally
hurting people who are spending their free and personal time to develop
open source software for you. I know of at least three cases among
Python core developers with symptoms like sleep disorder, tremor,
anxiety, and panic attacks. One core dev wrote publicly that they were
forced to take psychotropic medicine to counter a panic attack after
they have read just a few messages.


At one point I have even considered to retire from Python core
development completely. I'm profoundly disgusted and appalled by the
racist attitudes and self-importance of some people as well as an
unrelated incident on BPO last week. The two reasons I'm not leaving are
  several core developers that I'm happy to call friends and Python
communities beyond predominantly male and Western participants on the
PEP-8 thread. Communities like PyLadies, PyCon Africa, PyLATAM, and
PyCon APAC make me proud and happy to be a member of the Python
community. I have met fantastic people at Python and OSS events in the
Caribbean, India, and East Europe. I don't want to abandon people I
cherish and grew fond of.


At least one other core developer has abandoned python-dev last week.
Others have stopped participating and posting on python-dev years ago. I
will follow their example now.

Goodbye
Christian
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/LR3RWME7NYAVAWGD2ZD5NPZAGL7VVI7K/
Code of Conduct: http://python.org/psf/codeofconduct/
--
Regards,
Ivan

___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/EE2JEIB2CPVLEQR4XTNGFDZWIZJ5LB2L/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] ML help

2020-07-06 Thread hamza naeem
Hi , I am making a classifier which basically scans the historical places
and detects them .I am using SIFT for taking features of images and then
passing them to the neural network . Features are 128 dimensional and model
is trained with 97% accuracy but when i am using Single image prediction it
is giving error :
*ValueError: Input 0 of layer sequential_9 is incompatible with the
layer: expected axis -1 of input shape to have value 128 but received input
with shape [32, 1]*
It's shape is already 128 , but I don't know why it is giving an error .
Kindly help me i got stucked in it for several days
import cv2
import numpy as np
import tensorflow as tf

# import keras
# from keras.models import load_model
# from keras.utils import CustomObjectScope

# print(tf.__version__)
# print(keras.__version__)
Categories = ["Deewane aam", "Lahore Fort Museum", "Moti masjid", "Sheesh 
Mahal"]

sift = cv2.xfeatures2d.SIFT_create()


def prepare(filepath):
IMG_SIZE = (124, 124)
img_array = cv2.imread(filepath, cv2.IMREAD_GRAYSCALE)
new_array = cv2.resize(img_array, IMG_SIZE)
keyImage, desImage = sift.detectAndCompute(new_array, None)
feat = np.sum(desImage, axis=0)
return feat


# from keras.initializers import glorot_uniform

# with CustomObjectScope({'GlorotUniform': glorot_uniform()}):
model = tf.keras.models.load_model("SubClassPredictions.h5")
print(model.summary())
prediction = model.predict([prepare('E:\Python Telusko\OpenCv\motimasjid.jpg')])
# print(prediction)
# print(Categories[int(prediction[0][0])])
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/KGNSVNK5YQ73C2DW5FQKFY4HM5QZCW2R/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: ML help

2020-07-06 Thread Eric V. Smith
This list if for developing the next version of Python, not for 
providing help with using Python. I suggest you use a Sift-specific 
mailing list for help with Sift.


Eric

On 7/6/2020 4:54 AM, hamza naeem wrote:
Hi , I am making a classifier which basically scans the historical 
places and detects them .I am using SIFT for taking features of images 
and then passing them to the neural network . Features are 128 
dimensional and model is trained with 97% accuracy but when i am using 
Single image prediction it is giving error :
*    ValueError: Input 0 of layer sequential_9 is incompatible with 
the layer: expected axis -1 of input shape to have value 128 but 
received input with shape [32, 1]*
It's shape is already 128 , but I don't know why it is giving an error 
. Kindly help me i got stucked in it for several days


___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/KGNSVNK5YQ73C2DW5FQKFY4HM5QZCW2R/
Code of Conduct: http://python.org/psf/codeofconduct/
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/USA2RWU4ZFROSG4LGIRJI5W6EAJXPOZL/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: [OT] I'm unsubscribing from this tire fire (formerly known as python-dev)

2020-07-06 Thread Kyle Stanley
>
> I'm using my mailer's "ignore thread" feature and counting on the fact
> that the flamers will eventually exhaust themselves (most already have).
>

Yep, not all threads are going to be equally worthwhile for everyone to
read. If a thread is going nowhere productive, the best course of action is
oftentimes to ignore new messages.

Also, on most high traffic public MLs, I think it's all but necessary to
maintain a "kill file" to filter messages from authors that consistently
don't make positive contributions to the discussions. For anyone feeling
burned out that still wants to be involved in the technical discussions, I
would highly recommend considering a similar approach. There are sometimes
cases where an individual may not be necessarily violating the CoC (meaning
there's not much that can be done from a moderation PoV) while still being
generally negative and/or not worthwhile to read messages from on a regular
basis.

On Mon, Jul 6, 2020 at 6:28 AM Ivan Pozdeev via Python-Dev <
python-dev@python.org> wrote:

> I'm using my mailer's "ignore thread" feature and counting on the fact
> that the flamers will eventually exhaust themselves (most already have).
>
> On 06.07.2020 8:41, Christian Heimes wrote:
> > Y'all,
> >
> > trigger warning: strong opinion
> >
> > The Urban Dictionary defines the term "tire fire":
> >
> >A horrifying mess, either literally or figuratively
> >foul-smelling, that seems to last forever.
> >
> > The term describes my current view of python-dev perfectly. It has
> > always been a problematic and mentally draining place for, sometimes
> > even toxic. But the recent PEP-8 discussion trumps every past incident
> > (reference to US politics intended).
> >
> >
> > To every person still replying on the PEP-8 thread:
> >
> >You are making us sick and should be ashamed of yourself!
> >
> > And I don't mean 'sick' in the figurative sense. You are literally
> > hurting people who are spending their free and personal time to develop
> > open source software for you. I know of at least three cases among
> > Python core developers with symptoms like sleep disorder, tremor,
> > anxiety, and panic attacks. One core dev wrote publicly that they were
> > forced to take psychotropic medicine to counter a panic attack after
> > they have read just a few messages.
> >
> >
> > At one point I have even considered to retire from Python core
> > development completely. I'm profoundly disgusted and appalled by the
> > racist attitudes and self-importance of some people as well as an
> > unrelated incident on BPO last week. The two reasons I'm not leaving are
> >   several core developers that I'm happy to call friends and Python
> > communities beyond predominantly male and Western participants on the
> > PEP-8 thread. Communities like PyLadies, PyCon Africa, PyLATAM, and
> > PyCon APAC make me proud and happy to be a member of the Python
> > community. I have met fantastic people at Python and OSS events in the
> > Caribbean, India, and East Europe. I don't want to abandon people I
> > cherish and grew fond of.
> >
> >
> > At least one other core developer has abandoned python-dev last week.
> > Others have stopped participating and posting on python-dev years ago. I
> > will follow their example now.
> >
> > Goodbye
> > Christian
> > ___
> > Python-Dev mailing list -- python-dev@python.org
> > To unsubscribe send an email to python-dev-le...@python.org
> > https://mail.python.org/mailman3/lists/python-dev.python.org/
> > Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/LR3RWME7NYAVAWGD2ZD5NPZAGL7VVI7K/
> > Code of Conduct: http://python.org/psf/codeofconduct/
> > --
> > Regards,
> > Ivan
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/EE2JEIB2CPVLEQR4XTNGFDZWIZJ5LB2L/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/HHGATEW2BIJ5AKL6RUVEVWEHL2DWI2VS/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: [OT] Speaking of the recent PEP-8 change

2020-07-06 Thread Stephen J. Turnbull
David Mertz writes:
 > On Sun, Jul 5, 2020 at 2:37 PM Stephen J. Turnbull <
 > turnbull.stephen...@u.tsukuba.ac.jp> wrote:
 > 
 > >  > Are you saying that people who split infinitives are usually
 > >  > black,
 > >
 > > Of course not.  Base rates suggest they're mostly white.
 > >
 > 
 > I think that's not true.  According to this, English speakers in top
 > several locations are about the following:
 > https://en.wikipedia.org/wiki/List_of_countries_by_English-speaking_population

Good point, thank you for the correction.  It makes it clear to me
that shooting from the hip on such a complex subject is a very bad
idea, so thank you again! :-)
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/FIQIVRGQ6OEFBNDJPXJLW4K2JBTIENVS/
Code of Conduct: http://python.org/psf/codeofconduct/