| 更新: | 2014-11-20 |
|---|---|
| バージョン: | 0.0.5 |
| 作者: | @voluntas |
| URL: | http://voluntas.github.io/ |
概要
| from pyspark import SparkContext | |
| import numpy as np | |
| from sklearn.cross_validation import train_test_split, Bootstrap | |
| from sklearn.datasets import make_classification | |
| from sklearn.metrics import accuracy_score | |
| from sklearn.tree import DecisionTreeClassifier | |
| def run(sc): |
| #!/bin/bash | |
| foo=${1:-hoge} | |
| echo $foo #$1がなかったらhogeをデフォルト値としてfooに代入する | |
| #var自身にデフォルト値としてhogeを代入としたいので以下のように書きたい | |
| ${var:=hoge} #このままでは、hogeが展開されてしまって、hogeなんてコマンドはないとシェル怒られる | |
| echo "1:$var" | |
| var= |
| 更新: | 2014-11-20 |
|---|---|
| バージョン: | 0.0.5 |
| 作者: | @voluntas |
| URL: | http://voluntas.github.io/ |
概要
| #!/bin/bash | |
| # | |
| # Bash script to setup headless Selenium (uses Xvfb and Chrome) | |
| # (Tested on Ubuntu 12.04) trying on ubuntu server 14.04 | |
| # Add Google Chrome's repo to sources.list | |
| echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list | |
| # Install Google's public key used for signing packages (e.g. Chrome) | |
| # (Source: http://www.google.com/linuxrepositories/) |
This list is based on aliases_spec.rb.
You can see also Module: RSpec::Matchers API.
| matcher | aliased to | description |
|---|---|---|
| a_truthy_value | be_truthy | a truthy value |
| a_falsey_value | be_falsey | a falsey value |
| be_falsy | be_falsey | be falsy |
| a_falsy_value | be_falsey | a falsy value |
| 作: | @voluntas |
|---|---|
| バージョン: | 1.0.5 |
| url: | http://voluntas.github.io/ |
2014 年 9 月 26 日に行われた gumistudy#20 の発表資料です
| sudo yum install libmpc-devel mpfr-devel gmp-devel | |
| cd ~/Downloads | |
| curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O | |
| tar xvfj gcc-4.9.2.tar.bz2 | |
| cd gcc-4.9.2 | |
| ./configure --disable-multilib --enable-languages=c,c++ | |
| make -j 4 | |
| make install |
Get Git log in JSON format
git log --pretty=format:'{%n "commit": "%H",%n "abbreviated_commit": "%h",%n "tree": "%T",%n "abbreviated_tree": "%t",%n "parent": "%P",%n "abbreviated_parent": "%p",%n "refs": "%D",%n "encoding": "%e",%n "subject": "%s",%n "sanitized_subject_line": "%f",%n "body": "%b",%n "commit_notes": "%N",%n "verification_flag": "%G?",%n "signer": "%GS",%n "signer_key": "%GK",%n "author": {%n "name": "%aN",%n "email": "%aE",%n "date": "%aD"%n },%n "commiter": {%n "name": "%cN",%n "email": "%cE",%n "date": "%cD"%n }%n},'The only information that aren't fetched are:
%B: raw body (unwrapped subject and body)%GG: raw verification message from GPG for a signed commit