ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 02 May 2013 15:51:02 +0200How do we get the current time?https://ask.sagemath.org/question/10077/how-do-we-get-the-current-time/I would like to use the current time instead of a password as a key for some encryption. Does anyone know how to obtain the current time with Sage?
Thank you!!!!AyeThu, 02 May 2013 15:51:02 +0200https://ask.sagemath.org/question/10077/timeit messing uphttps://ask.sagemath.org/question/9426/timeit-messing-up/On our Sage server, the timeit stopped working. It did not work in 5.2 and it still does not work in 5.3. I even copied examples directly from a [Sage reference page on timeit](http://www.sagemath.org/doc/reference/sage/misc/sage_timeit_class.html) and it still doesn't work. Any ideas?
timeit('2^10000')
or
timeit.eval('2^10000')
result in:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_31.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("dGltZWl0KCcyXjEwMDAwJyk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpbMe7hW/___code___.py", line 2, in <module>
exec compile(u"timeit('2^10000')" + '\n', '', 'single')
File "", line 1, in <module>
TypeError: 'module' object is not callable
On the other hand, the following works fine, but it gives very low precision so it isn't really helpful.
%time
2^10000
Any ideas???
G-SageMon, 15 Oct 2012 12:23:57 +0200https://ask.sagemath.org/question/9426/tseriesChaos package for R from Sage Notebookhttps://ask.sagemath.org/question/8129/tserieschaos-package-for-r-from-sage-notebook/Hello!
I need some nonlinear time series analysis functionality, which, as I've learnt from Internet, is provided by the 'tseriesChaos' package for R. I tried to use it from inside the Sage Notebook (one of the public servers) like this:
r.library('tseriesChaos')
and got the following error message:
Traceback (click to the left of this block for traceback)
...
there is no package called 'tseriesChaos'
This variant:
%r
library(tseriesChaos)
gave almost the same:
Error in library(tseriesChaos) :
there is no package called 'tseriesChaos'
So it looks like there is no 'tseriesChaos' package in a default Sage installation. So, how is it possible to use it? And how is it probable for the 'tseriesChaos' package to be included into Sage by default?
Thanks.v_2eWed, 25 May 2011 13:12:51 +0200https://ask.sagemath.org/question/8129/Time series analysishttps://ask.sagemath.org/question/8086/time-series-analysis/Being new to TSA, I have some basic questions.
I have 5 minute interval sales data that I want to plot. The plot should have lower, higher and current estimate along with new 1 day prediction.
I understand I can use Holt Winters formula or ARIMA. Can someone help me achieve this (steps and methods) using SAGE?NIshantWed, 20 Apr 2011 09:31:25 +0200https://ask.sagemath.org/question/8086/gap calls seem to consume a lot of timehttps://ask.sagemath.org/question/8046/gap-calls-seem-to-consume-a-lot-of-time/
I am trying to migrate some code from GAP to sage, and the overhead for calls to GAP procedures is enormous. Here is an example:
----------------------------------------------------------------------
| Sage Version 4.6.2, Release Date: 2011-02-25 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: def test1():
....: for x in xrange(100): gap.eval('G:=Group([(1,2,3)])')
....:
sage: def test2():
....: gap.eval('for x in [1..100] do G:=Group([(1,2,3)]);od')
....:
sage: timeit('test1()')
5 loops, best of 3: 810 ms per loop
sage: timeit('test2()')
25 loops, best of 3: 12.6 ms per loop
Is there anything I am doing wrong?
I tried some profiling, which indicated that most of the time is consumed by "select.select".
Any help will be most welcome.parzanSat, 02 Apr 2011 13:30:45 +0200https://ask.sagemath.org/question/8046/time in notebookhttps://ask.sagemath.org/question/7766/time-in-notebook/Hello!
Could you help me? I need to know the time of a sage program written in the notebook, but when I use the timeit command, it doesn't work if I use "for" iterators in the program. KatikaMon, 06 Dec 2010 08:35:27 +0100https://ask.sagemath.org/question/7766/%time inline in notebook?https://ask.sagemath.org/question/7616/time-inline-in-notebook/I've noticed I can use %time from the terminal/sage CLI inline with a statement; but I get a syntax error in the notebook. Is there a way I can put %time inline inside a notebook cell?
"%time; statement" or "%time statement" doesn't work (in the notebook).
Aside: It would be nice if I could get the starting time (of evaluation) as a side-effect too, not just the CPU and Wall Time.
ccanoncMon, 23 Aug 2010 14:13:36 +0200https://ask.sagemath.org/question/7616/What's a good way to track spawned time on a shared server?https://ask.sagemath.org/question/7649/whats-a-good-way-to-track-spawned-time-on-a-shared-server/Sometimes I'm running more than one notebook at a time; and since %time sometimes puts almost everything into Wall Time when I'm mostly using subprocesses, the Wall Time doesn't give me a good picture of the time spent since multiple notebooks are running. How can I work around this measurement problem?ccanoncSun, 29 Aug 2010 05:02:21 +0200https://ask.sagemath.org/question/7649/Is there a way to make an audible noise when a computation is complete?https://ask.sagemath.org/question/7607/is-there-a-way-to-make-an-audible-noise-when-a-computation-is-complete/I tried printing the alert bell ("\a") and didn't hear anything. Tips?ccanoncSat, 21 Aug 2010 10:40:34 +0200https://ask.sagemath.org/question/7607/