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
# https://stackoverflow.com/questions/53337864/solve-a-linear-equation-system-b-0-rstudio
# Would like to solve a linear equation system like this:
# x_1*3+x_2*4+x_3*5+x_4*6+x_5,1*2=0
# x_1*21+x_2*23+x_3*45+x_4*37*+x_5,1*0=0
# x_1*340+x_2*24+x_3*25+x_4*31+x_5,1*0=0
# x_1*32+x_2*45+x_3*5+x_4*6+x_5,2*2=0
# x_1*9+x_2*11+x_3*13+x_4*49+x_5,2*0=0
# x_1*5+x_2*88+x_3*100+x_4*102+X_5,3*2=0
# [x_1] [x_2] [x_3] [x_4] [,5]
/*
Please try the C online editor here: https://repl.it/repls/CorruptPoshScriptinglanguages
*/
#include <stdio.h>
/*
How to write your first function in C Language?
Desciption:
- "main" function
@korkridake
korkridake / python_data_science_template.py
Last active June 25, 2019 01:47
Import Standard Libraries
#######################################################################
# Load standard libraries
#######################################################################
import os
import pandas as pd
import numpy as np
import tqdm
import warnings
warnings.filterwarnings('ignore')
from glob import glob
# ------------------------------------------------
# standard libs
# ------------------------------------------------
library(tidyverse)
library(readr)
library(dplyr)
library(tidyr)
library(lubridate)
library(stringr)
# ---------------------------------------------------------------
# basic libraries
# ---------------------------------------------------------------
import pandas as pd
import numpy as np
from glob import glob
import warnings
warnings.filterwarnings('ignore')
# ---------------------------------------------------------------
spark
# <pyspark.sql.session.SparkSession at 0x7f8df8673ba8>
# -------------------------------------------------------------------------------
# Import PySpark Libraries
# -------------------------------------------------------------------------------
from pyspark.sql.functions import skewness, kurtosis
from pyspark.sql.functions import var_pop, var_samp, stddev, stddev_pop, sumDistinct, ntile
from pyspark.sql.types import IntegerType
from pyspark.sql.types import StringType
# ---------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------
# Resources
# - https://docs.databricks.com/user-guide/libraries.html
# ---------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------
spark
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# Set the Configurations
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
container_name = ['PLEASE INSERT BLOB CONTAINER NAME'] # the blob container name (any name is fine, e.g., korkridake01)
account_name = ['PLEASE INSERT ACCOUNT STORAGE NAME'] # the account storage name in Azure
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
spark
# <pyspark.sql.session.SparkSession at 0x7f8df8673ba8>
# -------------------------------------------------------------------------------
# Import PySpark Libraries
# -------------------------------------------------------------------------------
import datetime
from datetime import datetime
from pyspark.sql.functions import skewness, kurtosis
from pyspark.sql.functions import var_pop, var_samp, stddev, stddev_pop, sumDistinct, ntile
print(spark)
# <pyspark.sql.session.SparkSession at 0x7f8df8673ba8>
# -------------------------------------------------------------------------------
# Import PySpark Libraries
# -------------------------------------------------------------------------------
import datetime
from datetime import datetime
from pyspark.sql.functions import skewness, kurtosis
from pyspark.sql.functions import var_pop, var_samp, stddev, stddev_pop, sumDistinct, ntile