未分類

docker images をやったのですが、同じ名前のdocker imagesが出てくるのですが、どれが最新なのか見分ける方法を教えて下さい。

同じ名前のdocker imagesが出てくるのですが、どれが最新なのか見分ける方法を教えて下さい。

CREATED も同じく"2months"になっていて見分けがつきません。 ですので、例えば、Dockerコンテナを動かして確認する方法はありませんか。現在、私は "docker-compose start" をした後にシェルでDocker内部に入っているのですが、この状況からの確認方法を教えて下さい

Dockerの外側(ホストOS)から稼働中のDockerコンテナを確認するには、いくつかの方法があります。以下は、その代表的な方法です。

1. docker ps コマンドで稼働中のコンテナを確認

ホストOS上で、現在稼働中のコンテナを一覧表示するために、以下のコマンドを使用します。

docker ps

cam@cam-desktop:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c928a6ab4e6b u2404b-dev-environment "/bin/bash" 4 days ago Up About an hour u2404b-dev-environment-1

という表示がでてきました。
このイメージをsaveする方法を教えてください。

1. イメージを保存する
まず、docker save コマンドを使用してイメージをファイルに保存します。以下のコマンドを実行してください。

$ docker save -o u2404b-dev-environment.tar u2404b-dev-environment

このコマンドは、u2404b-dev-environment という名前のイメージを u2404b-dev-environment.tar というファイルに保存します。

2. 保存されたファイルを確認する
保存が完了したら、ファイルが正しく作成されたか確認します。

$ ls -lh u2404b-dev-environment.tar

このコマンドで、保存されたファイルが存在し、適切なサイズであることを確認できます。

あとは、zip等で固めて、先方に送付すればO.K.

-----

保存したイメージを他の環境でロードするには、どうしたら良いですか。

もし他の環境に移動してこのイメージを使用したい場合、docker load コマンドを使用してイメージをロードします。

ファイルを解凍して、

$ docker load -i u2404b-dev-environment.tar

これにより、保存されたイメージが再びDockerにインポートされ、使用可能になります。

ところが、この方法では、自力で設定した環境などが全く引き継がれないらしいです。

送付いただいたものはgstreamer、コンパイル環境が入っていない状態でした。
お手数ですが、コンテナをcommitしてsaveしたものを送付願います。
(参考:https://sagantaf.hatenablog.com/entry/2018/09/04/190801)

上記の参考資料の通りにやってみることにしました。

(Step.1) まず、ゲストOSを立ち上げておいて、ホストOSから以下のコマンドを投入します
cam@cam-desktop:~$ sudo docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c928a6ab4e6b u2404b-dev-environment "/bin/bash" 4 days ago Up 3 hours u2404b-dev-environment-1

(Step.2) 次に、このc928a6ab4e6bを使って、20240828_shajyoという名前(名前は好きなように)でコミットします

cam@cam-desktop:~$ sudo docker commit c928a6ab4e6b 20240828_shajyo
sha256:ac3405c474d294e5b5d0bd9a8cdc51a600f8cd3d04685877cecfb772e284b17e

# コミットしている最中、ゲストOSにアクセスできなくなるようですが、恐れず、じっと我慢しましょう。

(Step.3) コミットに成功しているかを確認します

cam@cam-desktop:~$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
20240828_shajyo latest ac3405c474d2 4 minutes ago 2.5GB  ← できている
u2404b-dev-environment latest 48248de5e524 2 months ago 1.23GB
<none> <none> dcb4a05fb5a5 2 months ago 1.23GB
<none> <none> 132165fbb602 2 months ago 986MB
u2404_dev-environment latest 940f87bcbccf 2 months ago 986MB
<none> <none> a4252fdea034 2 months ago 988MB
u2404-dev-environment latest a042684decc4 2 months ago 971MB
ubuntu 24.04 ffb64c9b7e8b 2 months ago 101MB
hello-world latest ee301c921b8a 16 months ago 9.14kB

(Step.3) 20240828_shajyoをセーブします

cam@cam-desktop:~$ docker save 20240828_shajyo -o 20240828_shajyo.tar

あとは、これをzip等で圧縮して、先方にお送りすれば良いです。

cam@cam-desktop:~$zip 20240828_shajyo.tar.zip 20240828_shajyo.tar

-----

これを展開するのは、多分、以下のようになると思います(というのは、私が試していないからです)

(Step. 1) 一旦、ホストOSからイメージを削除する
$ docker images

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
20240101_shajyo          latest              3c053ce8d919        25 minutes ago      193MB

$ docker rmi 20240101_shajyo

(Step. 2) ホストOSから、ファイルからイメージを作成する

$ sudo docker load < 20240828_shajyo.tar

これでイメージが復活する(ハズ)とのことです。

ご対応ありがとうございました。
コンパイル環境と各プログラムがイメージに入っていることを確認しました。

というコメントをいただいたので、多分大丈夫です。

=======

今回イメージを受けとる側になりましたので、イメージの作成方法を追記します。

cam@cam-desktop:~/u2404b$ docker-compose start
service "dev-environment" has no container to start
と言われてしまいました。

解決手順

1. 現在のコンテナ状況を確認

まず、docker-compose.ymlのディレクトリに行きます。

現在のコンテナ状況を確認するため、以下のコマンドを実行します:

docker-compose ps

出力が空の場合、まだコンテナが作成されていないことを意味します。

2. コンテナを作成・起動

$ sudo docker load < 20241016_shajyo_latest.tar
でつくったもので
20241016_shajyo latest bf4a5d825daa 13 months ago 3.15GB
となっています。

もし 20241016_shajyo:latestdocker-compose.yml 内で使用する予定がある場合、以下の手順を考慮してください。


1. 20241016_shajyo:latest を使用する場合

docker-compose.yml に以下のようにイメージ指定を追加します。

 

version: '3'

services:
  dev-environment:
    image: 20241016_shajyo:latest  # ロード済みのイメージを使用
    environment:
      DISPLAY: ${DISPLAY}
      XDG_RUNTIME_DIR: /tmp/xdg
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix
      - /home/cam/u2404:/home/cam/u2404
    stdin_open: true
    tty: true
    network_mode: host

docker-compose up コマンドで、コンテナを作成して起動します:

docker-compose up --build -d
  • --build は、新しいビルドが必要な場合に使用します。
  • -d は、デタッチモード(バックグラウンドで実行)を有効にします。

このコマンドで新しいコンテナが作成され、サービスが開始されます。

ところが、これでもDockerで作ったデータベース本体丸ごとでの移行はしないみたいです(ちょっと待った。現在これ検証中)。

結論:docker commit ではデータは移行されない可能性が高い!
データベースごと移行するなら docker volume をバックアップするか、pg_dump を使うべき

データベース本体と丸ごと持っていきたい場合は(も、あてにならないので、現在検証中)

DockerのPostgreSQLデータベースをWindows→WSLのDockerへ移行する方法

2024,江端さんの忘備録

我が国においては「政治と金の問題」は常に問題となってきました。

The “politics and money issue” has always been a problem in our country.

これまで「政治と金の問題」で、辞職、辞任、政権交代は、数知れません。

Countless resignations and government changes have occurred due to “politics and money issues.”

基本的に、我が国においては、「金=悪」の概念が定着化しているのは間違いありません。

Undoubtedly, the concept of “money = evil” has become entrenched in our country.

-----

ところが、

However,

『ハリス陣営、バイデン氏撤退後の資金調達が5億ドル超え-追い風鮮明』

"Harris Campaign Raises Over $500 Million After Biden's Withdrawal - Clear Tailwind.”

という記事からも分かるように、米国では「金=力」であり、下手すると「金=正義」という概念で政治が運用されています。

As seen from the article “Money = Power” in the United States, if you are not careful, politics operates on the concept of “money = justice.”

これは「地道に働いている人が一番エライ」と考える日本人と、「運を見逃さずに努力して成功した人が一番エライ」と考える米国人の国民性の違いだ ―― とは、よく言われています。

It is often said that this is the difference in national character between the Japanese, who believe that “those who work steadily are the most elated,” and Americans, who say that “those who work hard and succeed without missing their fortune are the most elated” -- a common saying.

-----

米国の日本の政治献金の取り扱いについて簡単に簡単に説明します。

The following briefly explains the U.S. treatment of Japanese political contributions.

(1)米国の政治献金

(1) U.S. Political Contributions

  • 米国では、政治献金は非常に一般的であり、選挙運動の主要な資金源
  • 個人や企業、政治行動委員会(PAC)が候補者や政党に対して寄付を行うことは合法。 献金額に上限なし。
  • 米国の選挙文化や法制度として根付いており、支出の開示の透明性が高い
  • Political contributions are widespread in the U.S. and are a significant source of campaign funding.
  • It is legal for individuals, corporations, and political action committees (PACs) to contribute to candidates and political parties. There is no cap on the amount of contributions.
  • It is ingrained in the U.S. electoral culture and legal system, and there is a high degree of transparency in the disclosure of expenditures

(2)日本の政治献金

(2) Political Contributions in Japan

  • 政治献金に対する規制が厳しく、特に企業や団体からの政治献金には制限ある
  • 過去に政治と金のスキャンダルが多発し、それが社会に対する信頼を損なった歴史的な背景に因る
  • Strict regulations on political donations, especially restrictions on donations from corporations and organizations
  • This background is due to the history of many scandals involving politics and money, which have damaged public trust in society.

総じて、米国では政治献金が選挙活動の一環として広く受け入れられている一方で、日本では過去のスキャンダルの影響もあり、政治献金が不透明であると批判されている、ということです。

The general point is that while political contributions are widely accepted as part of campaign activities in the U.S., in Japan, political contributions are criticized as opaque, partly due to past scandals.

一言で言えば、「クリーン」の意味が違う。

In a word, “clean” has a different meaning.

米国のクリーンは「全情報開示」の意味で、日本のクリーンは「清く貧しく美しく」です。

Clean in the U.S. means “full disclosure,” while clean in Japan means “clean, poor, and beautiful.

-----

私の考え方は、「金=どうでもいい」です。

My thinking is “money = unimportant.”

私の主張点は一つです。

I have one point of contention.

―― 政治に関わる金は、1円単位まで全部開示しろ

"Disclose all money involved in politics down to the penny."

です(米国因りでしょうか)。

(Is it a side of the U.S.?).

このキックバックは、政治資金規制法の理念である「政治活動の資金の流れは、全て可視化する」という理念を、ぶち壊すものです。

大人も子どもも外国の政府も、例外なく全てです。

Adults, children, and foreign governments, all without exception.

政治に関わる金であれば、献金する側は「身バレ(名前がバレること)を覚悟しろ」ということです。

If you donate money to a political party, you should be prepared to be “exposed.”

まあ、全政党に献金している大企業などは「節操なし」と批判されるかもしれませんが、その時は「これは、政治的ポートフォリオだ」とか、「組織のセーフネットだ」と開き直ればいいんです。

Large corporations that donate to all political parties may be criticized for being “unscrupulous.” Still, they can reopen the situation and say, “This is a political portfolio” or “It's an organizational safety net.

少なくとも私は非難しません ―― むしろ、組織の保身手段としては、まっとうだ、とすら思います。

I don't blame them in the least—I think it's a decent means of organizational self-preservation.

-----

ただ、私が不思議に思うのは、このような米国の選挙制度に対して『間違っている!』と怒鳴りちらしている日本人がいない、ということなんですよね。

What I wonder, however, is that there are no Japanese who are shouting at the U.S. electoral system, saying, “This is wrong! I wonder why no Japanese are shouting, “It's terrible!

一応探してみましたが、私は見つけられませんでした。

I tried looking for one, but I could not find it.

2024,江端さんの忘備録

ここ最近、私は、色々理由をつけて、飲み会の出席を遠慮しています。

Lately, I have been refraining from attending drinking parties for several reasons.

しかし、これまで記載されていなかったことの要因の一つに「体臭問題」があります。

However, one factor that has not been mentioned is the “body odor problem.”

-----

以前、インターン歓迎会に出席した時、シニアの方の近くに座ったのですが、その方の体臭が凄くて、飲食に集中できない、ということがありました。

Once, when I attended an intern welcome party, I sat near a senior who had a terrible body odor that made it difficult for me to concentrate on eating and drinking.

で、さりげなく、他のシニアの方の近くの席に移動をしたのですが、次の席でも体臭に直面しました。

So, I casually moved to a seat near other seniors, but I was also confronted with body odor at the seat.

この一件は、私に衝撃を与えました ―― 『シニアの男性は臭う』

This one shocked me -- “Senior men stink.”

まあ、サンプル2件ですが、それでも連続2件です。

Well, it is just a sample of two cases, but still two cases in a row.

これはシニアの私に、根源的な恐怖を与えました。

This gave me, as a senior, a fundamental fear.

―― 私も、臭うに違いない

"I must be a source of body odor, too."

-----

娘たちのレポートから、断酒前の私の体臭が、無視できないレベルにあったのを知っています。

I know from my daughters' reports that my body odor before sobriety was at a non-negligible level.

しかし、断酒後であったとしても、私の加齢臭までは抑えられていないはずです。

However, even after sobriety, I would not have been able to control my older smell.

そして、体臭に関する問題が、アンタッチャブルで、センシティブであり、基本的に解決手段がないことは、これまで申し上げてきた通りです。

And as I have said, the problem of body odor is untouchable, sensitive, and basically without a solution.

私、「体臭」については、これまで色々論じてきたのですが、仮説ですら解決法を思いついていません ―― それくらい、この問題は難しい。

このような観点からも、私は「リモート飲み会」というのは、『この問題の消極的な対応方法の一つである』と思うのです。

From this perspective, I think “remote drinking” is 'one of the passive ways to deal with this problem.

-----

いずれにしても、この「体臭」の問題で、『飲み会の参加に躊躇(恐怖)しているシニア男性が、少なくとも一人は存在すること』を、覚えておいて頂ければ幸いです。

In any case, you would appreciate it if you could keep in mind that “there is at least one senior male who is hesitant (afraid) to attend a drinking party” because of this “body odor” problem.

―― 出席はしたいが、欠席したい

つまるところ ――

The bottom line is--

『我々シニア男性はか弱い。それのみでは生きてゆけないただの細胞体だ。だからあまりいじめるな』

"We senior men are frail. We are just cellular bodies that can't survive on our own. So don't torment us too much."

です(出展は超有名なので省略)。

(The exhibit is very well-known, so I omit it.)

2024,江端さんの技術メモ

.emacs はこんなかんじ

;; 英字フォントを設定
(set-face-attribute 'default nil
:family "Ubuntu Mono"
:height 120
:weight 'normal
:width 'normal)

;; 日本語フォントを設定
(set-fontset-font t 'japanese-jisx0208
		  (font-spec :family "Noto Sans CJK JP" :size 14))


(require 'skk-autoloads)
(setq skk-user-directory "~/.emacs.d/skk")
;(setq skk-large-jisyo "/usr/share/skk/SKK-JISYO.L")
(setq skk-large-jisyo "~/.emacs.d/skk/SKK-JISYO.L")
(setq skk-server-host "localhost")
(setq skk-server-portnum 1178)
(global-set-key (kbd "C-x C-j") 'skk-mode)

;; ネイティブコンパイルの警告を無効にする
(setq native-comp-async-report-warnings-errors nil)

で、あとはこんなことをやっておく

$ wget https://skk-dev.github.io/dict/SKK-JISYO.L.gz
$ gunzip SKK-JISYO.L.gz
$ mkdir -p ~/.emacs.d/skk
$ mv SKK-JISYO.L ~/.emacs.d/skk/

$ sudo apt update
$ sudo apt install ddskk

とりあえず「動けばいい」の方向で。

2024,江端さんの技術メモ

C言語のプログラムで、コマンドパラメタを入力する部分をつくっていたのですが、ファイルを作ってほしくないケースが出てきました。

// 引数からIPアドレス、ポート、RTSP URL、ファイル名を取得
    char *srt_ip = DEFAULT_IP;
    int srt_port = DEFAULT_PORT;
    char *rtsp = DEFAULT_RTSP;
    char *filename = DEFAULT_FILENAME;
    int udp_port = DEFAULT_UDP_PORT;

    for (int i = 1; i < argc; i++) {
      if (strcmp(argv[i], "-i") == 0 && i + 1 < argc) {
        srt_ip = argv[i + 1];
        i++;
      } else if (strcmp(argv[i], "-p") == 0 && i + 1 < argc) {
        srt_port = atoi(argv[i + 1]);
        i++;
      } else if (strcmp(argv[i], "-r") == 0 && i + 1 < argc) {
        rtsp = argv[i + 1];
        i++;
      } else if (strcmp(argv[i], "-f") == 0 && i + 1 < argc) {
        filename = argv[i + 1];
        i++;
      } else if (strcmp(argv[i], "-u") == 0 && i + 1 < argc) {  // UDPポート番号の引数を追加
        udp_port = atoi(argv[i + 1]);
        i++;
      } else {
        printf("Usage: %s [-i ip_address] [-p port] [-r rtsp_url] [-f filename] [-u udp_port]\n", argv[0]);
	    printf("./abc_vtp_0.3 -i 192.168.101.10 -p 38090 -r rtsp://cam:Cam12345@192.168.0.11/Src/MediaInput/stream_1 -f 2jcie/data_test2.csv -u 12346 \n");
    	    printf("-f /dev/null とすることでSRTメトリックス情報は廃棄されます \n");
	    printf("-u 0 とすることで制御用スレッドは起動しなくなります\n ");


        return 1;
      }
    }
    
    printf("IP: %s\nPort: %d\nRTSP: %s\nFilename: %s\nUDP Port: %d\n", srt_ip, srt_port, rtsp, filename, udp_port);

しかし上記のプログラムでは、ファイル名を無視すると、デフォルトのファイル名を選んでしまいます。そんでもって、プログラムの改造もしたくありませんでした。

今更ながらなのですが、ファイル名を

/dev/null

とすると、ファイルを作らずにデータを捨ててくれるようです。
(コマンドプロンプトでしか使えないと思っていた)

いや、本当に助かった。変なコード追加しなくて済んだし。

それ以上に、この程度のことを、今の今まで、私が知らなかったことが驚きです。

まあ、私の力量などこの程度です(乾いた笑い)。

 

 

2024,江端さんの技術メモ

ubuntu 22.04をホストOSとして、ubuntu24.04 をゲストOSとした、そのゲストosの環境で、fastapiをインストールしようとしましたが、上手く動きませんでした。

pythonでFastAPIを試す

cam@cam-desktop:/$ pip3 install fastapi uvicorn error: externally-managed-environment といわれました。
「システム全体のPython環境にパッケージをインストールする必要がある場合は、--break-system-packagesオプションを使用して強制的にインストールすることも可能です」
と言われました。
「システム全体」でかまわなかったので、強行しました。
cam@cam-desktop:~/testapi$ pip install fastapi uvicorn --break-system-packages
$make testapi
$cd testapi
$touch main.py

以下のサンプルコードを main.py に記述します。

from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def read_root():
    return {"Hello": "World"}
で、
$ uvicorn main:app --host 0.0.0.0 --port 8000
http://localhost:8000 で稼働確認できましたので、とりあえずここからです。
cam@cam-desktop:~/fastapi6d$ pip3 install request --break-system-packages
で、(私の場合)ようやく起動しました。

2024,江端さんの忘備録

私たち市井の市民にとって、200億円も2兆円も、同じように「たくさんのお金」ですよね。

As city residents, 20 billion yen and 2 trillion yen are equally “a lot of money.

(以前、どこかで書いたかもしれませんが)この規模感を理解する為に、私がやっているのは「億割り」という方法です。

(I may have written about this somewhere before.) To understand the scale of this project, I am using the “100 million yen split” method.

200億円 ÷ 1億円 = 200円

20 billion yen ÷ 100 million yen = 200 yen

2兆円 ÷ 1億円 = 2万円

2 trillion yen ÷ 100 million yen = 20,000 yen

です。

この「億割り」は、日本の人口をざっくり1億人として考えて、一人あたりの負担額、というイメージで把握できます。

This “100-million-yen division” can be grasped in the image of a per capita burden, considering the population of Japan as roughly 100 million people.

江端家としては、これにx3をする、という感じです。

As for the Ebata family, we would do x3 to this.

-----

北海道拓殖銀行破綻時の公表不良債権総額は、2兆3,433億円でした。

At the time of the Hokkaido Takushoku Bank bankruptcy, the total nonperforming loans announced was 2,343.3 billion yen.

この時、日本銀行は特別融資を行いませんでしたが、もし行われていたと仮定して、これを「億割り」で考えると、

The Japan Bank did not make a particular loan at this time, but assuming that it had been made and considering this on a “100-million-yen division” basis

私は、北海道拓殖銀行の救済の為に、私個人としては2万4000円程度、当時の江端家としては10万円の血税負担、ということになったと思います。

I believe that the Hokkaido Takushoku Bank's bailout cost me about 24,000 yen, and the Ebata family at that time had to pay 100,000 yen in blood taxes.

こうすると、グッと見やすくなりますよね。

This way, I think we can see our money much more quickly.

日本の宇宙開発予算は、年間で約3,000億円程度ですので、私個人の負担は3000円/年、家族では1万円程度となります。

Japan's annual budget for space development is about 300 billion yen, so my cost would be 3000 yen/year, or about 10,000 yen for my family.

個人的に宇宙開発の費用であるなら、これくらいは支払っても良い、と思えます。

If it is the cost of personal space exploration, this is the least I would be willing to pay.

日本の研究開発費(R&D予算)は、年間約4兆円(40,000億円)ですので、私個人は4万円、江端家で12万円です。

Japan's R&D budget (R&D budget) is about 4 trillion yen annually, which means 40,000 yen for me personally and 120,000 yen for the Ebata family.

まあ、これも仕方がないかと。

Well, I thought this was inevitable.

介護サービスの費用は、こんな感じです。

The cost of long-term care services is like this.

税金や保険料やらがまざっているので、内訳が難しいのですが、年間10万円くらいのお金を持っていかれている感じです。

It's hard to break it down because taxes, insurance premiums, etc., are all mixed in, but they seem to take about 100,000 yen a year.

という訳で、『200億円も2兆円も、同じように「たくさんのお金」』と思考停止するのをやめて、「億割り」をしてみると、ちょっとお金への見方が変わるかもしれません ―― 大抵の場合「腹が立つ方向」になりますが。

Therefore, if you stop thinking that '20 billion yen and 2 trillion yen are equally “a lot of money”' and try to “divide by 100 million,” your view of money may change a little -- although it will usually be in the “angry” direction.

『北朝鮮に対して、なんの条件も付けることなく、拉致被害者1人の返還に対して、20億円を支払う』

2024,江端さんの技術メモ

GISでシミュレーションを行う上で、鈴木紀明先生のこの方法を使い倒させていただいております。

先生には大変申し訳ないのですが、もし、このリンクが消えたら私にとって大打撃なので、先生に無許諾で切り取り&貼り付けをさせて頂いております(御叱り頂ければ、このページを即時抹消致します)。

2024,江端さんの忘備録

我が国の首相への批判の声が大きいです。

There is a lot of criticism of our Prime Minister.

その結果、現首相は、次期自民党総裁選に出馬しない意向を明かにしました。

As a result, the current prime minister has made it clear that he will not run for the next LDP presidential election.

「首相への批判」というよりは、「政権政党への批判」の責任を負わされた、という感じがします。

It seems that the responsibility was placed on the party in power rather than on the prime minister.

まあ、私も「政権政党への批判」はしています。

I also have a “criticism of the governing party.”

このキックバックは、政治資金規制法の理念である「政治活動の資金の流れは、全て可視化する」という理念を、ぶち壊すものです。

-----

政治家というのは大変な仕事に思えます。

To me, being a politician seems like a tough job.

なにしろ「手につく職」というのが観念できない。

At any rate, I cannot conceive of “a job in hand.

彼らに残るものは「人脈」くらいですが、これも、スキャンダル→引責辞任ともなれば、全部パーです。

The only thing they have left is their “personal connections,” but this will all be wiped out if they are involved in a scandal and resign.

それゆえ、政治家の引責辞任は、社会的身分としての『自殺』と同義と見なせるかと思います。

生活保護を受けている、落選した政治家は、かなり多いそうです(噂レベルで、まだ裏はとっていません)が、これも納得できます。

I've heard that there are quite a few failed politicians who are on welfare (at the rumor level, not yet corroborated), which makes sense.

スキャンダルで辞任させられ、その後、地元から離れて、別の土地で、小規模な店舗でアルバイトをしている元議員の話は(1件だけですが)知っています。

I know of (only one) story of a former councilor who was forced to resign because of a scandal and then left his hometown to work part-time in a small store in a different part of the country.

現在、パワハラや寄付の強要をしたとの疑いで、スキャンダルの渦中にいるどこぞの県知事が、ガンとして辞任を拒否し続けています。

The governor of some prefecture, currently in the middle of a scandal for allegedly harassing people and forcing them to donate money, continues to refuse to resign.

しかし、私には、彼の行動が理解できます。

But I can understand his behavior.

ここで辞任したら、これまでの輝かしいキャリア(高い学歴、留学経験、官僚時代の成果も)なにもかもが吹き飛びますので『死んでも辞任だけはしない』というのは、当然の戦略です。

If he resigns at this point, his illustrious career (including his high academic background, study abroad experience, and achievements as a bureaucrat) will all be blown away, so it is a natural strategy for him to say, “I will not resign even if I die.

そういう意味では、『傷が浅いうちに、早々に撤収する』という行動が、いかに難しいものであるか、がよく分かります。

In that sense, it is easy to see how difficult it is to act 'when there is a minor injury, withdraw early.'

これは私の持論ですが『撤収は芸術』です。

This is my theory: “Withdraw is an art".

閑話休題

Now, let's return to the main subject

-----

しかし、今回の事件で国民が怒るのは当然だが、以前の事件(特に昭和の事件)はもっと大規模で、もっと凄いものだった。

However, while the public is understandably angry about this incident, previous incidents (especially in the Showa period) were much larger and more horrific.

■ロッキード事件(1976年)

■Lockheed Martin Lockheed Affair (1976)

田中角栄元首相がロッキード社からの賄賂を受け取ったとされる事件です。この事件により田中元首相は逮捕され、自民党政権が大きく揺らぎました。

This is a case in which former Prime Minister Kakuei Tanaka allegedly accepted a bribe from Lockheed Corp. This incident led to the arrest of former Prime Minister Tanaka and shook the LDP government.

■リクルート事件(1988年)

■Recruitment case (1988)

リクルート社が未公開株を政治家や官僚に提供した事件です。政治家の倫理が問われ、竹下登内閣が倒れる原因となりました。

This is the case of Recruit Co. providing private shares to politicians and bureaucrats. The ethics of politicians were questioned and caused the fall of the Takeshita Noboru cabinet.

■金丸信事件(1992年)

■Kanemaru Shin case (1992)

自民党副総裁の金丸信が東京佐川急便から5億円を受け取ったとされる事件です。金丸の辞任後、自民党内での権力闘争が激化しました。

This is the case of LDP Vice President Makoto Kanemaru, who allegedly received 500 million yen from Tokyo Sagawa Express. After Kanemaru's resignation, a power struggle within the LDP intensified.

セックススキャンダルであれば、

In the cases of sex scandal,

■田中角栄の「秘書スキャンダル」(1970年代)

■Kakuei Tanaka's “secretary scandal”

田中角栄元首相が秘書と愛人関係にあったとされるスキャンダル。メディアの注目を集め、政治家のプライバシーに関する議論を引き起こしました。

The scandal involved former Prime Minister Kakuei Tanaka's alleged mistress with his secretary. The scandal attracted media attention and triggered a debate about the privacy of politicians.

■宇野宗佑首相の「女性スキャンダル」(1989年)

■“Women's Scandal” by Prime Minister Sosuke Uno (1989)

宇野宗佑首相がホステスとの不倫関係を報じられた事件。このスキャンダルにより、宇野内閣は短命に終わり、わずか68日で退陣に追い込まれました。

The incident in which Prime Minister Sosuke Uno was reported to have had an affair with a hostess. The scandal short-lived the Uno cabinet, forcing him to step down after only 68 days.

■浜田幸一の「不倫スキャンダル」(1970年代)

■Koichi Hamada's “Adultery Scandal” (1970s)

自民党の大物政治家である浜田幸一が不倫関係を持っていたとされるスキャンダル。これにより彼の政治生命が大きく揺らぎました。

Koichi Hamada, a major politician in the Liberal Democratic Party, was involved in a scandal in which he allegedly had an affair. This greatly shook his political life.

■三木武夫首相のスキャンダル(1974年)

■The Scandal of Prime Minister Takeo Miki (1974)

三木武夫首相は清廉潔白なイメージで知られていましたが、一部報道で彼が戦前の女性関係について取り上げられました。

Prime Minister Takeo Miki was known for his clean image, but some reports highlighted his prewar relationships with women.

さらにこんなもの出てきました。

In addition, I found the following:

■佐藤栄作と高級クラブ女性のスキャンダル(1960年代)

■Scandal between Eisaku Sato and high-class club women (1960s)

佐藤栄作首相は、ある高級クラブの女性との関係が噂されました。公には大きく取り上げられることはなかったものの、佐藤のプライベートな行動がメディアに注目され、批判を受けました。

Prime Minister Eisaku Sato was rumored to have had a relationship with a particularly exclusive club lady. Although not publicly publicized, Sato's private behavior drew media attention and criticism.

■河野一郎の「銀座ホステス事件」(1960年代)

■“Ginza Hostess Case” by Ichiro Kono (1960s)

河野一郎は、銀座のホステスとの関係が取り沙汰され、政治的な批判を受けました。この事件は彼の政治的影響力を弱める一因となりました。

Ichiro Kono came under political scrutiny when his relationship with a Ginza hostess came under scrutiny. This incident contributed to the weakening of his political influence.

-----

昭和の時代には、今のコンプライアンス社会では『一発退場』レベルの事件がゴロゴロしていました。

In the Showa period, many incidents were at the level of “one-shot dismissal” in today's compliance society.

この政権政党の政治家の不動の「金」と「セックス」のスキャンダルの歴史を眺めていると、

Looking at the history of the steadfast “money” and “sex” scandals of the politicians of this governing party,

(1)政権与党(自民党)って、ずっと変わらないんだなぁ

(1) The ruling party (LDP) has never changed.

(2)『金』はともかく、倫理的に問題があるセックスしている時間があるなら、仕事しろ

(2) “Money” aside, if you have time for unethical sex, get to work!

と、まあ、会社の犬として働いているエンジニアとしては、思う訳ですよ。

And, well, as an engineer working as a company dog, I think.

未分類

29回ほど手動で回して、確率アルゴリズムの検証をしました。

まあ、正しく動いているようです(検証用ルーチン作るのが面倒だった)。