docker run --rm --name statements -e POSTGRES_PASSWORD=postgres -d -p 5432:5432 postgres
export PGUSER=postgres
export PGPASSWORD=postgres
export PGHOST=0.0.0.0
psql -f init.sql
psql -f populate.sql
psql -f chart.sql
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
<html> | |
<!-- See also: http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html --> | |
<head> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"></script> | |
<style> | |
#image-map { | |
width: 100%; | |
height: 300px; | |
border: 1px solid #ccc; | |
margin-bottom: 10px; |
This file has been truncated, but you can view the full file.
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>pgBadger :: PostgreSQL Log Analyzer</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="robots" content="noindex,nofollow"> | |
<meta http-equiv="Expires" content="Thu Apr 18 08:57:27 2019"> | |
<meta http-equiv="Generator" content="pgBadger v10.3"> | |
<meta http-equiv="Date" content="Thu Apr 18 08:57:27 2019"> | |
<link rel="shortcut icon" href="data:image/x-icon;base64, |
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 flask import Flask, request, jsonify, json, abort | |
from flask_cors import CORS, cross_origin | |
import pandas as pd | |
app = Flask(__name__) | |
cors = CORS(app) | |
app.config['CORS_HEADERS'] = 'Content-Type' |
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
. |
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
root = true | |
[*] | |
charset = utf-8 | |
indent_style = space | |
indent_size = 4 | |
# Unix-style newlines | |
end_of_line = lf | |
# Remove any whitespace characters preceding newline characters | |
trim_trailing_whitespace = true |
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 test_mock_open(mocker): | |
with mocker.patch('builtins.open', mocker.mock_open(read_data='foo')): | |
with open(__file__) as f: | |
assert f.read() == 'foo' |
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
#! /bin/python | |
import subprocess | |
import os | |
print("subprocess.call") | |
print("Without seteuid") | |
subprocess.call(['id', '-u']) | |
print("With seteuid") |
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/python | |
import time | |
start = time.time() | |
for i in range(100000000): | |
if False and 'blue' in 'sky is blue': | |
pass | |
end = time.time() | |
print(end - start) |
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
<video autoplay="yes" loop="yes" poster="mastering-layers.687ac430.png"> | |
<source src="http://bluecarto.free.fr/temboard.webm" type="video/webm"> | |
</video> |
NewerOlder