Skip to content

Instantly share code, notes, and snippets.

Megumi Tomita tomykaira

Block or report user

Report or block tomykaira

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tomykaira
tomykaira / error.txt
Created Aug 28, 2019
Silly example case to reproduce "Unknown column" error on mysql 5.6, but not on mysql 8.0+
View error.txt
Unknown column 'x6.z' in 'where clause'
java.sql.SQLSyntaxErrorException: Unknown column 'x6.z' in 'where clause'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:970)
at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:387)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
at slick.jdbc.StatementInvoker.results(StatementInvoker.scala:38)
@tomykaira
tomykaira / jupyter-remote.sh
Created Feb 11, 2019
Run remote jupyter server (server = windows + WSL + SSH)
View jupyter-remote.sh
#!/bin/sh
set -e
local_json=/tmp/jupyter-kernel.json
rm nohup.out
pkill -f "jupyter-kernel.exe"
nohup ssh win "/mnt/c/Users/tomyk_000.GALLERIAXTWIN81/Anaconda3/Scripts/jupyter-kernel.exe" &
sleep 1
View montecarlo.py
# Monte Carlo (virtual kodoku)
import gym
import numpy as np
import plotly.plotly as py
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import gym
import random
import math
View qlearning.py
# Q-learning with designed reward
# import gym
import numpy as np
import plotly.plotly as py
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import gym
import random
init_notebook_mode(connected=True)
View a.py[
# import gym
import numpy as np
import plotly.plotly as py
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import gym
import random
init_notebook_mode(connected=True)
env = gym.make('CartPole-v1')
View use_2_3.py
import gym
import numpy as np
# import plotly.plotly as py
# import plotly.graph_objs as go
# from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
# import random
# init_notebook_mode(connected=True)
env = gym.make('CartPole-v1')
View gist:58e1271c0118462e71e17ca26c679f80
# import gym
import numpy as np
import plotly.plotly as py
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import gym
import random
init_notebook_mode(connected=True)
env = gym.make('CartPole-v1')
View cartpole_sarsa.py
# import gym
import numpy as np
import plotly.plotly as py
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import gym
init_notebook_mode(connected=True)
env = gym.make('CartPole-v1')
data = []
View currentyear.js
ar birthdate = new Date(1970, 1, 1);
var today = new Date();
var dayMs = 1000*60*60*24;
var startAge = 10;
var startPoint = new Date(birthdate.getTime());
startPoint.setYear(birthdate.getFullYear() + startAge);
var accum = startPoint.getTime();
for (var i = startAge; i < 100; i ++) {
View azik_us.rule
# $Id$
# このファイルは改行コードがLF、文字エンコーディングがEUC-JPでなければなりません。
# 五つ目の項目は次状態です。無ければ項目自体を省略します。
# エントリの順序には気を付けて下さい。例えば「ba」というエントリに出会うと、
# AquaSKKはまず「b」という枝を探しますが、ここではまだ存在しないので
# 「b」という空の枝を作成します。この後に「b」というエントリが現れると
# そのエントリ「b」は既に定義されているのでどうなるか分かりません。
# 最初の項目の&comma;は半角カンマに置換されます。
You can’t perform that action at this time.