2023,江端さんの技術メモ

1 目的

すぐに環境やらコード(の場所)やらを忘れるので、自分の為にメモを残す

2 簡単なfastapiの環境とコード

私の環境では、c:\users\ebata\fastapi1,2,3,4,5あたりにある。

2.1. 最新のPIPをアップグレードする

> pip install --upgrade pip
> python -m pip install --upgrade pip
> python3 -m pip install --upgrade pip

のいずれかでできる。

2.2. uvicorn, fastapi, pydantic, pandas, requests, jsonのモジュールをインストールする

> pip3 install fastapi
> pip3 install uvicorn[standard]

は必須だが、後はプログラムを動かせば、プログラムの方から、インストールを指示されると思うので大丈夫(だろう)。

2.3. uvicornを起動する

> uvicorn index:app --reload

これで、自動的に"index.py"が動き出す。

2.4. クライアントを起動する

> python request.py

で、起動を確認する。

以上

3. ソースコード

3.1. index.py

# https://miseruit.com/2022/07/18/post-2939/

from fastapi import FastAPI
from pydantic import BaseModel
import pandas

class Item(BaseModel):
    ID: str
    Name: str
    Class: str

app = FastAPI() #インスタンスを作成

User_list =[
    {"ID":"M001","Name":"Takashi","Class":"A"},
    {"ID":"M002","Name":"Hanako","Class":"A"},
    {"ID":"M003","Name":"Hiroshi","Class":"B"},
    {"ID":"M004","Name":"Kyoko","Class":"B"},
    ]

# joson_normalize関数を用いてJsonデータをDataFrame型に変換します。
df = pandas.json_normalize(User_list)

# Get /Users/ : 全件取得
# Get /Users/{ID} :特定のIDのみ取得
# POST /Users/ :ユーザの登録
# DELETE /Users/{ID} :ユーザの削除

# curl http://localhost:8000/Users/
@app.get("/Users/")
async def users():
    return User_list

# curl http://localhost:8000/Users/M003
@app.get("/Users/{u_id}")
async def users(u_id:str):
    return list(filter(lambda item : item['ID']==u_id, User_list))

# Windowsの場合 
# {"ID":"M005","Name":"Aya","Class":"C"}]を追加する
# curl -X POST -H "accept: application/json" -H "Content-Type: application/json" -d "{\"ID\":\"M005\", \"Name\":\"Aya\", \"Class\":\"C\"}" http://localhost:8000/Users/

@app.post("/Users/")
async def users(user: Item):
    User_list.append({"ID": user.ID,"Name":user.Name,"Class":user.Class})
    return User_list

# curl -X DELETE -H "accept: application/json" http://localhost:8000/Users/M003
@app.delete("/Users/{u_id}")
async def users(u_id:str):
    global df
    df = df.drop(df.index[df["ID"]==u_id])
    return df.to_json(orient='records')

3.2. request.py

import requests
import json

# テスト
#url = 'https://wp.kobore.net/'
#response = requests.get(url)
#print(response.text)

#print()

print("-----start of get(1)")

# curl http://localhost:8000/Users/ と同じ機能を実施
r = requests.get('http://localhost:8000/Users/')

print(r.url)
print(r.status_code)
print(r.text)
print(r.json())

print("-----end of get(1)")

print()

# curl http://localhost:8000/Users/M003 と同じ機能を実施

print("-----start of get(2)")

r = requests.get('http://localhost:8000/Users/M003')

print(r.url)

print(r.status_code)
print(r.text)
print(r.json())
print("-----end of get(2)")

print()
print("-----start of delete")
# curl -X DELETE -H "accept: application/json" http://localhost:8000/Users/M003と同じ機能を実施
r = requests.delete('http://localhost:8000/Users/M003')

print(r.url)

print(r.status_code)
print(r.text)
print(r.json())

print("-----end of delete")
print()

# curl -X POST -H "accept: application/json" -H "Content-Type: application/json" -d "{\"ID\":\"M005\", \"Name\":\"Aya\", \"Class\":\"C\"}" http://localhost:8000/Users/ と同じ機能を実現
# {"ID":"M005","Name":"Aya","Class":"C"}]を追加する

headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
json_payload = '{"ID":"M005","Name":"Aya","Class":"C"}'  # ここで100回くらいのパターンを試したぞ

print("headers:",headers)
print("payload:",json_payload)

#r = requests.post('http://localhost:8000/Users/',headers=headers, params=payload)
#r = requests.post('http://localhost:8000/Users/', headers=headers,params=json.loads(payload))
r = requests.post('http://localhost:8000/Users/', headers=headers, data=json_payload)

print(r.url)

print(r.status_code)
print(r.text)
print(r.json())

2023,江端さんの技術メモ

結論から先に言うと

json_payload ='{"ID":"M005","Name":"Aya","Class":"C"}'
'"が付いているかどうか、だったというオチでした。

pythonでFastAPIを試す

のように、pythonでFastAPIを使って、外部と内部のインターフェースのテンプレートを作るというのが、目下の課題でした。
多くのサンプルプログラムがあったのですが、私はhttpのGET/POSTができれば十分だったので、他のことは忘れて、そのポイントのみに絞って、ネットを探し回りました。
まずは、FastAPIを受ける側(サーバと言えるのかな)のプログラムは、

Python | FastAPIでAPI作成 ~その6:DELETEでデータ削除 & Pandas活用

を参考(というかコピペ)させて頂きました。

以下のコードを、私の場合はC:\Users\ebata\fastapi4に、index.pyという名前で置きました。
# https://miseruit.com/2022/07/18/post-2939/

from fastapi import FastAPI
from pydantic import BaseModel
import pandas

class Item(BaseModel):
    ID: str
    Name: str
    Class: str

app = FastAPI() #インスタンスを作成

User_list =[
    {"ID":"M001","Name":"Takashi","Class":"A"},
    {"ID":"M002","Name":"Hanako","Class":"A"},
    {"ID":"M003","Name":"Hiroshi","Class":"B"},
    {"ID":"M004","Name":"Kyoko","Class":"B"},
    ]

# joson_normalize関数を用いてJsonデータをDataFrame型に変換します。
df = pandas.json_normalize(User_list)

# Get /Users/ : 全件取得
# Get /Users/{ID} :特定のIDのみ取得
# POST /Users/ :ユーザの登録
# DELETE /Users/{ID} :ユーザの削除

# curl http://localhost:8000/Users/
@app.get("/Users/")
async def users():
    return User_list


# curl http://localhost:8000/Users/M003
@app.get("/Users/{u_id}")
async def users(u_id:str):
    return list(filter(lambda item : item['ID']==u_id, User_list))


# Windowsの場合 
# {"ID":"M005","Name":"Aya","Class":"C"}]を追加する
# curl -X POST -H "accept: application/json" -H "Content-Type: application/json" -d "{\"ID\":\"M005\", \"Name\":\"Aya\", \"Class\":\"C\"}" http://localhost:8000/Users/

@app.post("/Users/")
async def users(user: Item):
    User_list.append({"ID": user.ID,"Name":user.Name,"Class":user.Class})
    return User_list

# curl -X DELETE -H "accept: application/json" http://localhost:8000/Users/M003
@app.delete("/Users/{u_id}")
async def users(u_id:str):
    global df
    df = df.drop(df.index[df["ID"]==u_id])
    return df.to_json(orient='records')
このプログラムは、メモリ上の名簿を検索(GET)、追加(POST)、削除(DELETE)するものです。

C:\Users\ebata\fastapi4> uvicorn index:app --reload

で起動します。
多分、プログラムの方から、「pipでxxxxを入れろ」と文句を言ってきますので、大人しく従います。
プログラム中に記載されている、curlのコマンドを使うとFastAPIの動作を確認できます。
さて、このプログラムで基本動作は確認できますが、基本的にクライアントのプログラムの叩き台がなければ、使えません。モジュールプログラムの中から、curlのコマンドを発行しろというのも乱暴な話です。
ですので、サクッとクライアント(というかFastAPIのアクセス用のテストプログラム)を作成してしまうと思ったのですが、ここで嵌りました。
先ずは、以下のコードをrequest.pyという名前で、C:\Users\ebata\fastapi4に置きました。
(以下のファイルは、動きたてのコードを修正せずに、汚いままで展開しています)
import requests
import json

# テスト
#url = 'https://wp.kobore.net/'
#response = requests.get(url)
#print(response.text)

#print()

print("-----start of get(1)")

# curl http://localhost:8000/Users/ と同じ機能を実施
r = requests.get('http://localhost:8000/Users/')

print(r.url)
print(r.status_code)
print(r.text)
print(r.json())


print("-----end of get(1)")

print()

# curl http://localhost:8000/Users/M003 と同じ機能を実施

print("-----start of get(2)")

r = requests.get('http://localhost:8000/Users/M003')

print(r.url)

print(r.status_code)
print(r.text)
print(r.json())
print("-----end of get(2)")


print()
print("-----start of delete")
# curl -X DELETE -H "accept: application/json" http://localhost:8000/Users/M003と同じ機能を実施
r = requests.delete('http://localhost:8000/Users/M003')

print(r.url)

print(r.status_code)
print(r.text)
print(r.json())

print("-----end of delete")
print()



# curl -X POST -H "accept: application/json" -H "Content-Type: application/json" -d "{\"ID\":\"M005\", \"Name\":\"Aya\", \"Class\":\"C\"}" http://localhost:8000/Users/ と同じ機能を実現
# {"ID":"M005","Name":"Aya","Class":"C"}]を追加する

headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
json_payload = '{"ID":"M005","Name":"Aya","Class":"C"}'  # ここで100回くらいのパターンを試したぞ

print("headers:",headers)
print("payload:",json_payload)

#r = requests.post('http://localhost:8000/Users/',headers=headers, params=payload)
#r = requests.post('http://localhost:8000/Users/', headers=headers,params=json.loads(payload))
r = requests.post('http://localhost:8000/Users/', headers=headers, data=json_payload)

print(r.url)

print(r.status_code)
print(r.text)
print(r.json())
で、
C:\Users\ebata\fastapi4> python request.py
にて、GETとDELETEは問題なくサクっと動いたのですが、POSTだけが思うように動かない
{'detail': [{'loc': ['body'], 'msg': 'value is not a valid dict', 'type': 'type_error.dict'}]}
{"detail":[{"loc":["body"],"msg":"field required","type":"value_error.missing"}]}
エラー番号422
やらが、ワラワラと出てきて、頭を抱えました。
色々検索して調べると『こうやればいい』というアドバイスだけして、サンプルコード(1行で足る)を残さない奴が、世界中には山ほどいます(アドバイスではなく、コードを残して欲しい)。
のコードを真似て、ようやく動かすことができました(本当に助かりました)。
とりあえず、これでサーバとクライアントの対(つい)が完成し、実プログラムに展開できる準備ができたと思います。

以上

2023,江端さんの忘備録

本日、リモート環境で打ち合わせをしている最中に、比較的大きめの地震が発生しました。

During a remote meeting, a relatively big earthquake occurred.

が、打ち合わせはそのまま問題なく進んでいるので、『いちいち地震を気にしないで会議を進めるのだ』と思っていました。

However, the meeting continued without any trouble, I thought "They don't care about earthquakes"

ところが、3秒くらい経過したところで、「あ、揺れている」「比較的大きいですね」という声がチラホラ聞こえてきました。

After about three seconds, the voice "Oh, it's shaking," or "It's relatively big" were coming, so I thought

―― 生れてはじめて、地震波の存在をリアルに実感した

"For the first time in my life, I really felt the existence of earthquake waves"

と思いました。

"巨大地震の発生直後、飛行場の管制官が、離陸の最中にあった旅客機に停止指示を出さずに、空に逃がすシーン"

-----

ただ、Twitterで震源地情報などを調べると、どうも、違和感がある。

However, I felt a sense of discomfort, when I looked up the epicenter on Twitter.

私の住んでいるところが、一番震源地より遠いはずです。

My location must be far from the epicenter, I thought.

私の考えた、仮説の一つは、『他の人の(高価な)家は免震構造が頑強であるが、私の(高価でない)家は敏感にP波(初期微動)を感じられる』です。

One of my hypotheses is that "other member's houses are expensive and robust seismic isolation structures, but my house is not expensive and can feel P-waves (initial microtremors) sensitively.

あまり愉快な仮説ではありませんが。

Anyway, it is not a very pleasant hypothesis.

未分類

なんでこれが

FROM golang:1.16.3-alpine
WORKDIR /go
ADD . /go
# CMD ["go", "run", "main.go","-addr" ":18888"]
# CMD ["go", "run", "main.go","-addr" ":18888"]
# CMD ["main.exe"]

こうなる?

わからん・・・

2023,江端さんの忘備録

私は、自分のWebサイトをDB化しています ―― GoogleエンジンとWordPressの検索機能を使っているだけですが。

I use my website as DataBase, using just the Google search engine and search functions of WordPress.

これ結構便利です。

This is really useful.

「○○についてネタが欲しい」と思った時に、すぐに探し出せるからです。

Whenever I want to tell a story about a specified theme, I can find it soon.

Amazon 恐るべし。

-----

今日も会社で、あるテーマについて投稿しなければならなかったのですが、数秒でネタを見つけました。

Today I was ordered to submit a short story about a specific theme, and I could find it in a few seconds.

まあ、ネタの使い回しもあるので、何度も同じ話を聞かされている人もいるでしょうが ―― まあ、そこは、諦めて下さい。

Well some people should hear my story again and again, I ask them to give up.

-----

なんだかんだ言って、私のWebの創立は、1993年です ―― 創業30年の老舗Webサイトです。

Anyway, my Web establishment was founded in 1993 -- a 30-year old Web site.

まあ、規模的には「和菓子屋」というよりは「駄菓子屋」ですが ――

Well, in terms of scale, it's more of a "candy store" than a "wagashi ya" -- however,

それでも歴史だけに着目すれば、AmazonやGoogleなどのGAFAなんぞは、小僧のようなものです。

Still, if you focus only on history, GAFAs like Amazon and Google are like little boys.

決して、負け惜しみではありません。

By no means is this a sore loser?

2009,江端さんの忘備録

「NHKスペシャル 十月の悪夢―1962年キューバ危機・戦慄の記録 (NHKスペシャル)」注文してしまいました。

ですから、私は今年は、飲み会に出ません。

年齢傾斜配分を使った支払いであれば、100%出席しません。

-----

私が飲み会に出席するモチベーションは、「エッセイのネタを拾えるかどうか」です。

上司の悪口、会社の体制批判、誰ぞの結婚話などという陳腐な話題で構成される、退屈で愚劣な飲み会などには興味はありません。

最近、参加して、『元を取ったな』と思われるネタ提供には、以下のようなものがありました。

○我が社を宗教法人化して、現在の研究所を「宗教研究所」とする構想。

『技術で社会に貢献するH社』から、『宗教で社会に貢献するH社』への定款の変更。

研究所のそれぞれの部は、例えば、「第1部 人工知能研究ユニット」は、「イスラム教部、シーア派ユニット」、「第6部 ユビキタス端末ユニット」は、「仏教部 祭典仏具部開発ユニット」と、研究内容を変更。

それぞれのユニットが原理主義を掲げて、他のユニットに宗教戦争をしかけないように、現在の「総務部 管理部門」が、政教分離を規範とした「思想自衛団」を担当。

と、まあ、この程度のネタを提供してくれる飲み会であるなら、傾斜配分の支払いを認容する準備があります。

-----

という訳で、私は静かに刺身を摘みながら、課全員の、「ネタ提供力」を、きっちり見ています。

「ネタ」に新規性や進歩性がない若い研究員の査定は、相当下ります。

# ボーナスや昇進には何の影響もありませんが。

閑話休題

-----

Amazonってやっぱり凄いと思うんですよ。

私がこのDVDの予約を完了した段階で、お勧めリストに出てきたDVDが、

『ニュールンベルグ裁判 [DVD]』

うーん、なんでここまで判ってしまうのか。

衝動買いの衝動抑えるのに、どんだけ大変か。

しかも、あの『東京裁判(DVD)』を私が所有しているのかを、まるで知っているかのように、その広告は打ってこない。

おそるべし、Amazonのピンポイントターゲティング広告能力。

この分野の研究は『撤収』が正しいと思いますが、いかがでしょうか。弊社の方々。

2023,江端さんの忘備録

昨日書いたようなデッドロックに、本日、遭遇することになりました。

『システムの奴隷』

Today, I faced the "Dead Lock" I wrote yesterday.

だいたいヤバいことは、システムをいじった直後に発生するというのは「お約束」です。

Almost all of the troubles will happen just after the system modification. This is so typical.

-----

で、このデッドロック対策について、教えを乞い、100ページのマニュアルを送ってもらったのですが、「もうダメだ」と諦めました。

In order to avoid the deadlock, I asked workers in my company. A guy gave me a manual book with more than 100 pages. After reading it, I gave up easily.

しかし、その人から『簡単ですよ』と言われて、実際に試してみたら、ざっくり1分で設定が完了しました。

However, the guy gives a reply, "It was a piece of cake", I could complete the set in a minute

-----

ここから導かれる事実は2つ。

The facts lead to the following.

■マニュアルは、本当に欲しいことを、分からないように記載される傾向がある

- Manual books are apt to be written difficult, so too hard to get us what we want.

■人間(というか、私)は、マニュアルより、人間の言葉を信じる傾向にある

- A human being (like me) is apt to believe human words more than manuals.

ということです。

私も今回のメモを纏めましたが、「10行の文章 + 図面のハードコーピー2枚」になりました。

I made a memorandum about what I did, and the volumes are only 10 line-document and two hardcopy sheets.

-----

マニュアルがあんなに長く、分かりにくいのは、問題が発生した時に「問題」になるからです。

The reason why manuals are so long and hard to read is to become a problem if the problem happens.

一方、私のメモは私の為のものなので、他の人がそれを読んでシステムを壊すなどの被害が起ったところで ―― 私の、知ったことではありません。

On the other hand, my memorandum is just for me, so even if someone tries some actions by reading my memorandum, it is not my business.

私だって、他の人のメモで、色々酷い目にあったこともあります ―― これは『お互い様』です。

Even I also got in terrible trouble by reading another's memorandum. So It is "mutual"

まあ、普通の企業には、恐しくてとてもできないことだとは思いますが。

Well, I think it is something that ordinary companies are too afraid to do.

2023,江端さんの忘備録

ITシステムが会社になかった時代 ―― いや、本当にそういう時代があったんです。

"The ear where there is No IT system in companies". --- I am not kidding.? The era had existed in the old days.

ほんの20年くらい前は、それが当たり前でした。

It was natural just before 20 years ago.

勤怠管理の提出を怠れば、総務部が怒りの声で電話をしてきて、遅延した伝票の処理は庶務担当の人に、頭を下げて、定期的にお土産を提供していれば、なんとかなりました。

If I failed to submit my time and attendance, a person in the general affair department called me in an angry voice. When I delayed vouchers to the accounting department,? I kept my head down and sometimes I give them souvenirs periodically.

事務処理は、"なあなあ"な人間関係で、なんとかこなすことができたのです。

The paperwork was managed through a casual relationship.

そういう意味では、インターフェースの優れた、いわゆる「ネアカ」「陽キャ」「恫喝」「土下座」というのは、社内において圧倒的に有利、というか、立派な「インタフェース」だったのです。

In that sense, the so-called "cheerfulness," "cherry," "frights," and "down on their knees", were superior interfaces to keep our paper management in my company.

-----

しかし、ITシステムは、そんなこと『気にしません』。

However, IT system doesn't take care of them at all.

決済日を70日経過しても、警告一つ寄越さず、期末の精算処理の時点で、社内が大騒ぎになります。

Even if the deadlines pass through over 70 days, the IT system doesn't put any alert message. As a result, on the day of the end of the fiscal year,? my company came to be in a fuss.

締切の時間を5分遅れたら、報告書を受理しません。

IT system rejects to get a report even if I delay submitting it by just five minutes.

それどころか、末日のシステム集中でシステムダウンをしても、それに対して謝罪も弁済も補償も猶予もなく、そのまま、手続を『不受理』とします。

On the contrary, even if the IT system is down for access concentrations, they have no apology, reimbursement, compensation, or grace, and just reject my submission.

そのため、以前は締切日に資料を提出するのは避けていました。 なぜなら、その日は「システムダウンの日」だと決めているからです。

Therefore I used to avoid submitting any materials on the deadline day. Because I decide the day is "The system down day".

つまるところ、AI技術などと関係なく、業務のIT化によって、私たちは、すでに

In short, regardless of AI technologies, with IT management by computer, we have already become

『システムの奴隷』

"Slavers of the IT system"

と、なっているのです。

-----

私の勤務している会社では、会社の業務システムに対して、年に数回のパスワード変更を実施しなければなりません。

My company orders us to change my "password" several times a year for the company work system.

それを実施しない場合の、システム側からの制裁は、単純で、そして残酷です。

When we don't do it, the sanctions from the systems are simple and brutal.

『全業務システムへのアクセス停止』です。

"All accesses to all work systems are suspended".

業務システムだけでなく、メール、チャット、IP電話、何もかもかもが使えなくなります。

Not only the work systems, but also e-mail, chat, IP phones, and everything else will be out of service.

-----

ところが、パスワードの変更をすると、そのパスワードの変更を他のシステムで承認するという面倒なシーケンスが働きます。

However, when I try to change my password, the change must be admitted by another system. This is a seriously complicated status.

この結果何が発生するかというと ―― デッドロックです。

As a result, what will happen? It is a "deadlock".

システムにアクセスするのに新しいパスワードが必要なのですが、そのパスワードを承認するシステムが、そのパスワードでなければログインできない、という状態になり ――

When I try to access a work system, I need to use the new password. However, the system also needs the new password.

つまるところ、『パスワード変更をすることで、どのシステムにもアクセスできなくなる』という状態が発生するのです。

In short, the situation of "changing password makes me not access any work system" occurs.

デッドロックを発生させない為に、あるシステムにパスワード変更の効果が及ぶ前に処理をしなければならないなど、クソ面倒くさい気遣いが必要になっています。

In order to avoid the deadlock, I have to start the system before being spread the changing password to the system. Anyway, it is an annoying process I have to.

こうなると、もはや、単なる奴隷ではなく、

In a sense, I am not just a slave but,

『システムの下僕』

"Servant of the System"

といっても過言ではないでしょう。

現代の私たちは、望む望まずに関わらず、マイクロソフト社の「Windows OS」と「Office」の奴隷・・・もとい、ユーザとなっています。

I believe that it would not be an exaggeration.

腹立たしいことこの上もありませんが、「ネアカ」「陽キャ」「恫喝」「土下座」を排除した世界の一つの形であるのは事実です。

It is beyond infuriating, but it is true that this is one of the worlds that eliminate "cheerfulness," "cherry," "frights," and "down on their knees".

ただ、システムデッドロックに陥った場合、そこから抜け出すのは、簡単ではない世界です。

Still, it is also very difficult to escape from the world when we are caught by the system deadlock.

-----

次のAI技術の目指すものは、「ネアカ」「陽キャ」「恫喝」「土下座」などのアナログインターフェースを、正しく理解するものなのかもしれません。

The next-generation AI technology might be something to understand the interfaces of "cheerfulness," "cherry," "frights," and "down on their knees".

もっとも、そのAI技術では、コンピュータが『うるせい!大声出すな!!』と応答してくるかもしれませんが。

However, with the AI technology, a computer might respond with "Shut up! Stop yelling!!" against your loud claims.

2017,江端さんの忘備録

現代の私たちは、望む望まずに関わらず、マイクロソフト社の「Windows OS」と「Office」の奴隷・・・もとい、ユーザとなっています。

Now, regardless of our hope, we are Microsoft's "Windows OS" and "Office" slaves...I mean "users".

ことわざ辞典の、「勝てば官軍」の説明には、幕末の幕府と新政府軍の例でなく、マイクロソフト社の話を記載する方が、理解が深まると思います。

In the proverb dictionary, in the explanation of "the army if you win", they have to use an example, "Wining story of Microsoft Corporation", instead of the shogunate at the end of the Tokugawa shogunate and the new government army.

By the way, in this column, I wrote a little about "Nash equilibrium" and "Pareto optimal".

マイクロソフト社は、私たちが、数年かけてようやく慣れてきたOSとOfficeを、「もうサポートしない」という脅迫フレーズで、なんどもバージョンアップに追い来んできました。

Many of us have been forced to upgrade our version by Microsoft Corporation, with the threatening phrase "We do not support anymore" OS and Office", though even we have finally got used to OS and Office over the years.

私たちは、古いWindows OSを使うことで、いわゆる「ナッシュ均衡」に至っている訳であって、その世界は、ぬくぬくして、居心地のいい場所なのです。

We use the present Windows OS to reach the so-called "Nash equilibrium", and the world is warm, cozy.

しかし、マイクロソフト社は、「バージョンアップ + サポート停止」という手段をもって、このナッシュ均衡を破って、パレート最適に至らしめているのである ―― という、ウルトラスーパー善意解釈もできなくはないと思っています。

However, Microsoft breaks this Nash equilibrium, and try to be reaching Pareto optimal, as a means of "upgrading + halting support", however I am afraid that this is a Ultra Super good faith for the company.

(続く)

(To be continued)

2023,江端さんの技術メモ

cert.pem やら key.pem に、localhost や 127.0.0.1を含めて作っていなかったから。以上

C:\Users\ebata\kitaya>curl https://localhost:8080
curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - 失効の関数は証明書の失効を確認できませんでした。

cert.pem = fullchain.pem  key.pem = privkey.pem ということで良いのだろう

ローカルネットワークにおける「オレオレ証明書」の作り方 "http: TLS handshake error from 192.168.0.22:59914: remote error: tls: unknown certificate"のエラーを、ようやく消せました