Skip to content

Instantly share code, notes, and snippets.

View chezou's full-sized avatar

Aki Ariga chezou

View GitHub Profile
@chezou
chezou / rand.dig
Created May 8, 2019 04:17
Parallel example with py> operator
+t1_1:
py>: rand.rand_params
docker:
image: 'digdag/digdag-python:3.6.8-stretch'
n_iter: 5
+t1_2:
echo>: ${param_list}
+t1_3:
@chezou
chezou / calc_multiclass_precision_recall.sql
Last active March 15, 2019 06:26
Calculate multiclass micro/macro precision and recall in SQL
with agg as (
select
p.label, p.probability, t.survived
from
prediction_rf p
join
test t on (p.rowid = t.rowid)
order by
probability desc
),
@chezou
chezou / R_env.frozen.yml
Last active January 31, 2019 00:18
Conda environment for R parcel
name: R_env
channels:
- conda-forge
- defaults
dependencies:
- arrow-cpp=0.12.0=py37h0e61e49_0
- attrs=18.2.0=py_0
- backcall=0.1.0=py_0
- binutils_impl_linux-64=2.31.1=h6176602_1
- binutils_linux-64=2.31.1=h6176602_3
@chezou
chezou / backspace_stats_2.ipynb
Created January 28, 2019 15:36
backspace_stats_2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chezou
chezou / backspace_stats.ipynb
Last active December 22, 2018 15:46
backspace.fm のtitleとshow noteのword cloudによる可視化
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chezou
chezou / natto-test.rb
Created November 25, 2018 15:15
mecab windows 64bit
ENV["MECAB_PATH"]='C:\\mecab\\libmecab.dll'
require 'natto'
nm = Natto::MeCab.new
puts nm.parse('俺の名前は星野豊だ!!そこんとこヨロシク!')
@chezou
chezou / mecab-build.log
Last active November 22, 2018 14:13
mecab windows 64 bit build failure
C:\Users\chezo\source\mecab\mecab\src>nmake -f Makefile.msvc
Microsoft(R) Program Maintenance Utility Version 14.16.27023.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl.exe /EHsc /O2 /GL /GA /Ob2 /nologo /W3 /MT /Zi /wd4800 /wd4305 /wd4244 -I. -I.. -D_CRT_SECURE_NO_DEPRECATE -DMECAB_USE_THREAD -DDLL_EXPORT -DHAVE_GETENV -DHAVE_WINDOWS_H -DDIC_VERSION=@DIC_VERSION@ -DVERSION="\"@VERSION@\"" -DPACKAGE="\"mecab\"" -DUNICODE -D_UNICODE -DMECAB_DEFAULT_RC="\"c:\\Program Files\\mecab\\etc\\mecabrc\"" -c feature_index.cpp
feature_index.cpp
feature_index.cpp(80): error C3861: 'WPATH_FORCE': 識別子が見つかりませんでした
feature_index.cpp(356): error C2593: 'operator <<' があいまいです。
c:\users\chezo\source\mecab\mecab\src\string_buffer.h(55): note: 'MeCab::StringBuffer &MeCab::StringBuffer::operator <<(unsigned char)' の可能性があります