Questions tagged as 'python'

1
answer

Delete part of a set of tuples that form an array

Good, we are doing a small program in Python and we want to eliminate the first element of the different nested lists. The code is this: puntuados = [[calcularFitness(i), i] for i in poblacionNueva] #Calcula el fitness de cada individuo, y lo...
asked by 25.07.2017 / 17:31
1
answer

Cross imports in Django

In my Django project I have 2 apps, as the following map shows: Django/ProyectoWeb/Apps/ ├── Catedra └── Usuarios Without detailing much: The Chair has a unique model called Commission. Users have 2 models called Student, Teacher....
asked by 20.07.2017 / 03:02
2
answers

Django: error in configuring url's

I'm Using django in its version: 1.11.4 python 3.6 in linux debian I have the following files configured in settings.py INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes',...
asked by 08.03.2018 / 06:49
1
answer

Distance between LineString and point

I have the following LineString Line = [(-58.39323087479187, -34.64522852285068), (-58.39493519860744, -34.64593911202303), (-58.39540370387294, -34.64612018963881), (-58.39577715270643, -34.64624297063709), (-58.3961720086682, -34.6463673530...
asked by 14.03.2018 / 13:07
1
answer

Query database with SQLAlchemy

I am trying to apply a query to a table, using the ORM sqlalchemy in a database already created with mysql, with the following code: eng = create_engine("mysql+mysqldb://host='localhost', user='root', passwd='...',port='3307', database='Nomina...
asked by 08.08.2017 / 01:00
1
answer

Find adjacent cells in a matrix

I'm having trouble finding and verifying the cells adjacent to a certain position within the matrix (one cell can have 8 adjacent cells). The matrix is composed of a list of chains. So far I have tested the following but it does not exceed as...
asked by 14.04.2017 / 03:15
3
answers

help for this algorithm to change currencies?

Based on the algorithm in this hacker rank video, link , I have tried to create my own algorithm that returns the value that I am looking. Basically, to save you 10 minutes, the algorithm of that video is recursive and stores the information...
asked by 29.04.2018 / 05:22
2
answers

Clean the console after each execution of the main while

Good friends. The fact is the following, I have a small code of the game hanged, nevertheless every time that its main function is executed it goes advancing downwards leaving the previous action above as it is typical in the terminal. I would l...
asked by 20.05.2017 / 02:42
1
answer

Create backup for python and node environment

I am preparing to format my laptop but I have many python packages installed and accommodated in different virtual environments, the same thing happens with node.js and many modules that I have. Is there a way to make a backup for all my librari...
asked by 14.06.2016 / 23:03
1
answer

How to call parts of my html template in django?

Do I want to call parts of my html template in my view? something like this $ ticket_date = $ this- > input-> post ('ticket_date'); in php, but I do not know how to do it. Someone knows, please help me     
asked by 12.08.2016 / 20:54