Questions tagged as 'python'

1
answer

Why do I rename the folder the files inside it change?

I am using lubuntu 17 and had a folder called images with some files of there were trying to rename these files with this program in python: import os import re def repl(match): dic = {"4": "0", "5": "1", "6": "2", "7": "3", "Q": "4",...
asked by 17.01.2018 / 17:09
0
answers

Convert HTML to PDF and insert Image with Django

The image does not appear in PDF, I use xhtml2pdf. reports / sol_acesso.html <img src="{% static 'img/small_logo.png' %}" alt="Blue Tech" style="max-width:200px; margin-top:10px"> view.py ' def get(self, request, pk, model):...
asked by 11.01.2018 / 17:43
1
answer

Input in lists

I have to receive input (10 integers) from the user and put them in a list but not allow repeated numbers to be entered. I tried but the program if you see that the numbers are repeated does not enter any number v = [ ] for i in range(0,10):...
asked by 08.01.2018 / 19:56
1
answer

Kivy does not run text editor error

Hello I just installed kivy on windows following the step-by-step instructions on kivy.org. When I try to run a test script, I get a message in the pycharm console that the execution was aborted: "Unable to get a Text provider, abort." All...
asked by 09.01.2018 / 21:58
0
answers

How do I put a female voice in pocketsphinx?

I'm creating a virtual assistant and it initially has a robotic voice because I use speech_recognition and I use recognize_google to read the conversation list I've also created a method of synthesizing voice-over with pocketsphinx, but both (re...
asked by 14.01.2018 / 20:09
1
answer

Remove repeated integers list in Python

I would like to remove repeated integers from a list and return a new list. lista = [1, 2, 3, 3, 3, 4, 5, 6, 6, 7, 8] The result would have to be this: [1, 2, 3, 4, 5, 6, 7, 8]     
asked by 11.01.2018 / 18:41
1
answer

Pick up data in pairs in lines in sequence

I'm reading a csv worksheet with pandas through pd.read_csv() . The worksheet contains vehicle location data at any time. For example:    Location 1: Latitude a, Longitude a   Location 2: Latitude b, Longitude b   Loca...
asked by 11.01.2018 / 15:19
1
answer

Python pandas formatting

import numpy as np import pandas as pd ID = [i for i in range(1,101)] def tabela(imc): if imc < 18.5: return 'Abaixo do peso' elif imc < 25 and imc >= 18.5: return 'Saudável' elif imc < 30 and imc >= 25:...
asked by 09.01.2018 / 02:52
3
answers

How to receive a vector whose values are separated by spaces

I'm starting in python and I use a site that has several problems for resolution, in it the vectors and arrays are passed with values separated by a space and not comma. For example: v = 1 2 3 43. I know I can get this value in the input and...
asked by 28.07.2014 / 15:37
1
answer

Could anyone help me identify the error? 1179 Vector Filling IV -URI

Sofolks,I'mstudyingPythonduringcollegeholidaysandIcameacrossthisprobleminURI. I'm still a beginner in language, and programming in general. Could someone tell me why the platform does not accept my code? I tried to follow everything exactl...
asked by 24.12.2017 / 06:34