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 loghog, logging | |
LOGHOG_APP_NAME = 'lenspro-dev' | |
LOGHOG_HOST = '192.168.3.10' | |
LOGHOG_PORT = '5577' | |
LOGHOG_SSL = { | |
'pemfile': '/etc/loghogd/certs/lp-demo-web.pem', | |
'cacert': '/etc/loghogd/certs/lp-demo-db0-ca.cert' | |
} | |
h = loghog.LoghogHandler(LOGHOG_APP_NAME, host=LOGHOG_HOST, ssl_info=LOGHOG_SSL, port=LOGHOG_PORT, print_debug=True) | |
r = logging.LogRecord('foo', logging.WARN, '/', 'TESTING', None, None, None) |
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
if num_days <= 3: | |
if order_is_shipping: | |
price = model.three_day_rate * qty | |
else: | |
price = model.four_day_rate * qty | |
elif num_days == 4: | |
price = model.four_day_rate * qty | |
elif num_days > 4: | |
days_amount = max(0, self._calculate_price_for_days(num_days-4, qty=qty, model=model)) | |
price = (model.four_day_rate * qty) + days_amount |
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
def main(): | |
smugmug = auth() | |
c = get_csv_reader() | |
headers = c.next() | |
del headers | |
counter = 0 | |
try: | |
for row in c: | |
print '.', | |
sys.stdout.flush() |
NewerOlder