Skip to content

Instantly share code, notes, and snippets.

View korkridake's full-sized avatar
💙
print("Hello World!")

Korkrid Kyle Akepanidtaworn korkridake

💙
print("Hello World!")
View GitHub Profile
# load packages
library(shiny)
library(shinydashboard)
##################################
# #
# Basic Code to Start With #
# #
##################################
header <- dashboardHeader(
if (!require(car)){install.packages(car, dep=T)}
library(car)
###############
# #
# Exercise 1 #
# #
###############
# load data file
mussel<-read.csv(file.choose())
str(mussel)
def function_template(nums):
'''
Signature: list ---> int
Author: @Korkrid Akepanidtaworn
Description: INSERT HERE
'''
pass
def has22(nums):
'''
# -------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------
# Develop a Neural Network with MXNet in Five Minutes
# R Notebook Author: @Korkrid Akepanidtaworn
# Tutorial from MXNet Community
# Source: https://mxnet.incubator.apache.org/tutorials/r/fiveMinutesNeuralNetwork.html
# -------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------
library(mlbench)
library(tidyverse)
# -------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------
# Develop a Neural Network with MXNet in Five Minutes (Regression)
# R Notebook Author: @Korkrid Akepanidtaworn
# Tutorial from MXNet Community
# Source: https://mxnet.incubator.apache.org/tutorials/r/fiveMinutesNeuralNetwork.html
# -------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------
library(mlbench)
library(tidyverse)
# -------------------------------------------------------------------
# Handwritten Digits Classification Competition
# Source: https://mxnet.incubator.apache.org/tutorials/r/mnistCompetition.html
# MNIST is a handwritten digits image data set created by Yann LeCun. Every digit is represented by a 28 x 28 pixel image. It’s become a standard data set for testing classifiers on simple image input. A neural network is a strong model for image classification tasks. There’s a long-term hosted competition on Kaggle using this data set. This tutorial shows how to use MXNet to compete in this challenge.
# -------------------------------------------------------------------
# -------------------------------------------------------------------
# Load the dependency packages
# -------------------------------------------------------------------
library(mxnet)
# -------------------------------------------------------------------
# Handwritten Digits Classification Competition
# Source: https://mxnet.incubator.apache.org/tutorials/r/mnistCompetition.html
# MNIST is a handwritten digits image data set created by Yann LeCun. Every digit is represented by a 28 x 28 pixel image. It’s become a standard data set for testing classifiers on simple image input. A neural network is a strong model for image classification tasks. There’s a long-term hosted competition on Kaggle using this data set. This tutorial shows how to use MXNet to compete in this challenge.
# -------------------------------------------------------------------
# -------------------------------------------------------------------
# Load the dependency packages
# -------------------------------------------------------------------
library(mxnet)
data <- structure(list(CODE = c("AA","AA","AA","AA","AA"),
DATE = c(20181205,20181205,20181205,20181212,20181212),
TIME = c(14.0,14.0,14.2,18.0,18.0),
NO = c("D1","D1","D2","D3","D3"),
ITEM = c("AK011","ZH002","HJ005","AK011","KK021"),
RANK = c(1,1,2,3,3)),
.Names = c("CODE", "DATE", "TIME", "NO", "ITEM","RANK"),
class = c("tbl_df", "tbl", "data.frame"),
row.names = c(NA, -5L))
print(3*4)
p=22/7 # number (integer, float)
print(p)
P=45
print(P)
m1 = "pikachu" # string
m2 = 'rhydon'
isAdult = True # boolean
print(m1)
print(m1 + " vs. " + m2)
def rectangle(w, h): # dynamic typing
# code block
area = w * h
return area
def triangle(w, h):
# area = .5 * w * h
return .5 * w * h