Attachment 'start_notebook.sage'

Download

   1 # A script for starting the Sage notebook with the options you like.
   2 # Change the options to your needs, save this script and do "sage
   3 # start_notebook.sage" to start the notebook with these options.
   4 #
   5 # by Dan Drake; see http://wiki.sagemath.org/DanDrake/JustEnoughSageServer
   6 
   7 # we'll stuff everything into a dictionary and pass that on to notebook()
   8 nbopts = {}
   9 
  10 # listen on all addresses
  11 nbopts['address'] = ''
  12 
  13 # use https, not http
  14 nbopts['secure'] = True
  15 
  16 # don't open a viewer, I'll do that myself thankyouverymuch
  17 nbopts['open_viewer'] = False
  18 
  19 # use this directory for nb files; must be writable by the nb? users
  20 nbopts['directory'] = '/home/sageadm/nbfiles'
  21 
  22 # at most 500MB memory, 100MB files, 100 processes for nb? users
  23 nbopts['ulimit'] = '-v 500000 -f 100000 -u 100'
  24 
  25 # time out idle sessions after two hours
  26 nbopts['timeout'] = 7200
  27 
  28 # yes, can create new accounts
  29 nbopts['accounts'] = True
  30 
  31 # use these minions to do our bidding
  32 nbopts['server_pool'] = ['nb%s@localhost' % n for n in [1..5]]
  33 
  34 # Go!
  35 notebook(**nbopts)

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2008-10-21 08:22:08, 1.0 KB) [[attachment:start_notebook.sage]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.