This file contains 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
# 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] |
This file contains 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
/* | |
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 |
This file contains 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
####################################################################### | |
# Load standard libraries | |
####################################################################### | |
import os | |
import pandas as pd | |
import numpy as np | |
import tqdm | |
import warnings | |
warnings.filterwarnings('ignore') | |
from glob import glob |
This file contains 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
# ------------------------------------------------ | |
# standard libs | |
# ------------------------------------------------ | |
library(tidyverse) | |
library(readr) | |
library(dplyr) | |
library(tidyr) | |
library(lubridate) | |
library(stringr) |
This file contains 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
# --------------------------------------------------------------- | |
# basic libraries | |
# --------------------------------------------------------------- | |
import pandas as pd | |
import numpy as np | |
from glob import glob | |
import warnings | |
warnings.filterwarnings('ignore') | |
# --------------------------------------------------------------- |
This file contains 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
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 |
This file contains 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
# --------------------------------------------------------------------------------------- | |
# --------------------------------------------------------------------------------------- | |
# --------------------------------------------------------------------------------------- | |
# Resources | |
# - https://docs.databricks.com/user-guide/libraries.html | |
# --------------------------------------------------------------------------------------- | |
# --------------------------------------------------------------------------------------- | |
# --------------------------------------------------------------------------------------- | |
spark |
This file contains 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
# ------------------------------------------------------------------------------------- | |
# ------------------------------------------------------------------------------------- | |
# 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 | |
# ------------------------------------------------------------------------------------- | |
# ------------------------------------------------------------------------------------- |
This file contains 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
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 |
This file contains 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
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 |