Questions tagged as 'python'

1
answer

Error in creating Python object

class Linha(object): def __init__(self, x, y): self.x = x self.y = y @property def x(self): return self._x @x.setter def x(self, valor): valor = int(valor) if valor >= 0:...
asked by 12.11.2017 / 19:04
2
answers

Save data inside a vector with loop in Python

Good afternoon guys. I have been learning a lot C and C ++, and the part also python. It confuses me a lot of syntaxes at times, because I often think of C and get confused in python. In the case of the python loop, I would like to store data wi...
asked by 01.07.2017 / 17:52
2
answers

Django collectstatic does not update modified files in s3

I'm using Django 1.10.6 , followed this tutorial to set up media and staticfiles on s3 and when squeeze collectstatic , files are not updated. p>     
asked by 16.05.2017 / 17:56
1
answer

Executing external programs with Python

I would like to reduce the size of several Mp3 files in a directory with: ffmpeg -i k.mp3 -acodec libmp3lame -ac 2 -ab 16k -ar 44100 k_.mp3 where K is the name of Mp3 (k from 1 to 8): Itriedthefollowingcode:importsubprocessforxinrange(1...
asked by 14.05.2017 / 00:43
2
answers

Add the results of for x in range

k=5 for k in range (5,10): print(2*k**2) 50 72 98 128 162 I need to add these results.     
asked by 08.05.2017 / 02:28
1
answer

Machine learning with one language on the server and another language on the desktop [closed]

Can I use Python, for machine learning and C ++ for a desktop program? The machine learning is done on the server, correct?     
asked by 06.10.2017 / 13:16
1
answer

Python file transfer, client-server

I have a problem with my code, I need to develop an application that is able to send a file to a server and also can recover files from the server I am using a tuple to send the data to the server nome = input('Digite o nome do arquivo a ser e...
asked by 06.04.2017 / 20:05
2
answers

How to convert a date to timestamp in python?

I have a certain date on a variable in this d/m/Y format. See: strDate = "29/03/2017" How to convert this date to timestamp in Python?     
asked by 29.03.2017 / 17:37
2
answers

recursion to find odd numbers in a python list

I would like to know how to use recursion in Python to do a function that traverses all oddities in a list and append them to a new list Tested the code to get a null output. I ran the debugger and still could not find the reason. It stopped...
asked by 17.07.2017 / 20:25
2
answers

Organize data flow by string pattern

Friends, I'm working on a scraping project. At some point, I get a table on the screen in the form of a giant string, something like this: list = ('0004434-48.2010 \ n UNION \ n (30 business days) 07/07/2017 \ n 13/07/2017 \ n 0008767-77.2013...
asked by 17.07.2017 / 18:16