##// END OF EJS Templates
Fix XSS reported on Security list...
Fix XSS reported on Security list No CVE-ID yet August 18, 2015 ----- Reported to Quantopian by Juan Broullón <thebrowfc@gmail.com>... If you create a new folder in the iPython file browser and set Javascript code as its name the code injected will be executed. So, if I create a folder called "><img src=x onerror=alert(document.cookie)> and then I access to it, the cookies will be prompted. The XSS code is also executed if you access a link pointing directly at the folder. jik ------

File last commit:

r20541:1e566dcc
r21633:3ab41641
Show More
Factoring.ipynb
115 lines | 2.1 KiB | text/plain | TextLexer

Factoring Polynomials with SymPy

Here is an example that uses SymPy to factor polynomials.

In [ ]:
from IPython.html.widgets import interact
from IPython.display import display
In [ ]:
from sympy import Symbol, Eq, factor, init_printing
init_printing(use_latex='mathjax')
In [ ]:
x = Symbol('x')
In [ ]:
def factorit(n):
    display(Eq(x**n-1, factor(x**n-1)))

Notice how the output of the factorit function is properly formatted LaTeX.

In [ ]:
factorit(12)
In [ ]:
interact(factorit, n=(2,40));