curl -v www.example.com
curl --header "X-Signature: XXX" http://example.com/endpoint
curl -H "X-Signature: XXX" -H "Content-Type: application/json http://example.com/endpoint
curl -X DELETE example.com
# install dependencies | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y cmake | |
sudo apt-get install -y libgtk2.0-dev | |
sudo apt-get install -y pkg-config | |
sudo apt-get install -y python-numpy python-dev | |
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev | |
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev | |
" Setup vundle first: https://github.com/VundleVim/Vundle.vim | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') |
var AWS = require('aws-sdk'); | |
AWS.config.region = 'ap-southeast-2'; | |
var kms = new AWS.KMS({ apiVersion: '2014-11-01' }); | |
var encryptedParams = { | |
CiphertextBlob: '' | |
}; | |
kms.decrypt(encryptedParams, function(err, decryptedData){ |
package main | |
import ( | |
"log" | |
language "cloud.google.com/go/language/apiv1" | |
"github.com/dghubble/go-twitter/twitter" | |
"golang.org/x/net/context" | |
languagepb "google.golang.org/genproto/googleapis/cloud/language/v1" | |
) |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.mycompany.myproject</groupId> | |
<artifactId>smartCapture</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>${project.artifactId}</name> | |
<description>Smart Capture</description> | |
<inceptionYear>2015</inceptionYear> | |
<licenses> |
# Basic Makefile for Golang project | |
# Includes GRPC Gateway, Protocol Buffers | |
SERVICE ?= $(shell basename `go list`) | |
VERSION ?= $(shell git describe --tags --always --dirty --match=v* 2> /dev/null || cat $(PWD)/.version 2> /dev/null || echo v0) | |
PACKAGE ?= $(shell go list) | |
PACKAGES ?= $(shell go list ./...) | |
FILES ?= $(shell find . -type f -name '*.go' -not -path "./vendor/*") | |
# Binaries | |
PROTOC ?= protoc |
image: node:8 | |
stages: | |
- test | |
- build | |
- deploy | |
.deploy_template: &deploy_template | |
before_script: | |
- apt-get update |
from tensorflow.python.client import device_lib | |
def get_available_gpus(): | |
local_device_protos = device_lib.list_local_devices() | |
return [x.name for x in local_device_protos if x.device_type == 'GPU'] | |
get_available_gpus() |