This file contains hidden or 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
import time | |
import sys | |
import os | |
from flask import request | |
import statsd | |
statsd_host = os.getenv('STATSD_UDP_HOST', 'localhost') | |
statsd_port = os.getenv('STATSD_UDP_PORT', 8125) | |
c = statsd.StatsClient(statsd_host, statsd_port, prefix='testapp') |
This file contains hidden or 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/env python | |
from flask import Flask, Response | |
from metrics import setup_metrics | |
app = Flask(__name__) | |
setup_metrics(app) | |
@app.route('/test/') |
This file contains hidden or 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
<?php | |
/** | |
* Find dates of repeating events between two dates | |
*/ | |
function find_recurring_dates($start_date, $end_date, $repeat_days){ | |
$start = new DateTime($start_date); | |
$end = new DateTime($end_date); | |
// Find the number of days inbetween |