Interesting Tags
   11 tags on

1 answer

How can I load a Python flask app into a gtk webview (Webkit)

I am currently working on an application that requires math expressions to be rendered (from latex) and needs to have some sort of native gui (even if it just uses gtk, then renders html in webkit). …

1 answers | 5 secs ago by luke on Stack Overflow stackoverflow.com
0 answers

Break out string within element in 2D list, delimiter, python

I have a 2D array (list of lists) with this structure: mylist = [['Bob','AA',3,'a string with a - convenient - delimiter'], ['Sally','BB',2,'a string with a - great - delimiter'], …

0 answers

Apple push notification server do not response any errors

I am trying to send push notification to APN sandbox server. I have read, that APNs doesn't return anything in successfull. I intentionally send incorrect message to APNs and i expect to receive ...

0 answers

How to connect to kivy-remote-shell?

This seems to be a dumb question, but how do I ssh into the kivy-remote-shell? I'm trying to use buildozer and seem to be able to get the application built and deployed with the command, buildozer -v …

1 answer

Change Django Radio input into toggle button using bootstrap switch or similar

models.py class Listener(models.Model): # other columns availability = models.BooleanField(default=False) Initially I was planning on creating a AvailabilityForm object and take the input …

1 answer

Python script calling other script, terminate first, keep second

Python newbie here. Sorry if I am a bit unclear. I have a Python script that reads temperature, and I have another script that grabs the temperature value from the first one. If the first script ...

1 answers | 6 mins ago by user3738008 on Stack Overflow stackoverflow.com
1 answer

djagno rest framework naming remap

I have python classes written in pythonic naming conventions (e.g. multiple_words_with_underscores). When exposed through Django-Rest-Framework, I want to redo the naming convention to camelCase to be …

1 answer

SQLAlchemy bulk insert failing

I am doing bulk inserts using SQLAlchemy in a loop as follows: for table, batch in pendingInserts: self.conn.execute(table.insert(), batch) where batch is list of dict and table is a SQLAlchemy …

1 answers | 7 mins ago by apoorvkul on Stack Overflow stackoverflow.com
3 answers

Use list of strings elements as arrays

I have a list of strings: list1 = ['array1', 'array2', 'array3'] whose elements I would like to use as names of other lists, like (as conceptual example): list1[0] = [1, 2, 3] I know this ...

3 answers | 8 mins ago by Py-ser on Stack Overflow stackoverflow.com
0 answers

Django Rest Framework: empty list when using RelatedField

I have the following django model (the Cast model holds nothing interesting right now) class CastImage(models.Model): image = models.ImageField(upload_to="castimages") cast = ...

2 answers

How to find two close events (that have a datetime component) in python

I have an object that represents an event, and I have many types of those objects. I want to find events that are close in time in python. The nicest way I could find to do it is: joined_events = …

0 answers

Messy Excel sheet with multiple rows shifted.

I have an excel sheet containing over 70,000 rows. However some of the rows got shifted to the right (most probably human error, accidentally left out a column while filling in the information inside …

1 answer

How to use ax.get_ylim() in matplotlib

I do the following imports: import matplotlib.pyplot as plt import matplotlib.axes as ax import matplotlib import pylab It properly executes plt.plot(y1, 'b') plt.plot(y2, 'r') plt.grid() ...

1 answers | 17 mins ago by user1067305 on Stack Overflow stackoverflow.com
0 answers

How to specify GAE Python ndb field name based on a variable

In storing data into an NDB, I'd like to obtain the name of the field from a string variable (e.g., field_name2 = "userid"). Is there a way? thanks in advance. class Account(ndb.Model): ...

4 answers

Case sensitive path comparison in python

I have to check whether a file is present a particular path in Mac OS X. There is a file called foo.F90 inside the directory. But when I do if(os.path.exists(PATH_TO_foo.f90)), it returns true and …

0 answers

Django celery Unrecoverable error: WorkerLostError

Could not start the worker process. Running the worker as the root with the following flag export C_FORCE_ROOT=true [2014-08-21 00:26:36,243: DEBUG/MainProcess] | Worker: Hub.register Pool... ERROR …

1 answer

Recursively load from cPickle and create variables to store them

I have 26 .pkl files at hand, from dict_a.pkl to dict_z.pkl. I want to load them into the memory, so I can compare elements start with a with variable loaded from dict_a.pkl. The reason I want to do …

1 answers | 22 mins ago by Sean on Stack Overflow stackoverflow.com
0 answers

Parsing xml using python minidom

<PacketHeader> <HeaderField> <name>Version</name> <dataType>UINT16</dataType> </HeaderField> </PacketHeader> This is my …

1 answer

How to redirect users to different pages based on their roles in Flask-login

how can I redirect users to different pages based on their roles in Flask-login? I'm trying to catch the 'flask.ext.login.user_logged_in' signal but I'm not sure how to redirect flask at signal level. …

1 answers | 25 mins ago by Shang on Stack Overflow stackoverflow.com
0 answers

How to configure access for the Google Calendar API?

My objective: To automatically print out my schedule for the day at 9 AM every morning. My approach so far: The calendar and its access: I have my schedule (say for a year) stored on my Google ...

2 answers

Indexing in python Issue

I am wondering how to access the values in one array that correspond to the values in another array. For example, I have two arrays that are related by a non-linear equation. I only want to look at …

2 answers | 26 mins ago by alvarezcl on Stack Overflow stackoverflow.com
0 answers

How to configure Supervisord for FreeSWITCH?

I am trying to configure a Supervisor for controlling the FreeSWITCH. Following is the configuration at this moment present in supervisord.conf. [program:freeswitch] ...

1 answer

How to locate a module being imported in python

I am trying to locate how the following line of code in nltk is loading the module gutenberg from nltk.corpus import gutenberg I tried using .__file__ on nltk.corpus and it points to an __init__.py …

1 answers | 27 mins ago by akrishnamo on Stack Overflow stackoverflow.com
1 answer

Google+ Sign-In - Page accessible for logged in users only

I decided to use social media benefits on my page and currently I'm implementing Google+ Sign-In. One of the pages on my website should be accessible for logged in users only (adding stuff to the …

0 answers

how to create a tcp packet with self defined options field with scapy

I'm trying to create a tcp packet with self defined options field. Generally we can do it by "options" argument when it is a standard option. "MSS" for example: >>> ...

0 answers

Clarification for update parameter of function in theano

Here is a simple code: import numpy as np import theano import theano.tensor as T s = theano.shared(name='m1', value = np.ones((3,2))) def abc(): print "abc called" return [(s,s+1)] print …

1 answer

Plot pandas dates in matplotlib

I have a fixed-width data file containing dates, but when I try to plot the data the dates are not displayed properly on the x-axis. My files looks like 2014-07-10 11:49:14.377102 45 2014-07-10 …

0 answers

Selenium: can you reference elements from iframes?

after you driver.switchTo().frame("name"); can you save elements inside the iframe to a variable and refer to it outside of the with block? Or do you have to do all testing inside the iframe you've …

0 answers

How to change the number of users after initial hatch

I am trying to use locust to simulate “normal” traffic behavior pattern. This requires that the number of users (and not only the number of requests) should be none constant and change, for example …

1 answer

Error Handing HTTPError

Hi All I have the following error I want to handle (this happens from time to time when the wifi drops packets): Traceback (most recent call last): File "twittersearch.py", line 40, in <module> …

1 answers | 46 mins ago by Chris J. Vargo on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3