Quantcast
Browsing all 14126 articles
Browse latest View live

How to split a DataFrame into separate groups based on a Value(Difference...

I'm now using Pandas in Python to handle some data.Simplified DataFrame is[ID, TimeDiff] and some other not-important columns.For example:73 1.16666774 1.16666775 2.18333376 3.46666777 2.66666778...

View Article


LZMA Decompress - about LZMA properties

I'm writing code for parsing files compressed with the LZMA algorithm.import lzmaimport structfrom bitio import bit_opendef main(file): f = bit_open(file,'r') magic = f.ReadString(8) # 8 Bytes version...

View Article


Training set not showing in matplotlib

For some reason my training set is not showing as a matplotlib graph, I am using the torchvision dataset MNIST. Sorry if my code is not the most efficient, just starting pytorch.The code is running...

View Article

Python One Page Report Based on Output of Function

I am trying to prepare a report using Python. So the first function produces some output and next, I run function 2 and get an output, at the end, I need all output one below the other saved in .pdf or...

View Article

Find and select element in QTreewidget in PyQT6

How to select this element in Qtreewidget using the path to an element?The path is written as an example string: parent/parent/parent/parent/elementIt is important to search for elements along the...

View Article


Detectron 2 ViTDet custom data set registration

I'm currently exploring the ViTDet model in Detectron2 projects and I'm trying to run it on my custom dataset in COCO format. There is an official instruction for using custom dataset but it seems to...

View Article

error while install dlib on cmd, could not build wheels for dlib

im getting this error while trying o install dlib on cmdi already install cmake version 3.26.1visual studion python version is 3.10pip install dliband the resultsCollecting dlib Using cached...

View Article

Image may be NSFW.
Clik here to view.

Shift in 2Dimage when converting from lidar point cloud to 2d Image

I am mapping a lidar point cloud to 2d image. I have successfully mapped the point cloud to 2d image but there is a shift of 0.5 meter to 1meter in the 2d image from the lidar point cloud when...

View Article


What is the difference between WindowResized, WindowSizeChanged, and...

I'd like to scale my sprites when the window gets larger or smaller, I'm not sure which event to watch for in my game loop.According to the pygame docs:VIDEORESIZE:Description: sent when the user...

View Article


Why does ' from fileName import * 'not work

so I have two files: main.py and settings.pyI am trying to import everything from settings.py into main.py using from settings import *It just returns this error:Traceback (most recent call last): File...

View Article

using selenium to interact with popup print dialogue box not working

I am trying to interact(set options like page size etc) on a print dialogue box that pops up after hitting a print button on a webpage. My attempt at the code is :win_before =...

View Article

Save video to Torch tensor

I have a long video (~20.000 frames) of resolution 480x854. I want to save this whole video to a torch.tensor (maybe .pt file). However, my RAM is not enough to load the whole video at once. Is there a...

View Article

Using findAll two times BeautifulSoup

I'm scraping this webpage with some tables. I want to 'build' two lists and the site have the class 'txt' for two datatypes. I need to extract those datatypes separately, so I'm tryng to "filter" the...

View Article


Excel VB Event RefreshAll is not getting called when sheet is modified using...

data sheetdata sheetdata sheet is tied with below VB scriptVB CodeSheet1 sheet which has pivot tableSheet1 sheettxt_excel.txttxt_excel.txt fileI'm trying to update the cell values in my data sheet...

View Article

Image may be NSFW.
Clik here to view.

Computer vision question relating harris corner detector; not detecting...

Input image:Code used:import cv2import numpy as npfrom google.colab.patches import cv2_imshow# Read the image and convert to grayscaleimage = cv2.imread('input.png')gray_image = cv2.cvtColor(image,...

View Article


Filter lines based on specific event and create a dictionary

I have a log file which contains timestamps and events Mon Jan 15 22:16:46 PST 2024 /vol/vol1 Sorting file records (120 entries) Mon Jan 15 22:16:46 PST 2024 /vol/vol2 Sorting file records (120...

View Article

Add text into rectangle into Canvas?

How do I create text in a rectangle in Tkinter Canvas?Because, all what I can do is create 2 separate objects.I have tried doing this:rect = canvas.create_rectangle(0,0,100,100,fill="orange")text =...

View Article


I can’t decide which programming language to choose for robotics: python or...

what to study for robotics python or C++ what do you recommend and why ?

View Article

Can't extract the data from .pdf with Regex

"Certificate no. 2334"I want to extract the number "2334" string above.But I am failed again and again.my code :Certificate_pattern = re.compile(r'Certificate no\.\s+(\d+)')It would be nice to know If...

View Article

Using Geopy to place (tkintermapview) Markers on Addresses that are pulled...

I am attempting to get Addresses from a Spreadsheet..Convert those Addresses to Latitude and Longitude..Then Add Markers to those Coordinates on a TkinterMapView Map.I used openpyxl to make a...

View Article
Browsing all 14126 articles
Browse latest View live