Category "python"

How to avoid 'Too many open files' error when using parallelization within scipy.optimize.differential_evolution?

I am running a python script which uses scipy.optimize.differential_evolution to find optimum parameters for given data samples. I am processing my samples seq

How to send a complete email using smtplib python

I am trying to send an email using Python smtplib. My objective is to include the below info in email Attachment file #works fine Paste the contents of a tabl

How to split cell in VSCode Jupyter Notebook?

How can a Jupyter notebook cell be split in VSCode? I.e., how to split a single cell with multiple lines into two cells with the top lines (above the cursor) i

I am having issue with django web application deployment on ubuntu VPS. The issue is that the server do not give any response even on 0.0.0.0:8000

While deploying the Django website everything goes right but when I run the command python manage.py runserver 0.0.0.0:8000 then the server starts successfully

Fast and Robust Image Stitching Algorithm for many images in Python?

I have a stationary camera which takes photos rapidly of the continuosly moving product but in a fixed position just of the same angle (translation perspective)

How to find the sessions time from a stream of user login events in python?

Given User Login Events continuously appearing in a stream processing system similar to this, where each line is 1 event (you can assume the pipeline is externa

How to append a multiple dictionaries to a list from a loop, python?

How can one append dictionaries that each looping generates to a list so at the end my function returns a list of n-dictionaries? Without any fancy libraries, j

Import and Edit a CSV file with validation rules

I am very new to Python / coding in general so excuse me if this is a simple question I'm just struggling to find an answer. I have been tasked to create a very

Scripts directory is missing from Virtual Environment

There is no directory called Scripts. How can I activate? Please help me to solve this.

Verify that a column name is a unique identifier

I have a dataset called df_authors and in that dataset I have a column called author. I have to verify that df_authors.author is a unique identifier. What I tri

Printing both outcomes of if statements

I am a complete beginner in python and was trying to write a simple programme for deciding if you were eligible for a loan or not but regardless of my inputs bo

Creating RadioButtons with a loop but problem with them having the same value

I'm trying to make an exam sheet with "n" 4-option questions. I have created "n" sets of 4 horizontal Radiobuttons with a loop. the problem is everytime a certa

Is there a way to change GPU / CPU on tensorflow during code execution?

I have 2 tensorflow (1.15.4) models running sequentially. The output from the first model will be fed into the second model. Is there a way to run the first mod

python win32ui.error: BitBlt failed & CreateCompatibleBitmap failed in multithreading

I'm here to ask for help on a recent problem I encountered with my program.... I am getting this error when I try to use BitBlt and CreateCompatibleBitmap: win3

Remove "0%" labels from a plotly pie chart in Python

I need to plot a pie chart that shows all descriptions in a legend, despite the values being zero. However, I would like also to remove the "0%"s labels from th

how to scrape google play store using scrapy

I'm trying to scrape google play store using Scrapy and by default I can get only 50 links while I can see 257 links in total. So I applied request headers and

How to configure the Keras Optimizer and Learning rate using config.yaml file?

I have defined few parameters in my config.yaml like as below. params: epochs: 10 batch_size: 128 num_classes: 10 loss_function: sparse_categorical_cros

Python CUDA parallize multiple SVD's of small matrices

I've seen a similar post on stackoverflow which tackles the problem in C++: Parallel implementation for multiple SVDs using CUDA I want to do exactly the same i

python: apply all functions inside a class to a user input

I have a class and a some functions that changes the user input and saves it in a file as follows. import os import pandas as pd from langdetect import detect

How to plot pose_world_landmarks in mediapipe?

I'm trying to plot my captured pose_world_landmarks like it is shown on the GitHub Mediapipe homepage (https://google.github.io/mediapipe/solutions/pose.html -&