Skip to content

Instantly share code, notes, and snippets.

View farrajota's full-sized avatar

M. Farrajota farrajota

View GitHub Profile
@farrajota
farrajota / missing_value_imputation.md
Created October 25, 2018 13:32
How to treat missing values in your data

Missing values in data

Types of missing values

Missing completely at random (MCAR)

MCAR exists when missing values are randomly distributed across all observations. Missingness in given variable does not depend on any other variable, whether observed or unobserved. MCAR can be confirmed by dividing respondents into those with and without missing data, then using t-tests of mean differences on income, age, gender, and other key variables to establish that the two groups do not

I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

@farrajota
farrajota / s3_util.py
Created January 16, 2020 09:40 — forked from PGryllos/s3_util.py
Using dask's multithreaded scheduler to speedup download of multiple files from s3
"""
Using dask's multithreaded scheduler to speedup download of multiple files from
an s3 bucket
"""
import os
from functools import partial
import botocore
import boto3
@farrajota
farrajota / data-structures.md
Last active May 3, 2021 07:57
Efficient data structures in python

Here I've put the most important data structures I could find with the most efficient implementations in Python I am aware of. Although this is a continuous process and many structures do not have any implementation reference available yet, if you happen to know a more efficient algorithm to implement one or more of this structures in Python (or any language) feel free to ping me :).

Basic Data Structures

Data Structure Python
Arrays numpy Tensorflow PyTorch