Skip to content

Instantly share code, notes, and snippets.

View zambujo's full-sized avatar
:octocat:
💻➕ 🎧

Martins zambujo

:octocat:
💻➕ 🎧
View GitHub Profile
@zambujo
zambujo / nyc_tlc.Rmd
Created January 12, 2023 21:18 — forked from lambiase/nyc_tlc.Rmd
New York City Taxi & Limousine Commission (TLC) Trip Data Analysis Using Sparklyr and Google BigQuery
---
title: New York City Taxi & Limousine Commission (TLC) Trip Data Analysis Using Sparklyr
and Google BigQuery
author: "Mirai Solutions"
date: 8\textsuperscript{th} January 2018
output:
html_document:
theme: flatly
params:
# gcp_json_keyfile: gcp_keyfile.json
@zambujo
zambujo / psycopg2_cheatsheet.md
Created February 6, 2022 10:36 — forked from pfigue/psycopg2_cheatsheet.md
psycopg2 Cheatsheet

Connect and Select

connect()

The shortest connect:

from psycopg2 import connect
psql_conn = connect("dbname=XXX user=XXX password=XXX host=localhost sslmode=require")
psql_conn.close()
@zambujo
zambujo / til.md
Last active April 20, 2023 08:10
Today I learned

A list of things I learned today

2023-04-20

Type 1 hypervisors

  • Hyper-V
  • ESXi
  • Proxmox Virtual (Debian based)
  • KVM and QEMU
@zambujo
zambujo / introrx.md
Created April 21, 2020 22:21 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@zambujo
zambujo / git-deployment.md
Created April 19, 2020 16:36 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@zambujo
zambujo / r-to-python-data-wrangling-basics.md
Created April 13, 2020 19:15 — forked from conormm/r-to-python-data-wrangling-basics.md
R to Python: Data wrangling with dplyr and pandas

R to python data wrangling snippets

The dplyr package in R makes data wrangling significantly easier. The beauty of dplyr is that, by design, the options available are limited. Specifically, a set of key verbs form the core of the package. Using these verbs you can solve a wide range of data problems effectively in a shorter timeframe. Whilse transitioning to Python I have greatly missed the ease with which I can think through and solve problems using dplyr in R. The purpose of this document is to demonstrate how to execute the key dplyr verbs when manipulating data using Python (with the pandas package).

dplyr is organised around six key verbs:

@zambujo
zambujo / ROracle installation
Last active October 25, 2019 14:34
Things to keep in mind when installing ROracle in windows
# Things to keep in mind when installing ROracle:
1. Install Oracle Instant Client
2. Add instant client to the path..
`Sys.setenv("OCI_LIB64" = "path_to/instantclient_19_3")`
3. Manually copy all files
## 1. set up http and https proxies
## 2. change the method to download files
options(download.file.method = "wget") ## on linux
options(download.file.method = "internal") ## on windows (miniconda)
## 3. run install.packages() as usual
@zambujo
zambujo / fso.r
Last active November 8, 2017 23:24
Getting raw data from the Swiss Federal Statistical Office to R
if (!require("pacman", quietly = TRUE)) install.packages("pacman")
if (!require("janitor", quietly = TRUE)) install.packages("janitor")
pacman::p_load(
"stringr"
, "lubridate"
, "rio" # r <-> excel++
, "pxR" # r <-> pc-axis
, "tidyverse" # dplyr, tidyr, plyr, purrr
)

Keybase proof

I hereby claim:

  • I am zambujo on github.
  • I am zambujo (https://keybase.io/zambujo) on keybase.
  • I have a public key whose fingerprint is CC00 6E28 D4D8 C33C 5E09 78C9 EDFF 2A06 58BF A9A6

To claim this, I am signing this object: