CoCalc Public Filestmp / 2017-02-15-075604.sagews
Author: William A. Stein
%html
<div id='foobar'>
Stuff and $x^3$
</div>

Stuff and $x^3$
%md
What the $x^3$ ?


What the $x^3$ ?

x^3
show(x^3)
5

x^3
$\displaystyle x^{3}$
5
2+3

5
%auto
@interact
def f(n=(10,(1..100))):
print [n^i for i in range(10)]


show_identifiers()

['N', 'colors', 'plt', 'np', 'area', 'a', 'b', 'smc_sagews', 'y', 'x']
a = polygon2d([(0,0), (1,2), (1/2,pi), (1/2,pi/2)], color='orange')
b = polygon2d([(0,0), (1,2), (1/2,pi), (1/2,pi/2)], color='black', fill=False, thickness=3)
show(a + b)

import numpy as np
import matplotlib.pyplot as plt

N = 50
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
area = np.pi * (15 * np.random.rand(N))**2  # 0 to 15 point radii

plt.scatter(x, y, s=area, c=colors, alpha=0.5)
plt.show()

<matplotlib.collections.PathCollection object at 0x7f848faece50>
2+ 3

5
import smc_sagews.sage_salvus

smc_sagews.sage_salvus.is_dataframe??

   File: /projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py
Source:
def is_dataframe(obj):
if 'pandas' not in str(type(obj)):
# avoid having to import pandas unless it's really likely to be necessary.
return
# CRITICAL: do not import pandas at the top level since it can take up to 3s -- it's **HORRIBLE**.
try:
from pandas import DataFrame
except:
return False
return isinstance(obj, DataFrame)