Skip to content

Instantly share code, notes, and snippets.

View jessalfredsen's full-sized avatar

jessalfredsen

View GitHub Profile
@jessalfredsen
jessalfredsen / Dockerfile.dev
Last active August 17, 2023 12:56
Go-to Docker development setup
FROM python
WORKDIR /app
RUN apt update -y
RUN pip install --upgrade pip
COPY ./requirements-dev.txt /app/requirements-dev.txt
# COPY ./requirements.txt /app/requirements.txt
@jessalfredsen
jessalfredsen / deepMerge.java
Created April 17, 2015 11:41
deepMerge in Java Maps
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.ArrayList;
public class HelloWorld{
public static void main(String []args){
System.out.println("Hello World");
Map vehicles = new HashMap();
@jessalfredsen
jessalfredsen / i_like_cake.py
Created March 11, 2015 10:09
Because I'm in school and I fancy cake !
"""
TODO: Example:
I have 5 instances but 12 partitions
I want all instances to consume so one instance must consume on an odd number
"""
import math
def get_chunks(iterable, parts):
"""Yield successive chunks from ``len(iterable) / parts``.