-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
344 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
tests/data/notebooks/inputs/ipynb_go/hello_world_gonb.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "8795db3a-af9a-4f03-a68d-019330861b54", | ||
"metadata": {}, | ||
"source": [ | ||
"A notebook that use [GoNB](https://github.com/janpfeifer/gonb)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "50a2fb21-01b3-46d0-9951-f9a1301a85ca", | ||
"metadata": {}, | ||
"source": [ | ||
"the code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "75d8418d-a918-4cc8-b42e-384db01f21ae", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"func main() {\n", | ||
" fmt.Printf(\"Hello World!\")\n", | ||
"}" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "3620f46f-efd5-4454-bc29-418297012ce9", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"%%\n", | ||
"fmt.Printf(\"Hello World!\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "82f4bb1f-3311-4fca-8025-c54c0305dc64", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import \"github.com/janpfeifer/gonb/gonbui\"\n", | ||
"\n", | ||
"%%\n", | ||
"gonbui.DisplayHtml(`<span style=\"background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;\">I 🧡 GoNB!</span>`)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "1a5584ff-f346-45cf-95c1-a3e3b7146c6c", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"%%\n", | ||
"gonbui.DisplayMarkdown(\"#### Objective\\n\\n1. Have fun coding **Go**;\\n1. Profit...\\n\"+\n", | ||
" `$$f(x) = \\int_{-\\infty}^{\\infty} e^{-x^2} dx$$`)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "de996381-d92c-4ce6-a135-50cf39288aa1", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"func init_a() {\n", | ||
" fmt.Println(\"init_a\")\n", | ||
"}\n", | ||
"%%\n", | ||
"fmt.Println(\"main\")" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Go (gonb)", | ||
"language": "go", | ||
"name": "gonb" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": "", | ||
"file_extension": ".go", | ||
"mimetype": "", | ||
"name": "go", | ||
"nbconvert_exporter": "", | ||
"pygments_lexer": "", | ||
"version": "go1.21.6" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
42 changes: 42 additions & 0 deletions
42
tests/data/notebooks/outputs/ipynb_to_Rmd/hello_world_gonb.Rmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
jupyter: | ||
kernelspec: | ||
display_name: Go (gonb) | ||
language: go | ||
name: gonb | ||
--- | ||
|
||
A notebook that use [GoNB](https://github.com/janpfeifer/gonb) | ||
|
||
|
||
the code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb) | ||
|
||
```{go} | ||
func main() { | ||
fmt.Printf("Hello World!") | ||
} | ||
``` | ||
|
||
```{go} | ||
fmt.Printf("Hello World!") | ||
``` | ||
|
||
```{go} | ||
import "github.com/janpfeifer/gonb/gonbui" | ||
%% | ||
gonbui.DisplayHtml(`<span style="background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;">I 🧡 GoNB!</span>`) | ||
``` | ||
|
||
```{go} | ||
gonbui.DisplayMarkdown("#### Objective\n\n1. Have fun coding **Go**;\n1. Profit...\n"+ | ||
`$$f(x) = \int_{-\infty}^{\infty} e^{-x^2} dx$$`) | ||
``` | ||
|
||
```{go} | ||
func init_a() { | ||
fmt.Println("init_a") | ||
} | ||
%% | ||
fmt.Println("main") | ||
``` |
41 changes: 41 additions & 0 deletions
41
tests/data/notebooks/outputs/ipynb_to_hydrogen/hello_world_gonb.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// -*- coding: utf-8 -*- | ||
// --- | ||
// jupyter: | ||
// kernelspec: | ||
// display_name: Go (gonb) | ||
// language: go | ||
// name: gonb | ||
// --- | ||
|
||
// %% [markdown] | ||
// A notebook that use [GoNB](https://github.com/janpfeifer/gonb) | ||
|
||
// %% [markdown] | ||
// the code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb) | ||
|
||
// %% | ||
func main() { | ||
fmt.Printf("Hello World!") | ||
} | ||
|
||
// %% | ||
%% | ||
fmt.Printf("Hello World!") | ||
|
||
// %% | ||
import "github.com/janpfeifer/gonb/gonbui" | ||
|
||
%% | ||
gonbui.DisplayHtml(`<span style="background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;">I 🧡 GoNB!</span>`) | ||
|
||
// %% | ||
%% | ||
gonbui.DisplayMarkdown("#### Objective\n\n1. Have fun coding **Go**;\n1. Profit...\n"+ | ||
`$$f(x) = \int_{-\infty}^{\infty} e^{-x^2} dx$$`) | ||
|
||
// %% | ||
func init_a() { | ||
fmt.Println("init_a") | ||
} | ||
%% | ||
fmt.Println("main") |
42 changes: 42 additions & 0 deletions
42
tests/data/notebooks/outputs/ipynb_to_md/hello_world_gonb.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
jupyter: | ||
kernelspec: | ||
display_name: Go (gonb) | ||
language: go | ||
name: gonb | ||
--- | ||
|
||
A notebook that use [GoNB](https://github.com/janpfeifer/gonb) | ||
|
||
|
||
the code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb) | ||
|
||
```go | ||
func main() { | ||
fmt.Printf("Hello World!") | ||
} | ||
``` | ||
|
||
```go | ||
fmt.Printf("Hello World!") | ||
``` | ||
|
||
```go | ||
import "github.com/janpfeifer/gonb/gonbui" | ||
|
||
%% | ||
gonbui.DisplayHtml(`<span style="background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;">I 🧡 GoNB!</span>`) | ||
``` | ||
|
||
```go | ||
gonbui.DisplayMarkdown("#### Objective\n\n1. Have fun coding **Go**;\n1. Profit...\n"+ | ||
`$$f(x) = \int_{-\infty}^{\infty} e^{-x^2} dx$$`) | ||
``` | ||
|
||
```go | ||
func init_a() { | ||
fmt.Println("init_a") | ||
} | ||
%% | ||
fmt.Println("main") | ||
``` |
44 changes: 44 additions & 0 deletions
44
tests/data/notebooks/outputs/ipynb_to_myst/hello_world_gonb.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
kernelspec: | ||
display_name: Go (gonb) | ||
language: go | ||
name: gonb | ||
--- | ||
|
||
A notebook that use [GoNB](https://github.com/janpfeifer/gonb) | ||
|
||
+++ | ||
|
||
the code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb) | ||
|
||
```{code-cell} | ||
func main() { | ||
fmt.Printf("Hello World!") | ||
} | ||
``` | ||
|
||
```{code-cell} | ||
%% | ||
fmt.Printf("Hello World!") | ||
``` | ||
|
||
```{code-cell} | ||
import "github.com/janpfeifer/gonb/gonbui" | ||
%% | ||
gonbui.DisplayHtml(`<span style="background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;">I 🧡 GoNB!</span>`) | ||
``` | ||
|
||
```{code-cell} | ||
%% | ||
gonbui.DisplayMarkdown("#### Objective\n\n1. Have fun coding **Go**;\n1. Profit...\n"+ | ||
`$$f(x) = \int_{-\infty}^{\infty} e^{-x^2} dx$$`) | ||
``` | ||
|
||
```{code-cell} | ||
func init_a() { | ||
fmt.Println("init_a") | ||
} | ||
%% | ||
fmt.Println("main") | ||
``` |
39 changes: 39 additions & 0 deletions
39
tests/data/notebooks/outputs/ipynb_to_percent/hello_world_gonb.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// -*- coding: utf-8 -*- | ||
// --- | ||
// jupyter: | ||
// kernelspec: | ||
// display_name: Go (gonb) | ||
// language: go | ||
// name: gonb | ||
// --- | ||
|
||
// %% [markdown] | ||
// A notebook that use [GoNB](https://github.com/janpfeifer/gonb) | ||
|
||
// %% [markdown] | ||
// the code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb) | ||
|
||
// %% | ||
func main() { | ||
fmt.Printf("Hello World!") | ||
} | ||
|
||
// %% | ||
fmt.Printf("Hello World!") | ||
|
||
// %% | ||
import "github.com/janpfeifer/gonb/gonbui" | ||
|
||
%% | ||
gonbui.DisplayHtml(`<span style="background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;">I 🧡 GoNB!</span>`) | ||
|
||
// %% | ||
gonbui.DisplayMarkdown("#### Objective\n\n1. Have fun coding **Go**;\n1. Profit...\n"+ | ||
`$$f(x) = \int_{-\infty}^{\infty} e^{-x^2} dx$$`) | ||
|
||
// %% | ||
func init_a() { | ||
fmt.Println("init_a") | ||
} | ||
%% | ||
fmt.Println("main") |
34 changes: 34 additions & 0 deletions
34
tests/data/notebooks/outputs/ipynb_to_script/hello_world_gonb.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// -*- coding: utf-8 -*- | ||
// --- | ||
// jupyter: | ||
// kernelspec: | ||
// display_name: Go (gonb) | ||
// language: go | ||
// name: gonb | ||
// --- | ||
|
||
// A notebook that use [GoNB](https://github.com/janpfeifer/gonb) | ||
|
||
// the code below comes from [tutorial.ipynb](https://github.com/janpfeifer/gonb/blob/main/examples/tutorial.ipynb) | ||
|
||
func main() { | ||
fmt.Printf("Hello World!") | ||
} | ||
|
||
fmt.Printf("Hello World!") | ||
|
||
// + | ||
import "github.com/janpfeifer/gonb/gonbui" | ||
|
||
%% | ||
gonbui.DisplayHtml(`<span style="background:pink; color:#111; border-radius: 3px; border: 3px solid orange; font-size: 18px;">I 🧡 GoNB!</span>`) | ||
// - | ||
|
||
gonbui.DisplayMarkdown("#### Objective\n\n1. Have fun coding **Go**;\n1. Profit...\n"+ | ||
`$$f(x) = \int_{-\infty}^{\infty} e^{-x^2} dx$$`) | ||
|
||
func init_a() { | ||
fmt.Println("init_a") | ||
} | ||
%% | ||
fmt.Println("main") |