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
FROM python:3.6 | |
WORKDIR /app | |
ADD . /app | |
RUN pip install -r requirements.txt | |
RUN python setup.py build_ext --inplace | |
ENTRYPOINT ["python"] | |
CMD ["app.py"] |
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
"""""""""""""""" | |
" Vundle plugins | |
"""""""""""""""" | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' "Let's Vundle manage Vundle | |
Plugin 'wakatime/vim-wakatime' "Wakatime for time tracking |
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
#============================================================================= | |
# basic.toml --- basic configuration example for SpaceVim | |
# Copyright (c) 2016-2017 Wang Shidong & Contributors | |
# Author: Wang Shidong < wsdjeg at 163.com > | |
# URL: https://spacevim.org | |
# License: GPLv3 | |
#============================================================================= | |
# All SpaceVim option below [option] section | |
[options] |
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
from math import floor | |
def bsa(a, n, t): | |
lft = 0 | |
rgt = n -1 | |
while lft <= rgt: | |
m = floor((lft + rgt) / 2) | |
if a[m] < t: | |
lft = m+1 | |
elif a[m] > t: | |
rgt = m-1 |
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 math | |
func bsa(a []int, n int, t int) int { | |
lft := 0 | |
rgt := n - 1 | |
for lft <= rgt { | |
m := int(math.Floor(float64((lft + rgt) / 2))) | |
if a[m] < t { | |
lft = m + 1 | |
} else if a[m] > t { |
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
int bsa(int a[], int n, int t) { | |
int lft = 0, rgt = n - 1; | |
while (lft <= rgt) { | |
int m = (lft + rgt) / 2; | |
if (a[m] < t) { | |
lft = m + 1; | |
} else if (a[m] > t) { | |
rgt = m - 1; | |
} else { | |
return m; |
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
package array | |
// SearchArray is a wrapper to array for searching | |
type SearchArray []interface{} | |
// Search searches an element in the array and returns its index | |
func (s SearchArray) Search(el interface{}) int { | |
for i, e := range s { | |
if e == el { | |
return i |
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
- apt: | |
name: "apache2" | |
state: present |
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
type Counter interface { | |
Increment() | |
} |
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 ( | |
"crypto/md5" | |
"crypto/sha256" | |
"fmt" | |
"io" | |
) | |
// ComplexStruct stores a value and its MD5 and SHA256 ingests | |
type ComplexStruct struct { | |
Value string |
OlderNewer