Skip to content

Instantly share code, notes, and snippets.

View asSqr's full-sized avatar

as_sqr asSqr

  • The University of Tokyo
  • Tokyo, Japan
View GitHub Profile
import ts, { factory } from "typescript";
export function transformerFactory(context: ts.TransformationContext) {
function visitNode(node: ts.Node): ts.Node {
const newNode = ts.visitEachChild(node, visitNode, context);
if (
ts.isJsxOpeningElement(newNode) ||
ts.isJsxSelfClosingElement(newNode)
) {
return appendSourceMapAttribute(newNode.getSourceFile(), newNode);
@alexcasalboni
alexcasalboni / aws-lambda-static-type-checker.md
Last active May 22, 2023 07:31
AWS Lambda Static Type Checker Example (Python3)

How to use Python3 Type Hints in AWS Lambda

TL;DR

Static Type Checkers help you find simple (but subtle) bugs in your Python code. Check out lambda_types.py and incrementally improve your code base and development/debugging experience with type hints.

Your Lambda Function code will go from this:

@pi8027
pi8027 / gist:01fc48c13f2ed893e326439bd9a266b1
Last active February 4, 2022 04:29
Hilbert-Post Completeness of BoolState
以下は Lecture 1: Algebraic Effects I (Gordon Plotkin) - Exercise 5 の解である。
http://cs.ioc.ee/ewscs/2015/plotkin/plotkin-slides-exercises1.pdf
p. 31 の等式理論 BoolState より、いかなる式に対しても
read(write_b1(x), write_b2(y)) (x, yは変数)
という形の normal form が自然に与えられる。
以下のように、2つの異なる normal form に関する等式を仮定する:
read(write_b1(x), write_b2(y)) = read(write_b1'(x'), write_b2'(y')) (b1 ≠ b1' ∨ x ≠ x' ∨ b2 ≠ b2' ∨ y ≠ y')