Skip to content

Instantly share code, notes, and snippets.

@romeroyonatan
romeroyonatan / chain.py
Created February 23, 2018 20:33
Lazy chainable operator
import operator
class Operator(object):
'''Chaineable and lazy operations'''
def __init__(self, value, *args):
self._value = value
self._args = args
@romeroyonatan
romeroyonatan / Dockerfile
Last active December 7, 2017 12:41
Python Docker example
FROM python:3.6
# variables de entorno
ENV DJANGO_SETTINGS_MODULE "project.settings.production"
ENV SECRET_KEY "##########################################"
WORKDIR /app
@romeroyonatan
romeroyonatan / hello-openmp.c
Last active March 15, 2020 14:49
Hello world in OpenMP. Minimal example
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#define PARENT_TID 0
int main() {
int tid;
#pragma omp parallel
{