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 java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
/** | |
* クイックソートサンプル | |
*/ | |
public class QuickSortTest | |
{ | |
public static void main(String[] args) |
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
set modeline | |
set nobackup | |
set incsearch | |
set smartcase | |
set showmatch | |
set encoding=utf-8 | |
set fileencoding=utf-8 | |
"---------------------------------------------------------- |
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
def fib1(n): | |
if n<3: | |
return 1 | |
else: | |
return fib1(n-1) + fib1(n-2) | |
def fib2(n, fn1=1, fn=0): | |
if n<1: | |
return fn1 | |
else: |
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
def rev(l, index=0): | |
dest = len(l)-index-1 | |
if dest == index or index+1 > len(l)/2: | |
return l | |
tmp = l[index] | |
l[index] = l[dest] | |
l[dest] = tmp | |
return rev(l, index+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 ( | |
"log" | |
"reflect" | |
"strconv" | |
) | |
func convertMapToStr(jsonData interface{}) string { | |
l := []string{} | |
for key, val := range jsonData.(map[interface{}]interface{}) { | |
switch reflect.ValueOf(val).Kind() { |
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 amazonlinux:2017.03 | |
RUN true\ | |
&& yum -q -e 0 -y update || true\ | |
&& yum -q -e 0 -y install gcc python27-devel python27-pip || true\ | |
&& pip install --upgrade pip || true\ | |
&& pip install wheel || true\ | |
&& yum -q -e 0 -y clean all | |
CMD [""] |