I hereby claim:
- I am bendog on github.
- I am bendog (https://keybase.io/bendog) on keybase.
- I have a public key ASBVVsxFRCokBbBb4dblwEIsU-1_4JayCCC1ZpvFh3yEyQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<select id="reportFileName">
{% for report in reports_list %}
{% if report.year %}
{% for year in years %}
<option value="{{ report.id }}_{{ report.params }}_{{ year }}.html"> {{ report.name }} {{year}}</option>
{% for month in months %}
<option value="{{ report.id }}_{{ report.params }}_{{ year }}_{{ month}}.html"> {{ report.name }} {{year}} {{month}}</option>
{% end for %}
{% end for %}
#!/bin/sh | |
HOSTNAME=`echo $@ | sed s/.*@//` | |
set_bg () { | |
osascript -e "tell application \"Terminal\" to set current settings of window 1 to (first settings set whose name is \"$1\")" | |
} | |
on_exit () { | |
set_bg "BenDog" |
import functools | |
import datetime | |
def timed_cache(maxsize=128, typed=False, **timedelta_kwargs): | |
def _wrapper(f): | |
update_delta = datetime.timedelta(**timedelta_kwargs) | |
next_update = datetime.datetime.utcnow() - update_delta | |
# Apply @lru_cache to f with no cache size limit | |
f = functools.lru_cache(maxsize=maxsize, typed=typed)(f) |
[tool.black] | |
line-length = 120 | |
target_version = ['py37'] | |
exclude = ''' | |
( | |
/( | |
\.eggs # exclude a few common directories in the | |
| \.git # root of the project | |
| \.hg | |
| \.mypy_cache |
To understand what's happening with django generic class based views, lets create a function view where we handle all of the functionality explicity, then migrate the functionality to a class.
First let's setup the supporting files.
Here are a collection of command line arguments, which will help you fix your issues with .pyc files.
Go to your project root, the folder which is the base of your git repo.
Make sure your project is up to date with your remote, run git fetch
AWS API Gateway has the ability to pre-authenticate connections prior to launching the endpoint, by passing the authorizationToken
to a Lambda function. There are clear benefits for simplifying end point security and also a reduction in duplicated code by utilising this feature. However I found the AWS examples were excessively complicated for what should be a very simple task.
So here's my example.
The main concern is that AWS Lambda authentication expects a very specific response and if that response is not given it will throw a 500 error with x-amzn-ErrorType: AuthorizerConfigurationException
in the response header if the response object is not exactly as expected.
I personally use to handle the publishing part of my Lambdas, but I'll include an image of the API Gateway config.
I'm passionate about elegant systems, whether these are for software solutions, managing people, documenting complex problems, or for helping people connect and become more productive.
I believe all systems should help and not hinder the users.
I'm a firm believer in iterative design and Agile methodologies, however in true agile form, I believe the best methodologies should be more like principles. Principles which we can borrow from when it makes sense, not laws which must be obeyed. However when presented with a problem I will always suggest we work towards a minimum viable product, get it out in the hands of the intended audience, and then get the feedback required to make it what it needs to become.
go to https://brew.sh
Note: Be sure to run the commands which brew tells you to run at the end of your brew install!