Quantcast
Channel: Active questions tagged python - Stack Overflow
Browsing all 13921 articles
Browse latest View live
ā†§

Log all data passing on socket

How am I able to log all of the data passing on a Python socket?For audit, security and debugging purposes I've attempted creating a few wrappers around the socket object. They log all of the data...

View Article


SuperposiciĆ³n de ventanas al crear switch en Tkinter Python [closed]

I am new to programming. I have a small interface that is giving me problems, I am trying to create a switch style to be able to access a frame, when running main_screen.py it appears at the top of...

View Article


K means loop doesn't work for the image clustering

I am using the code in Study 2A in this link (https://github.com/yilangpeng/image-clustering/tree/main/study2A). In the D kmeans clustering, I met some problems because I need assign every label from k...

View Article

The variable is returning empty in my Python script

I am working on a Python script and using GCP Cloud Build to run it. Instead of hardcoding some of the variables, I am trying to use a Cloud Build YAML file to define the variables there and then use...

View Article

How to generate a .dat file for verilator_coverage?

I've started to familiarize myself with cocotb and I'm having trouble.I wrote a simple test like this:@cocotb.test()async def add_test(dut): dut._log.info("Running add test!") c = Clock(dut.clk, 10,...

View Article


Image may be NSFW.
Clik here to view.

Coding a Triple Elimination Tournament Bracket from scratch in Python....

As the title states, I have triple elimination tournament brackets that I am trying to move to Python to run events in live time. Below is an image of what the 16 person bracket would look like.Edit:I...

View Article

Is there a better way to use multiprocessing within a loop?

I'm quite new to using multiprocessing and I'm trying to figure out if there is a better way to use multiprocessing when it has to be within a loop. Or at least I think it has to be within a loop. Let...

View Article

How to get all the items in a dictionary from a function

The function below returns the contents of the dictionary. Aside from returning the content of the dictionary, how to get all the names of the dict inside the function?def get_ext(file_type): xsds =...

View Article


I implemented an OCR program using python in Godot but it doesn't work when...

I implemented an OCR program using python in Godot but it doesn't work when exported. I created the python scripts in a virtual environment inside the Godot project folder. I exported the file for...

View Article


Rolling sum within 30 non-datetime days

I've been racking my brain trying to figure out the best way to do this. I want to find the rolling sum of the previous 30 days but my 'day' column is not in datetime format.Sample datadf =...

View Article

How do I set up pytest parameters for multiple functions at once?

I have the following example unit test set up. There are several classes with their own fixtures. I am showing the 5th class here:import pytestclass TestOperator1:....class TestOperator5:...

View Article

How can i delete message that channel name was changed using telebot?

I wrote a bot that change name of the telegram channel every N minutesBut, when name of the channel is changed telegram automaticly send message, that channel name has been changedi tried...

View Article

Selenium syntax difference on different resources - Why is this

I have been working with selenium and consulting different helping resources for error solving. I have seen that sometimes, there is a slight difference in the syntax of the locators used.This is what...

View Article


How to use memory allocated by C malloc in Python (ctypes)

I guessed the following code should work, but it does not. Could someone explain to me how to use this kind of pointer?Of course, this is only a sample code. What I need to solve is to use a pointer...

View Article

Paramiko hangs during connect()

I'm trying to use paramiko to upload files to a remote EC2 server.My app.py which primarily handles my tkinter GUI imports a custom lib.file_handler module that handles some functionality. That...

View Article


How to identify the root from hierarchical data structure using Pandas

I have a dataframe with the following columns: Parent, Parent_Rev, Child, ChildRev. In this structure, Parent serves as a parent node, while Child functions as a child node. Both Parent_Rev and...

View Article

ModuleNotFoundError: No module named 'sklearn.ensemble._gb_losses'

i have install the scikit_learn and tried to install multiple version but not able to downloadnot able to find answer for sklearn.ensemble._gb_lossesfrom flask import Flask, render_template,...

View Article


Image may be NSFW.
Clik here to view.

Qt GUI clickable Qframe or QWidget or Groupbox

I have a problem with my code :/My program needs to click a QFrame, QWidget or QGroupBox.At the moment I use mouseReleaseEvent but it only works when my function doesn't have values set.def...

View Article

How to completely uninstall miniconda3, I cannot locate it

I have no clue how this got installed on my Ubuntu 20.04 and its like a virus.| 0 N/A N/A 440229 C ...iniconda3/envs/siammask/bin/python3 1614MiB || 0 N/A N/A 440230 C...

View Article

Detecting collision in Python turtle game

I am trying to make a Python game where the red turtle chases the blue turtle. When the red turtle catches the blue turtle, I want it to say 'COLLISION' on the screen but it is not working. When it...

View Article
Browsing all 13921 articles
Browse latest View live


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