Questions tagged as 'python'

2
answers

Problem with mpi4py module

I found an interesting module to do parallel calculations with python but when using the documentation it tells me that the code to start using the module is this but when I try to execute the code I get an error: from mpi4py import MPI...
asked by 16.08.2016 / 00:20
1
answer

Delete multiple folders in Python

They could advise me, I have the following problem. I have thousands of folders which in turn has several sub-folders, there is specifically a sub-folder that is named "0". Example: ├ DISCO_1 (CARPETA_Principal) | ├─ 2014353(SUB-CARPETA)...
asked by 19.01.2016 / 20:04
2
answers

Incorrect coordinate system when viewing image using PyQtGraph

I have the following test image: And the following Python script to be able to visualize it using the PyQtGraph package: import sys from PyQt4 import QtGui from PIL import Image import numpy as np import pyqtgraph as pg app = QtGui....
asked by 02.02.2016 / 20:42
1
answer

Invalid HTTP_HOST header using Nginx and Django

I have an application developed in Django 1.7, to serve the application I am using Nginx, Gunicorn and Ubuntu server 12.10. Django notifies me several times a day with the following log: Invalid HTTP_HOST header: 'testp5.mielno.lubin.pl'. You...
asked by 23.01.2016 / 20:06
1
answer

Create an executable from a python script (NumPy)

Sorry that seems like a very simple doubt, but it is the first time that I do this and I am having difficulties. I have created with spyder, a software that brings anaconda, a calculator of systems of equations, in which I have used the numpy mo...
asked by 07.05.2018 / 21:38
2
answers

Retrieve related field in another table

I am using django 1.10, with python 3.5 in Windows 8.1. I have a database that considers fields on an element (Work), in another table (Modality) I have the identifier and the description of this Modality, but in Work, I only have saved the valu...
asked by 01.06.2016 / 01:23
1
answer

Python collation excel report with Pandas

I am generating a report with the Pandas module in Python, I get the data from MySQL, but there is a column with accented data, at the time of generating the report it falls, I leave information related to the problem. Connection code: con...
asked by 11.05.2018 / 14:21
2
answers

problems when inserting in a bd

I have 2 tables in my database one of them is cards and the other type cards basically after normalizing the table cards I am left with a type fk that links to the card type pk, then insert data in this last one like this its structure more down...
asked by 30.07.2018 / 05:37
1
answer

Go through 2 positions per iteration FOR

Good, our first for runs 16 positions in this case and we want that both padre as punto have the same value for each 2 positions (That is, for i=0 and i=1 the same value, for i=2 and i=3 other ....)....
asked by 15.08.2017 / 20:52
1
answer

Problem using sync_type from cassandra-python-driver

I'm using userType but I get this error Traceback (most recent call last): File "cassandra-test.py", line 70, in <module> sync_type(Image) TypeError: sync_type() missing 1 required positional argument: 'type_model' The code...
asked by 31.07.2017 / 17:04