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/sh | |
| ############################## | |
| source /opt/conf/httpd_switch_log.conf | |
| ############################## | |
| DATE=`date +%Y%m%d` | |
| echo "switch httpd log"+`date` >> $LOG_FILE | |
| mv $HTTPD_LOG_DIR/access_log $HTTPD_LOG_DIR/access_log.$DATE |
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 java.io.IOException; | |
| import org.apache.hadoop.conf.Configured; | |
| import org.apache.hadoop.fs.Path; | |
| import org.apache.hadoop.io.IntWritable; | |
| import org.apache.hadoop.io.LongWritable; | |
| import org.apache.hadoop.io.Text; | |
| import org.apache.hadoop.mapreduce.Job; | |
| import org.apache.hadoop.mapreduce.Mapper; | |
| import org.apache.hadoop.mapreduce.Reducer; | |
| import org.apache.hadoop.mapreduce.Reducer.Context; |
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 java.io.IOException; | |
| import org.apache.hadoop.conf.Configured; | |
| import org.apache.hadoop.fs.Path; | |
| import org.apache.hadoop.io.IntWritable; | |
| import org.apache.hadoop.io.LongWritable; | |
| import org.apache.hadoop.io.Text; | |
| import org.apache.hadoop.mapreduce.Job; | |
| import org.apache.hadoop.mapreduce.Mapper; | |
| import org.apache.hadoop.mapreduce.Reducer; | |
| import org.apache.hadoop.mapreduce.Reducer.Context; |
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 | |
| sudo curl -L http://www.opscode.com/chef/install.sh | sudo bash | |
| sudo /opt/chef/embedded/bin/gem install chef --no-ri --no-rdoc | |
| sudo /opt/chef/embedded/bin/gem install knife-solo --no-ri --no-rdoc | |
| mkdir -p ~/workspace/chef-repo | |
| cd ~/workspace/chef-repo | |
| sudo apt-get -y install git | |
| git clone https://github.com/nagataka/cookbooks.git |
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 numpy as np | |
| #test script for implementing perceptron | |
| N = 4 | |
| complete = False | |
| def calc(test, weight): | |
| array_after = weight * test | |
| res = np.zeros(N) | |
| index = 0 | |
| num = 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
| #!/usr/bin/php | |
| <?php | |
| require_once("sdk-1.6.2/sdk.class.php"); | |
| $ses = new AmazonSES(); | |
| $response = $ses->send_email( | |
| 'from_addr@example.co.jp', // Source (aka From) | |
| array('ToAddresses' => array( // Destination (aka To) | |
| 'to_adde@test.com' | |
| )), |
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
| #!/usr/bin/php | |
| <?php | |
| require 'AWS_SDK_PHP2/aws-autoloader.php'; | |
| use Aws\Ses\SesClient; | |
| $client = SesClient::factory(array( | |
| 'key' => "XXXXXXXXXXXXXXXXXXXX", | |
| 'secret' => "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", | |
| 'region' => "us-east-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
| def calc(max_shyness, data_list): | |
| if max_shyness == 0: | |
| return 0 | |
| else: | |
| total_count, required_count = 0, 0 | |
| for i in range(0, max_shyness+1): | |
| if data_list[i] != 0: | |
| if total_count >= i: | |
| total_count += data_list[i] | |
| else: |
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
| package hbase; | |
| import java.io.IOException; | |
| import org.apache.hadoop.conf.Configuration; | |
| import org.apache.hadoop.hbase.HBaseConfiguration; | |
| import org.apache.hadoop.hbase.HColumnDescriptor; | |
| import org.apache.hadoop.hbase.HTableDescriptor; | |
| import org.apache.hadoop.hbase.client.HBaseAdmin; | |
| import org.apache.hadoop.hbase.client.HTable; |