Re: [sage-support] Docstring on adding a user

2010-03-05 Thread Dan Drake
On Fri, 05 Mar 2010 at 07:25PM -0800, Kwankyu wrote:
> The following is an excerpt from the docstring of notebook() about how
> to add a new user:
> 
> accounts – boolean (default: False) if True, any visitor to the
> website will be able to create a new account. If False, only the admin
> can create accounts (currently, this can only be done by running with
> accounts=True and shutting down the server properly (SIG_INT or
> SIG_TERM), or on the command line with, e.g.,
> 
> from sagenb.notebook.notebook import load_notebook
> nb = load_notebook(dir)
> nb.set_accounts(True)
> nb.add_user("username", "password", "em...@place", "user")
> nb.save()

Actually, it's even more wrong than you think -- the admin user can now
add regular users from the notebook. Log in as admin, then click on
Settings -> Manage Users -> Add User. The text above should definitely
be updated.

Thanks for pointing this out. This is now
http://trac.sagemath.org/sage_trac/ticket/8454.

Dan

-- 
---  Dan Drake
-  http://mathsci.kaist.ac.kr/~drake
---


signature.asc
Description: Digital signature


[sage-support] set_edge_label is setting labels on intended and unintended graph

2010-03-05 Thread m_p_v_13
set_edge_label is setting labels on intended and unintended graph

I generate some graphs and set one's edge labels. When I look at the
next genetated graph, it's edge labels have been changed.
I'm new to Sage/python so perhaps I goofed, but I doubt it.  Thanks
for an explanation or workaround.

I am trying to help my daughter investigate an edge coloring graph
theory problem.  Not the normal edge coloring constraint, though.



See the  I added to the output section.



for G in graphs(3):
  if G.is_connected():
  A = G.adjacency_matrix()
  print "Adjacency Matrix:"
  print A
  print "Edges:"
  for e in G.edge_iterator( labels=True):
  print e
  #G.plot( edge_labels=True )
  print "Setting edge labels..."
  for i in G.edge_iterator( labels=True):
  #print i
  #print type( i )
  G.set_edge_label( i[0], i[1], 'Red' )
  print "Adjacency Matrix:"
  print A
  print "Edges:"
  for j in G.edge_iterator( labels=True):
  print j
  #G.plot( edge_labels=True )
  print ""







Adjacency Matrix:
[0 1 1]
[1 0 0]
[1 0 0]
Edges:
(0, 1, None)
(0, 2, None)
Setting edge labels...
Adjacency Matrix:
[0 1 1]
[1 0 0]
[1 0 0]
Edges:
(0, 1, 'Red')
(0, 2, 'Red')

Adjacency Matrix:
[0 1 1]
[1 0 1]
[1 1 0]
Edges:
(0, 1,
'Red')

(0, 2,
'Red')

(1, 2, None)
Setting edge labels...
Adjacency Matrix:
[0 1 1]
[1 0 1]
[1 1 0]
Edges:
(0, 1, 'Red')
(0, 2, 'Red')
(1, 2, 'Red')


-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: mismatched gfortran/gcc/g++ version

2010-03-05 Thread David Kirkby


On Mar 5, 3:45 am, dmharvey  wrote:
> Hi, I get the following build failure for sage 4.3.2 on alhambra (a
> machine known to some people on this list):
>
> configure: Exiting since the Fortran compiler is not the same
> configure: error: version as the C and C++ compilers
>  ERROR: You do not have all of the prerequisites needed
>  to build Sage from source.  See the errors above.
> make[1]: *** [installed/prereq-0.7] Error 1
> make[1]: Leaving directory `/home/dmharvey/sage-4.3.2/spkg'
>
> In fact we have:
>
> alhambra$ gcc --version
> gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
>
> alhambra$ g++ --version
> g++ (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
>
> alhambra$ gfortran --version
> GNU Fortran (GCC) 4.2.1 (Ubuntu 4.2.1-5ubuntu4)
>
> Is there a workaround for this, or do I need to bug the sysadmin...?
>
> david

You might try

$ which gfortran

and see if there is gcc and g++ in that directory too. In which case
put that directory in your path earlier. It's impossible to build gcc
with just Fortran support, so I would suspect there is a gcc 4.2.1 and
g++ 4.2.1 on your system. Finding where gfortran is, would probably
lead you to the location of the more recent gcc and g++.

I suspect someone build gcc 4.1.3 without Fortran support, then built
a later version with Fortran support. If 4.1.3 is in your path first,
then the old versions of gcc would be found, but a new version of g+
+.

Mixing compiler versions would be risky. That is why I added that
test.

Dave

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Docstring on adding a user

2010-03-05 Thread Kwankyu
Hi,

The following is an excerpt from the docstring of notebook() about how
to add a new user:

accounts – boolean (default: False) if True, any visitor to the
website will be able to create a new account. If False, only the admin
can create accounts (currently, this can only be done by running with
accounts=True and shutting down the server properly (SIG_INT or
SIG_TERM), or on the command line with, e.g.,

from sagenb.notebook.notebook import load_notebook
nb = load_notebook(dir)
nb.set_accounts(True)
nb.add_user("username", "password", "em...@place", "user")
nb.save()


Trying to follow the explanation, I spent some time just to fail. Now
having succeeded to add a user, I think the documentation is obscure.
How about the following or something better?

... If False, only the admin can create accounts. Currently to add an
account, shut down the server properly and type on the command line,
e.g.,

sage: from sagenb.notebook.notebook import load_notebook
sage: nb = load_notebook(dir)
sage: nb.set_accounts(True)
sage: nb.add_user("username", "password", "em...@place", "user")
sage: nb.save()

where dir is the directory of the sage notebook with default being
`.sage/sage_notebook.sagenb', and restart the server.


Kwankyu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Documentation update request

2010-03-05 Thread Kevin Marinelli
Thanks. I will do so.

Kevin

On Mar 5, 2010, at 7:35 PM, Minh Nguyen wrote:

> Hi Kevin,
> 
> On Sat, Mar 6, 2010 at 7:33 AM, Kevin Marinelli  
> wrote:
>> On the web page http://wiki.sagemath.org/DownloadAndInstallationGuide, there
>> is some slight misinformation for Macintosh
>> computers which seems to be causing some people to have confusion about
>> which version of Sage to install.
> 
> The page
> 
> http://wiki.sagemath.org/DownloadAndInstallationGuide
> 
> is a community wiki. The documentation therein is generated and
> maintained by the Sage community. I invite you to edit it as
> necessary. All you need to do is login with your username and
> password, or create an account for yourself.
> 
> -- 
> Regards
> Minh Van Nguyen
> 
> -- 
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to 
> sage-support+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Documentation update request

2010-03-05 Thread Minh Nguyen
Hi Kevin,

On Sat, Mar 6, 2010 at 7:33 AM, Kevin Marinelli  wrote:
> On the web page http://wiki.sagemath.org/DownloadAndInstallationGuide, there
> is some slight misinformation for Macintosh
> computers which seems to be causing some people to have confusion about
> which version of Sage to install.

The page

http://wiki.sagemath.org/DownloadAndInstallationGuide

is a community wiki. The documentation therein is generated and
maintained by the Sage community. I invite you to edit it as
necessary. All you need to do is login with your username and
password, or create an account for yourself.

-- 
Regards
Minh Van Nguyen

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Documentation update request

2010-03-05 Thread Kevin Marinelli
On the web page http://wiki.sagemath.org/DownloadAndInstallationGuide, there is 
some slight misinformation for Macintosh 
computers which seems to be causing some people to have confusion about which 
version of Sage to install. If the Processor 
type is reported as "Intel Core Duo", people should be directed to install the 
32-bit Intel version of the software, even if the O/S 
is running MacOS X 1.5 or greater, because these processors are 32-bit and not 
64-bit, even though the O/S is 64-bit capable.

Running the 64-bit application on a 32-bit processor will result in the 
commonly found error:

> --
> | Sage Version 4.3.2, Release Date: 2010-02-06   |
> | Type notebook() for the GUI, and license() for information.|
> --
> env: python: Bad CPU type in executable


Kevin Marinelli
UConn Mathematics

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Jmol script terminates in Firefox

2010-03-05 Thread Dana Ernst
I'm running OSX 10.6 and every time I try to do a 3d plot in Firefox, the Jmol 
script terminates.  This happens in my local Sage notebook and at sagenb.org.  
I'm not having this problem using Safari.

Is this a problem on my end or a commonly occurring issue?

As usual, thanks for the great support.


Dana Ernst, Ph.D.
Assistant Professor
Department of Mathematics
Plymouth State University
MSC 29, 17 High Street
Plymouth, NH 03264-1595

Email: dcer...@plymouth.edu
Web Page: http://oz.plymouth.edu/~dcernst
Office: Hyde 312

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Re: Why does my little program bring my department's server to its knees?

2010-03-05 Thread Justin C. Walker


On Mar 4, 2010, at 5:18 PM, Simon King wrote:


Hi Yann!

On 5 Mrz., 00:49, Yann  wrote:

sage: R.=QQ[]
sage: while True:
: f=x+1

this eats up memory... it's bad


On the bright side, such a short example will probably be very helpful
to detect the problem.

Note that the memory is not constantly increasing: it jumps:


FWIW, I think that this (the call to get_memory_usage()) reports  
usage from the OS's point of view: how much of your virtual address  
space (or perhaps just the "data" segment of that space) has been  
allocated.  Each allocation gives a large chunk of memory to the  
process, and then the process allocates from that new chunk until it  
runs out, and then the OS allocates more (at which point,  
get_memory_usage() reports a larger size).


Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Absorption of Federal Funds

If you're not confused,
You're not paying attention




--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: mismatched gfortran/gcc/g++ version

2010-03-05 Thread dmharvey

> You should definitely get Arthur to install the right Fortran.   It's
> just asking for trouble to use the wrong version.

ok, thanks I will do that.

david

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] On computing logarithm in a finite field

2010-03-05 Thread yujia chiu
Dear Minh,

Thanks a lot.


On 5 March 2010 14:06, Minh Nguyen  wrote:

> Hi Yujia,
>
> On Fri, Mar 5, 2010 at 11:58 PM, yujia chiu  wrote:
> > Thanks for your advice, but my sage says that 'discrete_log' is not
> defined
>
> [mv...@sage ~]$ sage
> --
> | Sage Version 4.3.3, Release Date: 2010-02-21   |
> | Type notebook() for the GUI, and license() for information.|
> --
> sage: b = Mod(2, 37); a = b^20
> sage: discrete_log(a, b)
> 20
> sage: K = GF(3^6, "b")
> sage: b = K.gen()
> sage: a = b^210
> sage: discrete_log(a, b, K.order() - 1)
> 210
>
> --
> Regards
> Minh Van Nguyen
>
> --
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>



-- 
Kind Regards,
Yujia Qiu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] On computing logarithm in a finite field

2010-03-05 Thread Minh Nguyen
Hi Yujia,

On Fri, Mar 5, 2010 at 11:58 PM, yujia chiu  wrote:
> Thanks for your advice, but my sage says that 'discrete_log' is not defined

[mv...@sage ~]$ sage
--
| Sage Version 4.3.3, Release Date: 2010-02-21   |
| Type notebook() for the GUI, and license() for information.|
--
sage: b = Mod(2, 37); a = b^20
sage: discrete_log(a, b)
20
sage: K = GF(3^6, "b")
sage: b = K.gen()
sage: a = b^210
sage: discrete_log(a, b, K.order() - 1)
210

-- 
Regards
Minh Van Nguyen

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] On computing logarithm in a finite field

2010-03-05 Thread yujia chiu
Thanks for your advice, but my sage says that 'discrete_log' is not defined
:(

On 5 March 2010 13:21, David Joyner  wrote:

> Did you also try discrete_log(a,b)?
>
>
> On Fri, Mar 5, 2010 at 7:03 AM, yujia chiu  wrote:
> >
> > Dear all,
> > I tried to compute the logarithm of b based a in a finite field. But it
> > seemed that the b.log(a) command in sage only works when a generates the
> > multiplicative group of the finite field. Unfortunately, my a doesn't,
> > although I already showed that b is indeed a power of a.
> > Could you please tell me how to solve this problem? Thanks in advance.
> > --
> > Kind Regards,
> > Yujia Qiu
> >
> > --
> > To post to this group, send email to sage-support@googlegroups.com
> > To unsubscribe from this group, send email to
> > sage-support+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/sage-support
> > URL: http://www.sagemath.org
> >
>
> --
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>



-- 
Kind Regards,
Yujia Qiu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: Why does my little program bring my department's server to its knees?

2010-03-05 Thread Simon King
Hi Marshall,

On Mar 5, 1:32 am, Marshall Hampton  wrote:
> I haven't made a ticket yet.  I forwarded it to sage-devel first,
> where more people with expertise will see it.  But as far as I know
> this was not a known problem and it should get a ticket.

Done: I created a ticket at  http://trac.sagemath.org/sage_trac/ticket/8444

Cheers,
Simon

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] On computing logarithm in a finite field

2010-03-05 Thread David Joyner
Did you also try discrete_log(a,b)?


On Fri, Mar 5, 2010 at 7:03 AM, yujia chiu  wrote:
>
> Dear all,
> I tried to compute the logarithm of b based a in a finite field. But it
> seemed that the b.log(a) command in sage only works when a generates the
> multiplicative group of the finite field. Unfortunately, my a doesn't,
> although I already showed that b is indeed a power of a.
> Could you please tell me how to solve this problem? Thanks in advance.
> --
> Kind Regards,
> Yujia Qiu
>
> --
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Re: [sage-edu] interact - how to use loop for iteration to draw many inputbox

2010-03-05 Thread David Joyner
I don't know, but I'm ccing sage-support just in case
someone there knows.


On Fri, Mar 5, 2010 at 1:16 AM, marius_darie  wrote:
> Dear all,
>
> How to use loop for iteration to draw many inputbox (interact).
> I do not want use input_grid because just one label is accepted for
> entirely group.
>
> Thank you,
> Marius Darie
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-edu" group.
> To post to this group, send email to sage-...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sage-edu+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sage-edu?hl=en.
>
>

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] On computing logarithm in a finite field

2010-03-05 Thread yujia chiu
Dear all,

I tried to compute the logarithm of b based a in a finite field. But it
seemed that the b.log(a) command in sage only works when a generates the
multiplicative group of the finite field. Unfortunately, my a doesn't,
although I already showed that b is indeed a power of a.
Could you please tell me how to solve this problem? Thanks in advance.

-- 
Kind Regards,
Yujia Qiu

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org