Category "python"

Run ner.manual in Prodigy on csv file

I am new to Prodigy and haven't fully figured out the paradigm. For a project, I would like to manually annotate names from texts. My team has developed our own

Join same table twice in SQLALCHEMY selecting only some columns

Consider I have 2 models: class User(db.Model): __tablename__ = 'user' id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(255)

Matplotlib SubPlotpositions in Figure and general heading "figure"

For plotting data I have created the Figure. figure Is there a possibility to reduce the horizontal and vertical distances between the subplots and the vertival

Django PDF parser on POST request

I hope for your help. Because I have been struggling with this problem for a long time. A POST request comes from the frontend with one PDF file, after which I

find unique lists inside another list in an efficient way

solution = [[1,0,0],[0,1,0], [1,0,0], [1,0,0]] I have the above nested list, which contain some other lists inside it, how do we need to get the unique lists i

count function in python list

Hello comrades, I want to take a character from the input and convert it to a list, and then show the number of repetitions of each index to the user, but it gi

Is there a way to allow your bot to follow announcement channels for other servers through a command?

My bot uses discord.py, is there a way to code it to allow it to automatically follow an announcement channel for other servers to your server through a command

I'm trying to approximate the square root of 2 in python

here is the code i wrote. my idea is put a number(between 0~9) at the end of x and square it and then see if it's smaller than 2 ,choosing the biggest x = 1.4

Convert Matlab script to Python

I am trying to convert a script from the OCamCalib Matlab toolbox to python. This scripts estimate a inverse polynomial function used for the reverse path of li

Strip multiline python docstrings with regex

I want to strip all python docstrings out of a file using simple search and replace, and the following (extremely) simplistic regex does the job for one line do

replace text between two strings in a file - python

i have a sh file, i need my python script to find specific strings and replace all the text between them in it: hello_example=( # <- this specific line "bla"

using methods of differents objects in pygame in a while True, chess project [duplicate]

I'm new to pygame, and OOP in python ( used a lot of java before) For a personal project, i'm trying to make a chess game, but I have a probl

(CLOSED) How to persist data across multiple AWS Lambda sessions?

I know this has been discussed various times on the world wide web, but as a newbie, it's really hard for me to translate these answers into practical execution

Name error when name is defined? For class project

Thank you for taking time to read this. I have a project due for my Programming class by Friday. The project is basically analyzing the most popular songs aroun

futures.wait() or futures.as_completed() blocked while all futures are Completed or Cancelled

I have a bug with futures.as_completed() or futures.wait() that will be blocked indefinitely when all Futures are completed or cancelled. Here the steps to repr

Python asyncio program does not exit waiting for stdin input

I have a complex Python 3.9 program that does not exit if interrupted with Ctrl-C (SIGINT). The following is a minimal repro of the problem. Run with python sam

FireBase Recaptcha verification failed - SITE_MISMATCH

I am using firebase identity toolkit from googleapi for phone verification on web. I have handled recaptcha for website too using site key and went to do post

Keras does not load because cannot find TensorFlow

Running Anaconda and installed: Keras = 2.4.3 TensorFlow = 2.4.0 However, when importing Keras - I get "Keras requires TensorFlow 2.2 or higher". Tried uninstal

How to create x264 RTSP server with OpenCV Python with GStreamer backend

My goal is to create a RTSP server using OpenCV Python using the GStreamer backend. I have RGB images stored as OpenCV Mat, and I would like to create a VideoWr

A way of selecting the next xpath element

How can i switch to the next element from a table using python and selenium. I have a website with a table that looks like this: https://i.stack.imgur.com/ZYwKU