Python is a dynamically and strongly typed programming language whose design philosophy emphasizes code readability. Two significantly different versions of Python (2 and 3) are in use. Please mention the version that you are using when asking a question about Python.

learn more… | top users | synonyms (2) | python jobs

0
votes
0answers
8 views

Python heatmap from 3d coordinates

I start from two linspaces and I meshgrid them. Then I calculate a function's values on grid. My function is called cpt_hcpv(). Then I would like to heatmap my data, with each point on the grid with ...
0
votes
1answer
13 views

python string iterpolation on files with % as comment

I would like to use fabric to generate a custom ejabberd config file and upload to server. fabric uses python string interpolation in fabric.contrib.files.upload_template. Unfortunately ejabberd ...
0
votes
0answers
6 views

PyQt4: Use a heat map as a background for a QTableWidget

I use PyQt4 and I have a QTableWidget, at each cell I have a float. I would like to use background colors, to order visually the values that are the most similar in each row. I thougt about a heatmap ...
0
votes
1answer
26 views

Comparing date and time in python

I need to compare the time (and date if that helps) that a message was sent to see if it was in the past 24 hours. Does anyone know how to take said time and see if it was in the past 24 hours?
0
votes
0answers
4 views

How to organize a Python GIS-project with multiple analysis steps?

I just started to use ArcPy to analyse geo-data with ArcGIS. The analysis has different steps, which are to be executed one after the other. Here is some pseudo-code: import arcpy # create a ...
0
votes
1answer
28 views

Python: filter list of list with another list

i'm trying to filter a list, i want to extract from a list A (is a list of lists), the elements what matches they key index 0, with another list B what has a serie of values like this list_a = list( ...
0
votes
0answers
10 views

Django - how to filter using QuerySet to get subset of objects?

According to documentation: filter(**kwargs) Returns a new QuerySet containing objects that match the given lookup parameters. The lookup parameters (**kwargs) should be in the format ...
0
votes
3answers
33 views

Create constrained random numbers?

How can I create m=5 random numbers that add upp to, say n=100. BUT, the first random number is say, 10 < m < 30, the second random nr is 5 < m < 20, the third random nr is 10 < m < ...
0
votes
0answers
6 views

Inproc speech recognition engine in Python

I'm currently using PySpeech to recognize speech. I'm trying to get voice recognition to start without Windows Speech Recognition's default commands. From googling, I've found that changing this ...
-4
votes
1answer
44 views

Does Python need to know the definition of passed, but unused object?

A, B, C and X are classes in different modules. I want to pass an object of class X the following way: A->B->C Is it necessary then to inculde class X in B, or it can pass a class X object without ...
2
votes
3answers
22 views

Python: operation being unexpectedly propagated along parent lists

I am inserting and removing elements from a list that has been copied from another one I want to preserve unchanged. However, after applying the operations to the former, the later results also ...
0
votes
2answers
29 views

Python: Find the position in a list of the first object that respect a given condition

I have a list of the following kind: class Any(object): def __init__(self,a,b): self.a=a self.b=b l=[Any(1,3),Any(2,4),Any(1,2),Any(None,6),Any('hello',6), ...
0
votes
0answers
31 views

Python script to update remote machines

I'm attempting my first foray into creating a Python script that will automate software updates remotely to our machines. What it needs to do: Telnet into machine Run a command that changes the ...
0
votes
1answer
18 views

Matplotlib radar chart

so I was experimenting with this matplotlib example. In the data part I tried to make the graphic from a tuple like this: data = data[0:8] f1_CO = [0.88, 0.02, 0.02, 0.02, 0.00, 0.05, 0.00, ...
-5
votes
1answer
48 views

python how to replace EQUAL SYMBOL [on hold]

i want to replace: f2.write(line.replace("('", "<item> <media:content url="")) I WANT TO REPLACE LIKE THAT BUT THE =" CAN NOT PUT THERE

1 2 3 4 5 14277
15 30 50 per page