Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/pages/features/jupyter-notebook.tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Layout } from "antd";67import { Icon } from "@cocalc/frontend/components/icon";8import { COLORS } from "@cocalc/util/theme";9import Backups from "components/landing/backups";10import Comparison from "components/landing/compare";11import Content from "components/landing/content";12import Footer from "components/landing/footer";13import Head from "components/landing/head";14import Header from "components/landing/header";15import Info from "components/landing/info";16import LaTeX from "components/landing/latex";17import Pitch from "components/landing/pitch";18import SignIn from "components/landing/sign-in";19import { Paragraph, Title } from "components/misc";20import A from "components/misc/A";21import { Customize } from "lib/customize";22import withCustomize from "lib/with-customize";23import { ChatGPTFixError } from "./ai";2425import JupyterChat from "/public/features/cocalc-chat-jupyter-20171120-2.png";26import JupyterKernels from "/public/features/cocalc-jupyter-kernels.png";27import Nbgrader from "/public/features/cocalc-jupyter-nbgrader-overview.png";28import JupyterNasa from "/public/features/cocalc-jupyter-share-nasa.png";29import JupyterTF from "/public/features/cocalc-jupyter2-20170508.png";30import JupyterMem from "/public/features/cocalc-jupyter2-memory-cpu.png";31import RTC from "/public/features/cocalc-real-time-jupyter.png";32import JupyterLab from "/public/features/jupyter-lab.png";33import JupyterLogo from "/public/features/jupyter-logo.svg";3435export default function JupyterNotebook({ customize }) {36function pitchNoSetup() {37return (38<>39<Title level={2}>40No software setup: <small>100% online</small>41</Title>42<Paragraph>43CoCalc is an online web service where you can{" "}44<strong>45run <A href="http://jupyter.org/">Jupyter notebooks</A> right inside46your browser47</strong>48. You can privately share your notebook with your{" "}49<A href="https://doc.cocalc.com/project-settings.html#about-collaborators">50project collaborators51</A>{" "}52– all changes are{" "}53<A href="#a-realtimesync">54<strong>synchronized in real-time</strong>55</A>56.57</Paragraph>58<Paragraph>59You no longer have to worry about setting up your Python environment,60installing/updating/maintaining your libraries, or backing up files.61CoCalc manages everything for you!{" "}62</Paragraph>63</>64);65}6667function pitchTeaching() {68return (69<>70<Title level={2}>Jupyter Notebooks made for teaching!</Title>71<Paragraph>72<ul>73<li>74A sophisticated{" "}75<strong>76<A href="/features/teaching">course management system</A>77</strong>{" "}78keeps track of all notebooks of all students. It manages79distributing and collecting files as well as grading.80</li>81<li>82The{" "}83<A href="/features/whiteboard">84Jupyter collaborative whiteboard85</A>{" "}86supports presentations that mix Jupyter cells, mathematical87notation, and sketching with a pen and other tools.88</li>89<li>90CoCalc{"'"}s Jupyter Notebooks fully support{" "}91<A href="https://doc.cocalc.com/teaching-nbgrader.html">92<strong>very flexible automatic grading via nbgrader</strong>93</A>94! The teacher{"'"}s notebook contains exercise cells for students95and test cells, some of which students can also run to get96immediate feedback. Once collected, you tell CoCalc to97automatically run the full test suite across all student notebooks98and tabulate the results.99</li>100</ul>101</Paragraph>102<Paragraph>103CoCalc supports many kernels right out of the box: several Python104environments, <A href="http://www.sagemath.org/">SageMath</A>,{" "}105<A href="http://www.r-project.org/">R Statistical Software</A>106Octave, <A href="/features/julia">Julia</A> and many more.{" "}107</Paragraph>108</>109);110}111112return (113<Customize value={customize}>114<Head title="Online Jupyter Notebooks" />115<Layout>116<Header page="features" subPage="jupyter-notebook" runnableTag="py" />117<Layout.Content>118<Content119landing120startup={"Jupyter"}121body={JupyterLogo}122title={"Online Jupyter Notebooks"}123subtitle={124"CoCalc's own collaborative, fully compatible and supercharged notebooks."125}126subtitleBelow={true}127image={JupyterTF}128alt={"Using Pandas and Tensorflow in a Jupyter notebook"}129/>130131<Pitch col1={pitchTeaching()} col2={pitchNoSetup()} ext="ipynb" />132133<Info134title="Collaborative editing"135icon="users"136image={RTC}137anchor="a-realtimesync"138alt={"Two browser windows editing the same Jupyter notebook"}139style={{ backgroundColor: COLORS.ANTD_BG_BLUE_L }}140>141<Paragraph>142You can share your Jupyter notebooks privately with project143collaborators. All modifications are{" "}144<strong>synchronized in real time</strong>, where you can see the145cursors of others while they edit the document. You are also146notified about the presence of collaborators.147</Paragraph>148<Paragraph>149Edit text between code cells using{" "}150<A href="https://doc.cocalc.com/markdown.html">151markdown or our collaborative rich text editor152</A>153.154</Paragraph>155<Paragraph>156We have extended ipywidgets so that sliders, menus and knobs of{" "}157<A href="https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Basics.html">158interactive widgets159</A>{" "}160are also fully synchronized among all collaborators.161</Paragraph>162<Paragraph>163Additionally, the status and results of all computations in the164currently running kernel session are also synchronized, because165the session runs remotely in CoCalc's cluster.166</Paragraph>167<Paragraph>168Together, everyone involved experiences the notebook in the same169way.170</Paragraph>171</Info>172173<Info.Heading174description={175<>176The following are some more specific features of Jupyter177notebooks in CoCalc.178<br />179There is also more{" "}180<A href="https://doc.cocalc.com/jupyter.html">181comprehensive documentation182</A>183.184</>185}186>187Feature Overview188</Info.Heading>189190<Info191anchor="a-timetravel"192title="TimeTravel"193icon="history"194video={[195"features/cocalc-jupyter2-timetravel-20170515-3x.webm",196"features/cocalc-jupyter2-timetravel-20170515-3x.mp4",197]}198alt="Video showing the TimeTravel slider in a SageMath Jupyter notebook"199>200<Paragraph>201<strong>202<A href="https://doc.cocalc.com/time-travel.html">TimeTravel</A>203</strong>{" "}204is a powerful feature of the CoCalc platform. It records all your205changes in your Jupyter notebook in fine detail. You can go back206and forth in time across thousands of changes to see all previous207edits.208</Paragraph>209<Paragraph>210This allows you to easily recover anything from previous versions211of your notebook by copy and pasting.212</Paragraph>213<Paragraph>214You can also browse the entire process of creating the notebook215from the start. This lets you discover how you arrived at a216particular solution and see what you (or your students) tried to217get there.218</Paragraph>219</Info>220221<Info222anchor="a-nbgrader"223title="NBGrader: automatically grading assignments"224icon="graduation-cap"225image={Nbgrader}226alt="Creating an NBGrader-enhanced Jupyter notebook"227>228<Paragraph>229CoCalc's Jupyter Notebooks fully support both{" "}230<strong>automatic</strong> and <strong>manual grading</strong>!231</Paragraph>232<Paragraph>233When using NBGrader, the teacher's notebook contains exercise234cells for students and test cells, some of which students run to235get immediate feedback. Once collected, you tell CoCalc to236automatically run the full test suite across all student notebooks237and tabulate the results.238</Paragraph>239<Paragraph>240Learn more about{" "}241<A href="https://doc.cocalc.com/teaching-nbgrader.html">242NBGrader in CoCalc243</A>244.{" "}245</Paragraph>246</Info>247248<ChatGPTFixError embedded={true} />249250<Info251anchor="a-kernels"252title="Managed Jupyter kernels"253icon="python"254image={JupyterKernels}255alt="Dropdown menu showing a large number of preinstalled Jupyter kernels"256>257<Paragraph>258CoCalc makes sure that your desired computational environment is259available and ready to work with. Select from many pre-installed260and <strong>fully managed kernels</strong>. You can also create261your own{" "}262<A href="https://doc.cocalc.com/howto/custom-jupyter-kernel.html">263custom kernel264</A>265.266</Paragraph>267<Paragraph>268Look at our <A href="/software">list of available software</A> for269more about what is available.270</Paragraph>271</Info>272273<Info274anchor="a-chat"275title="Chat about your Jupyter notebook"276icon="comment"277image={JupyterChat}278alt="Chatting about a Jupyter notebook"279>280<Paragraph>281A{" "}282<strong>283<A href="https://doc.cocalc.com/chat.html">chat to the side</A>284</strong>{" "}285of each Jupyter notebook lets you discuss the content of your286notebook with colleagues or students. You can drag and drop or287paste images and files into chat, use <LaTeX /> math formulas, and288fix typos in messages.289</Paragraph>290<Paragraph>291Collaborators who are not online will be notified about new292messages the next time they sign in or you can @mention them so293they get emailed.294</Paragraph>295<Paragraph>296Chat fully supports markdown formatting and <LaTeX /> formulas.{" "}297</Paragraph>298</Info>299300<Info301anchor="a-kernels"302title="JupyterLab and Jupyter Classic"303icon="server"304image={JupyterLab}305alt="Running JupyterLab inside a CoCalc Project"306>307<Paragraph>308CoCalc's Jupyter is a <strong>complete rewrite</strong> of the309classical <A href="http://jupyter.org/">Jupyter notebook</A>{" "}310interface and backend server. It is tightly integrated into CoCalc311and adds realtime collaboration, TimeTravel history and{" "}312<A href="http://blog.sagemath.com/jupyter/2017/05/05/jupyter-rewrite-for-smc.html">313more314</A>315. This rewrite does not change the underlying Jupyter notebook316file format; you can download your <code>*.ipynb</code> file at317any time and continue working in another environment.318</Paragraph>319<Paragraph>320In addition, CoCalc also{" "}321<A href="https://doc.cocalc.com/jupyter.html#alternatives-plain-jupyter-server-and-jupyterlab-server">322fully supports running323</A>{" "}324standard JupyterLab (with realtime collaboration enabled) and325Jupyter Classic notebook servers from any CoCalc project! You can326still use all libraries and extension that might rely on specifics327of one of those implementations. Moreover,{" "}328<strong>329you can fully use your CoCalc project via the powerful330JupyterLab interface!331</strong>332</Paragraph>333<Paragraph>334CoCalc also supports{" "}335<A href="https://doc.cocalc.com/jupyter.html#collaboration-with-classical-jupyter">336using Jupyter Classic with collaborative editing and chat337</A>338.339</Paragraph>340</Info>341342<Info343anchor="a-monitoring"344title="CPU and memory monitoring for each notebook"345icon="line-chart"346image={JupyterMem}347alt="Jupyter notebook showing CPU and memory indicators"348>349<Paragraph>350Long running notebook sessions or intense computations might351deplete available CPU or memory resources. This slows down all352calculations or even causes an unexpected termination of the353current session.354</Paragraph>355<Paragraph>356CoCalc's per-notebook CPU and memory indicators helps you to{" "}357<strong>358keep an eye on the notebook's memory and CPU consumption359</strong>360.361</Paragraph>362<Paragraph>363You can even close your browser during long running computations,364and check on the results later.{" "}365<strong>Output will not be lost</strong> while your browser is366closed.367</Paragraph>368</Info>369370<Backups />371372<Info373anchor="a-publishing"374title="Publishing your notebooks"375icon="bullhorn"376image={JupyterNasa}377alt="Jupyter notebook hosted on the CoCalc share server"378>379<Paragraph>380CoCalc helps you{" "}381<A href="/share">382<strong>share your work with the world</strong>383</A>384. It offers its own hosting of shared documents, which includes385Jupyter notebooks and any other associated data files.386</Paragraph>387<Paragraph>388Under the hood, CoCalc uses a novel renderer which generates a389static HTML representation of your notebook (sanitized to prevent390XSS attacks) on the server, which includes pre-rendered <LaTeX />{" "}391formulas. This approach is very efficient and lightweight compared392to solutions based on{" "}393<A href="https://nbconvert.readthedocs.io">nbconvert</A>.{" "}394</Paragraph>395</Info>396397<Comparison398name="jupyter"399disclaimer400title={401<h2 style={{ textAlign: "center" }}>402<Icon name="bolt" /> Jupyter notebooks in CoCalc versus the403competition404</h2>405}406/>407408<SignIn startup="Jupyter" />409</Layout.Content>410<Footer />411</Layout>412</Customize>413);414}415416export async function getServerSideProps(context) {417return await withCustomize({ context });418}419420421