From bd219a22f1c30fced6d47b6f5da28415facc70c2 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:37:01 +0900 Subject: [PATCH 01/21] Remove ouputs in hello-world/ --- static/hello-world/comment.ipynb | 38 ++++++++------------ static/hello-world/comment2.ipynb | 40 +++++++++------------- static/hello-world/hello-from-python.ipynb | 36 ++++++++----------- 3 files changed, 45 insertions(+), 69 deletions(-) diff --git a/static/hello-world/comment.ipynb b/static/hello-world/comment.ipynb index ae2094909..bf7f4ddcf 100644 --- a/static/hello-world/comment.ipynb +++ b/static/hello-world/comment.ipynb @@ -1,25 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "# \u3053\u306e\u90e8\u5206\u306f\u30b3\u30e1\u30f3\u30c8\u3067\u3059\u3002\n", - "print(\"Hello World!\") # \u3053\u306e\u90e8\u5206\u3082\u30b3\u30e1\u30f3\u30c8\u3067\u3059\u3002" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Hello World!\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# この部分はコメントです。\n", + "print(\"Hello World!\") # この部分もコメントです。" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/hello-world/comment2.ipynb b/static/hello-world/comment2.ipynb index 23c23b7c6..c2b5f3754 100644 --- a/static/hello-world/comment2.ipynb +++ b/static/hello-world/comment2.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "# \u6b21\u306e\u884c\u306f\u3001\u5b9f\u884c\u3055\u308c\u307e\u305b\u3093\u3002\n", - "# print(\"Hello World!\")\n", - "print(\"Hello World!\")" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Hello World!\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# 次の行は、実行されません。\n", + "# print(\"Hello World!\")\n", + "print(\"Hello World!\")" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/hello-world/hello-from-python.ipynb b/static/hello-world/hello-from-python.ipynb index 1387b29f5..921ff370e 100644 --- a/static/hello-world/hello-from-python.ipynb +++ b/static/hello-world/hello-from-python.ipynb @@ -1,24 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "print(\"Hello from Python!\")" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Hello from Python!\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(\"Hello from Python!\")" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From 20e8fb0b87828903a0e3051ffd59024d450cba9f Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:38:58 +0900 Subject: [PATCH 02/21] Remove ouputs in expressions/ --- static/expressions/div.ipynb | 39 ++++++++++----------------- static/expressions/exp.ipynb | 39 ++++++++++----------------- static/expressions/fahrenheit.ipynb | 39 ++++++++++----------------- static/expressions/golden-ratio.ipynb | 39 ++++++++++----------------- static/expressions/multi.ipynb | 39 ++++++++++----------------- static/expressions/quotient.ipynb | 39 ++++++++++----------------- static/expressions/remainder.ipynb | 39 ++++++++++----------------- static/expressions/sub.ipynb | 39 ++++++++++----------------- static/expressions/sum.ipynb | 39 ++++++++++----------------- static/expressions/sum2.ipynb | 36 ++++++++++--------------- 10 files changed, 140 insertions(+), 247 deletions(-) diff --git a/static/expressions/div.ipynb b/static/expressions/div.ipynb index 9fc97d2d8..05ad03324 100644 --- a/static/expressions/div.ipynb +++ b/static/expressions/div.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "4 / 2" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "2.0" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "4 / 2" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/expressions/exp.ipynb b/static/expressions/exp.ipynb index 79b5957dc..9987afb0f 100644 --- a/static/expressions/exp.ipynb +++ b/static/expressions/exp.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "2**3" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "8" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "2**3" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/expressions/fahrenheit.ipynb b/static/expressions/fahrenheit.ipynb index 01526b3b4..9dc8f1f92 100644 --- a/static/expressions/fahrenheit.ipynb +++ b/static/expressions/fahrenheit.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "20 * (9 / 5) + 32" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "68.0" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "20 * (9 / 5) + 32" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/expressions/golden-ratio.ipynb b/static/expressions/golden-ratio.ipynb index d99276ce2..4baf3f4b8 100644 --- a/static/expressions/golden-ratio.ipynb +++ b/static/expressions/golden-ratio.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "(1 + 5**0.5) / 2" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "1.618033988749895" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "(1 + 5**0.5) / 2" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/expressions/multi.ipynb b/static/expressions/multi.ipynb index e458ec074..8a126466b 100644 --- a/static/expressions/multi.ipynb +++ b/static/expressions/multi.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "2 * 2" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "4" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "2 * 2" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/expressions/quotient.ipynb b/static/expressions/quotient.ipynb index 9033d287b..0f43a1939 100644 --- a/static/expressions/quotient.ipynb +++ b/static/expressions/quotient.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "5 // 2" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "2" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "5 // 2" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/expressions/remainder.ipynb b/static/expressions/remainder.ipynb index 4335a303b..f65531596 100644 --- a/static/expressions/remainder.ipynb +++ b/static/expressions/remainder.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "5 % 2" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "1" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "5 % 2" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/expressions/sub.ipynb b/static/expressions/sub.ipynb index f17e3aa9a..4f0e6bd07 100644 --- a/static/expressions/sub.ipynb +++ b/static/expressions/sub.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "2 - 1" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "1" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "2 - 1" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/expressions/sum.ipynb b/static/expressions/sum.ipynb index 3d33ee685..9b1e10864 100644 --- a/static/expressions/sum.ipynb +++ b/static/expressions/sum.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "1 + 1" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "2" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "1 + 1" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/expressions/sum2.ipynb b/static/expressions/sum2.ipynb index a07401d12..6280a7b36 100644 --- a/static/expressions/sum2.ipynb +++ b/static/expressions/sum2.ipynb @@ -1,24 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "print(1 + 1)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "2\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(1 + 1)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From 054dd0cd4444364ddabcafda15339395299bea9c Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:43:51 +0900 Subject: [PATCH 03/21] Remove outputs in variable/ --- static/variable/fahrenheit.ipynb | 41 +++++++++--------------- static/variable/sound-velocity.ipynb | 39 +++++++++-------------- static/variable/sound-velocity2.ipynb | 41 +++++++++--------------- static/variable/substitution.ipynb | 43 ++++++++++--------------- static/variable/substitution2.ipynb | 45 ++++++++++----------------- 5 files changed, 77 insertions(+), 132 deletions(-) diff --git a/static/variable/fahrenheit.ipynb b/static/variable/fahrenheit.ipynb index c905b12e9..2d9c034a3 100644 --- a/static/variable/fahrenheit.ipynb +++ b/static/variable/fahrenheit.ipynb @@ -1,28 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "C = 20\n", - "C * (9 / 5) + 32" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "68.0" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "C = 20\n", + "C * (9 / 5) + 32" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/variable/sound-velocity.ipynb b/static/variable/sound-velocity.ipynb index c71c777c0..34ea872b1 100644 --- a/static/variable/sound-velocity.ipynb +++ b/static/variable/sound-velocity.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "331.5 + 0.6 * 10" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "337.5" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "331.5 + 0.6 * 10" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/variable/sound-velocity2.ipynb b/static/variable/sound-velocity2.ipynb index 2883a86b2..9b18c6d38 100644 --- a/static/variable/sound-velocity2.ipynb +++ b/static/variable/sound-velocity2.ipynb @@ -1,28 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "t = 10\n", - "331.5 + 0.6 * t" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "337.5" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "t = 10\n", + "331.5 + 0.6 * t" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/variable/substitution.ipynb b/static/variable/substitution.ipynb index dbce91b54..1dac43db4 100644 --- a/static/variable/substitution.ipynb +++ b/static/variable/substitution.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "x = 1\n", - "x = x + 1\n", - "x" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "2" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "x = 1\n", + "x = x + 1\n", + "x" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/variable/substitution2.ipynb b/static/variable/substitution2.ipynb index 7948715f1..eb2f452fe 100644 --- a/static/variable/substitution2.ipynb +++ b/static/variable/substitution2.ipynb @@ -1,30 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "x = 2\n", - "y = 3\n", - "y = x + y\n", - "y" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "5" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "x = 2\n", + "y = 3\n", + "y = x + y\n", + "y" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From f6fc3b1ecdc86f86a9cdbe05a15f5d2987c75293 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:44:05 +0900 Subject: [PATCH 04/21] Remove outputs in function/ --- static/function/gravitation.ipynb | 53 +++++++++-------------- static/function/hello.ipynb | 50 +++++++++------------ static/function/indent.ipynb | 43 ++++++++---------- static/function/introduce_language.ipynb | 44 ++++++++----------- static/function/introduce_language2.ipynb | 44 ++++++++----------- static/function/introduce_self.ipynb | 44 ++++++++----------- static/function/introduce_self2.ipynb | 44 ++++++++----------- static/function/introduce_self3.ipynb | 44 ++++++++----------- static/function/introduce_self4.ipynb | 44 ++++++++----------- static/function/x2.ipynb | 39 ++++++----------- static/function/x2_function.ipynb | 47 ++++++++------------ 11 files changed, 198 insertions(+), 298 deletions(-) diff --git a/static/function/gravitation.ipynb b/static/function/gravitation.ipynb index dbd52365e..bd68ab2ba 100644 --- a/static/function/gravitation.ipynb +++ b/static/function/gravitation.ipynb @@ -1,34 +1,23 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "G = 6.7 * 10 ** (-11)\n", - "\n", - "\n", - "def F(r, M, m):\n", - " return G * M * m / r**2\n", - "\n", - "\n", - "F(2, 60, 20)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "2.0099999999999998e-08" - ] - }, - "metadata": {}, - "execution_count": 2 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "G = 6.7 * 10 ** (-11)\n", + "\n", + "\n", + "def F(r, M, m):\n", + " return G * M * m / r**2\n", + "\n", + "\n", + "F(2, 60, 20)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/function/hello.ipynb b/static/function/hello.ipynb index 5a51a5a03..8cee1e083 100644 --- a/static/function/hello.ipynb +++ b/static/function/hello.ipynb @@ -1,32 +1,22 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def hello():\n", - " print(\"Hello!\")\n", - "\n", - "\n", - "hello()\n", - "hello()\n", - "hello()" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Hello!\n", - "Hello!\n", - "Hello!\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def hello():\n", + " print(\"Hello!\")\n", + "\n", + "\n", + "hello()\n", + "hello()\n", + "hello()" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/function/indent.ipynb b/static/function/indent.ipynb index 984654f66..03b19e1c3 100644 --- a/static/function/indent.ipynb +++ b/static/function/indent.ipynb @@ -1,28 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def f(x):\n", - "return x**2\n", - "\n", - "f(2)+f(3)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "error", - "ename": "IndentationError", - "evalue": "expected an indented block after function definition on line 1 (3556709620.py, line 2)", - "traceback": [ - "\u001b[0;36m Cell \u001b[0;32mIn [1], line 2\u001b[0;36m\u001b[0m\n\u001b[0;31m return x**2\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mIndentationError\u001b[0m\u001b[0;31m:\u001b[0m expected an indented block after function definition on line 1\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def f(x):\n", + "return x**2\n", + "\n", + "f(2)+f(3)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/function/introduce_language.ipynb b/static/function/introduce_language.ipynb index ee3c24bfa..33db87646 100644 --- a/static/function/introduce_language.ipynb +++ b/static/function/introduce_language.ipynb @@ -1,28 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def introduce_self(name, language):\n", - " print(\"\u79c1\u306e\u540d\u524d\u306f\u3001\" + name + \"\u3067\u3059\u3002\" + language + \"\u9078\u629e\u3067\u3059\u3002\")\n", - "\n", - "\n", - "introduce_self(\"\u6771\u5927\u592a\u90ce\", \"\u4e2d\u56fd\u8a9e\")" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\u79c1\u306e\u540d\u524d\u306f\u3001\u6771\u5927\u592a\u90ce\u3067\u3059\u3002\u4e2d\u56fd\u8a9e\u9078\u629e\u3067\u3059\u3002\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def introduce_self(name, language):\n", + " print(\"私の名前は、\" + name + \"です。\" + language + \"選択です。\")\n", + "\n", + "\n", + "introduce_self(\"東大太郎\", \"中国語\")" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/function/introduce_language2.ipynb b/static/function/introduce_language2.ipynb index ba5aece59..19806abbb 100644 --- a/static/function/introduce_language2.ipynb +++ b/static/function/introduce_language2.ipynb @@ -1,28 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def introduce_self(name, language):\n", - " print(f\"\u79c1\u306e\u540d\u524d\u306f\u3001{name}\u3067\u3059\u3002{language}\u9078\u629e\u3067\u3059\u3002\")\n", - "\n", - "\n", - "introduce_self(\"\u6771\u5927\u592a\u90ce\", \"\u4e2d\u56fd\u8a9e\")" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\u79c1\u306e\u540d\u524d\u306f\u3001\u6771\u5927\u592a\u90ce\u3067\u3059\u3002\u4e2d\u56fd\u8a9e\u9078\u629e\u3067\u3059\u3002\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def introduce_self(name, language):\n", + " print(f\"私の名前は、{name}です。{language}選択です。\")\n", + "\n", + "\n", + "introduce_self(\"東大太郎\", \"中国語\")" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/function/introduce_self.ipynb b/static/function/introduce_self.ipynb index d5be41f8b..dbd206044 100644 --- a/static/function/introduce_self.ipynb +++ b/static/function/introduce_self.ipynb @@ -1,28 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def introduce_self(name):\n", - " print(\"\u79c1\u306e\u540d\u524d\u306f\u3001\" + name + \"\u3067\u3059\u3002\")\n", - "\n", - "\n", - "introduce_self(\"\u7530\u4e2d\")" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\u79c1\u306e\u540d\u524d\u306f\u3001\u7530\u4e2d\u3067\u3059\u3002\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def introduce_self(name):\n", + " print(\"私の名前は、\" + name + \"です。\")\n", + "\n", + "\n", + "introduce_self(\"田中\")" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/function/introduce_self2.ipynb b/static/function/introduce_self2.ipynb index 5bc9dc15a..911cc7cd4 100644 --- a/static/function/introduce_self2.ipynb +++ b/static/function/introduce_self2.ipynb @@ -1,28 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def introduce_self(name):\n", - " print(f\"\u79c1\u306e\u540d\u524d\u306f\u3001{name}\u3067\u3059\u3002\")\n", - "\n", - "\n", - "introduce_self(\"\u7530\u4e2d\")" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\u79c1\u306e\u540d\u524d\u306f\u3001\u7530\u4e2d\u3067\u3059\u3002\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def introduce_self(name):\n", + " print(f\"私の名前は、{name}です。\")\n", + "\n", + "\n", + "introduce_self(\"田中\")" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/function/introduce_self3.ipynb b/static/function/introduce_self3.ipynb index 5bdf6ac92..6d37d6b2d 100644 --- a/static/function/introduce_self3.ipynb +++ b/static/function/introduce_self3.ipynb @@ -1,28 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def introduce_self(name):\n", - " return \"\u79c1\u306e\u540d\u524d\u306f\u3001\" + name + \"\u3067\u3059\u3002\"\n", - "\n", - "\n", - "print(introduce_self(\"\u5c0f\u6797\"))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\u79c1\u306e\u540d\u524d\u306f\u3001\u5c0f\u6797\u3067\u3059\u3002\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def introduce_self(name):\n", + " return \"私の名前は、\" + name + \"です。\"\n", + "\n", + "\n", + "print(introduce_self(\"小林\"))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/function/introduce_self4.ipynb b/static/function/introduce_self4.ipynb index d3af26086..398a81d32 100644 --- a/static/function/introduce_self4.ipynb +++ b/static/function/introduce_self4.ipynb @@ -1,28 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def introduce_self(name):\n", - " return f\"\u79c1\u306e\u540d\u524d\u306f\u3001{name}\u3067\u3059\u3002\"\n", - "\n", - "\n", - "print(introduce_self(\"\u5c0f\u6797\"))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\u79c1\u306e\u540d\u524d\u306f\u3001\u5c0f\u6797\u3067\u3059\u3002\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def introduce_self(name):\n", + " return f\"私の名前は、{name}です。\"\n", + "\n", + "\n", + "print(introduce_self(\"小林\"))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/function/x2.ipynb b/static/function/x2.ipynb index 4bd48f71f..dc80a4981 100644 --- a/static/function/x2.ipynb +++ b/static/function/x2.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "2**2 + 3**2" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "13" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "2**2 + 3**2" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/function/x2_function.ipynb b/static/function/x2_function.ipynb index 4e505b30f..b645ccc38 100644 --- a/static/function/x2_function.ipynb +++ b/static/function/x2_function.ipynb @@ -1,31 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def f(x):\n", - " return x**2\n", - "\n", - "\n", - "f(2) + f(3)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "13" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def f(x):\n", + " return x**2\n", + "\n", + "\n", + "f(2) + f(3)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From 80856b2bec82a412b288c4e8ab7a51fc68815767 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:44:21 +0900 Subject: [PATCH 05/21] Remove outputs in library/ --- static/library/ceil.ipynb | 43 +++++++++++------------------ static/library/cos.ipynb | 43 +++++++++++------------------ static/library/e.ipynb | 43 +++++++++++------------------ static/library/e2.ipynb | 43 +++++++++++------------------ static/library/exp.ipynb | 43 +++++++++++------------------ static/library/fabs.ipynb | 43 +++++++++++------------------ static/library/floor.ipynb | 43 +++++++++++------------------ static/library/log.ipynb | 43 +++++++++++------------------ static/library/math_example.ipynb | 43 +++++++++++------------------ static/library/pi.ipynb | 43 +++++++++++------------------ static/library/sin.ipynb | 43 +++++++++++------------------ static/library/sin_pi.ipynb | 45 ++++++++++++------------------- static/library/sqrt.ipynb | 43 +++++++++++------------------ static/library/tan.ipynb | 43 +++++++++++------------------ 14 files changed, 225 insertions(+), 379 deletions(-) diff --git a/static/library/ceil.ipynb b/static/library/ceil.ipynb index 21db0a3ee..c17e5db58 100644 --- a/static/library/ceil.ipynb +++ b/static/library/ceil.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.ceil(3.2)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "4" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.ceil(3.2)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/cos.ipynb b/static/library/cos.ipynb index 38777a041..77210fc25 100644 --- a/static/library/cos.ipynb +++ b/static/library/cos.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.cos(1)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "0.5403023058681398" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.cos(1)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/e.ipynb b/static/library/e.ipynb index 9c56b3ee6..d624b589b 100644 --- a/static/library/e.ipynb +++ b/static/library/e.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.e" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "2.718281828459045" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.e" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/e2.ipynb b/static/library/e2.ipynb index e09922bcb..be66fed74 100644 --- a/static/library/e2.ipynb +++ b/static/library/e2.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.exp(1)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "2.718281828459045" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.exp(1)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/exp.ipynb b/static/library/exp.ipynb index 0f2146128..97d654c39 100644 --- a/static/library/exp.ipynb +++ b/static/library/exp.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.exp(2)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "7.38905609893065" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.exp(2)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/fabs.ipynb b/static/library/fabs.ipynb index 507527aa3..d0df2788e 100644 --- a/static/library/fabs.ipynb +++ b/static/library/fabs.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.fabs(-4)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "4.0" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.fabs(-4)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/floor.ipynb b/static/library/floor.ipynb index f0b4a10a5..eb86dafa8 100644 --- a/static/library/floor.ipynb +++ b/static/library/floor.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.floor(3.2)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "3" - ] - }, - "metadata": {}, - "execution_count": 2 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.floor(3.2)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/log.ipynb b/static/library/log.ipynb index 72dbe9ef0..3a16b9127 100644 --- a/static/library/log.ipynb +++ b/static/library/log.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.log(8, 2)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "3.0" - ] - }, - "metadata": {}, - "execution_count": 2 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.log(8, 2)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/math_example.ipynb b/static/library/math_example.ipynb index 3a8c557a7..6c4b3b6f6 100644 --- a/static/library/math_example.ipynb +++ b/static/library/math_example.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.fabs(-2)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "2.0" - ] - }, - "metadata": {}, - "execution_count": 2 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.fabs(-2)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/pi.ipynb b/static/library/pi.ipynb index 246a98362..cb53adb0c 100644 --- a/static/library/pi.ipynb +++ b/static/library/pi.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.pi" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "3.141592653589793" - ] - }, - "metadata": {}, - "execution_count": 4 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.pi" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/sin.ipynb b/static/library/sin.ipynb index 5ae281ff3..43ae5c81b 100644 --- a/static/library/sin.ipynb +++ b/static/library/sin.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.sin(1)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "0.8414709848078965" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.sin(1)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/sin_pi.ipynb b/static/library/sin_pi.ipynb index a339da23a..426668153 100644 --- a/static/library/sin_pi.ipynb +++ b/static/library/sin_pi.ipynb @@ -1,30 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "PI = math.pi\n", - "math.sin(PI / 2)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "1.0" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "PI = math.pi\n", + "math.sin(PI / 2)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/sqrt.ipynb b/static/library/sqrt.ipynb index 34b6375b1..5680ba5a0 100644 --- a/static/library/sqrt.ipynb +++ b/static/library/sqrt.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.sqrt(2)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "1.4142135623730951" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.sqrt(2)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/library/tan.ipynb b/static/library/tan.ipynb index 621a353e7..4e1c505ff 100644 --- a/static/library/tan.ipynb +++ b/static/library/tan.ipynb @@ -1,29 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "math.tan(1)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "1.5574077246549023" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "math.tan(1)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From 7628089fb1299e81dc667274850e2558eb5b53a0 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:44:40 +0900 Subject: [PATCH 06/21] Remove outputs in pip/ --- static/pip/pandas.ipynb | 62 +++++++++++------------------------------ 1 file changed, 16 insertions(+), 46 deletions(-) diff --git a/static/pip/pandas.ipynb b/static/pip/pandas.ipynb index 246891d65..7a070ca7f 100644 --- a/static/pip/pandas.ipynb +++ b/static/pip/pandas.ipynb @@ -1,65 +1,35 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install pandas" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Collecting pandas\n", - " Downloading pandas-1.5.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.1 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.1/12.1 MB\u001b[0m \u001b[31m12.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n", - "\u001b[?25hCollecting pytz>=2020.1\n", - " Downloading pytz-2022.6-py2.py3-none-any.whl (498 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m498.1/498.1 KB\u001b[0m \u001b[31m10.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: numpy>=1.21.0 in /home/w/.local/lib/python3.10/site-packages (from pandas) (1.23.3)\n", - "Requirement already satisfied: python-dateutil>=2.8.1 in /home/w/.local/lib/python3.10/site-packages (from pandas) (2.8.2)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.1->pandas) (1.16.0)\n", - "Installing collected packages: pytz, pandas\n", - "Successfully installed pandas-1.5.2 pytz-2022.6\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import pandas as pd" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "s1 = pd.Series([0, 1, 2])\n", "print(s1)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "0 0\n", - "1 1\n", - "2 2\n", - "dtype: int64\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From a64b611574f6705061dea4021f7ec33a4cd2b520 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:45:00 +0900 Subject: [PATCH 07/21] Remove outputs in for/ --- static/for/factorial.ipynb | 24 ++++++---------- static/for/factorial_lib.ipynb | 40 +++++++++++---------------- static/for/for_1to10.ipynb | 33 ++++++---------------- static/for/for_hello.ipynb | 47 ++++++++++---------------------- static/for/for_hello2.ipynb | 33 ++++++---------------- static/for/for_sum_1to100.ipynb | 24 ++++++---------- static/for/for_sum_1to1000.ipynb | 24 ++++++---------- static/for/range.ipynb | 47 ++++++++++---------------------- static/for/sum_1to10.ipynb | 27 ++++++------------ static/for/sum_1to100.ipynb | 27 ++++++------------ static/for/sum_1to20.ipynb | 27 ++++++------------ static/for/upto.ipynb | 24 ++++++---------- static/for/upto_sum.ipynb | 27 ++++++------------ static/for/while.ipynb | 24 ++++++---------- 14 files changed, 134 insertions(+), 294 deletions(-) diff --git a/static/for/factorial.ipynb b/static/for/factorial.ipynb index dab94760f..627ccfbf4 100644 --- a/static/for/factorial.ipynb +++ b/static/for/factorial.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def factorial(n):\n", " product = 1\n", @@ -14,18 +14,10 @@ "\n", "\n", "print(factorial(10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "3628800\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/factorial_lib.ipynb b/static/for/factorial_lib.ipynb index 6c2f0d8cd..305213010 100644 --- a/static/for/factorial_lib.ipynb +++ b/static/for/factorial_lib.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "print(math.factorial(10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "3628800\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "print(math.factorial(10))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/for_1to10.ipynb b/static/for/for_1to10.ipynb index 466cf8191..56d2e5040 100644 --- a/static/for/for_1to10.ipynb +++ b/static/for/for_1to10.ipynb @@ -1,34 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "for i in range(1, 11):\n", " print(i)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "1\n", - "2\n", - "3\n", - "4\n", - "5\n", - "6\n", - "7\n", - "8\n", - "9\n", - "10\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/for_hello.ipynb b/static/for/for_hello.ipynb index 14fcea6e6..32fb9226a 100644 --- a/static/for/for_hello.ipynb +++ b/static/for/for_hello.ipynb @@ -1,34 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "for _ in range(10):\n", - " print(\"Hello!\")" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "for _ in range(10):\n", + " print(\"Hello!\")" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/for_hello2.ipynb b/static/for/for_hello2.ipynb index f05c53170..7e3c5af7d 100644 --- a/static/for/for_hello2.ipynb +++ b/static/for/for_hello2.ipynb @@ -1,34 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "for i in range(1, 11):\n", " print(\"Hello!\")" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n", - "Hello!\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/for_sum_1to100.ipynb b/static/for/for_sum_1to100.ipynb index 1d5882113..ca93d6662 100644 --- a/static/for/for_sum_1to100.ipynb +++ b/static/for/for_sum_1to100.ipynb @@ -1,27 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "sum = 0\n", "for i in range(1, 101):\n", " sum += i\n", "print(sum)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "5050\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/for_sum_1to1000.ipynb b/static/for/for_sum_1to1000.ipynb index d74083695..a45a00f61 100644 --- a/static/for/for_sum_1to1000.ipynb +++ b/static/for/for_sum_1to1000.ipynb @@ -1,27 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "sum = 0\n", "for i in range(1, 1001):\n", " sum += i\n", "print(sum)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "500500\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/range.ipynb b/static/for/range.ipynb index 093053bef..3288f5370 100644 --- a/static/for/range.ipynb +++ b/static/for/range.ipynb @@ -1,34 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "for i in range(10):\n", - " print(i)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "0\n", - "1\n", - "2\n", - "3\n", - "4\n", - "5\n", - "6\n", - "7\n", - "8\n", - "9\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "for i in range(10):\n", + " print(i)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/sum_1to10.ipynb b/static/for/sum_1to10.ipynb index b7d018a75..b1d94a66f 100644 --- a/static/for/sum_1to10.ipynb +++ b/static/for/sum_1to10.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "55" - ] - }, - "metadata": {}, - "execution_count": 3 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/sum_1to100.ipynb b/static/for/sum_1to100.ipynb index d53edb367..64a08e856 100644 --- a/static/for/sum_1to100.ipynb +++ b/static/for/sum_1to100.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "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" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "5050" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/sum_1to20.ipynb b/static/for/sum_1to20.ipynb index f1293fe6a..3fece39ab 100644 --- a/static/for/sum_1to20.ipynb +++ b/static/for/sum_1to20.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "210" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/upto.ipynb b/static/for/upto.ipynb index e368c962a..f9354f7b8 100644 --- a/static/for/upto.ipynb +++ b/static/for/upto.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def upto(n):\n", " sum = 0\n", @@ -14,18 +14,10 @@ "\n", "\n", "print(upto(10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "55\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/upto_sum.ipynb b/static/for/upto_sum.ipynb index a2c281e31..df23a0c0c 100644 --- a/static/for/upto_sum.ipynb +++ b/static/for/upto_sum.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "sum(range(1, 11))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "55" - ] - }, - "metadata": {}, - "execution_count": 1 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/for/while.ipynb b/static/for/while.ipynb index 01445a89b..5353211b8 100644 --- a/static/for/while.ipynb +++ b/static/for/while.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "sum = 0\n", "i = 1\n", @@ -12,18 +12,10 @@ " sum += i\n", " i += 1\n", "print(sum)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "55\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From faf36904bed6db01a4db3bfaf552abb6184c9da1 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:45:15 +0900 Subject: [PATCH 08/21] Remove outputs in array/ --- static/array/average.ipynb | 46 +++++++---------- static/array/average10.ipynb | 52 +++++++++----------- static/array/average2.ipynb | 24 +++------ static/array/average3.ipynb | 24 +++------ static/array/average_numpy.ipynb | 42 +++++++--------- static/array/average_statistics.ipynb | 42 +++++++--------- static/array/change.ipynb | 16 +++--- static/array/change2.ipynb | 24 +++------ static/array/change3.ipynb | 24 +++------ static/array/range.ipynb | 25 +++------- static/array/sum.ipynb | 36 ++++++-------- static/array/sum2.ipynb | 36 ++++++-------- static/array/variance.ipynb | 68 ++++++++++++-------------- static/array/variance2.ipynb | 66 +++++++++++-------------- static/array/variance_numpy.ipynb | 42 +++++++--------- static/array/variance_statistics.ipynb | 42 +++++++--------- 16 files changed, 244 insertions(+), 365 deletions(-) diff --git a/static/array/average.ipynb b/static/array/average.ipynb index 53a07e98d..1aa5bbb79 100644 --- a/static/array/average.ipynb +++ b/static/array/average.ipynb @@ -1,29 +1,21 @@ { - "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": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "70.8\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "score1 = 96\n", + "score2 = 56\n", + "score3 = 42\n", + "score4 = 74\n", + "score5 = 86\n", + "print((score1 + score2 + score3 + score4 + score5) / 5)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/average10.ipynb b/static/array/average10.ipynb index 474367b6d..0c8d04263 100644 --- a/static/array/average10.ipynb +++ b/static/array/average10.ipynb @@ -1,32 +1,24 @@ { - "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", - "print(average(scores))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "40.2\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "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))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/average2.ipynb b/static/array/average2.ipynb index 9ceee6851..b036ab6a4 100644 --- a/static/array/average2.ipynb +++ b/static/array/average2.ipynb @@ -1,25 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "scores = [96, 56, 42, 74, 86]\n", "print((scores[0] + scores[1] + scores[2] + scores[3] + scores[4]) / 5)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "70.8\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/average3.ipynb b/static/array/average3.ipynb index 89958e558..fc7eb60f2 100644 --- a/static/array/average3.ipynb +++ b/static/array/average3.ipynb @@ -1,28 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "scores = [96, 56, 42, 74, 86]\n", "sum = 0\n", "for i in range(len(scores)):\n", " sum += scores[i]\n", "print(sum / 5)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "70.8\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/average_numpy.ipynb b/static/array/average_numpy.ipynb index 2bc4a4b1a..1bb4dd5f3 100644 --- a/static/array/average_numpy.ipynb +++ b/static/array/average_numpy.ipynb @@ -1,27 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import numpy\n", - "\n", - "scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n", - "print(numpy.mean(scores))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "40.2\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy\n", + "\n", + "scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n", + "print(numpy.mean(scores))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/average_statistics.ipynb b/static/array/average_statistics.ipynb index b0a13ca8b..5e86b8b46 100644 --- a/static/array/average_statistics.ipynb +++ b/static/array/average_statistics.ipynb @@ -1,27 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import statistics\n", - "\n", - "scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n", - "print(statistics.mean(scores))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "40.2\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import statistics\n", + "\n", + "scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n", + "print(statistics.mean(scores))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/change.ipynb b/static/array/change.ipynb index dd7f48b84..f7efce96e 100644 --- a/static/array/change.ipynb +++ b/static/array/change.ipynb @@ -1,17 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "scores = [96, 56, 42, 74, 86]\n", "scores[0] = 37" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/change2.ipynb b/static/array/change2.ipynb index b4a75e09d..1f9096c80 100644 --- a/static/array/change2.ipynb +++ b/static/array/change2.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "scores = [96, 56, 42, 74, 86]\n", "scores[0] = 37\n", "print(scores)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[37, 56, 42, 74, 86]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/change3.ipynb b/static/array/change3.ipynb index ec024fabe..7704b72ce 100644 --- a/static/array/change3.ipynb +++ b/static/array/change3.ipynb @@ -1,28 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "scores = [96, 56, 42, 74, 86]\n", "i = 1\n", "laterScore = 37\n", "scores[i - 1] = laterScore\n", "print(scores)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[37, 56, 42, 74, 86]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/range.ipynb b/static/array/range.ipynb index ec16de854..2ed9d86ad 100644 --- a/static/array/range.ipynb +++ b/static/array/range.ipynb @@ -1,26 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "print(range(1, 11))\n", "print(list(range(1, 11)))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "range(1, 11)\n", - "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/sum.ipynb b/static/array/sum.ipynb index 53f361c62..5948609b5 100644 --- a/static/array/sum.ipynb +++ b/static/array/sum.ipynb @@ -1,24 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "print(sum([1, 2, 3]))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "6\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(sum([1, 2, 3]))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/sum2.ipynb b/static/array/sum2.ipynb index 1d0812d93..86b18c9a1 100644 --- a/static/array/sum2.ipynb +++ b/static/array/sum2.ipynb @@ -1,24 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "print(sum([2, 5, 7]))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "14\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(sum([2, 5, 7]))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/variance.ipynb b/static/array/variance.ipynb index b5d0ecf52..8b494ef93 100644 --- a/static/array/variance.ipynb +++ b/static/array/variance.ipynb @@ -1,40 +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", - "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 - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "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))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/variance2.ipynb b/static/array/variance2.ipynb index c7dddd341..c2511666f 100644 --- a/static/array/variance2.ipynb +++ b/static/array/variance2.ipynb @@ -1,39 +1,31 @@ { - "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", - " for i in range(len(scores)):\n", - " sum += (scores[i] - average(scores)) ** 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 - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "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", + " for i in range(len(scores)):\n", + " sum += (scores[i] - average(scores)) ** 2\n", + " return sum / len(scores)\n", + "\n", + "\n", + "scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n", + "print(variance(scores))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/variance_numpy.ipynb b/static/array/variance_numpy.ipynb index 3ce5b5ef8..f714b00a2 100644 --- a/static/array/variance_numpy.ipynb +++ b/static/array/variance_numpy.ipynb @@ -1,27 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import numpy\n", - "\n", - "scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n", - "print(numpy.var(scores))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "955.5600000000001\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy\n", + "\n", + "scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n", + "print(numpy.var(scores))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/array/variance_statistics.ipynb b/static/array/variance_statistics.ipynb index 1cda7d666..76b639690 100644 --- a/static/array/variance_statistics.ipynb +++ b/static/array/variance_statistics.ipynb @@ -1,27 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import statistics\n", - "\n", - "scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n", - "print(statistics.pvariance(scores))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "955.56\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import statistics\n", + "\n", + "scores = [26, 78, 83, 20, 10, 11, 22, 16, 41, 95]\n", + "print(statistics.pvariance(scores))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From 5b3a1f84e8267061f30afc72ba4ab4891edc27f1 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:47:30 +0900 Subject: [PATCH 09/21] Remove outputs in multi-array/ --- static/multi-array/2_dim_array_revised.ipynb | 56 +++++++--------- static/multi-array/2_dim_array_sample.ipynb | 58 +++++++---------- static/multi-array/3_dim_array_sample.ipynb | 58 +++++++---------- static/multi-array/average_of_sum.ipynb | 68 +++++++++----------- 4 files changed, 104 insertions(+), 136 deletions(-) diff --git a/static/multi-array/2_dim_array_revised.ipynb b/static/multi-array/2_dim_array_revised.ipynb index faf8d2638..01c8dfc08 100644 --- a/static/multi-array/2_dim_array_revised.ipynb +++ b/static/multi-array/2_dim_array_revised.ipynb @@ -1,34 +1,26 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def sum_2d(scores):\n", - " s = 0\n", - " for i in range(len(scores)):\n", - " for j in range(len(scores[i])):\n", - " s += scores[i][j]\n", - " return s\n", - "\n", - "\n", - "SCORES = [[83, 75, 32], [73, 53, 84], [63, 48, 64]]\n", - "\n", - "print(sum_2d(SCORES))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "575\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def sum_2d(scores):\n", + " s = 0\n", + " for i in range(len(scores)):\n", + " for j in range(len(scores[i])):\n", + " s += scores[i][j]\n", + " return s\n", + "\n", + "\n", + "SCORES = [[83, 75, 32], [73, 53, 84], [63, 48, 64]]\n", + "\n", + "print(sum_2d(SCORES))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/multi-array/2_dim_array_sample.ipynb b/static/multi-array/2_dim_array_sample.ipynb index a4c18aa8f..06f812e15 100644 --- a/static/multi-array/2_dim_array_sample.ipynb +++ b/static/multi-array/2_dim_array_sample.ipynb @@ -1,35 +1,27 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def sum_val(scores):\n", - " s = 0\n", - " for i in range(len(scores)):\n", - " s += scores[i]\n", - " return s\n", - "\n", - "\n", - "A_SCORES = [83, 75, 32]\n", - "B_SCORES = [73, 53, 84]\n", - "C_SCORES = [63, 48, 64]\n", - "\n", - "print(sum_val(A_SCORES) + sum_val(B_SCORES) + sum_val(C_SCORES))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "575\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def sum_val(scores):\n", + " s = 0\n", + " for i in range(len(scores)):\n", + " s += scores[i]\n", + " return s\n", + "\n", + "\n", + "A_SCORES = [83, 75, 32]\n", + "B_SCORES = [73, 53, 84]\n", + "C_SCORES = [63, 48, 64]\n", + "\n", + "print(sum_val(A_SCORES) + sum_val(B_SCORES) + sum_val(C_SCORES))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/multi-array/3_dim_array_sample.ipynb b/static/multi-array/3_dim_array_sample.ipynb index 3244414d1..678fea053 100644 --- a/static/multi-array/3_dim_array_sample.ipynb +++ b/static/multi-array/3_dim_array_sample.ipynb @@ -1,35 +1,27 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def sum_3d(scores):\n", - " s = 0\n", - " for i in range(len(scores)):\n", - " for j in range(len(scores[i])):\n", - " for k in range(len(scores[i][j])):\n", - " s += scores[i][j][k]\n", - " return s\n", - "\n", - "\n", - "SCORES = [[[51, 56, 10], [47, 52, 58]], [[24, 92, 34], [28, 44, 19]]]\n", - "\n", - "print(sum_3d(SCORES))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "515\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def sum_3d(scores):\n", + " s = 0\n", + " for i in range(len(scores)):\n", + " for j in range(len(scores[i])):\n", + " for k in range(len(scores[i][j])):\n", + " s += scores[i][j][k]\n", + " return s\n", + "\n", + "\n", + "SCORES = [[[51, 56, 10], [47, 52, 58]], [[24, 92, 34], [28, 44, 19]]]\n", + "\n", + "print(sum_3d(SCORES))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/multi-array/average_of_sum.ipynb b/static/multi-array/average_of_sum.ipynb index f4532b28e..49e399c95 100644 --- a/static/multi-array/average_of_sum.ipynb +++ b/static/multi-array/average_of_sum.ipynb @@ -1,40 +1,32 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def sum_1d(scores):\n", - " s = 0\n", - " for i in range(len(scores)):\n", - " s += scores[i]\n", - " return s\n", - "\n", - "\n", - "def sum_2d_average(scores):\n", - " s = 0\n", - " for i in range(len(scores)):\n", - " s += sum_1d(scores[i])\n", - " return s / len(scores)\n", - "\n", - "\n", - "SCORES = [[83, 75, 32], [73, 53, 84], [63, 48, 64]]\n", - "\n", - "print(sum_2d_average(SCORES))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "191.66666666666666\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def sum_1d(scores):\n", + " s = 0\n", + " for i in range(len(scores)):\n", + " s += scores[i]\n", + " return s\n", + "\n", + "\n", + "def sum_2d_average(scores):\n", + " s = 0\n", + " for i in range(len(scores)):\n", + " s += sum_1d(scores[i])\n", + " return s / len(scores)\n", + "\n", + "\n", + "SCORES = [[83, 75, 32], [73, 53, 84], [63, 48, 64]]\n", + "\n", + "print(sum_2d_average(SCORES))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From 7208096a49e08809e09cc66bb23e14ecea518f67 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:47:45 +0900 Subject: [PATCH 10/21] Remove outputs in if/ --- static/if/abs.ipynb | 24 +++++--------- static/if/abs2.ipynb | 24 +++++--------- static/if/abs_default.ipynb | 36 ++++++++------------- static/if/abs_math.ipynb | 40 ++++++++++------------- static/if/alcohol.ipynb | 40 ++++++++++------------- static/if/and.ipynb | 24 +++++--------- static/if/below.ipynb | 24 +++++--------- static/if/comparison_operator.ipynb | 24 +++++--------- static/if/comparison_operator2.ipynb | 24 +++++--------- static/if/eq.ipynb | 24 +++++--------- static/if/false.ipynb | 24 +++++--------- static/if/greater.ipynb | 24 +++++--------- static/if/legal_age.ipynb | 24 +++++--------- static/if/less_than.ipynb | 24 +++++--------- static/if/logical_operator.ipynb | 24 +++++--------- static/if/logical_operator2.ipynb | 24 +++++--------- static/if/max.ipynb | 24 +++++--------- static/if/neq.ipynb | 24 +++++--------- static/if/not.ipynb | 24 +++++--------- static/if/or.ipynb | 24 +++++--------- static/if/over.ipynb | 24 +++++--------- static/if/the_right_to_vote.ipynb | 48 ++++++++++++---------------- static/if/true.ipynb | 24 +++++--------- 23 files changed, 218 insertions(+), 402 deletions(-) diff --git a/static/if/abs.ipynb b/static/if/abs.ipynb index 60d47fa46..a1ef41e6b 100644 --- a/static/if/abs.ipynb +++ b/static/if/abs.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def abs_val(n):\n", " if n >= 0:\n", @@ -14,18 +14,10 @@ "\n", "\n", "print(abs_val(-10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "10\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/abs2.ipynb b/static/if/abs2.ipynb index 2dae729b6..3ab4764c5 100644 --- a/static/if/abs2.ipynb +++ b/static/if/abs2.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def abs_val(n):\n", " if n < 0:\n", @@ -13,18 +13,10 @@ "\n", "\n", "print(abs_val(-10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "10\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/abs_default.ipynb b/static/if/abs_default.ipynb index 273bba124..e20186521 100644 --- a/static/if/abs_default.ipynb +++ b/static/if/abs_default.ipynb @@ -1,24 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "print(abs(-10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "10\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(abs(-10))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/abs_math.ipynb b/static/if/abs_math.ipynb index e6981fc87..39bedc17f 100644 --- a/static/if/abs_math.ipynb +++ b/static/if/abs_math.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "print(math.fabs(-10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "10.0\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "print(math.fabs(-10))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/alcohol.ipynb b/static/if/alcohol.ipynb index 0040bf0db..a7f3f0357 100644 --- a/static/if/alcohol.ipynb +++ b/static/if/alcohol.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "age = 19\n", - "if age < 20:\n", - " print(\"\u304a\u9152\u306f\u4e8c\u5341\u6b73\u306b\u306a\u3063\u3066\u304b\u3089\uff01\")" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\u304a\u9152\u306f\u4e8c\u5341\u6b73\u306b\u306a\u3063\u3066\u304b\u3089\uff01\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "age = 19\n", + "if age < 20:\n", + " print(\"お酒は二十歳になってから!\")" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/and.ipynb b/static/if/and.ipynb index bbab926d3..b0781ea2f 100644 --- a/static/if/and.ipynb +++ b/static/if/and.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(age >= 20 and age < 30)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "False\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/below.ipynb b/static/if/below.ipynb index 758b3d204..b3f73ba99 100644 --- a/static/if/below.ipynb +++ b/static/if/below.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(age <= 20)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "True\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/comparison_operator.ipynb b/static/if/comparison_operator.ipynb index 5f4879fed..be7d07ea3 100644 --- a/static/if/comparison_operator.ipynb +++ b/static/if/comparison_operator.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(age > 20)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "False\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/comparison_operator2.ipynb b/static/if/comparison_operator2.ipynb index 3d1edbc96..ce9d0b6af 100644 --- a/static/if/comparison_operator2.ipynb +++ b/static/if/comparison_operator2.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(10 < age < 20)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "True\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/eq.ipynb b/static/if/eq.ipynb index 908e2ded1..f995772cb 100644 --- a/static/if/eq.ipynb +++ b/static/if/eq.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(age == 20)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "False\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/false.ipynb b/static/if/false.ipynb index e7a91d576..b66a19744 100644 --- a/static/if/false.ipynb +++ b/static/if/false.ipynb @@ -1,25 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "f = False\n", "print(f)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "False\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/greater.ipynb b/static/if/greater.ipynb index 5f4879fed..be7d07ea3 100644 --- a/static/if/greater.ipynb +++ b/static/if/greater.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(age > 20)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "False\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/legal_age.ipynb b/static/if/legal_age.ipynb index 65b7ea6c7..274b9d040 100644 --- a/static/if/legal_age.ipynb +++ b/static/if/legal_age.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", @@ -12,18 +12,10 @@ " print(\"成人です。\")\n", "else:\n", " print(\"未成年です。\")" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "成人です。\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/less_than.ipynb b/static/if/less_than.ipynb index acbf1f5bf..e9fd1235b 100644 --- a/static/if/less_than.ipynb +++ b/static/if/less_than.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(age < 20)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "True\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/logical_operator.ipynb b/static/if/logical_operator.ipynb index 66795def6..d7575307a 100644 --- a/static/if/logical_operator.ipynb +++ b/static/if/logical_operator.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(age > 20 or age == 20)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "False\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/logical_operator2.ipynb b/static/if/logical_operator2.ipynb index 544c6c871..22daec4a9 100644 --- a/static/if/logical_operator2.ipynb +++ b/static/if/logical_operator2.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(age >= 20)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "False\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/max.ipynb b/static/if/max.ipynb index a9b02389e..74ffcc230 100644 --- a/static/if/max.ipynb +++ b/static/if/max.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def max_val(scores):\n", " m = scores[0]\n", @@ -16,18 +16,10 @@ "\n", "SCORES = [55, 32, 16, 51, 80, 19]\n", "print(max_val(SCORES))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "80\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/neq.ipynb b/static/if/neq.ipynb index 40bcd18f9..701391dbe 100644 --- a/static/if/neq.ipynb +++ b/static/if/neq.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(age != 20)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "True\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/not.ipynb b/static/if/not.ipynb index 0178c661b..fb924eeb7 100644 --- a/static/if/not.ipynb +++ b/static/if/not.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(not age >= 20)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "True\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/or.ipynb b/static/if/or.ipynb index 094635618..ce61176a6 100644 --- a/static/if/or.ipynb +++ b/static/if/or.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(age < 20 or age > 70)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "True\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/over.ipynb b/static/if/over.ipynb index 544c6c871..22daec4a9 100644 --- a/static/if/over.ipynb +++ b/static/if/over.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "age = 18\n", "\n", "print(age >= 20)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "False\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/the_right_to_vote.ipynb b/static/if/the_right_to_vote.ipynb index 46461e933..c1ffc0a47 100644 --- a/static/if/the_right_to_vote.ipynb +++ b/static/if/the_right_to_vote.ipynb @@ -1,30 +1,22 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "age = 18\n", - "if age < 18:\n", - " print(\"\u9078\u6319\u6a29\u306f\u3042\u308a\u307e\u305b\u3093\u3002\")\n", - "elif age < 25:\n", - " print(\"\u6295\u7968\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\")\n", - "else:\n", - " print(\"\u8846\u8b70\u9662\u8b70\u54e1\u306b\u7acb\u5019\u88dc\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\")" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\u6295\u7968\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "age = 18\n", + "if age < 18:\n", + " print(\"選挙権はありません。\")\n", + "elif age < 25:\n", + " print(\"投票することができます。\")\n", + "else:\n", + " print(\"衆議院議員に立候補することができます。\")" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/if/true.ipynb b/static/if/true.ipynb index a9d76fae5..1a77968c7 100644 --- a/static/if/true.ipynb +++ b/static/if/true.ipynb @@ -1,25 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "t = True\n", "print(t)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "True\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From 3951e7349676b58a1c4a608da0f8dacd1548fc81 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:47:58 +0900 Subject: [PATCH 11/21] Remove outputs in practice/ --- static/practice/fizzbuzz.ipynb | 53 ++++--------------------- static/practice/fizzbuzz2.ipynb | 53 ++++--------------------- static/practice/gcd.ipynb | 24 ++++-------- static/practice/gcd_math.ipynb | 24 ++++-------- static/practice/gcd_recursive.ipynb | 24 ++++-------- static/practice/prime_factorize.ipynb | 27 ++++--------- static/practice/prime_number.ipynb | 48 ++++------------------- static/practice/prime_number2.ipynb | 56 ++++----------------------- 8 files changed, 64 insertions(+), 245 deletions(-) diff --git a/static/practice/fizzbuzz.ipynb b/static/practice/fizzbuzz.ipynb index 31200c93b..28a124495 100644 --- a/static/practice/fizzbuzz.ipynb +++ b/static/practice/fizzbuzz.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def fizzbuzz(n):\n", " for i in range(1, n + 1):\n", @@ -19,47 +19,10 @@ "\n", "\n", "fizzbuzz(30)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "1\n", - "2\n", - "Fizz\n", - "4\n", - "Buzz\n", - "Fizz\n", - "7\n", - "8\n", - "Fizz\n", - "Buzz\n", - "11\n", - "Fizz\n", - "13\n", - "14\n", - "FizzBuzz\n", - "16\n", - "17\n", - "Fizz\n", - "19\n", - "Buzz\n", - "Fizz\n", - "22\n", - "23\n", - "Fizz\n", - "Buzz\n", - "26\n", - "Fizz\n", - "28\n", - "29\n", - "FizzBuzz\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/practice/fizzbuzz2.ipynb b/static/practice/fizzbuzz2.ipynb index 4db6057ab..3b548ac10 100644 --- a/static/practice/fizzbuzz2.ipynb +++ b/static/practice/fizzbuzz2.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def fizzbuzz(n):\n", " for i in range(1, n + 1):\n", @@ -19,47 +19,10 @@ "\n", "\n", "fizzbuzz(30)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "1\n", - "2\n", - "Fizz\n", - "4\n", - "Buzz\n", - "Fizz\n", - "7\n", - "8\n", - "Fizz\n", - "Buzz\n", - "11\n", - "Fizz\n", - "13\n", - "14\n", - "FizzBuzz\n", - "16\n", - "17\n", - "Fizz\n", - "19\n", - "Buzz\n", - "Fizz\n", - "22\n", - "23\n", - "Fizz\n", - "Buzz\n", - "26\n", - "Fizz\n", - "28\n", - "29\n", - "FizzBuzz\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/practice/gcd.ipynb b/static/practice/gcd.ipynb index 919eed9da..15fa52b80 100644 --- a/static/practice/gcd.ipynb +++ b/static/practice/gcd.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def gcd(a, b):\n", " if a < b:\n", @@ -15,18 +15,10 @@ "\n", "\n", "print(gcd(12, 16))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "4\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/practice/gcd_math.ipynb b/static/practice/gcd_math.ipynb index ea1a2ac5b..1bd864240 100644 --- a/static/practice/gcd_math.ipynb +++ b/static/practice/gcd_math.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import math\n", "\n", "print(math.gcd(12, 16))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "4\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/practice/gcd_recursive.ipynb b/static/practice/gcd_recursive.ipynb index 854788675..a5813ffb1 100644 --- a/static/practice/gcd_recursive.ipynb +++ b/static/practice/gcd_recursive.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def gcd(a, b):\n", " if b == 0:\n", @@ -14,18 +14,10 @@ "\n", "\n", "print(gcd(12, 16))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "4\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/practice/prime_factorize.ipynb b/static/practice/prime_factorize.ipynb index ccaf9f0c9..21ec85da4 100644 --- a/static/practice/prime_factorize.ipynb +++ b/static/practice/prime_factorize.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def prime_factorize(n):\n", " i = 2\n", @@ -17,21 +17,10 @@ "\n", "\n", "prime_factorize(24)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "2\n", - "2\n", - "2\n", - "3\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/practice/prime_number.ipynb b/static/practice/prime_number.ipynb index f5037f477..e4b716f8f 100644 --- a/static/practice/prime_number.ipynb +++ b/static/practice/prime_number.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def is_prime_number(n):\n", " if n < 2:\n", @@ -22,42 +22,10 @@ "\n", "\n", "print_prime_number(100)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "2\n", - "3\n", - "5\n", - "7\n", - "11\n", - "13\n", - "17\n", - "19\n", - "23\n", - "29\n", - "31\n", - "37\n", - "41\n", - "43\n", - "47\n", - "53\n", - "59\n", - "61\n", - "67\n", - "71\n", - "73\n", - "79\n", - "83\n", - "89\n", - "97\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/practice/prime_number2.ipynb b/static/practice/prime_number2.ipynb index a7440fab1..38f8d0fb1 100644 --- a/static/practice/prime_number2.ipynb +++ b/static/practice/prime_number2.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import math\n", "\n", @@ -25,50 +25,10 @@ "\n", "\n", "print_prime_number(100)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "2\n", - "3\n", - "4\n", - "5\n", - "6\n", - "7\n", - "8\n", - "9\n", - "11\n", - "13\n", - "15\n", - "17\n", - "19\n", - "23\n", - "25\n", - "29\n", - "31\n", - "35\n", - "37\n", - "41\n", - "43\n", - "47\n", - "49\n", - "53\n", - "59\n", - "61\n", - "67\n", - "71\n", - "73\n", - "79\n", - "83\n", - "89\n", - "97\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From e4ff50822ad8d36b26cb3c46edd19d451592d01d Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:48:12 +0900 Subject: [PATCH 12/21] Remove outputs in life-game/ --- static/life-game/count_neighbors.ipynb | 16 +- static/life-game/count_neighbors_draft.ipynb | 24 +- static/life-game/is_alive.ipynb | 24 +- static/life-game/life_game.ipynb | 2787 +----------------- static/life-game/life_game_func.ipynb | 60 +- static/life-game/next_generation.ipynb | 60 +- 6 files changed, 72 insertions(+), 2899 deletions(-) diff --git a/static/life-game/count_neighbors.ipynb b/static/life-game/count_neighbors.ipynb index 51c6519cd..2a71d308e 100644 --- a/static/life-game/count_neighbors.ipynb +++ b/static/life-game/count_neighbors.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def count_neighbors(board, i, j):\n", " cnt = 0\n", @@ -17,10 +17,10 @@ "\n", "board = [[1, 1, 0], [1, 0, 0], [0, 0, 0]]\n", "print(count_neighbors(board, 0, 0))" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/life-game/count_neighbors_draft.ipynb b/static/life-game/count_neighbors_draft.ipynb index a4c33440b..5bf2266cd 100644 --- a/static/life-game/count_neighbors_draft.ipynb +++ b/static/life-game/count_neighbors_draft.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def count_neighbors(board, i, j):\n", " cnt = 0\n", @@ -16,18 +16,10 @@ "\n", "board = [[1, 1, 0], [1, 0, 0], [0, 0, 0]]\n", "print(count_neighbors(board, 1, 1))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "3\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/life-game/is_alive.ipynb b/static/life-game/is_alive.ipynb index f0cf2f197..10add88ae 100644 --- a/static/life-game/is_alive.ipynb +++ b/static/life-game/is_alive.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def count_neighbors(board, i, j):\n", " cnt = 0\n", @@ -33,18 +33,10 @@ "\n", "board = [[1, 1, 0], [1, 0, 0], [0, 0, 0]]\n", "print(is_alive(board, 0, 0))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "1\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/life-game/life_game.ipynb b/static/life-game/life_game.ipynb index ea41b5ec8..48e73321f 100644 --- a/static/life-game/life_game.ipynb +++ b/static/life-game/life_game.ipynb @@ -1,50 +1,30 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def count_neighbors(board, i, j):\n", " cnt = 0\n", @@ -93,2745 +73,10 @@ "n = 20\n", "images = life_game(data, n)\n", "ita.plot.animation_show(images)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
\n", - " \n", - "
\n", - " \n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - "
\n", - "\n", - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 3 - }, - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAGdCAYAAAAv9mXmAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAXIElEQVR4nO3df0xV9/3H8dcFxtW13FuxoDIuaJ2dtRTmRAmjXddKNcSYtn84Y2iGP7ak5jq1pEnjP7PJEi/LssZtMVRth006Z7dm0B8JMnQV01Qjaki0S6y0rrJapV3qvcgf14Z7vn9807svXxXvAd4c7vX5SE7Se3oOn3dNc5+ecy7gcxzHEQAA4yzL6wEAAJmJwAAATBAYAIAJAgMAMEFgAAAmCAwAwASBAQCYIDAAABM5E71gIpHQpUuXlJeXJ5/PN9HLAwDGwHEcDQwMqKioSFlZI1+jTHhgLl26pFAoNNHLAgDGUV9fn4qLi0c8ZsIDk5eXJ+l/hwsEAhO9PABgDGKxmEKhUPK9fCQTHphvbosFAgECAwBpKpVHHDzkBwCYIDAAABMEBgBggsAAAEwQGACACQIDADBBYAAAJggMAMAEgQEAmCAwAAATBAYAYILAAABMEBgAgAkCAwAwQWAAACYIDADAxKgCs2vXLs2ePVtTpkxRVVWVTpw4Md5zAQDSnOvAvPHGG2psbNT27dt1+vRpVVRUaPny5erv77eYDwCQplwH5qWXXtLPf/5zrVu3TgsWLNDLL7+sb3/72/rjH/9oMR8AIE25Csz169d16tQp1dbW/vcLZGWptrZWx44du+k58XhcsVhs2AYAyHyuAvPll19qaGhIM2bMGLZ/xowZunz58k3PiUQiCgaDy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hUWFmrFihWezpERt8gaGxvV0NCgyspKLVmyRDt37tTg4KDWrVvn9Wgjunbt2rC/zV24cEE9PT3Kz89XSUmJh5ONLBwOa//+/XrrrbeUl5eXfNYVDAY1depUj6e7tW3btqmurk4lJSUaGBjQ/v37deTIEXV0dHg92ojy8vJueL511113afr06ZP6udfzzz+vlStXqrS0VJcuXdL27duVnZ2tNWvWeD3aiJ577jn98Ic/1I4dO/STn/xEJ06c0J49e7Rnzx6vR0tJIpFQS0uLGhoalJPj8Vu8J59dM/CHP/zBKSkpcXJzc50lS5Y4x48f93qk23rvvfccSTdsDQ0NXo82opvNLMlpaWnxerQRrV+/3iktLXVyc3OdgoICZ+nSpc7f//53r8calXT4mPLq1audWbNmObm5uc53vvMdZ/Xq1U5vb6/XY6XknXfeccrKyhy/3+/Mnz/f2bNnj9cjpayjo8OR5Jw7d87rURx+XD8AwETaP4MBAExOBAYAYILAAABMEBgAgAkCAwAwQWAAACYIDADABIEBAJggMAAAEwQGAGCCwAAATBAYAICJ/wExfsu1jAw04AAAAABJRU5ErkJggg==", - "text/plain": [ - "
" - ] - }, - "metadata": {} - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/life-game/life_game_func.ipynb b/static/life-game/life_game_func.ipynb index 1b2454989..73b743cea 100644 --- a/static/life-game/life_game_func.ipynb +++ b/static/life-game/life_game_func.ipynb @@ -1,48 +1,28 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def count_neighbors(board, i, j):\n", " cnt = 0\n", @@ -90,18 +70,10 @@ "board = [[1, 1, 0], [1, 0, 0], [0, 0, 0]]\n", "n = 20\n", "print(life_game(board, n))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[[[1, 1, 0], [1, 0, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]], [[1, 1, 0], [1, 1, 0], [0, 0, 0]]]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/life-game/next_generation.ipynb b/static/life-game/next_generation.ipynb index 755d98b68..c4240caae 100644 --- a/static/life-game/next_generation.ipynb +++ b/static/life-game/next_generation.ipynb @@ -1,48 +1,28 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def count_neighbors(board, i, j):\n", " cnt = 0\n", @@ -81,18 +61,10 @@ "\n", "board = [[1, 1, 0], [1, 0, 0], [0, 0, 0]]\n", "print(next_generation(board))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[[1, 1, 0], [1, 1, 0], [0, 0, 0]]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From c49664227b519a0f3ea436a07ba75046901692bf Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:48:26 +0900 Subject: [PATCH 13/21] Remove outputs in image/ --- static/image/black_and_white.ipynb | 73 ++------ static/image/black_to_green.ipynb | 73 ++------ .../black_to_green_another_solution.ipynb | 73 ++------ static/image/black_to_red.ipynb | 73 ++------ static/image/color.ipynb | 73 ++------ static/image/gradation.ipynb | 163 +++++++----------- static/image/grayscale.ipynb | 73 ++------ static/image/lattice_pattern.ipynb | 73 ++------ static/image/white_to_blue.ipynb | 73 ++------ 9 files changed, 189 insertions(+), 558 deletions(-) diff --git a/static/image/black_and_white.ipynb b/static/image/black_and_white.ipynb index 78f1502eb..b3608f12f 100644 --- a/static/image/black_and_white.ipynb +++ b/static/image/black_and_white.ipynb @@ -1,78 +1,37 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "image = [[0, 0, 0], [1, 1, 1], [0, 0, 0]]\n", "ita.plot.image_show(image)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbsAAAGiCAYAAAB+sGhNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAc5UlEQVR4nO3da2zUVf7H8c+U0qlEZ2oXetNyEwEFhIq2FhOK2a4VCbvdJ7roAhLAS0oiYlSa7MrKXhoVL4mpwcRAs6JBDAKJuLi13AIWlEKzXLrEakOL6RQVO4WqRdvzf7Bx/lZbbMv8evn2/UrOg/n1/GbOSR3ezq3jc845AQBgWExfLwAAAK8ROwCAecQOAGAesQMAmEfsAADmETsAgHnEDgBgHrEDAJhH7AAA5hE7AIB5nsXu7NmzuvfeexUIBJSQkKDFixfr/PnzFz1n1qxZ8vl87caDDz7o1RIBAIOEz6u/jTl79mzV19frlVde0XfffadFixbp5ptv1htvvNHpObNmzdL48eO1evXqyLFhw4YpEAh4sUQAwCAR68WVVlVVaceOHfroo4900003SZJeeukl3XnnnVqzZo3S0tI6PXfYsGFKSUnxYlkAgEHKk9iVl5crISEhEjpJys3NVUxMjA4ePKjf//73nZ77+uuva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i4vdkCFD3I4dO/pqC93W3T2/8MILbuvWre7jjz92R48edQ8//LCLiYlx77//fl9todseeughFwwG3e7du119fX1kfP3115E5Fu/XPdl3NO7bJmL35Zdfunnz5rnLL7/cBQIBt2jRInfu3LnIz2tqapwkt2vXLuecc7W1tW7mzJkuMTHR+f1+N27cOPfYY4+5cDjcRzvompdeesmNHDnSxcXFuczMTHfgwIHIz3JyctzChQvbzd+0aZMbP368i4uLc5MmTXLbt2/v5RVfuu7sefny5ZG5ycnJ7s4773SHDx/ug1Vfmh/eVv/T8cNeFy5c6HJycn52zrRp01xcXJwbO3asW79+fa+v+1J0d89PP/20u+aaa1x8fLxLTEx0s2bNcjt37uybxfdQR/uV1O53Z/F+3ZN9R+O+zVf8AADM67ev2QEAEC3EDgBgHrEDAJhH7AAA5hE7AIB5xA4AYB6xAwCYR+wAAOYROwCAecQOAGAesQMAmPd/9GvspZhQAxoAAAAASUVORK5CYII=", - "text/plain": [ - "
" - ] - }, - "metadata": {} - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 18 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/image/black_to_green.ipynb b/static/image/black_to_green.ipynb index 6ed7d7b92..afcad4071 100644 --- a/static/image/black_to_green.ipynb +++ b/static/image/black_to_green.ipynb @@ -1,50 +1,30 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "n = 100\n", "image = []\n", @@ -54,31 +34,10 @@ " row.append([0, j / (n - 1), 0])\n", " image.append(row)\n", "ita.plot.image_show(image)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAGgCAYAAADsNrNZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAA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P2fftPPwcUM/m4Xrq2Tz8HFDP5rnVrqf+/jkgAABuFgECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADDRqwCtXr1acXFxqqysDB+7dOmSKioqlJGRoWHDhqm0tFSBQKC36wQA3GJuOkCHDh3Sr3/9a919990Rx5csWaJdu3Zpx44dqqur09mzZzV//vxeLxQAcGu5qQB98sknKisr0+bNmzV8+PDw8dbWVv3mN7/R888/ry996UuaPHmytmzZorffflsHDhzo8rXa2toUDAYjbgCAW99NBaiiokJz5sxRSUlJxPHGxkZduXIl4nhBQYHy8vJUX1/f5WvV1NTI6/WGb7m5uTezJADAIBN1gLZv36533nlHNTU115zz+/1KSkpSenp6xHGfzye/39/l61VVVam1tTV8a25ujnZJAIBBKDGawc3NzVq8eLH27t2r5OTkmCzA4/HI4/HE5LUAAINHVO+AGhsbde7cOd17771KTExUYmKi6urqtG7dOiUmJsrn8+ny5ctqaWmJeF4gEFBWVlYs1w0AGOSiegc0a9YsvfvuuxHHHnroIRUUFOjpp59Wbm6uhgwZotraWpWWlkqSmpqadObMGRUXF8du1QCAQS+qAKWmpmrChAkRx4YOHaqMjIzw8UceeURLly7ViBEjlJaWpieeeELFxcWaNm1a7FYNABj0ogpQT7zwwguKj49XaWmp2traNHv2bL300kuxngYAMMjFOeec9SI6CgaD8nq9kQc7fqcqQdc/1/l8d+du9Fp9Nc+NxlrME80aYjlPLNfUH/NwPfVsnmj2pb/m4Xrq2Ty9uZ463g9K8l792dC0tDRdD78LDgBgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJiIOkAffPCBHnjgAWVkZCglJUUTJ07U4cOHw+edc1qxYoWys7OVkpKikpISnTx5MqaLBgAMflEF6L///a9mzJihIUOG6M9//rPee+89/eIXv9Dw4cPDY9asWaN169Zp48aNamho0NChQzV79mxdunQp5osHAAxecc4519PBy5cv19/+9jf99a9/7fK8c045OTn6/ve/rx/84AeSpNbWVvl8Pr388stasGDBNc9pa2tTW1tb+HEwGFRubm7koI6ZTND1z3U+3925G71WX81zo7EW80SzhljOE8s19cc8XE89myeafemvebieejZPb66njveDkrxX//xPS0vT9UT1DuiNN95QYWGh7r//fmVmZmrSpEnavHlz+Pzp06fl9/tVUlISPub1elVUVKT6+vouX7OmpkZerzd8uyY+AIBbUlQBOnXqlDZs2KCxY8fqzTff1GOPPaYnn3xSv/vd7yRJfr9fkuTz+SKe5/P5wuc6q6qqUmtra/jW3Nx8M18HAGCQSYxmcCgUUmFhoVatWiVJmjRpko4dO6aNGzeqvLz8phbg8Xjk8Xhu6rkAgMErqndA2dnZuuuuuyKOjRs3TmfOnJEkZWVlSZICgUDEmEAgED4HAIAUZYBmzJihpqamiGMnTpzQ6NGjJUn5+fnKyspSbW1t+HwwGFRDQ4OKi4tjsFwAwK0iqr+CW7JkiaZPn65Vq1bpm9/8pg4ePKhNmzZp06ZNkqS4uDhVVlbq2Wef1dixY5Wfn6/q6mrl5ORo3rx5fbF+AMAgFVWApkyZop07d6qqqko/+9nPlJ+fr7Vr16qsrCw8ZtmyZbpw4YIWLlyolpYWzZw5U3v27FFycnLMFw8AGLyi+jmg/hAMBuX1eiMP8jn7vp2HnwPq2TxcTz2bh58D6tk8t9r11Nc/BwQAQKwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAE1EFqL29XdXV1crPz1dKSoruvPNOPfPMM3LOhcc457RixQplZ2crJSVFJSUlOnnyZMwXDgAY3KIK0HPPPacNGzboV7/6ld5//30999xzWrNmjdavXx8es2bNGq1bt04bN25UQ0ODhg4dqtmzZ+vSpUsxXzwAYPBKjGbw22+/rblz52rOnDmSpDFjxuiVV17RwYMHJV1997N27Vr9+Mc/1ty5cyVJv//97+Xz+fTaa69pwYIF17xmW1ub2trawo+DweBNfzEAgMEjqndA06dPV21trU6cOCFJOnr0qPbv36/77rtPknT69Gn5/X6VlJSEn+P1elVUVKT6+vouX7OmpkZerzd8y83NvdmvBQAwiET1Dmj58uUKBoMqKChQQkKC2tvbtXLlSpWVlUmS/H6/JMnn80U8z+fzhc91VlVVpaVLl4YfB4NBIgQAt4GoAvTqq69q69at2rZtm8aPH68jR46osrJSOTk5Ki8vv6kFeDweeTyem3ouAGDwiipATz31lJYvXx7+Xs7EiRP173//WzU1NS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C", - "text/plain": [ - "
" - ] - }, - "metadata": {} - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 3 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/image/black_to_green_another_solution.ipynb b/static/image/black_to_green_another_solution.ipynb index 7de4fd984..eab4b266c 100644 --- a/static/image/black_to_green_another_solution.ipynb +++ b/static/image/black_to_green_another_solution.ipynb @@ -1,50 +1,30 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "n = 100\n", "image = []\n", @@ -54,31 +34,10 @@ "for i in range(n):\n", " image.append(row)\n", "ita.plot.image_show(image)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAGgCAYAAADsNrNZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAaIklEQVR4nO3df0zV1/3H8Rc/5EIVLorjAhOUNSZYtakVRdRsyyQzndl0sm4mdKM/MtcWW9GtVrbhsrWKdVnrdK1Os9kt07qazLaazMZgR+aKqHS6ulZ00UxSe69tNrhWK/rlnu8ffr83XETkyoU36POR3PTez+fcew6nn/rMlQuNc845AQDQz+KtFwAAuD0RIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgIk+C9CLL76oMWPGKDk5WUVFRTp48GBfTQUAGITi+uJ3wf3xj3/Ud77zHW3cuFFFRUVau3atduzYoaamJmVmZnb73FAopLNnzyo1NVVxcXGxXhoAoI8553T+/Hnl5OQoPr6b9zmuD0ydOtVVVFSEH7e3t7ucnBxXU1Nzw+c2Nzc7Sdy4cePGbZDfmpubu/3zPlExdvnyZTU2Nqqqqip8LD4+XiUlJaqvr79mfFtbm9ra2sKPXVdv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zZzV//vxeLxQAcGu5qQB98sknKisr0+bNmzV8+PDw8dbWVv3mN7/R888/ry996UuaPHmytmzZorffflsHDhzo8rXa2toUDAYjbgCAW99NBaiiokJz5sxRSUlJxPHGxkZduXIl4nhBQYHy8vJUX1/f5WvV1NTI6/WGb7m5uTezJADAIBN1gLZv36533nlHNTU115zz+/1KSkpSenp6xHGfzye/39/l61VVVam1tTV8a25ujnZJAIBBKDGawc3NzVq8eLH27t2r5OTkmCzA4/HI4/HE5LUAAINHVO+AGhsbde7cOd17771KTExUYmKi6urqtG7dOiUmJsrn8+ny5ctqaWmJeF4gEFBWVlYs1w0AGOSiegc0a9YsvfvuuxHHHnroIRUUFOjpp59Wbm6uhgwZotraWpWWlkqSmpqadObMGRUXF8du1QCAQS+qAKWmpmrChAkRx4YOHaqMjIzw8UceeURLly7ViBEjlJaWpieeeELFxcWaNm1a7FYNABj0ogpQT7zwwguKj49XaWmp2traNHv2bL300kuxngYAMMjFOeec9SI6CgaD8nq9kQc7fqcqQdc/1/l8d+du9Fp9Nc+NxlrME80aYjlPLNfUH/NwPfVsnmj2pb/m4Xrq2Ty9uZ463g9K8l792dC0tDRdD78LDgBgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJiIOkAffPCBHnjgAWVkZCglJUUTJ07U4cOHw+edc1qxYoWys7OVkpKikpISnTx5MqaLBgAMflEF6L///a9mzJihIUOG6M9//rP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/jP3HihEaPHi1Jys/PV1ZWVsQ+BYNBNTQ03Fb7dPHixWv+b54JCQkKhUKS2KeYsP4URFe2b9/uPB6Pe/nll917773nFi5c6NLT053f77demonHHnvMeb1e95e//MV9+OGH4dvFixfDYx599FGXl5fn9u3b5w4fPuyKi4tdcXGx4aoHho6fgnOOfXLu6kfUExMT3cqVK93Jkyfd1q1b3R133OH+8Ic/hMesXr3apaenu9dff9394x//cHPnzr3tPl5cXl7uPvvZz4Y/hv2nP/3JjRw50i1btiw8hn3qnQEZIOecW79+vcvLy3NJSUlu6tSp7sCBA9ZLMiOpy9uWLVvCYz799FP3+OOPu+HDh7s77rjDff3rX3cffvih3aIHiM4BYp+u2rVrl5swYYLzeDyuoKDAbdq0KeJ8KBRy1dXVzufzOY/H42bNmuWampqMVmsjGAy6xYsXu7y8PJecnOw+97nPuR/96Eeura0tPIZ96h3+f0AAABMD7ntAAIDbAwECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABP/C1SGLEG+Wi1eAAAAAElFTkSuQmCC", - "text/plain": [ - "
" - ] - }, - "metadata": {} - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 11 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/image/black_to_red.ipynb b/static/image/black_to_red.ipynb index 9f7c00fd2..87fe0821f 100644 --- a/static/image/black_to_red.ipynb +++ b/static/image/black_to_red.ipynb @@ -1,78 +1,37 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "image = [[[0, 0, 0], [0.25, 0, 0], [0.5, 0, 0], [0.75, 0, 0], [1, 0, 0]]]\n", "ita.plot.image_show(image)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAi8AAACUCAYAAABbRsnbAAAAOXRFWHRTb2Z0d2FyZQBNYXRwb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1asWKFDhw4oOjoaLvjDCrKSwgZMWKEIiMj1draGjTe2toql8tlUyogdCxbtkz79u3T4cOHlZSUZHecsBUVFaUJEyZIkjIyMtTY2Kj33ntP1dXVNicLLx6PR21tbZo2bVpgrK+vT4cPH9bmzZvl8/kUGRlpY0LrcM1LCImKilJGRobq6uoCY36/X3V1dfw9GWGtv79fy5Yt0549e3Tw4EHdf//9dkfC//D7/fL5fHbHCDtz5szRsWPH1NzcHDgyMzO1aNEiNTc337HFReLMS8hxu90qLi5WZmampk+frsrKSvX29qqkpMTuaGGnp6dHZ86cCTz++eef1dzcrGHDhmns2LE2Jgs/paWlqqmp0WeffabY2Fh5vV5JUnx8vO6++26b04WXsrIyzZs3T2PHjlV3d7dqamr0zTffaP/+/XZHCzuxsbFXXfd1zz33aPjw4Xf89WCUlxBTWFio9vZ2rVmzRl6vV+np6aqtrb3qIl5Y7+jRo3riiScCj91utySpuLhYO3bssClVeNqyZYskKTc3N2j8ww8/1OLFiwc/UBhra2tTUVGRLly4oPj4eKWmpmr//v166qmn7I6GMMJ9XgAAgFG45gUAABiF8gIAAIxCeQEAAEahvAAAAKNQXgAAgFEoLwAAwCiUFwAAYBTKCwAAMArlBQAAGIXyAgAAjEJ5AQAARqG8AAAAo/wf4p/k4ImcqpsAAAAASUVORK5CYII=", - "text/plain": [ - "
" - ] - }, - "metadata": {} - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 4 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/image/color.ipynb b/static/image/color.ipynb index 17834a6be..1e0a42489 100644 --- a/static/image/color.ipynb +++ b/static/image/color.ipynb @@ -1,78 +1,37 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "image = [[[1, 0, 0], [0, 1, 0], [0, 0, 1]]]\n", "ita.plot.image_show(image)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "display_data", - "data": { - "image/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xbt2rRITEzV06FAtXrxYV65ccbrcqHH16lVVVFQoOzs7vC4mJkbZ2dkqLy9vsk95eXmj9pKUk5PTbPu7QXvGUZIuX76s73znO/L7/XrkkUd0+PDhjijXOszJyEpLS1Pv3r31k5/8RLt27erscqJSMBiUpBZ/eJJ5eWutGUcpMufKOz7oBAKBmy6vxsbGKiEhocXPlx977DGtWbNG27Zt0+LFi/XWW2/p8ccfd7rcqFFdXa36+nolJSU1Wp+UlNTsuAUCgTa1vxu0ZxwHDRqkN954Q++++67WrFmjhoYGjRo1SmfOnOmIkq3S3JwMhUL673//20lV3Xl69+6tVatW6Z133tE777wjv9+vsWPHqrKysrNLiyoNDQ1auHChfvjDH2ro0KHNtuNc2bLWjmOkzpVR++vlhYWFWrZsWYttjhw50u7tf/senmHDhql3794aN26cTpw4oQEDBrR7u8CtZGVlKSsrK/x61KhRGjx4sP76179q6dKlnVgZ7laDBg3SoEGDwq9HjRqlEydO6KWXXtJbb73ViZVFl7lz5+rQoUPauXNnZ5dyR2vtOEbqXBm1QWfRokV64oknWmyTkpKi5OTkm276vH79ui5duqTk5ORW7y8zM1OSdPz48bsi6CQmJqpLly6qqqpqtL6qqqrZcUtOTm5T+7tBe8bxf91zzz166KGHdPz4cSdKtFpzc9Lr9eree+/tpKrskJGRwRv6t8ybNy/8ZZf77ruvxbacK5vXlnH8X+09V0btR1c9e/ZUampqi0tcXJyysrL01VdfqaKiItx369atamhoCIeX1jhw4ICkry/h3g3i4uI0YsQIlZWVhdc1NDSorKysUYL+tqysrEbtJWnLli3Ntr8btGcc/1d9fb0OHjx418y9SGJOOufAgQPMSUnGGM2bN08bN27U1q1bdf/999+yD/PyZu0Zx//V7nPlbd/OHAUmTJhgHnroIbN7926zc+dO88ADD5hp06aF/37mzBkzaNAgs3v3bmOMMcePHzfPPvus2bdvnzl58qR59913TUpKinn44Yc76xA6xbp164zb7TarV682n376qZkzZ46Jj483gUDAGGPM9OnTTWFhYbj9rl27TGxsrFm+fLk5cuSIKSoqMvfcc485ePBgZx1CVGjrOD7zzDPmgw8+MCdOnDAVFRVm6tSpxuPxmMOHD3fWIUSNmpoas3//frN//34jybz44otm//795vPPPzfGGFNYWGimT58ebv+f//zHdO3a1Tz55JPmyJEjpqSkxHTp0sWUlpZ21iFEhbaO40svvWQ2bdpk/v3vf5uDBw+aBQsWmJiYGPOvf/2rsw4havzmN78xPp/PbN++3XzxxRfh5cqVK+E2nCtvrT3jGKlzpRVB5+LFi2batGmmW7duxuv1mlmzZpmamprw30+ePGkkmW3bthljjDl16pR5+OGHTUJCgnG73WbgwIHmySefNMFgsJOOoPO88sorpl+/fiYuLs5kZGSYTz75JPy3MWPGmJkzZzZq//e//91897vfNXFxcebBBx80//jHPzq44ujUlnFcuHBhuG1SUpKZOHGiqays7ISqo8+Nrzn/73Jj/GbOnGnGjBlzU5+0tDQTFxdnUlJSzJtvvtnhdUebto7jsmXLzIABA4zH4zEJCQlm7NixZuvWrZ1TfJRpahwlNZpnnCtvrT3jGKlzpev/CwAAALBO1N6jAwAAcLsIOgAAwFoEHQAAYC2CDgAAsBZBBwAAWIugAwAArEXQAQAA1iLoAAAAaxF0AACAtQg6AADAWgQdAABgLYIOAACw1v8BN3qqpWLL/+4AAAAASUVORK5CYII=", - "text/plain": [ - "
" - ] - }, - "metadata": {} - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 7 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/image/gradation.ipynb b/static/image/gradation.ipynb index f7c931473..be0ce63a8 100644 --- a/static/image/gradation.ipynb +++ b/static/image/gradation.ipynb @@ -1,104 +1,63 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "import ita\n", - "\n", - "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "def calc_weighted_mean(top_left, top_right, bottom_left, bottom_right, s, t):\n", - " return (top_left * (1 - s) + top_right * s) * (1 - t) + (\n", - " bottom_left * (1 - s) + bottom_right * s\n", - " ) * t\n", - "\n", - "\n", - "image = []\n", - "n = 100\n", - "for i in range(n):\n", - " row = []\n", - " for j in range(n):\n", - " top_left = [1, 1, 1]\n", - " top_right = [1, 0, 0]\n", - " bottom_left = [0, 1, 0]\n", - " bottom_right = [0, 0, 1]\n", - " row.append([0, 0, 0])\n", - " for k in range(3):\n", - " row[j][k] = calc_weighted_mean(\n", - " top_left[k],\n", - " top_right[k],\n", - " bottom_left[k],\n", - " bottom_right[k],\n", - " j / (n - 1),\n", - " i / (n - 1),\n", - " )\n", - " image.append(row)\n", - "\n", - "ita.plot.image_show(image)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAGgCAYAAADsNrNZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAv2klEQVR4nO3df2xe1X3H8Y+dYDst8RMIix0PG7wKKRSoShMIJmg/irWoRS2MqCtTuqW0GmtxCiFSKemaTFsbTDupTalSGKhNqcaPNdKgLdWokGmRaAMh6WDNGCETaLHa2qzaYodfDn2esz/SPfi5tu+9595z7zmP/X5FlvI899xzznP92MfP93vOuS3GGCMAAErW6rsDAICFiQEIAOAFAxAAwAsGIACAFwxAAAAvGIAAAF4wAAEAvGAAAgB4wQAEAPCCAQgA4EVhA9Du3bt19tlnq6OjQ2vXrtX+/fuLagoA0IRaitgL7p/+6Z/0F3/xF7rzzju1du1a7dq1S3v37tXhw4e1YsWK2HNrtZp++ctfaunSpWppaXHdNQBAwYwxOn78uHp6etTaGvM5xxTg4osvNkNDQ/XH1WrV9PT0mOHh4cRzR0dHjSS++OKLL76a/Gt0dDT29/1iOXbixAkdPHhQ27Ztqz/X2tqqwcFB7du3b0b5qakpTU1N1R+b334gGx0dVWdn58knq9W3Tpj+f0mq1RofTz8ed2y249MfF9WObZ/KaMemD2W1Ey0b/aBu045N2bh2kl6rj3aSyvpox/b95Kodl+/xMtpJek/7aCfP76dp7UxK6pW0dOlSxXE+AP36179WtVpVV1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pa1Zs0Yf+tCHtGLFCl144YW6++6768dfeukljY2NNVynSqWitWvXLqjrdOmll2pkZEQvvPCCJOnZZ5/VE088ofe9732SuE4uBLcb9q9//WtVq1V1dXU1PN/V1aXnn3/eU6/CUavVtGXLFq1bt07nn3++JGlsbExtbW1atmxZQ9muri6NjY156KU/DzzwgH72s5/p6aefnnGM63TSiy++qDvuuENbt27VZz/7WT399NO64YYb1NbWpk2bNtWvxWw/gwvpOt1yyy2anJzUqlWrtGjRIlWrVe3cuVMbN26UJK6TA8ENQIg3NDSkQ4cO6YknnvDdleCMjo7qxhtv1KOPPqqOjg7f3QlWrVbTmjVrdOutt0qSLrzwQh06dEh33nmnNm3a5Ll34fjOd76je++9V/fdd5/OO+88PfPMM9qyZYt6enq4To4EF4I744wztGjRohkzk8bHx9Xd3e2pV2HYvHmzHn74Yf3oRz/SmWeeWX++u7tbJ06c0LFjxxrKL7RrdvDgQb388st6z3veo8WLF2vx4sV6/PHHdfvtt2vx4sXq6uriOklauXKl3vnOdzY8d+655+ro0aOSVL8WC/1n8NOf/rRuueUWXXPNNbrgggv053/+57rppps0PDwsievkQnADUFtbm1avXq2RkZH6c7VaTSMjIxoYGPDYM3+MMdq8ebMefPBBPfbYY+rv7284vnr1ap1yyikN1+zw4cM6evTogrpml19+uX7+85/rmWeeqX+tWbNGGzdurP+f6yStW7duxjT+F154QWeddZYkqb+/X93d3Q3XaXJyUk899dSCuk6vvfbajLt5Llq0SLVaTRLXyQnfsyBm88ADD5j29nbzrW99yzz33HPmuuuuM8uWLTNjY2O+u+bFJz/5SVOpVMyPf/xj86tf/ar+9dprr9XLfOITnzB9fX3mscceMwcOHDADAwNmYGDAY6/DMH0WnDFcJ2NOTlFfvHix2blzpzly5Ii59957zdve9jbzj//4j/Uyt912m1m2bJn57ne/a/7t3/7NXHnllQtuevGmTZvM7/7u79anYf/zP/+zOeOMM8zNN99cL8N1yifIAcgYY772ta+Zvr4+09bWZi6++GLz5JNP+u6SN5Jm/dqzZ0+9zOuvv26uv/56c9ppp5m3ve1t5k/+5E/Mr371K3+dDkR0AOI6nfT973/fnH/++aa9vd2sWrXK3HXXXQ3Ha7Wa2b59u+nq6jLt7e3m8ssvN4cPH/bUWz8mJyfNjTfeaPr6+kxHR4f5vd/7PfPXf/3XZmpqql6G65QP9wMCAHgRXA4IALAwMAABALxgAAIAeMEABADwggEIAOAFAxAAwAsGIACAFwxAAAAvGIAAAF4wAAEAvGAAAgB48X9OhBRvT5cAXgAAAABJRU5ErkJggg==", - "text/plain": [ - "
" - ] - }, - "metadata": {} - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 3 - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!pip install ita" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import ita\n", + "\n", + "%matplotlib inline" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def calc_weighted_mean(top_left, top_right, bottom_left, bottom_right, s, t):\n", + " return (top_left * (1 - s) + top_right * s) * (1 - t) + (\n", + " bottom_left * (1 - s) + bottom_right * s\n", + " ) * t\n", + "\n", + "\n", + "image = []\n", + "n = 100\n", + "for i in range(n):\n", + " row = []\n", + " for j in range(n):\n", + " top_left = [1, 1, 1]\n", + " top_right = [1, 0, 0]\n", + " bottom_left = [0, 1, 0]\n", + " bottom_right = [0, 0, 1]\n", + " row.append([0, 0, 0])\n", + " for k in range(3):\n", + " row[j][k] = calc_weighted_mean(\n", + " top_left[k],\n", + " top_right[k],\n", + " bottom_left[k],\n", + " bottom_right[k],\n", + " j / (n - 1),\n", + " i / (n - 1),\n", + " )\n", + " image.append(row)\n", + "\n", + "ita.plot.image_show(image)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/image/grayscale.ipynb b/static/image/grayscale.ipynb index dc158e874..73f5bd0a8 100644 --- a/static/image/grayscale.ipynb +++ b/static/image/grayscale.ipynb @@ -1,78 +1,37 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "image = [[0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]]\n", "ita.plot.image_show(image)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAi8AAABeCAYAAADrNfQJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAPhUlEQVR4nO3dfUwT9wMG8KcUacHxIqgtVRB0bqAiKhUGmmlCI77EhG3ZdGOToWNZghlYYxQ3JMq08zVOJSJL3P4YTLdkOl02E1YNixMFQTbdFKdzSowFDUoBN2Dt/f5Y7H6NvNVwPe72fJJLvOv3ysM3wj1c71qVIAgCiIiIiGTCR+oARERERJ5geSEiIiJZYXkhIiIiWWF5ISIiIllheSEiIiJZYXkhIiIiWWF5ISIiIllheSEiIiJZYXkhIiIiWWF5ISIiIlkRrby0tLQgIyMDQUFBCAkJwYoVK9De3t7nPnPnzoVKpXJb3nnnHbEiEhERkQypxPpsowULFuDOnTs4cOAAuru7kZWVhZkzZ6K8vLzXfebOnYtnnnkGmzZtcm0LCAhAUFCQGBGJiIhIhnzFeNLLly/jxIkTqKmpgdFoBADs3bsXCxcuxI4dO2AwGHrdNyAgAHq9XoxYREREpACilJeqqiqEhIS4igsAmEwm+Pj44Ny5c3jhhRd63besrAyfffYZ9Ho9Fi9ejIKCAgQEBPQ6vrOzE52dna51p9OJlpYWhIWFQaVSDc43RERERKISBAFtbW0wGAzw8en7qhZRyovNZsPo0aPdv5CvL0JDQ2Gz2Xrd77XXXsO4ceNgMBjw888/Y+3atWhoaMBXX33V6z4WiwUbN24ctOxEREQkncbG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SXHsdruQm5srREZGClqtVhg/frzw3nvvCZ2dnVJHk7VTp071+Ps4MzNTEIR/bpcuKCgQdDqdoNFohNTUVKGhocFr+VSCwLchJCIiIvngNS9EREQkKywvREREJCssL0RERCQrLC9EREQkKywvREREJCssL0RERCQrLC9EREQkKywvREREJCssL0RERCQrLC9EREQkKywvREREJCssL0RERCQr/wOwnSmTC6klvAAAAABJRU5ErkJggg==", - "text/plain": [ - "
" - ] - }, - "metadata": {} - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 4 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/image/lattice_pattern.ipynb b/static/image/lattice_pattern.ipynb index 9f3a18d8b..56645f233 100644 --- a/static/image/lattice_pattern.ipynb +++ b/static/image/lattice_pattern.ipynb @@ -1,50 +1,30 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "image = [\n", " [1, 0, 1, 0, 1, 0],\n", @@ -55,31 +35,10 @@ " [0, 1, 0, 1, 0, 1],\n", "]\n", "ita.plot.image_show(image)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZgAAAGdCAYAAAAv9mXmAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAUoUlEQVR4nO3df6iW9f348det4rHVue+yzDrzaLWtwkTHLEVa+1GukIjqrwhhzslg4zgSCYb/zPrrCINobNJksfpnYltgQVDNuXkklmSKYMEio9EZptZg9308sLs45/r88aHz+fpNm7f6ui/PuR4PuKFzd9/n/bp8n+5n132dc6wVRVEEAFxg08oeAICpSWAASCEwAKQQGABSCAwAKQQGgBQCA0AKgQEgxYxuLzg+Ph5Hjx6N3t7eqNVq3V4egPNQFEWMjIxEX19fTJv2xecoXQ/M0aNHo7+/v9vLAnABDQ8Px7x5877wMV0PTG9vb0T873D1er3by5eq0WiUPULXNZvNskcoRRX3OqKa+13Vvf7stfyLdD0wn70tVq/XKxeYKrLH1WK/q+NsLnG4yA9ACoEBIIXAAJBCYABIITAApBAYAFIIDAApBAaAFAIDQAqBASCFwACQQmAASCEwAKQQGABSCAwAKQQGgBQCA0AKgQEghcAAkEJgAEghMACkEBgAUggMACnOKTBbt26N6667LmbNmhXLly+PN95440LPBcAk13Fgnnvuudi4cWNs3rw5Dh48GEuWLIl77rknTpw4kTEfAJNUx4F54okn4kc/+lGsXbs2Fi5cGL/5zW/iS1/6Uvzud7/LmA+ASaqjwHzyySdx4MCBWLly5f99gmnTYuXKlfH666+f9jntdjtardYpNwCmvo4C8/HHH8fY2FjMnTv3lPvnzp0bx44dO+1zBgcHo9FoTNz6+/vPfVoAJo307yLbtGlTNJvNidvw8HD2kgBcBGZ08uCrrroqpk+fHsePHz/l/uPHj8c111xz2uf09PRET0/PuU8IwKTU0RnMzJkzY+nSpbF79+6J+8bHx2P37t2xYsWKCz4cAJNXR2cwEREbN26MNWvWxK233hrLli2LJ598MkZHR2Pt2rUZ8wEwSXUcmIceeig++uij+PnPfx7Hjh2Lr3/96/HKK6987sI/ANVWK4qi6OaCrVYrGo1GNJvNqNfr3Vy6dLVarewRuq7LX14XjSrudUQ197uqe302r+F+FxkAKQQGgBQCA0AKgQEghcAAkEJgAEghMACkEBgAUggMACkEBoAUAgNACoEBIIXAAJBCYABIITAApBAYAFIIDAApBAaAFAIDQAqBASCFwACQQmAASCEwAKQQGABSzChr4UajUdbSpSmKouwRuq5Wq5U9QimquNcR1dzvqu11q9U669dvZzAApBAYAFIIDAApBAaAFAIDQAqBASCFwACQQmAASCEwAKQQGABSCAwAKQQGgBQCA0AKgQEghcAAkEJgAEghMACkEBgAUggMACkEBoAUAgNACoEBIIXAAJBCYABIITAApBAYAFJ0HJi9e/fGfffdF319fVGr1eKFF15IGA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AJBCYABIITAApBAYAFIIDAApBAaAFAIDQAqBASCFwACQQmAASCEwAKQQGABSCAwAKQQGgBQCA0CK8wrMli1bolarxYYNGy7QOABMFeccmP3798e2bdti8eLFF3IeAKaIcwrMyZMnY/Xq1fHb3/42rrjiigs9EwBTwDkFZmBgIO69995YuXLlf31su92OVqt1yg2AqW9Gp0/YsWNHHDx4MPbv339Wjx8cHIzHH3+848EAmNw6OoMZHh6ORx55JH7/+9/HrFmzzuo5mzZtimazOXEbHh4+p0EBmFxqRVEUZ/vgF154IR588MGYPn36xH1jY2NRq9Vi2rRp0W63T/l3p9NqtaLRaESz2Yx6vX7uk09CtVqt7BG6roMvrymlinsdUc39rupen81reEdvkd11111x+PDhU+5bu3Zt3HzzzfGzn/3sv8YFgOroKDC9vb2xaNGiU+679NJL48orr/zc/QBUm5/kByBFx99F9v/bs2fPBRgDgKnGGQwAKQQGgBQCA0AKgQEghcAAkEJgAEghMACkEBgAUggMACkEBoAUAgNACoEBIIXAAJBCYABIITAApBAYAFIIDAApBAaAFAIDQAqBASCFwACQQmAASCEwAKSYUdbCjUajrKVLUxRF2SN0Xa1WK3uEUlRxryOqud9V2+tWq3XWr9/OYABIITAApBAYAFIIDAApBAaAFAIDQAqBASCFwACQQmAASCEwAKQQGABSCAwAKQQGgBQCA0AKgQEghcAAkEJgAEghMACkEBgAUggMACkEBoAUAgNACoEBIIXAAJBCYABIITAApOgoMI899ljUarVTbjfffHPWbABMYjM6fcItt9wSf/7zn//vE8zo+FMAUAEd12HGjBlxzTXXZMwCwBTS8TWYd999N/r6+uKGG26I1atXxwcffPCFj2+329FqtU65ATD1dRSY5cuXx7PPPhuvvPJKPPXUU/H+++/HHXfcESMjI2d8zuDgYDQajYlbf3//eQ8NwMWvVhRFca5P/ve//x0LFiyIJ554ItatW3fax7Tb7Wi32xMft1qtykbmPP6oJ61arVb2CKWo4l5HVHO/q7bXrVYrGo1GNJvNqNfrX/jY87pCf/nll8eNN94YR44cOeNjenp6oqen53yWAWAS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MACkEBgAUggMACkEBoAU/wNYeiRjcC2aMAAAAABJRU5ErkJggg==", - "text/plain": [ - "
" - ] - }, - "metadata": {} - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 3 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/image/white_to_blue.ipynb b/static/image/white_to_blue.ipynb index 8e8b9f113..c490952cd 100644 --- a/static/image/white_to_blue.ipynb +++ b/static/image/white_to_blue.ipynb @@ -1,50 +1,30 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "n = 100\n", "image = []\n", @@ -62,31 +42,10 @@ " )\n", " image.append(row)\n", "ita.plot.image_show(image)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAGgCAYAAADsNrNZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAZx0lEQVR4nO3df0zV1/3H8Rc/5EJVLorhAhOUNSZYtakVRdRsSyUzndl0km4mdKM/MtcWW9GkVrbisrWKuqx1OqvTdHTNtK4m01aT2RjsSEwRlU5X1xZdNJPU3uuaDa7VioZ7vn+031suUvDKhTfo85HchM/nc+49h8OVZy7cYJxzzgkAgH4Wb70AAMDtiQABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBM9FmANm3apLFjxyo5OVmFhYU6cuRIX00FABiE4vrib8H9+c9/1o9//GNt2bJFhYWFWr9+vXbt2qWmpiZlZGR0e99QKKTz589r+PDhiouLi/XSAAB9zDmnixcvKjs7W/Hx3bzOcX1g2rRprry8PHzc3t7usrOzXXV1dY/3bW5udpK4cePGjdsgvzU3N3f7/T5RMXb16lU1NjaqsrIyfC4+Pl7FxcWqr6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SEBIVCIUnsU0xYvwuiKzt37nQej8e98sor7v3333eLFi1yaWlpzu/3Wy/NxOOPP+68Xq/729/+5j7++OPw7fLly+Exjz32mMvNzXUHDx50x44dc0VFRa6oqMhw1QNDx3fBOcc+Off5W9QTExPdqlWr3OnTp9327dvdHXfc4f70pz+Fx6xZs8alpaW5N954w/3jH/9w8+bNu+3eXlxWVua+9rWvhd+G/Ze//MWNGjXKLV++PDyGfeqdARkg55zbuHGjy83NdUlJSW7atGnu8OHD1ksyI6nLW01NTXjMZ5995p544gk3YsQId8cdd7jvf//77uOPP7Zb9ADROUDs0+f27t3rJk6c6Dwej8vPz3dbt26NuB4KhVxVVZXz+XzO4/G42bNnu6amJqPV2ggGg27JkiUuNzfXJScnu69//evu5z//uWtrawuPYZ96h/8PCABgYsD9DggAcHsgQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABg4v8AE01qqwd4TBkAAAAASUVORK5CYII=", - "text/plain": [ - "
" - ] - }, - "metadata": {} - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 3 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From 64b833513c0c2ebe0f3ed8e79ea8a9a4120bad32 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:48:41 +0900 Subject: [PATCH 14/21] Remove outputs in simulation/ --- static/simulation/draw_cell.ipynb | 73 +- static/simulation/parabolic_motion.ipynb | 98 +- .../parabolic_motion_analytical.ipynb | 1571 +-------------- .../parabolic_motion_return_array.ipynb | 110 +- static/simulation/parabolic_motion_view.ipynb | 1699 +---------------- static/simulation/resisted_motion.ipynb | 1571 +-------------- .../resisted_motion_analytical.ipynb | 1571 +-------------- static/simulation/uniform_linear_motion.ipynb | 60 +- .../uniform_linear_motion_analytical.ipynb | 44 +- .../uniform_linear_motion_return_array.ipynb | 24 +- .../uniform_linear_motion_view.ipynb | 1571 +-------------- ...niform_linear_motion_view_analytical.ipynb | 1571 +-------------- 12 files changed, 324 insertions(+), 9639 deletions(-) diff --git a/static/simulation/draw_cell.ipynb b/static/simulation/draw_cell.ipynb index dbe7a1b9a..3613e4e1f 100644 --- a/static/simulation/draw_cell.ipynb +++ b/static/simulation/draw_cell.ipynb @@ -1,50 +1,30 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def draw_cell(x, y):\n", " image = ita.array.make2d(100, 100)\n", @@ -55,31 +35,10 @@ "\n", "image = draw_cell(10, 10)\n", "ita.plot.image_show(image)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAGgCAYAAADsNrNZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAYAUlEQVR4nO3df2xV9f3H8Vd/3hZpb6GEe6m0UA1ZVTBDKqVg5h80I45EFGK2BLdOzRa1SAvJBGZgf5DaZmSZsjmZJmNL5MdsoiIkmyHFNSGp/KgDZLLCBgk3wi0zW+9lQoH0vveH3+/J7vjV0uL7Fp6P5J3Yc86998PH2Gdue7xkmZkJAICvWLb3AgAAtycCBABwQYAAAC4IEADABQECALggQAAAFwQIAOCCAAEAXBAgAIALAgQAcHHTAvTaa69p8uTJKigoUE1Njfbu3XuzXgoAMAJl3YzPgvv973+v733ve9qwYYNqamr0yiuvqK2tTd3d3Ro/fvw1H5tKpXTq1CkVFRUpKytruJcGALjJzExnz55VWVmZsrOv8T7HboKZM2daQ0ND8HV/f7+VlZVZS0vLdR8bi8VMEsMwDDPCJxaLXfP7/bD/CO7ixYvq6upSXV1dcCw7O1t1dXXq7Oy87PoLFy4omUwGY3w4NwDcEoqKiq55ftgD9Pnnn6u/v1+RSCTteCQSUTwev+z6lpYWhcPhYCo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t6ehSNRoe0UADArWVQATIzLVmyRO+++6527dqlysrKtPMzZsxQXl6e2tvbg2Pd3d06efKkamtrh2fFAIBbwqB+BNfQ0KDNmzdr27ZtKioqCn6vEw6HVVhYqHA4rGeeeUbLly/X2LFjVVxcrBdeeEG1tbWaNWvWTfkDAABGqMHcdq2r3Gq3cePG4Jrz58/b888/b2PGjLFRo0bZ448/bqdPnx7wayQSCfdbBxmGYZihz/Vuw876v7BkjGQyqXA47L0MAMAQJRIJFRcXX/U8nwUHAHBBgAAALggQAMAFAQIAuCBAAAAXBAgA4IIAAQBcECAAgAsCBABwQYAAAC4IEADABQECALggQAAAFwQIAOCCAAEAXBAgAIALAgQAcEGAAAAuCBAAwAUBAgC4IEAAABcECADgggABAFwQIACACwIEAHBBgAAALggQAMAFAQIAuCBAAAAXBAgA4IIAAQBcECAAgAsCBABwQYAAAC4IEADABQECALggQAAAFwQIAOCCAAEAXBAgAIALAgQAcEGAAAAuCBAAwAUBAgC4IEAAABcECADgggABAFwQIACACwIEAHBBgAAALggQAMAFAQIAuCBAAAAXBAgA4IIAAQBcECAAgAsCBABwQYAAAC4IEADABQECALggQAAAFwQIAOCCAAEAXAwpQK2trcrKylJTU1NwrK+vTw0NDSotLdXo0aO1aNEi9fT0DHWdAIBbzA0HaN++ffr1r3+t+++/P+34smXLtH37drW1tamjo0OnTp3SwoULh7xQAMAtxm7A2bNnbcqUKbZz5057+OGHrbGx0czMent7LS8vz9ra2oJrjxw5YpKss7Pzis/V19dniUQimFgsZpIYhmGYET6JROKaLbmhd0ANDQ2aP3++6urq0o53dXXp0qVLacerqqpUUVGhzs7OKz5XS0uLwuFwMOXl5TeyJADACDPoAG3dulUff/yxWlpaLjsXj8eVn5+vkpKStOORSETxePyKz7dq1SolEolgYrHYYJcEABiBcgdzcSwWU2Njo3bu3KmCgoJhWUAoFFIoFBqW5wIAjByDegfU1dWlM2fO6IEHHlBubq5yc3PV0dGh9evXKzc3V5FIRBcvXlRvb2/a43p6ehSNRodz3QCAEW5Q74Dmzp2rTz75JO3YU089paqqKq1YsULl5eXKy8tTe3u7Fi1aJEnq7u7WyZMnVVtbO3yrBgCMeIMKUFFRkaZOnZp27I477lBpaWlw/JlnntHy5cs1duxYFRcX64UXXlBtba1mzZo1fKsGAIx4gwrQQPz85z9Xdna2Fi1apAsXLmjevHn61a9+NdwvAwAY4bLMzLwX8d+SyaTC4bD3MgAAQ5RIJFRcXHzV83wWHADABQECALggQAAAFwQIAOCCAAEAXBAgAIALAgQAcEGAAAAuCBAAwAUBAgC4IEAAABcECADgggABAFwQIACACwIEAHBBgAAALggQAMAFAQIAuCBAAAAXBAgA4IIAAQBcECAAgAsCBABwQYAAAC4IEADABQECALggQAAAFwQIAOCCAAEAXBAgAIALAgQAcEGAAAAuCBAAwAUBAgC4IEAAABcECADgggABAFwQIACACwIEAHBBgAAALggQAMAFAQIAuCBAAAAXBAgA4IIAAQBcECAAgAsCBABwQYAAAC4IEADABQECALggQAAAFwQIAOCCAAEAXBAgAIALAgQAcEGAAAAuCBAAwAUBAgC4IEAAABcECADgggABAFwQIACACwIEAHAx6AB99tlnevLJJ1VaWqrCwkJNmzZN+/fvD86bmdasWaMJEyaosLBQdXV1Onbs2LAuGgAw8g0qQP/61780Z84c5eXl6Q9/+IM+/fRT/exnP9OYMWOCa376059q/fr12rBhg/bs2aM77rhD8+bNU19f37AvHgAwgtkgrFixwh566KGrnk+lUhaNRm3dunXBsd7eXguFQrZly5YrPqavr88SiUQwsVjMJDEMwzAjfBKJxDWbMqh3QO+//76qq6v1xBNPaPz48Zo+fbrefPPN4PyJEycUj8dVV1cXHAuHw6qpqVFnZ+cVn7OlpUXhcDiY8vLywSwJADBCDSpAx48f1+uvv64pU6bogw8+0HPPPaelS5fqd7/7nSQpHo9LkiKRSNrjIpFIcO5/rVq1SolEIphYLHYjfw4AwAiTO5iLU6mUqqur9fLLL0uSpk+frsOHD2vDhg2qr6+/oQWEQiGFQqEbeiwAYOQa1DugCRMm6N577007ds899+jkyZOSp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KD6+nrn1WWOt99+W5s2bdLmzZt133336cCBA2pqalJZWRn7NEwy7kdw48aNU05OzmV3JvX09CgajTqtKjMsWbJEO3bs0IcffqiJEycGx6PRqC5evKje3t6062+3Pevq6tKZM2f0wAMPKDc3V7m5uero6ND69euVm5urSCTCPkmaMGGC7r333rRj99xzj06ePClJwV7c7v8N/uhHP9LKlSv1ne98R9OmTdN3v/tdLVu2TC0tLZLYp+GQcQHKz8/XjBkz1N7eHhxLpVJqb29XbW2t48r8mJmWLFmid999V7t27VJlZWXa+RkzZigvLy9tz7q7u3Xy5Mnbas/mzp2rTz75RAcOHAimurpaixcvDv6ZfZLmzJlz2W38R48e1aRJkyRJlZWVikajafuUTCa1Z8+e22qfzp07d9nf5pmTk6NUKiWJfRoW3ndBXMnWrVstFArZb3/7W/v000/thz/8oZWUlFg8HvdemovnnnvOwuGw/elPf7LTp08Hc+7cueCaZ5991ioqKmzXrl22f/9+q62ttdraWsdVZ4b/vgvOjH0y+/IW9dzcXGtubrZjx47Zpk2bbNSoUfbWW28F17S2tlpJSYlt27bNDh06ZAsWLLjtbi+ur6+3O++8M7gN+5133rFx48bZiy++GFzDPg1NRgbIzOwXv/iFVVRUWH5+vs2cOdM++ugj7yW5kXTF2bhxY3DN+fPn7fnnn7cxY8bYqFGj7PHHH7fTp0/7LTpD/G+A2Kcvbd++3aZOnWqhUMiqqqrsjTfeSDufSqVs9erVFolELBQK2dy5c627u9tptT6SyaQ1NjZaRUWFFRQU2F133WUvvfSSXbhwIbiGfRoa/j4gAICLjPsdEADg9kCAAAAuCBAAwAUBAgC4IEAAABcECADgggABAFwQIACACwIEAHBBgAAALggQAMDFfwDD0MqWyc5dqgAAAABJRU5ErkJggg==", - "text/plain": [ - "
" - ] - }, - "metadata": {} - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 12 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/simulation/parabolic_motion.ipynb b/static/simulation/parabolic_motion.ipynb index 333f7af91..4a7d728cf 100644 --- a/static/simulation/parabolic_motion.ipynb +++ b/static/simulation/parabolic_motion.ipynb @@ -1,55 +1,47 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "g = 9.8\n", - "\n", - "\n", - "def parabolic_motion_step(x, y, u, v, dt):\n", - " x = x + u * dt\n", - " y = y + v * dt\n", - " u = u\n", - " v = v - g * dt\n", - " return [x, y, u, v]\n", - "\n", - "\n", - "def parabolic_motion(v0, theta, t, dt):\n", - " x = 0\n", - " y = 0\n", - " u = v0 * math.cos(theta)\n", - " v = v0 * math.sin(theta)\n", - " n = int(t / dt)\n", - " for i in range(n):\n", - " x, y, u, v = parabolic_motion_step(x, y, u, v, dt)\n", - " return [x, y]\n", - "\n", - "\n", - "print(parabolic_motion(30, math.pi / 4, 4, 0.01))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[84.85281374238573, 6.648813742385697]\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "g = 9.8\n", + "\n", + "\n", + "def parabolic_motion_step(x, y, u, v, dt):\n", + " x = x + u * dt\n", + " y = y + v * dt\n", + " u = u\n", + " v = v - g * dt\n", + " return [x, y, u, v]\n", + "\n", + "\n", + "def parabolic_motion(v0, theta, t, dt):\n", + " x = 0\n", + " y = 0\n", + " u = v0 * math.cos(theta)\n", + " v = v0 * math.sin(theta)\n", + " n = int(t / dt)\n", + " for i in range(n):\n", + " x, y, u, v = parabolic_motion_step(x, y, u, v, dt)\n", + " return [x, y]\n", + "\n", + "\n", + "print(parabolic_motion(30, math.pi / 4, 4, 0.01))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/simulation/parabolic_motion_analytical.ipynb b/static/simulation/parabolic_motion_analytical.ipynb index 6b6afbba9..13bf76abf 100644 --- a/static/simulation/parabolic_motion_analytical.ipynb +++ b/static/simulation/parabolic_motion_analytical.ipynb @@ -1,52 +1,32 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import math\n", "\n", "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def draw_cell(x, y):\n", " image = ita.array.make2d(100, 100)\n", @@ -79,1529 +59,10 @@ " )\n", " )\n", "ita.plot.animation_show(images)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
\n", - " \n", - "
\n", - " \n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - "
\n", - "\n", - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 4 - }, - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAGgCAYAAADsNrNZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAYNklEQVR4nO3df2xV9f3H8Vd/0NsK7S2U9d523EJnSIqAESmUAtmS0Yw49oPRuZHUrf7ImFqUAop0S1k2hYsscwymMIiDJYJMkjGFZBhSXDO2UqAOJlMKC2Q04r1ott6LIBfS+/n+4debXUHthQvvFp6P5CTec869ffMx3GdOe27JcM45AQBwnWVaDwAAuDkRIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgIlrFqBnn31WI0aMUG5urqqqqrRv375r9aUAAP1QxrX4XXC///3v9f3vf19r165VVVWVVq5cqa1bt6qzs1PFxcWf+tx4PK5Tp04pPz9fGRkZ6R4NAHCNOed05swZlZaWKjPzU65z3DUwceJE19DQkHjc09PjSktLXTAY/MzndnV1OUlsbGxsbP186+rq+tT3+2yl2YULF9TR0aGmpqbEvszMTNXU1Kitre2S82OxmGKxWOKx+/8Lsq6uLhUUFKR7PADANRaNRhUIBJSfn/+p56U9QO+99556enrk8/mS9vt8Ph05cuSS84PBoH76059esr+goIAAAUA/9lk/RjG/C66pqUmRSCSxdXV1WY8EALgO0n4FNHToUGVlZSkcDiftD4fD8vv9l5zv8Xjk8XjSPQYAoI9L+xVQTk6Oxo8fr5aWlsS+eDyulpYWVVdXp/vLAQD6qbRfAUnSggULVF9fr8rKSk2cOFErV67U2bNndd99912LLwcA6IeuSYC++93v6t1339WSJUsUCoV0xx13aOfOnZfcmAAAuHldkw+iXo1oNCqv16tIJMJdcADQD/X2fdz8LjgAwM2JAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmEgpQMFgUBMmTFB+fr6Ki4s1c+ZMdXZ2Jp1z/vx5NTQ0qKioSIMGDVJtba3C4XBahwYA9H8pBai1tVUNDQ3au3evdu3apYsXL+orX/mKzp49mzhn/vz52r59u7Zu3arW1ladOnVKs2bNSvvgAID+LcM55670ye+++66Ki4vV2tqqL37xi4pEIvrc5z6nzZs369vf/rYk6ciRIxo1apTa2to0adKkS14jFospFoslHkejUQUCAUUiERUUFFzpaAAAI9FoVF6v9zPfx6/qZ0CRSESSNGTIEElSR0eHLl68qJqamsQ5FRUVKisrU1tb22VfIxgMyuv1JrZAIHA1IwEA+okrDlA8HldjY6OmTJmiMWPGSJJCoZBycnJUWFiYdK7P51MoFLrs6zQ1NSkSiSS2rq6uKx0JANCPZF/pExsaGnT48GHt2bPnqgbweDzyeDxX9RoAgP7niq6A5s6dqx07dui1117TsGHDEvv9fr8uXLig7u7upPPD4bD8fv9VDQoAuLGkFCDnnObOnatt27Zp9+7dKi8vTzo+fvx4DRgwQC0tLYl9nZ2dOnnypKqrq9MzMQDghpDSt+AaGhq0efNmvfzyy8rPz0/8XMfr9SovL09er1cPPPCAFixYoCFDhqigoECPPPKIqqurL3sHHADg5pXSbdgZGRmX3b9hwwbde++9kj78IOrChQv14osvKhaLafr06Xruued6/S243t6+BwDom3r7Pn5VnwO6FggQAPRv1+VzQAAAXCkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABg4qoCtHz5cmVkZKixsTGx7/z582poaFBRUZEGDRqk2tpahcPhq50TAHCDueIA7d+/X7/5zW90++23J+2fP3++tm/frq1bt6q1tVWnTp3SrFmzrnpQAMCN5YoC9P7776uurk7r16/X4MGDE/sjkYief/55PfPMM/ryl7+s8ePHa8OGDfrb3/6mvXv3Xva1Yr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KxWOJxNBpVIBBQJBJRQUFBqn8eAICxaDQqr9f7me/jKV0BvfLKK6qsrNTdd9+t4uJijRs3TuvXr08cP3HihEKhkGpqahL7vF6vqqqq1NbWdtnXDAaD8nq9iS0QCKQyEgCgn0opQMePH9eaNWs0cuRIvfrqq3rooYf06KOP6ne/+50kKRQKSZJ8Pl/S83w+X+LYxzU1NSkSiSS2rq6uK/lzAAD6mexUTo7H46qsrNSyZcskSePGjdPhw4e1du1a1dfXX9EAHo9HHo/nip4LAOi/UroCKikp0W233Za0b9SoUTp58qQkye/3S5LC4XDSOeFwOHEMAAApxQBNmTJFnZ2dSfuOHj2q4cOHS5LKy8vl9/vV0tKSOB6NRtXe3q7q6uo0jAsAuFGk9C24+fPna/LkyVq2bJm+853vaN++fVq3bp3WrVsnScrIyFBjY6OeeuopjRw5UuXl5WpublZpaalmzpx5LeYHAPRTKQVowoQJ2rZtm5qamvSzn/1M5eXlWrlyperq6hLnLFq0SGfPntWcOXPU3d2tqVOnaufOncrNzU378ACA/iulzwFdD729fxwA0Dddk88BAQCQLgQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMBESgHq6elRc3OzysvLlZeXp1tvvVVPPvmknHOJc5xzWrJkiUpKSpSXl6eamhodO3Ys7YMDAPq3lAL09NNPa82aNfr1r3+tt956S08//bRWrFih1atXJ85ZsWKFVq1apbVr16q9vV0DBw7U9OnTdf78+bQPD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Nx19zc7Hw+n/N4PG7atGmus7PTaFob0WjUzZs3z5WVlbnc3Fz3hS98wf34xz92sVgscQ7rdHX494AAACb63M+AAAA3BwIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACb+D46WVZ6WdS+3AAAAAElFTkSuQmCC", - "text/plain": [ - "
" - ] - }, - "metadata": {} - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/simulation/parabolic_motion_return_array.ipynb b/static/simulation/parabolic_motion_return_array.ipynb index 2072aa5c0..f3720f8f4 100644 --- a/static/simulation/parabolic_motion_return_array.ipynb +++ b/static/simulation/parabolic_motion_return_array.ipynb @@ -1,61 +1,53 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import math" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "g = 9.8\n", - "\n", - "\n", - "def parabolic_motion_step(x, y, u, v, dt):\n", - " x = x + u * dt\n", - " y = y + v * dt\n", - " u = u\n", - " v = v - g * dt\n", - " return [x, y, u, v]\n", - "\n", - "\n", - "def parabolic_motion(v0, theta, t, dt):\n", - " x = 0\n", - " y = 0\n", - " u = v0 * math.cos(theta)\n", - " v = v0 * math.sin(theta)\n", - " result = []\n", - " result.append([x, y, u, v])\n", - " n = int(t / dt)\n", - " for i in range(n):\n", - " result.append(\n", - " parabolic_motion_step(\n", - " result[i][0], result[i][1], result[i][2], result[i][3], dt\n", - " )\n", - " )\n", - " return result\n", - "\n", - "\n", - "print(parabolic_motion(30, math.pi / 4, 4, 0.01))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[[0, 0, 21.213203435596427, 21.213203435596423], [0.21213203435596428, 0.21213203435596423, 21.213203435596427, 21.115203435596424], [0.42426406871192857, 0.4232840687119285, 21.213203435596427, 21.017203435596425], [0.6363961030678928, 0.6334561030678927, 21.213203435596427, 20.919203435596426], [0.8485281374238571, 0.8426481374238569, 21.213203435596427, 20.821203435596427], [1.0606601717798214, 1.0508601717798212, 21.213203435596427, 20.723203435596428], [1.2727922061357857, 1.2580922061357855, 21.213203435596427, 20.62520343559643], [1.48492424049175, 1.4643442404917497, 21.213203435596427, 20.52720343559643], [1.6970562748477143, 1.669616274847714, 21.213203435596427, 20.42920343559643], [1.9091883092036785, 1.8739083092036783, 21.213203435596427, 20.331203435596432], [2.121320343559643, 2.0772203435596426, 21.213203435596427, 20.233203435596433], [2.333452377915607, 2.279552377915607, 21.213203435596427, 20.135203435596434], [2.5455844122715714, 2.4809044122715713, 21.213203435596427, 20.037203435596435], [2.7577164466275357, 2.681276446627536, 21.213203435596427, 19.939203435596436], [2.9698484809835, 2.8806684809835, 21.213203435596427, 19.841203435596437], [3.1819805153394642, 3.0790805153394647, 21.213203435596427, 19.74320343559644], [3.3941125496954285, 3.276512549695429, 21.213203435596427, 19.64520343559644], [3.606244584051393, 3.4729645840513936, 21.213203435596427, 19.54720343559644], [3.818376618407357, 3.668436618407358, 21.213203435596427, 19.44920343559644], [4.030508652763322, 3.8629286527633226, 21.213203435596427, 19.351203435596442], [4.242640687119286, 4.056440687119287, 21.213203435596427, 19.253203435596443], [4.4547727214752495, 4.248972721475251, 21.213203435596427, 19.155203435596444], [4.666904755831213, 4.440524755831216, 21.213203435596427, 19.057203435596445], [4.879036790187177, 4.631096790187181, 21.213203435596427, 18.959203435596446], [5.091168824543141, 4.820688824543145, 21.213203435596427, 18.861203435596448], [5.303300858899105, 5.00930085889911, 21.213203435596427, 18.76320343559645], [5.515432893255069, 5.196932893255074, 21.213203435596427, 18.66520343559645], [5.7275649276110325, 5.383584927611039, 21.213203435596427, 18.56720343559645], [5.939696961966996, 5.569256961967003, 21.213203435596427, 18.46920343559645], [6.15182899632296, 5.7539489963229675, 21.213203435596427, 18.371203435596453], [6.363961030678924, 5.937661030678932, 21.213203435596427, 18.273203435596454], [6.576093065034888, 6.1203930650348966, 21.213203435596427, 18.175203435596455], [6.788225099390852, 6.302145099390861, 21.213203435596427, 18.077203435596456], [7.000357133746816, 6.482917133746826, 21.213203435596427, 17.979203435596457], [7.212489168102779, 6.66270916810279, 21.213203435596427, 17.881203435596458], [7.424621202458743, 6.841521202458755, 21.213203435596427, 17.78320343559646], [7.636753236814707, 7.01935323681472, 21.213203435596427, 17.68520343559646], [7.848885271170671, 7.196205271170684, 21.213203435596427, 17.58720343559646], [8.061017305526635, 7.372077305526648, 21.213203435596427, 17.489203435596462], [8.273149339882599, 7.546969339882613, 21.213203435596427, 17.391203435596463], [8.485281374238562, 7.720881374238578, 21.213203435596427, 17.293203435596464], [8.697413408594526, 7.893813408594543, 21.213203435596427, 17.195203435596465], [8.90954544295049, 8.065765442950507, 21.213203435596427, 17.097203435596466], [9.121677477306454, 8.236737477306471, 21.213203435596427, 16.999203435596467], [9.333809511662418, 8.406729511662435, 21.213203435596427, 16.901203435596468], [9.545941546018382, 8.5757415460184, 21.213203435596427, 16.80320343559647], [9.758073580374345, 8.743773580374365, 21.213203435596427, 16.70520343559647], [9.97020561473031, 8.91082561473033, 21.213203435596427, 16.60720343559647], [10.182337649086273, 9.076897649086295, 21.213203435596427, 16.509203435596472], [10.394469683442237, 9.24198968344226, 21.213203435596427, 16.411203435596473], [10.6066017177982, 9.406101717798224, 21.213203435596427, 16.313203435596474], [10.818733752154165, 9.569233752154188, 21.213203435596427, 16.215203435596475], [11.030865786510129, 9.731385786510153, 21.213203435596427, 16.117203435596476], [11.242997820866092, 9.892557820866116, 21.213203435596427, 16.019203435596477], [11.455129855222056, 10.052749855222082, 21.213203435596427, 15.921203435596476], [11.66726188957802, 10.211961889578047, 21.213203435596427, 15.823203435596476], [11.879393923933984, 10.370193923934012, 21.213203435596427, 15.725203435596475], [12.091525958289948, 10.527445958289977, 21.213203435596427, 15.627203435596474], [12.303657992645912, 10.683717992645942, 21.213203435596427, 15.529203435596473], [12.515790027001875, 10.839010027001907, 21.213203435596427, 15.431203435596473], [12.72792206135784, 10.99332206135787, 21.213203435596427, 15.333203435596472], [12.940054095713803, 11.146654095713835, 21.213203435596427, 15.235203435596471], [13.152186130069767, 11.299006130069799, 21.213203435596427, 15.13720343559647], [13.36431816442573, 11.450378164425764, 21.213203435596427, 15.03920343559647], [13.576450198781695, 11.60077019878173, 21.213203435596427, 14.941203435596469], [13.788582233137658, 11.750182233137695, 21.213203435596427, 14.843203435596468], [14.000714267493622, 11.89861426749366, 21.213203435596427, 14.745203435596467], [14.212846301849586, 12.046066301849624, 21.213203435596427, 14.647203435596467], [14.42497833620555, 12.192538336205589, 21.213203435596427, 14.549203435596466], [14.637110370561514, 12.338030370561553, 21.213203435596427, 14.451203435596465], [14.849242404917478, 12.482542404917517, 21.213203435596427, 14.353203435596464], [15.061374439273441, 12.62607443927348, 21.213203435596427, 14.255203435596464], [15.273506473629405, 12.768626473629446, 21.213203435596427, 14.157203435596463], [15.48563850798537, 12.910198507985411, 21.213203435596427, 14.059203435596462], [15.697770542341333, 13.050790542341376, 21.213203435596427, 13.961203435596461], [15.909902576697297, 13.190402576697341, 21.213203435596427, 13.86320343559646], [16.122034611053262, 13.329034611053306, 21.213203435596427, 13.76520343559646], [16.334166645409226, 13.46668664540927, 21.213203435596427, 13.66720343559646], [16.54629867976519, 13.603358679765234, 21.213203435596427, 13.569203435596458], [16.758430714121154, 13.739050714121198, 21.213203435596427, 13.471203435596458], [16.970562748477118, 13.873762748477162, 21.213203435596427, 13.373203435596457], [17.18269478283308, 14.007494782833128, 21.213203435596427, 13.275203435596456], [17.394826817189045, 14.140246817189093, 21.213203435596427, 13.177203435596455], [17.60695885154501, 14.272018851545058, 21.213203435596427, 13.079203435596455], [17.819090885900973, 14.402810885901022, 21.213203435596427, 12.981203435596454], [18.031222920256937, 14.532622920256987, 21.213203435596427, 12.883203435596453], [18.2433549546129, 14.661454954612951, 21.213203435596427, 12.785203435596452], [18.455486988968865, 14.789306988968915, 21.213203435596427, 12.687203435596452], [18.66761902332483, 14.91617902332488, 21.213203435596427, 12.58920343559645], [18.879751057680792, 15.042071057680843, 21.213203435596427, 12.49120343559645], [19.091883092036756, 15.166983092036809, 21.213203435596427, 12.39320343559645], [19.30401512639272, 15.290915126392774, 21.213203435596427, 12.295203435596449], [19.516147160748684, 15.413867160748739, 21.213203435596427, 12.197203435596448], [19.728279195104648, 15.535839195104703, 21.213203435596427, 12.099203435596447], [19.94041122946061, 15.656831229460668, 21.213203435596427, 12.001203435596446], [20.152543263816575, 15.776843263816632, 21.213203435596427, 11.903203435596446], [20.36467529817254, 15.895875298172596, 21.213203435596427, 11.805203435596445], [20.576807332528503, 16.01392733252856, 21.213203435596427, 11.707203435596444], [20.788939366884467, 16.130999366884524, 21.213203435596427, 11.609203435596443], [21.00107140124043, 16.24709140124049, 21.213203435596427, 11.511203435596443], [21.213203435596395, 16.362203435596452, 21.213203435596427, 11.413203435596442], [21.42533546995236, 16.476335469952417, 21.213203435596427, 11.315203435596441], [21.637467504308322, 16.58948750430838, 21.213203435596427, 11.21720343559644], [21.849599538664286, 16.701659538664344, 21.213203435596427, 11.11920343559644], [22.06173157302025, 16.81285157302031, 21.213203435596427, 11.021203435596439], [22.273863607376214, 16.923063607376275, 21.213203435596427, 10.923203435596438], [22.485995641732178, 17.03229564173224, 21.213203435596427, 10.825203435596437], [22.69812767608814, 17.140547676088204, 21.213203435596427, 10.727203435596437], [22.910259710444105, 17.24781971044417, 21.213203435596427, 10.629203435596436], [23.12239174480007, 17.354111744800132, 21.213203435596427, 10.531203435596435], [23.334523779156033, 17.459423779156097, 21.213203435596427, 10.433203435596434], [23.546655813511997, 17.56375581351206, 21.213203435596427, 10.335203435596434], [23.75878784786796, 17.667107847868024, 21.213203435596427, 10.237203435596433], [23.970919882223924, 17.76947988222399, 21.213203435596427, 10.139203435596432], [24.18305191657989, 17.870871916579954, 21.213203435596427, 10.041203435596431], [24.395183950935852, 17.97128395093592, 21.213203435596427, 9.94320343559643], [24.607315985291816, 18.070715985291883, 21.213203435596427, 9.84520343559643], [24.81944801964778, 18.16916801964785, 21.213203435596427, 9.747203435596429], [25.031580054003744, 18.266640054003812, 21.213203435596427, 9.649203435596428], [25.243712088359707, 18.363132088359777, 21.213203435596427, 9.551203435596427], [25.45584412271567, 18.45864412271574, 21.213203435596427, 9.453203435596427], [25.667976157071635, 18.553176157071704, 21.213203435596427, 9.355203435596426], [25.8801081914276, 18.64672819142767, 21.213203435596427, 9.257203435596425], [26.092240225783563, 18.739300225783634, 21.213203435596427, 9.159203435596424], [26.304372260139527, 18.8308922601396, 21.213203435596427, 9.061203435596424], [26.51650429449549, 18.921504294495563, 21.213203435596427, 8.963203435596423], [26.728636328851454, 19.011136328851528, 21.213203435596427, 8.865203435596422], [26.940768363207418, 19.09978836320749, 21.213203435596427, 8.767203435596421], [27.152900397563382, 19.187460397563456, 21.213203435596427, 8.66920343559642], [27.365032431919346, 19.27415243191942, 21.213203435596427, 8.57120343559642], [27.57716446627531, 19.359864466275383, 21.213203435596427, 8.47320343559642], [27.789296500631274, 19.44459650063135, 21.213203435596427, 8.375203435596418], [28.001428534987237, 19.528348534987312, 21.213203435596427, 8.277203435596418], [28.2135605693432, 19.611120569343278, 21.213203435596427, 8.179203435596417], [28.425692603699165, 19.69291260369924, 21.213203435596427, 8.081203435596416], [28.63782463805513, 19.773724638055207, 21.213203435596427, 7.983203435596416], [28.849956672411093, 19.85355667241117, 21.213203435596427, 7.8852034355964165], [29.062088706767057, 19.932408706767134, 21.213203435596427, 7.787203435596417], [29.27422074112302, 20.010280741123097, 21.213203435596427, 7.689203435596417], [29.486352775478984, 20.08717277547906, 21.213203435596427, 7.591203435596417], [29.698484809834948, 20.163084809835027, 21.213203435596427, 7.493203435596417], [29.910616844190912, 20.23801684419099, 21.213203435596427, 7.395203435596417], [30.122748878546876, 20.311968878546956, 21.213203435596427, 7.297203435596417], [30.33488091290284, 20.38494091290292, 21.213203435596427, 7.199203435596417], [30.547012947258803, 20.456932947258885, 21.213203435596427, 7.1012034355964175], [30.759144981614767, 20.527944981614848, 21.213203435596427, 7.003203435596418], [30.97127701597073, 20.597977015970812, 21.213203435596427, 6.905203435596418], [31.183409050326695, 20.667029050326775, 21.213203435596427, 6.807203435596418], [31.39554108468266, 20.73510108468274, 21.213203435596427, 6.709203435596418], [31.607673119038623, 20.802193119038705, 21.213203435596427, 6.611203435596418], [31.819805153394586, 20.86830515339467, 21.213203435596427, 6.513203435596418], [32.03193718775055, 20.933437187750634, 21.213203435596427, 6.4152034355964185], [32.24406922210652, 20.997589222106598, 21.213203435596427, 6.317203435596419], [32.456201256462485, 21.060761256462563, 21.213203435596427, 6.219203435596419], [32.66833329081845, 21.122953290818526, 21.213203435596427, 6.121203435596419], [32.88046532517442, 21.18416532517449, 21.213203435596427, 6.023203435596419], [33.09259735953039, 21.244397359530453, 21.213203435596427, 5.925203435596419], [33.304729393886355, 21.303649393886417, 21.213203435596427, 5.827203435596419], [33.51686142824232, 21.361921428242383, 21.213203435596427, 5.729203435596419], [33.72899346259829, 21.419213462598346, 21.213203435596427, 5.63120343559642], [33.94112549695426, 21.47552549695431, 21.213203435596427, 5.53320343559642], [34.153257531310224, 21.530857531310275, 21.213203435596427, 5.43520343559642], [34.36538956566619, 21.58520956566624, 21.213203435596427, 5.33720343559642], [34.57752160002216, 21.638581600022203, 21.213203435596427, 5.23920343559642], [34.789653634378126, 21.690973634378167, 21.213203435596427, 5.14120343559642], [35.001785668734094, 21.74238566873413, 21.213203435596427, 5.04320343559642], [35.21391770309006, 21.792817703090094, 21.213203435596427, 4.9452034355964205], [35.42604973744603, 21.84226973744606, 21.213203435596427, 4.847203435596421], [35.638181771801996, 21.890741771802023, 21.213203435596427, 4.749203435596421], [35.85031380615796, 21.93823380615799, 21.213203435596427, 4.651203435596421], [36.06244584051393, 21.984745840513952, 21.213203435596427, 4.553203435596421], [36.2745778748699, 22.030277874869917, 21.213203435596427, 4.455203435596421], [36.486709909225866, 22.07482990922588, 21.213203435596427, 4.357203435596421], [36.69884194358183, 22.118401943581844, 21.213203435596427, 4.2592034355964214], [36.9109739779378, 22.160993977937807, 21.213203435596427, 4.161203435596422], [37.12310601229377, 22.20260601229377, 21.213203435596427, 4.063203435596422], [37.335238046649735, 22.243238046649736, 21.213203435596427, 3.965203435596422], [37.5473700810057, 22.2828900810057, 21.213203435596427, 3.867203435596422], [37.75950211536167, 22.321562115361665, 21.213203435596427, 3.769203435596422], [37.97163414971764, 22.35925414971763, 21.213203435596427, 3.6712034355964223], [38.183766184073605, 22.395966184073593, 21.213203435596427, 3.5732034355964224], [38.39589821842957, 22.431698218429556, 21.213203435596427, 3.4752034355964225], [38.60803025278554, 22.46645025278552, 21.213203435596427, 3.3772034355964227], [38.82016228714151, 22.500222287141487, 21.213203435596427, 3.279203435596423], [39.032294321497474, 22.53301432149745, 21.213203435596427, 3.181203435596423], [39.24442635585344, 22.564826355853416, 21.213203435596427, 3.083203435596423], [39.45655839020941, 22.59565839020938, 21.213203435596427, 2.985203435596423], [39.668690424565376, 22.625510424565345, 21.213203435596427, 2.8872034355964233], [39.880822458921344, 22.654382458921308, 21.213203435596427, 2.7892034355964235], [40.09295449327731, 22.682274493277273, 21.213203435596427, 2.6912034355964236], [40.30508652763328, 22.709186527633236, 21.213203435596427, 2.5932034355964237], [40.517218561989246, 22.7351185619892, 21.213203435596427, 2.495203435596424], [40.72935059634521, 22.760070596345166, 21.213203435596427, 2.397203435596424], [40.94148263070118, 22.78404263070113, 21.213203435596427, 2.299203435596424], [41.15361466505715, 22.807034665057095, 21.213203435596427, 2.2012034355964243], [41.365746699413116, 22.82904669941306, 21.213203435596427, 2.1032034355964244], [41.57787873376908, 22.850078733769024, 21.213203435596427, 2.0052034355964246], [41.79001076812505, 22.870130768124987, 21.213203435596427, 1.9072034355964245], [42.00214280248102, 22.889202802480952, 21.213203435596427, 1.8092034355964244], [42.214274836836985, 22.907294836836915, 21.213203435596427, 1.7112034355964243], [42.42640687119295, 22.92440687119288, 21.213203435596427, 1.6132034355964242], [42.63853890554892, 22.940538905548845, 21.213203435596427, 1.5152034355964241], [42.85067093990489, 22.95569093990481, 21.213203435596427, 1.417203435596424], [43.062802974260855, 22.969862974260774, 21.213203435596427, 1.319203435596424], [43.27493500861682, 22.983055008616738, 21.213203435596427, 1.2212034355964239], [43.48706704297279, 22.995267042972703, 21.213203435596427, 1.1232034355964238], [43.69919907732876, 23.006499077328666, 21.213203435596427, 1.0252034355964237], [43.911331111684724, 23.01675111168463, 21.213203435596427, 0.9272034355964237], [44.12346314604069, 23.026023146040593, 21.213203435596427, 0.8292034355964237], [44.33559518039666, 23.034315180396558, 21.213203435596427, 0.7312034355964238], [44.547727214752626, 23.041627214752523, 21.213203435596427, 0.6332034355964238], [44.759859249108594, 23.047959249108487, 21.213203435596427, 0.5352034355964238], [44.97199128346456, 23.053311283464453, 21.213203435596427, 0.43720343559642383], [45.18412331782053, 23.057683317820416, 21.213203435596427, 0.33920343559642385], [45.396255352176496, 23.06107535217638, 21.213203435596427, 0.24120343559642385], [45.60838738653246, 23.063487386532344, 21.213203435596427, 0.14320343559642384], [45.82051942088843, 23.06491942088831, 21.213203435596427, 0.04520343559642384], [46.0326514552444, 23.06537145524427, 21.213203435596427, -0.05279656440357616], [46.244783489600366, 23.064843489600236, 21.213203435596427, -0.15079656440357617], [46.45691552395633, 23.0633355239562, 21.213203435596427, -0.24879656440357617], [46.6690475583123, 23.060847558312165, 21.213203435596427, -0.3467965644035762], [46.88117959266827, 23.05737959266813, 21.213203435596427, -0.4447965644035762], [47.093311627024235, 23.052931627024094, 21.213203435596427, -0.5427965644035762], [47.3054436613802, 23.04750366138006, 21.213203435596427, -0.6407965644035761], [47.51757569573617, 23.041095695736022, 21.213203435596427, -0.7387965644035761], [47.72970773009214, 23.033707730091987, 21.213203435596427, -0.8367965644035761], [47.941839764448105, 23.02533976444795, 21.213203435596427, -0.9347965644035761], [48.15397179880407, 23.015991798803913, 21.213203435596427, -1.0327965644035761], [48.36610383316004, 23.00566383315988, 21.213203435596427, -1.1307965644035762], [48.57823586751601, 22.994355867515843, 21.213203435596427, -1.2287965644035763], [48.790367901871974, 22.982067901871808, 21.213203435596427, -1.3267965644035764], [49.00249993622794, 22.96879993622777, 21.213203435596427, -1.4247965644035765], [49.21463197058391, 22.954551970583736, 21.213203435596427, -1.5227965644035766], [49.426764004939876, 22.9393240049397, 21.213203435596427, -1.6207965644035767], [49.638896039295844, 22.923116039295664, 21.213203435596427, -1.7187965644035768], [49.85102807365181, 22.905928073651626, 21.213203435596427, -1.8167965644035768], [50.06316010800778, 22.88776010800759, 21.213203435596427, -1.914796564403577], [50.275292142363746, 22.868612142363556, 21.213203435596427, -2.012796564403577], [50.48742417671971, 22.84848417671952, 21.213203435596427, -2.110796564403577], [50.69955621107568, 22.827376211075485, 21.213203435596427, -2.2087965644035767], [50.91168824543165, 22.80528824543145, 21.213203435596427, -2.3067965644035766], [51.123820279787616, 22.782220279787413, 21.213203435596427, -2.4047965644035765], [51.33595231414358, 22.758172314143376, 21.213203435596427, -2.5027965644035763], [51.54808434849955, 22.73314434849934, 21.213203435596427, -2.600796564403576], [51.76021638285552, 22.707136382855303, 21.213203435596427, -2.698796564403576], [51.972348417211485, 22.680148417211267, 21.213203435596427, -2.796796564403576], [52.18448045156745, 22.652180451567233, 21.213203435596427, -2.894796564403576], [52.39661248592342, 22.623232485923197, 21.213203435596427, -2.9927965644035757], [52.60874452027939, 22.593304520279162, 21.213203435596427, -3.0907965644035755], [52.820876554635355, 22.562396554635125, 21.213203435596427, -3.1887965644035754], [53.03300858899132, 22.53050858899109, 21.213203435596427, -3.2867965644035753], [53.24514062334729, 22.497640623347053, 21.213203435596427, -3.384796564403575], [53.45727265770326, 22.463792657703017, 21.213203435596427, -3.482796564403575], [53.669404692059224, 22.428964692058983, 21.213203435596427, -3.580796564403575], [53.88153672641519, 22.393156726414947, 21.213203435596427, -3.6787965644035747], [54.09366876077116, 22.356368760770913, 21.213203435596427, -3.7767965644035746], [54.305800795127126, 22.318600795126876, 21.213203435596427, -3.8747965644035745], [54.517932829483094, 22.27985282948284, 21.213203435596427, -3.9727965644035743], [54.73006486383906, 22.240124863838805, 21.213203435596427, -4.070796564403574], [54.94219689819503, 22.19941689819477, 21.213203435596427, -4.168796564403574], [55.154328932550996, 22.157728932550732, 21.213203435596427, -4.266796564403574], [55.36646096690696, 22.115060966906697, 21.213203435596427, -4.364796564403574], [55.57859300126293, 22.071413001262663, 21.213203435596427, -4.462796564403574], [55.7907250356189, 22.026785035618627, 21.213203435596427, -4.5607965644035735], [56.002857069974866, 21.981177069974592, 21.213203435596427, -4.658796564403573], [56.21498910433083, 21.934589104330556, 21.213203435596427, -4.756796564403573], [56.4271211386868, 21.88702113868652, 21.213203435596427, -4.854796564403573], [56.63925317304277, 21.838473173042484, 21.213203435596427, -4.952796564403573], [56.851385207398735, 21.78894520739845, 21.213203435596427, -5.050796564403573], [57.0635172417547, 21.73843724175441, 21.213203435596427, -5.148796564403573], [57.27564927611067, 21.686949276110376, 21.213203435596427, -5.246796564403573], [57.48778131046664, 21.63448131046634, 21.213203435596427, -5.344796564403572], [57.699913344822605, 21.581033344822306, 21.213203435596427, -5.442796564403572], [57.91204537917857, 21.52660537917827, 21.213203435596427, -5.540796564403572], [58.12417741353454, 21.471197413534234, 21.213203435596427, -5.638796564403572], [58.33630944789051, 21.4148094478902, 21.213203435596427, -5.736796564403572], [58.548441482246474, 21.357441482246163, 21.213203435596427, -5.834796564403572], [58.76057351660244, 21.299093516602127, 21.213203435596427, -5.932796564403572], [58.97270555095841, 21.23976555095809, 21.213203435596427, -6.0307965644035715], [59.184837585314376, 21.179457585314054, 21.213203435596427, -6.128796564403571], [59.396969619670344, 21.11816961967002, 21.213203435596427, -6.226796564403571], [59.60910165402631, 21.055901654025984, 21.213203435596427, -6.324796564403571], [59.82123368838228, 20.99265368838195, 21.213203435596427, -6.422796564403571], [60.033365722738246, 20.928425722737913, 21.213203435596427, -6.520796564403571], [60.24549775709421, 20.863217757093878, 21.213203435596427, -6.618796564403571], [60.45762979145018, 20.79702979144984, 21.213203435596427, -6.7167965644035705], [60.66976182580615, 20.729861825805806, 21.213203435596427, -6.81479656440357], [60.881893860162116, 20.66171386016177, 21.213203435596427, -6.91279656440357], [61.09402589451808, 20.592585894517732, 21.213203435596427, -7.01079656440357], [61.30615792887405, 20.5224779288737, 21.213203435596427, -7.10879656440357], [61.51828996323002, 20.451389963229662, 21.213203435596427, -7.20679656440357], [61.730421997585985, 20.379321997585627, 21.213203435596427, -7.30479656440357], [61.94255403194195, 20.30627403194159, 21.213203435596427, -7.40279656440357], [62.15468606629792, 20.232246066297556, 21.213203435596427, -7.5007965644035695], [62.36681810065389, 20.15723810065352, 21.213203435596427, -7.598796564403569], [62.578950135009855, 20.081250135009483, 21.213203435596427, -7.696796564403569], [62.79108216936582, 20.004282169365446, 21.213203435596427, -7.794796564403569], [63.00321420372179, 19.92633420372141, 21.213203435596427, -7.892796564403569], [63.21534623807776, 19.847406238077376, 21.213203435596427, -7.990796564403569], [63.427478272433724, 19.76749827243334, 21.213203435596427, -8.08879656440357], [63.63961030678969, 19.686610306789305, 21.213203435596427, -8.18679656440357], [63.85174234114566, 19.60474234114527, 21.213203435596427, -8.284796564403571], [64.06387437550163, 19.521894375501233, 21.213203435596427, -8.382796564403572], [64.27600640985759, 19.438066409857196, 21.213203435596427, -8.480796564403573], [64.48813844421355, 19.35325844421316, 21.213203435596427, -8.578796564403573], [64.70027047856951, 19.267470478569123, 21.213203435596427, -8.676796564403574], [64.91240251292547, 19.180702512925087, 21.213203435596427, -8.774796564403575], [65.12453454728143, 19.092954547281053, 21.213203435596427, -8.872796564403576], [65.33666658163739, 19.004226581637017, 21.213203435596427, -8.970796564403576], [65.54879861599335, 18.914518615992982, 21.213203435596427, -9.068796564403577], [65.76093065034931, 18.823830650348945, 21.213203435596427, -9.166796564403578], [65.97306268470527, 18.73216268470491, 21.213203435596427, -9.264796564403579], [66.18519471906123, 18.639514719060873, 21.213203435596427, -9.36279656440358], [66.39732675341719, 18.545886753416838, 21.213203435596427, -9.46079656440358], [66.60945878777315, 18.4512787877728, 21.213203435596427, -9.55879656440358], [66.82159082212911, 18.355690822128764, 21.213203435596427, -9.656796564403582], [67.03372285648507, 18.25912285648473, 21.213203435596427, -9.754796564403582], [67.24585489084103, 18.161574890840694, 21.213203435596427, -9.852796564403583], [67.45798692519699, 18.06304692519666, 21.213203435596427, -9.950796564403584], [67.67011895955295, 17.963538959552622, 21.213203435596427, -10.048796564403585], [67.88225099390891, 17.863050993908587, 21.213203435596427, -10.146796564403585], [68.09438302826487, 17.76158302826455, 21.213203435596427, -10.244796564403586], [68.30651506262083, 17.659135062620514, 21.213203435596427, -10.342796564403587], [68.51864709697679, 17.555707096976477, 21.213203435596427, -10.440796564403588], [68.73077913133275, 17.45129913133244, 21.213203435596427, -10.538796564403588], [68.94291116568871, 17.345911165688406, 21.213203435596427, -10.63679656440359], [69.15504320004467, 17.23954320004437, 21.213203435596427, -10.73479656440359], [69.36717523440063, 17.132195234400335, 21.213203435596427, -10.83279656440359], [69.5793072687566, 17.023867268756298, 21.213203435596427, -10.930796564403591], [69.79143930311255, 16.914559303112263, 21.213203435596427, -11.028796564403592], [70.00357133746851, 16.804271337468226, 21.213203435596427, -11.126796564403593], [70.21570337182447, 16.69300337182419, 21.213203435596427, -11.224796564403594], [70.42783540618044, 16.580755406180153, 21.213203435596427, -11.322796564403594], [70.6399674405364, 16.467527440536117, 21.213203435596427, -11.420796564403595], [70.85209947489236, 16.353319474892082, 21.213203435596427, -11.518796564403596], [71.06423150924832, 16.238131509248046, 21.213203435596427, -11.616796564403597], [71.27636354360428, 16.12196354360401, 21.213203435596427, -11.714796564403597], [71.48849557796024, 16.004815577959974, 21.213203435596427, -11.812796564403598], [71.7006276123162, 15.886687612315939, 21.213203435596427, -11.910796564403599], [71.91275964667216, 15.767579646671903, 21.213203435596427, -12.0087965644036], [72.12489168102812, 15.647491681027867, 21.213203435596427, -12.1067965644036], [72.33702371538408, 15.526423715383832, 21.213203435596427, -12.204796564403601], [72.54915574974004, 15.404375749739796, 21.213203435596427, -12.302796564403602], [72.761287784096, 15.28134778409576, 21.213203435596427, -12.400796564403603], [72.97341981845196, 15.157339818451723, 21.213203435596427, -12.498796564403603], [73.18555185280792, 15.032351852807686, 21.213203435596427, -12.596796564403604], [73.39768388716388, 14.90638388716365, 21.213203435596427, -12.694796564403605], [73.60981592151984, 14.779435921519614, 21.213203435596427, -12.792796564403606], [73.8219479558758, 14.651507955875578, 21.213203435596427, -12.890796564403606], [74.03407999023176, 14.522599990231543, 21.213203435596427, -12.988796564403607], [74.24621202458772, 14.392712024587507, 21.213203435596427, -13.086796564403608], [74.45834405894368, 14.26184405894347, 21.213203435596427, -13.184796564403609], [74.67047609329964, 14.129996093299434, 21.213203435596427, -13.28279656440361], [74.8826081276556, 13.997168127655398, 21.213203435596427, -13.38079656440361], [75.09474016201156, 13.863360162011361, 21.213203435596427, -13.478796564403611], [75.30687219636752, 13.728572196367324, 21.213203435596427, -13.576796564403612], [75.51900423072348, 13.592804230723289, 21.213203435596427, -13.674796564403612], [75.73113626507944, 13.456056265079253, 21.213203435596427, -13.772796564403613], [75.9432682994354, 13.318328299435217, 21.213203435596427, -13.870796564403614], [76.15540033379136, 13.179620333791181, 21.213203435596427, -13.968796564403615], [76.36753236814732, 13.039932368147145, 21.213203435596427, -14.066796564403615], [76.57966440250328, 12.899264402503109, 21.213203435596427, -14.164796564403616], [76.79179643685924, 12.757616436859072, 21.213203435596427, -14.262796564403617], [77.0039284712152, 12.614988471215035, 21.213203435596427, -14.360796564403618], [77.21606050557116, 12.471380505570998, 21.213203435596427, -14.458796564403618], [77.42819253992712, 12.326792539926963, 21.213203435596427, -14.55679656440362], [77.64032457428308, 12.181224574282927, 21.213203435596427, -14.65479656440362], [77.85245660863905, 12.034676608638891, 21.213203435596427, -14.75279656440362], [78.064588642995, 11.887148642994855, 21.213203435596427, -14.850796564403622], [78.27672067735097, 11.73864067735082, 21.213203435596427, -14.948796564403622], [78.48885271170693, 11.589152711706783, 21.213203435596427, -15.046796564403623], [78.70098474606289, 11.438684746062746, 21.213203435596427, -15.144796564403624], [78.91311678041885, 11.28723678041871, 21.213203435596427, -15.242796564403625], [79.1252488147748, 11.134808814774672, 21.213203435596427, -15.340796564403625], [79.33738084913077, 10.981400849130637, 21.213203435596427, -15.438796564403626], [79.54951288348673, 10.827012883486601, 21.213203435596427, -15.536796564403627], [79.76164491784269, 10.671644917842565, 21.213203435596427, -15.634796564403628], [79.97377695219865, 10.51529695219853, 21.213203435596427, -15.732796564403628], [80.18590898655461, 10.357968986554493, 21.213203435596427, -15.830796564403629], [80.39804102091057, 10.199661020910456, 21.213203435596427, -15.92879656440363], [80.61017305526653, 10.04037305526642, 21.213203435596427, -16.02679656440363], [80.82230508962249, 9.880105089622383, 21.213203435596427, -16.124796564403628], [81.03443712397845, 9.718857123978346, 21.213203435596427, -16.222796564403627], [81.24656915833441, 9.55662915833431, 21.213203435596427, -16.320796564403626], [81.45870119269037, 9.393421192690274, 21.213203435596427, -16.418796564403625], [81.67083322704633, 9.229233227046238, 21.213203435596427, -16.516796564403624], [81.88296526140229, 9.064065261402202, 21.213203435596427, -16.614796564403623], [82.09509729575825, 8.897917295758166, 21.213203435596427, -16.71279656440362], [82.30722933011421, 8.73078933011413, 21.213203435596427, -16.81079656440362], [82.51936136447017, 8.562681364470093, 21.213203435596427, -16.90879656440362], [82.73149339882613, 8.393593398826056, 21.213203435596427, -17.00679656440362], [82.94362543318209, 8.22352543318202, 21.213203435596427, -17.104796564403618], [83.15575746753805, 8.052477467537985, 21.213203435596427, -17.202796564403616], [83.36788950189401, 7.880449501893949, 21.213203435596427, -17.300796564403615], [83.58002153624997, 7.707441536249913, 21.213203435596427, -17.398796564403614], [83.79215357060593, 7.533453570605877, 21.213203435596427, -17.496796564403613], [84.0042856049619, 7.358485604961841, 21.213203435596427, -17.594796564403612], [84.21641763931785, 7.182537639317805, 21.213203435596427, -17.69279656440361], [84.42854967367381, 7.005609673673769, 21.213203435596427, -17.79079656440361], [84.64068170802977, 6.827701708029733, 21.213203435596427, -17.88879656440361], [84.85281374238573, 6.648813742385697, 21.213203435596427, -17.98679656440361]]\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "g = 9.8\n", + "\n", + "\n", + "def parabolic_motion_step(x, y, u, v, dt):\n", + " x = x + u * dt\n", + " y = y + v * dt\n", + " u = u\n", + " v = v - g * dt\n", + " return [x, y, u, v]\n", + "\n", + "\n", + "def parabolic_motion(v0, theta, t, dt):\n", + " x = 0\n", + " y = 0\n", + " u = v0 * math.cos(theta)\n", + " v = v0 * math.sin(theta)\n", + " result = []\n", + " result.append([x, y, u, v])\n", + " n = int(t / dt)\n", + " for i in range(n):\n", + " result.append(\n", + " parabolic_motion_step(\n", + " result[i][0], result[i][1], result[i][2], result[i][3], dt\n", + " )\n", + " )\n", + " return result\n", + "\n", + "\n", + "print(parabolic_motion(30, math.pi / 4, 4, 0.01))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/simulation/parabolic_motion_view.ipynb b/static/simulation/parabolic_motion_view.ipynb index 8e4de0c59..ad8efba31 100644 --- a/static/simulation/parabolic_motion_view.ipynb +++ b/static/simulation/parabolic_motion_view.ipynb @@ -1,1621 +1,82 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "import math\n", - "\n", - "import ita\n", - "\n", - "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "def draw_cell(x, y):\n", - " image = ita.array.make2d(100, 100)\n", - " y = len(image) - 1 - y\n", - " image[y][x] = 1\n", - " return image\n", - "\n", - "\n", - "g = 9.8\n", - "\n", - "\n", - "def parabolic_motion_step(x, y, u, v, dt):\n", - " x = x + u * dt\n", - " y = y + v * dt\n", - " u = u\n", - " v = v - g * dt\n", - " return [x, y, u, v]\n", - "\n", - "\n", - "def parabolic_motion(v0, theta, t, dt):\n", - " x = 0\n", - " y = 0\n", - " u = v0 * math.cos(theta)\n", - " v = v0 * math.sin(theta)\n", - " result = []\n", - " result.append([x, y, u, v])\n", - " n = int(t / dt)\n", - " for i in range(n):\n", - " result.append(\n", - " parabolic_motion_step(\n", - " result[i][0], result[i][1], result[i][2], result[i][3], dt\n", - " )\n", - " )\n", - " return result\n", - "\n", - "\n", - "result = parabolic_motion(30, math.pi / 4, 4, 0.01)\n", - "images = []\n", - "for i in range(10):\n", - " images.append(\n", - " draw_cell(\n", - " int(result[i * int(len(result) / 10)][0]),\n", - " int(result[i * int(len(result) / 10)][1]),\n", - " )\n", - " )\n", - "ita.plot.animation_show(images)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
\n", - " \n", - "
\n", - " \n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - "
\n", - "\n", - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 3 - }, - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAGgCAYAAADsNrNZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAYNklEQVR4nO3df2xV9f3H8Vd/0NsK7S2U9d523EJnSIqAESmUAtmS0Yw49oPRuZHUrf7ImFqUAop0S1k2hYsscwymMIiDJYJMkjGFZBhSXDO2UqAOJlMKC2Q04r1ott6LIBfS+/n+4debXUHthQvvFp6P5CTec869ffMx3GdOe27JcM45AQBwnWVaDwAAuDkRIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgIlrFqBnn31WI0aMUG5urqqqqrRv375r9aUAAP1QxrX4XXC///3v9f3vf19r165VVVWVVq5cqa1bt6qzs1PFxcWf+tx4PK5Tp04pPz9fGRkZ6R4NAHCNOed05swZlZaWKjPzU65z3DUwceJE19DQkHjc09PjSktLXTAY/MzndnV1OUlsbGxsbP186+rq+tT3+2yl2YULF9TR0aGmpqbEvszMTNXU1Kitre2S82OxmGKxWOKx+/8Lsq6uLhUUFKR7PADANRaNRhUIBJSfn/+p56U9QO+99556enrk8/mS9vt8Ph05cuSS84PBoH76059esr+goIAAAUA/9lk/RjG/C66pqUmRSCSxdXV1WY8EALgO0n4FNHToUGVlZSkcDiftD4fD8vv9l5zv8Xjk8XjSPQYAoI9L+xVQTk6Oxo8fr5aWlsS+eDyulpYWVVdXp/vLAQD6qbRfAUnSggULVF9fr8rKSk2cOFErV67U2bNndd99912LLwcA6IeuSYC++93v6t1339WSJUsUCoV0xx13aOfOnZfcmAAAuHldkw+iXo1oNCqv16tIJMJdcADQD/X2fdz8LjgAwM2JAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmEgpQMFgUBMmTFB+fr6Ki4s1c+ZMdXZ2Jp1z/vx5NTQ0qKioSIMGDVJtba3C4XBahwYA9H8pBai1tVUNDQ3au3evdu3apYsXL+orX/mKzp49mzhn/vz52r59u7Zu3arW1ladOnVKs2bNSvvgAID+LcM55670ye+++66Ki4vV2tqqL37xi4pEIvrc5z6nzZs369vf/rYk6ciRIxo1apTa2to0adKkS14jFospFoslHkejUQUCAUUiERUUFFzpaAAAI9FoVF6v9zPfx6/qZ0CRSESSNGTIEElSR0eHLl68qJqamsQ5FRUVKisrU1tb22VfIxgMyuv1JrZAIHA1IwEA+okrDlA8HldjY6OmTJmiMWPGSJJCoZBycnJUWFiYdK7P51MoFLrs6zQ1NSkSiSS2rq6uKx0JANCPZF/pExsaGnT48GHt2bPnqgbweDzyeDxX9RoAgP7niq6A5s6dqx07dui1117TsGHDEvv9fr8uXLig7u7upPPD4bD8fv9VDQoAuLGkFCDnnObOnatt27Zp9+7dKi8vTzo+fvx4DRgwQC0tLYl9nZ2dOnnypKqrq9MzMQDghpDSt+AaGhq0efNmvfzyy8rPz0/8XMfr9SovL09er1cPPPCAFixYoCFDhqigoECPPPKIqqurL3sHHADg5pXSbdgZGRmX3b9hwwbde++9kj78IOrChQv14osvKhaLafr06Xruued6/S243t6+BwDom3r7Pn5VnwO6FggQAPRv1+VzQAAAXCkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABg4qoCtHz5cmVkZKixsTGx7/z582poaFBRUZEGDRqk2tpahcPhq50TAHCDueIA7d+/X7/5zW90++23J+2fP3++tm/frq1bt6q1tVWnTp3SrFmzrnpQAMCN5YoC9P7776uurk7r16/X4MGDE/sjkYief/55PfPMM/ryl7+s8ePHa8OGDfrb3/6mvXv3Xva1YrGYotFo0gYAuPFdUYAaGho0Y8YM1dTUJO3v6OjQxYsXk/ZXVFSorKxMbW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dd9+t4uJijRs3TuvXr08cP3HihEKhkGpqahL7vF6vqqqq1NbWdtnXDAaD8nq9iS0QCKQyEgCgn0opQMePH9eaNWs0cuRIvfrqq3rooYf06KOP6ne/+50kKRQKSZJ8Pl/S83w+X+LYxzU1NSkSiSS2rq6uK/lzAAD6mexUTo7H46qsrNSyZcskSePGjdPhw4e1du1a1dfXX9EAHo9HHo/nip4LAOi/UroCKikp0W233Za0b9SoUTp58qQkye/3S5LC4XDSOeFwOHEMAAApxQBNmTJFnZ2dSfuOHj2q4cOHS5LKy8vl9/vV0tKSOB6NRtXe3q7q6uo0jAsAuFGk9C24+fPna/LkyVq2bJm+853vaN++fVq3bp3WrVsnScrIyFBjY6OeeuopjRw5UuXl5WpublZpaalmzpx5LeYHAPRTKQVowoQJ2rZtm5qamvSzn/1M5eXlWrlyperq6hLnLFq0SGfPntWcOXPU3d2tqVOnaufOncrNzU378ACA/iulzwFdD729fxwA0Dddk88BAQCQLgQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMBESgHq6elRc3OzysvLlZeXp1tvvVVPPvmknHOJc5xzWrJkiUpKSpSXl6eamhodO3Ys7YMDAPq3lAL09NNPa82aNfr1r3+tt956S08//bRWrFih1atXJ85ZsWKFVq1apbVr16q9vV0DBw7U9OnTdf78+bQPDwDovzLc/16+fIavfe1r8vl8ev755xP7amtrlZeXpxdeeEHOOZWWlmrhwoV67LH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xz92sVgscQ7rdHX494AAACb63M+AAAA3BwIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACb+D46WVZ6WdS+3AAAAAElFTkSuQmCC", - "text/plain": [ - "
" - ] - }, - "metadata": {} - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!pip install ita" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import math\n", + "\n", + "import ita\n", + "\n", + "%matplotlib inline" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def draw_cell(x, y):\n", + " image = ita.array.make2d(100, 100)\n", + " y = len(image) - 1 - y\n", + " image[y][x] = 1\n", + " return image\n", + "\n", + "\n", + "g = 9.8\n", + "\n", + "\n", + "def parabolic_motion_step(x, y, u, v, dt):\n", + " x = x + u * dt\n", + " y = y + v * dt\n", + " u = u\n", + " v = v - g * dt\n", + " return [x, y, u, v]\n", + "\n", + "\n", + "def parabolic_motion(v0, theta, t, dt):\n", + " x = 0\n", + " y = 0\n", + " u = v0 * math.cos(theta)\n", + " v = v0 * math.sin(theta)\n", + " result = []\n", + " result.append([x, y, u, v])\n", + " n = int(t / dt)\n", + " for i in range(n):\n", + " result.append(\n", + " parabolic_motion_step(\n", + " result[i][0], result[i][1], result[i][2], result[i][3], dt\n", + " )\n", + " )\n", + " return result\n", + "\n", + "\n", + "result = parabolic_motion(30, math.pi / 4, 4, 0.01)\n", + "images = []\n", + "for i in range(10):\n", + " images.append(\n", + " draw_cell(\n", + " int(result[i * int(len(result) / 10)][0]),\n", + " int(result[i * int(len(result) / 10)][1]),\n", + " )\n", + " )\n", + "ita.plot.animation_show(images)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/simulation/resisted_motion.ipynb b/static/simulation/resisted_motion.ipynb index 156dd3c62..5d83e3a6a 100644 --- a/static/simulation/resisted_motion.ipynb +++ b/static/simulation/resisted_motion.ipynb @@ -1,52 +1,32 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import math\n", "\n", "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def draw_cell(x, y):\n", " image = ita.array.make2d(100, 100)\n", @@ -80,1529 +60,10 @@ "for i in range(10):\n", " images.append(draw_cell(50, int(result[i * int(len(result) / 10)][0])))\n", "ita.plot.animation_show(images)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
\n", - " \n", - "
\n", - " \n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - "
\n", - "\n", - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 76 - }, - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAGgCAYAAADsNrNZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAYNklEQVR4nO3df2xV9f3H8Vd/0NsK7S2U9d523EJnSIqAESmUAtmS0Yw49oPRuZHUrf7ImFqUAop0S1k2hYsscwymMIiDJYJMkjGFZBhSXDO2UqAOJlMKC2Q04r1ott6LIBfS+/n+4debXUHthQvvFp6P5CTec869ffMx3GdOe27JcM45AQBwnWVaDwAAuDkRIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgIlrFqBnn31WI0aMUG5urqqqqrRv375r9aUAAP1QxrX4XXC///3v9f3vf19r165VVVWVVq5cqa1bt6qzs1PFxcWf+tx4PK5Tp04pPz9fGRkZ6R4NAHCNOed05swZlZaWKjPzU65z3DUwceJE19DQkHjc09PjSktLXTAY/MzndnV1OUlsbGxsbP186+rq+tT3+2yl2YULF9TR0aGmpqbEvszMTNXU1Kitre2S82OxmGKxWOKx+/8Lsq6uLhUUFKR7PADANRaNRhUIBJSfn/+p56U9QO+99556enrk8/mS9vt8Ph05cuSS84PBoH76059esr+goIAAAUA/9lk/RjG/C66pqUmRSCSxdXV1WY8EALgO0n4FNHToUGVlZSkcDiftD4fD8vv9l5zv8Xjk8XjSPQYAoI9L+xVQTk6Oxo8fr5aWlsS+eDyulpYWVVdXp/vLAQD6qbRfAUnSggULVF9fr8rKSk2cOFErV67U2bNndd99912LLwcA6IeuSYC++93v6t1339WSJUsUCoV0xx13aOfOnZfcmAAAuHldkw+iXo1oNCqv16tIJMJdcADQD/X2fdz8LjgAwM2JAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmEgpQMFgUBMmTFB+fr6Ki4s1c+ZMdXZ2Jp1z/vx5NTQ0qKioSIMGDVJtba3C4XBahwYA9H8pBai1tVUNDQ3au3evdu3apYsXL+orX/mKzp49mzhn/vz52r59u7Zu3arW1ladOnVKs2bNSvvgAID+LcM55670ye+++66Ki4vV2tqqL37xi4pEIvrc5z6nzZs369vf/rYk6ciRIxo1apTa2to0adKkS14jFospFoslHkejUQUCAUUiERUUFFzpaAAAI9FoVF6v9zPfx6/qZ0CRSESSNGTIEElSR0eHLl68qJqamsQ5FRUVKisrU1tb22VfIxgMyuv1JrZAIHA1IwEA+okrDlA8HldjY6OmTJmiMWPGSJJCoZBycnJUWFiYdK7P51MoFLrs6zQ1NSkSiSS2rq6uKx0JANCPZF/pExsaGnT48GHt2bPnqgbweDzyeDxX9RoAgP7niq6A5s6dqx07dui1117TsGHDEvv9fr8uXLig7u7upPPD4bD8fv9VDQoAuLGkFCDnnObOnatt27Zp9+7dKi8vTzo+fvx4DRgwQC0tLYl9nZ2dOnnypKqrq9MzMQDghpDSt+AaGhq0efNmvfzyy8rPz0/8XMfr9SovL09er1cPPPCAFixYoCFDhqigoECPPPKIqqurL3sHHADg5pXSbdgZGRmX3b9hwwbde++9kj78IOrChQv14osvKhaLafr06Xruued6/S243t6+BwDom3r7Pn5VnwO6FggQAPRv1+VzQAAAXCkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABg4qoCtHz5cmVkZKixsTGx7/z582poaFBRUZEGDRqk2tpahcPhq50TAHCDueIA7d+/X7/5zW90++23J+2fP3++tm/frq1bt6q1tVWnTp3SrFmzrnpQAMCN5YoC9P7776uurk7r16/X4MGDE/sjkYief/55PfPMM/ryl7+s8ePHa8OGDfrb3/6mvXv3Xva1YrGYotFo0gYAuPFdUYAaGho0Y8YM1dTUJO3v6OjQxYsXk/ZXVFSorKxMbW1tl32tYDAor9eb2AKBwJWMBADoZ1IO0JYtW/T6668rGAxeciwUCiknJ0eFhY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q9iS0QCKQyEgCgn0opQMePH9eaNWs0cuRIvfrqq3rooYf06KOP6ne/+50kKRQKSZJ8Pl/S83w+X+LYxzU1NSkSiSS2rq6uK/lzAAD6mexUTo7H46qsrNSyZcskSePGjdPhw4e1du1a1dfXX9EAHo9HHo/nip4LAOi/UroCKikp0W233Za0b9SoUTp58qQkye/3S5LC4XDSOeFwOHEMAAApxQBNmTJFnZ2dSfuOHj2q4cOHS5LKy8vl9/vV0tKSOB6NRtXe3q7q6uo0jAsAuFGk9C24+fPna/LkyVq2bJm+853vaN++fVq3bp3WrVsnScrIyFBjY6OeeuopjRw5UuXl5WpublZpaalmzpx5LeYHAPRTKQVowoQJ2rZtm5qamvSzn/1M5eXlWrlyperq6hLnLFq0SGfPntWcOXPU3d2tqVOnaufOncrNzU378ACA/iulzwFdD729fxwA0Dddk88BAQCQLgQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMBESgHq6elRc3OzysvLlZeXp1tvvVVPPvmknHOJc5xzWrJkiUpKSpSXl6eamhodO3Ys7YMDAPq3lAL09NNPa82aNfr1r3+tt956S08//bRWrFih1atXJ85ZsWKFVq1apbVr16q9vV0DBw7U9OnTdf78+bQPDwDovzLc/16+fIavfe1r8vl8ev755xP7amtrlZeXpxdeeEHOOZWWlmrhwoV67LHHJEmRSEQ+n08bN27U7NmzL3nNWCymWCyWeByNRhUIBBSJRFRQUHA1fzYAg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ATBAgAYIIAAQBMECAAgAkCBAAwQYAAACb+D46WVZ6WdS+3AAAAAElFTkSuQmCC", - "text/plain": [ - "
" - ] - }, - "metadata": {} - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/simulation/resisted_motion_analytical.ipynb b/static/simulation/resisted_motion_analytical.ipynb index be392a4ae..6db19da6c 100644 --- a/static/simulation/resisted_motion_analytical.ipynb +++ b/static/simulation/resisted_motion_analytical.ipynb @@ -1,52 +1,32 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import math\n", "\n", "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def draw_cell(x, y):\n", " image = ita.array.make2d(100, 100)\n", @@ -72,1529 +52,10 @@ "for i in range(10):\n", " images.append(draw_cell(50, int(result[i * int(len(result) / 10)])))\n", "ita.plot.animation_show(images)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
\n", - " \n", - "
\n", - " \n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - "
\n", - "\n", - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 25 - }, - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAGgCAYAAADsNrNZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAYNklEQVR4nO3df2xV9f3H8Vd/0NsK7S2U9d523EJnSIqAESmUAtmS0Yw49oPRuZHUrf7ImFqUAop0S1k2hYsscwymMIiDJYJMkjGFZBhSXDO2UqAOJlMKC2Q04r1ott6LIBfS+/n+4debXUHthQvvFp6P5CTec869ffMx3GdOe27JcM45AQBwnWVaDwAAuDkRIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgIlrFqBnn31WI0aMUG5urqqqqrRv375r9aUAAP1QxrX4XXC///3v9f3vf19r165VVVWVVq5cqa1bt6qzs1PFxcWf+tx4PK5Tp04pPz9fGRkZ6R4NAHCNOed05swZlZaWKjPzU65z3DUwceJE19DQkHjc09PjSktLXTAY/MzndnV1OUlsbGxsbP186+rq+tT3+2yl2YULF9TR0aGmpqbEvszMTNXU1Kitre2S82OxmGKxWOKx+/8Lsq6uLhUUFKR7PADANRaNRhUIBJSfn/+p56U9QO+99556enrk8/mS9vt8Ph05cuSS84PBoH76059esr+goIAAAUA/9lk/RjG/C66pqUmRSCSxdXV1WY8EALgO0n4FNHToUGVlZSkcDiftD4fD8vv9l5zv8Xjk8XjSPQYAoI9L+xVQTk6Oxo8fr5aWlsS+eDyulpYWVVdXp/vLAQD6qbRfAUnSggULVF9fr8rKSk2cOFErV67U2bNndd99912LLwcA6IeuSYC++93v6t1339WSJUsUCoV0xx13aOfOnZfcmAAAuHldkw+iXo1oNCqv16tIJMJdcADQD/X2fdz8LjgAwM2JAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmEgpQMFgUBMmTFB+fr6Ki4s1c+ZMdXZ2Jp1z/vx5NTQ0qKioSIMGDVJtba3C4XBahwYA9H8pBai1tVUNDQ3au3evdu3apYsXL+orX/mKzp49mzhn/vz52r59u7Zu3arW1ladOnVKs2bNSvvgAID+LcM55670ye+++66Ki4vV2tqqL37xi4pEIvrc5z6nzZs369vf/rYk6ciRIxo1apTa2to0adKkS14jFospFoslHkejUQUCAUUiERUUFFzpaAAAI9FoVF6v9zPfx6/qZ0CRSESSNGTIEElSR0eHLl68qJqamsQ5FRUVKisrU1tb22VfIxgMyuv1JrZAIHA1IwEA+okrDlA8HldjY6OmTJmiMWPGSJJCoZBycnJUWFiYdK7P51MoFLrs6zQ1NSkSiSS2rq6uKx0JANCPZF/pExsaGnT48GHt2bPnqgbweDzyeDxX9RoAgP7niq6A5s6dqx07dui1117TsGHDEvv9fr8uXLig7u7upPPD4bD8fv9VDQoAuLGkFCDnnObOnatt27Zp9+7dKi8vTzo+fvx4DRgwQC0tLYl9nZ2dOnnypKqrq9MzMQDghpDSt+AaGhq0efNmvfzyy8rPz0/8XMfr9SovL09er1cPPPCAFixYoCFDhqigoECPPPKIqqurL3sHHADg5pXSbdgZGRmX3b9hwwbde++9kj78IOrChQv14osvKhaLafr06Xruued6/S243t6+BwDom3r7Pn5VnwO6FggQAPRv1+VzQAAAXCkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABg4qoCtHz5cmVkZKixsTGx7/z582poaFBRUZEGDRqk2tpahcPhq50TAHCDueIA7d+/X7/5zW90++23J+2fP3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6srMzl5OS4iRMnur1791qPZEbSZbcNGzYkzvnggw/cww8/7AYPHuxuueUW961vfcu98847dkP3ER8PEOv0oe3bt7sxY8Y4j8fjKioq3Lp165KOx+Nx19zc7Hw+n/N4PG7atGmus7PTaFob0WjUzZs3z5WVlbnc3Fz3hS98wf34xz92sVgscQ7rdHX494AAACb63M+AAAA3BwIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACb+D46WVZ6WdS+3AAAAAElFTkSuQmCC", - "text/plain": [ - "
" - ] - }, - "metadata": {} - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/simulation/uniform_linear_motion.ipynb b/static/simulation/uniform_linear_motion.ipynb index ed93accb1..85a5383a9 100644 --- a/static/simulation/uniform_linear_motion.ipynb +++ b/static/simulation/uniform_linear_motion.ipynb @@ -1,36 +1,28 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def uniform_linear_motion_step(x, v0, dt):\n", - " return x + v0 * dt\n", - "\n", - "\n", - "def uniform_linear_motion(x0, v0, t, dt):\n", - " x = x0\n", - " n = int(t / dt)\n", - " for i in range(n):\n", - " x = uniform_linear_motion_step(x, v0, dt)\n", - " return x\n", - "\n", - "\n", - "print(uniform_linear_motion(0, 10, 10, 0.1))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "100.0\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def uniform_linear_motion_step(x, v0, dt):\n", + " return x + v0 * dt\n", + "\n", + "\n", + "def uniform_linear_motion(x0, v0, t, dt):\n", + " x = x0\n", + " n = int(t / dt)\n", + " for i in range(n):\n", + " x = uniform_linear_motion_step(x, v0, dt)\n", + " return x\n", + "\n", + "\n", + "print(uniform_linear_motion(0, 10, 10, 0.1))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/simulation/uniform_linear_motion_analytical.ipynb b/static/simulation/uniform_linear_motion_analytical.ipynb index 20c7179b9..613566ebf 100644 --- a/static/simulation/uniform_linear_motion_analytical.ipynb +++ b/static/simulation/uniform_linear_motion_analytical.ipynb @@ -1,28 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def uniform_linear_motion(x0, v0, t):\n", - " return x0 + v0 * t\n", - "\n", - "\n", - "print(uniform_linear_motion(0, 10, 10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "100\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def uniform_linear_motion(x0, v0, t):\n", + " return x0 + v0 * t\n", + "\n", + "\n", + "print(uniform_linear_motion(0, 10, 10))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/simulation/uniform_linear_motion_return_array.ipynb b/static/simulation/uniform_linear_motion_return_array.ipynb index 183bab5a9..02223e4d5 100644 --- a/static/simulation/uniform_linear_motion_return_array.ipynb +++ b/static/simulation/uniform_linear_motion_return_array.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def uniform_linear_motion_step(x, v0, dt):\n", " return x + v0 * dt\n", @@ -20,18 +20,10 @@ "\n", "\n", "print(uniform_linear_motion(0, 10, 10, 0.1))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/simulation/uniform_linear_motion_view.ipynb b/static/simulation/uniform_linear_motion_view.ipynb index b3d5d4ce8..dc52ea795 100644 --- a/static/simulation/uniform_linear_motion_view.ipynb +++ b/static/simulation/uniform_linear_motion_view.ipynb @@ -1,50 +1,30 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def draw_cell(x, y):\n", " image = ita.array.make2d(100, 100)\n", @@ -71,1529 +51,10 @@ "for i in range(10):\n", " images.append(draw_cell(int(x[i * int(len(x) / 10)]), 50))\n", "ita.plot.animation_show(images)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
\n", - " \n", - "
\n", - " \n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - "
\n", - "\n", - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 3 - }, - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAGgCAYAAADsNrNZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAYNklEQVR4nO3df2xV9f3H8Vd/0NsK7S2U9d523EJnSIqAESmUAtmS0Yw49oPRuZHUrf7ImFqUAop0S1k2hYsscwymMIiDJYJMkjGFZBhSXDO2UqAOJlMKC2Q04r1ott6LIBfS+/n+4debXUHthQvvFp6P5CTec869ffMx3GdOe27JcM45AQBwnWVaDwAAuDkRIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgIlrFqBnn31WI0aMUG5urqqqqrRv375r9aUAAP1QxrX4XXC///3v9f3vf19r165VVVWVVq5cqa1bt6qzs1PFxcWf+tx4PK5Tp04pPz9fGRkZ6R4NAHCNOed05swZlZaWKjPzU65z3DUwceJE19DQkHjc09PjSktLXTAY/MzndnV1OUlsbGxsbP186+rq+tT3+2yl2YULF9TR0aGmpqbEvszMTNXU1Kitre2S82OxmGKxWOKx+/8Lsq6uLhUUFKR7PADANRaNRhUIBJSfn/+p56U9QO+99556enrk8/mS9vt8Ph05cuSS84PBoH76059esr+goIAAAUA/9lk/RjG/C66pqUmRSCSxdXV1WY8EALgO0n4FNHToUGVlZSkcDiftD4fD8vv9l5zv8Xjk8XjSPQYAoI9L+xVQTk6Oxo8fr5aWlsS+eDyulpYWVVdXp/vLAQD6qbRfAUnSggULVF9fr8rKSk2cOFErV67U2bNndd99912LLwcA6IeuSYC++93v6t1339WSJUsUCoV0xx13aOfOnZfcmAAAuHldkw+iXo1oNCqv16tIJMJdcADQD/X2fdz8LjgAwM2JAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmEgpQMFgUBMmTFB+fr6Ki4s1c+ZMdXZ2Jp1z/vx5NTQ0qKioSIMGDVJtba3C4XBahwYA9H8pBai1tVUNDQ3au3evdu3apYsXL+orX/mKzp49mzhn/vz52r59u7Zu3arW1ladOnVKs2bNSvvgAID+LcM55670ye+++66Ki4vV2tqqL37xi4pEIvrc5z6nzZs369vf/rYk6ciRIxo1apTa2to0adKkS14jFospFoslHkejUQUCAUUiERUUFFzpaAAAI9FoVF6v9zPfx6/qZ0CRSESSNGTIEElSR0eHLl68qJqamsQ5FRUVKisrU1tb22VfIxgMyuv1JrZAIHA1IwEA+okrDlA8HldjY6OmTJmiMWPGSJJCoZBycnJUWFiYdK7P51MoFLrs6zQ1NSkSiSS2rq6uKx0JANCPZF/pExsaGnT48GHt2bPnqgbweDzyeDxX9RoAgP7niq6A5s6dqx07dui1117TsGHDEvv9fr8uXLig7u7upPPD4bD8fv9VDQoAuLGkFCDnnObOnatt27Zp9+7dKi8vTzo+fvx4DRgwQC0tLYl9nZ2dOnnypKqrq9MzMQDghpDSt+AaGhq0efNmvfzyy8rPz0/8XMfr9SovL09er1cPPPCAFixYoCFDhqigoECPPPKIqqurL3sHHADg5pXSbdgZGRmX3b9hwwbde++9kj78IOrChQv14osvKhaLafr06Xruued6/S243t6+BwDom3r7Pn5VnwO6FggQAPRv1+VzQAAAXCkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABA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/frwGDBiQtGadnZ06efLkTbVm06ZN0xtvvKGDBw8mtsrKStXV1SX+m3WSpkyZcslt/EePHtXw4cMlSeXl5fL7/UnrFI1G1d7eflOt07lz5y751zyzsrIUj8clsU5pYX0XxOVs2bLFeTwet3HjRvfmm2+6OXPmuMLCQhcKhaxHM/HQQw85r9fr/vznP7t33nknsZ07dy5xzoMPPujKysrc7t273YEDB1x1dbWrrq42nLpv+N+74JxjnZz78Bb17Oxst3TpUnfs2DG3adMmd8stt7gXXnghcc7y5ctdYWGhe/nll90//vEP981vfvOmu724vr7eff7zn0/chv2HP/zBDR061C1atChxDut0dfpkgJxzbvXq1a6srMzl5OS4iRMnur1791qPZEbSZbcNGzYkzvnggw/cww8/7AYPHuxuueUW961vfcu98847dkP3ER8PEOv0oe3bt7sxY8Y4j8fjKioq3Lp165KOx+Nx19zc7Hw+n/N4PG7atGmus7PTaFob0WjUzZs3z5WVlbnc3Fz3hS98wf34xz92sVgscQ7rdHX494AAACb63M+AAAA3BwIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACb+D46WVZ6WdS+3AAAAAElFTkSuQmCC", - "text/plain": [ - "
" - ] - }, - "metadata": {} - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/simulation/uniform_linear_motion_view_analytical.ipynb b/static/simulation/uniform_linear_motion_view_analytical.ipynb index 5f58c9ac7..96f38cc78 100644 --- a/static/simulation/uniform_linear_motion_view_analytical.ipynb +++ b/static/simulation/uniform_linear_motion_view_analytical.ipynb @@ -1,50 +1,30 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "!pip install ita" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "Defaulting to user installation because normal site-packages is not writeable\n", - "Requirement already satisfied: ita in /home/w/.local/lib/python3.10/site-packages (0.2.12)\n", - "Requirement already satisfied: numpy in /home/w/.local/lib/python3.10/site-packages (from ita) (1.23.3)\n", - "Requirement already satisfied: matplotlib in /home/w/.local/lib/python3.10/site-packages (from ita) (3.6.0)\n", - "Requirement already satisfied: pyparsing>=2.2.1 in /usr/lib/python3/dist-packages (from matplotlib->ita) (2.4.7)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.4.4)\n", - "Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib->ita) (9.0.1)\n", - "Requirement already satisfied: contourpy>=1.0.1 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (1.0.5)\n", - "Requirement already satisfied: packaging>=20.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (21.3)\n", - "Requirement already satisfied: python-dateutil>=2.7 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (2.8.2)\n", - "Requirement already satisfied: cycler>=0.10 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (0.11.0)\n", - "Requirement already satisfied: fonttools>=4.22.0 in /home/w/.local/lib/python3.10/site-packages (from matplotlib->ita) (4.37.4)\n", - "Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib->ita) (1.16.0)\n" - ] - } - ], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import ita\n", "\n", "%matplotlib inline" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def draw_cell(x, y):\n", " image = ita.array.make2d(100, 100)\n", @@ -67,1529 +47,10 @@ "for i in range(10):\n", " images.append(draw_cell(int(x[i * int(len(x) / 10)]), 50))\n", "ita.plot.animation_show(images)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/html": [ - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
\n", - " \n", - "
\n", - " \n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - "
\n", - "\n", - "\n", - "\n" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "execution_count": 3 - }, - { - "output_type": "display_data", - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaAAAAGgCAYAAADsNrNZAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjYuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy89olMNAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAYNklEQVR4nO3df2xV9f3H8Vd/0NsK7S2U9d523EJnSIqAESmUAtmS0Yw49oPRuZHUrf7ImFqUAop0S1k2hYsscwymMIiDJYJMkjGFZBhSXDO2UqAOJlMKC2Q04r1ott6LIBfS+/n+4debXUHthQvvFp6P5CTec869ffMx3GdOe27JcM45AQBwnWVaDwAAuDkRIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgIlrFqBnn31WI0aMUG5urqqqqrRv375r9aUAAP1QxrX4XXC///3v9f3vf19r165VVVWVVq5cqa1bt6qzs1PFxcWf+tx4PK5Tp04pPz9fGRkZ6R4NAHCNOed05swZlZaWKjPzU65z3DUwceJE19DQkHjc09PjSktLXTAY/MzndnV1OUlsbGxsbP186+rq+tT3+2yl2YULF9TR0aGmpqbEvszMTNXU1Kitre2S82OxmGKxWOKx+/8Lsq6uLhUUFKR7PADANRaNRhUIBJSfn/+p56U9QO+99556enrk8/mS9vt8Ph05cuSS84PBoH76059esr+goIAAAUA/9lk/RjG/C66pqUmRSCSxdXV1WY8EALgO0n4FNHToUGVlZSkcDiftD4fD8vv9l5zv8Xjk8XjSPQYAoI9L+xVQTk6Oxo8fr5aWlsS+eDyulpYWVVdXp/vLAQD6qbRfAUnSggULVF9fr8rKSk2cOFErV67U2bNndd99912LLwcA6IeuSYC++93v6t1339WSJUsUCoV0xx13aOfOnZfcmAAAuHldkw+iXo1oNCqv16tIJMJdcADQD/X2fdz8LjgAwM2JAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmEgpQMFgUBMmTFB+fr6Ki4s1c+ZMdXZ2Jp1z/vx5NTQ0qKioSIMGDVJtba3C4XBahwYA9H8pBai1tVUNDQ3au3evdu3apYsXL+orX/mKzp49mzhn/vz52r59u7Zu3arW1ladOnVKs2bNSvvgAID+LcM55670ye+++66Ki4vV2tqqL37xi4pEIvrc5z6nzZs369vf/rYk6ciRIxo1apTa2to0adKkS14jFospFoslHkejUQUCAUUiERUUFFzpaAAAI9FoVF6v9zPfx6/qZ0CRSESSNGTIEElSR0eHLl68qJqamsQ5FRUVKisrU1tb22VfIxgMyuv1JrZAIHA1IwEA+okrDlA8HldjY6OmTJmiMWPGSJJCoZBycnJUWFiYdK7P51MoFLrs6zQ1NSkSiSS2rq6uKx0JANCPZF/pExsaGnT48GHt2bPnqgbweDzyeDxX9RoAgP7niq6A5s6dqx07dui1117TsGHDEvv9fr8uXLig7u7upPPD4bD8fv9VDQoAuLGkFCDnnObOnatt27Zp9+7dKi8vTzo+fvx4DRgwQC0tLYl9nZ2dOnnypKqrq9MzMQDghpDSt+AaGhq0ef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k9C24+fPna/LkyVq2bJm+853vaN++fVq3bp3WrVsnScrIyFBjY6OeeuopjRw5UuXl5WpublZpaalmzpx5LeYHAPRTKQVowoQJ2rZtm5qamvSzn/1M5eXlWrlyperq6hLnLFq0SGfPntWcOXPU3d2tqVOnaufOncrNzU378ACA/iulzwFdD729fxwA0Dddk88BAQCQLgQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACYIEADABAECAJggQAAAEwQIAGCCAAEATBAgAIAJAgQAMEGAAAAmCBAAwAQBAgCYIEAAABMECABgggABAEwQIACACQIEADBBgAAAJggQAMBESgHq6elRc3OzysvLlZeXp1tvvVVPPvmknHOJc5xzWrJkiUpKSpSXl6eamhodO3Ys7YMDAPq3lAL09NNPa82aNfr1r3+tt956S08//bRWrFih1atXJ85ZsWKFVq1apbVr16q9vV0DBw7U9OnTdf78+bQPDwDovzLc/16+fIavfe1r8vl8ev755xP7amtrlZeXpxdeeEHOOZWWlmrhwoV67LHHJEmRSEQ+n08bN27U7NmzL3nNWCymWCyWeByNRhUIBBSJRFRQUHA1fzYAgIFoNCqv1/uZ7+MpXQFNnjxZLS0tOnr0qCTp0KFD2rNnj+666y5J0okTJxQKhVRTU5N4jtfrVVVVldra2i77msFgUF6vN7EFAoFURgIA9FPZqZy8ePFiRaNRVVRUKCsrSz09PVq6dKnq6uokSaFQSJLk8/mSnufz+RLHPq6pqUkLFixIPP7oCggAcGNLKUAvvfSSNm3apM2bN2v06NE6ePCgGhsbVVpaqvr6+isawOPxyOPxXNFzAQD9V0oBevzxx7V48eLEz3LGjh2rf//73woGg6q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oXDYfn9fqOp+oa5c+dqx44deu211zRs2LDEfr/frwsXLqi7uzvp/JttzTo6OnT69Gndeeedys7OVnZ2tlpbW7Vq1SplZ2fL5/OxTpJKSkp02223Je0bNWqUTp48KUmJtbjZ/w4+/vjjWrx4sWbPnq2xY8fqe9/7nubPn69gMCiJdUqHPhegnJwcjR8/Xi0tLYl98XhcLS0tqq6uNpzMjnNOc+fO1bZt27R7926Vl5cnHR8/frwGDBiQtGadnZ06efLkTbVm06ZN0xtvvKGDBw8mtsrKStXV1SX+m3WSpkyZcslt/EePHtXw4cMlSeXl5fL7/UnrFI1G1d7eflOt07lz5y751zyzsrIUj8clsU5pYX0XxOVs2bLFeTwet3HjRvfmm2+6OXPmuMLCQhcKhaxHM/HQQw85r9fr/vznP7t33nknsZ07dy5xzoMPPujKysrc7t273YEDB1x1dbWrrq42nLpv+N+74JxjnZz78Bb17Oxst3TpUnfs2DG3adMmd8stt7gXXnghcc7y5ctdYWGhe/nll90//vEP981vfvOmu724vr7eff7zn0/chv2HP/zBDR061C1atChxDut0dfpkgJxzbvXq1a6srMzl5OS4iRMnur1791qPZEbSZbcNGzYkzvnggw/cww8/7AYPHuxuueUW961vfcu98847dkP3ER8PEOv0oe3bt7sxY8Y4j8fjKioq3Lp165KOx+Nx19zc7Hw+n/N4PG7atGmus7PTaFob0WjUzZs3z5WVlbnc3Fz3hS98wf34xz92sVgscQ7rdHX494AAACb63M+AAAA3BwIEADBBgAAAJggQAMAEAQIAmCBAAAATBAgAYIIAAQBMECAAgAkCBAAwQYAAACb+D46WVZ6WdS+3AAAAAElFTkSuQmCC", - "text/plain": [ - "
" - ] - }, - "metadata": {} - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From 54cc3a21f740533f91b3cfca1b05cbff1c7be67a Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:48:56 +0900 Subject: [PATCH 15/21] Remove outputs in recursion/ --- static/recursion/fib.ipynb | 54 ++++++++--------- static/recursion/gcd.ipynb | 50 +++++++--------- static/recursion/lcm.ipynb | 58 ++++++++----------- static/recursion/lucas.ipynb | 54 ++++++++--------- .../recurrence_relation_analytical.ipynb | 44 ++++++-------- static/recursion/recurrence_relation_dp.ipynb | 50 +++++++--------- .../recursion/recurrence_relation_rec.ipynb | 50 +++++++--------- static/recursion/sum.ipynb | 50 +++++++--------- static/recursion/tri.ipynb | 58 ++++++++----------- 9 files changed, 198 insertions(+), 270 deletions(-) diff --git a/static/recursion/fib.ipynb b/static/recursion/fib.ipynb index aeb4f996b..473c5ee9f 100644 --- a/static/recursion/fib.ipynb +++ b/static/recursion/fib.ipynb @@ -1,33 +1,25 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def fib(n):\n", - " if n == 0:\n", - " return 0\n", - " elif n == 1:\n", - " return 1\n", - " else:\n", - " return fib(n - 1) + fib(n - 2)\n", - "\n", - "\n", - "print(fib(10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "55\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def fib(n):\n", + " if n == 0:\n", + " return 0\n", + " elif n == 1:\n", + " return 1\n", + " else:\n", + " return fib(n - 1) + fib(n - 2)\n", + "\n", + "\n", + "print(fib(10))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/recursion/gcd.ipynb b/static/recursion/gcd.ipynb index 3f6dbf432..6cea4dc77 100644 --- a/static/recursion/gcd.ipynb +++ b/static/recursion/gcd.ipynb @@ -1,31 +1,23 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def gcd(a, b):\n", - " if b == 0:\n", - " return a\n", - " else:\n", - " return gcd(b, a % b)\n", - "\n", - "\n", - "print(gcd(30, 18))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "6\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def gcd(a, b):\n", + " if b == 0:\n", + " return a\n", + " else:\n", + " return gcd(b, a % b)\n", + "\n", + "\n", + "print(gcd(30, 18))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/recursion/lcm.ipynb b/static/recursion/lcm.ipynb index acf72f8a3..6b906e214 100644 --- a/static/recursion/lcm.ipynb +++ b/static/recursion/lcm.ipynb @@ -1,35 +1,27 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def gcd(a, b):\n", - " if b == 0:\n", - " return a\n", - " else:\n", - " return gcd(b, a % b)\n", - "\n", - "\n", - "def lcm(a, b):\n", - " return a * b / gcd(a, b)\n", - "\n", - "\n", - "print(lcm(30, 18))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "90.0\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def gcd(a, b):\n", + " if b == 0:\n", + " return a\n", + " else:\n", + " return gcd(b, a % b)\n", + "\n", + "\n", + "def lcm(a, b):\n", + " return a * b / gcd(a, b)\n", + "\n", + "\n", + "print(lcm(30, 18))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/recursion/lucas.ipynb b/static/recursion/lucas.ipynb index edcb8ef56..12d3a0111 100644 --- a/static/recursion/lucas.ipynb +++ b/static/recursion/lucas.ipynb @@ -1,33 +1,25 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def lucas(n):\n", - " if n == 0:\n", - " return 2\n", - " elif n == 1:\n", - " return 1\n", - " else:\n", - " return lucas(n - 1) + lucas(n - 2)\n", - "\n", - "\n", - "print(lucas(10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "123\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def lucas(n):\n", + " if n == 0:\n", + " return 2\n", + " elif n == 1:\n", + " return 1\n", + " else:\n", + " return lucas(n - 1) + lucas(n - 2)\n", + "\n", + "\n", + "print(lucas(10))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/recursion/recurrence_relation_analytical.ipynb b/static/recursion/recurrence_relation_analytical.ipynb index e4a785a4b..732cd4ae4 100644 --- a/static/recursion/recurrence_relation_analytical.ipynb +++ b/static/recursion/recurrence_relation_analytical.ipynb @@ -1,28 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def a(n):\n", - " return n\n", - "\n", - "\n", - "print(a(10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "10\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def a(n):\n", + " return n\n", + "\n", + "\n", + "print(a(10))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/recursion/recurrence_relation_dp.ipynb b/static/recursion/recurrence_relation_dp.ipynb index 0d961202a..101406bf2 100644 --- a/static/recursion/recurrence_relation_dp.ipynb +++ b/static/recursion/recurrence_relation_dp.ipynb @@ -1,31 +1,23 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def a(n):\n", - " s = 1\n", - " for i in range(n - 1):\n", - " s += 1\n", - " return s\n", - "\n", - "\n", - "print(a(10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "10\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def a(n):\n", + " s = 1\n", + " for i in range(n - 1):\n", + " s += 1\n", + " return s\n", + "\n", + "\n", + "print(a(10))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/recursion/recurrence_relation_rec.ipynb b/static/recursion/recurrence_relation_rec.ipynb index 931921045..85f280197 100644 --- a/static/recursion/recurrence_relation_rec.ipynb +++ b/static/recursion/recurrence_relation_rec.ipynb @@ -1,31 +1,23 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def a(n):\n", - " if n == 1:\n", - " return 1\n", - " else:\n", - " return a(n - 1) + 1\n", - "\n", - "\n", - "print(a(10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "10\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def a(n):\n", + " if n == 1:\n", + " return 1\n", + " else:\n", + " return a(n - 1) + 1\n", + "\n", + "\n", + "print(a(10))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/recursion/sum.ipynb b/static/recursion/sum.ipynb index 4d08a87cf..a744100e0 100644 --- a/static/recursion/sum.ipynb +++ b/static/recursion/sum.ipynb @@ -1,31 +1,23 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def sum_val(n):\n", - " if n == 1:\n", - " return 1\n", - " else:\n", - " return sum_val(n - 1) + n\n", - "\n", - "\n", - "print(sum_val(10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "55\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def sum_val(n):\n", + " if n == 1:\n", + " return 1\n", + " else:\n", + " return sum_val(n - 1) + n\n", + "\n", + "\n", + "print(sum_val(10))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/recursion/tri.ipynb b/static/recursion/tri.ipynb index 15561e0ea..270fd62c2 100644 --- a/static/recursion/tri.ipynb +++ b/static/recursion/tri.ipynb @@ -1,35 +1,27 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def tri(n):\n", - " if n == 0:\n", - " return 0\n", - " elif n == 1:\n", - " return 0\n", - " elif n == 2:\n", - " return 1\n", - " else:\n", - " return tri(n - 1) + tri(n - 2) + tri(n - 3)\n", - "\n", - "\n", - "print(tri(10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "81\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def tri(n):\n", + " if n == 0:\n", + " return 0\n", + " elif n == 1:\n", + " return 0\n", + " elif n == 2:\n", + " return 1\n", + " else:\n", + " return tri(n - 1) + tri(n - 2) + tri(n - 3)\n", + "\n", + "\n", + "print(tri(10))" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From d3fa2b18de707ddcee02eaa8354d9a75e4cc82b0 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:49:12 +0900 Subject: [PATCH 16/21] Remove outputs in monte-carlo/ --- static/monte-carlo/calc_pi.ipynb | 32 +++++++----------- static/monte-carlo/coin_toss.ipynb | 32 +++++++----------- static/monte-carlo/dice.ipynb | 32 +++++++----------- static/monte-carlo/randint.ipynb | 32 +++++++----------- static/monte-carlo/random.ipynb | 54 +++++++++++++----------------- static/monte-carlo/randrange.ipynb | 32 +++++++----------- static/monte-carlo/uniform.ipynb | 32 +++++++----------- 7 files changed, 95 insertions(+), 151 deletions(-) diff --git a/static/monte-carlo/calc_pi.ipynb b/static/monte-carlo/calc_pi.ipynb index acb4c7434..0251b8079 100644 --- a/static/monte-carlo/calc_pi.ipynb +++ b/static/monte-carlo/calc_pi.ipynb @@ -1,19 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import random" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def calc_pi(n):\n", " s = 0\n", @@ -26,18 +26,10 @@ "\n", "\n", "print(calc_pi(1000000))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "3.140648\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/monte-carlo/coin_toss.ipynb b/static/monte-carlo/coin_toss.ipynb index 211f56f8d..c73480d64 100644 --- a/static/monte-carlo/coin_toss.ipynb +++ b/static/monte-carlo/coin_toss.ipynb @@ -1,19 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import random" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def calc_coin_p(n):\n", " head = 0\n", @@ -24,18 +24,10 @@ "\n", "\n", "print(calc_coin_p(100000))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "0.50153\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/monte-carlo/dice.ipynb b/static/monte-carlo/dice.ipynb index 7d47edb18..c38595eb7 100644 --- a/static/monte-carlo/dice.ipynb +++ b/static/monte-carlo/dice.ipynb @@ -1,19 +1,19 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import random" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def calc_dice_p(n):\n", " one = 0\n", @@ -24,18 +24,10 @@ "\n", "\n", "print(calc_dice_p(100000))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "0.1681\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/monte-carlo/randint.ipynb b/static/monte-carlo/randint.ipynb index 67b50182a..1bfdb0d38 100644 --- a/static/monte-carlo/randint.ipynb +++ b/static/monte-carlo/randint.ipynb @@ -1,33 +1,25 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import random" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "print(random.randint(2, 4))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "4\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/monte-carlo/random.ipynb b/static/monte-carlo/random.ipynb index 73fed4d30..759019c73 100644 --- a/static/monte-carlo/random.ipynb +++ b/static/monte-carlo/random.ipynb @@ -1,33 +1,25 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "import random" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "source": [ - "print(random.random())" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "0.701225927526422\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import random" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(random.random())" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/monte-carlo/randrange.ipynb b/static/monte-carlo/randrange.ipynb index 28f9347ff..7fd38904e 100644 --- a/static/monte-carlo/randrange.ipynb +++ b/static/monte-carlo/randrange.ipynb @@ -1,33 +1,25 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import random" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "print(random.randrange(2, 4, 1))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "3\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/monte-carlo/uniform.ipynb b/static/monte-carlo/uniform.ipynb index 28d653f5d..e3791f67f 100644 --- a/static/monte-carlo/uniform.ipynb +++ b/static/monte-carlo/uniform.ipynb @@ -1,33 +1,25 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import random" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "print(random.uniform(2, 4))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "3.8650468552312107\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From f9fd5c173de1d6fd55ee9e9771feb5ffa75e65ba Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:49:27 +0900 Subject: [PATCH 17/21] Remove outputs in search/ --- static/search/binary_left_practice.ipynb | 24 +++------ static/search/binary_right_practice.ipynb | 24 +++------ static/search/binary_search.ipynb | 62 ++++++++++------------- static/search/bisect_left.ipynb | 32 +++++------- static/search/bisect_right.ipynb | 32 +++++------- static/search/linear_practice.ipynb | 24 +++------ static/search/linear_search.ipynb | 24 +++------ 7 files changed, 83 insertions(+), 139 deletions(-) diff --git a/static/search/binary_left_practice.ipynb b/static/search/binary_left_practice.ipynb index 53f5685a9..8a5bb89b1 100644 --- a/static/search/binary_left_practice.ipynb +++ b/static/search/binary_left_practice.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def binary_search(data, number):\n", " start, end = -1, len(data)\n", @@ -19,18 +19,10 @@ "\n", "data = [1, 2, 3, 4, 5, 5, 7, 8, 10]\n", "print(binary_search(data, 5))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "4\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/search/binary_right_practice.ipynb b/static/search/binary_right_practice.ipynb index 4c4ae9c35..88d2fabab 100644 --- a/static/search/binary_right_practice.ipynb +++ b/static/search/binary_right_practice.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def binary_search(data, number):\n", " start, end = -1, len(data)\n", @@ -19,18 +19,10 @@ "\n", "data = [1, 2, 3, 4, 5, 5, 7, 8, 10]\n", "print(binary_search(data, 5))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "5\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/search/binary_search.ipynb b/static/search/binary_search.ipynb index abd16cec6..89c3266b4 100644 --- a/static/search/binary_search.ipynb +++ b/static/search/binary_search.ipynb @@ -1,37 +1,29 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, - "cells": [ - { - "metadata": {}, - "source": [ - "def binary_search(data, number):\n", - " start, end = -1, len(data)\n", - " while end - start > 1:\n", - " center = (start + end) // 2\n", - " if data[center] < number:\n", - " start = center\n", - " else:\n", - " end = center\n", - " return end\n", - "\n", - "\n", - "data = [2, 10, 23, 37, 51, 57, 66, 88, 95]\n", - "\n", - "print(binary_search(data, 51) + 1)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "5\n" - ] - } - ], - "execution_count": null - } - ] + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "def binary_search(data, number):\n", + " start, end = -1, len(data)\n", + " while end - start > 1:\n", + " center = (start + end) // 2\n", + " if data[center] < number:\n", + " start = center\n", + " else:\n", + " end = center\n", + " return end\n", + "\n", + "\n", + "data = [2, 10, 23, 37, 51, 57, 66, 88, 95]\n", + "\n", + "print(binary_search(data, 51) + 1)" + ] + } + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/search/bisect_left.ipynb b/static/search/bisect_left.ipynb index 2f13fa50a..58af31234 100644 --- a/static/search/bisect_left.ipynb +++ b/static/search/bisect_left.ipynb @@ -1,35 +1,27 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import bisect" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "data = [1, 3, 3, 3, 4, 6, 8, 10, 10]\n", "\n", "print(bisect.bisect_left(data, 3))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "1\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/search/bisect_right.ipynb b/static/search/bisect_right.ipynb index 968ef72b0..c757baca9 100644 --- a/static/search/bisect_right.ipynb +++ b/static/search/bisect_right.ipynb @@ -1,35 +1,27 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import bisect" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "data = [1, 3, 3, 3, 4, 6, 8, 10, 10]\n", "\n", "print(bisect.bisect_right(data, 3))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "4\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/search/linear_practice.ipynb b/static/search/linear_practice.ipynb index 833523a2b..bfd83a7d7 100644 --- a/static/search/linear_practice.ipynb +++ b/static/search/linear_practice.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def linear_search(data, number):\n", " for i in range(len(data)):\n", @@ -14,18 +14,10 @@ "\n", "data = [1, 2, 3, 4, 5, 5, 7, 8, 10]\n", "print(linear_search(data, 5))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "4\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/search/linear_search.ipynb b/static/search/linear_search.ipynb index 878825c3d..3e5993d76 100644 --- a/static/search/linear_search.ipynb +++ b/static/search/linear_search.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def linear_search(data, name):\n", " for i in range(len(data)):\n", @@ -36,18 +36,10 @@ "]\n", "\n", "print(linear_search(students, \"佐藤\") + 1)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "8\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From 9a39686d4b5c8e293006710e3c5ac70df7abee65 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:49:40 +0900 Subject: [PATCH 18/21] Remove outputs in sort/ --- static/sort/bubble_sort.ipynb | 24 ++++++++---------------- static/sort/bubble_sort_reverse.ipynb | 24 ++++++++---------------- static/sort/merge_sort.ipynb | 24 ++++++++---------------- static/sort/merge_sort_reverse.ipynb | 24 ++++++++---------------- static/sort/sort.ipynb | 24 ++++++++---------------- static/sort/sorted.ipynb | 24 ++++++++---------------- 6 files changed, 48 insertions(+), 96 deletions(-) diff --git a/static/sort/bubble_sort.ipynb b/static/sort/bubble_sort.ipynb index 6b18e5771..e06673bcf 100644 --- a/static/sort/bubble_sort.ipynb +++ b/static/sort/bubble_sort.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def bubble_sort(data):\n", " n = len(data)\n", @@ -17,18 +17,10 @@ "\n", "data = [3, 8, 2, 5, 1, 10, 6, 9, 4, 7]\n", "print(bubble_sort(data))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/sort/bubble_sort_reverse.ipynb b/static/sort/bubble_sort_reverse.ipynb index 13aeb67b3..289428056 100644 --- a/static/sort/bubble_sort_reverse.ipynb +++ b/static/sort/bubble_sort_reverse.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def bubble_sort(data):\n", " n = len(data)\n", @@ -17,18 +17,10 @@ "\n", "data = [3, 8, 2, 5, 1, 10, 6, 9, 4, 7]\n", "print(bubble_sort(data))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/sort/merge_sort.ipynb b/static/sort/merge_sort.ipynb index a37fd12e3..ab6235d64 100644 --- a/static/sort/merge_sort.ipynb +++ b/static/sort/merge_sort.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def merge(left, right):\n", " if len(left) == 0 or len(right) == 0:\n", @@ -26,18 +26,10 @@ "\n", "data = [3, 8, 2, 5, 1, 10, 6, 9, 4, 7]\n", "print(merge_sort(data))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/sort/merge_sort_reverse.ipynb b/static/sort/merge_sort_reverse.ipynb index 9073f330a..63f0f9314 100644 --- a/static/sort/merge_sort_reverse.ipynb +++ b/static/sort/merge_sort_reverse.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def merge(left, right):\n", " if len(left) == 0 or len(right) == 0:\n", @@ -26,18 +26,10 @@ "\n", "data = [3, 8, 2, 5, 1, 10, 6, 9, 4, 7]\n", "print(merge_sort(data))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/sort/sort.ipynb b/static/sort/sort.ipynb index 3e26db5f0..5380c0db4 100644 --- a/static/sort/sort.ipynb +++ b/static/sort/sort.ipynb @@ -1,26 +1,18 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "data = [3, 8, 2, 5, 1, 10, 6, 9, 4, 7]\n", "data.sort()\n", "print(data)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/sort/sorted.ipynb b/static/sort/sorted.ipynb index c50c9e4c1..8478e7fff 100644 --- a/static/sort/sorted.ipynb +++ b/static/sort/sorted.ipynb @@ -1,25 +1,17 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "data = [3, 8, 2, 5, 1, 10, 6, 9, 4, 7]\n", "print(sorted(data))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From 8f8775969b7b381d1ec7819941736bd89cbd243f Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:50:00 +0900 Subject: [PATCH 19/21] Remove outputs in error/ --- static/error/cancellation.ipynb | 35 +++++++++---------------- static/error/cancellation_correct.ipynb | 32 +++++++++------------- static/error/loss.ipynb | 24 ++++++----------- static/error/loss_correct.ipynb | 24 ++++++----------- static/error/rounding_error.ipynb | 27 ++++++------------- 5 files changed, 48 insertions(+), 94 deletions(-) diff --git a/static/error/cancellation.ipynb b/static/error/cancellation.ipynb index e04578133..a44153a88 100644 --- a/static/error/cancellation.ipynb +++ b/static/error/cancellation.ipynb @@ -1,36 +1,25 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import math" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "math.sqrt(100001) - math.sqrt(99999)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "0.003162277660237578" - ] - }, - "metadata": {}, - "execution_count": 13 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/error/cancellation_correct.ipynb b/static/error/cancellation_correct.ipynb index fd44867d9..8a6ba655a 100644 --- a/static/error/cancellation_correct.ipynb +++ b/static/error/cancellation_correct.ipynb @@ -1,33 +1,25 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "import math" - ], - "cell_type": "code", - "outputs": [], - "execution_count": null + ] }, { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "print(2 / (math.sqrt(100001) + math.sqrt(99999)))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "0.0031622776602079072\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/error/loss.ipynb b/static/error/loss.ipynb index 5b1d658e6..55e358eb3 100644 --- a/static/error/loss.ipynb +++ b/static/error/loss.ipynb @@ -1,28 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "r = 0\n", "r += 10000000000\n", "for i in range(10000000):\n", " r += 0.0000001\n", "print(r)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "10000000000.0\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/error/loss_correct.ipynb b/static/error/loss_correct.ipynb index ebbb44e91..19a9616d4 100644 --- a/static/error/loss_correct.ipynb +++ b/static/error/loss_correct.ipynb @@ -1,28 +1,20 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "r = 0\n", "for i in range(10000000):\n", " r += 0.0000001\n", "r += 10000000000\n", "print(r)" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "10000000001.0\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/error/rounding_error.ipynb b/static/error/rounding_error.ipynb index 8ee51ce49..9d36fa024 100644 --- a/static/error/rounding_error.ipynb +++ b/static/error/rounding_error.ipynb @@ -1,27 +1,16 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "0.1 * 3" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "0.30000000000000004" - ] - }, - "metadata": {}, - "execution_count": 9 - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From 99e77f2a85889fbabc3996d769444b028f875823 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:50:14 +0900 Subject: [PATCH 20/21] Remove outputs in gaussian-elimination/ --- .../gauss_jordan_elimination.ipynb | 24 +++++---------- .../gaussian_elimination.ipynb | 24 +++++---------- .../gaussian_elimination_error.ipynb | 29 +++++-------------- .../gaussian_elimination_revised.ipynb | 24 +++++---------- 4 files changed, 32 insertions(+), 69 deletions(-) diff --git a/static/gaussian-elimination/gauss_jordan_elimination.ipynb b/static/gaussian-elimination/gauss_jordan_elimination.ipynb index 020f5c594..48db5058e 100644 --- a/static/gaussian-elimination/gauss_jordan_elimination.ipynb +++ b/static/gaussian-elimination/gauss_jordan_elimination.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def gauss_jordan_elimination(a):\n", " # 前進消去\n", @@ -32,18 +32,10 @@ "\n", "\n", "print(gauss_jordan_elimination([[0, -2, 3, 2], [-1, 3, -2, 1], [1, -1, 6, 11]]))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[1.0, 2.0, 2.0]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/gaussian-elimination/gaussian_elimination.ipynb b/static/gaussian-elimination/gaussian_elimination.ipynb index 91e5447a9..ec954ac8e 100644 --- a/static/gaussian-elimination/gaussian_elimination.ipynb +++ b/static/gaussian-elimination/gaussian_elimination.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def gaussian_elimination(a):\n", " # 前進消去\n", @@ -30,18 +30,10 @@ "\n", "\n", "print(gaussian_elimination([[1, -2, 3, 3], [-1, 3, -2, 1], [1, -1, 6, 11]]))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[1.0, 2.0, 2.0]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/gaussian-elimination/gaussian_elimination_error.ipynb b/static/gaussian-elimination/gaussian_elimination_error.ipynb index f60180463..07f199027 100644 --- a/static/gaussian-elimination/gaussian_elimination_error.ipynb +++ b/static/gaussian-elimination/gaussian_elimination_error.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def gaussian_elimination(a):\n", " # 前進消去\n", @@ -30,23 +30,10 @@ "\n", "\n", "print(gaussian_elimination([[0, -2, 3, 2], [-1, 3, -2, 1], [1, -1, 6, 11]]))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "error", - "ename": "ZeroDivisionError", - "evalue": "division by zero", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mZeroDivisionError\u001b[0m Traceback (most recent call last)", - "Cell \u001b[0;32mIn [1], line 24\u001b[0m\n\u001b[1;32m 20\u001b[0m a[j][\u001b[39mlen\u001b[39m(a[i]) \u001b[39m-\u001b[39m \u001b[39m1\u001b[39m] \u001b[39m-\u001b[39m\u001b[39m=\u001b[39m a[j][i] \u001b[39m*\u001b[39m x[i]\n\u001b[1;32m 21\u001b[0m \u001b[39mreturn\u001b[39;00m x\n\u001b[0;32m---> 24\u001b[0m \u001b[39mprint\u001b[39m(gaussian_elimination([[\u001b[39m0\u001b[39m, \u001b[39m-\u001b[39m\u001b[39m2\u001b[39m, \u001b[39m3\u001b[39m, \u001b[39m2\u001b[39m], [\u001b[39m-\u001b[39m\u001b[39m1\u001b[39m, \u001b[39m3\u001b[39m, \u001b[39m-\u001b[39m\u001b[39m2\u001b[39m, \u001b[39m1\u001b[39m], [\u001b[39m1\u001b[39m, \u001b[39m-\u001b[39m\u001b[39m1\u001b[39m, \u001b[39m6\u001b[39m, \u001b[39m11\u001b[39m]]))\n", - "Cell \u001b[0;32mIn [1], line 7\u001b[0m, in \u001b[0;36mgaussian_elimination\u001b[0;34m(a)\u001b[0m\n\u001b[1;32m 5\u001b[0m pivot \u001b[39m=\u001b[39m a[i][i]\n\u001b[1;32m 6\u001b[0m \u001b[39mfor\u001b[39;00m j \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(i, \u001b[39mlen\u001b[39m(a[i])):\n\u001b[0;32m----> 7\u001b[0m a[i][j] \u001b[39m/\u001b[39m\u001b[39m=\u001b[39m pivot\n\u001b[1;32m 9\u001b[0m \u001b[39m# i + 1行目以降を掃き出す\u001b[39;00m\n\u001b[1;32m 10\u001b[0m \u001b[39mfor\u001b[39;00m j \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(i \u001b[39m+\u001b[39m \u001b[39m1\u001b[39m, \u001b[39mlen\u001b[39m(a)):\n", - "\u001b[0;31mZeroDivisionError\u001b[0m: division by zero" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/gaussian-elimination/gaussian_elimination_revised.ipynb b/static/gaussian-elimination/gaussian_elimination_revised.ipynb index fdce68b08..ee29b9b8f 100644 --- a/static/gaussian-elimination/gaussian_elimination_revised.ipynb +++ b/static/gaussian-elimination/gaussian_elimination_revised.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def gaussian_elimination_revised(a):\n", " # 前進消去\n", @@ -37,18 +37,10 @@ "\n", "\n", "print(gaussian_elimination_revised([[0, -2, 3, 2], [-1, 3, -2, 1], [1, -1, 6, 11]]))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "[1.0, 2.0, 2.0]\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } From f19bbba36d7d962a967ca34876bdc2155ff29068 Mon Sep 17 00:00:00 2001 From: chvmvd Date: Fri, 3 Feb 2023 17:50:27 +0900 Subject: [PATCH 21/21] Remove outputs in dp/ --- static/dp/fib_bottom_up.ipynb | 24 ++++++++---------------- static/dp/fib_memoization.ipynb | 24 ++++++++---------------- static/dp/knapsack.ipynb | 24 ++++++++---------------- static/dp/ssp.ipynb | 24 ++++++++---------------- 4 files changed, 32 insertions(+), 64 deletions(-) diff --git a/static/dp/fib_bottom_up.ipynb b/static/dp/fib_bottom_up.ipynb index 2e9103996..0c6edd8bd 100644 --- a/static/dp/fib_bottom_up.ipynb +++ b/static/dp/fib_bottom_up.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def fib(n):\n", " a, b = 0, 1\n", @@ -18,18 +18,10 @@ "\n", "\n", "print(fib(100))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "354224848179261915075\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/dp/fib_memoization.ipynb b/static/dp/fib_memoization.ipynb index 222010e9e..96413d321 100644 --- a/static/dp/fib_memoization.ipynb +++ b/static/dp/fib_memoization.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "memo = [-1 for _ in range(10000)]\n", "\n", @@ -22,18 +22,10 @@ "\n", "\n", "print(fib(100))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "354224848179261915075\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/dp/knapsack.ipynb b/static/dp/knapsack.ipynb index 5d66f4d14..63b71a169 100644 --- a/static/dp/knapsack.ipynb +++ b/static/dp/knapsack.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def knapsack(v, w, W):\n", " # 初期化\n", @@ -20,18 +20,10 @@ "\n", "\n", "print(knapsack([2, 3, 6], [2, 3, 5], 10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "11\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/static/dp/ssp.ipynb b/static/dp/ssp.ipynb index df0f26312..7534c6a8c 100644 --- a/static/dp/ssp.ipynb +++ b/static/dp/ssp.ipynb @@ -1,10 +1,10 @@ { - "nbformat": 4, - "nbformat_minor": 2, - "metadata": {}, "cells": [ { + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "def ssp(a, N):\n", " # 初期化\n", @@ -22,18 +22,10 @@ "\n", "\n", "print(ssp([3, 4, 6], 10))" - ], - "cell_type": "code", - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "True\n" - ] - } - ], - "execution_count": null + ] } - ] + ], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 2 }