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 main | |
import ( | |
"net" | |
"fmt" | |
"time" | |
) | |
func main() { |
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 main | |
import ( | |
"fmt" | |
) | |
func main() { | |
v := Intersection([]int{1,2,3,4,5,6}, []int{2,4,6}) | |
fmt.Println(v) | |
} |
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
#!/usr/bin/env python | |
#inventory of all multipart uploads in a region | |
import boto3 | |
import os | |
#Not sure this applies here but keeping just in case | |
region = "us-east-1" | |
#The profile to use in the credentials or boto.config file, if used | |
profile_nm = 'default' |
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 sys | |
import tldextract | |
input = sys.stdin.readlines() | |
for line in input: | |
u = tldextract.extract(line.strip()) | |
print(u.domain + '.' + u.suffix) |
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
$ make build | |
mkdir -p .deps | |
curl -o .deps/go1.8.1.linux-amd64.tar.gz https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 87.0M 100 87.0M 0 0 6627k 0 0:00:13 0:00:13 --:--:-- 6675k | |
tar -C .deps -xzf .deps/go1.8.1.linux-amd64.tar.gz | |
touch /home/snebel/AYLIEN/tap_image_builder/.deps/go/bin/go | |
mkdir -p /home/snebel/AYLIEN/tap_image_builder/.deps/gopath | |
GOPATH=/home/snebel/AYLIEN/tap_image_builder/.deps/gopath GOROOT=/home/snebel/AYLIEN/tap_image_builder/.deps/go /home/snebel/AYLIEN/tap_image_builder/.deps/go/bin/go get github.com/constabulary/gb/... |
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
$ make build | |
GOROOT=/home/snebel/AYLIEN/tap_image_builder/.deps/go /home/snebel/AYLIEN/tap_image_builder/.deps/gopath/bin/gb build all | |
# k8s.io/client-go/pkg/api | |
objectreference.go:23: import /home/snebel/AYLIEN/tap_image_builder/pkg/linux-amd64/k8s.io/apimachinery/pkg/runtime/schema.a: object is [linux amd64 go1.7.4 X:framepointer] expected [linux amd64 go1.8.1 X:framepointer] | |
# k8s.io/client-go/pkg/apis/authorization | |
register.go:20: import /home/snebel/AYLIEN/tap_image_builder/pkg/linux-amd64/k8s.io/apimachinery/pkg/runtime.a: object is [linux amd64 go1.7.4 X:framepointer] expected [linux amd64 go1.8.1 X:framepointer] | |
# k8s.io/client-go/pkg/apis/policy | |
register.go:20: import /home/snebel/AYLIEN/tap_image_builder/pkg/linux-amd64/k8s.io/apimachinery/pkg/runtime.a: object is [linux amd64 go1.7.4 X:framepointer] expected [linux amd64 go1.8.1 X:framepointer] | |
# k8s.io/client-go/pkg/apis/admissionregistration | |
register.go:20: import /home/snebel/AYLIEN/tap_image_builder/pkg/linux-amd64/k8s.io/apimachinery/pkg/runti |
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
$ make build | |
GOROOT=/home/snebel/AYLIEN/tap_image_builder/.deps/go /home/snebel/AYLIEN/tap_image_builder/.deps/gopath/bin/gb build all | |
k8s.io/client-go/util/homedir | |
k8s.io/apimachinery/pkg/util/json | |
k8s.io/apimachinery/pkg/conversion/queryparams | |
k8s.io/apimachinery/pkg/util/framer | |
k8s.io/apimachinery/pkg/version | |
k8s.io/apimachinery/pkg/util/rand | |
k8s.io/apimachinery/pkg/runtime/schema | |
k8s.io/apimachinery/pkg/util/yaml |
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 main | |
import ( | |
"flag" | |
"fmt" | |
"os" | |
"path/filepath" | |
"time" | |
"k8s.io/client-go/kubernetes" |
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 unittest | |
class TestGen(unittest.TestCase): | |
def test_generator(self): | |
def gen(): | |
i = 1 | |
while i < 10: | |
yield i | |
i += 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
def mygen(): | |
i = 1 | |
yield i | |
i += 1 | |
print(next(mygen())) | |
print(next(mygen())) | |
print(next(mygen())) |
NewerOlder