Questions tagged as 'python'

1
answer

Pythonanywhere: images with correct path do not load

I have a small application in Flask that uploads images with its description. The image is saved in a specific directory and the path is saved in a sqlite database next to the description. They are displayed in an html template. When loading...
asked by 17.07.2017 / 21:11
0
answers

How to install and use PyQt5 in Windows? (configure.py, Error)

I want to use the PyQt5 in Windows, I was searching and found a .zip file from the official PyQt page, which tells me how to install the file configure.py in Windows, but when executing the file I get the following error:    Error:...
asked by 30.06.2017 / 20:55
1
answer

How to respond with a status = 200 to a HTTPS POST in python

I am creating an application in Flask that receives an HTTPS POST message and processes the data it contains. Once I have received the HTTPS message, I have to answer the server with a code = 200 so that it knows that I have received the mess...
asked by 04.06.2017 / 17:09
2
answers

I want to modify a matrix but I can not

I want to modify the matrix created in arr per column (the one that the user wants) and per row (the one that the user wants) entering the value he wants: from numpy import * arr = zeros((2,2)) for j in arr: for k in j: k = 5 print...
asked by 26.05.2017 / 04:58
1
answer

How to get support in sklearn.metrics.classification_report

I am using sklearn.metrics.classification_report and I would like to isolate the support values to work with them separately, but I do not know how to extract them. I made the call with print(classification_report(y_true, y_pred...
asked by 23.05.2017 / 22:56
1
answer

How to load MySQL info in Tkinter Entries by double-clicking the Listbox element consisting of two columns

In this GUI there are some Entries that what they do is allow to enter information to be stored in a MySQL database. The Listbox basically displays one of the fields in the database (the name), which in fact is one of the Entry. In additio...
asked by 25.05.2017 / 00:05
1
answer

Python does not update the value of the database with PyMySQL

Code : import discord import asyncio from PyMySQL import pymysql # Código sin importancia if message.content.startswith('!points'): clist = message.content.split(' ') if len(clist) > 1: # Código sin importancia else:...
asked by 30.08.2017 / 19:11
0
answers

How to use word truncatewords in django?

I have the following code that cuts out the words but, I can not show the content that was already clipped Code where I use the truncateword <td class=" "><h5>{{ correspondencia.referencia| truncatewords:"4" }}</h5><a...
asked by 28.07.2018 / 01:12
1
answer

Query executed in Python does not return information from my Oracle database

The problem is that I'm doing some queries to the oracle 9 database from my python 2.7 script with the help of cx_oracle but when printing the cursor values it does not return information which IF IT EXISTS in the database. I have tried pla...
asked by 25.05.2017 / 17:12
1
answer

Sort classification_report of sklearn.metrics

I can not find the way to order the results in ascending or descending% of classification_report by attributes other than the label, such as the fields precision or support . precision recall f1-score suppo...
asked by 26.05.2017 / 00:23