Quantcast
Channel: Active questions tagged python - Stack Overflow
Browsing all 23247 articles
Browse latest View live

Problems with starting waitress-serve via systemd service

Project EnvironmentI have a Flask-based web service I can start from the command line. The project environment looks like this:BASEDIR/ startMyService.sh |-venv/ |-/bin |... |-/WebService......

View Article


Page works locally but not globally after deployment [closed]

We connect front and back (but we haven't yet solved problem with env files yet) but even without that it's working fine until the deploymentWe try to deploy our code and test it but after deployment...

View Article


Normalize / flatten nested list of JSON

I have this list with lots of JSON (here shortened) in it, which are very nested and I want to normalize it and bring it all to one level in the JSON.What I have:[{'index': 'exp-000005','type':...

View Article

Getting a pyarrow.lib.ArrowInvalid: Column 1 named type expected length 44...

I am getting the below error when trying to modify, chunk and resave a Huggingface Dataset.I was wondering if anyone might be able to help?Traceback (most recent call last): File...

View Article

How to extract and convert several rows with dictionaries structure into...

BlockquoteI have an excel file with several columns , in one of them there is a column with the data structured in a type of dictionary , and I need to extract for example "name: en" into a separate...

View Article


Image may be NSFW.
Clik here to view.

Re-post: Computing line that follows objects orientation in contours

I am using cv2 to compute the line withing the object present in the mask image attached. The orientation/shape of the object might vary (horizontal, vertical, horizontal curved or vertical curved...

View Article

How can I view user reactions on my posts as an admin in a Telegram channel

I want to see members reaction in telegram channelI am admin of telegram channeland I have enabled users reaction to my posts.Telegram does not show which user sent which reaction.I am looking for a...

View Article

what is this widget name in customtkinter used in toolkit application

I am looking for widget in CustomTkinter but I cannot find it name and how to do it can you please use the picture I am attaching to help me find out its namewidget shape

View Article


while true means loop forever but here is a obviously empty...

terminal_value_stack = []# We need a terminal, add a variable or constant if self.const_range is not None: terminal = random_state.randint(self.n_features + 1)#why while true here? it seems make no...

View Article


Algorithm to find min max possible 'islands' [closed]

Given a string. 'g' means the land and the 'o' means the sea. The part of the map that does not know whether it is land or sea is marked with an 'x'. Write a program that tells you the minimum and...

View Article

Install a local copied Huggingface transformers package to Google Colab

I want to modify some huggingface models to do some experiments. How should I import my modified transformers package in colab?What I want to do is to change the model code to output some internal...

View Article

Correct way of merging two CSV files without duplicates based on a column in...

I want to merget 2 CSV files into one CSV and remove all duplicated rows based on a column (second column).Here is my first CSV file:...

View Article

how to put checkbox with selenium in pyhon

I can't get a checkbox using python, I've already tried my code like this: checkbox = driver.find_element(By.CLASS_NAME, "styles_formCheckboxInput__eSwKK")checkbox.click()here is the html code<div...

View Article


Predictions on testing set for every trained k-1 fold

I have a dataset that have split into training and testing sets. First I have used K folds cross validation to tune my model. After that, I want to use every trained (K-1) folds to predict my entire...

View Article

Flask-socketIO with Gunicorn on the cloud not working

I've build a test app (testing for RESTfull Api) to process some POST requests from another app.When both apps are run localy from PyCharm everything works ok - POST request activates a function which...

View Article


What is the correct format of a string variable to be passed as argument to...

I am trying to pass a string variable as an argument to call a ssh_client shell command to find the latest folder on a remote server.The value["folder"] comes from a json file in the format...

View Article

Image may be NSFW.
Clik here to view.

Spark execute "Listing leaf files and directories" while reading partitioned...

I have a dataset on HDFS and it's partitioned on 2 columns: ym, ymd, and eventName. While I read the dataset using root path, Spark create jobs to list all leaf files on the directory. The problem is...

View Article


in OOP Is it correct to pass an attribute to the method as a parameter?

I wrote a recursive program to print the values of a binary search tree from the smallest to the largest (in order) and it can be written in two ways:This can be written in such a way that the function...

View Article

How does the JavaScript pendant of a Python class implementation look like?

Am studying the difference between those two languages and i was wondering why i can't access the variables in javascript classes without initiating an instance but i can do that in pythonhere is an...

View Article

Unresolved reference issue in PyCharm 2024.1.1

Description: I’m using PyCharm 2024.1.1, and I’ve encountered an issue related to unresolved references. In my project, I’ve configured a remote interpreter, and I can run my code without any problems....

View Article
Browsing all 23247 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>