-
Visual C++ (for GLPK v4.65 you'll need VC v2010 Express)
-
Download the latest GLPK zip package: https://sourceforge.net/projects/winglpk/files/winglpk/ then extract its content to the
C:\glpk. -
Create the environment variable
%GLPK_HOME%pointing to theC:\glpkpath you've created, and add to the system path the following value:SET PATH=%PATH%;%GLPK_HOME%\w64
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 | |
| from time import sleep | |
| from selenium import webdriver | |
| from selenium.common.exceptions import TimeoutException | |
| from selenium.common.exceptions import WebDriverException | |
| from eliot import start_action, to_file, log_call | |
| # from selenium.webdriver.common.keys import Keys | |
| # from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | |
| # from selenium.webdriver.common.by import By | |
| # from selenium.webdriver.support import expected_conditions as EC |
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
| // reference http://www.geocities.jp/tomtomf/JScience/JScience.htm | |
| // | |
| @GrabResolver (name='jcurl-repository', root='http://jcurl.berlios.de/m2/repo/') | |
| @Grab(group = 'org.jscience', module='jscience', version='4.3.1') | |
| import org.jscience.mathematics.number.Complex | |
| import org.jscience.mathematics.vector.ComplexMatrix | |
| //計算結果の出力様関数 | |
| def show(cm) { |
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
| def text = "Going to convert this to Base64 encoding!" | |
| // Encode | |
| def encoded = text.bytes.encodeBase64().toString() | |
| println encoded | |
| // Decode | |
| byte[] decoded = encoded.decodeBase64() | |
| println new String(decoded) |
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 numpy as np | |
| import matplotlib.pyplot as plt | |
| import pandas as pd | |
| import math | |
| class UpperConfidenceBound: | |
| def __init__(self, dataframe, N, m): | |
| self.__dataset = dataframe | |
| self.__N = N | |
| self.__m = m |
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
| """ | |
| Update: (07.29.2022): Fix: train_test_split import | |
| ============================================================== | |
| Restricted Boltzmann Machine features for digit classification | |
| ============================================================== | |
| For greyscale image data where pixel values can be interpreted as degrees of | |
| blackness on a white background, like handwritten digit recognition, the | |
| Bernoulli Restricted Boltzmann machine model (:class:`BernoulliRBM | |
| <sklearn.neural_network.BernoulliRBM>`) can perform effective non-linear |
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
| package demo | |
| import javax.script.* | |
| import org.renjin.script.* | |
| class App { | |
| static void main(String[] args){ | |
| // init values | |
| int[] values = [1,2,3] | |
| // Create a Renjin engine: |
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
| <template> | |
| <div id="app"> | |
| <!-- <img src="./assets/logo.png"> | |
| <HelloWorld msg="Welcome to Your Vue.js App"/> --> | |
| <div class="reveal"> | |
| <div class="slides"> | |
| <section>Single Horizontal Slide</section> | |
| <section> | |
| <section>Vertical Slide 1</section> | |
| <section>Vertical Slide 2</section> |
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
| # Simplest linear model with keras 2.1.3 (using tensorflow backed) it worked with python 3.5 | |
| import numpy as np | |
| import keras | |
| model = keras.Sequential( [keras.layers.Dense(units=1, input_shape=[1])] ) | |
| model.compile(optimizer='sgd', loss='mean_squared_error') | |
| # y = 2x - 1 | |
| xs = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0]) | |
| ys = np.array([-3.0, -1.0, 1.0, 3.0, 5.0, 7.0]) |