Category "python"

csv export failing when executing jupyter notebook from command line

I have a jupyter notebook that i am executing from command line using jupyter run Anomaly.ipynb now in my notebook i am exporting the dataframe as csv df.to_cs

Vectorizing a function that takes multidimensional input over a multidimensional array in JAX

I have been trying to vectorize a function that takes two 2D arrays and return a 2D array of the same shape, so that I can apply it element wise to two 4D array

OSX monterey -> ld: library not found for -lintl

When pipenv install uwsgi This error comes, ld: library not found for -lintl I guess it requires X-code library ? I tried this as well $xcode-select --install x

OSX monterey -> ld: library not found for -lintl

When pipenv install uwsgi This error comes, ld: library not found for -lintl I guess it requires X-code library ? I tried this as well $xcode-select --install x

How to perform 2 operations in parallel?

I have a problem and I can't figure it out. I have the following code that must save the data that is sent to him by an http request, first on the aws bucket an

Python Scrapy unable to get each class name with its value from each div

I'm trying to get each class names with its corresponding value from each div listing. From this page: https://www.dotproperty.id/en/properties-for-sale/riau-is

Calculate MD5 hash CSV file in synapse notebook using pyspark

I want to calculate a hash (md5) from a .CSV in pyspark stationed in ADLS gen2. It seems that pyspark can't transform a df into bytes. import hashlib df = spar

Running Spyder '5' on Debian 11

Why does calling spyder as 'root' on cli execute the spyder '5' version software, while doing the same as a normal 'user' executes spyder '4'? How do I make it

How to calculate the percentage of overlap between 2 ranges with python

I would like to calculate the percentage of overlap between 2 ranges. for example: I have two lists x and y x ['567.630', '592.927'] y ['593.000', '618.297'] In

Python Scrapy unable to get each class name with its value from each div

I'm trying to get each class names with its corresponding value from each div listing. From this page: https://www.dotproperty.id/en/properties-for-sale/riau-is

Kivy: Quality of images

i have programmed a little a Kivy/Python-program that opens an image and displays it. But it can cleary be seen, that there is a drop in image quality 2, when c

python code working fine in my parrot os but showing error on ubuntu

code working fine on parrot os but showing error on ubuntu def count_down(count): count_min = math.floor(count/60) count_sec = count%60 if count_min<10:

How can I fix this error in my avatar command that I'm getting?

I need to fix this error, I'm not very good with APIs. I am keen to understand how to fix it, since I'm trying to learn Python. The code: @client.command() asyn

i am not getting the required output it tells "say something" "speechrecognition could not understand audio" "say something"

import speech_recognition as sr import gtts from playsound import playsound import os r = sr.Recognizer() ACTIVATION_COMMAND = "hey sam" def get_audio():

Allocating external text, icon, and image files so that Python Script can function on multiple PCs?

I've been having this main issue in my code i've been trying to compile. I am trying to make a GUI-based application, utilizing the tkinter and pandas libraries

Pandas combine two columns with delimiters

I have two columns which have delimiters: column1 column2 a,b,c,d e,f,g,h h,i j,k l,m,n o,p,q ... ... I am trying to group them as ae

Assertion error during deep neural network image classification

# GRADED FUNCTION: two_layer_model def two_layer_model(X, Y, layers_dims, learning_rate = 0.0075, num_iterations = 3000, print_cost=False): """ Impleme

No error logs in /var/log/nginx/error.log [nginx]

The nginx on my Google Linux server is not printing error logs in the file /var/log/nginx/error.log. The content of my /etc/nginx/sites-available/app file is: s

Deep neural network gives a constant value as output

I have implemented a neural network from scratch. I have taken random values as both input and output. When I use a single layer( with sigmoid activation) the n

Input 0 of layer sequential_2 is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: (None, 1)

model = Sequential() model.add(LSTM(100, input_shape = [X_sequence.shape[1], X_sequence.shape[2]])) model.add(Dropout(0.5)) model.add(Dense(1, activation="sigmo