I hereby claim:
- I am kevinastone on github.
- I am kevinastone (https://keybase.io/kevinastone) on keybase.
- I have the public key with fingerprint FC0C AEC9 3398 1A2D 56BF 9619 6344 9238 5969 5C55
To claim this, I am signing this object:
# | |
# Author:: Adam Jacob (<[email protected]>) | |
# Author:: Seth Chisamore (<[email protected]>) | |
# Copyright:: Copyright (c) 2010-2011 Opscode, Inc. | |
# License:: Apache License, Version 2.0 | |
# | |
# 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 | |
# |
x = 1 | |
class A(object): | |
y = x + 1 | |
a = A() | |
a.y |
class A(object): | |
y = x + 1 | |
x = 1 | |
a = A() | |
a.y |
{% macro mount_device(app, device, dir) -%} | |
{{ app }}-formatted: | |
cmd.run: | |
- name: "mkfs.ext4 /dev/{{ device }}" | |
- unless: "file -sL /dev/{{ device }} | grep -q ext4" | |
{{ app }}-mounted: | |
mount.mounted: |
from functools import wraps | |
def skip_when_testing(func=None): | |
""" | |
Provides a way to provide functionality that only applies in the real production environment, otherwise stubs out the function. | |
Use this with **care** as this makes testability difficult and can lead to errors/bugs leaking into production. This should really only be used for non-functional (fire-and-forget) components like error logging or analytics. | |
""" | |
def wrapper(func): |
import pytz | |
import pandas as pd | |
series = pd.Series.from_csv('series_crash.csv') | |
# My actual data is already in UTC, but need to localize due to CSV source | |
series = series.tz_localize(pytz.UTC) | |
# Convert from UTC to Local Timezone (PST in this case) | |
local_timezone = pytz.timezone('America/Los_Angeles') |
# Change this to your base projects path [$WORKON_BASE_DIR/{project1,project2,...}] | |
WORKON_BASE_DIR=/mnt/hgfs | |
# Change this to your relative virtual_env dir (if exists) [$WORKON_BASE_DIR/{project}/$VENV_DIR] | |
VENV_DIR=".env" | |
function workon() { | |
[ -z "$VIRTUAL_ENV" ] || deactivate | |
cd $WORKON_BASE_DIR/$1 && | |
[ -d $VENV_DIR ] && source $VENV_DIR/bin/activate |
#!/bin/bash | |
BASE_DIR=${TMPDIR:-/var/tmp} | |
ORIG_DIR=$PWD | |
HASH_CMD="md5sum" | |
DIR_NAME=`echo $PWD | $HASH_CMD | cut -f1 -d " "` | |
TMP_DIR=$BASE_DIR/$DIR_NAME | |
mkdir -p $TMP_DIR |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
import subprocess | |
import itertools | |
import sys | |
from south.migration import all_migrations | |
from south.models import MigrationHistory |