So an environment.yml might look like this:
name: my-environment
dependencies:
# conda deps use globs
- python=3.7.*
- pip:
# pip deps use requirements.txt format
- some_pip_dependency==1.2.3
{ | |
"meta": { | |
"error": null, | |
"warnings": [], | |
}, | |
"data": { | |
"firstName": "Josh", | |
"lastName": "Holbrook", | |
"bio": "Born in Alaska, lives in New York, has a pet budgie! Fun stuff!" | |
} |
import XMonad | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.EwmhDesktops | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.EZConfig | |
myConfig = docks $ ewmh def | |
{ terminal = "spawn-alacritty-cwd" | |
, modMask = mod4Mask | |
, focusedBorderColor = "#fabd2f" |
small coffee mug: 1 cup | |
large coffee mug: 1.5 cups | |
my huge-ass fist: 2 3/8 cups displacement in water | |
everything in https://lifehacker.com/use-your-hand-to-estimate-your-portions-5880630 - about 2x what they say | |
working guesstimate of a sunac salad bar tongload: 1 cup for bulking ingredients, 1/3 cup for flavoring ingredients, 4 oz for chicken |
So an environment.yml might look like this:
name: my-environment
dependencies:
# conda deps use globs
- python=3.7.*
- pip:
# pip deps use requirements.txt format
- some_pip_dependency==1.2.3
||connect.facebook.net/*fbevents.js$script | |
||*.facebook.com/*tr | |
||*.facebook.com/*impression.php |
@app.route('/whatever') | |
@handler | |
def route(): | |
warn(Warning('some warning')) | |
return 'some result' | |
# json response: {"meta":{"warnings":[{"type":"Warning","message":"some warning"}]},"data":"some result"} |
@app.route('/whatever') | |
@kinja_handler | |
def route(): | |
# do stuff | |
# exceptions get captured | |
# can optionally use yield keyword to collect | |
# warnings during execution - would "manually" | |
# exhaust the generator to collect warnings | |
# and a return value distinctly |
@app.route('/whatever') | |
def route(): | |
builder = ResponseBuilder() | |
# exceptions get stored in the builder if raised | |
# Alternately call builder.error(exc) I guess | |
with builder.capture(): | |
# We can push warnings onto the builder | |
# These can be subclassed | |
builder.warning(GenericWarning('some warning')) |
class Perhaps: | |
pass | |
class Probably(Perhaps): | |
def __init__(self, value): | |
self.value = value | |
class NahTho(Perhaps): | |
pass | |
class FooMixin(object): | |
def foo(self): | |
print('do foo') | |
class BarMixin(object): | |
def bar(self): | |
print('do bar') | |
class StuffDoer(FooMixin, BarMixin): | |
def __init__(self): |