Skip to content

Instantly share code, notes, and snippets.

View kamatari's full-sized avatar
🍎
cool

Masahiro Kamata kamatari

🍎
cool
View GitHub Profile
import time
from tqdm import tqdm
items = [1,2,3,4,5,6,7,8,9,10]
def process(item):
time.sleep(1)
for item in tqdm(items):
process(item)
require 'natto'
text = 'すもももももももものうち'
natto = Natto::MeCab.new
natto.parse(text) do |n|
if n.feature.split(',')[0] == '名詞'
puts "#{n.surface}\t#{n.feature}"
end
end
====
すもも 名詞,一般,*,*,*,*,すもも,スモモ,スモモ
sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
irb(main):001:0> true & true
=> true
irb(main):002:0> true & false
=> false
irb(main):003:0> false & true
=> false
irb(main):004:0> false & false
=> false
$ echo '{"Compile":["C","C++","Objective-C"],"Script":["JavaScript","PHP","Perl","Python"]}' |python -mjson.tool
{
"Compile": [
"C",
"C++",
"Objective-C"
],
"Script": [
"JavaScript",
"PHP",
HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
your application:
* Support for Ruby 1.8.6 dropped
* Support for Rails 2 dropped
* Sass filter now always outputs <style> tags
* Data attributes are now hyphenated, not underscored
* html2haml utility moved to the html2haml gem
* Textile and Maruku filters moved to the haml-contrib gem
@kamatari
kamatari / jupyter_box.markdown
Last active September 5, 2015 01:05
anaconda入りjupyter環境 vagrant box
@kamatari
kamatari / anaconda_python_setting.txt
Created June 1, 2015 02:54
anaconda_python_setting
vagrant@vagrant-ubuntu-trusty-64:~$ conda update conda
Fetching package metadata: ....
Solving package specifications: .
Package plan for installation in environment /home/vagrant/anaconda:
The following packages will be downloaded:
package | build
---------------------------|-----------------
conda-env-2.1.4 | py27_0 15 KB
@kamatari
kamatari / vagrant_ipynb.markdown
Last active August 29, 2015 14:22
ipython notebook 環境構築のメモ
@kamatari
kamatari / online_machine_learning.markdown
Last active September 13, 2018 00:02
オンライン機械学習を読みながら書いたメモ

【第一章】導入の話

  • オンライン機械学習の特徴
  • 良い点
  • 学習データを捨てられる、学習速度が速い、学習結果がいつでも使える、実装が簡単、性能解析しやすい
  • 悪い点
  • 学習するデータの順番に結果が大きく依存する  + ノイズに弱い  + しかし、この本を読めばこれらの解決方法が書いてある…!らしい。

#【第二章】数学の話