Skip to content

Instantly share code, notes, and snippets.

@kentatogashi
kentatogashi / test.ipynb
Last active September 1, 2017 09:20
test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kentatogashi
kentatogashi / R.md
Last active August 9, 2017 13:30
R操作
@kentatogashi
kentatogashi / kleinberg.md
Last active August 9, 2017 06:42 — forked from anonymous/kleinberg.md
kleinbergのオートマトンモデルを用いたバースト検知

https://www.cs.cornell.edu/home/kleinber/bhs.pdf

オートマトンを用いたモデル。

オートマトンの状態遷移へコストを割り当てることで、状態遷移の頻度をコントロールし、長いバーストを捉えやすくする。

論文では、2状態のオートマトンモデルを用いた手法について述べられていた。

メッセージ到着時間の系列を生成するための単純でランダムなモデルは、指数分布に従うものだろう。
  • 単純パーセプトロン
    • いくつかの入力信号を受け取りそれを一つの出力信号として出すネットワーク
  • ニューラルネットワーク(NN)
    • 多層パーセプトロンなど活性化関数を用いるネットワーク
  • 活性化関数
    • 入力信号の総和を出力信号に変換する関数
  • シグモイド関数
    • NNで使われる活性化関数の一つ
    • 出力信号は、0 ~ 1のなめらかな値を取る
  • 非線形
Log File Anomaly Detection
Tian Yang Vikas Agrawal
NVIDIA Inc. NVIDIA Inc.
tiyang@nvidia.com vagrawal@nvidia.com
Abstract
Analysis of log files pertaining to a failed run can be a tedious task,
especially if the file runs into thousands of lines. Using the recent
development in text analysis using deep neural networks, we present a
method to reduce effort needed to analyze the log file by highlighting the
most probably useful text in the failed log file, which can assist in
#include <stdlib.h>
#include <stdio.h>
int i, j;
int size = 5;
void simplesort (int *b) {
int temp;
for (i = 0; i < size; i++) {
for (j = 0; j < size; j++) {
from collections import defaultdict
import math
def entoropy(name):
count = defaultdict(int)
f = open(name, "rb")
while True:
c = f.read(1)
print(c)
if not c: break
count[c] += 1
import socketserver
class MyTCPHandler(socketserver.BaseRequestHandler):
def setup(self):
pass
def handle(self):
self.data = self.request.recv(1024).strip()
print(self.data)
print(self.request.sendall(self.data.upper()))
[  0.480] Connected
The negotiated protocol: h2

コネクションを確立

[  0.840] recv SETTINGS frame <length=6, flags=0x00, stream_id=0>
          (niv=1)
          [SETTINGS_INITIAL_WINDOW_SIZE(0x04):1048576]
use strict;
use warnings;
my $date_str = `date +"%Y%m%d%H%M"`;
my $regex_str1 = `date -v-2H +"%Y-%m-%d"`;
my $regex_str2 = `date -v-2H +"%H:"`;
chomp $date_str;
chomp $regex_str1;
chomp $regex_str2;