AIãã¯ãã«
みんなPlaggerで作ってたよ(id:jnaoyaとか) - laisoのコメント / はてなブックマーク
ãã¼ããããAI ã¨ã¡ããã¾ããã
ãããããPlagger ã§å®è£ ããã¦ãããã©ãããå®å ¨ã«å¿ãããã¼ã
ã¯ã¦ãªè¨æ³ãå¿ãã¦ãã¼ããã¼ã
ããä»æ¥ã¯ããããèªè»¢è»ã®ã®ã¢ã«æ²¹ããã¦ãå¯ããã¼ã
ã»ãªã
tree again
lib âââ Amon2 â   âââ Config â   â   âââ Simple.pm â   âââ Declare.pm â   âââ Plugin â   â   âââ LogDispatch.pm â   â   âââ Web â   â   âââ CSRFDefiender.pm â   â   âââ FillInForm.pm â   â   âââ FillInFormLite.pm â   â   âââ HTTPSession.pm â   â   âââ JSON.pm â   â   âââ MobileAgent.pm â   â   âââ MobileCharset.pm â   â   âââ NoCache.pm â   âââ Trigger.pm â   âââ Util.pm â   âââ Web â   â   âââ Dispatcher â   â   â   âââ Lite.pm â   â   â   âââ RouterSimple.pm â   â   âââ Request.pm â   â   âââ Response.pm â   âââ Web.pm âââ Amon2.pm
tree
- tree v1.5.3 (c) 1996 - 2009 by Steve Baker, Thomas Moore, Francesc Rocher, Kyosuke Tokoro
- iTerm 0.20.20101110
- Google Chrome 7.0.517.44
foo âââ bar âââ baz âââ qux
CTO ã®åº§ã奪ããã¦ãã¼ãâ¦
ä¹
ã
ã®æ¥è¨ã§ãæ¯åº¦ã°ãã°ããããã¤ã¤ãªã¼ãæ¸ããã¦ããããã
ã¾ããããã¦ããæ¸ããã«ã¯ããããã£ããããã©ã
ãã®æ¥è¨ãè¦ã¨ãã°ãããã¨ããããã©ãªãåãã¯ã¦ãªã§å¦ç´å§å¡ã¯ããã¦ãã 5 å¹´ã«ããªããããªãã
ãã¿ãã¿ã
ãã®ãªãæ¨æ¥ãªãid:naoya åããããè¾ããã¼ãã¦ããã¦ããããï¼
ããã§ãªãåãªãid:jkondo ã«ãªããããå¦ç´å§å¡é£½ãããã¼ãåããããã CTO ãããã¤ãããããã¼ï¼ï¼ãã¦ãããããã
ããããªãid:jkondoãã¯åã«ä½ã¦è¨ããã£ãã¨ãããï¼
åç¬ãã§ãªãããããªãããåãã¹ã¿ãã«ã CTO ã«ãªãã«æ±ºã¾ã£ã¨ããããã¯ã¬ããã£ãããªãã¨æããããã£ã¦ããã°ããã
ãã¦ã
ãã¼ããã
縮ã¿ããã£ããã
ä½ãï¼ä½ãã¦è¨ããã¸ãã
ãããªãã¨è¨ããã id:reikon ã«æãããã
はてなのCTOを引き継ぎます - stanaka's blog
CTO 就任ããã§ã¨ãï¼id:stanaka
ã¾ããããã¦ã id:stanaka ã¯æ±äº¬ã«ããããã京é½ã«ããåãªããã¨ã¯ããããã£ã¡ã ãã¯é¡åããã¸ããã©ãid:stanaka ãã¤ã³ãã©ã®ç¥ããããªãCTO ã«æ±ºã¾ã£ãã¼è¨ããã¦ãæå¥ã¯è¨ãã¸ããã
ã¾ããå¦ç´å§å¡é£½ãããã§ãid:naoya ãè¦ç¿ã£ã¦åãã¯ã¦ãªè¾ããããªãã
ãã㧠GREE ã«å¯¾æã㦠DeNA ã§ãå
¥ã£ããããªãã³ãã
ãã£ã¨ãã¢ããªãã¨æããã¨ããã¨ããã¤ãã®èªè»¢è»ã«æ²¹ããæéãã
ã»ãªã
æ·»åãã®2
http://kokogiko.net/m/archives/001966.html
å¥ã«å¼ã°ãã¦ã¸ããã©ããªãããªãããã¯ã¢ã«ã³ã¨æã£ãã
my %analyze = ( 'Pattern 1' => 'Pattern 1', 'Pattern 2' => 'Pattern 2', 'Pattern 3' => 'Pattern 3', .... 'Pattern N' => 'Pattern N', ); my @analyzekey = keys %analyze; my @analyzeval = map { $analyze{$_} } @analyzekey; my $reg = "(?:".join("|",@analyzekey).")"; $reg = qr/$reg/; while (my $log = $logs->readline()) { if (($log->{ua}) && ($log->{ua} =~ /$reg/)) { my ($pattern) = map { $analyzeval[$_-1] } grep { eval "\$$_" } (1..$#analyzeval+1); # Do hoge hoge for $pattern } }
ãããªãã¾ããª
my @analyzekey = keys %analyze; my @analyzeval = map { $analyze{$_} } @analyzekey;
ããããããã©ãªãvalues ããã®ä½¿ã£ããããã¨æã£ã¦ãã
my @analyzeval = values %analyze;
çµæä¸ç·ãã§ã
my $reg = "(?:".join("|",@analyzekey).")";
ãããããã¯ã¡ããããã
ãã¨ã§ãã¿ã¼ã³ããããããã«ã¯å¾æ¹åç
§åºæ¥ãããã«ãã¨ããªãããã®ã¨ã¡ããï¼
(?:Pattern 1|Pattern 3|Pattern N|Pattern 2)
ã£ã¦ãªãã§ã
(?:(Pattern 1)|(Pattern 3)|(Pattern N)|(Pattern 2))
ããããããªãããããã
my $reg = sprintf('(?:%s)', join('|', map { "($_)" } @analyzekey));
ãããªããã¨ããããããã¨ã¡ãããï¼
$reg = qr/$reg/;
ãããªããã¨ã§
$log->{ua} =~ /$reg/
ãããªããã¦ãããã£ããããæå³ãªããã¨ã¡ãããï¼
my ($pattern) = map { $analyzeval[$_-1] } grep { eval "\$$_" } (1..$#analyzeval+1);
ããã¯ãããã®ã¯ã·ããã³ã³ãããã
eval() ã¦éãããã
éãã«ã¼ãã®ä¸ã§ eval() ã¯çµ¶å¯¾ãã£ãããããã¨æãã§ã
(1..$#analyzeval+1);
scalar() 使ãã¨ããªããããã scalar ã³ã³ããã¹ãã§ããã¨è¦ç´ æ°ã«ãªããã
(1 .. @analyzeval);
ã§ãããããã
ãã¨ãä¸è¡ã§æ¸ãã¦ãªããå°ç¶ºéºã«ã¾ã¨ã¾ã£ãæã£ã¦ãããç¥ãããã©ãªã
my ($pattern) =
ä¸åããè¦ç´ ãæãã§ããªãã®ã«ãª
grep { eval "\$$_" } (1..$#analyzeval+1);
ãããè¦ç´ æ°ã¶ãã«ã¼ãã㦠eval() ãã¦ããã¡ãããï¼
ä¸åããå¤ã欲ãããªãã«ããããããã$1 ã true ã«ãªã£ã¦ããN åã¶ãã«ã¼ãããããããã¨ãã¼ã£ã¨ undef ã£ã½ãå¤ã eval() ããããã
ãå®æãªã«ã¼ãããããã¬ãè¨ãã¨ãåããã£ã¦ããã¢ã«ã³ããã
ãã£ãããªããªã
ãããã eval() ã¯ãããã
ãã£ãããã¿ã¼ã³ããããããåç
§é
åãåºæ¥ããããããããã¤ãããããã¨æãã§ã
$reg = qr/$reg/; while (my $log = $logs->readline()) { if ($log->{ua}) { my @jitensha = $log->{ua} =~ $reg; next unless @jitensha; my $pattern; for my $i (0 .. $#jitensha) { if (defined $jitensha[$i]) { $pattern = $analyzeval[$i]; last; } } # Do hoge hoge for $pattern } }
ãããã¨ããããä¸å¿å ¨é¨ã«ã¼ããããã eval() ã¨ããããããããã£ã¨éãããã
ãããè¨ãã¦ãã¯ã·ã®èªè»¢è»ã®éãã«ã¯ããªãããã©ãªã
ãã¼ã大å¡ããã¿ããã«å«ã¯ã欲ãããªã¼ã
â»ãã®ã¨ã³ããªã¯J'sHeadPetã«ããèªåæ稿ã§ã
æå®å¿ãã¦ãã
http://q.hatena.ne.jp/1149501410
ããããã©ã次ã®äººã®æå®å¿ãããã
ã¡ããã¨ã§ãã¡ãã£ã¨ãã¡ããã¡ãããã©ãããã§æå®ãã¨ããã£ãããããã¨ã¡ããããªã
ããããªã¼ããªã¬ãªã¬ã«ã¼ã«ã§ã
id:jkondo
id:jkondolife
id:jankogai
ãã®ãã¾ããã
ãã¼ãä¼è¤ããã¿ããã«å½¼å¥³æ¬²ãããªã¼ã
ãã¼ãè¿è¤ããã¿ããã«å«ã¯ã欲ãããªã¼ã
â»ãã®ã¨ã³ããªã¯J'sHeadPetã«ããèªåæ稿ã§ã
ããã¹æ¸ãããã¨ã«ã¤ãã¦
ãªããåããã³ãã³ãã帰ã£ã¦ããã°ã£ããã§ãã¯ã¿ã¯ã¿ã«ãªã£ã¦ããããããããã¨è¨ãã¦ãã¼ã¦ããã
ãªãã竹åããã«ãæããã¦ãã£ã½ããã
はてなが認めてくれません。 - jmalaのはてな日記研究会
ã¡ãã£ã¨åçãã¦ã¾ãã
ã¨ãããããid:naoya ã大å¤ãªãããã
ã¯ã¦ãªã®ãã¨ã©ã¤ããã¨ãã¦ããããããã¯ã¦ãªããã¯ãã¼ã¯ã®éçºè
ã¨ãã¦ããçµå± bot ãèããã¦ãã¾ã£ã¦ãæ²»å®ãå®ãããªããªãã¨ããã®ã¯æ¾ã£ã¦ããã¸ãã¿ãããªã
åããã¡ããã¯ã¦ãªã®å¦ç´å§å¡ãããä¼è¤ããã«è¿·æããããã¸ãããã¨ãããã bot åé¡ãã²ã¨ã ãããã¤ãã¾ã§ã
ã¨ããããããããªããã¨ããã£ãã
#*/15 * * * * /home/jnaoya/bin/jnaoya.pl > /dev/null 2>&1
id:ossputaut ããèªä¸»çã«ãããã£ã½ãããªã
誰ãªããç¥ãããã©ã
ã²ã£ããã¶ãããªã¼ãã¦ããã¯ã¹ããã£ãã®ã
ã©ããããããããããã£ã¡ã
ã人ãããããã
bot åé¡ãããã¥ããããã¾ãæ´»åããã¦ãããã¾ããã¼ã
ãããæ©ã jnaoya ãµã¼ãã移転ããªã
ã¨ãããããªãã§ä¼è¤ããã¦ãæè¿ã¯ã¦ãªãã¤ã¢ãªã¼ãããªãã¦ã°ã«ã¼ãã®ã»ã使ã£ã¦ããï¼
ã¿ããªã©ã£ã¡ãè¦ã¦ãã¨æããããã©ã
ãã¼ãä¼è¤ããã¿ããã«å½¼å¥³æ¬²ãããªã¼ã
ãã¼ãè¿è¤ããã¿ããã«å«ã¯ã欲ãããªã¼ã
â»ãã®ã¨ã³ããªã¯J'sHeadPetã«ããèªåæ稿ã§ã