Quantcast
Browsing all 13981 articles
Browse latest View live

How to do inference with YOLOv5 and ONNX

I've trained a YOLOv5 model and it works well on new images with yolo detect.pyI've exported the model to ONNX and now i'm trying to load the ONNX model and do inference on a new image. My code works...

View Article


Get local time zone name on Windows (Python 3.9 zoneinfo)

Checking out the zoneinfo module in Python 3.9, I was wondering if it also offers a convenient option to retrieve the local time zone (OS setting) on Windows.On GNU/Linux, you can dofrom datetime...

View Article


AES simple encryption in node and decryption in python

NODE EnvironmentI generate secretKey in nodejs as below,const generateAesKey = () => { const { randomBytes } = require('node:crypto'); randomBytes(32, (err, buf) => { if (err) throw err; return...

View Article

How to select a cell that contains certain string and number?

so I have a dataframe that includes strings, ints and floats. To sum up, it looks something like this:DateCol 1Col 2Col 3Col 3Col 4Col 5Col 609/2023181.7017.70 / 22.2214.40109.00NaN60 /...

View Article

Getting "TypeError: float() argument must be a string or a number, not...

I am currently building an API using FastAPI to deploy my logistic regression model. For some reason, I am getting the above error in the server docs when I test the model.My code below:app =...

View Article


Can't import module from local folder? "No module named"

I don't find the mistake in the code nor in the call when trying an import test.My directory structure is the following: (from /home/user1/python_test/)main.pyAux/lib1.pyAux/__init__.pymain.py:from...

View Article

Python transpose dictionary

I havedata_dict = {1: {'One': 110, 'Two': 210, 'three': 310}, 2: {'One': 120, 'Two': 220, 'three': 320}, 3: {'One': 130, 'Two': 230, 'three': 330}}need to print as CSV in this...

View Article

Why I am keep getting list index out of range error

cap = cv2.VideoCapture("../Videos/3 way traffic.mp4") # For Videomodel = YOLO("../Yolo-Weights/yolov8l.pt")classNames = ["person", "bicycle", "car", "motorbike", "aeroplane", "bus", "train",...

View Article


TypeError: only size-1 arrays can be converted to Python scalars (tflite model)

I try to run an tflite-model but always get this error:Traceback (most recent call last):File "label_image.py", line 133, in print('{:08.6f}: {}'.format(float(results[i]), labels[i]))TypeError: only...

View Article


Timeout error when connecting a client to a server running on a different...

I'm new to Networks and socket programming and require help please. I'm following a youtube tutorial and when running the client.py and server.py scripts on my machine, everything works according to...

View Article

Concat the data frames correctly [closed]

How do I concat train and test data if on the test one column is not present but I still want to keep that column present since my code doesnt worktest_df['sales'] = float('nan')combined_df =...

View Article

All thread receive same results from function

Imagine you want to broadcast the data generate with a generator. There are so many consumer which receive the data and consume it. Generator will generate the data regarding if there is any consumer...

View Article

How to skip the headers when processing a csv file using Python?

I am using below referred code to edit a csv using Python. Functions called in the code form upper part of the code. Problem: I want the below referred code to start editing the csv from 2nd row, I...

View Article


ModuleNotFoundError: No module named 'camelot'

I want to extract tables from pdf and for thatI used Camelot. But I'm getting this error whenever I try to import it: import camelot Traceback (most recent call last): File...

View Article

How to find the size of a deep learning model?

I am working with different quantized implementations of the same model, the main difference being the precision of the weights, biases, and activations. So I'd like to know how I can find the...

View Article


How to efficiently standardize data in relation to preceding entries

I am trying to write a python script to standardize a big set of data (>10000 entries) in range of -1 to 1 in relation to preceding entries.What I'm currently doing is iterating through the set and...

View Article

Exceeding Rate Limit - Error 429 - Spotify API

I'm trying to pull audio features from spotify's API. I have a dataset with about 280,000 songs that don't contain the audio features I want so I'm pulling the track ID from each song on my dataset and...

View Article


Antlr4 python runtime error after generating from grammar

I using the following Antlr4 PLSQL grammar files:https://github.com/antlr/grammars-v4/tree/master/sql/plsql.From here I downloaded as follows:wget...

View Article

Python best practices to where do I have install Python and its modules

I am newer coder (if I can call myself like that)I am having certain problems when run my python code. As you can see in the following information looks like I have installed several versions of python...

View Article

Is it possible to write self referencing column in pyspark

I'm writing small poc trying to rewrite piece of logic written in python to pyspark, where im processing logs stored in sqlite one by one:logs = [...]processed_logs = []previous_log =...

View Article
Browsing all 13981 articles
Browse latest View live


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