"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getServerSideProps = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const antd_1 = require("antd");
const footer_1 = __importDefault(require("components/landing/footer"));
const header_1 = __importDefault(require("components/landing/header"));
const content_1 = __importDefault(require("components/landing/content"));
const A_1 = __importDefault(require("components/misc/A"));
const with_customize_1 = __importDefault(require("lib/with-customize"));
const customize_1 = require("lib/customize");
const sign_in_1 = __importDefault(require("components/landing/sign-in"));
const info_1 = __importDefault(require("components/landing/info"));
const pitch_1 = __importDefault(require("components/landing/pitch"));
const head_1 = __importDefault(require("components/landing/head"));
const snapshots_1 = __importDefault(require("components/landing/snapshots"));
const icon_1 = require("@cocalc/frontend/components/icon");
const latex_1 = __importDefault(require("components/landing/latex"));
const publishing_1 = __importDefault(require("components/landing/publishing"));
const code_1 = __importDefault(require("components/landing/code"));
const python_logo_svg_1 = __importDefault(require("public/features/python-logo.svg"));
const frame_editor_python_png_1 = __importDefault(require("public/features/frame-editor-python.png"));
const cocalc_real_time_jupyter_png_1 = __importDefault(require("public/features/cocalc-real-time-jupyter.png"));
const cocalc_python_jupyter_png_1 = __importDefault(require("public/features/cocalc-python-jupyter.png"));
const cocalc_latex_pythontex_png_1 = __importDefault(require("public/features/cocalc-latex-pythontex.png"));
const cocalc_jupyter_format_python_gif_1 = __importDefault(require("public/features/cocalc-jupyter-format-python.gif"));
const cocalc_frame_editor_python_png_1 = __importDefault(require("public/features/cocalc-frame-editor-python.png"));
const cocalc_jupyter_python_sidechat_png_1 = __importDefault(require("public/features/cocalc-jupyter-python-sidechat.png"));
const component = "Python";
const title = `Run ${component} Online`;
function Octave({ customize }) {
    return ((0, jsx_runtime_1.jsxs)(customize_1.Customize, { value: customize, children: [(0, jsx_runtime_1.jsx)(head_1.default, { title: title }), (0, jsx_runtime_1.jsxs)(antd_1.Layout, { children: [(0, jsx_runtime_1.jsx)(header_1.default, { page: "features", subPage: "python" }), (0, jsx_runtime_1.jsxs)(antd_1.Layout.Content, { children: [(0, jsx_runtime_1.jsx)("div", { style: { backgroundColor: "#c7d9f5" }, children: (0, jsx_runtime_1.jsx)(content_1.default, { startup: component, logo: python_logo_svg_1.default, title: title, subtitle: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { children: ["Run ", component, " scripts,", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "/features/jupyter-notebook", children: "Jupyter notebooks" }), ", or even a ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "/features/x11", children: "graphical application" }), " ", "in a full, remote ", component, " environment."] }) }), subtitleBelow: true, image: frame_editor_python_png_1.default }) }), (0, jsx_runtime_1.jsx)(pitch_1.default, { col1: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h3", { children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "global" }), " CoCalc covers all the bases"] }), (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Data Science and Machine Learning" }), ":", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/howto/upload.html", children: "Upload" }), " ", "your datafiles and analyze them using", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.tensorflow.org/", children: "Tensorflow" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://scikit-learn.org/stable/", children: "scikit-learn" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://keras.io/", children: "Keras" }), ", ... including an", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.anaconda.com/distribution/", children: "Anaconda" }), " ", "environment."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Mathematics" }), ":", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.sympy.org", children: "SymPy" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.sagemath.org", children: "SageMath" }), ", ..."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Statistics" }), ":", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://pandas.pydata.org/", children: "pandas" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.statsmodels.org/", children: "statsmodels" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://rpy2.github.io/", children: "rpy2 (R bridge)" }), ", ..."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Visualization" }), ":", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://matplotlib.org/", children: "matplotlib" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://plot.ly/python/plotly-fundamentals/", children: "plotly" }), ", ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://seaborn.pydata.org/", children: "seaborn" }), ", ..."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Teaching" }), ": learn Python online or teach a course."] })] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Find more details in the", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "/software/python", children: "list of installed Python libraries" }), "."] })] }), col2: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h3", { children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "lightbulb" }), " Zero setup"] }), (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsxs)("li", { children: ["Immediately start working by creating or", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/howto/upload.html", children: "uploading" }), ", ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "/features/jupyter-notebook", children: "Jupyter Notebooks" }), " ", "or Python scripts."] }), (0, jsx_runtime_1.jsxs)("li", { children: ["No need to download and install", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.python.org", children: "Python" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.anaconda.com/distribution/", children: "Anaconda" }), ", or other Python environments."] }), (0, jsx_runtime_1.jsxs)("li", { children: ["CoCalc already", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "/software/python", children: "provides many packages" }), " for you."] }), (0, jsx_runtime_1.jsxs)("li", { children: ["The ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "/features/latex-editor", children: "LaTeX editor" }), " is already integrated with", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://ctan.org/pkg/pythontex", children: "PythonTeX" }), " and", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://ctan.org/pkg/sagetex", children: "SageTeX" }), "."] })] })] }) }), (0, jsx_runtime_1.jsx)(sign_in_1.default, { startup: component }), (0, jsx_runtime_1.jsx)(info_1.default.Heading, { description: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["There are many ways to use ", component, " online via CoCalc."] }), children: "Feature Overview" }), (0, jsx_runtime_1.jsxs)(info_1.default, { title: "Collaborative workspaces", icon: "users", image: cocalc_real_time_jupyter_png_1.default, anchor: "a-collaboration", alt: "Editing a Jupyter notebook in two windows at the same time", children: [(0, jsx_runtime_1.jsxs)("p", { children: ["As the name suggests, CoCalc's strength is", " ", (0, jsx_runtime_1.jsx)("strong", { children: "online code collaboration" }), ". Collaboration applies to editing plain Python files,", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/sagews.html", children: "Sage Worksheets" }), ",", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "/features/jupyter-notebook", children: "Jupyter Notebooks" }), ", and much more."] }), (0, jsx_runtime_1.jsx)("p", { children: "This enables you to work more effectively as a team to solve the challenges of data science, machine learning and statistics. Every collaborator is always looking at the most recent state of files, and they experience and inspect the same Python state." }), (0, jsx_runtime_1.jsxs)("p", { children: ["You can", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/chat.html", children: "create chatrooms" }), " ", "and get help via", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/chat.html", children: "side chat" }), " by @mentioning collaborators."] })] }), (0, jsx_runtime_1.jsxs)(info_1.default, { title: "Python in Jupyter Notebooks", icon: "ipynb", image: cocalc_python_jupyter_png_1.default, anchor: "a-jupyternotebook", wide: true, alt: "Plotting using Matplotlib and Numpy in a Jupyter notebook", children: [(0, jsx_runtime_1.jsxs)("p", { children: ["CoCalc offers a", " ", (0, jsx_runtime_1.jsx)("strong", { children: (0, jsx_runtime_1.jsx)(A_1.default, { href: "/features/jupyter-notebook", children: "complete rewrite" }) }), " ", "of the classical", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "http://jupyter.org/", children: "Jupyter notebook" }), " interface. It is tightly integrated into CoCalc and adds realtime collaboration,", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "http://doc.cocalc.com/jupyter.html", children: "TimeTravel history and much more" }), "."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["The user interface is very similar to Jupyter classic. It uses the same underlying Jupyter notebook file format, so you can download your ", (0, jsx_runtime_1.jsx)(code_1.default, { children: "*.ipynb" }), " file at any time and continue working locally."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["There are several", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "/software/python", children: "Python environments available" }), "."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["You can also easily run", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/jupyter.html#classical-versus-cocalc", children: "Jupyter Classical" }), " ", "and JupyterLab in any CoCalc project."] })] }), (0, jsx_runtime_1.jsx)(sign_in_1.default, { startup: component }), (0, jsx_runtime_1.jsxs)(info_1.default, { title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(latex_1.default, {}), " support for PythonTeX/SageTeX"] }), icon: "tex-file", image: cocalc_latex_pythontex_png_1.default, anchor: "a-latex", alt: "Using PythonTex with LaTeX", wide: true, children: [(0, jsx_runtime_1.jsxs)("div", { children: ["The fully integrated", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "/features/latex-editor", children: "CoCalc latex editor" }), " covers all your basic needs for working with ", (0, jsx_runtime_1.jsx)(code_1.default, { children: ".tex" }), " files containing", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://github.com/gpoore/pythontex", children: "PythonTeX" }), " or", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "http://doc.sagemath.org/html/en/tutorial/sagetex.html", children: "SageTeX" }), " ", "code. The document is synchronized with your collaborators in real-time and everyone sees the very same compiled PDF."] }), (0, jsx_runtime_1.jsx)("div", { children: "In particular, this LaTeX editor" }), (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Manages the entire compilation pipeline for you" }), ": it automatically calls ", (0, jsx_runtime_1.jsx)(code_1.default, { children: "pythontex3" }), " or", " ", (0, jsx_runtime_1.jsx)(code_1.default, { children: "sage" }), " to pre-process the code,"] }), (0, jsx_runtime_1.jsxs)("li", { children: ["Supports ", (0, jsx_runtime_1.jsx)("strong", { children: "forward and inverse search" }), " to help you navigating in your document,"] }), (0, jsx_runtime_1.jsxs)("li", { children: ["Captures and shows you", " ", (0, jsx_runtime_1.jsx)("strong", { children: "where LaTeX or Python errors happen" }), ","] }), (0, jsx_runtime_1.jsxs)("li", { children: ["and via", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/time-travel.html", children: "TimeTravel" }), " ", "you can go back in time to see your latest edits in order to", " ", (0, jsx_runtime_1.jsx)("strong", { children: "easily recover from a recent mistake" }), "."] })] }), (0, jsx_runtime_1.jsxs)("div", { children: ["Combined, this means you can do", " ", (0, jsx_runtime_1.jsx)("strong", { children: "your entire workflow online on CoCalc" }), ":"] }), (0, jsx_runtime_1.jsxs)("ol", { children: [(0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/howto/upload.html", children: "Upload" }), " or fetch your datasets,"] }), (0, jsx_runtime_1.jsxs)("li", { children: ["Use ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "#a-jupyternotebook", children: "Jupyter Notebooks" }), " to explore the data, process it, and calculate your results,"] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)(A_1.default, { href: "#a-chat", children: "Discuss" }), " and", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "#a-collaboration", children: "collaborate" }), " with your research team,"] }), (0, jsx_runtime_1.jsx)("li", { children: "Write your research paper in a LaTeX document," }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)(A_1.default, { href: "#a-publishing", children: "Publish" }), " the datasets, your research code, and the PDF of your paper online, all hosted on CoCalc.", " "] })] })] }), (0, jsx_runtime_1.jsxs)(info_1.default, { title: "Code formatting", icon: "network-wired", image: cocalc_jupyter_format_python_gif_1.default, anchor: "a-codeformatting", alt: "Video of formatting Python code in a Jupyter notebook with 1 click", children: [(0, jsx_runtime_1.jsx)("p", { children: (0, jsx_runtime_1.jsx)("strong", { children: "CoCalc has one-click code formatting for Jupyter notebooks and code files!" }) }), (0, jsx_runtime_1.jsxs)("p", { children: ["Your python code is formatted in a clean and consistent way using", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://github.com/google/yapf#yapf", children: "yapf" }), "."] }), (0, jsx_runtime_1.jsx)("p", { children: "This reduces cognitive load reading source code, and ensures all code written by your team has a consistent and beautiful style." }), (0, jsx_runtime_1.jsxs)("p", { children: ["Python code formatting works with", " ", (0, jsx_runtime_1.jsxs)("strong", { children: ["pure ", (0, jsx_runtime_1.jsx)("code", { children: ".py" }), " files"] }), " ", "and ", (0, jsx_runtime_1.jsx)("strong", { children: "Jupyter Notebooks running a Python kernel" }), "."] })] }), (0, jsx_runtime_1.jsxs)(info_1.default, { title: "Command line support", icon: "terminal", image: cocalc_frame_editor_python_png_1.default, anchor: "a-commandline", alt: "Using scikit learn from the command line to run Python code", children: [(0, jsx_runtime_1.jsxs)("p", { children: ["Your existing Python scripts run on CoCalc. Either open a", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/terminal.html", children: "Terminal" }), " in the code editor, or click the \"Shell\" button to open a Python command line."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Terminals also give you access to", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://www.git-scm.com", children: "git" }), " and", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "/software/executables", children: "many more utilities" }), "."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Regarding collaboration, terminals can be used", " ", (0, jsx_runtime_1.jsx)("strong", { children: "by multiple users at once" }), ". This means you can work with your coworkers in the same session at the same time. Everyone sees the same output, and coordinate via", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/chat.html", children: "side chat" }), " next to the terminal."] }), (0, jsx_runtime_1.jsx)("p", { children: "You can also simultaneously work with many terminal sessions." }), (0, jsx_runtime_1.jsx)("p", { children: "For long-running programs, you can even close your browser and check on the result later." })] }), (0, jsx_runtime_1.jsxs)(info_1.default, { title: "Chatroom about your Python code", icon: "comment", image: cocalc_jupyter_python_sidechat_png_1.default, anchor: "a-chat", alt: "A Jupyter notebook with a chat window on the side", children: [(0, jsx_runtime_1.jsxs)("p", { children: ["Collaboration is a first class citizen on CoCalc. Use", " ", (0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/chat.html", children: "side chat" }), " for each file to discuss content with your colleagues or students."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Additionally, avatars give you", " ", (0, jsx_runtime_1.jsx)("strong", { children: "presence information" }), " about who is currently also working on a file."] }), (0, jsx_runtime_1.jsx)("p", { children: "Collaborators who are not online will be notified about new messages the next time they sign in." }), (0, jsx_runtime_1.jsxs)("p", { children: [(0, jsx_runtime_1.jsx)(A_1.default, { href: "https://doc.cocalc.com/chat.html", children: "Chat" }), " also supports markdown formatting and ", (0, jsx_runtime_1.jsx)(latex_1.default, {}), " formulas."] })] }), (0, jsx_runtime_1.jsx)(publishing_1.default, {}), (0, jsx_runtime_1.jsx)(snapshots_1.default, {}), (0, jsx_runtime_1.jsx)(sign_in_1.default, { startup: component })] }), (0, jsx_runtime_1.jsx)(footer_1.default, {})] })] }));
}
exports.default = Octave;
async function getServerSideProps(context) {
    return await (0, with_customize_1.default)({ context });
}
exports.getServerSideProps = getServerSideProps;
//# sourceMappingURL=python.js.map