diff --git a/20201009010321-static_type_checking.org b/20201009010321-static_type_checking.org index 55759ce..2aa07c8 100644 --- a/20201009010321-static_type_checking.org +++ b/20201009010321-static_type_checking.org @@ -2,3 +2,6 @@ :ID: 1882370a-e4df-42a3-ab5a-32b650b754a6 :END: #+title: Static Typing + +A property of a [[id:c90b53a0-62f7-4115-a417-85e22f55d83d][Type System]] such that types are verified at compile time, with +the goal of removing the need for runtime checks. diff --git a/20210608234049-hy.org b/20210608234049-hy.org index 09a8f6e..a9ddc98 100644 --- a/20210608234049-hy.org +++ b/20210608234049-hy.org @@ -18,7 +18,7 @@ A lisp dialect of [[id:cda9c620-fec5-4549-b979-22fc06819d77][Python]]. Disassembling the above code generates the following Python equivalent. -#+begin_src hy :exports results :cache yes :wrap src python +#+begin_src hy :exports results :eval no-export :cache yes :wrap src python (disassemble (quote (do @@ -31,7 +31,7 @@ Disassembling the above code generates the following Python equivalent. True) #+end_src -#+RESULTS[08e5153ad26dcf0fd8ca2a7c041eb26268461381]: +#+RESULTS[1efb8b1b457cd5e9ece84633e21daf77ea8e8753]: #+begin_src python from dataclasses import dataclass diff --git a/aweber/20210901164718-test.org b/aweber/20210901164718-test.org deleted file mode 100644 index 0214a0b..0000000 --- a/aweber/20210901164718-test.org +++ /dev/null @@ -1 +0,0 @@ -#+title: Test diff --git a/aweber/20211001095858-tracking_progress_of_moving_pages_out_of_sites.org b/aweber/20211001095858-tracking_progress_of_moving_pages_out_of_sites.org new file mode 100644 index 0000000..a0c41f7 --- /dev/null +++ b/aweber/20211001095858-tracking_progress_of_moving_pages_out_of_sites.org @@ -0,0 +1,161 @@ +:PROPERTIES: +:ID: 3cc8bd09-dd02-4950-8c89-a737f92809fd +:header-args:bash: :dir ~/sites-clean :exports both +:header-args:python: :exports results +:END: +#+title: Tracking progress of moving pages out of Sites + +* Metrics + +#+caption: Migrated controllers in the CP +#+begin_src python :var total=controller-count done=js-controller-count :results file + import matplotlib.pyplot as plt + + total = float(total) + fig1, ax1 = plt.subplots() + ax1.pie( + [100 * (total - done) / total, 100 * done / total], + explode=[0.0, 0.1], + labels=["Legacy", "JavaScript"], + autopct="%1.1f%%", + shadow=True, + startangle=90, + ) + ax1.axis("equal") + plt.title("Controller Types") + filename = "controllers-migrated-in-sites.png" + plt.savefig(filename) + return filename +#+end_src + +#+RESULTS: +[[file:controllers-migrated-in-sites.png]] + +** Controllers in Sites +#+caption: Identifying the total number of public controllers in the CP +#+name: controller-count +#+begin_src bash + grep -l AppController aweber_app/controllers/*_controller.php | wc -l +#+end_src + +#+RESULTS: controller-count +: 85 + +** Controllers loading JavaScript applications +#+caption: Identifying the number of controllers loading JS applications +#+name: js-controller-count +#+begin_src bash + egrep -l '\bappName\b' aweber_app/controllers/*_controller.php | wc -l +#+end_src + +#+RESULTS: js-controller-count +: 24 + +* Progress over time + +#+caption: Percentage of controllers migrated over time +#+begin_src python :var progress=progress :results file + from datetime import date + + import matplotlib.pyplot as plt + + progress = [[date.fromisoformat(row[0]), 100.0 * row[2] / row[1]] for row in progress] + x = [p[0] for p in progress] + y = [p[1] for p in progress] + plt.plot(x, y) + plt.fill_between(x, y, alpha=0.3) + plt.gcf().autofmt_xdate() + + plt.title("% Controllers Migrated Over Time") + + filename = "controllers-migrated-in-sites-over-time.png" + plt.savefig(filename) + return filename + +#+end_src + +#+RESULTS: +[[file:controllers-migrated-in-sites-over-time.png]] + +#+caption: Identifying the last tagged release each month +#+name: tags +#+begin_src bash :results silent :exports code + git log --tags \ + --simplify-by-decoration \ + --pretty="format:%as#%S" \ + --after="2018-01-01" \ + | sort -r -u -t- -k1,2 # Last tag of each month +#+end_src + +#+caption: Gathering progress over time +#+name: progress +#+begin_src bash :noweb yes :cache yes :exports code + controller_total () { + <> + } + + controller_done () { + <> + } + + tags () { + <> + } + + git checkout -q master + for taginfo in $(tags); do + date=$(echo $taginfo | cut -d '#' -f 1) + tag=$(echo $taginfo | cut -d '#' -f 2) + + git checkout $tag + echo $date $(controller_total) $(controller_done) + done + git checkout -q master +#+end_src + +#+RESULTS[b2f17a7946c030068f7ef85189b10bd0c5cb6a0a]: progress +| 2021-09-30 | 85 | 24 | +| 2021-08-31 | 85 | 23 | +| 2021-07-28 | 85 | 23 | +| 2021-06-28 | 85 | 23 | +| 2021-05-27 | 85 | 23 | +| 2021-04-28 | 85 | 23 | +| 2021-03-04 | 84 | 22 | +| 2021-02-25 | 84 | 22 | +| 2021-01-28 | 83 | 16 | +| 2020-12-29 | 83 | 16 | +| 2020-11-20 | 83 | 16 | +| 2020-10-29 | 83 | 16 | +| 2020-09-30 | 83 | 16 | +| 2020-08-27 | 83 | 16 | +| 2020-07-31 | 83 | 16 | +| 2020-06-30 | 82 | 15 | +| 2020-05-29 | 81 | 15 | +| 2020-04-30 | 81 | 15 | +| 2020-03-31 | 81 | 15 | +| 2020-02-28 | 81 | 15 | +| 2020-01-30 | 82 | 15 | +| 2019-12-18 | 82 | 15 | +| 2019-11-25 | 82 | 15 | +| 2019-10-31 | 81 | 14 | +| 2019-09-30 | 81 | 14 | +| 2019-08-27 | 81 | 14 | +| 2019-07-31 | 81 | 14 | +| 2019-06-27 | 81 | 14 | +| 2019-05-31 | 81 | 14 | +| 2019-04-26 | 80 | 13 | +| 2019-03-29 | 79 | 13 | +| 2019-02-28 | 78 | 12 | +| 2019-01-30 | 78 | 12 | +| 2018-12-27 | 77 | 10 | +| 2018-11-29 | 76 | 10 | +| 2018-10-31 | 75 | 9 | +| 2018-09-28 | 75 | 9 | +| 2018-08-31 | 74 | 8 | +| 2018-07-26 | 74 | 8 | +| 2018-06-29 | 73 | 6 | +| 2018-05-31 | 73 | 6 | +| 2018-04-30 | 73 | 6 | +| 2018-03-29 | 73 | 6 | +| 2018-02-28 | 73 | 6 | +| 2018-01-24 | 73 | 6 | diff --git a/aweber/controllers-migrated-in-sites-over-time.png b/aweber/controllers-migrated-in-sites-over-time.png new file mode 100644 index 0000000..f5c1225 Binary files /dev/null and b/aweber/controllers-migrated-in-sites-over-time.png differ diff --git a/aweber/controllers-migrated-in-sites.png b/aweber/controllers-migrated-in-sites.png new file mode 100644 index 0000000..d0a58a9 Binary files /dev/null and b/aweber/controllers-migrated-in-sites.png differ diff --git a/aweber/ecommerce-cancellation-webhooks.svg b/aweber/ecommerce-cancellation-webhooks.svg index 9ec0a53..863853c 100644 --- a/aweber/ecommerce-cancellation-webhooks.svg +++ b/aweber/ecommerce-cancellation-webhooks.svg @@ -1,4 +1,4 @@ -InternalStripe Payments (Unauthenticated)Stripe Payments (Unauthenticated)Core APICore APIStripeStripePOST /stripe/webhooks (customer.subscription.updated)Fetch product metadataRemove tags from subscriber or unsubscribe200 OKPayment succeededPayment failedPayment failedPayment FailedUnsubscribedPayment FailedPayment Failed - + - + OpenAPIError - -OpenAPIError + +OpenAPIError CastError - -CastError + +CastError OpenAPIError->CastError - - + + DeserializeError - -DeserializeError + +DeserializeError OpenAPIError->DeserializeError - - + + UnmarshalError - -UnmarshalError + +UnmarshalError OpenAPIError->UnmarshalError - - + + EmptyParameterValue - -EmptyParameterValue + +EmptyParameterValue DeserializeError->EmptyParameterValue - - + + ValidateError - -ValidateError + +ValidateError UnmarshalError->ValidateError - - + + UnmarshallerError - -UnmarshallerError + +UnmarshallerError UnmarshalError->UnmarshallerError - - + + InvalidSchemaValue - -InvalidSchemaValue + +InvalidSchemaValue ValidateError->InvalidSchemaValue - - + + InvalidSchemaFormatValue - -InvalidSchemaFormatValue + +InvalidSchemaFormatValue UnmarshallerError->InvalidSchemaFormatValue - - + + FormatterNotFoundError - -FormatterNotFoundError + +FormatterNotFoundError UnmarshallerError->FormatterNotFoundError - - + +