Skip to content

Instantly share code, notes, and snippets.

@robert-malai
robert-malai / digits.py
Created Oct 7, 2019
Digits and Operators problem
View digits.py
from collections import OrderedDict
DIGITS: str = '123456789'
TARGET: int = 101
OPCODE = OrderedDict([
('0', ''),
('1', '*'),
('2', '-'),
('3', '+'),
])
View docker-compose.yml
version: '2'
services:
influxdb:
image: tutum/influxdb
container_name: influxdb
# keep this flag until next step
volumes:
- ./docker/influxdb/init-influxql/init.influxql:/init_script.influxql:ro
ports:
View Dockerfile for pre-populated databases
# source: https://github.com/kiasaki/docker-alpine-postgres
FROM alpine
RUN echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \
apk update && \
apk add curl "libpq@edge<9.7" "postgresql-client@edge<9.7" "postgresql@edge<9.7" "postgresql-contrib@edge<9.7" && \
curl -o /usr/local/bin/gosu -sSL "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64" && \
chmod +x /usr/local/bin/gosu && \
apk del curl && \
rm -rf /var/cache/apk/*
@robert-malai
robert-malai / Grunt.js
Last active Sep 27, 2016
Grunt configuration relevant for usemin
View Grunt.js
// Generated on 2015-06-04 using generator-angular 0.11.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/**/*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {