This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gitリポジトリで管理しているWordPressプラグインを | |
SVNリポジトリと同期しておく方法について miya0001 さんからアドバイスもらった。 | |
rsync不勉強なので忘れないようにメモメモ | |
``` | |
rsyncの時に余計なファイルを持ってかないように.bash_profileに以下のように入れとくと便利。 | |
alias rsync="rsync -avz --exclude=\".svn\" --exclude=\".DS_Store\" --exclude=\".git\"" | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# 利用例 | |
# $ php genGantaiData.php > data.txt | |
$n = 30; | |
echo $n . PHP_EOL; | |
$data1 = output($n); | |
echo $data1[0] . PHP_EOL; | |
echo $data1[1] . PHP_EOL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from natto import MeCab | |
mc = MeCab() | |
# テキストは cookbiz.jp より | |
text = "お仕事については基本的には店舗に配属してからのOJTが中心となりますが、先輩スタッフがしっかりとサポートしてくれるので、どなたも安心してお仕事していただけます。2013年には本社内に開発室を設置。店舗配属前にもトレーニングを行なってから実際の店舗に配属されるなど、サポート体制がしっかりと整っているのも当社の魅力。実際、経験が浅い方や未経験スタートのスタッフも多数活躍中!" | |
print ('Input text:\n'+text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ time php test01.php | |
real 0m0.213s | |
user 0m0.063s | |
sys 0m0.039s | |
$ time php test02.php | |
real 0m0.083s | |
user 0m0.050s | |
sys 0m0.020s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ node -v | |
v8.11.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generated by mBlock5 for HaloCode | |
# codes make you happy | |
import event, halo | |
import urequests | |
# initialize variables | |
wifi_ready = 0 | |
on = 0 | |
ENDPOINT = "http://xx.xx.xx.xx/api/H1lG5096CkoA023qmfo************/groups/n/action" |
気象庁の気温データ5年分を一つのCSVにしたくて作ったスクリプトです。
- ダウンロード制限のために、一度にダウンロードできるのは1メトリクスにつき1年分が限界
- 最初に3行、CSVファイルの説明文が入っている
- データのヘッダー行が日本語
- エンコーディングがShift_JIS
以上の制約があったので、機械学習で使いやすいCSVに変換するスクリプトを作りました。
ご自由にお使いください。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rekidai = [ | |
'歴代内閣総理大臣', | |
'伊藤博文', | |
'黒田清隆', | |
'山縣有朋', | |
'松方正義', | |
'伊藤博文', | |
'松方正義', | |
'伊藤博文', | |
'大隈重信', |
OlderNewer