MultiProcessing in Python Enduring Order of Queue
I am trying to run a loess regression across multiple processors but when my code adds each concurrent dataframe to be appended to the queue they are all out of order and the resulting graph looks...
View ArticleUnable to Generate Summary in Bullet Points using Langchain
I am currently working with a chat agent from the Langchain project. My goal is to generate a summary of a video content in bullet points, but I've run into an issue. The agent is capable of...
View ArticleWhy do I get Python IOError: [Errno 13] Permission denied on writing to a file?
I cannot figure out what I am doing wrong. I am running some tests and writing the results to a file. The portion of the code which writes to a file is the following (in a class called Tester):...
View ArticleStoring user inputs as parameters for a function
Does this work? I'm trying to write a while loop that allows users to enter an album's artist and title. Once I have that information, I can call the function make_album with the user's input and print...
View ArticleHow to deselect columns in PySide/Qt QColumnView
I am creating a simple File Browser and trying to implement Miller Columns like found in the macOS Finder. Qt provides both QColumnView and a QFileSystemModel which should make it easy to combine and...
View ArticleI need one expert of python and streamlit or FLASK [closed]
I need one expert to do my project 'sentiment analysis of restaurant reviews using machine learning NLP " i have the model but i want to turn it to a web app using streamlit or FLASK. I will pay the...
View ArticleMismatch between fitting curve and origin data
I want to plot my data but there are edges in the curve so I am trying to smooth it usingpolynomial (tried different degrees), spline, or exponential functions but there is a mismatch with the original...
View ArticleIterate through rows in excel spreadsheet and find the difference in time...
This code iterates through an excel spreadsheet and finds a specific column where energy is zero, then calculates the duration of that zero-energy-value period by calculating difference between first...
View ArticleCreating Bezier curves that meet curvature condition
As part of a homework assignment, Im trying to create bezier curves (with 4 points) with a maximum finite curvature of K_x. Curvature is calculated with a defined formula k = |y''|/(1+y'^2)^1.5FOr a...
View ArticleHandle TLS/SSL Handshakes Manually
I would like to handle my TLS handshakes manually with socket and ssl libraries in Python. Here is my code where I try to show what I am trying to achieve.In my code provided, I want to allow TLS...
View ArticleI ran into an error when I try to use YoutubeLoader.from_youtube_url
There is my code snippetimport os,openaifrom langchain.document_loaders import YoutubeLoaderfrom langchain.embeddings.openai import OpenAIEmbeddingsfrom langchain.vectorstores import Chromafrom...
View ArticleHow to get to input specific information on a csv file [closed]
with open("life-expectancy.csv") as life_file: output = [] year_of_interest = int(input("Please enter your year of interest: ")) year_max = "" year_avg = "" year_min = "" max_expect = 0 for line in...
View ArticleHow to resolve types in Python code with Tree-sitter?
I'm using Tree-sitter to parse Python code and extract ASTs, and trying to manually traverse ASTs to infer types based on assignments and function definitions.But I'm struggling with accurately...
View ArticleIs there is any module to visualize dxf file in python?
I have searched dxf-related module to generate dxf with python and found ezdxf and geopandas, and drawSVG as similar case.I failed to install geopandas for unknown reason and I install the rest two.I...
View ArticleEfficiently Turn Matrix of Intersecting Routes Into Simplified Spatial...
I have a matrix of real detailed routes which I want to efficiently turn into a simple spatial network. Simple means that I don't care about the intricacies of local transport and possible...
View ArticleBinding Panel DatetimeRangePicker to plot
I am attempting to modify a working Panel dashboard to change from the DatetimeRangeSlider widget to the DatetimeRangePicker widget.I have a long time series but typically only the most recent 2 weeks...
View ArticleHow to detect slope vs flat across different levels
How can i write a function that can detect wether a line is sloped or flat at the latest point in time. I have a dataset of cryptocurrency OHLC data and want to detect wether their MA is flat or...
View ArticlePsychoPy adding Spaces to TextStim
while True: #win.flip() keys = event.getKeys(keyList = ['space', 'return', 'backspace','a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',...
View ArticlePython proccess not start via block input
Minimal code for test. If clear # time.sleep(0.5) to add function not started in other proccess.How do without time.sleepimport multiprocessingimport timedef add(counter): while 1: print(counter.value)...
View ArticlePython. Unzip archive to which the filenames are encoded using urlencode, and...
Creating a backend on FastApi. Post request, the bytes string is received. After that, I create a zip archive from this line. But the file names are encoded using url encoding.data: bytes - bytes...
View Article