Questions tagged as 'python'

0
answers

Multiplication of parameter and variable with different numbers of indexes

Good evening, I'm doing an implementation of a mathematical optimization model in Python 3.4. I need to do a multiplication of a "Lambda" parameter indexed in i, j, tt and an "x" variable indexed in i, t. The multiplication is contained in a...
asked by 25.06.2018 / 03:27
1
answer

Stack multiple txt files using pandas

I wanted to do a routine that accumulates the data I extract from google analytics every day, but my code has an error that I can not solve: import pandas as pd import os import glob my_dir = 'N:/E-Commerce/Relatorios/Bases/Source/Canais' fil...
asked by 26.06.2018 / 23:46
0
answers

How to Add SNI (server_hostname) Using sockets and ssl Modules in Python?

How to Add SNI (server_hostname) Using Sockets and ssl Modules in Python? import socket, threading, select, ssl def conecta(c, a): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('123.456.789.123', 444)) connec...
asked by 30.06.2018 / 20:14
1
answer

Problem with assign,

class transaction: ... def send(from_key, to_key, SN): if SN in from_key.parts: str(from_key)+str(to_key)+str(SN)=transaction(SN,from_key,to_key,True) SyntaxError: can not assign to operator I can not assign a int to the...
asked by 03.09.2018 / 21:49
1
answer

How to import files using REGEX?

Good Afternoon Personal, okay? I have a question in regex in python. I want to create a script to open files without informing their format, being In this case, I would like to know the name of the image, without informing its format (i...
asked by 03.09.2018 / 21:24
2
answers

Exercise in python

Hello, I have python as one of my 2nd semester chairs and I need a little help. I have an exercise where I can not make it work correctly; here is the statement: "Write a program that will read from the keyboard a set of numbers until the user e...
asked by 23.06.2018 / 00:36
0
answers

How to import pydensecrf.densecrf?

I'm getting the following error when I try to run the code: ImportError: No module named densecrf I'm using Jupyter Notebook 5.5.0 from Anaconda on Ubuntu 18.04 Does anyone know what it could be? I try to insert the pydensecrf...
asked by 20.06.2018 / 23:15
0
answers

Komodo Permission Denied

I'm doing the Lynda essential training Python and I'm using the komodo text editor. Every time I try to run some code, I get the following message: Permission denied / Python Developer / Python - Essential Training./Ex_Files_Python_EssT /...
asked by 26.06.2018 / 13:49
2
answers

Levels in game of the old

I'm working on an old game in Python, and I have distinct 3-level (easy, medium, and difficult) codes, how could I implement an initial "menu" where the user could choose one of the levels and be immediately directed to the same. And at the end...
asked by 26.06.2018 / 00:14
1
answer

List_Display in Django / Python

sXDw.png My class Models are like that class Produto(models.Model): NomeRazao = models.CharField('Nome',max_length=50,unique=False,blank=False) CpfCnpj = models.IntegerField('Quantidade',blank=False) Telefone = models.Flo...
asked by 25.06.2018 / 23:26