$ pip install click requests
$ python query_export.py --redash-url "https://app.redash.io/" --api-key ""
#!/usr/bin/env python | |
# vim: ts=4:sw=4:expandtab:autoindent: | |
import os | |
import sys | |
import requests | |
import filecmp | |
from fabric.context_managers import hide, settings, prefix | |
from fabric.api import sudo, task, run, cd, env | |
from fabric.contrib.console import confirm | |
from fabric.colors import green |
var audit = { //configure audit settings | |
export: { | |
project_id: 'PROJECT ID TO AUDIT QUERIES FROM' | |
}, | |
import: { | |
project_id: 'PROJECT ID TO STORE AUDIT DATA IN', | |
dataset_id: 'DATASET ID TO STORE AUDIT DATA IN', | |
table_id: 'TABLE ID TO STORE AUDIT DATA IN' | |
} | |
}; |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
// Name of the struct tag used in examples | |
const tagName = "validate" |
import hapi from 'hapi'; | |
import graphql from 'graphql'; | |
import { ApolloHAPI } from 'apollo-server'; | |
const myGraphQLSchema = new graphql.GraphQLSchema({ | |
// define your schema in GraphQL.js syntax here ... | |
}); | |
const server = new hapi.Server(); |
image: python:2.7 | |
before_script: | |
- echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list | |
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
- apt-get update && apt-get install google-cloud-sdk | |
after_script: | |
- rm /tmp/$CI_PIPELINE_ID.json |
from pyspark.sql import SparkSession | |
spark = SparkSession \ | |
.builder \ | |
.appName("demography mapper") \ | |
.getOrCreate() | |
df_user = spark.read.format("com.mongodb.spark.sql.DefaultSource")\ | |
.option("spark.mongodb.input.uri", "mongodb://localhost:27017/raw.user").load() |
# Clone the Tensorflow Serving source | |
git clone https://github.com/tensorflow/serving | |
cd serving && git checkout <commit_hash> | |
# Build the docker image (time to go get yourself a coffee, maybe a meal as well, this will take a while.) | |
docker build -t some_user_namespace/tensorflow-serving:latest -f ./serving/tensorflow_serving/tools/docker/Dockerfile.devel . | |
# Run up the Docker container in terminal | |
docker run -ti some_user_namespace/tensorflow-serving:latest |
package main | |
import ( | |
"net/http" | |
jwtmiddleware "github.com/auth0/go-jwt-middleware" | |
jwt "github.com/dgrijalva/jwt-go" | |
"github.com/gorilla/mux" | |
"github.com/urfave/negroni" | |
) |
package app | |
import ( | |
"net/http" | |
u "lens/utils" | |
"strings" | |
"go-contacts/models" | |
jwt "github.com/dgrijalva/jwt-go" | |
"os" | |
"context" |