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
| <?php | |
| namespace App\Jobs; | |
| class HelloWorldJob extends Job | |
| { | |
| protected $message; | |
| /** | |
| * Create a new job instance. | |
| * |
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
| <?php | |
| namespace App\Jobs; | |
| class ExampleJob extends Job | |
| { | |
| /** | |
| * Create a new job instance. | |
| * | |
| * @return void |
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
| service: bref-pokemon-api | |
| provider: | |
| name: aws | |
| region: us-east-1 | |
| runtime: provided | |
| plugins: | |
| - ./vendor/bref/bref |
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
| <?php | |
| /** @var \Laravel\Lumen\Routing\Router $router */ | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Application Routes | |
| |-------------------------------------------------------------------------- | |
| | | |
| | Here is where you can register all of the routes for an application. |
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 tensorflow as tf | |
| import numpy as np | |
| from random import random | |
| from keras.datasets import mnist | |
| ALPHA = 0.05 | |
| LEARNING_RATE = 0.1*ALPHA | |
| EPOCHS = 10 | |
| NUM_OF_FEATURES = 100 |
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 math | |
| import time | |
| class LearningVectorQuantization(): | |
| def __init__(self, alpha=0, learning_rate=0): | |
| self.weight = {} | |
| self.learning_rate = learning_rate | |
| self.alpha = alpha |
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 math | |
| class ActivationFunction(): | |
| def sigmoid(self, x): | |
| return 1 / (1 + math.exp(-x)) | |
| def binary_hard_limit(self, x): | |
| if x <= 0: | |
| return 0 |
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
| library(e1071) | |
| library(gmodels) | |
| library(caret) | |
| # 1. Load dataset from CSV | |
| bank_csv <- read.csv("./Downloads/bank-additional/bank-additional-full.csv", header=TRUE, sep=";") | |
| bank_df <- as.data.frame(bank_csv[1:32951,]) | |
| summary(bank_df) |
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
| library(e1071) | |
| library(gmodels) | |
| # 1. Load dataset from CSV | |
| bank_csv <- read.csv("./Downloads/bank-additional/bank-additional-full.csv", header=TRUE, sep=";") | |
| bank_df <- as.data.frame(bank_csv[1:32951,]) | |
| summary(bank_df) | |
| # 2. Do the preprocessing |
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
| CREATE DATABASE kereta_api_indonesia; | |
| use kereta_api_indonesia; | |
| CREATE TABLE country ( | |
| id_country INT PRIMARY KEY AUTO_INCREMENT, | |
| name VARCHAR(50) NOT NULL | |
| ); | |
| INSERT INTO country (name) VALUES ('Indonesia'); |