Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/extras/1vscode/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Visual Studio Code は、Microsoft が開発しているフリーかつオープ
<video src={installVscode} controls width="100%" />
</TabItem>
<TabItem value="mac" label="macOS">
macOSでも、Windowsと同じようにすればできます。macOSを持っていないので、動画を撮れませんでした…。申し訳ありません。
macOSでも、Windowsと同じようにすればできます。macOSを持っていないので、動画は撮れませんでした…。申し訳ありません。
</TabItem>
{/* <TabItem value="ubuntu" label="Ubuntu"></TabItem> */}
</Tabs>
16 changes: 8 additions & 8 deletions docs/extras/2wsl/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import openTerminal from "./open_terminal.mov";

macOS は、Linux という OS と源流を同じくするので、プログラミングの開発環境を整えるのは簡単です。

しかし、多くの場合、プログラミングの開発環境を Windows にインストールするのはとても難しく大変です。そこで、プログラミング環境を簡単にインストールできるように Linux という OS を Windows 上で動かす必要が出てきます。
しかし、Windows は、多くの場合プログラミングの開発環境をインストールするのはとても難しく大変です。そこで、プログラミング環境を簡単にインストールできるように Linux という OS を Windows 上で動かす必要が出てきます。

昔は、Windows 上に Linux の環境を作ることはとても難しかったのですが、最近 Microsoft が Windows 上で簡単に Linux 環境を構築できる WSL という機能を開発して非常に簡単になりました。

Expand All @@ -21,14 +21,14 @@ macOS は、Linux という OS と源流を同じくするので、プログラ
詳しくは、下記の動画を参考にしてください。
簡単な流れを説明します。

- コマンドプロンプトを `管理者として実行` する
- コマンドプロンプトを `管理者として実行` します

- コマンドプロンプト上で `wsl --install` を入力して `Enterキー` を押す
- コマンドプロンプト上で `wsl --install` と入力して `Enterキー` を押します

- 完了したら、コンピューターを再起動する
- 完了したら、コンピューターを再起動します

- しばらく待ってから、`username` と `password` を入力する。(これは、何でも構いません。)
- もう一度 `password` を入力する
- しばらく待ってから、`username` と `password` を入力します。(これは、何でも構いません。)
- もう一度 `password` を入力します

:::tip
`new password` を求められたときに、入力しても画面上は何も変化しませんが正しく入力されています。そのまま入力して `Enterキー` を押してください。
Expand All @@ -38,11 +38,11 @@ macOS は、Linux という OS と源流を同じくするので、プログラ

## Remote WSL のインストール方法

ここでは、VSCode で WSL 上のファイルに簡単にアクセスできる Remote WSL のインストール方法を紹介します
ここでは、VSCode で WSL 上のファイルに簡単にアクセスできる Remote WSL 拡張機能のインストール方法を紹介します

[VSCode をインストールの項](/docs/extras/1vscode/)を参考に Visual Studio Code をインストールしておいてください。

下記の動画を参考に VSCode に Remote WSL をインストールしてください
下記の動画を参考に VSCode に Remote WSL 拡張機能をインストールしてください

VSCode で拡張機能を検索して、インストールします。

Expand Down
50 changes: 25 additions & 25 deletions docs/python/08array/_samples/average.ipynb
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"nbformat": 4,
"nbformat_minor": 2,
"metadata": {},
"cells": [
{
"metadata": {},
"source": [
"score1 = 96\n",
"score2 = 56\n",
"score3 = 42\n",
"score4 = 74\n",
"score5 = 86\n",
"print((score1 + score2 + score3 + score4 + score5) / 5)"
],
"cell_type": "code",
"outputs": [
"nbformat": 4,
"nbformat_minor": 2,
"metadata": {},
"cells": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"70.8\n"
]
"metadata": {},
"source": [
"score1 = 96\n",
"score2 = 56\n",
"score3 = 42\n",
"score4 = 74\n",
"score5 = 86\n",
"print((score1 + score2 + score3 + score4 + score5) / 5)"
],
"cell_type": "code",
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"70.8\n"
]
}
],
"execution_count": null
}
],
"execution_count": null
}
]
]
}
59 changes: 28 additions & 31 deletions docs/python/08array/_samples/average10.ipynb
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
{
"nbformat": 4,
"nbformat_minor": 2,
"metadata": {},
"cells": [
{
"metadata": {},
"source": [
"def average(scores):\n",
" sum = 0\n",
" for i in range(len(scores)):\n",
" sum += scores[i]\n",
" return sum / len(scores)\n",
"\n",
"\n",
"scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n",
"average(scores)"
],
"cell_type": "code",
"outputs": [
"nbformat": 4,
"nbformat_minor": 2,
"metadata": {},
"cells": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"40.2"
]
},
"metadata": {},
"execution_count": 2
"metadata": {},
"source": [
"def average(scores):\n",
" sum = 0\n",
" for i in range(len(scores)):\n",
" sum += scores[i]\n",
" return sum / len(scores)\n",
"\n",
"\n",
"scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n",
"print(average(scores))"
],
"cell_type": "code",
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"40.2\n"
]
}
],
"execution_count": null
}
],
"execution_count": null
}
]
]
}
15 changes: 6 additions & 9 deletions docs/python/08array/_samples/average_numpy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@
"import numpy\n",
"\n",
"scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n",
"numpy.mean(scores)"
"print(numpy.mean(scores))"
],
"cell_type": "code",
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"40.2"
]
},
"metadata": {},
"execution_count": 1
"output_type": "stream",
"name": "stdout",
"text": [
"40.2\n"
]
}
],
"execution_count": null
Expand Down
15 changes: 6 additions & 9 deletions docs/python/08array/_samples/average_statistics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@
"import statistics\n",
"\n",
"scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n",
"statistics.mean(scores)"
"print(statistics.mean(scores))"
],
"cell_type": "code",
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"40.2"
]
},
"metadata": {},
"execution_count": 1
"output_type": "stream",
"name": "stdout",
"text": [
"40.2\n"
]
}
],
"execution_count": null
Expand Down
43 changes: 20 additions & 23 deletions docs/python/08array/_samples/sum.ipynb
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
{
"nbformat": 4,
"nbformat_minor": 2,
"metadata": {},
"cells": [
{
"metadata": {},
"source": [
"sum([1, 2, 3])"
],
"cell_type": "code",
"outputs": [
"nbformat": 4,
"nbformat_minor": 2,
"metadata": {},
"cells": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"6"
]
},
"metadata": {},
"execution_count": 2
"metadata": {},
"source": [
"print(sum([1, 2, 3]))"
],
"cell_type": "code",
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"6\n"
]
}
],
"execution_count": null
}
],
"execution_count": null
}
]
]
}
43 changes: 20 additions & 23 deletions docs/python/08array/_samples/sum2.ipynb
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
{
"nbformat": 4,
"nbformat_minor": 2,
"metadata": {},
"cells": [
{
"metadata": {},
"source": [
"sum([2, 5, 7])"
],
"cell_type": "code",
"outputs": [
"nbformat": 4,
"nbformat_minor": 2,
"metadata": {},
"cells": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"14"
]
},
"metadata": {},
"execution_count": 1
"metadata": {},
"source": [
"print(sum([2, 5, 7]))"
],
"cell_type": "code",
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"14\n"
]
}
],
"execution_count": null
}
],
"execution_count": null
}
]
]
}
75 changes: 36 additions & 39 deletions docs/python/08array/_samples/variance.ipynb
Original file line number Diff line number Diff line change
@@ -1,43 +1,40 @@
{
"nbformat": 4,
"nbformat_minor": 2,
"metadata": {},
"cells": [
{
"metadata": {},
"source": [
"def average(scores):\n",
" sum = 0\n",
" for i in range(len(scores)):\n",
" sum += scores[i]\n",
" return sum / len(scores)\n",
"\n",
"\n",
"def variance(scores):\n",
" sum = 0\n",
" calculated_average = average(scores)\n",
" for i in range(len(scores)):\n",
" sum += (scores[i] - calculated_average) ** 2\n",
" return sum / len(scores)\n",
"\n",
"\n",
"scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n",
"variance(scores)"
],
"cell_type": "code",
"outputs": [
"nbformat": 4,
"nbformat_minor": 2,
"metadata": {},
"cells": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"955.5600000000001"
]
},
"metadata": {},
"execution_count": 3
"metadata": {},
"source": [
"def average(scores):\n",
" sum = 0\n",
" for i in range(len(scores)):\n",
" sum += scores[i]\n",
" return sum / len(scores)\n",
"\n",
"\n",
"def variance(scores):\n",
" sum = 0\n",
" calculated_average = average(scores)\n",
" for i in range(len(scores)):\n",
" sum += (scores[i] - calculated_average) ** 2\n",
" return sum / len(scores)\n",
"\n",
"\n",
"scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n",
"print(variance(scores))"
],
"cell_type": "code",
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"955.5600000000001\n"
]
}
],
"execution_count": null
}
],
"execution_count": null
}
]
]
}
Loading