This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We set an environment variable in this phase so it gets picked up by pip, but we don't want to bake secrets into our container image | |
FROM python:3.6-alpine AS builder | |
ARG INDEX_URL | |
ENV PIP_EXTRA_INDEX_URL=$INDEX_URL | |
COPY requirements.txt . | |
RUN pip install -U pip \ | |
&& pip install --user -r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.annotation.tailrec | |
object ShittySolution { | |
// Given an array of integers, return indices of the two numbers such that they add up to a specific target. | |
// | |
// You may assume that each input would have exactly one solution, and you may not use the same element twice. | |
// https://leetcode.com/problems/two-sum/ | |
// NB: More efficient solution would iterate once over the array and keep a Map of values and indicies | |
def twoSum(nums: Array[Int], target: Int): Array[Int] = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; global variables | |
(setq | |
create-lockfiles nil | |
scroll-error-top-bottom t | |
use-package-always-ensure t | |
make-backup-files nil) | |
;; This is to remove ugly toolbar | |
(custom-set-variables | |
'(tool-bar-mode nil)) |