This commit is contained in:
uetchy 2021-11-08 20:40:03 +09:00
parent 6cb2442786
commit fac6f1c2f7
14 changed files with 0 additions and 460 deletions

View File

@ -1,180 +0,0 @@
---
title: 準ソロキャンプ
---
半ブッシュクラフト + バックパックで運べる重量 + 雰囲気重視
# 道具一覧
- テント
- MSR Elixir 1 (Green)
- 標準の白色は虫が集まりやすいためグリーンにした
- 予算があるなら Hubba Hubba NX の方が絶対に良い
- 寝袋
- モンベル ダウンハガー 800 #3
- 5 度を下回ると普通に寝れない
- と思っていたが、サーモライトリアクターを中に入れることで氷点下 2 度の中で寝ることができた
- マット
- Thermarest Z Lite SOL S
- 帆布シートの上に敷いて座布団としても使える
- 敷物
- asobito 綿帆布シート
- そのままだと硬く寒いため銀マットを座布団として使う
- 多少の防水性と耐火性があるため、焚き火・ブッシュクラフトスタイルと相性が良い
- 前室に敷いておけば、寝ている間地面の湿気から荷物を守ってくれる
- 手袋
- グリップスワニー G-1 ブラック
- 燃えている薪でも数秒程度なら持てる
- 柔軟性があるため細かい作業ができる
- ナイフ
- MOSSYOAK 225mm
- 薪割り、木工、着火、料理あらゆる場面で使える
- 木の枝を加工して様々な道具を作れる
- ペグ
- 箸・スプーン・フォーク
- ヘラ
- 串
- フック
- トライポッド
- Y 字スタンド(肉を回転させながら焼くやつ)
- 蚊取り線香の台
- 加工時に発生する木くずは火口として使える
- 状況によってはサブナイフだけでも良い
- サブナイフ
- Victorinox
- ワインオープナーと小型ナイフがメイン用途
- ランタン
- Feuerhand 276
- こだわりが無ければ LED ランタンの方が明るいし便利
- サブランタン
- UCO キャンドルランタン オイル化改造
- ソロキャンであればこれくらいの明るさでも作業できる
- 2 人キャンで 2 人分をカバーするようなことはできない
- 焚き火調理中にフライパンの中の様子を見たいといった場合には厳しい
- 不安定な地面やメッシュテーブルに置くと倒れそうになるのでパーツを自作して補強する必要がある
- ヘッドライト
- Petzl Zipka
- 普通の作業でずり落ちることはない
- 赤色灯が地味に便利で、明順応を軽減する効果がある
- ゴミ袋
- ジップロック
- 基本戦略としてゴミを作らないことが大事
- 野菜などは紙で包んでいくことで焚き火の火口にできる
- iPhone
- ロープワークのリファレンスアプリを入れてオフラインでも参照できるようにする
- 現地までの道案内
- 緊急連絡用
- ポータブルバッテリー(ケーブル内蔵型)
- iPhone の充電
- ヘッドライトの充電
- パラコード
- テントやタープの固定、トライポッド自作、ケトルの吊り下げ、ランタンの吊り下げ、薪の固定等、あらゆる状況で使える
- 1m や 3m のロープを何束か作っておくと便利
- 消毒用アルコール
- トイレットペーパー
## 焚き火
- 斧
- ハスクバーナのキャンプ用斧
- ハンマーとしても使える
- 折りたたみノコギリ
- 薪を現地調達するなら必要
- フェロセリウムロッド
- 趣味
- マグネシウムロッドよりも火花が大きい
- マッチ
- 趣味
- ガストーチ(予備)
- SOTO のマイクロトーチ
- マッチが濡れた場合や雨天時に備えて用意しておく
- 着火剤(予備)
- ピコグリル 398(直火不可能な場合)
- 網を乗せればバーベキューもできる
## 料理
- フライパン
- Turk クラシック 24 cm
- ケトル
- ベルモント アルミケトル 1.2L
- 広口なので  お湯を沸かす以外にも、パスタを茹でたりスープを作ったりして片手鍋のように扱える
- ゴムパーツは焚き火で燃えてしまうのでカッターで除去済み
- ステンレスマグ
- チタン製はお茶の味が損なわれる上に軽すぎて倒れる危険があるため使っていない
- テトラドリップ
- コンパクトなドリッパー
- コーヒー豆は出発前に挽いておくと楽
- Victorinox ウェイター
- ワインや瓶ビールを開けたり、野菜を切るときに使う
- まな板
- MSR の折りたたみまな板 V 字型に折り曲がるため切った材料をフライパンに入れやすい
- 木の板でもなんでも好きなもの使えば良いと思う
- 熱いケトルが置けるため最近は木のまな板を使っている
- ウォーターパック
- エバニュー ウォーターキャリー 2 L(飲料水用)
- モンベルウォーターバッグ 2L(川水用)
- Sawyer Mini 浄水器
- お皿
- 状況に合わせてシェラカップか大きめのステンレス皿を選ぶ
- フォーク
- 木製のフォーク
- 叉の間隔が広いタイプであれば指だけで洗えるため便利
- ケトルに入れっぱなしにしても熱くならない
- 金属製品を傷つけない
- スプーン
- 木製のスプーン
- 主に調理用
- 金属たわし
- 洗剤ミニボトル(50ml)
- 環境にやさしいタイプが良い
- 泡ポンプタイプが楽
- オリーブオイルボトル
- パラフィンシートで蓋を覆っておけば液漏れの心配が無い
- あるいは詰替え用のポンプ or スプレーボトルに入れておく
- 塩・粗挽き黒コショウボトル
- 最低限の味付けができる後はやりたい料理によってバジルやパセリ、タイム、パプリカ等を持っていく
## ボディケア
- ボディケアシート
- 寝る前と起きた後に身体を拭く
- ズボラボのシートで顔を拭けば皮脂も気にならない
- 虫除けスプレー
- ハッカ油系のスプレー
- 目に噴射しないように注意する
- 液体歯磨き
- 耳栓
- フィットさえすれば完全な静寂を得られるため、虫の羽音や他のキャンパーの騒音を心配することがなくなる
- Moldex の中でも Purafit が一番防音性と装着感が高いが、個人差があるため一度全種類試した方が良い
- 絆創膏
## 着替え
- ビーニー(秋冬)
- 就寝用の虫刺され対策にもなる
- ネックウォーマーまたはマフラー(冬)
- 首周りの防寒は大事
- フリースジャケット(冬)
- シェルジャケット(秋冬)
- 寝袋の上に被せることで暖かさを調整できる
- 枕にもなる
- シャツ
- ヘインズ or ヒートテック
- トップス・ボトムスは使い回す
- 下着
- タオル
- 防水サック
- 着替えを入れて枕にできる
- コンタクトレンズ
- メガネ
- 夜トイレに行く場合に必要
# 気分で持っていく道具
- テーブル
- 椅子
- フィールドホッパー
- ホットサンドメーカー
- シングルバーナー
- コッヘル

View File

@ -1,11 +0,0 @@
---
title: "gst: a powerful pal for ghq"
date: 2017-06-02 23:02:00 +09:00
---
[gst](https://github.com/uetchy/gst) is tiny and simple but powerful pal for [ghq](https://github.com/motemen/ghq).
Have you ever imagined what if you know which commits are unpushed or which changes are uncommitted yet, for all the repositories you have cloned on your machine?
You might want to check out my ongoing project `gst`:
it might help you to know what ongoing changes are remained to be committed or pushed among entire your local repositories.

View File

@ -1,21 +0,0 @@
---
title: Node.js ORM Comparison
---
ORM いろいろあるね。
- [prisma/prisma](https://github.com/prisma/prisma) - Modern database access (ORM alternative) for Node.js & TypeScript
- PostgreSQL, MySQL, SQLite
- [mikro-orm/mikro-orm](https://github.com/mikro-orm/mikro-orm) - TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns.
- MongoDB, MySQL, MariaDB, PostgreSQL, SQLite
- [typeorm/typeorm](https://github.com/typeorm/typeorm) - ORM for TypeScript and JavaScript
- MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL
- NodeJS, Browser, Ionic, Cordova and Electron
- [sequelize/sequelize](https://github.com/sequelize/sequelize) - An easy-to-use multi SQL dialect ORM for Node.js
- Postgres, MySQL, MariaDB, SQLite, Microsoft SQL Server.
- [Vincit/objection.js](https://github.com/Vincit/objection.js) - An SQL-friendly ORM for Node.js built on knex.
- PostgreSQL, MySQL, SQLite3
- [knex/knex](https://github.com/knex/knex) - A query builder designed to be flexible, portable, and fun to use.
- PostgreSQL, MySQL, SQLite3

View File

@ -1,29 +0,0 @@
---
title: パケットキャプチャリング
---
- macOS Mojave では、Wi-Fi をオフにしていないと Monitor モードでスキャンしてもパケットが受信できない。
- Preferences > Protocols > IEEE 802.11 で Decrypt Keys を保存する。しかし wpa-psk でハッシュ化された値を保存したほうが安全だ。保存先は`.config/wireshark`
- 暗号化された 802.11 通信を覗くには 4-ways handshake (EAPOL)を観測する必要がある。そのためには対象デバイスの Wi-Fi をトグルすれば良い。
## コマンド
```
tcpdump -i en0 -I
```
で tcp ダンプ
```
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I
```
で現在接続しているネットワークの情報を取得
# Charles
1. Charles で`Proxy > Proxy Settings`を開き、HTTP Proxy の Port を選ぶ。
2. Enable transparet HTTP proxying にチェックする
3. Charles 上で`Help > SSL Proxying > Install Charles Root Certificate on a Mobile Device or Remote Browsers`をクリックし、表示されているアドレスとポートを iOS の`Settings > Wi-Fi > 任意のAP > Proxy`に入力する。
4. iOS で`chls.pro/ssl`にアクセスし、プロファイルをインストール
5. `Settings > General > About > Certificate Trust Settings`で Charles の証明書を信用する。

View File

@ -1,46 +0,0 @@
---
date: 2020-03-16 18:19:11 +0900
title: pixiv SPRING BOOT CAMP 2020
---
[pixiv SPRING BOOT CAMP 2020](https://www.pixiv.co.jp/news/recruit/article/8728/)に参加した。インターン自体が初めてということもあり、普段とは種類の異なる様々な知見を得ることができたので共有したい。
## 選考
選考は Google Hangout Meet を用いたオンラインセッションで実施された。質問内容は以下の通りである。
- 自己紹介
- コースの希望とその理由
- 簡単なコーディングテスト
フロントエンドを希望したため、コーディングテストは JavaScript を用いてフォーム画面を設計するという内容になっていた。
React を用いて MVP を実装し、それからインタビュワーのツッコミを打ち返すという形式であった。
選考結果は次の日に通知された。選考に関するフローは洗練されており、よく設計されているように感じた。
## オリエンテーション
- NDA
- ラジオ体操
- 自己紹介
## 業務
- iMac
- YubiKey
- 課題 1. psd.js の TypeScript 移植
- 課題 2. 通知 API の JSON API 化+React 化
- 同人誌入稿画面のレスポンシブ化
- 新しい入稿フローの提案
### ランチ
- タコライス
- LINE Pay
- PayPay
## 成果発表
## 感想
### 社風

View File

@ -1,83 +0,0 @@
---
title: RSA
---
http://inaz2.hatenablog.com/entry/2013/11/27/225953
```
openssl genrsa 32 > key.pem
openssl rsa -text < key.pem
```
```
modulus: 2608173289 (0x9b7590e9)
publicExponent: 65537 (0x10001)
privateExponent: 1888610089 (0x7091e729)
prime1: 52223 (0xcbff)
prime2: 49943 (0xc317)
exponent1: 1459 (0x5b3)
exponent2: 3417 (0xd59)
coefficient: 17568 (0x44a0)
```
$$\text{modulus} = (\text{prime1} - 1) \cdot (\text{prime2} - 1)$$
publicExponent は modulus とお互いに素な数から選ぶ。65537 で固定、なぜなら二進数で 10000000000000001 となり、ビットがあまり立っておらず計算が早いため。
privateExponent は $\text{publicExponent}^{-1}\ \text{mod}\ \text{modulus}$
## 中国の余剰定理
[定理の詳細](https://ja.wikipedia.org/wiki/中国の剰余定理)
$$
\text{exponent1} = \text{privateExponent} \pmod{\text{prime1} - 1}
$$
$$
\text{exponent2} = \text{privateExponent} \pmod{\text{prime2} - 1}
$$
$$ \text{coefficient} = \text{prime2}^{-1} \pmod{\text{prime1}} $$
これらは復号の簡単化のために用意された係数である。
## 公開鍵の中身
```
openssl rsa -pubout < key.pem > pub.pem
openssl rsa -text -pubin < pub.pem
```
```
Modulus: 2608173289 (0x9b7590e9)
Exponent: 65537 (0x10001)
```
## 暗号
$ \text{source}^\text{publicExponent} \pmod{\text{modulus}} = \text{encryptedText} $
## 復号
$ \text{encryptedText}^\text{privateExponent} \mod \text{modulus} $
# Diffie-Helmann 鍵共有
## 一方向性関数
$ \mathrm{G}^x \mod \mathrm{P} = y $
右辺を求めるのは簡単だが、余り$y$から$x$を求めるのは難しい。
この性質を利用して、$x$に秘密情報を与えて交換することで第三者による復号を防げる。
A は$G^A \mod P$を B に送信
→$(G^A \mod P)^B \mod P = (G^{A \cdot B}) \mod P$
B は$G^B \mod P$を A に送信
→$ (G^B \mod P)^A \mod P = (G^{B \cdot A}) \mod P$
以下の法則を使用しているため、お互いに同一の結果を得られる。
$ (G^A)^B = G^{A \cdot B}$

View File

@ -1,90 +0,0 @@
---
title: Exploratory Data Analysis on Vtubers Live Chat
---
A little experiment and analysis on toxic people floating across YouTube.
# Why
The motivation is straightforward; I just feel sad when they suffered from random toxic chats. The goal is also straightforward: design an automated system spotting toxic chat and quarantine them.
# Data, Data, Data
> I can't make bricks without clay.
> — Sherlock Holmes
I need a myriad of live chat comments and moderation events for the experiment.
Unfortunately, YouTube API does not offer a way to retrieve these kinds of events in real time, which is crucial because live streams are only place we can observe moderators' activities (deletion and BAN). Once it gets archived, these events are no longer available to fetch.
## Collecting Crusts
So, I ended up developing a library to accumulate events from a live stream, with a fancy CLI app mimics live chat. It accepts YouTube video id and save live chats in [JSON Lines](https://jsonlines.org/) format:
```bash
collector <videoId>
```
![](realtime-chat.gif)
A line with white text is a normal chat, red text is a ban event, and yellow text is a deletion event.
I know, that's not scalable at all. A new live stream comes in, I copy and paste video id into the terminal and run the script. How sophisticated.
## Make Bread Rise
Thankfully, there's a great web service around Hololive community: [Holotools](https://hololive.jetri.co). They operate an API that gives us an index of past, ongoing, and upcoming live streams from Hololive talents.
Here I divided my system into two components: Scheduler and workers. Scheduler periodically checks for newly scheduled live streams through Holotools API and create a job to be handled by workers. Workers are responsible for handling jobs and spawning a process to collect live chat events.
At this point, saving chat to text files in JSONL format is just ineffective as the throughput grows tremendously, I've managed to switch its data source to MongoDB.
![](scalability.png)
I run the cluster for a while, and by far it hoards approximately one million comments per day. Now I could reliably run my own bakery.
# Look Before You Leap
Okay now there are five million chats sitting on MongoDB store. Let's take a close look at these before actually starting to build a model.
## Troll's Behavior
## By talent
## By language
# Creating Dataset
## Labelling Toxic Chat
### Utilizing Moderators' Activities
### Browser Extension
### Normalized Co-occurrence Entropy
Shannon Entropy is not enough. So I combined the ideas of [Burrows-Wheeler Transform](https://en.wikipedia.org/wiki/Burrows%E2%80%93Wheeler_transform) and [Run-length Encoding](https://en.wikipedia.org/wiki/Run-length_encoding) to formulate a new entropy which represents "spamminess" of given text.
$$
NCE(T) = \frac{N_T}{RLE_{string}(BWT(T))}
$$
$$
BWT[T,i] = \begin{cases} T[SA[i]-1], & \text{if }SA[i] > 0\\ \$, & \text{otherwise}\end{cases}
$$
### Sentence Encoding
Here's a [t-SNE](https://en.wikipedia.org/wiki/T-distributed_stochastic_neighbor_embedding) visualization for output of Sentence Transformer. Blue dots are spam and orange dots are normal chats.
![](tsne-sentence-encoding.png)
# Learn
## Gradient Boosting
## Neural Networks
# Future
When it's ready, I'm going to publish a dataset and pre-trained model used in this experiment.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB