Skip to content

Instantly share code, notes, and snippets.

@iwasa-kosui
iwasa-kosui / google_ime_dictionary_gitmoji.txt
Created February 24, 2023 09:25
gitmoji for Google IME 辞書
きのう ✨ feat: 短縮よみ
りむーぶ 🔥 feat: 短縮よみ
りふぁくた ♻ refactor: 短縮よみ
むーぶ 🚚 refactor: 短縮よみ
りねーむ 🚚 refactor: 短縮よみ
ばぐ 🐛 fix: 短縮よみ
ふぃっくす 🐛 fix: 短縮よみ
ふぃっくす 🚑 fix: 短縮よみ
ほっとふぃっくす 🚑 fix: 短縮よみ
いぞん ➕ chore: 短縮よみ
@iwasa-kosui
iwasa-kosui / how-you-will-be-billed-with-big-query.user.js
Last active February 5, 2022 09:15
BigQuery での課金額を表示する UserScript
// ==UserScript==
// @name How you will be billied with BigQuery
// @version 0.1
// @description BigQuery での課金額を表示します
// @author Kosui Iwasa
// @match https://console.cloud.google.com/bigquery*
// @icon https://www.google.com/s2/favicons?domain=google.com
// @grant none
// ==/UserScript==
@iwasa-kosui
iwasa-kosui / find-2ch-trip.js
Last active June 20, 2021 17:04
2ch のトリップを探す
const generateTrip = require('2ch-trip');
const crypto = require('crypto');
const createRandomValue = () => {
const S = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
const N = 10
return Array.from(crypto.randomBytes(N)).map((n)=>S[n%S.length]).join('')
}
const createRandomTrip = () => {
@iwasa-kosui
iwasa-kosui / ナップザック問題をDPテーブルで解くやつ.ts
Last active June 4, 2021 08:23
ナップザック問題をDPテーブルで解くやつ
/*
* n 個の 0 を格納する配列を返します
*/
const initArray = (n: number) => (new Array(n)).fill(0)
const items = [[2,3],[1,2],[3,6],[2,1],[1,3],[5,85]].map(item => ({
weight: item[0],
value: item[1],
}))
@iwasa-kosui
iwasa-kosui / DOMTreeRender.js
Last active May 10, 2019 03:26
DOMTreeRender
const renderDomTree = ((node, depth=0) => {
// Say <YO>
console.log(`${' '.repeat(depth)}<${node.tagName}>`)
// Say about YO's children recursively
let childNodes = Array.from(node.childNodes)
if (childNodes !== undefined) {
childNodes
.filter(childNode => childNode.tagName !== undefined)
.map(childNode => fuck(childNode, depth + 1))
@iwasa-kosui
iwasa-kosui / yasashi.py
Created February 16, 2019 13:24
優しい言葉ジェネレータ
def 優しい言葉ジェネレータ():
while True:
for c in "優しい言葉":
yield c
def main():
for word in 優しい言葉ジェネレータ():
print(word)
@iwasa-kosui
iwasa-kosui / install-lem-to-macos.md
Last active January 30, 2019 02:33
Install lem to macOS

lem

Common Lisp editor/IDE with high expansibility https://github.com/cxxxr/lem

Install lem to macOS

brew install lem
brew install roswell
brew install ncurses
echo 'export PATH=$PATH:~/.roswell/bin' &gt;&gt; ~/.zshrc
@iwasa-kosui
iwasa-kosui / altair_3min_tutorial.md
Last active January 13, 2019 10:14
Altair 3分チュートリアル

インストール

$ brew tap homebrew/cask
$ brew cask install chromedriver
$ pip install altair selenium pandas

折れ線グラフを表示する

Amazon, IBM, Google, Apple の銘柄ごとの株価をグラフ化

@iwasa-kosui
iwasa-kosui / keybase.md
Created December 1, 2018 15:58
keybase.md

Keybase proof

I hereby claim:

  • I am ebiebievidence on github.
  • I am ebiebievidence (https://keybase.io/ebiebievidence) on keybase.
  • I have a public key ASA_HMSM6cdfKOmhl0n1So6nlUAXrb8cf2bVM5c4yOGTsAo

To claim this, I am signing this object:

from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return "Hello World"
if __name__ == "__main__":
app.run(host="0.0.0.0")