Questions tagged as 'python'

1
answer

Serial Communication and Array Division with Virgula

Hello, Good night, today I came up with another problem, reading data generated by arduino sensors, I was able to print them and save them in an array, but to really be good, I need to break the two separate columns, as in the example 292.00,2...
asked by 24.03.2018 / 03:03
1
answer

Infinite wait for server response using sockets in python

I'm trying to send a message to the API of a server in order to get a response. I'm using the following code: import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_address = ('h68.p.ctrader.com',5211) sock.connect(serve...
asked by 24.03.2018 / 02:35
1
answer

Copy entire directory with python

Hello, I would like to copy an entire directory using python, since I have a site database ready and every time I create a new project I have to keep moving the files to a new folder. I would like to do this, without moving those files but rather...
asked by 26.03.2018 / 16:35
1
answer

Use return of a method in another method of the same class

I'm working with the The Guardian API, using two methods, search_content() and data_to_csv() , contained in the The Guardian class. The first method is responsible for searching the Guardian database according to the parameters prov...
asked by 26.03.2018 / 21:17
1
answer

Joining twodata frames by the axes

I am a beginner in the study of programming and I have a question: I need to merge two dataframes into the date column. A data frame shows information about a company that rents bikes and other weather information for the day. The company...
asked by 24.04.2018 / 02:05
2
answers

Python - Find Odd Tuple

I'm new to this area and recently, for a college job I could not turn that line of code into a tuple. function code: def encontra_impares(lista): lis = [] if len(lista) > 0: numero = lista.pop(0) if numero % 2 !=...
asked by 12.05.2018 / 19:44
1
answer

Problems setting up views using django

I'm studying django and I'm having problems in the following part {'posts': posts} I'm using as ide pycharm and it shows error but for me the syntax of the code is correct. from django.shortcuts import render from django.utils import timezone f...
asked by 12.05.2018 / 01:36
2
answers

2 commands on the same line python [closed]

I would like to know how I can resolve this. input('Acabei de encontrar a receita ') print('voce vai precisar dos seguindos ingredientes') num1 = int('6') print(num1) print('Kg de Farinha') num2 = int('3') print(num2) input('Unidades de ovos')...
asked by 07.05.2018 / 22:43
1
answer

Iteration with variable of type 'TIME'

I'm doing a project in which I need to make a loop that increases minute by minute of a variable from two times. I thought of logic in the following way: vHoraInicial = '13:30' vHoraFinal = '15:00' While vHoraInicial <= vHoraFinal:...
asked by 08.05.2018 / 17:35
1
answer

How to configure Portuguese in kivy? [closed]

My App has two files, * .py and * .kv, but I'm having problems with accents in my GUI. I have already tried to resolve it in the .py file with    #encoding: -*- utf-8 -*- But the problem continues, please help me. Settings: Python...
asked by 08.03.2018 / 21:47