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 math | |
from pathlib import Path | |
import shutil | |
import json | |
class ELM: | |
def __init__(self, n_hidden_units: int) -> None: | |
self._n_hidden_units = n_hidden_units | |
self._weights_hidden = None |
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
# Using SOLID principles in Python | |
## | |
# Single-responsibility principle (from wikipedia): states that every module, class or function in a computer program should have responsibility over a single part of that program's functionality, which it should encapsulate. All of that module, class or function's services should be narrowly aligned with that responsibility. | |
## | |
from typing import Any, List | |
from abc import ABC, abstractmethod | |
def data_generator(rows: int = 10) -> List[int]: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 gym | |
from gym import logger as gymlogger | |
from gym.wrappers import Monitor | |
import glob | |
import io | |
import base64 | |
from IPython.display import HTML, clear_output | |
from IPython import display as ipythondisplay |
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
{ | |
"status": "success", | |
"processing_time": 4647, | |
"job_id": "5c4b0e523ee5ba00168795f6", | |
"solution": { | |
"routes": [ | |
{ | |
"geometry": "qor{FatfLH\\JXPl@XhADJPv@XbAPl@XhA\rAHVJ`@Xe@fBoC`@q@DS@i@^iIIgAK...", | |
"vehicle_id": "Car", | |
"steps": [ |
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
# https://github.com/datalogai/recurrentshop | |
# https://github.com/farizrahman4u/seq2seq | |
import pandas as pd | |
import numpy as np | |
import keras | |
from keras.models import Sequential | |
from keras.layers import Dense, Dropout, Activation | |
from keras.layers import LSTM | |
from keras.preprocessing.text import Tokenizer |
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 gym | |
from gym import wrappers | |
import numpy as np | |
from sklearn import svm | |
env = gym.make('CartPole-v0') | |
env = wrappers.Monitor(env, '/tmp/cartpole-experiment-1', force=True) | |
observations = [] |