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 | |
import tensorflow as tf | |
# セッションを生成 | |
sess = tf.InteractiveSession() | |
# トレーニングするパラメータを定義 | |
A = tf.Variable(tf.zeros(shape=[3, 3]), dtype=tf.float32, name="A") | |
b = tf.Variable(tf.zeros(shape=[3, 1]), dtype=tf.float32, name="b") | |
sess.run(tf.global_variables_initializer()) |
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
""" | |
Learn arbitrary function from training data | |
Architecture: MLP | |
Number of hidden layers: You can configure via `N_neurons_in_layers` | |
""" | |
import math | |
import time | |
from inspect import signature |
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
""" | |
Learn arbitrary function from training data | |
Architecture: MLP | |
Number of hidden layers: You can configure via `N_neurons_in_layers` | |
""" | |
import math | |
import time | |
import datetime as dt |
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 os | |
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' | |
import numpy as np | |
import tensorflow as tf | |
import time | |
import datetime as dt | |
""" | |
じゃんけん用学習データを生成するクラス。 | |
本来であればプログラムでデータを自動生成するのではなく、 |
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
/** | |
* Sample parse-server/parse-dashboard script for Node.js v6. | |
* | |
* In order to use this script you must follow the procedure below. | |
* | |
* 1) Create folder for this snippet. | |
* $ cd <A folder you like to host script files> | |
* $ npm init | |
* # You don't need to answer all of the questions. You can safely skip this mess. | |
* $ npm install --save-dev babel-cli babel-preset-es2015 deepmerge express parse-dashboard parse-server simple-parse-smtp-adapter |
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
/** | |
* Requirement: | |
* sudo npm install -g babel-cli | |
* sudo npm install -g babel-preset-es2015 | |
* sudo npm install -g babel-preset-es2017 | |
* sudo npm install -g parse | |
* sudo npm install -g randomstring | |
* sudo npm install -g shuffle-seed | |
* | |
* To execute: |
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
function getWordWithKanaTrimmed(el) { | |
const cloneEl = el.cloneNode(true); | |
const kanaEls = Array.from(cloneEl.querySelectorAll("span.kana")); | |
kanaEls.forEach(kanaEl => { | |
cloneEl.removeChild(kanaEl); | |
}); | |
return cloneEl.innerText; | |
} | |
function generateWordList() { | |
const allRows = document.querySelectorAll("#wordlist > tbody > tr:not(:first-child)"); |
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
# References | |
# https://u2pia.medium.com/ubuntu-20-04-nvidia-gpu-control-through-ssh-terminal-bb136f447e11 | |
# https://unix.stackexchange.com/questions/367584/how-to-adjust-nvidia-gpu-fan-speed-on-a-headless-node | |
# This gist is for GPU configuration for mining on Ubuntu 20.04 | |
# This worked with dual GPU machine (GTX1070/RTX3070). | |
# Set coolbits which enables to control all gpu fan/clock via command line | |
sudo nvidia-xconfig -a --cool-bits=28 |