Comment by killajoule on How can I find out the number of outputs returned by...
@Ffisegydd very good point! Let's assume the functions I will be inspecting only has 1 return statement.
View ArticleComment by killajoule on How can I find out the number of outputs returned by...
Thanks, this was very enlightening!
View ArticleComment by killajoule on Pandas - Is it possible to read_csv with no quotechar?
Thanks for that link. However, that question seems to be talking about the csv library. I was talking specifically about the pandas library.
View ArticleComment by killajoule on Pandas - Writing an excel file containing unicode -...
Hi Louise, the error seems to occur with '\x16'. If I change my code to x = [u'string with some unicode: \u03BB'] which is the lambda character, everything is fine. In fact any character starting with...
View ArticleComment by killajoule on Jupyter notebook started from rc.local does not pick...
@tripleee do you know what is a better method to start an interactive program onstartup so that it jacks into .bashrc content?
View ArticleComment by killajoule on How to draw a pixel on the screen directly?
Do you know how to do the same on ubuntu?
View ArticleComment by killajoule on how to save jupyter output into a pdf file
I am not aware of a solution to save the output of a particular cell into a pdf file. However, you can run an entire jupyter notebook and save all of the input cells, and their corresponding output...
View ArticleComment by killajoule on Recursive regex in python regex module?
Thanks shawn, is there no way to do this without the for loops, i.e. just sticking to re syntax such as re.findall?
View ArticleComment by killajoule on Attach an event listener with event delegation to...
@LouiseDavies you are right it works with mousedown! Do you know if there is an alternative way to arrive at a double click, just to try out other routes?
View ArticleComment by killajoule on Tensorflow, how to ensure that everything runs...
So if I don't use with tf.device(...) to manually allocate tensorflow code to different gpus, it seems to still use all gpus. Does that mean by default tensorflow distributes a computation graph over...
View ArticlePython - retrieving a variable from memory?
I have two python scripts that need to communicate large variables to one another: python1.py and python2.py.Let's say python1.py is running and has created a list variable 'x' which is very large. At...
View ArticleProlog ~ Resolution involving the negation of some other statement?
I have the following code, where I define is_max as the negation of is_below.rank(mary,1).rank(juan,2).rank(john,3).rank(jane,4).is_below(X) :- rank(X,A), rank(Y,B), A<B .is_max(X) :-...
View ArticleMonitoring progress of IPython map_async?
I would like to count the number of times a function f has been called by IPython's map_async (so I can monitor progress). I am attempting to do this by having f print out messages:from...
View ArticlePython ~ Importing a class that implements multiprocessing fails on Windows 7
I have three files in a folder:MultiProcFunctions.pyThe idea is to take any function and parallelize itimport multiprocessingfrom multiprocessing import Managerdef MultiProcDecorator(f,*args):""" Takes...
View ArticleMaking pypy available to pyscripter (or any other ide for that matter) on...
Maybe I am missing something, but I just downloaded pypy 2.0 beta2 windows binary (32 bit), and it seems I can run the interpreter by executing pypy.exe. However, I would like pypy to work with...
View ArticlePython - Replace part of regex?
I have the following piece of code:import res = "Example {String}"replaced = re.sub('{.*?}', 'a', s)print replacedWhich prints:Example aIs there a way to modify the regex so that it prints:Example...
View ArticleParsing numerical data using Prolog?
I am new to prolog and am considering using it for a small data analysis application. Here is what I am seeking to accomplish:I have a CSV file with some data of the following...
View ArticleCelery - Completes task but never returns result
I've just installed Celery and am trying to follow the tutorial:I have a file called tasks.py with the following code:from celery import Celeryapp = Celery('tasks', backend='amqp',...
View ArticlePython multiprocessing apply_async never returns result on Windows 7
I am trying to follow a very simple multiprocessing example:import multiprocessing as mpdef cube(x): return x**3pool = mp.Pool(processes=2)results = [pool.apply_async(cube, args=x) for x in...
View ArticleHow to specify difftool_args for git-difftool?
I am trying to use a custom diff tool for git diff. The following command does the job:git difftool --tool nbdime "file.ipynb"This starts up a diff viewer on the web, with the following...
View Article
More Pages to Explore .....