I hereby claim:
- I am liladas on github.
- I am liladas (https://keybase.io/liladas) on keybase.
- I have a public key ASDUZ2aVUlDMMYjsCHwQYZ4OeoFCIYFu0sDZCUL1BmUQgAo
To claim this, I am signing this object:
class Singleton(object): | |
''' singleton class only allows for one instantiation per python interpreter ''' | |
_instance = None | |
def __new__(class_, *args, **kwargs): | |
''' override __new__ behavior to only return new instance if not previously instantiated ''' | |
if not isinstance(class_._instance, class_): | |
class_._instance = object.__new__(class_, *args, **kwargs) | |
return class_._instance | |
class PrintLogger(Singleton): |
#!/bin/bash | |
CMD="$(basename $0)" | |
usage() { | |
echo "usage: $CMD [-f file | -n name ] [ -i | -u | -s | -r ] [-v] | [-h]" | |
echo '' | |
echo 'systemd service installer' | |
echo 'optional arguments: | |
-h, --help show this help message and exit |
#!/usr/bin/env python3 | |
from datetime import datetime, timedelta | |
current_time = datetime.now() | |
start_time = current_time.replace(microsecond=0,second=0,minute=0,hour=0)-timedelta(days=1) | |
end_time = current_time.replace(microsecond=0,second=0,minute=0,hour=0)-timedelta(seconds=1) | |
print("Getting All Data from Day Prior") | |
print("Time of invocation:", current_time) | |
print("Start Time Window :", start_time) |
#!/usr/bin/env python3 | |
import sys, logging | |
class FailedValidationException(Exception): | |
pass | |
class ClassToValidate(object): | |
def assert__testing_external(self): | |
return True |
#!/bin/bash | |
PST_TIME=$(env TZ=America/Los_Angeles date +"%-H") | |
UTC_TIME=$(env TZ=UTC date +"%-H") | |
DST_CHECK=$(($PST_TIME + 8 - $UTC_TIME)) | |
echo "PST Hour:" $PST_TIME | |
echo "UTC Hour:" $UTC_TIME |
# 1.install gource using HomeBrew | |
$ brew install gource | |
# 2.install avconv | |
git clone git://git.libav.org/libav.git | |
cd libav | |
# it will take 3-5 minutes to complie, be patient. | |
./configure --disable-yasm | |
make && make install |
#!/bin/bash | |
PST_TIME=$(env TZ=America/Los_Angeles date +"%-H") | |
UTC_TIME=$(env TZ=UTC date +"%-H") | |
DST_CHECK=$(($PST_TIME + 8 - $UTC_TIME)) | |
echo "PST Hour:" $PST_TIME | |
echo "UTC Hour:" $UTC_TIME |
#!/usr/bin/python | |
# | |
# Copyright 2017 Otto Seiskari | |
# Licensed under the Apache License, Version 2.0. | |
# See http://www.apache.org/licenses/LICENSE-2.0 for the full text. | |
# | |
# This file is based on | |
# https://github.com/swagger-api/swagger-ui/blob/4f1772f6544699bc748299bd65f7ae2112777abc/dist/index.html | |
# (Copyright 2017 SmartBear Software, Licensed under Apache 2.0) | |
# |
I hereby claim:
To claim this, I am signing this object:
# there is some trickyness installing AWS SAM CLI on Ubuntu 16.04 | |
# Official documentation recommends using Linux Homebrew... uhm nope. | |
# https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-linux.html | |
# SAM needs Python3.6+ and a blanket install sort fucks up the system and other apps. | |
# Install requirements | |
sudo apt-get install -y build-essential \ | |
checkinstall \ | |
libreadline-gplv2-dev \ | |
libncursesw5-dev \ |