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
28 changes: 28 additions & 0 deletions docs/extras/1vscode/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
sidebar_position: 1
---

import installVscode from "./install_vscode.mov";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

# VSCode のインストール

## VSCode のインストール方法

Visual Studio Code は、Microsoft が開発しているフリーかつオープンソースのソースコードエディタです。様々な便利な拡張機能があり、多くの開発者に使われています。

ここでは、そのインストール方法について簡単に説明します。

次の動画を見ながら、インストールしてください。

<Tabs groupId="os">
{/* <TabItem value="win11" label="Windows 11"></TabItem> */}
<TabItem value="win10" label="Windows 10">
<video src={installVscode} controls width="800px" />
</TabItem>
<TabItem value="mac" label="macOS">
macOSでも、Windowsと同じようにすればできます。macOSを持っていないので、動画を撮れませんでした…。申し訳ありません。
</TabItem>
{/* <TabItem value="ubuntu" label="Ubuntu"></TabItem> */}
</Tabs>
Binary file added docs/extras/1vscode/install_vscode.mov
Binary file not shown.
69 changes: 69 additions & 0 deletions docs/extras/2wsl/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
sidebar_position: 2
---

import installWsl from "./install_wsl.mov";
import installRemoteWSL from "./install_remote_wsl.mov";
import startWsl from "./start_wsl.mov";
import openFolder from "./open_folder.mov";
import openTerminal from "./open_terminal.mov";

# WSL のインストール(Windows のみ必要)

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

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

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

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

詳しくは、下記の動画を参考にしてください。
簡単な流れを説明します。

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

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

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

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

:::tip
`new password` を求められたときに、入力しても画面上は何も変化しませんが正しく入力されています。そのまま入力して `Enterキー` を押してください。
:::

<video src={installWsl} controls width="800px" />

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

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

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

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

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

<video src={installRemoteWSL} controls width="800px" />

## VSCode での WSL の使い方

起動は、次の動画のようにします。

左下の緑のボタンを押して、`New WSL Window` をクリックすれば、WSL にアクセスすることができます。

<video src={startWsl} controls width="800px" />

次の動画のようにして、新しくプロジェクトフォルダを作成して、それを VSCode で開くことができます。

エクスプローラーのアドレスバーに `¥¥wsl$` と入力すると、WSL 上のファイルを表示することができます。さらに、`Ubuntu`、`home`、`ユーザー名` の順にクリックしていくことでホームフォルダに移動することができます。

その後、VSCode でそのフォルダを開きます。

<video src={openFolder} controls width="800px" />

ターミナルは、次の動画のようにして開くことができます。これで、Windows でも学校の macOS のようにコマンドを打つことができます。

<video src={openTerminal} controls width="800px" />
Binary file added docs/extras/2wsl/install_remote_wsl.mov
Binary file not shown.
Binary file added docs/extras/2wsl/install_wsl.mov
Binary file not shown.
Binary file added docs/extras/2wsl/open_folder.mov
Binary file not shown.
Binary file added docs/extras/2wsl/open_terminal.mov
Binary file not shown.
Binary file added docs/extras/2wsl/start_wsl.mov
Binary file not shown.
24 changes: 24 additions & 0 deletions docs/extras/3python/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sidebar_position: 3
---

import installPython from "./install_python.mp4";

# Python を自分のパソコンにインストール

## 自分のパソコンへの Python のインストール方法

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

Windows を使っている場合は、[WSL をインストールの項](/docs/extras/2wsl/)を参考に WSL もインストールしておいてください。

VSCode で`samples` フォルダを開いている状態にしておいてください。

macOS、WSL には、Python がはじめからインストールされているので、下の動画のようにするだけで、簡単に Python を自分のパソコン上で実行することができます。

<video src={installPython} controls width="800px" />

- `sample.py` という名前でファイルを作成します。
- `sample.py` の中に `print("Hello World!)` と入力します。
- 保存します。
- ターミナル上で、`python3 sample.py` と入力して、`Enterキー` を押します。
Binary file added docs/extras/3python/install_python.mp4
Binary file not shown.
7 changes: 7 additions & 0 deletions docs/extras/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 3
---

# おまけ

ここに講義の内容とは関係のないことを書いていきます。
2 changes: 1 addition & 1 deletion docs/python/07for/_samples/sum_1to100.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"metadata": {},
"source": [
"1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100\n"
"1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100"
],
"cell_type": "code",
"outputs": [
Expand Down
2 changes: 1 addition & 1 deletion docs/python/07for/_samples/sum_1to20.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"metadata": {},
"source": [
"1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20\n"
"1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20"
],
"cell_type": "code",
"outputs": [
Expand Down