Questions tagged as 'python'

1
answer

Error getting data in Python

I have this code in a Python 3.7.0 program that theoretically should not give an error: import pyodbc import csv conn = pyodbc.connect('DSN=EDISOFT') cursor = conn.cursor() for row in cursor.execute ("select top 100 isbn,ean, titulo, pvp...
asked by 20.09.2018 / 06:39
0
answers

How to create Weights automatically in Tensorflow, CNN

I tried to create weights for a CNN automatically using a for loop and a dictionary in python. The problem is that the size of W1 has to be equal to the size of W2 ... But I can not find a way of doing it. The size shape_1 is the output of nod...
asked by 15.09.2018 / 18:55
1
answer

I need to formulate a regular expression that validates emails [closed]

I need to formulate a regular expression that validates emails in python (3) ..but I am a bit lost in the topic of regular expressions ... and I have read about the care that must be taken when using them .. thank you     
asked by 21.09.2018 / 20:10
0
answers

Avoid with exception the interruption of the script due to failure of the connection or internet

Greetings I made the following script that brings me the states of the web through a txt file. I do not know if it's the fastest way but it works for me, the issue is that I do not know very well the issue of exceptions with socket. I have the t...
asked by 14.09.2018 / 21:52
0
answers

How to enter a value in the middle of a list already created

Insertion sort I have a list already created and ordered ascending. a = [10,20,30,40,50] adding a 0 in the last position a.append (0) I have to ask for an example number 25 I have to place it in the list without losing the ascending order, so I...
asked by 18.09.2018 / 00:40
0
answers

Error in LOAD DATA INFILE in Python3.4?

I have the following script in python3.4 to insert data into a MySQL table: import pymysql connection = pymysql.connect(host='localhost',user='root',password='',db='bd',charset='utf8mb4',cursorclass=pymysql.cursors.DictCursor) cur...
asked by 18.09.2018 / 02:59
1
answer

Return an 8-bit array in Python

I'm doing a program for a Vúmetro in python where I need to return an array of values in 8-bit binary, but when I run my program it returns the array but in a way that the 8 0's are executed first and then a 1 with 7 0's , two 1's with 6 0's, .....
asked by 23.09.2018 / 17:20
1
answer

Django: url error when saving a record from admin

I tell you my problem. I am deploying a web (Python 3.4 and Django 2.0.4), it has already saved data in several models from the admin panel logged in as superuser, but when I came to an app called About, with a model of the same name, I is ju...
asked by 14.09.2018 / 09:23
1
answer

Save a get () in a variable

I am programming in Python3 with tkinter and when I try to save the result of a text box (an Entry) in a .get () and use that variable in a Label, it does not appear, for example: varNum=IntVar() cadrotexto=Entry(root) numeroRecogido=cuadrotex...
asked by 14.09.2018 / 14:06
0
answers

Converting .ui to .py from PyQt4 for Python 2.7 generates me error

This is the error that leaves me when I try to convert it. I have searched the Internet, but I can not find any solution to my problem. I am learning to work with PyQt and if I do not convert it I can not move forward. If someone can help me, I'...
asked by 13.09.2018 / 20:34