Questions tagged as 'python'

1
answer

Sorting a second list according to the sorting of the first list

I have the following (silly example): lista=[[3,6,4,2,7],[8,4,6,4,3]] I want to put lista[0] in ascending order, modifying lista[1] according to lista[0] . To illustrate what I want below: lista_ordenada=[[2,3,4,6,7],[...
asked by 02.10.2015 / 21:51
1
answer

How to specify values for my x axis using matplotlib.pyplot?

I am not able to specify values on my x axis, using matplotlib.pyplot. In some images, chart.xticks(years) solves the problem, but it seems that when the x-axis value set is too small, it uses default values [0,1,2, ..., N] A case th...
asked by 21.03.2016 / 03:07
1
answer

Problem unpacking file

I have a zip that, inside it there are several files to be unzipped. So long, I'm using the following method to decipher the same:? with closing(z), zipfile.ZipFile(io.BytesIO(z.content)) as myzip: myzip.extractall(local_path)...
asked by 16.03.2017 / 21:46
1
answer

Django - Getting form information

I have a template called listaarquivos.html where a table with information about an object of models.py called JOB appears. However, I now need to filter this table by date. I then inserted two inputs into listaarquivo...
asked by 24.10.2015 / 21:51
2
answers

How to create a counter in face detection?

As you can see in the code below, it only detects the faces with haar cascade, I would like to know how I can display the number of people currently detected on the webcam. from __future__ import print_function #importa a funcao da biblioteca...
asked by 03.06.2018 / 18:22
1
answer

Custom Line Graph - any tool

I need to create a line chart (python, R or even excel), where each row is a category of products, the y-axis is the sale, and x is the time. If the sale is above the goal, the line is one color, if it is below, another color. It would be a way...
asked by 08.06.2018 / 16:37
1
answer

Multiple Users and Authentication - Django

I'm developing a project in Django that has two types of users: Client and Accountant. Each one is authentic and has keys that identify them differently. The Client has as primary key his CNPJ. The accountant has as key the composition of his CR...
asked by 18.06.2018 / 02:49
1
answer

Generate output in csv from a code in python

I hope you can help. I'm new to python and my question is this. I created a regex that extracts from a file in csv the parts of the text that I want. But I want to save the output of this function in csv to compare with the start tabl...
asked by 17.10.2016 / 14:43
3
answers

How to start a Django project using virtualenv?

I have already tried and found different ways and different conventions for creating a project in Django using virtual environment (virtualenv). Is there any standard for this? Does anyone help me with a correct step by step? Using python 2.7...
asked by 15.09.2015 / 04:23
1
answer

Queryset in django without case-sensitive

I have a question about Querysets in Django. I need to do a search on a field that is a Charfield, but the search I'm doing appears to be case sensitive. And I wanted that when looking for 'Stack' the search would return a field that is 'stac...
asked by 29.05.2015 / 03:17