Skip to content

Instantly share code, notes, and snippets.

Masakazu Muraoka bathtimefish

Block or report user

Report or block bathtimefish

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
View data8734.csv
We can't make this file beautiful and searchable because it's too large.
created,d1,d2,d3,d4,d5,d6,d7,d8
2019-07-16T15:00:10.766Z,27.67,60,1008.068,0,41.87,97,1038,
2019-07-16T15:00:40.748Z,27.66,59.99,1008.063,0,37.3,99,1050,
2019-07-16T15:01:10.650Z,27.64,60.07,1008.057,0,43.65,99,1056,
2019-07-16T15:01:41.800Z,27.67,60.15,1008.058,0,39.84,99,1050,
2019-07-16T15:02:10.836Z,27.62,60.46,1008.074,0,46.57,100,1060,
2019-07-16T15:02:40.887Z,27.66,60.3,1008.072,0,40.09,97,1041,
2019-07-16T15:03:10.756Z,27.63,60.59,1008.065,0,38.68,93,1014,
2019-07-16T15:03:40.698Z,27.71,60.64,1008.053,0,39.66,95,1029,
2019-07-16T15:04:10.739Z,27.79,60.31,1008.064,0,38.84,83,951,
View nginx-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
selector:
matchLabels:
app: nginx
replicas: 2
template:
@bathtimefish
bathtimefish / get_sliding_window.py
Last active Jan 8, 2019
配列からスライス窓を生成する
View get_sliding_window.py
import numpy as np
def getSlidingWindow(a, size, step=1):
if not ((type(size) == type(0)) and (type(step) == type(0))):
raise Exception("type(size) and type(step) must be int.")
if step > size:
raise Exception("step must not be larger than size.")
if size > len(a):
raise Exception("size must not be larger than array length.")
a = np.asarray(a)
View sendmail_when_webpageopened.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF8">
<title>Send mail when webpage opened</title>
</head>
<body>
<script>
window.onload = function() {
var event_name = 'webpage_opened';
View nodejs-ibeacon-example.js
var bleacon = require('bleacon');
var uuidSeed = 'e279e48e-5b42-401d-b3ac-8289017070e6';
var uuid = uuidSeed.replace(/-/g,'');
var major = 0;
var minor = 0;
var measuredPower = -59;
console.log('Start iBeacon...');
bleacon.startAdvertising(uuid, major, minor, measuredPower);
View radiobutton-checker-example.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Radio button example</title>
</head>
<body>
<form id="form1">
<div>
<input type="radio" name="target" value="1" onchange="handler()">
@bathtimefish
bathtimefish / file0.txt
Last active Sep 3, 2019
restify + TypeScript + Jestの開発環境をセットアップしてみる ref: https://qiita.com/bathtimefish/items/82f886f6d2353af14e7a
View file0.txt
npm i -g typescript webpack webpack-cli
@bathtimefish
bathtimefish / espruino-pico-puressure-sensor.js
Created Oct 30, 2017
Espruino Picoで圧力センサーの値を取得する
View espruino-pico-puressure-sensor.js
var i = setInterval(function() {
var val = analogRead(B1);
console.log(val); //圧力センサーの値
if(val < 0.5) { //値が0.5以下になるとLEDが点灯する
digitalWrite(A8, 1);
} else {
digitalWrite(A8, 0);
}
}, 100);
@bathtimefish
bathtimefish / dqn.py
Last active Mar 5, 2017
DQNをKerasとTensorFlowとOpenAI Gymで実装する https://elix-tech.github.io/ja/2016/06/29/dqn-ja.html のプログラムをPython3.5 & TensorFlow 1.0で動くように修正したやつ
View dqn.py
# coding:utf-8
import os
import gym
import random
import numpy as np
import tensorflow as tf
from collections import deque
from skimage.color import rgb2gray
from skimage.transform import resize
@bathtimefish
bathtimefish / app.js
Created Aug 27, 2016
ChirimenでHTTPリクエストするサンプル
View app.js
/**
*
* Chirimenに装着するWifiドングルは Planex GW-USNano2 動作確認済み
* https://www.planex.co.jp/product/wireless/gw-usnano2/
*
* WifiドングルをつけてChirimenを起動、SettingsでWifi設定を完了後、以下のソースを実行する
*
*/
window.addEventListener("load", function() {
You can’t perform that action at this time.