Category "python"

How to get VScode Integrated Terminal Virtual Environment working?

I have completed a few courses online in Python and recently started a new course in Django. Previously I always used a virtual environment but would activate t

how to fix anaconda driver issue?

libGL error: MESA-LOADER: failed to open radeonsi: /home/moritz/anaconda3/lib/python3.9/site-packages/matplotlib/../../../libstdc++.so.6: version `GLIBCXX_3

Reading HDF files and Converting them into Binary in Bash/Mac command line [closed]

I am having trouble downloading hdf files from a directory in an ssh server and opening with HDFView 3.0 on Mac. I used the sftp to connect to

PyCups Failed building wheel for pycups on Raspberry Pi

I'm trying to install pycups on my raspberry pi running Python 2.7.16 and pip version 18.1. I'm trying to install with the following command: sudo pip install p

Polynomial Expansion without sklearn

I want to try and recreate this functions from scratch (without using sklearn): # The matrix is M which is 1000x10 matrix. from sklearn.preprocessing import Po

How to use memray with Gunicorn and Django?

I have a project with Django and I did a multiread with Gunicorn. but my project has a memory leak. I want to monitor memory with "memray" but I don't know how

how to create a list of pdf page numbers if pdf page contains specific text strings using python

I am trying to extract PDF page numbers if the page contains certain strings, and then append the selected page numbers to a list. For example, page 2, 254, 439

How to use custom function with tensorflow dataset API?

I am new to TensorFlow's tf.data.Dataset and I am trying to use it on my data that I loaded with pandas dataframe as follows: Load the input date (df_input):

Unable to Request from Twitter Ads Api using OAuth in Python

I am stuck on a issue with Twitter-ads-api. I have completed the authorization and got the oauth-verifier token, but after this I am stuck on how to request for

Looking a pythonic way to add many formulas that change coordinates in a spreadsheet

I am creating a spreadsheet with python I want to add the following formula in the cells from D6 to P6. For example for D6, the formula should be =AVERAGE(D3:D5

Python subprocess line 1420 FileNotFoundError: [WinError 2] The system cannot find the file specified. Jupyter-Matlab notebook

I want to use Jupyter-matlab notebooks. I've downloaded Anaconda navigator and followed the steps from this web: http://jmlilly.net/jupyter-matlab Unfortunately

Filtering out rows in multidimensional numpy arrays

Let's say that I have an array like this: array([[ 1, 2], [-1, -2], [ 0, 0], [-1, 2], [ 2, -1]]) I want to filter out all rows t

Looping problem Elden ring runes per level calculation

This code is currently showing the total amount needed to reach the next level, but what I would like it to do is show the complete total amount so for example

How can I get the current text size in graphics.py

In Python graphics.py you can use the function setSize() to set the font size. How can you read the current font size of an object? What is the default font si

Should I only be using one or multiple instances of python's secrets.SystemRandom() class?

I am trying to generate random numbers securely and I found the secrets module, apparently the only way to generate random numbers is to have an instance of the

Elif and if statement not working in and out of function

The code: class Car: y = 0 x = 0 x_miles = y / 5280 y_miles = x / 5280 direction = 0 speed = 100 fps = speed * 1.467 Cords = {x}, {y} Cords_miles = x_miles, y_m

How to import a variable from a function in a different directory

I want to import my list variable which is in my build_video function and use it in a different file. I've been able to import global variables and use them in

Does scrapy User-agent rotator change HTML-response depending on selected browser type?

I am trying to scrape data such as price and some labels etc. from amazon using scrapy. I try to find elements by xpath or css and it works always fine when I u

YellowbrickTypeError for Keras Model: This estimator is not a classifier; try a regression or clustering score visualizer instead

I have the following Keras DNN model and have imported necessary Keras & Yellowbrick libraries: optimizer = RMSprop(0.001) finalDNNModel_wrap = KerasClassif

Why archived venv during azure pipelines created with venv-pack has corrupted python interpreter?

I want to use archived environment for spark-submit, but after unpacking on k8s cluster it has corrupted python interpreter