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
!pip install -q pyspark==3.3.0 spark-nlp==5.0.0 | |
import pandas as pd | |
from pyspark.sql import SparkSession | |
from pyspark import SparkContext | |
spark = SparkSession.builder \ | |
.appName("Python Spark SQL basic example") \ | |
.getOrCreate() |
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
# The code below refers to the following Stackoverflow answer: https://stackoverflow.com/a/76818322/5863693 | |
!pip install -q pyspark==3.3.0 spark-nlp==5.0.0 | |
import sparknlp | |
import pandas as pd | |
from pyspark.sql import SparkSession | |
from pyspark import SparkContext | |
spark = SparkSession.builder \ |
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
/* | |
Calculates entropy and conditional entropy as defined in Information Theory (https://en.wikipedia.org/wiki/Entropy_(information_theory)) | |
entropy = -Sum(P_i*log_2(P_i)) | |
*/ | |
const Entropy = (...values) => { | |
let calculationResult = 0; | |
let fraction = 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
# Dockerfile for react.js app and nginx | |
# build environment | |
FROM node:8-alpine as builder | |
WORKDIR /usr/src/app | |
ENV PATH /usr/src/app/node_modules/.bin:$PATH | |
COPY package.json /usr/src/app/package.json | |
RUN npm install | |
COPY . /usr/src/app | |
RUN npm run build --loglevel verbose |