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
#!/bin/bash | |
# | |
# ブログ記事 (https://y-uti.hatenablog.jp/entry/2016/01/07/154258) の結果から描画用の HTML を出力する bash スクリプトです。 | |
# | |
# [準備] | |
# HTMLDIR を適当に変更して mkdir で作成しておく。 | |
# DATADIR 以下に台風の軌跡データ (T0101.csv など各行が北緯,東経の csv ファイル) を置く。 | |
# クラスタリングの出力結果 (kmedoids_result.txt) を次のように分割する。 | |
# $ head -n 1 kmedoids_result.txt | tr ' ' '\n' >indexes.txt | |
# $ tail -n 1 kmedoids_result.txt | tr ' ' '\n' >medoids.txt |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
require_once __DIR__ . '/vendor/autoload.php'; | |
use Phpml\Classification\SVC; | |
use Phpml\SupportVectorMachine\Kernel; | |
// Load an example dataset published at the web site below | |
// https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html | |
// |
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 | |
/* | |
* A sample program for DBSCAN with haversine as distance | |
* | |
* Requirements | |
* - PHP-ML (https://github.com/php-ai/php-ml) | |
* - php-geospatial (https://github.com/php-geospatial/geospatial) | |
*/ |
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 | |
require_once __DIR__ . '/../vendor/autoload.php'; | |
use \Phpml\Classification\Linear\LogisticRegression; | |
use \Phpml\CrossValidation\StratifiedRandomSplit; | |
use \Phpml\Dataset\Demo\IrisDataset; | |
use \Phpml\Metric\Accuracy; | |
use \Phpml\Metric\ConfusionMatrix; | |
$dataset = new IrisDataset(); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
function test($init, $key = 'a') | |
{ | |
$var = $init; | |
$var[$key] = 1; | |
echo var_export($init, true), ': ', is_array($var) ? 1 : 0, "\n"; | |
} | |
test(null); // OK |
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
--- phpenv-global- 2014-10-13 16:22:28.540097442 +0900 | |
+++ phpenv-global 2014-10-13 18:05:08.943905016 +0900 | |
@@ -44,6 +44,9 @@ | |
# Link Apache apxs lib | |
APXS="" | |
+if [ "${PHPENV_VERSION}" == "system" ]; then | |
+ APXS="$(which apxs 2>/dev/null)" | |
+fi | |
php-config --configure-options 2>/dev/null | grep -q apxs && \ |