Skip to content

Commit

Permalink
update docu and add nbdime
Browse files Browse the repository at this point in the history
bitnik committed Sep 25, 2024
1 parent eb385e2 commit 8bb9a1e
Showing 3 changed files with 13 additions and 9 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -10,6 +10,9 @@ https://bitnik.github.io/analyse-caesar-cipher/

This is a static site powered by [JupyterLite](https://jupyterlite.readthedocs.io/en/stable/) and deployed on [GitHub Pages](https://pages.github.com/).

**Important**: All changes you make there, they will be stored in browser storage.
If you want to revert all changes, you should clear the site data in your browser.

## Run on Binder

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/bitnik/analyse-caesar-cipher/HEAD?labpath=notebooks%2Fanalyse_caesar_cipher.ipynb)
@@ -30,12 +33,12 @@ pip-sync requirements.txt dev-requirements.txt
Run jupyter lab server:

```sh
# jupyter lab
# Disable classic notebook view
jupyter server extension disable nbclassic
# Run jupyter lab
jupyter lab notebooks/analyse_caesar_cipher.ipynb --port 8888
# jupyter notebook
# jupyter notebook notebooks/analyse_caesar_cipher.ipynb --port 8888
# jupyter notebook --no-browser

# jupyter server extension list
# jupyter labextension list
```

10 changes: 5 additions & 5 deletions notebooks/analyse_caesar_cipher.ipynb
Original file line number Diff line number Diff line change
@@ -169,7 +169,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d2b74dcd",
"id": "3e3a43f2-42dd-4dd5-9c40-aad00d766b86",
"metadata": {},
"outputs": [],
"source": [
@@ -178,13 +178,13 @@
" text = f.read().strip()\n",
" letter_freq = calculate_letter_frequency(text)\n",
" # print(letter_freq)\n",
" plot_histogram(letter_freq)\n",
" plot_histogram(letter_freq, title=\"Frequency analysis of Hamlet\")\n",
"\n",
"with open(\"./data/romeo_and_juliet.txt\") as f:\n",
" text = f.read().strip()\n",
" letter_freq = calculate_letter_frequency(text)\n",
" # print(letter_freq)\n",
" plot_histogram(letter_freq)"
" plot_histogram(letter_freq, title=\"Frequency analysis of Romeo and Juliet\")"
]
},
{
@@ -225,7 +225,7 @@
" \"z\": 0.074,\n",
"}\n",
"# print(sum(LETTER_FREQUENCY.values()))\n",
"plot_histogram(LETTER_FREQUENCY)"
"plot_histogram(LETTER_FREQUENCY, title=\"Frequency analysis of English alphabet\")"
]
},
{
@@ -371,7 +371,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "14b70d87-19d9-48db-aa84-a1d44cf17dda",
"id": "b001a06d-9a97-4a86-a51a-ff759424b018",
"metadata": {},
"outputs": [],
"source": []
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ dependencies = [
# Python kernel for jupyterlite
"jupyterlite-pyodide-kernel==0.4.2",
"matplotlib==3.9.2",
"nbdime==4.0.2",
]
requires-python = ">=3.12"
authors = [

0 comments on commit 8bb9a1e

Please sign in to comment.