<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>補講 on プログラミング演習B</title><link>https://ksubpb.github.io/2026/categories/%E8%A3%9C%E8%AC%9B/</link><description>Recent content in 補講 on プログラミング演習B</description><generator>Hugo -- gohugo.io</generator><language>ja</language><copyright>© 2026</copyright><lastBuildDate>Wed, 30 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ksubpb.github.io/2026/categories/%E8%A3%9C%E8%AC%9B/index.xml" rel="self" type="application/rss+xml"/><item><title>HTTP</title><link>https://ksubpb.github.io/2026/supplemental/webapp/http/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/webapp/http/</guid><description>Webアプリケーションの作成のためには、Web上でデータをやり取りするための決まり事（プロトコル）であるHTTPを理解する必要があります。ここではごく簡単に HTTP について説明します。</description></item><item><title>Flask</title><link>https://ksubpb.github.io/2026/supplemental/webapp/flask/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/webapp/flask/</guid><description>Flask は 小規模な Web アプリケーションを作るのに適している Python で人気のある Web フレームワークです。ここでは、Flask を用いて REST API を提供する Web アプリケーションを作成します。</description></item><item><title>Docker</title><link>https://ksubpb.github.io/2026/supplemental/webapp/docker/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/webapp/docker/</guid><description>ここでは、コンテナ仮想化を提供するソフトウェアであるDockerを利用してみます。</description></item><item><title>Python スクリプトファイル</title><link>https://ksubpb.github.io/2026/supplemental/advanced/script/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/advanced/script/</guid><description>&lt;h3 class="relative group"&gt;&lt;code&gt;if __name__ == '__main__':&lt;/code&gt;&#10; &lt;div id="if-__name__--__main__" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#if-__name__--__main__" aria-label="アンカー"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h3&gt;&#10;&lt;p&gt;Pythonのスクリプトファイルの中に、このような文があることがあります。&#10;例えば、次のような Python スクリプトが &lt;code&gt;argv_printer2.py&lt;/code&gt; という名前で保存されているとします。&lt;/p&gt;</description></item><item><title>補講01講 応用 Python プログラム</title><link>https://ksubpb.github.io/2026/supplemental/advanced/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/advanced/</guid><description>&lt;p&gt;ここではプログラミング演習B で学ぶには高度な内容や、&#10;本筋から少し外れた内容を扱います。&#10;必要なときに見返してみると良いかと思います。&lt;/p&gt;</description></item><item><title>補講02講 Webアプリケーション（Docker）</title><link>https://ksubpb.github.io/2026/supplemental/webapp/</link><pubDate>Wed, 30 Sep 2026 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/webapp/</guid><description>&lt;p&gt;この講義では、Docker というコンテナ仮想化技術を用いて、Web アプリケーションを開発する方法を学びます。&#10;Python で Web アプリケーションを作成するには、&lt;a href="https://msiz07-flask-docs-ja.readthedocs.io/ja/latest/" target="_blank" rel="noreferrer"&gt;Flask（フラスク/フラスコ）&lt;/a&gt; もしくは &lt;a href="https://www.djangoproject.com/" target="_blank" rel="noreferrer"&gt;Django（ジャンゴ）&lt;/a&gt; という Web フレームワークを利用するのが一般的です。&#10;&lt;a href="https://survey.stackoverflow.co/2024/technology/#1-web-frameworks-and-technologies" target="_blank" rel="noreferrer"&gt;Stackoverflowの調査&lt;/a&gt;では、Python の Web フレームワークでは、Flask が一番人気、次いで Django が人気のようです。&#10;ここでは、Flask を Docker コンテナ上で動作させ、自作のプログラムを Web アプリケーションとして公開する方法を学びます。&lt;/p&gt;</description></item><item><title>Flask+Docker</title><link>https://ksubpb.github.io/2026/supplemental/webapp/flask_docker/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/webapp/flask_docker/</guid><description>これまでの内容をまとめて、Flask を Docker コンテナ上で動かしてみます。</description></item><item><title>テキストファイルフォーマット</title><link>https://ksubpb.github.io/2026/supplemental/advanced/format/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/advanced/format/</guid><description>&lt;h2 class="relative group"&gt;ファイルフォーマット&#10; &lt;div id="ファイルフォーマット" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%83%95%e3%82%a9%e3%83%bc%e3%83%9e%e3%83%83%e3%83%88" aria-label="アンカー"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;プログラムを書いていると、テキスト形式の様々なフォーマットに出会います。&#10;その中でも、よく使われるファイルフォーマットを紹介します。&lt;/p&gt;</description></item><item><title>デコレータ</title><link>https://ksubpb.github.io/2026/supplemental/advanced/decorator/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/advanced/decorator/</guid><description>&lt;h2 class="relative group"&gt;デコレータ&#10; &lt;div id="デコレータ" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e3%83%87%e3%82%b3%e3%83%ac%e3%83%bc%e3%82%bf" aria-label="アンカー"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;span class="flex" style="cursor: pointer;"&gt;&#10; &lt;span class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"&gt;&#10; 教科書 p.193（Lesson 7.5）&#10; &lt;/span&gt;&#10;&lt;/span&gt;&#10;&#10;&#10;&lt;p&gt;Python のデコレータとは、関数やメソッドを修飾するための機能です。&#10;デコレータは、関数を受け取り、関数を返すような関数です。&lt;/p&gt;</description></item><item><title>応用 郵便番号検索 REST API</title><link>https://ksubpb.github.io/2026/supplemental/webapp/zipcode_flask_rest/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/webapp/zipcode_flask_rest/</guid><description>これまでの内容の応用として、郵便番号を検索するサンプル REST アプリケーションを紹介します。</description></item><item><title>正規表現</title><link>https://ksubpb.github.io/2026/supplemental/advanced/regular_expression/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/advanced/regular_expression/</guid><description>&lt;h2 class="relative group"&gt;正規表現とは&#10; &lt;div id="正規表現とは" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%a8%e3%81%af" aria-label="アンカー"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;正規表現（regular expression; regex）は、&lt;strong&gt;文字列のパターンを表すための小さな言語&lt;/strong&gt; です。&#10;「数字が 3 つ、ハイフン、数字が 4 つ」のようなパターンを 1 つの文字列で書き、それが別の文字列に含まれているかを調べたり、含まれている部分を取り出したり、置き換えたりできます。&lt;/p&gt;</description></item><item><title>補講</title><link>https://ksubpb.github.io/2026/supplemental/</link><pubDate>Wed, 30 Sep 2026 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/</guid><description>&lt;p&gt;以下の内容は高度で授業で扱うことが難しいため、補講として提供します。&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://ksubpb.github.io/2026/supplemental/advanced/" &gt;補講01講 応用Pythonプログラム&lt;/a&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://ksubpb.github.io/2026/supplemental/advanced/script/" &gt;Pythonスクリプトファイル&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://ksubpb.github.io/2026/supplemental/advanced/format/" &gt;テキストファイルフォーマット&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://ksubpb.github.io/2026/supplemental/advanced/decorator/" &gt;デコレータ&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://ksubpb.github.io/2026/supplemental/advanced/regular_expression/" &gt;正規表現&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://ksubpb.github.io/2026/supplemental/webapp/" &gt;補講02講 Webアプリケーション（Docker）&lt;/a&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://ksubpb.github.io/2026/supplemental/webapp/http/" &gt;HTTP&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://ksubpb.github.io/2026/supplemental/webapp/flask/" &gt;Flask&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://ksubpb.github.io/2026/supplemental/webapp/docker/" &gt;Docker&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://ksubpb.github.io/2026/supplemental/webapp/flask_docker/" &gt;Flask+Docker&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://ksubpb.github.io/2026/supplemental/webapp/zipcode_flask_rest/" &gt;応用 郵便番号検索 REST API&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>補講02講 週次課題</title><link>https://ksubpb.github.io/2026/supplemental/webapp/assignments/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/webapp/assignments/</guid><description>&lt;h2 class="relative group"&gt;補講02-1 平方根 REST API&#10; &lt;div id="補講02-1-平方根-rest-api" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e8%a3%9c%e8%ac%9b02-1-%e5%b9%b3%e6%96%b9%e6%a0%b9-rest-api" aria-label="アンカー"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;div class="flex mt-2"&gt;&#10; &lt;span&#10; class="rounded-full bg-primary-500 dark:bg-primary-400 text-neutral-50 dark:text-neutral-800 px-1.5 py-[1px] text-xs font-normal"&gt;&#10; &lt;span class="flex flex-row items-center"&gt;&lt;span class="mr-1"&gt;&lt;span class="relative block icon"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"&gt;&lt;path fill="currentColor" d="M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"/&gt;&lt;/svg&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;難易度 ⭐&lt;/span&gt;&#10; &lt;/span&gt;&#10; &lt;/span&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;パスパラメータで数値を受け取り、その平方根を返す REST API を作成してください。&#10;&lt;code&gt;/sqrt/&amp;lt;num&amp;gt;&lt;/code&gt; で &lt;code&gt;num&lt;/code&gt; の平方根（&lt;code&gt;math.sqrt&lt;/code&gt;で求められます）を返します。&#10;&lt;code&gt;num&lt;/code&gt; は &lt;code&gt;float&lt;/code&gt; 型で受け取ってください。&#10;もし、&lt;code&gt;num&lt;/code&gt;が負の数の場合は、&lt;code&gt;400&lt;/code&gt; のステータスコードを返してください。&lt;/p&gt;</description></item><item><title>まとめ</title><link>https://ksubpb.github.io/2026/supplemental/webapp/summary/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ksubpb.github.io/2026/supplemental/webapp/summary/</guid><description>HTTP, Flask, Docker, Flask+Docker, 応用 郵便番号検索 REST API</description></item></channel></rss>