Ask Your Question

stef's profile - activity

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

Thanks for the insight!

2012-01-23 04:50:43 -0600 received badge  Student (source)
2012-01-23 04:10:48 -0600 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!

Thanks!

(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 04:01:58 -0600 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 04:00:57 -0600 received badge  Supporter (source)
2012-01-23 04:00:51 -0600 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 03:59:21 -0600 received badge  Scholar (source)
2012-01-23 03:59:21 -0600 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-20 20:51:10 -0600 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 14:59:04 -0600 received badge  Editor (source)
2012-01-20 14:58:31 -0600 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.

Thanks!