The Python standard library provides a module called SimpleHTTPServer.py
which can be used to setup a
simple server on your local device.
Here is a brief description of how to have fun with it:
As simple as:
$ python -m SimpleHTTPServer
CREATE TABLE circuits( | |
circuitId INTEGER NOT NULL PRIMARY KEY, | |
circuitRef VARCHAR(255) NOT NULL, | |
name VARCHAR(255) NOT NULL, | |
location VARCHAR(255) DEFAULT NULL, | |
country VARCHAR(255) DEFAULT NULL, | |
lat NUMERIC(8,5) DEFAULT NULL, | |
lng NUMERIC(10,6) DEFAULT NULL, | |
alt INTEGER DEFAULT NULL, | |
url VARCHAR(255) NOT NULL UNIQUE |
-- Helper function to generate random integer in a range. | |
-- Extremely useful for generating mock data for testing. | |
CREATE OR REPLACE FUNCTION RANDOM_BETWEEN(low INT ,high INT) | |
RETURNS INT AS | |
$$ | |
BEGIN | |
RETURN floor(random()* (high-low + 1) + low); | |
END; | |
$$ language 'plpgsql' STRICT; |
.PHONY: help | |
help: ## Show this help. | |
@echo "Targets:" | |
@grep -E '^[a-zA-Z\/_-]*:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\t%-20s: %s\n", $$1, $$2}' |
#!/usr/bin/env bash | |
echo "Send some traffic to your Diffy instance" | |
declare -a endpoints=("success" "noise" "regression" "noisy_regression") | |
declare -a values=("mixpanel" "twitter" "airbnb" "paytm" "baidu") | |
for i in {1..10} | |
do | |
for k in "${endpoints[@]}" | |
do | |
for v in "${values[@]}" | |
do |
import numpy as np | |
import matplotlib.pyplot as plt | |
def plot(x, y, deg, well): | |
''' | |
x, y are the inputs (porosity and permeability) respectively. | |
deg = degree of the ploynomial best-fit curve. | |
well = name of the well. | |
''' | |
z = np.polyfit(x, y, deg) |
#!/bin/bash | |
# | |
APP_VER="0.3" | |
BUILD_ARCH_AMD64="amd64" | |
BUILD_ARCH_ARM64="arm64" | |
BUILD_ARCH_ARM="arm" | |
BUILD_ARCH_x86="386" |
version: '3' | |
services: | |
postgres: | |
image: postgres:11.1-alpine | |
container_name: shadowsDB | |
environment: | |
POSTGRES_DB: "league_of_shadows" | |
POSTGRES_USER: "batman" | |
POSTGRES_PASSWORD: "blueflower" |
version: '3' | |
services: | |
postgres: | |
image: postgres:11.1-alpine | |
container_name: shadowsDB | |
environment: | |
POSTGRES_DB: "league_of_shadows" | |
POSTGRES_USER: "batman" | |
POSTGRES_PASSWORD: "blueflower" |
INSERT INTO members (name, bio) VALUES (E'Ra\'s al Ghul', E'He is the founder of The League of Shadows.'); | |
INSERT INTO members (name, bio) VALUES ('Bruce Wayne', E'Batman\'s secret identity is Bruce Wayne, an American billionaire, playboy, philanthropist, and owner of Wayne Enterprises.'); | |
INSERT INTO members (name, bio) VALUES ('Talia al Ghul', E'She is the daughter of Ra\'s al Ghul.'); | |
INSERT INTO members (name, bio) VALUES ('Bane', E'Bane was once a member of The League until he was excommunicated by Ra\'s al Ghul.'); |