Questions tagged as 'python-3.x'

2
answers

Get value from a list

I need to get the second value from this list ['connections-wfs', 'Prueba', 'url=https://test.com/ows/wfs\n'] The data is not always the same but if you always have the same number of values, in this example it would be    'Test'     
asked by 15.08.2018 / 13:24
2
answers

Generate a string of random numbers with a specific length

I wanted to know how I could create a string of random numbers by entering the length that the string should have. For example, that the program generates a list between 1 and 9 and has a length of 3 characters. Thanks     
asked by 31.05.2018 / 12:33
2
answers

Is there a way to create a list for each item in another list?

Suppose I have a list like this: l=[20,30,40] How do I create 3 lists like this: l1=[2,0] l2=[3,0] l3=[4,0] PS: I came up with this question to find how to multiply each digit of a number in a list. For example, from the list [22,23,24...
asked by 24.05.2018 / 04:22
1
answer

Add values from a list to a python dictionary

I'm making a code which has a list list which contains a name and an integer (which is your age) and I want you to add to your 'category' from your age if we could call you from That way, this is my code: listP = [['john', 20], ['alberto', 20]...
asked by 31.03.2018 / 04:28
2
answers

Count the words repeated in a dictionary in Python

I would like to count all the repeated words in this dictionary and group them in another dictionary. data = [{'text': 'Real Madrid', 'type': 'ORG'}, {'text': 'España', 'type': 'LOC'}, {'text': 'Real Madrid TV', 'type': 'MISC'}, {'text': 'Espa...
asked by 11.08.2018 / 00:27
1
answer

Totalize columns in single row with Postgresql

I do not understand why it is so difficult to find Documentation and advice to total or add columns in a single row with Postgresql, as it is done in excel:    I have tried with CUBE, ROLLUP and CROSSTAB, but I can not finish it.   I ap...
asked by 05.04.2018 / 18:52
1
answer

specgram in mainwindow

I am generating an audio spectrum analyzer .. I have already managed to generate the analyzer with certain features that I need, however, I can not make the resulting graphic representation appear in the main window, or that the background co...
asked by 25.03.2018 / 06:27
1
answer

You can not train a Rasa model using spacy

I tried to create my first chatbot on my own with the help of Rasa and this tutorial . p> He proposes to use Spacy , a library for advanced processing of natural language in Python mike@mike-thinks:~/Programing/Rasa_tutorial/rasa_nlu$ pyt...
asked by 11.05.2018 / 01:19
1
answer

Is it possible to do a delay in python without stopping the program?

Hello today I asked myself if it would be possible to do a delay in the background or something so that the program does not stop. Is it possible? I would like to have a rectangle moved to a position x every 2 seconds and after another 2 seco...
asked by 02.03.2018 / 22:56
1
answer

Encrypt text string with SHA1

I have the following code in Java: import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Base64; public class EnconderPass { public static void main(S...
asked by 23.07.2017 / 23:43