1{
2 "nbformat": 4,
3 "nbformat_minor": 5,
4 "metadata": {
5 "kernelspec": {
6 "display_name": "Python 3",
7 "language": "python",
8 "name": "python3"
9 },
10 "language_info": {
11 "name": "python",
12 "version": "3.12.0"
13 }
14 },
15 "cells": [
16 {
17 "cell_type": "markdown",
18 "metadata": {},
19 "source": [
20 "# Hello World Notebook\n",
21 "\n",
22 "A simple notebook to test rendering on sublimated."
23 ]
24 },
25 {
26 "cell_type": "code",
27 "metadata": {},
28 "execution_count": 1,
29 "source": [
30 "message = \"Hello from sublimated!\"\n",
31 "print(message)"
32 ],
33 "outputs": [
34 {
35 "output_type": "stream",
36 "name": "stdout",
37 "text": [
38 "Hello from sublimated!\n"
39 ]
40 }
41 ]
42 },
43 {
44 "cell_type": "code",
45 "metadata": {},
46 "execution_count": 2,
47 "source": [
48 "# simple arithmetic\n",
49 "result = sum(range(1, 101))\n",
50 "print(f\"Sum of 1 to 100 = {result}\")"
51 ],
52 "outputs": [
53 {
54 "output_type": "stream",
55 "name": "stdout",
56 "text": [
57 "Sum of 1 to 100 = 5050\n"
58 ]
59 }
60 ]
61 },
62 {
63 "cell_type": "markdown",
64 "metadata": {},
65 "source": [
66 "## Data Table\n",
67 "\n",
68 "Execute result with HTML table output:"
69 ]
70 },
71 {
72 "cell_type": "code",
73 "metadata": {},
74 "execution_count": 3,
75 "source": [
76 "data = [\n",
77 " {\"name\": \"Alice\", \"age\": 30, \"city\": \"Dublin\"},\n",
78 " {\"name\": \"Bob\", \"age\": 25, \"city\": \"Berlin\"},\n",
79 " {\"name\": \"Carol\", \"age\": 35, \"city\": \"Paris\"},\n",
80 "]\n",
81 "data"
82 ],
83 "outputs": [
84 {
85 "output_type": "execute_result",
86 "execution_count": 3,
87 "data": {
88 "text/plain": "[{'name': 'Alice', 'age': 30, 'city': 'Dublin'}, {'name': 'Bob', 'age': 25, 'city': 'Berlin'}, {'name': 'Carol', 'age': 35, 'city': 'Paris'}]"
89 },
90 "metadata": {}
91 }
92 ]
93 },
94 {
95 "cell_type": "markdown",
96 "metadata": {},
97 "source": [
98 "## Error Handling\n",
99 "\n",
100 "Demonstrating error output rendering:"
101 ]
102 },
103 {
104 "cell_type": "code",
105 "metadata": {},
106 "execution_count": 4,
107 "source": [
108 "# this will raise an error\n",
109 "1 / 0"
110 ],
111 "outputs": [
112 {
113 "output_type": "error",
114 "ename": "ZeroDivisionError",
115 "evalue": "division by zero",
116 "traceback": [
117 "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
118 "\u001b[0;31mZeroDivisionError\u001b[0m Traceback (most recent call last)",
119 "Cell \u001b[0;32mIn[4], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# this will raise an error\u001b[39;00m\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;241;43m1\u001b[39;49m \u001b[38;5;241;43m/\u001b[39;49m \u001b[38;5;241;43m0\u001b[39;49m\n",
120 "\u001b[0;31mZeroDivisionError\u001b[0m: division by zero"
121 ]
122 }
123 ]
124 }
125 ]
126}