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
<source> | |
type tail | |
tag apache.access | |
format apache2 | |
path /path/to/your/log | |
read_from_head true #過去ログ用。ファイルの先頭から読む | |
</source> | |
<match apache.access> | |
type elasticsearch |
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
------------------------------------------------------------------- | |
test_in_exec.rb | |
------------------------------------------------------------------- | |
Run options: | |
# Running tests: | |
...... | |
Finished tests in 8.276824s, 0.7249 tests/s, 1.8123 assertions/s. |
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
library(ggplot2) | |
library(dplyr) | |
library(scrapeR) | |
strata_speakers <- "http://strataconf.com/big-data-conference-ca-2015/public/schedule/speakers" | |
speaker_page <- | |
scrape(url=strata_speakers, | |
parse=T, headers=T) | |
href <- xpathSApply(speaker_page[[strata_speakers]], "//a/@href") | |
href <- unique(href) |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 10.
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
"","avg_points","num_reviews","time","date","title","location","category" | |
"1",4,1,"10:40a","02/20/2015","The IoT P2P Backbone","LL21 E/F","Machine Data / IoT" | |
"2",4.4,10,"11:30a","02/19/2015","Unboxing Data Startups","LL20 BC","Business & Industry" | |
"3",3.57,7,"11:30a","02/20/2015","The Sushi Principle: Raw Data Is Better","LL21 E/F","Machine Data / IoT" | |
"4",4,1,"2:20p","02/20/2015","Streaming Analytics: It's Not The Same Game","LL21 E/F","Machine Data / IoT" | |
"5",3.25,16,"1:30p","02/18/2015","Building A Data Platform","210 C/G","Hadoop Platform" | |
"6",NA,0,"11:30a","02/20/2015","Silicon Valley Data Science: Ask Us Anything","211 B","Ask Us Anything" | |
"7",4,1,"10:40a","02/20/2015","Credit Suisse Puts Vendors in the Hot Seat on Data Quality and Governance","230 B","Sponsored" | |
"8",4.86,7,"9:00a","02/18/2015","Hardcore Data Science","LL20 BC","Hardcore Data Science" | |
"9",4,6,"1:30p","02/18/2015","Tensor Methods for Large-scale Unsupervised Learning: Applications to Topic and Community Modeling","LL20 BC.","Hardcore D |
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
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c | |
index a7ec5d7..89b1287 100644 | |
--- a/Zend/zend_ini.c | |
+++ b/Zend/zend_ini.c | |
@@ -83,6 +83,23 @@ static int zend_restore_ini_entry_wrapper(zend_ini_entry **ini_entry TSRMLS_DC) | |
} | |
/* }}} */ | |
+static uint zend_trim_after_carriage_return(char *value, uint value_length) /* {{{ */ | |
+{ |
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
Index: ext/openssl/openssl.c | |
=================================================================== | |
--- ext/openssl/openssl.c (revision 323312) | |
+++ ext/openssl/openssl.c (working copy) | |
@@ -4801,6 +4801,11 @@ | |
base64_str = (char*)php_base64_decode((unsigned char*)data, data_len, &base64_str_len); | |
data_len = base64_str_len; | |
data = base64_str; | |
+ | |
+ if (data == NULL) { |
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
#!/usr/bin/env php | |
<?php | |
function get_watchers($login, $repo) { | |
$per_page = 100; // this is the max set by github http://developer.github.com/v3/#pagination | |
$page_number = 1; | |
$watchers = array(); | |
while (1) { | |
$ch = curl_init(sprintf('https://api.github.com/repos/%s/%s/watchers?page=%d&per_page=%d', |
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/sh | |
HN_FILE='hn.html' | |
HN="http://news.ycombinator.com" | |
rm -f $HN_FILE | |
wget "$HN" -O $HN_FILE | |
if [ -f $HN_FILE ] | |
then | |
perl -ne 'while (m!<td class="title"><a href="(http[^"]+)">(?:.*?)</a><span class="comhead"> \(([^)]+)\) </span></td></tr><tr><td colspan=2></td>(?:<td class="subtext"><span id=score_\d+>(\d+) points</span> by <a href="user\?id=[^"]+">(?:.*?)</a> (\d+) (minute|hour|day)s? ago \| <a href="item\?id=\d+">(\d+) comments?</a>)?!g) { print "$1 $2"; if (defined $3) { print " $3 $4 $5 $6"; } print "\n"; }' < $HN_FILE | |
else |
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 random_array(&$current) { | |
foreach ($current as $k => &$v) { | |
if ((rand() % 10) / 10 >= 0.68) { | |
$v = array(0, 'aoiyu', 1337); | |
random_array($v); | |
} | |
} | |
unset($v); |
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
-- 1.1.1 all users v. active users -- | |
td query -w -d book_crossing_dataset " | |
SELECT t1.cnt AS all_users, t2.cnt AS active_users, ROUND(t2.cnt/t1.cnt*100) AS active_rate | |
FROM | |
( | |
SELECT COUNT(distinct user_id) as cnt, 1 AS one | |
FROM users | |
) t1 | |
JOIN | |
( |