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
# SSH の設定 | |
SSH_CONFIG="/etc/ssh/sshd_config" | |
SSH_CONFIG_BACKUP="/etc/ssh/sshd_config.bk" | |
SSH_PORT_NUMBER="22" | |
function change_setting () { | |
TARGET=$1 | |
KEYWORD=$2 | |
VALUE=$3 |
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
// necessary tools to use pyenv | |
sudo yum install gcc gcc-c++ make git openssl-devel bzip2-devel zlib-devel readline-devel sqlite-devel | |
// Install pyenv | |
sudo git clone https://github.com/yyuu/pyenv.git /usr/bin/.pyenv | |
cd /usr/bin/.pyenv | |
sudo mkdir shims | |
sudo mkdir versions | |
// Set path of pyenv |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
i= | |
_am= | |
stair= | |
_maker_= | |
eval(s=%q[ | |
eval(%q[def_ | |
stair(s)_if_AR | |
GV.size()==0_the | |
n_10.upto(50)_do_| | |
i|_puts(s.slice!(0,i |
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
#coding:utf-8 | |
import numpy as np | |
class WhiteningScaler: | |
def __init__(self, axis=0, threshold=1e-12, apply_zca=False): | |
# 行方向にデータが格納されている場合は axis=0 | |
# 列方向にデータが格納されている場合は axis=1 | |
self.axis = axis | |
self.threshold = threshold |
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
import numpy as np | |
def o_transform(signal): | |
ret = [] | |
for n in range(1, len(signal)+1): | |
a = 2 / (n + 1) | |
d = -2 / (n * (n + 1)) | |
s = 0 | |
for t in range(n): |
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 python | |
#coding: UTF-8 | |
import Image | |
import sys | |
def threshold(x,a): | |
if x > a: | |
return 1 | |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include "type.h" | |
#include "rgsmap.h" | |
#include "instmake.h" | |
#define INST1(var) (var&0x000000ff) | |
#define INST2(var) (((var&0x0000ff00)>>8)|((var&0x000000ff)<<8)) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include "type.h" | |
#include "rgsmap.h" | |
#define OPRND1(var) ((var>>8)&0x0000000f) | |
#define OPRND2(var) (var&0x0000000f) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int rmindent(char *buf) | |
{ | |
int i; | |
for (i = 0; ; i++) { | |
if (buf[i] != ' ') { |
NewerOlder