2023,江端さんの忘備録

先日、建物の薄暗い階段の踊り場で、お祈りをしている(ムスリム?の)女性を見ました。

The other day, I saw a (Muslim?) woman praying on the dimly lit staircase landing of a building.

スマホを地面に置いていたので、多分、方角(メッカ)を確認されていたのだと思います。

I think she was probably checking the direction (Mecca) because she had his phone on the ground.

私は、なるべく物音を立てずに、ゆっくりと、その横を通らせていただいたのですが、さすがに、こんな薄暗くて狭い場所で、お祈りをされていることを、気の毒に思いました。

I slowly walked past her, making as little noise as possible, but I felt sorry for her that she was praying in such a dimly lit, cramped space.

ジェンダーフリーのトイレの設営も大切ですが、これからは、礼拝する場所の整備も重要だよなぁ、と実感しました。

I realized that while it is essential to set up gender-free restrooms, it is also important to maintain places of worship from now on.

『空いている教室とか、鍵のかかっていない部屋とか、自由に使ってくれてもいいのにな』とか思いましたが、よくよく考えれば、私、ムスリムの人のお祈りについて、全然知らないことに気がつきました(実施時間、所要時間、その他のしきたり等)。

I thought to myself, "They should be free to use any empty classrooms or unlocked rooms," but then I realized that I knew nothing about Muslim prayers (time of performance, duration, other rituals, etc.).

これからは、義務教育とまでは言わないまでも、大学や会社のオリエンテーションなどで、これらの基礎的な知識を、私たちに教える機会が必要なんじゃないかなー、と思っています。

I think that from now on, we need to have opportunities to teach this fundamental knowledge to us at universities, company orientations, etc., needless during mandatory education.

Amazon 恐るべし。

 

 

2023,江端さんの忘備録

弊社では『差別』は絶対に受け入れれません。

Discrimination" is unacceptable in our company.

以下の特徴に基づいて、応募者、従業員、またはビジネスパートナーを差別してはいけません。

Do not discriminate against applicants, employees, or business partners based on any of the following characteristics.

年齢、市民権、肌の色、性別、性同一性または性表現、遺伝情報(または家族の遺伝情報)、結婚歴、病状または障がい、軍歴、 妊娠、人種、出身国または祖先、宗教または宗教的信条、性的指向、適用される法令で保護されているその他の特性

Age, citizenship, color, sex, gender identity or expression, genetic information (or family genetic information), marital status, medical condition or disability, military service, pregnancy, race, national origin or ancestry, religion or religious belief, sexual orientation, or other characteristic protected by applicable law

―― という、コンプライアンス教育を受けました。

I recently received compliance training, such as the above.

全くその通りだと思いますので、私は、これを100%受け入れます。

I accept this 100%, as I think it is true.

-----

それとは別に、これは「差別」ではないのですが ―― 浮気をしている上司の命令には、私は従いたくありません。

Apart from that, and this is not "discrimination" -- I don't want to follow orders from a boss who is cheating.

『私の仕事の進捗や納期や品質についてとやかく言う前に、お前の身の回りの人間関係をキレイに清算してこいや!』と言いそうになるからです。

Because I'm about to say, "Go clean up your relationships before you start complaining about my work progress, deadlines, and quality!"

私の仕事のパフォーマンスが落ちるので、会社では、このようなことは完全に隠蔽して下さい。

Please cover this completely at my company as my job performance will suffer.

浮気の経済学

 

 

2023,江端さんの忘備録

「飲む、打つ、買う」とは、大酒を飲み、ばくちを打ち、女を買うことで、男が道楽の限りをつくすことをいうそうです。

The phrase "drink, hit, buy" is said to refer to a man indulging himself to the fullest in drinking, gambling, and buying women.

もちろん、この価値観は、今の時代には合わないし、そもそも、このようなイベントはコストが高いです。

Of course, these values do not fit in today's world, and in the first place, such events are costly.

一方、「飲む、打つ、買う」は、男性のシニアエイジングに良い、という話も聞きます。

On the other hand, I hear that "drinking, hitting, and buying" are suitable for senior aging men.

まあ、考えてみれば「適度なアルコール摂取はリラックスとコミュニケーションを生む」し、「ばくちは、脳の活性化を促す」し「恋愛は、もっとも分かりやすいウェルビーイング」です。

Well, if you think about it, "moderate alcohol consumption produces relaxation and communication," "binge drinking stimulates brain activity," and "love is the most apparent well-being.

-----

では、リタイア後に、私が「飲む、打つ、買う」ができるようになるか、と問われると、かなり難しいと思います。

So, if you ask me if I will be able to "drink, hit, and buy" after I retire, I think it will be tough.

どのくらい難しいかというと、『今からトレーニングを開始して、エベレストの登頂を果たす』くらいのイメージです。

How difficult is it? It's like, 'I'm going to start training now, and I'm going to reach the summit of Mount Everest.

-----

「飲む、打つ、買う」の生き方が、私にとって楽しいものであるかは分かりませんが、このような「テンプレされた道楽」に一つも当てはまらない私の人生は、

I don't know if the "drink, hit, buy" way of life is enjoyable for me, but my life doesn't fit into one of these "templated indulgences."

―― あまり楽しいものではない

may not be 'so enjoyable.'

のかもしれません。

-----

私、他人の浮気とかに関してほとんど興味がありません。芸能人が何をやていようがどーでもいいです。

I have very little interest in other people's affairs. I don't care what celebrities do.

ところが、『政治家の浮気』とかには腹が立ちます。

However, I am offended by things like 'cheating on politicians.

『お前、国政を担っていながら、そんな暇があるのかよ』という、おおよそ論理的ではない腹の立てかたをしてしまいます。

It is not logical to say, "You are in charge of national politics. However, do you have time to do that?"

もちろん、夫婦関係にある者が快楽目的で他人と性行為を行うことは、民法上、契約違反として扱われ、不貞を働いた配偶者は損害賠償請求などの対象となります。

Of course, a person in a marital relationship engaging in sexual intercourse with another person for pleasure is treated as a breach of contract under the Civil Code, and the unfaithful spouse is subject to claims for damages and other compensation.

しかし、刑法上は当然に無罪です。

However, under the criminal law, he is naturally innocent.

浮気は当事者間の問題であり、他人である私には関係がないし、口を挟む権利すらありません。

Cheating is a matter between the parties involved, and as a stranger, I have no business or even the right to interfere.

私は、ただ、『私と同じように激務であることが期待されている人が、そういう不貞な性行為をしているという、その余裕に、無性にムカつく』のです。

I'm just irrationally pissed off that someone who is expected to work as hard as I do can afford to engage in such unfaithful sexual behavior.

「私達は『浮気』という行為から、もっとも遠いところに位置している人間ですよ」

 

2023,江端さんの忘備録

私は、小型コンピュータのラズベリーパイ(ラズパイ)を、多く持っていますが、別にこの小型コンピュータが「特別に好き」というわけではないのです。

I have many small Raspberry Pi (Raspi) computers, but I am not "particularly fond" of this tiny computer.

―― 安い、小さい、持ち運べる、クローンの作成が簡単

"Inexpensive, small, portable, easy to clone."

これらが理由です。

These are the reasons.

例えば、小さなデータベースを作るだけなのに、何万円も出してパソコンを購入するなんて、バカらしいです。

For example, spending tens of thousands of yen to buy a computer to create a small database would be foolish.

クラウドは、管理が面倒だし、サイバー攻撃対策が必要ですし、そして、あんまり「安い」とも思えません。

The cloud is cumbersome to manage, requires cyber-attack protection, and doesn't seem very "cheap."

ラズパイは、DIYのノリのサービス構築に、最適です。

The Raspi is ideal for building DIY services.

とは言え、時々、原因不明で壊れます(猛暑の夏に多い)ので、SDカードのバックアップだけは欠かしておりませんが、問題は、どのバックアップだったか忘れてしまう、という問題があります。

However, sometimes they break for unknown reasons (often during the hot summer months), so I do not miss the SD card backups, but the problem is that I forget which backup it was.

-----

ところが最近、この「ラズパイ」が高い。

Recently, however, this "Raspi" is expensive.

ざっくり、以前購入した時の倍の値段になっています。

Roughly double the price of the previous purchase.

私の古いラズパイを、中古で出しても、原価以上で売れそうです。

I can sell my old Raspi for more than the cost, even if I offer it used.

意外なところから、世界的な半導体等の部品不足を、実感しています。

I am experiencing a global shortage of parts for semiconductors and other products from an unexpected source.

■ラズパイ関係の日記

2023,江端さんの忘備録

スマホの普及によって、民間人の様々な日常が撮影され、それがテレビなどで「まとめ番組」として放映されています。

With the widespread use of smartphones, various daily lives of civilians are being filmed, which are then aired as "compilation programs" on television and other media.

これは、コンテンツだけで十分楽しいです。

This is fun enough with content alone.

スタジオのゲストのコメント ―― いりません。

Comments from studio guests -- I don't want any.

クイズ形式のゲストの回答 ―― 全く、いりません。

Quiz-style guest answers -- not at all, no need.

実際に、私、それらの部分は、全部「スキップ」しています。

I "skip" all those parts.

まあ、これは、私の嗜好の問題なので、『ゲストは必要だ』という人もいると思うのです。

Well, this is a matter of my taste, and some people say, 'I need guests.

----

「視聴率」というシステムは、見直す必要があるんじゃないかな、と思います。

I think the "ratings" system needs to be rethought.

最近は、録画した番組の視聴率(タイムシフト視聴率)も測っているようですが、完全自動システムには程遠い感じがします。

Recently, they have also been measuring the ratings of recorded programs (time-shift ratings), but it seems far from a fully automated system.

「CMスキップ」の計測など、比較的簡単にデバイス(テレビやHDDレコーダ)に設置できます。

It is relatively easy to install on a device (TV or HDD recorder), such as measuring "commercial skips."

これを応用すれば、ゲストコメントのスキップなども計測できるはずです。

This could be applied to measure guest comment skips, etc.

でも、今一つ、このシステムは導入されていないようです。

But, this system does not seem to be in place.

まあ、理由は分かります。

Well, I understand why.

「CMスキップ」や「コメントスキップ」が可能になれば、

(1)スポンサーのテレビ番組への投資意欲は激減し、

(2)テレビ局の収入も激減し、

(3)タレントの起用がなくなり、

その結果、

(4)視聴者が選べるコンテンツの数も激減するという ――

If "commercial skipping" and "comment skipping" become available, (1) sponsors' willingness to invest in TV programs will decrease dramatically, (2) TV stations' revenues will also decrease dramatically, (3) TV personalities will no longer be used, and as a result, (4) the number of contents viewers can choose from will also decrease dramatically.

『コモンズの悲劇』やら『囚人のジレンマ』を、リアルに再現するような事態になるからです。

Because it would be a realistic reenactment of the "Tragedy of the Commons" or the "Prisoner's Dilemma."

この枠組みを崩さない最適戦略は、個人的に「CMスキップ」をやり「コメント外し」をやる、ということになるのでしょう。

The optimal strategy that does not break this framework would be personally doing "commercial skipping" and "comment removal."

-----

ちなみに、とある人気テレビドラマで、『最高視聴率40%越え』とか騙っている番組ありましたけど、私は『バカ言え』と呟いていました。

Incidentally, a popular TV drama series was cheating with a "top rating of over 40%," I was muttering to myself, "Talk nonsense.

その時間帯の、公共交通期間の移動人口を調べるだけで、この"40%"がありえないことなど、すぐに分かります。

By examining the number of people traveling during the public transportation period, it is easy to see that this "40%" is impossible.

その"視聴率"とやらの「定義」を知りたいです。

I would like to know the definition of "ratings."

幸せなドラマ

 

未分類

まだ問題山積だけど、golangのCSVパースが通った。

package main

import (
	"encoding/csv"
	"encoding/json"
	"fmt"
	"strings"
)

type Location struct {
	Lat float64 `json:"lat"`
	Lng float64 `json:"lng"`
}

type Record struct {
	ID         int        `json:"id"`
	UserID     int        `json:"user_id"`
	Distance   float64    `json:"distance"`
	Place      []Location `json:"place"`
	Speed      []float64  `json:"speed"`
	Prediction int        `json:"prediction_type"`
	StartAt    string     `json:"start_at"`
	EndAt      string     `json:"end_at"`
}

func main() {
	// 提供されたCSVデータ
	csvData := `50,7,53.04935656638487,"[{""lat"": 34.6653, ""lng"": 135.2241}, {""lat"": 34.6653, ""lng"": 135.2241}, {""lat"": 34.6652, ""lng"": 135.2241}, {""lat"": 34.6652, ""lng"": 135.224}, {""lat"": 34.6651, ""lng"": 135.224}, {""lat"": 34.665, ""lng"": 135.224}, {""lat"": 34.6649, ""lng"": 135.2239}]","[0.0, 0.0001, 0.0002, 0.0002, 0.0004, 0.0004, 0.0004]",1,2023-03-03 07:40:00,2023-03-03 07:43:00`

	// CSVデータを読み込む
	r := csv.NewReader(strings.NewReader(csvData))
	record, err := r.Read()
	if err != nil {
		fmt.Println("CSVデータを読み込めません:", err)
		return
	}

	// CSVデータをパース
	id := record[0]
	userID := record[1]
	distance := record[2]
	placeJSON := record[3]
	speedJSON := record[4]
	prediction := record[5]
	startAt := record[6]
	endAt := record[7]

	// JSONデータをパース
	var place []Location
	if err := json.Unmarshal([]byte(placeJSON), &place); err != nil {
		fmt.Println("Placeデータをパースできません:", err)
		return
	}

	var speed []float64
	if err := json.Unmarshal([]byte(speedJSON), &speed); err != nil {
		fmt.Println("Speedデータをパースできません:", err)
		return
	}

	// パースしたデータを表示
	fmt.Println("ID:", id)
	fmt.Println("User ID:", userID)
	fmt.Println("Distance:", distance)
	fmt.Println("Place:", place)

	// Placeを要素単位で表示
	fmt.Println("Place:")
	for _, loc := range place {
		fmt.Printf("Lat: %.4f, Lng: %.4f\n", loc.Lat, loc.Lng)
	}

	fmt.Println("Speed:", speed)

	// Speedを要素単位で表示
	fmt.Println("\nSpeed:")
	for i, s := range speed {
		fmt.Printf("Index %d: %.4f\n", i, s)
	}

	fmt.Println("Prediction Type:", prediction)
	fmt.Println("Start At:", startAt)
	fmt.Println("End At:", endAt)
}


 

出力結果

ID: 50
User ID: 7
Distance: 53.04935656638487
Place: [{34.6653 135.2241} {34.6653 135.2241} {34.6652 135.2241} {34.6652 135.224} {34.6651 135.224} {34.665 135.224} {34.6649 135.2239}]
Place:
Lat: 34.6653, Lng: 135.2241
Lat: 34.6653, Lng: 135.2241
Lat: 34.6652, Lng: 135.2241
Lat: 34.6652, Lng: 135.2240
Lat: 34.6651, Lng: 135.2240
Lat: 34.6650, Lng: 135.2240
Lat: 34.6649, Lng: 135.2239
Speed: [0 0.0001 0.0002 0.0002 0.0004 0.0004 0.0004]

Speed:
Index 0: 0.0000
Index 1: 0.0001
Index 2: 0.0002
Index 3: 0.0002
Index 4: 0.0004
Index 5: 0.0004
Index 6: 0.0004
Prediction Type: 1
Start At: 2023-03-03 07:40:00
End At: 2023-03-03 07:43:00

2023,江端さんの忘備録

多くの飲食店で、テーブルに備えつけられたタブレットからメニューをオーダーするシステムが、導入されています。

Many restaurants have installed systems allowing customers to order tablet menu items at each table.

今や、そういうシステムがない店舗の方が珍しいくらいです。

Nowadays, finding a restaurant without such a system is so rare.

最低賃金が上がり、人不足が深刻な中、これは当然の流れと言えます。

This is a natural trend, with minimum wages rising and a severe labor shortage.

ただ、言うまでもないのですが、これらのタブレットのインターフェースは、『絶望的なまでに使いにくい』。

But needless to say, the interface of these tablets is 'hopelessly difficult to use.

『このタブレットのインターフェースを設計しているヤツは、バカなのか』と思います ―― かなり本気で。

I think, 'Are the people designing this tablet interface stupid?' -- quite seriously.

しかし、面倒なので、このインターフェースについての批判は割愛します。

However, since it is tedious, I will omit the criticism of this interface.

-----

万人に共通に使いやすい注文システムの究極は ―― 『タブレットを使わない、口頭でのオーダー』、つまり従来通りです。

The ultimate ordering system that is easy for everyone is -- "no tablets, verbal orders," in other words, the same as before.

ですので、現在のタブレット注文システムが、「音声入力」と「生成AI」からなる、音声による自動オーダシステムになっていくことは、ほぼ確実です。

Therefore, it is almost certain that the current tablet ordering system will be replaced by an automated voice-based ordering system consisting of "voice input" and "generated AI.

近い未来、『音声入力生成AIと客が、オーダーの違いで、口論になる』という場面を見られるようになるでしょう。

We will soon see voice input generation AI and customers arguing over different orders.

そして、100%完全録音された会話によって、多くの場合、『客の過失(オーダーのミス)が、簡単に確認される』ということになるでしょう。

And, in many cases, a 100% fully recorded conversation will 'easily confirm the customer's negligence (mistake in ordering).

-----

気になるのは、その開始時期です。

What is of interest is the timing of its service-in.

私は、年内に登場、来年はトライアル期間、再来年あたりには飲食業界では普通になる、という気がしています。

They will appear by the end of the year; next year will be a trial period, and around the year after that, they will become the norm in the food and beverage industry.

『お客様は神様です』の旧態依然の価値観で生きているジジイたちに告ぐ。

2023,江端さんの忘備録

「毎日、料理を作るのが、こんなに大変とは思わなかった」

"I didn't realize how hard it would be to cook a meal daily."

と久々に実家に帰ってきている長女がこぼしています。

My eldest daughter has been home for a long time and is complaining.

実際、『そうだろうなぁ』と思います。

I think, 'I guess so.

私みたいに、思い出した時に、自分が食べたい料理を作るのとは訳が違います。

It differs from cooking a dish you want to eat when you remember it, like I do.

作ってもらった料理に文句を言う人は、『料理を作るタスクの交代を申し出ている』と解釈すべきです。

A person who complains about the food that has been prepared should be interpreted as 'offering to take over the task of preparing the food.

まあ、それはさておき。

Well, let's put that aside.

-----

長女:「もっと、基本的な料理の技術と、料理のバラエティを揃えておくべきだった」

Daughter: "I should have had more basic cooking skills and a better variety of dishes."

私:「いや、それは違うな。料理も含めて全てのタスクは、状況に応じたOJT(On the Job Training)で良いんだよ」

Me: "No, that's not true. All tasks, including cooking, can be done on-the-job training (OJT) depending on the situation."

長女:「でも、基礎力がないと、そこから上がることが難しいんだよ」

Daughter: "But I don't have the basic skills, so moving up from there is hard."

一見、ティーンエイジャの「受験」の話をしているようですが、語っている話題は「料理」です。

At first glance, it seems that we are talking about teenagers' "examinations," but the topic we are talking about is "cooking.

私:「うん、私も、学生のころ『塾』やら『家庭教師』やらのバイトなんぞばかりをやっていたことを、酷く後悔している」

Me: "Yes, I also regret that I had so many part-time jobs, such as "cram school" and "tutoring" when I was a college student.

長女:「?」

Daughter:"?"

私:「小さな定食屋やレストランで、フライパンや鍋を使わせてもらえるようなバイトを、もっと沢山すべきだった。"調理"に関する技術を、もっと学んでおくべきだったと思う」

Me: "I should have had many more part-time jobs in small set menus and restaurants where I was allowed to use pans and pots." I should have learned more about the art of "cooking."

一般的な家庭料理が作れるレベルになっておくことが、いかに重要なことだったか、私のその後の人生で思い知ることになります。

I would later realize how important it was to have a skill level in common home cooking.

『冷蔵庫の中に残っているショボイ食材だけで、一品を作れるかどうか』。男女関係なく、これは重要なことのように思えます。

'Can you make a dish with only the shabby ingredients left in the fridge? This seems to be important regardless of gender.

-----

もっとも、最近は、栄養バランスもよく、美味しく、簡単なパッケージ食(弁当、冷凍食品等)も沢山ありますので、これが、本当に重要なことなのかは、判断が難しいところです。

However, it isn't easy to judge whether this is important since many packaged meals (bento boxes, frozen foods, etc.) are available these days that are delicious and easy to prepare, with good nutritional balance.

ただ、はっきり言えることは、『パッケージ食は、コストが高い』です。

However, what is clear is that 'packaged meals are expensive.

今後の私のリタイアなどを鑑みても、我が家の今後の生活がラクになっていくことは、ありえない話です。

In light of my future retirement, etc., our family's life can't be easier.

『50円で一品作れるか?』という問いに対して、"Yes"と言い続けるための訓練と準備は、怠れないのです。

"Can you make one dish for 50 yen?". We must be trained and prepared to keep saying "Yes.

男子食堂

 

2023,江端さんの技術メモ

Linux でミリ秒まで表示するワンライナー時計

私の場合、コンマ秒までを表示したいので、

while true ; do printf "\r%.10s" `date +%T.%N`; sleep 0.01 ; done

となります。

Ubuntuの端末で文字を大きくするには、以下の方法があります。

端末フォントサイズの変更:
通常、端末のフォントサイズを変更することで文字を大きくできます。以下の手順を実行します:

端末を開きます(通常、Ctrl+Alt+Tで起動します)。
メニューバーから「編集」をクリックし、「プロファイルの設定」を選択します。
「テキスト」タブを選択し、フォントサイズを変更します。

で、まあ、こんな風に簡単に作りました。

ubuntuのGUIでxclockでアナログ時計を表示し、表示し続ける方法