Questions tagged as 'python'

1
answer

run python on another machine

Is it possible to run a python script on another machine on the network? Example: I use the machine dev01 and I need to execute a script for data collection and data on machine BD03 both machines have python installed and everything correct,...
asked by 10.07.2018 / 01:13
1
answer

How to generate a chart with distinct X and Y with the module matplotlib in Python?

The goal would be to generate a bar chart where the Y axis runs from 0 to 10 (fixed mode), and the user would enter the maximum value of X (the X axis being 1 to the reported value).     
asked by 09.07.2018 / 01:47
1
answer

Python - Strings and files

I'm starting to learn Python files. What suggestions would you give to improve the code and make it prettier or smaller? """ A ACME Inc., uma empresa de 500 funcionários, está tendo problemas de espaço em disco no seu servidor de arquivos. Para...
asked by 19.09.2018 / 23:56
1
answer

Capture images to create a database

import cv2 import numpy as np classificador = cv2.CascadeClassifier("haarcascade_frontalface_default.xml") classificadorOlho = cv2.CascadeClassifier("haarcascade_eye.xml") camera = cv2.VideoCapture(0) amostra=1 numeroAmostra=20 id=input('Digit...
asked by 31.05.2018 / 07:35
1
answer

Doubt with neighboring numbers in Python [closed]

I would like to know if anyone could help me with this code in order to calculate neighbor numbers (common numbers) in two Arrays, but does not return output. i = 0 j = 0 k = 0 input1 = input() input2 = input() input1.split(", ") input2.split(...
asked by 23.05.2018 / 00:16
2
answers

TypeError: a bytes-like object is required, not 'str'

I'm trying to make an existing program work. I have corrected some parts of this program that I believe was developed for Vers. 2.x, but I'm trying to run it in 3.6.5. But I came across a line that I can not evaluate if there is a syntax error o...
asked by 27.05.2018 / 22:59
1
answer

how to make the system call return the inverted string?

print('Listening on {} {}'.format(ip,porta)) (obj, cliente) = server.accept() print('connect received from {}'.format(cliente[0])) while (True): msg = obj.recv(1024) **system('rev')** server.close()     
asked by 28.05.2018 / 01:59
1
answer

I want to convert Timedelta to float

I have a Dataframe in which one of the columns is the time interval in days between searching from one row to another, the data in that column is in the form Timedelta, as in the example: Timedelta ('61 days 00:00:00 ') I need to convert this...
asked by 23.10.2018 / 03:31
1
answer

Image / icone / figure recognition on the computer screen itself in python

I'm starting to study image recognition, I've even messed with OpenCV I've done some basic face recognition tests and some objects that already come in the library, I'd like to capture the screen instead of a webcam to locate something on the sc...
asked by 17.08.2018 / 18:37
1
answer

Convert time to number seconds without decimal part

I'm having trouble rendering the result of a specific time transformation, in the form HH:MM:SS , all in seconds. The result is correct, but with .0 at the end, which makes my response invalid on a site. My code: horario = inpu...
asked by 18.08.2018 / 22:59