Skip to content

Instantly share code, notes, and snippets.

  • MySQLとPostgreSQLの違い。
    • ライセンスの違い
      • MySQLは、GPLと商用のデュアルライセンス。
      • PostgreSQLは、BSDライセンス。
    • プロセスとスレッドの違い
      • MySQLは、マルチスレッド。
      • PostgreSQLは、マルチプロセス。
  • NAT越えの技術を把握していますか。(http://www.wata-lab.meijo-u.ac.jp/file/seminar/2018/2018-Semi1-Tetsu_Naruse.pdf)
    • STUN
  • TURN
import pandas as pd
import matplotlib.pyplot as plt
df_orig = pd.read_csv('https://timeseries.weebly.com/uploads/2/1/0/8/21086414/_visitors.csv')
df = df_orig.copy()
df['Date'].replace('(.*)Q1', r'\1-01', regex=True, inplace=True)
df['Date'].replace('(.*)Q2', r'\1-04', regex=True, inplace=True)
df['Date'].replace('(.*)Q3', r'\1-07', regex=True, inplace=True)
df['Date'].replace('(.*)Q4', r'\1-10', regex=True, inplace=True)
df['DateTime'] = pd.to_datetime(df['Date'])

活性化関数(Activation)

sigmoid

relu

softmax

ニューラルネットワークの出力結果を確率として扱うように変換する。

@kentatogashi
kentatogashi / .tmux.conf
Created November 29, 2018 03:06
tmuxのセットアップ(ubuntu)
# 事前に
# apt update && apt upgrade tmux
# apt install xsel xclip
set -g history-limit 10000
# escape time
set -s escape-time 0
set -g display-panes-time 3000
sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
mkdir -p ~/.rbenv/plugins
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install -l
@kentatogashi
kentatogashi / build_redmine_docker.sh
Created November 11, 2018 23:46
docker-composeで、redmineを立ち上げるスクリプト
#!/bin/sh
[ $(whoami) != root ] && \
echo 'require root.' && exit 1
which docker-compose > /dev/null 2>&1
[ $? -ne 0 ] && \
curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
mkdir -p ~/redmine
@kentatogashi
kentatogashi / easy_postcat.sh
Created September 6, 2018 06:26
easy_postcat.sh
#!/usr/local/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
TYPE="$1"
CNT=1
SAMPLING_NUM=50
postqueue -p | tail -${SAMPLING_NUM} | awk '{print $1}' | egrep '^[A-Z0-9]{11}' | while read QUEUE_ID;
do
echo "queue: $CNT"
if [ "$TYPE" = --detail ]
@kentatogashi
kentatogashi / my_rot13.py
Created September 5, 2018 23:36
文字列をrot13変換する
_str = raw_input()
alphabets = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
def rot13_chr(c):
if c.isalpha():
if c.islower():
tmp_alphabets = alphabets.lower()
elif c.isupper():
tmp_alphabets = alphabets
ind = tmp_alphabets.find(c)
@kentatogashi
kentatogashi / file0.txt
Created July 24, 2018 01:33
MySQLで、ランダムな文字列を挿入するだけのプロシージャ ref: https://qiita.com/kentatogashi/items/6c24a5460bb7f3f9a930
CREATE TABLE `test` (id INT(11) NOT NULL AUTO_INCREMENT, string VARCHAR(32), created_date TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;