Questions tagged as 'python'

1
answer

Schedule a function in Python to always run on the last Friday of the month

The code below shows an example of how to program, but is somewhat limited to minutes, hours, and days. I need one that also includes the specific month and day, which in my case is Friday. I got a code that gets the date last Friday of the curr...
asked by 18.01.2018 / 15:58
1
answer

Replacing values in a list

I need to replace values in a list of agreements with some criteria. Criteria: If the value is an integer and less than the value entered, replace -1 if the value is a floating-point number and greater than the number you enter replace...
asked by 23.04.2018 / 22:19
1
answer

Cassandra installation error - DRIVER in python

Hello, I'm trying to create a development environment with python and Cassandra, but I'm having trouble installing the Connector in python, I'm following the environment that I currently have the error that I'm having to return. Operating System:...
asked by 29.12.2017 / 12:11
1
answer

Post-processing frame processing in windows

Is it possible to process the screen frame in Windows? I'm trying to make a color filter / compressor of the opensource screen in python.     
asked by 03.01.2018 / 07:35
2
answers

How to repeat a code?

Hello, I'm new to python, and I'd like to hear the code right after its completion. Being that there are several If and else in the code. Here's my code for questioning. print ("\n\t CALCULADORA v 1.0\n") escolha = str (input ("escol...
asked by 02.01.2018 / 00:08
1
answer

How to call an attribute of the class in another class in django

I'm trying to create some classes that will relate in a way. The idea is to be a game in which the player will have some options of choice and then his score is based on the punctuation of his choices (rather than a fantasy game). For example...
asked by 28.01.2018 / 17:35
1
answer

Apply color palette to raw image

I have an image in gray levels and I want an algorithm to apply a color palette to it. Does anyone have reference to an algorithm technique used or something of the sort? I am not experienced with digital image processing. If there are any C or...
asked by 26.01.2018 / 13:18
1
answer

Importing modules into PyCharm

I'm trying to import modules into PyCharm: from mymodule import fileHandler However, IDLE reports error ImportError: cannot import name FileHandle I have tried to follow the most common suggestions: Identify the root folder a...
asked by 20.12.2017 / 20:46
1
answer

: column in front of variable

Oops, returning with the column question before the variable. Example I'm seeing in python in neural recurring. arr = arr[:n_batches * batches_size] What does :n_batches mean?     
asked by 01.03.2018 / 01:53
1
answer

Django Models with default value in another branch

I'm having a field that I've added to another branch (which is in developing status ) calling money , with default value: 0.00 in the User model. However, it is not yet being used in the production branch. Today when I we...
asked by 08.01.2018 / 20:00