Skip to content

Instantly share code, notes, and snippets.

View tnoda's full-sized avatar

Takahiro Noda tnoda

View GitHub Profile
@tnoda
tnoda / e-stat_cities.csv
Created December 7, 2020 13:47
e-Stat から市区町村データをダウンロードして整形したときの記録
city_code prefecture city pop age working_age_pop daytime_pop
1100 北海道 札幌市 1952356 46.4 1235516 1959740
1202 北海道 函館市 265979 52.7 152154 273408
1203 北海道 小樽市 121924 56.5 65317 124293
1204 北海道 旭川市 339605 51.9 191423 341732
1205 北海道 室蘭市 88564 52.5 49005 96865
1206 北海道 釧路市 174742 51.4 101909 175733
1207 北海道 帯広市 169327 47.6 103890 175954
1208 北海道 北見市 121226 50.9 70781 121080
1209 北海道 夕張市 8843 64.4 4045 9104
@tnoda
tnoda / jp_cities_with_code.csv
Created December 7, 2020 12:59
日本の市区町村の標準地域コードの一覧が雑に欲しい
city_code prefecture city
1000 北海道 北海道
1100 北海道 札幌市
1101 北海道 中央区
1102 北海道 北区
1103 北海道 東区
1104 北海道 白石区
1105 北海道 豊平区
1106 北海道 南区
1107 北海道 西区
Coursera
coursera.com *
_ 1st-party script
_ cloudfront.net *
@tnoda
tnoda / talk1.org
Created November 5, 2015 06:35
Scala もくもく会 LT スライドのソースコード #scala_kb

プログラミング言語は C++ が最強。異論は認めない

@tnoda
tnoda / sequential-command.el
Last active October 26, 2015 16:25
Private fork from http://emacswiki.org/emacs/sequential-command.el, the original version retrieved on Oct 26 2015.
;;; sequential-command.el --- Many commands into one command
;; Copyright (C) 2009 rubikitch
;; Author: rubikitch <rubikitch@ruby-lang.org>
;; Keywords: convenience, lisp
;; Copyright (c) 2015 Takahiro Noda
;; Version: 1.3.1
;; URL: https://gist.github.com/tnoda/49797ef440b7a2166986
@tnoda
tnoda / iwami.clj
Created August 18, 2015 06:01
Spigot サーバに Clojure の REPL を組み込んで立ち上げる
(ns tnoda.iwami
(:gen-class)
(:import (org.bukkit.craftbukkit Main))
(:require [clojure.tools.nrepl.server :as nrepl-server]))
(defonce server (atom nil))
(defn- nrepl-host
[]
(or (System/getenv "NREPL_HOST") "127.0.0.1"))
@tnoda
tnoda / croquettes.clj
Created July 20, 2015 09:45
コロッケ食べ放題
(ns tnoda.eat.croquettes
(:import (org.openqa.selenium By)
(org.openqa.selenium.firefox FirefoxDriver)
(org.openqa.selenium.interactions Actions)))
(defn -main
"Eats more than one thousand pieces of croquettes"
[& args]
(let [driver (doto (FirefoxDriver.)
(.get "http://vnctst.tir.jp/op0012-4/"))
@tnoda
tnoda / log
Created June 10, 2015 08:10
Installed Emacs 24.5 on Ubuntu 14.04 trusty
$ ./configure --with-x --with-x-toolkit=no --prefix=/opt/emacs
Configured for `x86_64-unknown-linux-gnu'.
Where should the build process find the source code? .
What compiler should emacs be built with? gcc -std=gnu99 -g3 -O2
Should Emacs use the GNU version of malloc? yes
(Using Doug Lea's new malloc from the GNU C Library.)
Should Emacs use a relocating allocator for buffers? no
Should Emacs use mmap(2) for buffer allocation? no
@tnoda
tnoda / agenda.org
Created March 30, 2015 01:41
3/31 gen-class 勉強会@HaLake プログラム案

gen-class 勉強会 プログラム

No.タイトル担当レベル
1Java のクラスの作り方@tnoda\_未経験者
2Docstring 逐条講義@tnoda\_ビギナー
3gen-class の内部実装の話@athos0220上級者
4アノテーションの使い方@tnoda\_中級者
5gen-class クイズ@tnoda\_中級者
(let [N (read-line)
digits (map #(Character/digit % 10) N)
m3 (rem (apply + digits) 3)
m5 (rem (last digits) 5)
answer (cond
(and (zero? m3) (zero? m5)) "Fizz Buzz"
(zero? m3) "Fizz"
(zero? m5) "Buzz"
:else N)]
(println answer))