• Stars
    star
    202
  • Rank 193,691 (Top 4 %)
  • Language
    Python
  • License
    Other
  • Created almost 14 years ago
  • Updated 16 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Sage Cell Server---providing a way to embed Sage computations into any web page.

This is SageMathCell - a Sage computation web service.

Our mailing list is https://groups.google.com/forum/#!forum/sage-cell

Security Warning

If you are going to run a world accessible SageMathCell server, you must understand security implications and should be able to implement reasonable precautions.

The worker account (which is your own one by default) will be able to execute arbitrary code, which may be malicious. Make sure that you are securing the account properly. Working with a professional IT person is a very good idea here. Since the untrusted accounts can be on any computer, one way to isolate these accounts is to host them in a virtual machine that can be reset if the machine is compromised.

Simple Installation

We assume that you have access to the Internet and can install any needed dependencies. If you need to know more precisely what tools are needed, please consult the scripts for building virtual machine images in contrib/vm. In particular, system packages installed in the base container are listed here.

  1. Install requirejs:

    sudo apt-get install npm
    # On Debian based systems we need to make an alias
    sudo ln -s /usr/bin/nodejs /usr/bin/node
  2. Get and build Sage (export MAKE="make -j8" or something similar can speed things up):

    git clone https://github.com/sagemath/sage.git
    pushd sage
    ./bootstrap
    ./configure --enable-download-from-upstream-url
    # read messages at the end, follow instructions given there.
    # possibly install more system packages (using apt-get, if on Debian/Ubuntu)
    make
    popd
  3. Prepare Sage for SageMathCell:

    sage/sage -pip install lockfile
    sage/sage -pip install paramiko
    sage/sage -pip install sockjs-tornado
    sage/sage -pip install sqlalchemy
  4. Build SageMathCell:

    git clone https://github.com/sagemath/sagecell.git
    pushd sagecell
    ../sage/sage -sh -c make

To build just the Javascript components, from the sagecell directory run

make static/embedded_sagecell.js

By default, Javascript dependencies are copied from an existing Sage install. To fetch dependencies from Github instead, you can run

export FETCH_SAGE_DEPS=yes
make static/embedded_sagecell.js

Configuration

  1. Go into the sagecell directory (you are there in the end of the above instructions).

  2. Copy config_default.py to config.py. (Or fill config.py only with entries that you wish to change from default values.)

  3. Edit config.py according to your needs. Of particular interest are host and username entries of the provider_info dictionary: you should be able to SSH to username@host without typing in a password. For example, by default, it assumes you can do ssh localhost without typing in a password. Unless you are running a private and firewalled server for youself, you’ll want to change this to a more restrictive account; otherwise anyone will be able to execute any code under your username. You can set up a passwordless account using SSH: type “ssh passwordless login” into Google to find lots of guides for doing this, like http://www.debian-administration.org/articles/152. You may also wish to adjust db_config["uri"] (make the database files readable only by the trusted account).

  4. You may want to adjust log.py to suit your needs and/or adjust system configuration. By default logging is done via syslog which handles multiple processes better than plain files.

  5. Start the server via

    ../sage/sage web_server.py [-p <PORT_NUMBER>]

    where the default <PORT_NUMBER> is 8888 and go to http://localhost:<PORT_NUMBER> to use the Sage Cell server.

    When you want to shut down the server, press Ctrl-C in the same terminal.

Javascript Development

Javascript source files are compiled using Webpack. Sagecell depends on source files copied from the Jupyter notebook project. To start development navigate to the sagecell source directory and run

npm install
npm run build:deps

After this, all dependencies will be located in the build/vendor directory. You can now run

npm run build

to build build/embedded_sagecell.js

or

npm run watch

to build build/embedded_sagecell.js and watch files for changes. If a file is changed, embedded_sagecell.js will be automatically rebuilt.

License

See the LICENSE.txt file for terms and conditions for usage and a DISCLAIMER OF ALL WARRANTIES.

Browser Compatibility

SageMathCell is designed to be compatible with recent versions of:

  • Chrome
  • Firefox
  • Internet Explorer
  • Opera
  • Safari

If you notice issues with any of these browsers, please let us know.

More Repositories

1

sage-archive-2023-02-01

This repository used to be the user-facing mirror of the Sage source tree. As Sage development migrated on 2023-02-01 from https://trac.sagemath.org/ to our new repository on GitHub, https://github.com/sagemath/sage, we have renamed and archived this repository.
Python
2,015
star
2

sage

Main repository of SageMath
Python
1,398
star
3

sage-windows-cygwin

Build tools for the Sagemath Windows installer
Shell
350
star
4

cloud

*MOVED TO* https://github.com/sagemathinc/cocalc
JavaScript
137
star
5

sagenb

Sage Notebook (flask), docs in $SAGE_LOCAL/share/doc/sagenb/index.html
Python
116
star
6

sage-shell-mode

Emacs front end for SageMath
Emacs Lisp
102
star
7

android

Sage's Android App (GSoC 2014)
Java
73
star
8

sagetex

Embed code, results of computations, and plots from the Sage mathematics software suite (https://www.sagemath.org) into LaTeX documents. Source repository for https://pypi.org/project/sagetex/ and https://ctan.org/pkg/sagetex
TeX
58
star
9

docker-images

Dockerfiles for Sage
Makefile
54
star
10

cysignals

cysignals: interrupt and signal handling for Cython. Source repository for https://pypi.org/project/cysignals/
Cython
43
star
11

website

Source for https://www.sagemath.org/; submit Issues/PRs here to update the website
HTML
39
star
12

sagelib

Git mirror of http://hg.sagemath.org/sage-main/
Python
38
star
13

ob-sagemath

org-babel integration with SageMath
Emacs Lisp
34
star
14

sagemath.github.io

Hosting https://www.sagemath.org files; send Issues/PRs to repositories https://github.com/sagemath/website, https://github.com/sagemath/publications, not this one here!
HTML
34
star
15

more-sagemath-tutorials

More SageMath Tutorials: A place to share and evolve tutorials for Sage, with the aim to contribute them to Sage
Jupyter Notebook
32
star
16

cypari2

Python interface to the number theory library PARI/GP. Source repository for https://pypi.org/project/cypari2/
Cython
30
star
17

sage-binder-env

A Binder repo for SageMath computing environment
Jupyter Notebook
27
star
18

publications

Source for https://www.sagemath.org/library-publications.html; submit Issues/PRs here to add/update citations of documents citing Sage
TeX
24
star
19

sage_sample

A sample project illustrating how to write and distribute SageMath extensions
Python
17
star
20

binary-pkg

Tools for creating binary tarballs
Python
14
star
21

git-trac-command

A "git trac" subcommand for git
Python
13
star
22

pari-jupyter

Jupyter kernel for PARI/GP. Source repository for https://pypi.org/project/pari-jupyter/
JavaScript
11
star
23

sagetrac-mirror

Archive of the git branches attached to tickets on https://trac.sagemath.org/ before the migration to GitHub (Jan 30, 2023)
Python
11
star
24

documentation

Only hosting https://doc.sagemath.org/ files. Updates to the documentation must be made with PRs to https://github.com/sagemath/sage, not here.
HTML
11
star
25

sage-workflow

script(s) to help with the transition to a single Sage repository
Python
10
star
26

git-developer-guide

Git version of the Sage developer manual
Python
10
star
27

sage-combinat-widgets

A collection of Jupyter widgets for combinatorial objects in SageMath
Python
8
star
28

sage-patchbot

Sage Patchbot
Python
8
star
29

auto-complete-sage

An auto-complete source for sage-shell-mode
Emacs Lisp
8
star
30

FlintQS

Quadratic Sieve
C++
8
star
31

memory_allocator

Cython extension class to allocate memory. Source repository for https://pypi.org/project/memory-allocator/
Cython
8
star
32

grant-europe

The H2020 Grant proposal.
TeX
7
star
33

pplpy

Python wrapper to the PPL library. Source repository for https://pypi.org/project/pplpy/
Cython
7
star
34

sage-explorer

A Jupyter widget for exploring SageMath objects
Python
6
star
35

sagesmc

The git repo for the SageMathCloud's system-wide Sage install
Python
6
star
36

threejs-sage

Custom build of Three.js for SageMath
6
star
37

sage-numerical-backends-gurobi

Gurobi mixed integer linear programming backend for SageMath. Source repository for https://pypi.org/project/sage-numerical-backends-gurobi/, can be installed on top of distributions providing SageMath. See also https://github.com/sagemath/sage-numerical-backends-cplex and https://github.com/sagemath/sage-numerical-backends-coin
Cython
6
star
38

helm-sage

A helm extension for sage-shell-mode
Emacs Lisp
5
star
39

strongly_regular_graphs_database

A database of strongly regular graphs for Sage
Python
5
star
40

sage-package

Utilities for authoring packages for SageMath. Source repository for https://pypi.org/project/sage-package/
HTML
5
star
41

sage_trac_plugin

Trac plugin used to support Sage development at trac.sagemath.org
Python
5
star
42

office-hours

Virtual office hours on youtube -- notes
4
star
43

sage-migration-preview-2023-02-02

Preview of the import of Trac tickets using https://github.com/sagemath/trac-to-github
4
star
44

p_group_cohomology

Sage package for computing modular cohomology rings of finite groups
Cython
4
star
45

planet

planet.sagemath.org: source in master, files in gh-pages
Python
4
star
46

modular_resolution

modular_resolution, a C library part of p_group_cohomology
Shell
4
star
47

pari-utils

Utility tools for PARI/GP
Python
3
star
48

anything-sage

An anything extension for sage-shell-mode
Emacs Lisp
3
star
49

database_stein_watkins

The Stein-Watkins database of elliptic curves
3
star
50

artwork

collection of various graphics related to SageMath
3
star
51

sage-numerical-backends-coin

COIN-OR mixed integer linear programming backend for SageMath. Source repository for https://pypi.org/project/sage-numerical-backends-coin/, can be installed on top of distributions providing SageMath. See also https://github.com/sagemath/sage-numerical-backends-gurobi and https://github.com/sagemath/sage-numerical-backends-cplex
Cython
3
star
52

sage_trac

Python
2
star
53

trac-githooks

Python
2
star
54

sage-numerical-backends-cplex

CPLEX mixed integer linear programming backend for SageMath. Source repository for https://pypi.org/project/sage-numerical-backends-cplex/, can be installed on top of distributions providing SageMath. See also https://github.com/sagemath/sage-numerical-backends-coin and https://github.com/sagemath/sage-numerical-backends-gurobi
Cython
2
star
55

utmost-website

UTMOST Website
Python
2
star
56

codemirror-sage-mode

for developing a codemirror sage mode
1
star
57

company-sage

Emacs Lisp
1
star
58

combinat

Website combinat.sagemath.org (redirect to https://wiki.sagemath.org/combinat)
HTML
1
star
59

files

skeleton repo for served files on the mirror network
1
star
60

asv-data

Collects doctest timings from the Sage repository for speed regression testing with Airspeed Velocity
1
star
61

giac

Fork of https://salsa.debian.org/science-team/giac for the purpose of tracking the upstream Giac sources at http://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source – branch sagemath adds integration testing with SageMath on GH Actions
C++
1
star
62

trac.sagemath.org

GitHub pages for redirecting trac.sagemath.org to the new sagemath/sage GitHub repo
HTML
1
star
63

cloud.sagemath.org

redirect to cocalc
HTML
1
star
64

sage-wheels

Prebuilt wheels of the SageMath distribution
1
star
65

sage-release-management

Utility scripts for release managements
Python
1
star
66

binary-pkg-test

Test for the binary-pkg repo
C++
1
star
67

trac-dump

dump of sage's trac database
1
star
68

sagewiki_to_gh-2022-10-10

Output from the sagewiki-to-github migration script with input = an archive of https://wiki.sagemath.org/ from October 2022
Jupyter Notebook
1
star
69

conway-polynomials

Python interface to Frank Lübeck's Conway polynomial database
Python
1
star