Skip to content

Instantly share code, notes, and snippets.

View RHDZMOTA's full-sized avatar
👨‍💻
More info at: rhdzmota.com

Rodrigo H. Mota RHDZMOTA

👨‍💻
More info at: rhdzmota.com
View GitHub Profile
@RHDZMOTA
RHDZMOTA / create-pemfile.md
Created October 15, 2019 04:21
Create pemfile

Create the pemfile using aws-cli:

$ aws ec2 create-key-pair --key-name rodrigo-hernandez-mota-ds-dev --query 'KeyMaterial' --output text --region us-west-2 --profile ds-dev > rodrigo-hernandez-mota-ds-dev.pem
$ chmod 400 rodrigo-hernandez-mota-ds-dev.pem
@RHDZMOTA
RHDZMOTA / create-pemfile.md
Created October 15, 2019 04:21
Create pemfile

Create the pemfile using aws-cli:

$ aws ec2 create-key-pair --key-name rodrigo-hernandez-mota-ds-dev --query 'KeyMaterial' --output text --region us-west-2 --profile ds-dev > rodrigo-hernandez-mota-ds-dev.pem
$ chmod 400 rodrigo-hernandez-mota-ds-dev.pem
@RHDZMOTA
RHDZMOTA / es-scala-config.md
Created June 1, 2019 03:33
Using elastic4s

Elasticsearch Scala Config

This is a simple elasticsearch scala config.

SBT Config

Add the following dependency:

"com.sksamuel.elastic4s" %% "elastic4s-http" % "6.5.1"
@RHDZMOTA
RHDZMOTA / docker-compose.yml
Created April 22, 2019 23:37
Docker compose file for kafka + redis
version: "3"
services:
# KAFKA RELATED SERVICES
zookeeper:
image: confluentinc/cp-zookeeper:5.2.1
hostname: zookeeper
container_name: zookeeper
ports:
@RHDZMOTA
RHDZMOTA / WSL_SSH.md
Last active April 14, 2024 19:58
SSH into the Windows Subsystem for Linux (ubuntu)

SSH Into the Windows Subsystem for Linux (UBUNTU)

Instructions to create an ssh connection into the windows subsystem for linux.

Context

Instructions

@RHDZMOTA
RHDZMOTA / README.md
Created February 5, 2018 00:39
Brilliant Basic Level: problem of the week of feb 5

1 X 2 X 3 X ... X 2018

My computer solves for the above product and finds its digit sum (sum of all its digits). It then repeats this process of calculating the digit sum until only one digit remains.

What digit is that?

@RHDZMOTA
RHDZMOTA / auxiliar_functions.py
Last active September 18, 2017 19:24
Use each file as a jupyter notebook cell. First copy and run the contents of auxiliar_functions.py.
%matplotlib inline
from scipy.integrate import odeint
import matplotlib.pyplot as plt
import numpy as np
# Print function
def print_results(soln, time):
show = 5
def get_head_and_tail(vector):
@RHDZMOTA
RHDZMOTA / inverse_example_dataset.R
Created April 29, 2016 19:08
Save file as "generate_dataset.R" to use with "inverse_function.R". This specific script was used in wordpress post in [add link]
# Example of inverse function
# Generating x-axis, pdf and cdf numeric values.
# last modifyed: 29/04/2016
library(ggplot2)
library(tibble)
library(tidyr)
@RHDZMOTA
RHDZMOTA / inverse_function.R
Last active May 2, 2016 02:01
General methodology to calculate the inverse function via a numeric approach.
# INVERSE FUNCTION
# by: Rodrigo Hernández Mota
# created in: 29/04/2016
# last modify: 02/05/2016
source("generate_dataset.R")
library(ggplot2)
library(tibble)
library(tidyr)
@RHDZMOTA
RHDZMOTA / functions_whatsapp.R
Last active February 13, 2023 10:12
Functions used in file: whatsapp_dataviz.R. Mainly data cleaning.
# Whatsapp's data visualization functions and data cleaning
# by: Rodrigo Hernández Mota
# file name: functions_whatsapp.R
# V.1.0.0
library(tibble)
library(tidyr)
# palette_colors ----------------------------------------------------------
# This function returns a vector of colours (character- HEX number)