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/python.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 Code from "components/landing/code";9import Content from "components/landing/content";10import Footer from "components/landing/footer";11import Head from "components/landing/head";12import Header from "components/landing/header";13import Info from "components/landing/info";14import LaTeX from "components/landing/latex";15import Pitch from "components/landing/pitch";16import Publishing from "components/landing/publishing";17import SignIn from "components/landing/sign-in";18import Snapshots from "components/landing/snapshots";19import { Paragraph, Title } from "components/misc";20import A from "components/misc/A";21import { Customize } from "lib/customize";22import withCustomize from "lib/with-customize";2324import CommandLineTerminal from "public/features/cocalc-frame-editor-python.png";25import FormatGIF from "public/features/cocalc-jupyter-format-python.gif";26import SideChatImage from "public/features/cocalc-jupyter-python-sidechat.png";27import CoCalcLaTeXPythonTex from "public/features/cocalc-latex-pythontex.png";28import CocalcPythonJupyter from "public/features/cocalc-python-jupyter.png";29import CollabRTC from "public/features/cocalc-real-time-jupyter.png";30import FrameEditorPython from "public/features/frame-editor-python.png";31import PythonLogo from "public/features/python-logo.svg";3233const component = "Python";34const title = `Run ${component} Online`;3536export default function Octave({ customize }) {37return (38<Customize value={customize}>39<Head title={title} />40<Layout>41<Header page="features" subPage="python" runnableTag="py" />42<Layout.Content>43<Content44landing45startup={component}46body={PythonLogo}47title={title}48subtitle={49<>50<div>51Run {component} scripts,{" "}52<A href="/features/jupyter-notebook">Jupyter notebooks</A>, or53even a <A href="/features/x11">graphical application</A> in a54full, remote {component} environment.55</div>56</>57}58subtitleBelow={true}59image={FrameEditorPython}60/>6162<Pitch63col1={64<>65<Title level={2}>66<Icon name="global" /> CoCalc covers all the bases67</Title>68<Paragraph>69<ul>70<li>71<strong>Data Science and Machine Learning</strong>:{" "}72<A href="https://doc.cocalc.com/howto/upload.html">73Upload74</A>{" "}75your datafiles and analyze them using{" "}76<A href="https://www.tensorflow.org/">Tensorflow</A>,{" "}77<A href="https://scikit-learn.org/stable/">78scikit-learn79</A>80, <A href="https://keras.io/">Keras</A>, ... including an{" "}81<A href="https://www.anaconda.com/distribution/">82Anaconda83</A>{" "}84environment.85</li>86<li>87<strong>Mathematics</strong>:{" "}88<A href="https://www.sympy.org">SymPy</A>,{" "}89<A href="https://www.sagemath.org">SageMath</A>, ...90</li>91<li>92<strong>Statistics</strong>:{" "}93<A href="https://pandas.pydata.org/">pandas</A>,{" "}94<A href="https://www.statsmodels.org/">statsmodels</A>,{" "}95<A href="https://rpy2.github.io/">rpy2 (R bridge)</A>, ...96</li>97<li>98<strong>Visualization</strong>:{" "}99<A href="https://matplotlib.org/">matplotlib</A>,{" "}100<A href="https://plot.ly/python/plotly-fundamentals/">101plotly102</A>103, <A href="https://seaborn.pydata.org/">seaborn</A>, ...104</li>105<li>106<strong>Teaching</strong>: learn Python online or teach a107course.108</li>109</ul>110</Paragraph>111<Paragraph>112Find more details in the{" "}113<A href="/software/python">114list of installed Python libraries115</A>116.117</Paragraph>118</>119}120col2={121<>122<Title level={2}>123<Icon name="lightbulb" /> Zero setup124</Title>125<Paragraph>126<ul>127<li>128Immediately start working by creating or{" "}129<A href="https://doc.cocalc.com/howto/upload.html">130uploading131</A>132,{" "}133<A href="/features/jupyter-notebook">Jupyter Notebooks</A>{" "}134or Python scripts.135</li>136<li>137No need to download and install{" "}138<A href="https://www.python.org">Python</A>,{" "}139<A href="https://www.anaconda.com/distribution/">140Anaconda141</A>142, or other Python environments.143</li>144<li>145CoCalc already{" "}146<A href="/software/python">provides many packages</A> for147you.148</li>149<li>150The <A href="/features/latex-editor">LaTeX editor</A> is151already integrated with{" "}152<A href="https://ctan.org/pkg/pythontex">PythonTeX</A> and{" "}153<A href="https://ctan.org/pkg/sagetex">SageTeX</A>.154</li>155</ul>156</Paragraph>157</>158}159/>160161<SignIn startup={component} />162163<Info.Heading164description={165<>There are many ways to use {component} online via CoCalc.</>166}167>168Feature Overview169</Info.Heading>170171<Info172title="Collaborative workspaces"173icon="users"174image={CollabRTC}175anchor="a-collaboration"176alt="Editing a Jupyter notebook in two windows at the same time"177>178<Paragraph>179As the name suggests, CoCalc's strength is{" "}180<strong>online code collaboration</strong>. Collaboration applies181to editing plain Python files,{" "}182<A href="https://doc.cocalc.com/sagews.html">Sage Worksheets</A>,{" "}183<A href="/features/jupyter-notebook">Jupyter Notebooks</A>, and184much more.185</Paragraph>186<Paragraph>187This enables you to work more effectively as a team to solve the188challenges of data science, machine learning and statistics. Every189collaborator is always looking at the most recent state of files,190and they experience and inspect the same Python state.191</Paragraph>192<Paragraph>193You can{" "}194<A href="https://doc.cocalc.com/chat.html">create chatrooms</A>{" "}195and get help via{" "}196<A href="https://doc.cocalc.com/chat.html">side chat</A> by197@mentioning collaborators.198</Paragraph>199</Info>200201<Info202title="Python in Jupyter Notebooks"203icon="ipynb"204image={CocalcPythonJupyter}205anchor="a-jupyternotebook"206wide207alt="Plotting using Matplotlib and Numpy in a Jupyter notebook"208>209<Paragraph>210CoCalc offers a{" "}211<strong>212<A href="/features/jupyter-notebook">complete rewrite</A>213</strong>{" "}214of the classical{" "}215<A href="http://jupyter.org/">Jupyter notebook</A> interface. It216is tightly integrated into CoCalc and adds realtime collaboration,{" "}217<A href="http://doc.cocalc.com/jupyter.html">218TimeTravel history and much more219</A>220.221</Paragraph>222<Paragraph>223The user interface is very similar to Jupyter classic. It uses the224same underlying Jupyter notebook file format, so you can download225your <Code>*.ipynb</Code> file at any time and continue working226locally.227</Paragraph>228<Paragraph>229There are several{" "}230<A href="/software/python">Python environments available</A>.231</Paragraph>232<Paragraph>233You can also easily run{" "}234<A href="https://doc.cocalc.com/jupyter.html#classical-versus-cocalc">235Jupyter Classical236</A>{" "}237and JupyterLab in any CoCalc project.238</Paragraph>239</Info>240241<SignIn startup={component} />242243<Info244title={245<>246<LaTeX /> support for PythonTeX/SageTeX247</>248}249icon="tex-file"250image={CoCalcLaTeXPythonTex}251anchor="a-latex"252alt="Using PythonTex with LaTeX"253wide254below={255<>256<Paragraph>257Combined, this means you can do{" "}258<strong>your entire workflow online on CoCalc</strong>:259</Paragraph>260<Paragraph>261<ol>262<li>263<A href="https://doc.cocalc.com/howto/upload.html">264Upload265</A>{" "}266or fetch your datasets,267</li>268<li>269Use <A href="#a-jupyternotebook">Jupyter Notebooks</A> to270explore the data, process it, and calculate your results,271</li>272<li>273<A href="#a-chat">Discuss</A> and{" "}274<A href="#a-collaboration">collaborate</A> with your275research team,276</li>277<li>Write your research paper in a LaTeX document,</li>278<li>279<A href="#a-publishing">Publish</A> the datasets, your280research code, and the PDF of your paper online, all281hosted on CoCalc.{" "}282</li>283</ol>284</Paragraph>285</>286}287>288<Paragraph>289The fully integrated{" "}290<A href="/features/latex-editor">CoCalc latex editor</A> covers291all your basic needs for working with <Code>.tex</Code> files292containing{" "}293<A href="https://github.com/gpoore/pythontex">PythonTeX</A> or{" "}294<A href="http://doc.sagemath.org/html/en/tutorial/sagetex.html">295SageTeX296</A>{" "}297code. The document is synchronized with your collaborators in298real-time and everyone sees the very same compiled PDF.299</Paragraph>300<Paragraph>In particular, this LaTeX editor</Paragraph>301<Paragraph>302<ul>303<li>304<strong>305Manages the entire compilation pipeline for you306</strong>307: it automatically calls <Code>pythontex3</Code> or{" "}308<Code>sage</Code> to pre-process the code,309</li>310<li>311Supports <strong>forward and inverse search</strong> to help312you navigating in your document,313</li>314<li>315Captures and shows you{" "}316<strong>where LaTeX or Python errors happen</strong>,317</li>318<li>319and via{" "}320<A href="https://doc.cocalc.com/time-travel.html">321TimeTravel322</A>{" "}323you can go back in time to see your latest edits in order to{" "}324<strong>easily recover from a recent mistake</strong>.325</li>326</ul>327</Paragraph>328</Info>329330<Info331title={"Code formatting"}332icon="network-wired"333image={FormatGIF}334anchor="a-codeformatting"335alt="Video of formatting Python code in a Jupyter notebook with 1 click"336>337<Paragraph>338<strong>339CoCalc has one-click code formatting for Jupyter notebooks and340code files!341</strong>342</Paragraph>343<Paragraph>344Your python code is formatted in a clean and consistent way using{" "}345<A href="https://github.com/google/yapf#yapf">yapf</A>.346</Paragraph>347<Paragraph>348This reduces cognitive load reading source code, and ensures all349code written by your team has a consistent and beautiful style.350</Paragraph>351<Paragraph>352Python code formatting works with{" "}353<strong>354pure <code>.py</code> files355</strong>{" "}356and <strong>Jupyter Notebooks running a Python kernel</strong>.357</Paragraph>358</Info>359360<Info361title={"Command line support"}362icon="terminal"363image={CommandLineTerminal}364anchor="a-commandline"365alt="Using scikit learn from the command line to run Python code"366>367<Paragraph>368Your existing Python scripts run on CoCalc. Either open a{" "}369<A href="https://doc.cocalc.com/terminal.html">Terminal</A> in the370code editor, or click the "Shell" button to open a Python command371line.372</Paragraph>373<Paragraph>374Terminals also give you access to{" "}375<A href="https://www.git-scm.com">git</A> and{" "}376<A href="/software/executables">many more utilities</A>.377</Paragraph>378<Paragraph>379Regarding collaboration, terminals can be used{" "}380<strong>by multiple users at once</strong>. This means you can381work with your coworkers in the same session at the same time.382Everyone sees the same output, and coordinate via{" "}383<A href="https://doc.cocalc.com/chat.html">side chat</A> next to384the terminal.385</Paragraph>386<Paragraph>387You can also simultaneously work with many terminal sessions.388</Paragraph>389<Paragraph>390For long-running programs, you can even close your browser and391check on the result later.392</Paragraph>393</Info>394395<Info396title={"Chatroom about your Python code"}397icon="comment"398image={SideChatImage}399anchor="a-chat"400alt="A Jupyter notebook with a chat window on the side"401>402<Paragraph>403Collaboration is a first class citizen on CoCalc. Use{" "}404<A href="https://doc.cocalc.com/chat.html">side chat</A> for each405file to discuss content with your colleagues or students.406</Paragraph>407<Paragraph>408Additionally, avatars give you{" "}409<strong>presence information</strong> about who is currently also410working on a file.411</Paragraph>412<Paragraph>413Collaborators who are not online will be notified about new414messages the next time they sign in.415</Paragraph>416<Paragraph>417<A href="https://doc.cocalc.com/chat.html">Chat</A> also supports418markdown formatting and <LaTeX /> formulas.419</Paragraph>420</Info>421422<Publishing />423424<Snapshots />425426<SignIn startup={component} />427</Layout.Content>428<Footer />429</Layout>430</Customize>431);432}433434export async function getServerSideProps(context) {435return await withCustomize({ context });436}437438439