Category "python-3.x"

Find user with lowest latency from log file

I have an input file which has following log entires. 200,John,/home,60ms 200,Sarah,/log,13ms 500,Jack,/home,40ms Output: sarah

How to reference a variable defined in setup.py?

I've got the following setup.py: import itertools dependencies = { 'minimal': ['numpy', 'requests'], 'option-a': ['scipy'], 'option-b': ['matplotlib'] }

multiprocessing vs multithreading vs asyncio in Python 3

I found that in Python 3.4 there are few different libraries for multiprocessing/threading: multiprocessing vs threading vs asyncio. But I don't know which one

How to create multiple CLI options identified my package name in a python?

I want to build a cli interface for my application which has nested functionality. Example: ├── ... ├── setup.py └^

Making MyPy happy with aiohttp_pydantic

I'm using the last version of the aiohttp_pydantic library on a Python3.8 project. When I run MyPy, I have this kind of error : error: Skipping analyzing "aioht

i'm with an error or bug in the library selenium

I have this bug/error in selenium. Could you help me figure it out? i've already reinstalled the webdriver and it goes on like this my error DevTools listening

Flask-wtf Recaptcha always returns "the response parameter is missing"

I am trying to implement Recaptcha 2 in a flask web form, however, my form always fails to validate when I have recaptcha enabled. To dig a little deeper I prin

FastAPI: How to log the return value of a POST method after returning the response?

So I'm working on my first ever REST API, so apologies in advance if I've missed something basic. Anyway, I have a function that takes a json request from anoth

Find a pattern in middle of multiple sentences

I have a dataframe as below, data = [ [ 1, 'AR-123456' ], [ 1, '123456' ], [ 2, '345678' ], [ 3,'Application-12345678901'], [ 3, '1234567890

how to code a right sibling left child tree

im super stuck on my assignment i have found a code to make a basic version of this tree but i have no idea how its works. Can someone pls help explain how it w

ImportError: python3.8/site-packages/tensorflow/python/profiler/internal/_pywrap_traceme.so: failed to map segment from shared object

When I import from tensorflow.keras.preprocessing import image in a single python file it works perfectly. Even in python interpreter console it is imported suc

How can I detect an "unClick" in wxPython?

I want to detect the difference of position between when I left-click in a panel and when I finish clicking (when the left button goes up after the click). I de

In python how do i selectively combine/ print output 4 lists

in python v3 how do i get the prices of items based on given conditions l3 -> (color price ) & l4->(articles base price ) & l1=(color name) &am

how to create mongodb composite schema in prisma using python?

File "/Users/akaash/opt/miniconda3/lib/python3.8/site-packages/prisma/generato r/models.py", line 861, in check_supported_scalar_list_type Cannot use b_boxes as

Spot Instance Error while creating a normal instance with Boto lib

I'm facing this Spot instance issue while creating an instance with the boto AWS library even if I'm not asking for a Spot instance. The issue is similar to thi

How To Access Repository Secret

I've made a repository on GitHub and have added a Repository secret. However, I can't seem to grab the secret's value. Any help would be greatly appreciated!

Cannot import name 'get' from partially initialized module 'requests'

I have problem with requests package. In past requests was working, but today for no reason it stopped working. I am just importing requests and it cause error.

Need to remove a particular file of size 0 from a directory

Need to remove a particular file of size 0 from directory, can anyone help me on that? The code i have tried is for f in source_images: file_path = os.pat

Query with Elasticsearch and Return source field only

I have some data on Elasticsearch and retrieve data using Fastapi GET call. i used below code to GET data from Elasticsearch main.py @app.get("/get_all") def ge

Pyscf install error: failed building wheel

I keep getting this error after entering pip install pyscf pi@node0:~ $ pip install pyscf Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/