Category "python-3.x"

Discord.py progress bar

Is there any way to make beautiful progress bar and embed it into message. Here's one example of what I want to make: I know I can make an ASCII-style progress

Listener for Python Queue

I'm using python queue to insert data packets from mqtt listeners But I'm not sure when this queue will be loaded by Mqtt packet. Can we put a listener on to th

How to display dictionary with dataframes on a localhost (using Flask and Python)?

I have the following dict: {'id': 1, 'df': pd.DataFrame({'id': [1,2,3], 'col1': ['kuku', 'dudu', 'lulu'], 'col2': [8,9,10]}), 'df_size': 3} When I am trying to

Access module attribute from within the function

I have a function and the fully qualified name is -> pyserv.asynch.service.modules.get_result() It is possible that pyserv or other module, say services or m

Handle multiple request at same time on Flask web app

What I have: I've a Flask web app deployed to Heroku's server, which consists of only one web process app.py. Here it is: #importation from flask import Fla

Trying to style large number of rows with openpyxl, is there a 'faster' way?

I've got a function I use to check and style rows of a spreadsheet based on matching criteria with openpyxl. While this has been functional for nearly every sma

how to fix error Import "chess" could not be resolved

please help me fix error Import "chess" could not be resolved and many more errors like: Import "chess .pgn" could not be resolved, Import "chess.variant" could

How to connect to oracle database with both password and wallet?

I am using Oracle Client 18 Home 1 SQL Developer platform is Windows-10-10.0.18362-SP0 python version is 3.8.8 cx_Oracle version is 8.0.1 cx_Oracle client versi

A serious "ModuleNotFoundError: No module name..." problem

enter image description here As the image shows, I have marked the parent directory source root, and pycharm doesn't report an import-error(like wave line or so

Django Graphql Auth not logged in user

I'm using Django Graphql Auth in my api but when I want to get the current logged in user always get the Anonymous. # settings.py MIDDLEWARE = [ # ...

Compressing a netCDF file with the pynco package

I'm interested in compressing a NetCDF file in python using the pynco package. From the command line, I would usually use: nccopy -d 3 input_file.nc output_file

how to get the value of a specific column of each row in a html table?

I need to get the sensitivity (7th column) of each setting (row) site: https://prosettings.net/cs-go-pro-settings-gear-list/ table id: "table_1" 2 rows class: "

Import local ".py" library in powerbi python scripting

I have written a python library (ak_sql.py) to query my sql server and written another ".py" script (query_sql.py) to invoke this library and return data in dat

If statement calling both functions [duplicate]

I am trying to call a python function inside of an if when you input a certain letter. Even if the letter is not meant to be noticed by the if

Pydantic: Define an attribute of type List with nested lists and multiple sub-models

I have to deal with such a schema: { "method": "Data.get", "params": [ [ { # name this "Fetch" "select_": "Downtime

Stack the same row in each layer of a 3D numpy array

Hi is there a way to efficiently stack the same row in each layer of a 3D numpy array? I have an array like this: a = np.array([[["a111","a112","a113"],

How to calculate coefficients, solutions etc. in quadratic function with limited inputs in Python

I have a problem. I want to calculate everything in the quadratic function. equations for reference: ax^2 + bx + c a(x-p)^2 + q I made 8 possible inputs in tki

PyQT5 - Webview load URL - Unbalanced save/restore

I try to load a page in a webview widget. I got information: QPainter::restore: Unbalanced save/restore QPainter::end: Painter ended with 2 saved states so Web

How to groupby two columns, not considering order of values there?

I have a dataframe: val1 val2 val3 a b 10 a b 2 b a 3 f k 5 f k 2 when i do df.groupby(["val1", "val

Creating an instance in OWLready2 creates a completely new class instead of asigning it to the existing class

I'm trying to create a simple ontology, following the tutorial on the official website. The code runs smoothly and everything seems fine when running this code: