This file contains hidden or 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 | |
# | |
# created by RiHaku on June 2015 | |
# | |
# mount -t nfs -o rw,rsize=8192,wsize=8192,hard,intr,noatime,bg,nfsvers=3 10.51.0.91:/DMZ /mnt/data | |
# mount -t nfs -o rw,rsize=8192,wsize=8192,hard,intr,noatime,bg,nfsvers=3 10.51.0.91:/TRUST /mnt/data | |
# | |
# mount check; if not mounted, exit with status code | |
df -h | awk 'NR == 5 {print $1}' | grep 10.51.0.91 >/dev/null 2>&1 |
This file contains hidden or 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 | |
#昨日の日付を定義 | |
THIS_MONTH=`date -d 'this month' "+%Y%m"` | |
YESTERDAY=`date -d '2 day ago' "+%Y%m%d"` | |
#YESTERDAY=`date -d '1 day ago' "+%Y%m%d"` | |
#昨日のアクセスログを格納するファイルを特定する、存在しない場合終了 | |
ACCESSLOG=`find /var/log/httpd/$THIS_MONTH/ -name "*_access.$YESTERDAY*" -type f` | |
if [ "$ACCESSLOG" = "" ]; then |
This file contains hidden or 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
from wsgiref.simple_server import make_server | |
import string | |
import os | |
def application(environ, start_response): | |
start_response('200 OK', [('Content-type', 'text/html')]) | |
ftp_users = [] | |
with open('/etc/passwd', 'r') as item: |
This file contains hidden or 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
import wx | |
def load(event): | |
file = open(filename.GetValue()) | |
contents.SetValue(file.read()) | |
file.close() | |
def save(event): | |
file = open(filename.GetValue(), 'w') | |
file.write(contents.GetValue()) |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
This file contains hidden or 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
data <- read.csv("******.csv") | |
#---------------------------------Preprocessor--------------------------------- | |
#delete repetitive row | |
data <- data[-seq(1, length(data$ID), by=2), ] | |
data$PupilDiaX[data$PupilDiaX == "NULL"] <- 0 | |
data$PupilDiaY[data$PupilDiaY == "NULL"] <- 0 |
This file contains hidden or 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
normalize <- function(data){ | |
ave <- mean(data) | |
max <- max(data) | |
min <- min(data) | |
return (data <- (data - ave) / max(max,min) + 0.5) | |
} | |
smoothing <- function(data, frame){ | |