Skip to content

Instantly share code, notes, and snippets.

View avcaliani's full-sized avatar
🎱
Learning, sharing, repeating...

Anthony Caliani avcaliani

🎱
Learning, sharing, repeating...
View GitHub Profile
@avcaliani
avcaliani / .md
Last active July 17, 2021 22:29
#code #bash #colors

🎨 Have a colourful terminal \o/

By Anthony Vilarim Caliani

# #

This is an example of how to make your terminal more colorful.
It may work in any code language that prints the content to a console.

Related Links

@avcaliani
avcaliani / installing-spark.md
Last active August 15, 2020 01:45
#docs #how-to #apache-spark

⭐️ How to install Apache Spark?

By Anthony Vilarim Caliani

# #

Before Installing

  • You must have Java installed
  • You must have $JAVA_HOME environment variable configured
  • Download Apache Spark
    • Extract the downloaded Spark .zip or .tar file wherever you prefer
@avcaliani
avcaliani / .md
Last active December 13, 2020 20:25
#code #apache-spark #docker #development-env #maven #sbt

🐳 Spark 4 Devs

By Anthony Vilarim Caliani

# # # # # #

"Spark 4 Devs" is an Apache Spark docker image made for devs! This docker image will provide to you:

@avcaliani
avcaliani / .md
Last active May 2, 2020 03:12
#code #apache-spark #spark-tables

🗂 Spark Tables

By Anthony Vilarim Caliani

# # # #

This is an example of working with Spark Tables.
In this example I'm using a Superbowl dataset, so thanks to Timo Bozsolik for sharing his dataset.

The important thing here is the code, but if you want to execute it there is a Makefile to help you out.

@avcaliani
avcaliani / .md
Last active May 2, 2020 03:15
#code #bash #mailjet

📨 Mailjet

By Anthony Vilarim Caliani

# # #

This is an example of working with Mailjet API.
But, before you try it you must edit email.sh to set some variables...
By the way, all these data can be found at your page on Mailjet

APP_EMAIL="your-email@mailjet.com"
@avcaliani
avcaliani / .md
Last active September 21, 2020 11:39
#code #apache-spark #partitioned-parquet

🧩 Partitioned Parquet

By Anthony Vilarim Caliani

# # # #

This is an example of working with Partitioned Parquet, here you will find how to read and write partitioned parquet files.
In this example I'm using a Netflix Shows dataset, so thanks to Shivam Bansal for sharing his dataset.

The important thing here is the code, but if you want to execute it there is a run.sh to help you out.

@avcaliani
avcaliani / wwii-weather.ipynb
Last active July 24, 2020 18:51
wwii-weather.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@avcaliani
avcaliani / hwinfo-monitor.ipynb
Created August 13, 2020 22:37
hwinfo-monitor.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@avcaliani
avcaliani / .md
Last active October 26, 2020 19:39
#code #apache-spark #positional-txt

🥑 Positional File

By Anthony Vilarim Caliani

# # # #

This is an example of writing a single positinal file.
In this example I'm using a Avocado Prices dataset, so thanks to Justin Kiggins for sharing his dataset.

The important thing here is the code, but if you want to execute it there is a run.sh to help you out.

@avcaliani
avcaliani / check-venv.py
Last active March 22, 2022 00:57
#python #check-if-in-venv
import platform
import sys
if __name__ == '__main__':
py_version = platform.python_version()
prefix = sys.prefix
base_prefix = sys.base_prefix if py_version.startswith('3') else sys.exec_prefix
print('------------< venv checker >------------')
print('Python Version.: {}'.format(py_version))
print('Prefix.........: {}'.format(prefix))