This file contains 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 os | |
from flask import Flask, render_template, request | |
import stripe | |
stripe_keys = { | |
'secret_key': os.environ['SECRET_KEY'], | |
'publishable_key': os.environ['PUBLISHABLE_KEY'] | |
} | |
stripe.api_key = stripe_keys['secret_key'] |
This file contains 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
## The MIT License (MIT) | |
## --------------------- | |
## | |
## Copyright (C) 2014 Nicco Kunzmann | |
## | |
## https://gist.github.com/niccokunzmann/6038331 | |
## | |
## Permission is hereby granted, free of charge, to any person obtaining | |
## a copy of this software and associated documentation files (the "Software"), |
This file contains 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 psspy | |
psspy.throwPsseExceptions = True | |
def ierr_doc(psspyFunc, ierr): | |
if not ierr: | |
return '' | |
# Find all the errors documented in the doc string | |
errDoc = psspyFunc.__doc__[psspyFunc.__doc__.find('IERR = 0'):] | |
errs = {} |