# 202410 ## audible ping - `% ping -a 1.1.1.1` - `% echo '\a'` ``` -A Audible. Output a bell (ASCII 0x07) character when no packet is received before the next packet is transmitted. To cater for round-trip times that are longer than the interval between transmissions, further missing packets cause a bell only if the maximum number of unreceived packets has increased. -a Audible. Include a bell (ASCII 0x07) character in the output when any packet is received. This option is ignored if other format options are present. ``` ## [UNIX今日の技/index](https://lab.kuas.ac.jp/~ippei94da/unixtodaystips/index.html) - [経験値倉庫](https://lab.kuas.ac.jp/~ippei94da/index.html) ## [水曜日のダウンタウン説ジェネレータ | devroom](https://devroom.azurewebsites.net/Generator/Wednesday) ## aliasで引数を取りたい - csh/tcshでいう `\!*` とか - 結局bashもzshも `alias hoge='(){echo $@}'` とかfunction化するしかないっぽい. ## [Python3.13で登場したGIL無効化オプションを試してみた|Tak](https://note.com/wa1st_tak/n/n4197b37bd9c4) ## [“つないだその先、豊かな未来へ Full Ahead!全速前進!”海底ケーブルを敷設し、そして守り続けていく使命を背負う企業 | NTT技術ジャーナル](https://journal.ntt.co.jp/article/29843) ## [db tech showcase | crazy about database technology](https://www.db-tech-showcase.com/) ## [OpenObserve | Open Source Observability Platform for Logs, Metrics, Traces, and More – Your Ultimate Dashboard for Alerts and Insights](https://openobserve.ai/) ## pythonでmainを定義するのはなぜか ``` def a(): pass def main(): return 0 if __name__ == "__main__": sys.exit(main()) ``` というよくあるパターン.この形式にするメリットがいくつかある - `if __name__ == "__main__":` で実行を制御することでimportしても単体として呼び出しても利用できる - このブロックなしに生で描くと,importで呼び出されても実行されてしまう - `def main():` して `if __name__ == "__main__":` から呼ぶことでvariablesのスコープを明らかにできる - `if __name__ == "__main__":` に `main()` の処理を展開して書いてしまうと,variablesがglobalになってしまうので,`def main()` して閉じ込められるメリットがある - 上記のような機能的な部分もありつつ,単に"見やすい"などの理由で採用されることもしばしば. ## [Suno](https://suno.com/) ## [Udio | AI Music Generator - Official Website](https://www.udio.com/) ## [JPAAWGについて](https://www.jpaawg.org/index.html) ## [BERMAS(バーマス)公式サイト | 高機能スーツケースとビジネスバッグ](https://www.bermas.co.jp/) ## [Cloudflare の新しいロードバランサ Pingora を試してみる - Cybozu Inside Out | サイボウズエンジニアのブログ](https://blog.cybozu.io/entry/2024/10/01/170000#Pingora-%E5%85%A5%E9%96%80) ## [opensdn – Open Fabric Networking for All!](https://opensdn.io/) ## [Windows 仮想マシンの TPM 通信をキャプチャ・改ざんする](https://io.cyberdefense.jp/entry/tpmproxy-qemu-swtpm/) ## [会議のファシリテーションをほめてもらった - Mitsuyuki.Shiiba](https://bufferings.hatenablog.com/entry/2024/09/11/235421) ## [OWASP Foundation, the Open Source Foundation for Application Security | OWASP Foundation](https://owasp.org/) ## [ハンロンの剃刀 - Wikipedia](https://ja.wikipedia.org/wiki/%E3%83%8F%E3%83%B3%E3%83%AD%E3%83%B3%E3%81%AE%E5%89%83%E5%88%80) ## [IAM permissions reference | IAM Documentation | Google Cloud](https://cloud.google.com/iam/docs/permissions-reference) - GCPの権限とロールの組み合わせを検索できる. ## [GitHub - omarryhan/aiogoogle: Async Google API Client + Async Google Auth](https://github.com/omarryhan/aiogoogle) - [Google APIs Explorer | Google for Developers](https://developers.google.com/apis-explorer) ## [GitHub - nttcom/ksot: Network IaC using Go](https://github.com/nttcom/ksot) ## [Rui Ueyama on X: "ifやforループで済むところをポリモーフィズムやコールバックを使って書く必要はない というか多くの場合は普通にifやループで書いてくれた方が読みやすい気がする" / X](https://x.com/rui314/status/1844350118054834393) ## [Declarative Network API | nmstate](https://nmstate.io/) ## [CommVault、日本のクラウド市場獲得を狙う ~CTCがNTTコミュニケーションズのクラウド環境上でSimpanaの動作対応を確認~ | CommVault Systems Japan株式会社のプレスリリース](https://www.dreamnews.jp/press/0000078203/) - [第一回、最新!データ統合管理ソリューション CommVault Simpana のご紹介! - ネットワールド らぼ](https://blogs.networld.co.jp/entry/commvault-simpa-33ec?_gl=1*1xup3x2*_gcl_au*NDM0MDQyNzUzLjE3Mjg2NzQ4NTA.) ## appolicationでlistenさせるIPでなにが変わるのかの再整理 - 0.0.0.0/0, localhost, 127.0.0.1, 10.0.0.1(interface address) など様々な指定方法があるが,それぞれどう違うのかを再整理 ## pythonでmutable objectを引数とかで渡すときの注意 - mutable objectに対して変更を加える場合に注意が必要 - mutable objectに対してmehtod内部で変更を加える場合,`copy.copy()`, `copy.deepcopy()`, default引数をmutableにせず`None`等にして内部処理で初期化する,などの工夫が必要. - リストは `copy.copy()` のほか,slice `hoge[:]` でも `copy.copy()` と同様の操作が可能. ``` >>> _headers = ["Title", "Description", "Remarks"] >>> print(_headers) ['Title', 'Description', 'Remarks'] >>> print(id(_headers)) 4298737984 >>> >>> _headers = _headers[:] >>> print(_headers) ['Title', 'Description', 'Remarks'] >>> print(id(_headers)) 4299265024 ``` - default argに注意 - デフォルト引数の評価は定義したときにしかされない. - 定義時にdefualt引数の右辺のmutable objectのidを参照する形で初期化されると考える. - [うぉ!Pythonで引数のデフォルト値をミュータブルな型にした結果 #初心者 - Qiita](https://qiita.com/Vermee81/items/eb6c43cae896b3a3bb48) - [Pythonの関数でmutableなデフォルト引数を設定した際の挙動を確認してみる | DevelopersIO](https://dev.classmethod.jp/articles/python_func_default_arg/) - [8. 複合文 (compound statement) — Python 3.12.7 ドキュメント](https://docs.python.org/ja/3.12/reference/compound_stmts.html#function-definitions) ``` デフォルト引数値は関数定義が実行されるときに左から右へ評価されます。 これは、デフォルト引数の式は関数が定義されるときにただ一度だけ評価され、同じ "計算済みの" 値が呼び出しのたびに使用されることを意味します。この仕様を理解しておくことは特に、デフォルト引数値がリストや辞書のようなミュータブルなオブジェクトであるときに重要です: 関数がこのオブジェクトを変更 (例えばリストに要素を追加) すると、このデフォルト引数値が変更の影響を受けてしまします。一般には、これは意図しない動作です。このような動作を避けるには、デフォルト値として None を使い、この値を関数本体の中で明示的にテストします。例えば以下のようにします: def whats_on_the_telly(penguin=None): if penguin is None: penguin = [] penguin.append("property of the zoo") return penguin ``` - `None` で受けて中で初期化するべき ``` >>> def test_method(data=[]): ... data += ["append"] ... return data ... >>> print(test_method()) ['append'] >>> print(test_method()) ['append', 'append'] >>> ``` ``` >>> def test_method(data=None): ... data = [] if data is None else data ... data += ["append"] ... return data ... >>> print(test_method()) ['append'] >>> print(test_method()) ['append'] >>> ``` ## qcow2を小さくする - zero埋め領域の開放,圧縮 - `qemu-img convert -O qcow2 hoge.qcow2.orig hoge.qcow2` - zero埋めされた領域が省略される - つまり,diskができるだけzero埋めされていたほうが小さくなる. - filesystem上から削除されていても,実体として消えてないとimageとしては未開放扱いにみえるので,ddとかでfs的に開放されているが実体が残っている領域をzero埋めするとより効率が良い `dd if=/dev/zero of=/tmp/hoge && rm -f /tmp/hoge` - `qemu-img convert -c -O qcow2 hoge.qcow2.orig hoge.qcow2` - compress付き `'-c' indicates that target image must be compressed (qcow format only)` - 事前事後確認 - `qemu-img info hoge.qcow2` - image sizeとか実領域sizeがわかる ## [VERSANT|本当に話せる英語力の証明](https://www.versant.jp/) ## [浅葱さんのブログ indent の反対は outdent?](http://prasinos.blog2.fc2.com/blog-entry-236.html) ## [Cloudflare の新しいロードバランサ Pingora を試してみる - Cybozu Inside Out | サイボウズエンジニアのブログ](https://blog.cybozu.io/entry/2024/10/01/170000#Pingora-%E5%85%A5%E9%96%80) - [GitHub - cloudflare/pingora: A library for building fast, reliable and evolvable network services.](https://github.com/cloudflare/pingora) ## [GitHub - secretlint/secretlint: Pluggable linting tool to prevent committing credential.](https://github.com/secretlint/secretlint) ## [【30時間で合格】統計検定準1級の攻略法【最速合格体験記】|ざきさん](https://note.com/zakisan/n/n16073e023980) ## [Googlefan](https://googlefan.net/) ## [CloudNativePG · GitHub](https://github.com/cloudnative-pg) ## [k8s 上に OpenObserve を構築してクラスタのログを可視化する](https://zenn.dev/zenogawa/articles/k8s_openobserve) ## [ビジネスパーソンの本革ブランド|ビジネスレザーファクトリー](https://business-leather.com/) ## [python - Escaping strings for use in XML - Stack Overflow](https://stackoverflow.com/questions/1546717/escaping-strings-for-use-in-xml) ## [フラッシュストレージioDriveの性能と信頼性 | Think IT(シンクイット)](https://thinkit.co.jp/story/2014/02/19/4825?nopaging=1) ## [Replit – Build software faster](https://replit.com/) ## [ファミコンは高性能という話に思うこと - 神殿岸2](https://kandatas.hatenablog.com/entry/2024/10/14/205941) ## [Behind AWS S3’s Massive Scale](https://highscalability.com/behind-aws-s3s-massive-scale/) ## コンデンサマイクのファンタム電源とプラグインパワーの違い - ファンタム電源: (12V, 24V,) 48V, DC12~52V - プラグインパワー: 2〜5Vとか1〜7V程度でメーカーによってまちまち - ref: [[映像クリエイターが知るべき録音術]Vol.02 誤解が多いマイクの種類と用途について考える - PRONEWS : 動画制作のあらゆる情報が集まるトータルガイド](https://jp.pronews.com/column/202005271100156738.html) - よく使われるシリーズ - SM58 - BETA58A - SM63 - [1119 :ファンタムパワーとプラグインパワーは全く違いますよ | ShinさんのPA工作室 (Shin's PA workshop)](https://ameblo.jp/shin-aiai/entry-10831218710.html) - [プラグインパワー(バイアス)とファンタム電源の違い - SHURE](https://service.shure.com/s/article/difference-between-bias-plug-in-power-and-phantom-power?language=ja) - `ファンタム電源は、バランスオーディオ信号と同じワイヤー上に、DC12~52Vを乗せます。` - `プラグインパワーでは、安価なコンデンサーマイクロホン内部のJFET電源用にDC5Vを供給します。` ## [MySQLの照合順序の設定をそろそろちゃんと整理しておく #Database - Qiita](https://qiita.com/iwasakik/items/e5e3ce50ad26692269a7) ``` utf8mb4 文字コード bin コードのまま general MySQL独自規則 unicode Unicode 4.0.0 unicode_0520 Unicode 5.2.0 0900 Unicode 9.0.0 ja_0900 Unicode 9.0.0 + 日本語 ai Accent Insensitive アクセント違いを区別しない as Accent Sensitive アクセント違いを区別する ci Case Insensitive 大文字小文字を区別しない cs Case Sensitive 大文字小文字は区別する ks Kana Sensitive カタカナひらがなを区別する ``` - [MySQLのutf8mb4とUTF-16のサロゲートペア - 雑記帳](https://yoneyore.hatenablog.com/entry/2020/05/29/021719) ``` 現在のOracle Databaseでも、CESU-8を「UTF8」として、「普通のUTF-8」を「AL32UTF8」として扱っているため注意を要する。 MySQLでも「utf8」を指定した場合は4オクテット列が扱えず、CESU-8相当の符号化を必要とする (4オクテット列対応のUTF-8は「utf8mb4」として別途定義されているが、MySQL 5.5.3以降でないと使用できない[9])。 ``` MYSQLにおける `utf-8` は `utf8mb3` 相当(3bytes max)の意味なので,MYSQL 5.5.3以降サポートの `utf8mb4` で4bytes対応(通常のutf-8)させることでサロゲートペア(CESU-8)を利用せず一般的な4bytes maxのutf-8で扱うことができる utf-8にサロゲートペアなんてない!はおおむねあっているが,このCESU-8(Compatibility Encoding Scheme for UTF-16: 8-Bit)の世界においては存在する(utf-16でサロゲートペアが必要なコードポイントに対して,CESU-8のペアを用いずに別のバイト(U+10000–U+10FFFFの符号位置)にmapする方式もある).歴史的経緯(unicode2.0, BMPのサポート(BMPは3bytesで表現できるため))によりutf-8のバイト長は3bytes maxとされていたところから,4bytes maxと変更された(unicode 3.1の拡張領域のサポート)ことによる. - ユニコード戦記あたりを読むと良い - utf-32が最も考えやすいが,固定長で効率が良くない. - utf-16と同様にendian, BOMのありなしがある. - utf-16だと基本的には2bytes固定長(UCS-2)であるためutf-32よりは効率がよいが,サポートするコードポイント範囲の増加により表現しきれず,サロゲートペア(UCS-4)を用いた計4bytesにより1文字を表現するものがある. - endianが2通りあり,決定的なものとしてutf-16be(big endian), utf-16le(little endian)がある(これらにはBOMは付与されない(が,付与されていた場合でも独自に解釈するものもある)). BOM(byte order mark, U+FEFF)が先頭に付与させ,これを用いてBE/LEを区別させるものをutf-16と呼ぶ. - utf-8ではMSBの有無によりasciiとそれ以外を区別し,上位ビットのビットパターンによってバイト長が異なる可変バイト長により表現する. - 定義はISO/IEC 10646(UCS Transformation Format 8), Unicode(Unicode Transformation Format-8).コード重複範囲において互換性がある. - つくったのはken thompson - [Reflections on Trusting Trust - KEN THOMPSON, Apr. 1984](https://www.cs.cmu.edu/~rdriley/487/papers/Thompson_1984_ReflectionsonTrustingTrust.pdf) - [Unicodeがどんな風にUTF-8に割当てられているか - 備忘帳 - オレンジ工房](https://orange-factory.com/dnf/unicode.html) - [(プログラマのための) いまさら聞けない標準規格の話 第1回 文字コード概要編 | オブジェクトの広場](https://www.ogis-ri.co.jp/otc/hiroba/technical/program_standards/part1.html) - [Unicode―文字コード入門―](https://www.shuiren.org/chuden/teach/code/main8.htm) ## [MegaLinter by OX Security](https://megalinter.io/latest/) ## [GitHub - Stengo/DeskPad: A virtual monitor for screen sharing](https://github.com/Stengo/DeskPad) ## [原因]と[要求される結果]が,(数学的な解釈とは異なる概念としての)必要十分条件あたりを考えるうえでのベン図のイメージがしやすいかも ## [PageSpeed Insights](https://pagespeed.web.dev/) ## [GitHubのReleaseから最新のassetsを表示したり、ダウンロードしたりする。 · GitHub](https://gist.github.com/fuji44/4ba6e412e253309c8fddba4486e34e2e) ## [Load balancing and scaling long-lived connections in Kubernetes](https://learnk8s.io/kubernetes-long-lived-connections) ## [Resolving downtime during rolling Single Page Application deployments – tylerrussell.dev](https://tylerrussell.dev/2024/01/22/resolving-downtime-during-rolling-single-page-application-deployments/) ## [WarBirds](http://www.warbirds.jp/index1.html) ## [Authentication using kubernetes service account JWTs · マークン](https://szabo.jp/2021/05/24/authentication-using-k8s-service-account-jwts/) ## [Accessing the Kubernetes API from a Pod | Kubernetes](https://kubernetes.io/docs/tasks/run-application/access-api-from-pod/) ## [python/kubernetes/base/config/incluster_config.py at f414832bb05b946eb1758df12f08806b44dd315e · kubernetes-client/python · GitHub](https://github.com/kubernetes-client/python/blob/f414832bb05b946eb1758df12f08806b44dd315e/kubernetes/base/config/incluster_config.py#L37) ## [Using RBAC Authorization | Kubernetes](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) ## [Kubernetes API Concepts | Kubernetes](https://kubernetes.io/docs/reference/using-api/api-concepts/) ## [ロボットの自由度 | 安長電機株式会社](https://www.yasnaga.co.jp/techinfo/automation-information/robot-flexibility/) - 人間の腕は7自由度あるという話 ``` <人の腕の自由度> 人の腕の動きを自由度で表すと、以下の7つとなります。 001.jpg002.jpg003.jpg004.jpg ①肩の前後の動き ②肩の左右の動き ③上腕を捻る動き ④肘の曲げ伸ばし ⑤前腕を捻る動き ⑥手首を手のひら方向に曲げる ⑦手首を横に動かす よって、人の腕の動きは7自由度で構成されているということです。 7つの自由度を持つことで、6自由度と比べ「楽な姿勢」を取れたり、「狭い場所での移動」が容易になります。(※3) <7軸ロボットの利点> 人の腕と同じ動きができるということで、6軸の自由度に肘の角度の自由度を加えた7軸のロボットも用途により活躍しています。 ```