sign language project (Ai)
Currently, we are a team in the graduation project, working on a sign language application, and after we have finished training and evaluating 2 models, we want to put the 2 models in the main function...
View ArticleProblems with indexing and slicing UV cords
============ RESTART: C:/Users/seth/AppData/Local/Programs/Python/Python311/Othograthic_3D_drawer.py ===========pygame 2.5.2 (SDL 2.28.3, Python 3.11.2)Hello from the pygame community....
View ArticlePython 3.10.12 - Cerberus v1.3.5 - validate error for - dict-->dict-->list -...
I need help to understand whether Cerberus v1.3.5 supports validation for the below YAML file. If yes, I would like to know what is wrong with schema I used below.This YAML file is a test file which is...
View ArticleAttributeError: 'str' object has no attribute 'capabilities' while executing...
I'm new to Python coding. I just finished installing Python, Pycharm, Selenium and configured Driver manager.And when I run my first program I'm seeing below error message. Code attached below. Please...
View ArticleLinkedList merge_sorted infinite loop
I keep getting into an infinite loop when using my function merge_sorted for my linked lists. Please help. Thanks :)I went through my merge_sort function and it seems okay. It updates the curr1 and...
View ArticleCreate a market ID from Origin destination pair in Python [duplicate]
I have given an example here data = {"Origin": ["DEL", "ABC", "ABC", "ABC", "LHR", "SRE", "RLK", "ZUN"],"Destination": ["LHR", "FDE", "SRE", "FTU", "DEL", "ABC", "ZUN", "RLK"],"ORD": ["DELLHR",...
View ArticlePython Parsing (separate statements and/or blocks) a C# code - regex or...
I need to parsing a C# code. Just separate the statements, considering break lines. Need to ignore comments, multiline comments, verbatim strings and multiline verbating strings.What i try...I read the...
View ArticleSpecify default attribute value in Python class
I would like to construct a class where an initial attribute depends on the result of an external function and gives a default value otherwise. E.g., Puzzle has a default score of the length of the...
View Articlecreate a directory on /etc/samba/ via python
I am trying to create a directory on /etc/samba/ but I have the error:PermissionError: [Errno 13] Permission denied: '/etc/samba/credentials'My function is this:samba_credentials_path =...
View ArticleHow to properly do an options menu in Python
(non native, go easy on my grammar) I'm doing a college exercise in which I must do a ticket vending program. The problem comes up when I sell the ticket and add 1 to the "TypeSold" variable. Depending...
View ArticleWhenever I try to run a python file in VS Code, it gives me the error: zsh:...
I am using the application vs code, and whenever I try to run a python file, it gives me the error:zsh: command not found: pythonI have the python extension and application installed on my computer. I...
View ArticleNo module named _cffi_backend
I have Python 2.6 in my Linux rhel-5. I have installed pip and required CFFI packages. When I try to run a sample CFFI program:ffi = FFI()it says:File "/usr/lib/python2.6/site-packages/cffi/api.py",...
View ArticleWhat is the file extension named '.OEXEL2 ' generated by gstreamer and python...
I'm working on checking if gstreamer pipeline write image to the filesystem.It's working onGstreamer 1.0Linux Ubuntu 22.04 LTSDocker version 25.0.4docker-compose version 1.29.2Python 3.10These...
View ArticleClass accessible by iterator and index
My class implements an iterator so I can do:for i in class():But I want to be able to access the class by index as well:class()[1]How can I do that?
View ArticleHow can I Update the Oracle database using Pandas? I basically wan t to...
quick note (Cx_Oracle is problematic on my laptop)the code I have is as below which works fine in terms of pulling data in:import pandas as pdimport mysql.connectorfrom mysql.connector import...
View ArticleGenerate unique substrings for each string
String Compression - Compress each string to unique substring identifiers. Algorithm takes too long to run.Hello everyone,I am constructing a crosswalk between string identifiers of two datasets. For...
View Articlerotation transform matrix in inverse warping
I'm writing an inverse image-warping function on my own, which takes an image, a transform matrix, and an output size as inputs.Here's how I implement the function:def inverse_warp(image, trans_matrix,...
View ArticleInitialize variable for whole python package
I built a package that contains different modules.Everything works, but i have a problem initializing a variable.In the package,i need an init() function to initialize a variable.How can i make this...
View ArticleSample from each group in polars dataframe?
I'm looking for a function along the lines ofdf.groupby('column').agg(sample(10))so that I can take ten or so randomly-selected elements from each group.This is specifically so I can read in a...
View ArticleI want to split a file in my text file based on arguments I pass. While doing...
I'm reading a text file and splitting the sentence into a list based on arguments I pass. Splitting the data is working file. But at the end I get an empty string. How can I avoid thatdef...
View Article