Questions tagged as 'python'

1
answer

Alignment with string.format and unicode

I'm having trouble aligning strings when using .format() , for example when doing: >>> print '{:>6}'.format('agua'} agua >>> print '{:>6}'.format('água'} água Note that the first format comes out as expec...
asked by 21.09.2016 / 16:55
2
answers

Conflict between Jinja and Handlebars

How do I resolve a conflict between Handlebars and Jinja, since the syntax of both are similar?     
asked by 26.11.2015 / 20:07
1
answer

Unexpected Error using the parse_args () function of the ArgumentParser object in Python

In a simple code I'm doing in Python, I get the exception below, when I call the function parser_args() on the object of type ArgumentParser : Unexpected error: (<type 'exceptions.SystemExit'>, SystemExit(0,), <traceback...
asked by 17.11.2015 / 22:04
1
answer

How to extract LinkedIn data with python?

Everyone, good? So I need to extract some information for a research I do at university and I need to extract some data from LinkedIn pages, I was extracting with python using regular expressions, but to extract some things it was very difficult...
asked by 24.09.2015 / 00:26
1
answer

Probabilistic Considerations on the Calculation of Shannon's Entropy in a Network Traffic

Probabilistic Considerations for Computation of Shannon Entropy in Network Traffic I have a dump file (CAP format) of a network traffic capture made with Debian tcpdump. Until a certain time, it is attack-free traffic. Then a series of TCP SY...
asked by 23.09.2017 / 22:26
1
answer

Which modules should I use to parse data from a file in Python?

I have a list of git repositories addresses sorted according to the location of your hosting. @GitHub ('@' demonstra que a linha representa um local de hospedagem) url do repositório a (repositório a ser baixado) url do repositório b (reposi...
asked by 26.10.2015 / 16:58
2
answers

Graph possible paths python

I have a dictionary, where the key is a vertex and the value is a list of vertices adjacent to the vertex (key). dic = {'A':['B,'C'],'B':['A','C','D'],'C':['A','B','D'],'D':['B','C']} What I want is an array of all possible paths (from one...
asked by 05.06.2015 / 01:57
1
answer

How can I use Firebase as a database in a Django application?

I just created a Django project and would like to use Firebase instead of sqlite as a database. I searched in several places but could not find anywhere how to do the integration. Could someone help me?     
asked by 07.12.2017 / 15:11
2
answers

Draw a rectangle using repetition structures in Python

I have to solve the following Python activity: I need to write a program that prints a rectangle with full borders and half open: >>> digite a largura: 10 >>> digite a altura: 3 ########## # # ########## But my p...
asked by 20.04.2017 / 23:40
2
answers

How to calculate an optimal value for the Scrapyd variable CONCURRENT_REQUESTS?

One of the settings that comes standard with Scrapyd is the number of concurrent processes (it is 16). CONCURRENT_REQUESTS = 16 What would be the best methodology to calculate an optimal value for this variable? The goal is to get the b...
asked by 09.01.2015 / 21:01