komo_fr
https://gyazo.com/b6608f9ff193b80eb8c25a30875b33b4
Pythonとネットワーク構造が好きです
もくもく会や機械学習関連の論文読み会などにいます
英語と数学とコンピュータサイエンスを再勉強中
SNS
個人で作っているもの
PEP (Python Enhancement Proposal) 同士の参照関係を可視化するページ
忙しくなると知らず知らずのうちに部屋が荒れるからAIでなんとかするPJ
部屋の荒れ具合を画像認識で判定する
お仕事
新人時代
医療情報システムの設計・実装
1〜3人程度の少人数メンバで回すPJ
C# (サーバサイド), Objective-C (iOSネイティブ) メインで、時々JavaやJavaScript
新人過ぎた頃
Pythonを使ったデータ活用(全社横断的なお仕事)とか画像認識とか
今まで話したこと
今までのイベントでの発表のまとめ (PyConJP, SciPyJapan, EuroPython, その他のイベント)
記事
活動を紹介してもらったり、コラムを寄稿したりした記事のまとめ
原稿のレビューをした書籍
たまに書籍(主にPythonの技術書)の原稿レビューに参加しています
その他
OSS活動
UserScript
code:script.js
import '/api/code/daiiz/omakase-links/script.js'
const loadTitles = ({useLinks}) => {
fetch(/api/pages/${scrapbox.Project.name}/search/titles, {
credentials: 'same-origin'
}).then(res => {
return res.json()
}).then(data => {
let titles = data.map(p => p.title)
if (useLinks) {
data.map(p => {
p.links.map(l => {if (!titles.includes(l)) titles.push(l)})
})
}
titles = titles.sort((a, b) => b.length - a.length)
window.titles = titles
console.log('omakase-links-✨: load titles, links')
scrapbox.PopupMenu.addButton({
onClick: autoLink
})
})
}
// 既に記法になっているなどの理由で、置換すべきでない範囲を取得する
const detectLocked = text => {
const syntax = /\[*\.+?\\]*/g const locked = text.split('').map(c => false)
let res
while (res = syntax.exec(text)) {
}
return locked
}
const autoLink = text => {
if (!window.titles || !text) return text
const locked = detectLocked(text)
const matched = text.split('').map(c => null)
for (const title of window.titles) {
const regexp = new RegExp(escapeTitle(title), 'gi')
let res, found = false
while (!found && (res = regexp.exec(text))) {
const idx = res.index
if (matchedidx === null && !lockedidx) { found = true
for (let i = 0; i < len; i++) {
if (i === 0 || i === len - 1) {
if (i === 0) c = [${c}
if (i === len - 1) c = ${c}]
} else {
}
}
}
}
}
// 無駄にテロメアがupdateされるのを防ぐ為、何も置換しない時は何も返さない
if (matched.join('').length === 0) return
// 配列matchedでnullの位置を、元のtextの文字に置き換える
return matched.map((c, idx) => c === null ? textidx : c).join('') }
const escapeTitle = title => {
return title.replace(/[$-\/?-^{|}/g, '\\$&') }
// 置換候補をリアルタイムで更新できないのがツライところ
// しかし、毎回API呼んでると時間かかるので、ひとまず妥協
if (!window.titles) loadTitles({useLinks: true})