Questions tagged as 'python'

1
answer

Cron job that runs a bash script (which runs a script in python) behaving differently than when executed manually

Hi .. I have a python script that plots two different graphs and that needs to be run daily to update these graphs on a website The data that is used by this script, is in a certain directory in HDF format I created a Bash script that copi...
asked by 15.12.2017 / 13:49
1
answer

Read data from a SQLite 3 database in Python

I'm starting in Python and database and I've had three doubts! For example, inside my database I have a "name" column. Just to illustrate, let's say I want to get the contents of the "name" column corresponding to id = 1 and play on a Pytho...
asked by 15.12.2017 / 03:40
1
answer

search script - python

The problem is that I can not separate arquivo_novo from /root/arquivo_novo , as indicated below. I just need the "new_file" to be able to get into the LOOP IF and the system returns /root/arquivo_novo and never enters the...
asked by 13.12.2017 / 16:41
1
answer

How do I register multiple records

I want to make several contact records, I wanted them to be more dynamic, for example, the person has a number of phones or cell phones or email's and while on the site, he can click on a sum sign and the page presents new boxes to enter this da...
asked by 31.12.2017 / 03:42
2
answers

Display items from a list in django html

My code is as follows: {% for item in saldo %} {{item}} {% endfor %} And I would like to present the numbers (in the image), each in each line. Does anyone know how? I tried to make a "for" inside the post but it does not work.     
asked by 02.01.2018 / 15:35
1
answer

How to transform a numpy.array of size 497305 into a smaller one of 4999 without adding new elements in the calculation?

I am analyzing an audio and my ML model of scikit learn generates an array of probabilities that a certain element in the array corresponds to an "A" category used to train the model. Each element of the array corresponds to a probability of...
asked by 11.12.2017 / 19:48
1
answer

Characters being repeated in String discovery [Python]

The purpose here is to find out the passwords, in the same trial and error, and it's all going well while the letters, but when they arrive in the numbers, they repeat for a reason that I do not really understand . If someone can find the erro...
asked by 23.12.2017 / 20:12
1
answer

Create condition with date in UNIX format Timestamp - Django

I have a table in the database that the date fields are of type BigInteger, in which it receives a date in the format Timestamp. How do I make a SELECT in the table with the following conditions: SELECT COUNT(log.id) AS QTD FROM...
asked by 05.01.2018 / 18:25
2
answers

How to convert a string to this encoding?

I'm trying to convert text into a binary language, but it still leaves letters in the result, I would like a text to be created according to the number that each letter received: a = 10000 c = 10011 d = 10000 e = 10000 f = 10000 g = 10000 h =...
asked by 06.01.2018 / 19:17
0
answers

Check neighbor in an array

I have the following problem: I have a large array [10x10 for example] It has values from 1 to 9. I should check if a vector [1, 2, 3, 4, 5] (for example) is contained in this array. When I find the first number of the vector inside the ar...
asked by 08.12.2017 / 03:10