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
3 views

smaato error: The bid response is broken

Error message: The bid response is broken. The JSON content returned by your server is invalid. Additional information: A JSONObject text must begin with '{' at character 1 of from BaseHTTPServer ...
0
votes
0answers
5 views

Updating Label in Tkinter

I am trying to create a simple canvas with a button, which opens a new window that displays an "animation" of some text. I got the animation code from here. Here is what I have done so far. This ...
0
votes
1answer
12 views

array manipulation in numpy

How to obtain new array (new) from original array (my_array) by calculating mean as follows: new = [[mean(1,3), mean(1,3), mean(1,3), mean(1,3), ...
1
vote
1answer
9 views

Scrape text inside SPAN unsing beautifulsoup

How can I extract the text from <span class="arabic_sanad arabic"> & <span class="arabic_text_details arabic"> from the below <div class="arabic_hadith_full arabic"><span ...
0
votes
0answers
8 views

Exclude method signature using autodoc

I'm currently documenting a HTTP API using the Sphinx httpdomain extension. I have a docstring on each request endpoint that documents the argument, query params, return value and exceptions. I would ...
0
votes
1answer
6 views

How to delete the last column of data of a pandas dataframe

I have some cvs data that has an empty column at the end of each row. I would like to leave it out of the import or alternatively delete it after import. My cvs data's have a varying number of ...
0
votes
1answer
29 views

Is there any function which returns True if an element is the last element in the list?

Is there any function which returns True if an element is the last element in the list?
0
votes
1answer
16 views

Contains operation for comparing elements in two lists

How can I compare two strings for contains operation? I tried using the in operator without success list_1=['check value 1','check value 2'] list_2=['12312 check value 1 ','234 check value 2'] for ...
0
votes
1answer
10 views

Use of slice(x,y) function from numexpr in python

What exactly does the following code do? slice(x,y) x,y are integers and it is being called on an object i.e. def view(self): return slice(self.x,self.y) I am unfamiliar with ...
1
vote
2answers
21 views

Get the the number of zeros and ones of a binary number in Python

I am trying to solve a binary puzzle, my strategy is to transform a grid in zeros and ones, and what I want to make sure is that every row has the same amount of 0 and 1. Is there a any way to count ...
0
votes
0answers
4 views

Python - Reportlabs content placement

I'm generating a table, with dynamic content. The issue that I'm facing is when I provide a co-ordinate to place my table, the table start from that co-ordinate growing upwards. It should rather grow ...
0
votes
0answers
12 views

Syncing two remote programs relying on time only (Python)

I have two programs, S and D,written in Python 2.7, running on seperate machines, both linux. The goal is to pass a file (in other words, bits) from S to D, through third party server called T only, ...
0
votes
0answers
19 views

Parse base64 string coming fron javascript front end

My javascript frontend is sending the base64 encoded string: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM8AAADkCAIAAACwiOf9AAAAA3NCSVQICAjb4U/gAAAgAElEQVR4nO...` I need to get just the base64 ...
0
votes
1answer
7 views

Converting a Matlab fft2 diffraction example into Python

I trying to teach myself some FFT basics using python. At the moment I'm trying to reproduce a matlab FFT2 diffraction result using python and associated libraries. The example I'm trying to simulate ...
0
votes
0answers
3 views

Annotating Points in Scatterplot with Logarithmic Axis

I use matplotlib to produce a scatterplot of a few points. Each point should be annotated with a label. I tried to place the labels randomly on a circle around the point coordinates. However, I do not ...

15 30 50 per page