Questions tagged as 'python'

2
answers

I want to deal 2 players 2 cards

It is a card program that deals 2 cards randomly. What I want to do is give it to 2 different players but I do not know how to do it. palos = ["h","d","c","s"] rangos = ["2","3","4","5","6","7","8","9","10","J","Q","K","A"] Mazo = [] for pal...
asked by 16.10.2017 / 23:05
0
answers

How is the correct way to do an iterable function

I have been working for a few days with a function that operates with data of 2 document .csv . There are many steps, but basically what it does is take identifying numbers (ID) that were categorized from lowest to highest according to the...
asked by 22.07.2017 / 04:49
0
answers

Can I use any library in python scripts to work with bitlocker? [closed]

I'm starting programming with Python 3.6 and I'm looking for a way to make a script with which I can activate, deactivate, block and unblock bitlocker through a program with Python, but I do not know what I must use to work with bitlocker ....
asked by 23.07.2017 / 11:19
0
answers

Call a class from another file

In a class in a file querySQLPredictions.py we have: class QuerySQLPredictions: """""" def __init__(self,dataFrame_subscriber_content): """""" self.dataFrame_subscriber_content = dataFrame_subscriber_content a...
asked by 11.07.2017 / 17:46
1
answer

represent in Json a filter (). values ()

Friends, I've been trying to represent this in json but I could not miguel <QuerySet [<Libro: hunger games>, <Libro: sherlock holmes jose <QuerySet [<Libro: divergente>, <Libro: sherlock holmes>]> this is the c...
asked by 08.09.2017 / 17:42
1
answer

The ManytoMany relationship is not performed

I have the following models : class Persona(models.Model): cedula = models.CharField(max_length=12, unique=True, null=False, blank=False) rol = models.ManyToManyField('Rol') cuenta = models.OneToOneField(settings.AUTH_USER_MODEL,...
asked by 08.09.2017 / 19:34
1
answer

Error pandas and matplotlib could not convert string to float

I'm trying to draw on a graph the cell phone prices according to their models For now I have this import pandas as pd import csv import matplotlib.pyplot as plt import matplotlib.dates as mdates df1 = pd.read_csv('MercadoLibreMejor_items.c...
asked by 25.07.2017 / 20:58
1
answer

I can not convert a Json format into a csv table

I tried to convert a json to csv, I tried it directly with the library csv and also with pandas , but it tells me TypeError . This is my code: import urllib2, json url = "https://www.ncdc.noaa.gov/cdo-web/api/v2/stations"...
asked by 29.06.2017 / 09:39
1
answer

Format the scrapy spider response.css result

When I execute my spider the value I want to get I save them in a dictionary, but I also want to create a folder with the name of one of the results def parse(self, response): ml_item = ScrapyItem() mt_item = ScrapyItem()...
asked by 23.06.2017 / 08:37
2
answers

python subprocess with ffmpeg stops when launching an exit with ffmpeg

I'm trying to capture the output with ffmpeg and I've noticed that this binary throws the outputs by the stderr but I realized that when the file already exists it is thrown by stdout but here I have a problem and that the script it gets...
asked by 03.07.2017 / 16:14