Skip to content

Instantly share code, notes, and snippets.

View LuisArteaga's full-sized avatar

Luis Arteaga LuisArteaga

  • Hamburg, Germany
View GitHub Profile
@LuisArteaga
LuisArteaga / encryption-data-frame-test.py
Created July 29, 2023 05:52
The code creates a dataframe, encrypts one of the columns, and then creates two more dataframes with only the encrypted and decrypted columns.
import pandas as pd
from cryptography.fernet import Fernet
# Create a test dataframe with 3 columns. The first column is an index, the second are random float values and third are one of three types (Delta, Gamma, Vega)
test_df = pd.DataFrame(
{
"index": [1, 2, 3],
"trader_name": ['Luis Arteaga', 'Peter Meier', 'Max Mustermann'],
"trader_group": ["Delta", "Gamma", "Vega"]
@LuisArteaga
LuisArteaga / week1_basic_frosty_friday.sql
Created July 15, 2022 10:42
FrostyFriday Inc., your benevolent employer, has an S3 bucket that is filled with .csv data dumps. This data is needed for analysis. Your task is to create an external stage, and load the csv files directly from that stage into a table. The S3 bucket’s URI is: s3://frostyfridaychallenges/challenge_1/ Remember if you want to participate: Sign up …
/* Setup */
USE DATABASE FROSTY_FRIDAY;
USE SCHEMA PUBLIC;
USE WAREHOUSE COMPUTE_WH;
/* Create external stage */
CREATE STAGE WEEK1_BASIC_S3_BUCKET
url = 's3://frostyfridaychallenges/challenge_1/';
/* Explore data in stage */
@LuisArteaga
LuisArteaga / finanzen_net_webscraper.py
Created August 8, 2020 15:15
Finanzen.net Webscraper: FOM Thesis 2020
import ntpath
from selenium import webdriver as webdriver
from selenium.webdriver.common.by import By
import re
import csv
class Configuration:
"""
This class contains the information about the chrome driver and the details about website to be crawled
@LuisArteaga
LuisArteaga / bsts_fom_thesis_2020.R
Last active January 19, 2023 10:31
Bayessche strukturelle Zeitreihenanalyse: FOM Thesis 2020
#====#====#====#====#====#====#====# Initialization #====#====#====#====#====#====#====#====
library(tidyverse) # enthalten: ggplot2, dplyr, tidyr, readr, purr, tibble, stringr, forcats
library(rstudioapi)
library(lubridate)
library(plotly)
library(bsts)
library(feather)
options(stringsAsFactors = FALSE, # Zeichen enthalten eine Labels in Ganzzahlen Form
scipen = 999) # Wissenschaftliche Notation ist deaktiviert