This file contains hidden or 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
<div class="slidecontainer" id="sliders"> | |
<input type="range" min="-1" max="1" value="0" step="0.1" class="slider" id="slider_a">a : <span id="val_a">0</span><br/> | |
<input type="range" min="-1" max="1" value="0" step="0.1" class="slider" id="slider_b">b : <span id="val_b">0</span><br /> | |
<input type="range" min="-1" max="1" value="0" step="0.1" class="slider" id="slider_c">c : <span id="val_c">0</span><br /> | |
</div> |
This file contains hidden or 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
from keras.datasets import boston_housing | |
from keras.models import Sequential | |
from keras.layers import Dense | |
from keras.optimizers import Adam | |
(x_train, y_train), (x_test, y_test) = boston_housing.load_data(test_split=0.0) | |
def scale_input(data): | |
from sklearn.preprocessing import StandardScaler | |
scaler = StandardScaler() |
This file contains hidden or 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 fibers | |
import time | |
root_fiber = None | |
sub_fibers = [] | |
t = 0.1 | |
def async(func, *args, **kwargs): | |
global root_fiber, sub_fibers | |
def _f(): |
This file contains hidden or 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 sys | |
import os.path | |
import caravan_dump | |
import numpy as np | |
from sklearn.linear_model import Ridge | |
from sklearn.preprocessing import StandardScaler | |
from sklearn.preprocessing import PolynomialFeatures | |
from sklearn.model_selection import train_test_split |
This file contains hidden or 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 <iostream> | |
#include <vector> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <unistd.h> | |
#include <x10/lang/Rail.h> | |
#include <x10/lang/String.h> | |
int popen2(char*const* argv, int *fd_r, int *fd_w) { |
This file contains hidden or 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 <iostream> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <unistd.h> | |
#define READ (0) | |
#define WRITE (1) | |
/** |
This file contains hidden or 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
require 'pp' | |
class DirectedGraph | |
attr_reader :n, :links | |
def initialize(size) | |
@n = size | |
@links = Hash.new {|hsh,key| hsh[key] = Array.new } | |
end |
This file contains hidden or 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 <iostream> | |
#include <cstdlib> | |
#include <ctime> | |
#include <unistd.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <fcntl.h> | |
#include <signal.h> | |
#include <vector> |
This file contains hidden or 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, sys, json, subprocess | |
# Load JSON file | |
fp = open( '_input.json' ) | |
params = json.load( fp ) | |
# Prepare input file | |
f = open('configuration.xml', 'w') | |
param_txt = """<configuration> | |
<input> |
This file contains hidden or 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
local function disableAllHotkeys() | |
for k, v in pairs(hs.hotkey.getHotkeys()) do | |
v['_hk']:disable() | |
end | |
end | |
local function enableAllHotkeys() | |
for k, v in pairs(hs.hotkey.getHotkeys()) do | |
v['_hk']:enable() | |
end |