Mar 22, 2023
また桜の花を撮る
今日は午前中は野球を見ていた。
今年も大リーグの試合がもうじき始まるので楽しみ。
僕がこのごろ好きなタイプのパンが近所で売り切れているので、探し歩いたがなかった。その途中、公園に桜が咲いていたのでまた撮った。
満開になっているようだ。
その後、3カ月に1度の散髪に行ってきた。
下の英語文はchatGPTによる翻訳です。
Take a picture of cherry blossoms again
I was watching baseball this morning.
I'm looking forward to the start of the MLB season soon this year.
I searched for my favorite type of bread that has been sold out in my neighborhood lately but couldn't find it. On the way, I took a picture of cherry blossoms blooming in the park. It seems to be in full bloom.
After that, I went to get a haircut, which I do once every three months.
Mar 21, 2023
花曇り
今日も、ウチからちょっと歩いたところにあった桜の花を撮った。
電信柱のない道なので、すっきりと撮れる。
ImageMagickによる画像処理のbashのシェルスクリプトは、chatGPTに援護してもらえば素早く作れることがわかったので、また作ってみようと思う。
下の英語文はchatGPTによる翻訳です。
Cloudy with Flowers
Today, I took a picture of the cherry blossoms that were a short walk away from my house.
The road has no telephone poles, so the picture came out clean.
I realized that I can quickly create a shell script for image processing using ImageMagick with the help of ChatGPT, so I plan to make another one.
Mar 20, 2023
桜が咲いた
近所でも桜が咲きはじめている。花見に行くチャンスはこれから1週間というところだろうか。
今日はリモートワークをやっていた。
少し傷んだりんごを安く売っている店を見つけて、りんごを多数買ってこようかな、と思って店先を見ると売り切れていた。
多少傷んでいるぐらいなら、安ければ買いたくなるので売れ行きがいいのだろうか。
その店に行く途中で撮った桜の花。
下の英語の文章はchatGPTで翻訳したものです。
The Cherry Blossoms Have Bloomed
Cherry blossoms have started to bloom in the neighborhood. Perhaps there will be a chance to go cherry blossom viewing in the coming week.
Today, I was working remotely.
I found a store selling slightly damaged apples at a discounted price and thought about buying a large number of them, but when I looked at the storefront, they were sold out.
If they're only slightly damaged and cheap, I wonder if they sell well since I would want to buy them.
Here is a picture of cherry blossoms that I took on the way to that store.
Mar 19, 2023
最後にゴミの処理
3つのスクリプトで、テキストの整理はできたが、ゴミが残ってしまった。
それを削除するスクリプトをchatGPTに聞いてみた。
ちょっとエレガントではない処理だが、手作業で削除するより、一回のコマンドでできるので楽。
bashでカレントディレクトリの「all.txt」というテキストファイルにある次の部分を削除するにはどうしたらいいでしょうか?
1. <!--を含む行を改行コードごと削除します。
2. -->を含む行を改行コードごと削除します。
3. 行頭にAがある行を改行コードごと削除します。
4. 行頭に■がある行を改行コードごと削除します。
5. ◆を含む行を改行コードごと削除します。
新しくできたファイルは「new_all.txt」として保存してください。
Mar 18, 2023
文字コードをiconvで変換する
一昨日書いた手順の、
1. まず文字コードがshift-jisだったので、utf-8に変換する。
chatGPTへの質問:bashで、カレントディレクトリのすべてのファイルの文字コードをutf-8にする方法を教えてください。その際、新たにディレクトリを作り、文字コードを変換したすべてのファイル名前にプレフィックスをつけて、そのディレクトリに収めたいです。
--------------------------------
#!/bin/bash
mkdir converted_files # 新しいディレクトリを作成する
for file in * # カレントディレクトリ内のすべてのファイルに対して繰り返す
do
if [-f"$file"] # ファイルの場合のみ処理を行う
then
iconv -f $(file-b--mime-encoding"$file")-tutf-8"$file">"converted_files/utf8_$file" # 文字コードをUTF-8に変換し、プレフィックスをつけたファイル名で新しいディレクトリに保存する
fi
done
--------------------------------
chatGPTの説明:このスクリプトでは、iconvコマンドを使用して文字コードを変換します。また、ファイルの文字コードを判定するために、fileコマンドを使用しています。最後に、変換後のファイルを保存するディレクトリを作成し、プレフィックスをつけてファイルを保存しています。
補足:最初上のコードでうまくいかなかった感じ? だったので、-tの前に「-f SJIS」を加えてうまくいった。でも、いいかげんにやっているので、上のコードを使うときには注意してください。ぼくがやったときには、うまくいって、ぜんぶutf-8に変換できた。
(コピー時、コードのインデントが汚なくなったので、コードを使う場合は、上と同じような質問をchatGPTにして、結果をコピーしてください。上のコードをコピーして使う場合は、空白がないところがあります。下の画像の結果を見て挿入してください)
Mar 17, 2023
HTMLタグを取り除く
逆順だが、
2. すべてのhtmlタグを取り除く。
についてchatGPTに聞いてみた。
その様子は下のスクリーンキャプチャで読める。
「bashで、カレントディレクトリのすべてのファイルのhtmlタグを削除した、テキストにしてください。その際、新しくディレクトリを作成して、ファイルのサフィックスを「.txt」にして、収めてください」と尋ねた。
表示されているコードでうまくいくが、コードを得る場合、同じ質問をchatGPTにしてください。シェルスクリプトは「chmod 700 ファイル名」として実行属性を持たせる必要がある。またプロンプトからのコマンドは頭に「./」を付ける必要がある。
I asked ChatGPT about the following task, which is listed in reverse order:
2. Remove all HTML tags.
A screenshot of the conversation can be seen below. I asked, "In bash, please remove all HTML tags from all files in the current directory, create a new directory, save the files as text files with the suffix '.txt' and put them in the new directory."
Mar 16, 2023
awkの1行野郎
青空文庫で公開している「週刊詩」を、すべてAIで英語に翻訳して1冊の本にしようという計画が頭に浮かんだ。
うっかりテキストファイルがどこかに行ってしまったので、サイトにあるHTMLファイルを、chatGPTを使って加工して1つのファイルにすることにした。
1. まず文字コードがshift-sだったので、utf-8に変換する。
2. すべてのhtmlタグを取り除く。
3. 200以上あるテキストファイルを一つにまとめる。
まず3.から。
これはコマンドライン1行でうまくいく。
コマンドラインラインです。
cat $(find . -maxdepth 1 -type f -name "*.txt" | sort) | awk 'BEGIN{RS="";ORS="\n\n\n\n"}{print}' > all.txt
下の文章はchatGPTで英語に翻訳しています。
Awk One-Liner
The idea came to mind to translate all the "Weekly Poems" available on Aozora Bunko into English using AI and compile them into a single book. Since the text file had accidentally gone missing, I decided to use chatGPT to combine them into one file.
First, since the character code was shift-s, I converted it to utf-8. Then, I removed all the HTML tags. Finally, I consolidated over 200 text files into one.
Let's start with step 3. This can be done with a single command line. I'll add it here tomorrow as it's difficult to write it down now.
Mar 15, 2023
Bondeeに入ってみた
最近評判になっているので、好奇心からBondeeに登録してみた。
まだよくわからないが、限定された人数で長屋みたいな感じのあるSNSらしい。
Linux版はなさそうなので、スマホアプリを使った。
アバターでチャットできるのだろう。
(下の英語文はchatGPTで翻訳したものです)
I tried signing up for Bondee
It's been getting popular lately, so out of curiosity, I registered for Bondee.
I don't really understand it yet, but it seems like an SNS with a limited number of people and a kind of tenement-like feel.
Since there doesn't seem to be a Linux version, I used the smartphone app.
I suppose you can chat with avatars.
Mar 14, 2023
水仙と雪柳
今日は電子本を作ったりしていた。
InDesignで組む本があるので、明日ぐらいから始めようと思う。1冊は『からくり絵本』『月夜に 象がはしごを上っていく』『トラセミ・バッジ』の3連作をまとめたもの、もう1冊は『顔面島』のシリーズをまとめたもの。初めの連作は次の作品もできているが、これも単独でいずれ1冊作ろうと思う。
ほかに、5月の文学フリマに持っていくものを作る予定。
近所で水仙と雪柳が盛んに咲いている場所があるので、撮ってみた。
(下の英語文はchatGPTで翻訳したものです)
Daffodils and Snowy Willows
Today, I was working on creating an e-book. I have a book to design in InDesign, so I'm planning to start from tomorrow. One book will be a compilation of a trilogy consisting of "Karukuri Picture Book," "An Elephant Climbing a Ladder on a Moonlit Night," and "Tracemi Badge," and the other book will be a compilation of the "Facial Island" series. The first trilogy to be compiled has a new fourth work, but I plan to create a standalone book for it eventually.
Additionally, I plan to create something to bring to the Literature Flea Market in May.
I took some photos of daffodils and snowy willows that are blooming vigorously in a nearby location.
Mar 13, 2023
これもネモフィラ
あっというまに園芸店でも生き生きとした春の花の入荷が増えて、彩りが増している。
このネモフィラは、よく見るネモフィラと違った花で、たぶん品種改良で作り出されたのだろう。
今日はリモートワークをやっていた。
(下の英語文はchatGPTで翻訳したものです)
This is also Nemophila
Suddenly, lively spring flowers have been arriving at garden shops and adding more colors. This Nemophila has a different flower from the familiar one, probably created through breeding.
Today, I was doing remote work.
Mar 12, 2023
錦蝶の花
数本出た錦蝶の花穂の一つが、冬を越してしぶとく花が咲いた。
写真以外の花穂は枯れてしまったが、これだけはしっかりした花で種もできそうに見える。夜、撮ってみた。
(下の英語文はchatGPTで翻訳したものです)
The flowers of the Nishikicho
One of the flower spikes of the Nishikicho, which had grown several stems, bloomed tenaciously through the winter.
Although the other flower spikes have withered away, this one has strong flowers that appear capable of producing seeds. I took a picture of it at night.
Mar 11, 2023
水仙がたくさん咲いている
近所で数種類の水仙を見かける。大きめのラッパ水仙。
水仙も早春の花。
今日は暖かかった。夜、近所に買い物に行くときもジャケットは着なかった。
(下の英語文はchatGPTで翻訳したものです)
There are many daffodils blooming. I see several types of daffodils in the neighborhood, including the larger trumpet daffodils. Daffodils are also flowers of early spring.
It was warm today. Even when I went shopping in the neighborhood at night, I didn't wear a jacket.
Mar 10, 2023
えんどう豆
朝の散歩でえんどう豆のプランターを見かけた。
スイートピーなどよりは地味だが、マメ科の花はきれいなものが多い。
藤の花はその最高峰かもしれない。山の雑木林で、派手でなく数房で慎ましく下がっている藤もいい。
そら豆の花も懐かしい。畑の周りに並んで植えてあるところを思い出す。
マメ科の植物は土を肥やすのもおもしろい。
(下の英語文はchatGPTで翻訳したものです)
Peas
During my morning walk, I came across a planter of peas. While they may not be as flashy as sweet peas, many pea plants have beautiful flowers in the legume family. Wisteria may be the pinnacle of this type of flower. Even more subdued than showy clusters of wisteria hanging modestly in the mixed deciduous forests of mountainsides. The nostalgic flowers of the broad bean are also charming. I remember seeing them planted around the fields. It's also interesting to note that legume plants are good for enriching the soil.
Mar 09, 2023
ムスカリが咲いた
ベランダのプランターでムスカリが咲きはじめると、いよいよ春は確定的に進んでいく。
朝、数本の花が一気に咲いているのを見つけた。
1週間もたてば、満開になるだろう。
毎朝、散歩して花を撮ってインスタグラムなどに投稿することにしているが、簡単にいい花が見つけられる。
chatGPTは説明を読むと、Linux上でツールを作りたくなってくる。
perlで小さいツールはいくつも作ったが、おさらいの意味で、今まで作って便利だったものをchatGPTに聞いて作り直してみてもいい。なにしろすぐに応えてくれるので、心理的負荷がない。
翻訳も水のように流れてくるので、時間的負荷がない。
たぶん、創作系AIとしての実力もだいぶあるので、そのあたりを試してみたい。自分の書くものはAIに通過させないが、それは藤井聡太が、対局ではAIは使えないというのと同じこと。
もう、あらゆる創作はAIで作ったものとの境目はわからない。AIでこねくり回すことに加えて実際人間が推敲してこねくり回して、果たして驚くべきものができるかどうか? やってみる価値がある、というのではなく、すでに競争が始まったのではないだろうか。
The Muscari have bloomed
When Muscari begins to bloom in the balcony planter, it's a sure sign that spring is advancing. I found several flowers blooming at once this morning. In a week, they will be in full bloom. I make it a habit to take a walk every morning and take pictures of the flowers to post on Instagram, and it's easy to find good ones.
After reading the instructions, ChatGPT felt the desire to create a tool on Linux. Although many small tools have been created in Perl, it might be good to ask ChatGPT to recreate the ones that have been created for review. After all, there is no psychological burden since ChatGPT responds immediately, and there is no time pressure since the translation flows like water.
Perhaps ChatGPT has considerable ability as a creative AI, so it would be interesting to try that out. Although I won't let the AI pass what I write, it's like Shogi player Sota Fujii saying that he won't use AI in his games.
It's already difficult to distinguish between creative works made by humans and those made by AI. Will it be possible to create amazing things by kneading and refining the work done by both AI and human? It's not just worth trying, but the competition has already begun.
Mar 08, 2023
下北沢を歩く
久しぶりに下北沢を歩いた。
高架線になって「開かずの踏切問題」が解消されている。
しゃれた古着を売る店がかなり増えていたが、元の下北沢の雰囲気はそのままだった。自由が丘よりも、若者層が多いように思う。
今朝は、蒸しパンのようなチョコレート系のパンに、糖分制限チョコを挟んで食べた。硬いものをときどき食べることは、歯や歯茎にいいのではないかとこのごろ感じる。とくに歯茎は締まるのではないだろうか?
Walking in Shimokitazawa
I walked in Shimokitazawa after a long time. The "closed level crossing problem" has been resolved since it became an elevated railway. There were quite a few shops selling stylish vintage clothes, but the original atmosphere of Shimokitazawa remained the same. I think there are more young people here than in Jiyugaoka.
This morning, I ate a chocolate bread that was like steamed bun, with sugar-restricted chocolate in between. Lately, I feel that occasionally eating hard things is good for my teeth and gums. Especially, wouldn't it make the gums tighten up?