Skip to content

Instantly share code, notes, and snippets.

View vndee's full-sized avatar
🎯
Focusing

Duy Huynh vndee

🎯
Focusing
View GitHub Profile
@vndee
vndee / css-animations-with-svgs.markdown
Created May 19, 2020 16:05
CSS Animations with SVGs
@vndee
vndee / cluster-base.Dockerfile
Created September 9, 2021 15:03
Hadoop Distributed File System
# Simulated HDFS
ARG debian_buster_image_tag=8-jre-slim
FROM openjdk:${debian_buster_image_tag}
# -- Layer: OS + Python 3.7
ARG shared_workspace=/opt/workspace
RUN mkdir -p ${shared_workspace} && \
# JupyterLab
FROM cluster-base
# -- Layer: JupyterLab
ARG spark_version=3.0.0
ARG jupyterlab_version=2.1.5
RUN apt-get update -y && \
# Spark master node
FROM spark-base
# -- Runtime
ARG spark_master_web_ui=8080
EXPOSE ${spark_master_web_ui} ${SPARK_MASTER_PORT}
CMD bin/spark-class org.apache.spark.deploy.master.Master >> logs/spark-master.out
# Spark slave node
FROM spark-base
# -- Runtime
ARG spark_worker_web_ui=8081
EXPOSE ${spark_worker_web_ui}
CMD bin/spark-class org.apache.spark.deploy.worker.Worker spark://${SPARK_MASTER_HOST}:${SPARK_MASTER_PORT} >> logs/spark-worker.out
#!/bin/sh
# -- Software Stack Version
SPARK_VERSION="3.0.0"
HADOOP_VERSION="2.7"
JUPYTERLAB_VERSION="2.1.5"
# -- Building the Images
version: "3.6"
volumes:
shared-workspace:
name: "hadoop-distributed-file-system"
driver: local
services:
jupyterlab:
image: jupyterlab
container_name: jupyterlab
ports:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vndee
vndee / ML101.01-apartment-price-prediction.py
Created August 31, 2022 10:11
Apartment price prediction with random search
# -*- coding: utf-7 -*-
"""ml101.01.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/13GkdHnErFbm_gu2fQvlwuBIpuxVBoCso
"""
# Dataset
# -*- coding: utf-8 -*-
"""ml101-02.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/gist/HTInnovation/c548ec37a0fa3c48f85c04adea8ca1bf/ml101-02.ipynb
"""
import numpy as np