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 keras.models import Sequential | |
from keras.layers import Dense | |
import numpy | |
numpy.random.seed(7) | |
dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",") | |
# 因為不太懂這樣的用法,所以用下面的程式來實驗... | |
X = dataset[:,0:8] | |
Y = dataset[:,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
var token = "a JWT token" | |
// ... | |
var req = URLRequest(url: URL(string: "\(api_uri)/auth/refresh")!) | |
req.httpMethod = "POST" | |
req.addValue("Authorizetion", forHTTPHeaderField: token) | |
URLSession.shared.rx.data(request: req) | |
.map{ try! JSONDecoder().decode(TokenResult.self, from: $0) } |
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 alpine | |
RUN apk add --no-cache openssh-client | |
ADD ./entrypoint.sh /entrypoint.sh | |
RUN chmod +x /entrypoint.sh | |
VOLUME [ "/root/.ssh" ] | |
ENTRYPOINT [ "./entrypoint.sh" ] |
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 alpine | |
RUN apk add --no-cache git openssh-client bash | |
# RUN ssh-keygen -q -f /root/.ssh/id_rsa -P "" | |
COPY ./ssh /root/.ssh | |
RUN git clone git@github.com:mosluce/some-private.git |
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
pipeline: | |
release: | |
image: plugins/ecr | |
access_key: ${ACCESS_KEY} | |
secret_key: ${SECRET_KEY} | |
repo: ${ACCOUNT_ID}.dkr.ecr.us-west-1.amazonaws.com/klcc/klcc-api | |
registry: ${ACCOUNT_ID}.dkr.ecr.us-west-1.amazonaws.com | |
region: us-west-1 | |
tags: | |
- latest |
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
# build stage | |
FROM golang:alpine AS build-env | |
RUN apk add --no-cache git bzr gcc musl-dev | |
RUN mkdir -p /go/src/klcc/auth | |
WORKDIR /go/src/klcc/auth | |
COPY . . | |
RUN go get -u github.com/kardianos/govendor |
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
console.log(1) | |
step1(x, function(value1){ | |
console.log(2) | |
//do something... | |
step2(y, function(value2){ | |
console.log(3) | |
//do something... | |
step3(z, function(value3){ | |
//do something... | |
console.log(4) |
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 ubuntu:16.04 | |
# Essential packages | |
RUN apt-get update | |
RUN apt-get install -y build-essential binutils-doc autoconf flex bison libjpeg-dev | |
RUN apt-get install -y libfreetype6-dev zlib1g-dev libzmq3-dev libgdbm-dev libncurses5-dev | |
RUN apt-get install -y automake libtool libffi-dev curl git tmux gettext | |
# Python | |
RUN apt-get install -y python3 python3-pip python-dev python3-dev python-pip virtualenvwrapper |
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 ( | |
"bufio" | |
"fmt" | |
"os" | |
serial "go.bug.st/serial.v1" | |
) |
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
// | |
// Layout.swift | |
// App | |
// | |
// Created by 默司 on 2017/12/1. | |
// Copyright © 2017年 GTS. All rights reserved. | |
// | |
import UIKit |