Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# (c) Copyright 2009 Cloudera, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@BackSlasher
BackSlasher / percentile.py
Last active July 13, 2017 10:35
Python Percentile using numpy
#!/usr/bin/env python3
# Backslasher, Jul 2017
#
# Based on https://gist.github.com/vikrum/8202564
import numpy
import argparse
import fileinput
#!/bin/bash
FORMAT='+%Y-%m-%d %H:%M:%S'
SHORT_FORMAT='+%H:%M:%S'
my_date() { date "$FORMAT"; }
short_date() { date "$SHORT_FORMAT"; }
CURRENT_TZ="$(timedatectl show | perl -ne 'print $1 if /Timezone=(.*)/')"
HOME_TZ="Asia/Jerusalem"
if [[ "$CURRENT_TZ" == "$HOME_TZ" ]]; then