Questions tagged as 'python'

1
answer

Special characters in writing to Python files

I'm doing a python script to organize and count words from a text given by a file. I have the problem when printing it to another file. The code that prints the file is this: def printToFile(self, fileName): file_to_print = open(fileNam...
asked by 03.08.2017 / 22:05
1
answer

how to add words separated by letters to an arrangement

n = int(input()) m = int(input()) matrix =[] for i in range(n): matrix.append([]) for e in range(m): matrix[i].append("") so I make my arrangement Now I want to add letters in each position as I can. Example: entry...
asked by 08.03.2017 / 15:39
0
answers

Pass a TIFF image from 12 bits to 8 bits

I am trying to convert my TIFF image from 12 bits to 8 bits to be able to do a GLCM but it generates this problem:    AttributeError: 'module' object has no attribute 'unit12' This is my code: import numpy as np import matplotlib....
asked by 18.03.2017 / 01:38
0
answers

Refresh layout in pymel automatically

I'm doing a plugin for Maya (programmed in pymel), in which I need my panel to automatically refresh my list of objects that I have on the screen. I have it done with a button that, when I give it, refreshes the list of objects, but I want it...
asked by 24.11.2016 / 10:55
0
answers

Connect python with mysql database in the cloud [closed]

p and that runs on my pc and a database in my hosting. How can I make the connection of said bd with the .py script?     
asked by 28.10.2016 / 23:21
1
answer

Python date concatenation in a query for mysql

I have the following mysql query. SELECT purchase.DATE, products.ID, products.NAME, purchase_details.UNITS, purchase.REFERENCE, purchase_details.PRICE,purchase.ID_PROVIDER FROM purchase INNER JOIN (products INNER JOIN purchase_details ON produ...
asked by 02.11.2016 / 19:43
0
answers

Problems with the solictud Post made python from a form made in laravel

I have a form made in laravel done with the method POST which is the following <form method="POST"> {{ csrf_field() }} <input type="email" name="email"> <input type="password" name="password">...
asked by 01.05.2017 / 06:16
0
answers

The data is not inserted in the DB [closed]

I am working with Django , and I want to insert some values in the database, but they are not inserted and do not emit any errors. From a selected product, I try to show the user a form that shows the selected product, allows you to sel...
asked by 12.07.2016 / 14:30
0
answers

Insufficient memory. error when running opencv_traincascade with OpenCV 2.3.1 in Python 2.7 using Ubuntu 12.04 [closed]

I'm following the example of: link Almost everything has gone well, in the part where I fail is when I execute the last step, when I try to create the .xml file that will help me detect my own objects: opencv_traincascade -data classifi...
asked by 20.06.2016 / 01:02
0
answers

REST API - Serialized models do not take hostname from the production server - Django REST Framework

I am exposing an application (at the moment it is only your user scheme) with Django Rest Framework, and it happens to me that every model that I have serialized, in the url attribute, I have is the address of the localhost of my development mac...
asked by 20.02.2016 / 19:15