[sage-support] Re: Simple multiprocessing example in Sage-Notebook

2010-03-08 Thread Gokhan Sever
On Mar 7, 9:47 pm, William Stein wrote: > With a function as *trivial* as your f above, the overhead of > @parallel will kill your benchmark.  As I explained, for *every* > single call, an entire copy of Sage is forked off.  This is no problem > if evaluating f takes at least a second (say), but i

[sage-support] Re: Simple multiprocessing example in Sage-Notebook

2010-03-07 Thread Gokhan Sever
On Mar 7, 8:45 pm, William Stein wrote: > On Sun, Mar 7, 2010 at 5:06 PM, Gokhan Sever wrote: > > Parallel Python is a separate module. IPython is the interactive > > Python interpreter that comes with Sage. However to use the IPython > > parallel features you need to in

[sage-support] Re: Simple multiprocessing example in Sage-Notebook

2010-03-07 Thread Gokhan Sever
On Mar 7, 3:14 pm, calcp...@aol.com wrote: > pool sounds interesting! > > ipython is separate from parallel python? > > What about the @parallel decorator, is that parallel python? > > Its confusing in SAGE sometimes what needs importing and what doesn't. > > TIA, > A. Jorge Garciahttp://calcpage

[sage-support] Re: Simple multiprocessing example in Sage-Notebook

2010-03-07 Thread Gokhan Sever
On Mar 7, 12:20 pm, jpc wrote: > I've tried with > >     print pool.map(f, range(10)) > > instead of > >     pool.map(f, range(10)) > > calling python file.py > > In the notebook, the output must be caughted and printed for user, I > think. > > Pedro I was trying with pool.map(f, range(10)); #

[sage-support] Re: Simple multiprocessing example in Sage-Notebook

2010-03-07 Thread Gokhan Sever
On Mar 7, 10:13 am, calcp...@aol.com wrote: > from multiprocessing import Pool > ... >     pool = Pool(processes=2)            # start 2 worker processes > << > > Wow, cool, is this part of parallel python?  Does this only work on a > multi-core PC or can this be made to work over a cluster as well

[sage-support] Re: Simple multiprocessing example in Sage-Notebook

2010-03-06 Thread Gokhan Sever
On Mar 6, 11:23 pm, Gokhan Sever wrote: > Hello, > > I am executing this example in Sage Notebook v4.3.3 > > from timeit import default_timer as clock > from multiprocessing import Pool > > def f(x): >     return x**3 + x**2 + x > > if __name__ == '__

[sage-support] Simple multiprocessing example in Sage-Notebook

2010-03-06 Thread Gokhan Sever
Hello, I am executing this example in Sage Notebook v4.3.3 from timeit import default_timer as clock from multiprocessing import Pool def f(x): return x**3 + x**2 + x if __name__ == '__main__': t1 = clock() pool = Pool(processes=2)# start 2 worker processes pool.map(

[sage-support] Equation numbering in notebook

2010-02-08 Thread Gokhan Sever
Hello, What is the proper way to number equations in a Sage worksheet using the little text editor? I used \qquad directives: $$f^0(x) =N x_f^{-1} G(\nu) s^{\nu} exp(-(1+\nu)^s) \qquad \left(1\right)$$ $$ s = x / x_f \qquad \left(2\right)$$ $$ G(\nu) = \frac{(1+\nu)^{(1+\nu)}}{\Gamma(1+\nu)} \

[sage-support] Re: examples of using R

2010-01-28 Thread Gokhan Sever
On Jan 28, 8:00 pm, Ondrej Certik wrote: > Hi, > > are there some examples how to use R from Sage? > > I tried to search here: > > http://www.sagemath.org/help.html > > http://www.sagemath.org/doc/reference/ > > I also tried to search sage-devel, for "R" and "R statistics" and "R > statistical",

[sage-support] Re: Running Sage and local matplotlib installation

2010-01-27 Thread Gokhan Sever
On Jan 27, 5:52 pm, Minh Nguyen wrote: > Hi Gokhan, > > On Thu, Jan 28, 2010 at 10:08 AM, Gokhan Sever wrote: > > > > > Is there a way to specify in SAGE to use its own version of > > matplotlibrc. And why this is not the default option? > > Ticket #6235 &g

[sage-support] Running Sage and local matplotlib installation

2010-01-27 Thread Gokhan Sever
Hello, I am testing at a local build of 4.3.2.alpha0 at my Fedora 12. Sage seems like using my local matplotlibrc file while I am trying to plot something using matplotlib, and resulting with import error for my defauly Qt4Agg backend. Is there a way to specify in SAGE to use its own version of m

[sage-support] Re: Changing the typeset output in notebook

2010-01-25 Thread Gokhan Sever
On Jan 25, 11:27 am, Gokhan Sever wrote: > Hello, > > When I activate the "typeset" option on sagenb.org notebook server and > get a result for this function: > > # Complete gamma function > > var('xi, t') > assume(xi>0) > integrate(t**(xi-1)

[sage-support] Changing the typeset output in notebook

2010-01-25 Thread Gokhan Sever
Hello, When I activate the "typeset" option on sagenb.org notebook server and get a result for this function: # Complete gamma function var('xi, t') assume(xi>0) integrate(t**(xi-1)*exp(-t), (t,0,oo)) \newcommand{\Bold}[1]{\mathbf{#1}}\gamma\left(\xi\right) It gives me a nice gamma(xi) view. H

[sage-support] Re: @interact with non-Sage objects

2010-01-25 Thread Gokhan Sever
On Jan 25, 3:59 am, Harald Schilly wrote: > On Jan 25, 12:39 am, gsever wrote: > > > It was my pleasure Harald. > > ;) > > And guess who just made it on that > page:http://sagemath.org/library-stories.html Thanks for making me famous :) (Put in my blog as well -- http://pycloud.blogspot.com/