Questions tagged as 'python'

1
answer

Python problem

Hello, I got this problem to solve in python but I do not know much about the language, I know C, but I believe that my problem is reading the problem, I received the program without any explanation and maybe someone can help me. #!/bin...
asked by 28.07.2014 / 17:06
1
answer

Read more than one tab on file

My code runs through all the cells in my worksheet and returns all the values I need, and in this file.xls has only one tab. Now I have a new file to go through and there are 8 tabs. I know I need to boot with: workbook_r = open_workbook('a...
asked by 18.09.2014 / 15:00
2
answers

How to get the IP address from the XML output of nmap with a specific "vendor" using ElementTree in Python

Using the nmap XML output for reachable virtual machines running on the same host machine - obtained with nmap -oX output.xml -sP 192.168.2.* , I'd like to get the IP address of each machine whose "vendor" attribute is QEMU Virtual NI...
asked by 10.03.2014 / 22:34
1
answer

Indent error

I'm trying to create a TextInput in Kivy and set its dimensions, except that whenever it puts its error dimensions:    invalid indentation, must be a multiple of 4 spaces. I still do not understand why you are giving this error....
asked by 20.12.2018 / 19:06
1
answer

How to keep the window created by open PyQT5?

After a long study of the object orientation part, I started to study PyQT5. I was doubtful in the following code: class App(QWidget): def __init__(self): super().__init__() self.title='Hello, world!' self.left=10...
asked by 26.12.2018 / 10:57
1
answer

How to obtain the size means of a grouping with Pandas?

Given a Pandas #, with data in a structure of this type: import pandas as pd raw_data = { 'tipo': ['a', 'a', 'b', 'c', 'c', 'c', 'd'], 'ano': [2000, 2000, 2000, 2001, 2001, 2001, 2001], } df = pd.DataFrame.from_dict(raw_data)...
asked by 30.04.2014 / 15:07
1
answer

Pixel size of a String in Python

I would like to know how to make a Python code that checks the size of a string (in pixels). Assuming we have a string 'ALCON BOTTON FISH 50G' I would like to know what its pixel size is to center on a square I am plotting with reportlab (I a...
asked by 03.12.2018 / 20:47
1
answer

Pass descriptor by parameter to another descriptor

Let's say that in a class I have two descriptor properties. The first one ensures that the property in question is either negative the second must ensure that the property associated with it will not be greater than the previous property. For...
asked by 31.12.2018 / 15:14
1
answer

How to reduce the execution time of a program in python?

I've been trying to solve a scheduling problem for a couple of days that involves searching to find the union and the intersection between sets. I have managed to solve the problem with small sets, but when the set starts getting very large,...
asked by 27.12.2018 / 14:47
1
answer

Doubt python creation of model machine learning

I have a question about creating my machine learning model. I want to create a template that expects the PSS_Stress columns = "ExamID;FinalGrade;PSS_Stress;StudyID;TotalQuestions;avg_durationperquestion;avg_tbd;decision_time_efficiency;...
asked by 30.11.2018 / 16:41