Skip to content

Instantly share code, notes, and snippets.

# ===============
# navigatge
# ===============
map o Vomnibar.activate
map t Vomnibar.activateInNewTab
map d removeTab
map u restoreTab
map l nextTab
map h previousTab
map zi zoomIn
@nozma
nozma / .lua
Created June 19, 2019 02:47
.hammerspoon
local function keyCode(key, modifiers)
modifiers = modifiers or {}
return function()
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), true):post()
hs.timer.usleep(1000)
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), false):post()
end
end
local function remapKey(modifiers, key, keyCode)
@nozma
nozma / init.lua
Created April 14, 2019 11:06
Hammerspoonの設定
--
-- Hammerspoon用 KeyRemap 設定
--
local function keyCode(key, modifiers)
modifiers = modifiers or {}
return function()
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), true):post()
hs.timer.usleep(1000)
hs.eventtap.event.newKeyEvent(modifiers, string.lower(key), false):post()
@nozma
nozma / swift-example.ipynb
Last active April 9, 2019 22:22
Swift Example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nozma
nozma / file0.r
Last active December 6, 2018 10:36
Rのソートとlocaleについて ref: https://qiita.com/nozma/items/4aea36022ce18a6aa5ca
## データの準備
d <- data.frame(
kana = c("お", "エ", "う", "イ", "あ"),
letter = c("A", "e", "C", "b", "Z"),
stringsAsFactors = FALSE
)
@nozma
nozma / sec08.Rmd
Created November 1, 2018 23:22
Pythonではじめる機械学習 8章
---
title: "8章 おわりに"
author: "R. Ito"
date: "`r Sys.Date()`"
output:
prettydoc::html_pretty:
theme: leonids
highlight: github
---
@nozma
nozma / 5-3-2-4.ipynb
Last active September 27, 2018 03:14
5.3.2.4 不確実性を考慮に入れる
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nozma
nozma / rlist_tutorial.Rmd
Last active August 6, 2018 08:59
rlistのチュートリアル
---
title: "rlist Tutorial"
author: '@nozma'
date: "2018/8/4"
output:
prettydoc::html_pretty:
theme: leonids
highlight: github
keep_md: true
---
@nozma
nozma / 4-4-4-5.ipynb
Created August 1, 2018 12:11
4.4から4.5あたり
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# -*- coding:utf-8 -*-
import re
import os
import requests
import pandas as pd
from bs4 import BeautifulSoup
from urllib.parse import urljoin
# 農薬登録情報速報(http://www.acis.famic.go.jp/searchF/index/index.html)をスクレイピングする
# ※FAMICの免責事項に従ってください(https://www.acis.famic.go.jp/index_kensaku.htm)