Ask Your Question

stef's profile - activity

2021-12-15 13:57:20 +0200 received badge  Famous Question (source)
2017-03-17 14:41:35 +0200 received badge  Famous Question (source)
2015-01-06 17:09:38 +0200 received badge  Notable Question (source)
2013-11-17 13:33:13 +0200 received badge  Notable Question (source)
2013-03-27 06:04:11 +0200 received badge  Popular Question (source)
2012-12-04 03:53:23 +0200 received badge  Popular Question (source)
2012-01-24 17:49:39 +0200 received badge  Good Question (source)
2012-01-24 06:14:48 +0200 received badge  Nice Question (source)
2012-01-23 14:56:31 +0200 commented answer Overview of security and memory management?

Thanks for the insight!

2012-01-23 11:50:43 +0200 received badge  Student (source)
2012-01-23 11:10:48 +0200 asked a question Overview of security and memory management?

Hi all,

I've been looking around the documentation for an explanation of how Sage is able to sandbox user code to prevent unauthorized access to the system the platform is being hosted on. Given that Sage Notebook is deployed in production on a public server, how does the platform isolate user environments/worksheets? Furthermore, how does Sage manage memory on a per-worksheet basis?

I'd appreciate any insight from those who have deployed Sage in a production environment, either internal or external to an organization. +5 pts if you have a sys admin background!


(For what it's worth, I've been going through the thesis titled "Securing the Sage Notebook", but I'd also like some more practical input. I'll be scrounging through the dev discussion threads for an answer as well and will follow up if I come across any good explanations.)

2012-01-23 11:01:58 +0200 commented answer Generating dynamic latex

This was close, however you can't generate arbitrary LaTeX code with the `\sage` command. `latex.eval()` ended up being what I was looking for. Thanks for your input though!

2012-01-23 11:00:57 +0200 received badge  Supporter (source)
2012-01-23 11:00:51 +0200 commented answer Generating dynamic latex

That's it! Thanks! I was able to dynamically generate a table by iterating over data and constructing the corresponding formatting. I was able to use the globals dictionary to pass data in so that it can be rendered inside of `\sage{}` calls, but what purpose does the `locals` argument serve?

2012-01-23 10:59:21 +0200 marked best answer Generating dynamic latex

You can use

Latex().eval(my_string, globals=globals)

as explained in this answer to a similar question.

2012-01-23 10:59:21 +0200 received badge  Scholar (source)
2012-01-21 03:51:10 +0200 commented answer Generating dynamic latex

Oh - I'd like to try and do it within the context of notebook. I'm just trying to demo Sage for use in connecting to Apache Hive to generate summary reports on data. I've been able to generate some limited success by calling `latex.eval("...")` where the string can be dynamically constructed with data. It also helps to pass in data via the `locals` construct, allowing for that data to be referenced inside `\sage{}` blocks. However, the rendering of `latex.eval()` has been somewhat subpar. For example: latex.eval(r""" \documentclass[12pt]{article} \usepackage[margin=0.20in,landscape]{geometry} \usepackage{colortbl} \usepackage[table]{xcolor} \begin{document} \begin{tabular}{ cccccccccc } \hline \rowcolor[rgb]{0.21,0.37,0.58}... \end{tabular} \end{document}""",{})

2012-01-20 21:59:04 +0200 received badge  Editor (source)
2012-01-20 21:58:31 +0200 asked a question Generating dynamic latex

Is there any way to dynamically generate $\LaTeX$ code in a block preceeded by %latex? This could be useful for taking a data structure and iterating through it to create a data table using the corresponding data.