Re: error on os.open API

2021-04-05 Thread Marco Ippolito
> It seems that the os.open API cannot distinguish between a permission error > and the fact that a directory cannot be opened like files. > The following script reproduces the scenario (tested on Python 3.8.2 > (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on > win32) :

Re: Friday Finking: initialising values and implied tuples

2021-04-02 Thread Marco Ippolito
> (a) basic linear presentation: > > resource = "Oil" > time = 1 > crude = 2 > residue = 3 > my_list = "long" > > (b) using explicit tuples: > > ( resource, time, crude, residue, my_list ) = ( "Oil", 1, 2, 3, "long" ) > > (c) linear and indented tuples: > > ( > resource, > time, >

Re: NOT ABLE TO DOWNLOAD speech_recognition ON MY COMPUTER

2021-04-01 Thread Marco Ippolito
On 2021-04-01, ᗷᑌᑎᑎY wrote: > When I enter the command pip install speech_recognition it say’s we cannot > find a compatible version. Try: ``` pip install SpeechRecognition ``` What's the output? -- https://mail.python.org/mailman/listinfo/python-list

Re: Issues in starting Python application

2021-04-01 Thread Marco Ippolito
On 2021-04-01, Mahira Pamnani wrote: > Sir > I have been trying hard to install Python on my PC since a long time. The > application gets installed but, for reasons unknown, it doesn't start. > It keeps asking to repair, modify or uninstall the application. > I have tried doing that too, but it

Re: memory consumption

2021-04-01 Thread Marco Ippolito
> > Are you running with systemd? > > I really don't know. An example of how to check: ``` $ readlink /sbin/init /lib/systemd/systemd ``` You want to check which program runs as PID 1. ``` ps 1 ``` -- https://mail.python.org/mailman/listinfo/python-list

Re: memory consumption

2021-04-01 Thread Marco Ippolito
> >> What if you increase the machine's (operating system's) swap space? Does > >> that take care of the problem in practice? > > > > I can`t do that because it will affect other containers running on this > > host. > > In my opinion it may significantly reduce their performance. > > Assuming

Re: memory consumption

2021-03-31 Thread Marco Ippolito
> > At which point does the problem start manifesting itself? > The problem spot is my cache(dict). I simplified my code to just load > all the objects to this dict and then clear it. What's the memory utilisation just _before_ performing this load? I am assuming it's much less than this 1 GB

Re: Canonical conversion of dict of dicts to list of dicts

2021-03-30 Thread Marco Ippolito
> > For completeness, from 3.5 onwards, you can also do the following: > > [{'name': n, **d} for n, d in dod.items()] > Reading through these, personally I like this one best. I'm curious what > about it was enabled in 3.5? Was **kwarg expansion inside a dict literal not > possible before then?

Re: memory consumption

2021-03-30 Thread Marco Ippolito
Have you tried to identify where in your code the surprising memory allocations are made? You could "bisect search" by adding breakpoints: https://docs.python.org/3/library/functions.html#breakpoint At which point does the problem start manifesting itself? --

[issue38642] python3.7.3 seems to cause add-apt-repository to rejct or not find gi library

2019-10-30 Thread Marco Ippolito
New submission from Marco Ippolito : Following the indications found here: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository I was trying to install Docker Engine in Ubuntu 18.04.02 Server Edition. The first installation's steps went fine but I encountered

/usr/lib/python2.7/subprocess.py:OSError: [Errno 2] No such file or directory

2014-01-06 Thread Marco Ippolito
Hi everybody, I'm trying to use MEGAM with NLTK. running the file: [Found /home/ubuntu/nltk_data/megam_i686.opt: /home/ubuntu/nltk_data/megam_i686.opt] Traceback (most recent call last): File classifying.py, line 494, in module me_classifier = MaxentClassifier.train(train_feats,