This file contains hidden or 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
| --- | |
| title: 'How Buildings Learn: What Happens After They''re Built' | |
| author: Stewart Brand | |
| notes: | |
| - location: 3% | |
| highlight: Almost no buildings adapt well. They’re designed not to adapt; also budgeted | |
| and financed not to, constructed not to, administered not to, maintained not to, | |
| regulated and taxed not to, even remodeled not to. But all buildings (except monuments) | |
| adapt anyway, however poorly, because the usages in and around them are changing | |
| constantly. |
This file contains hidden or 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
| from pydantic import BaseModel, ConfigDict, Field | |
| class Foo(BaseModel): | |
| class_id: int = Field(validation_alias="id", serialization_alias="id") | |
| model_config = ConfigDict(validate_by_name=True, serialize_by_alias=True) | |
| class TestFoo: |
This file contains hidden or 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
| from pydantic import BaseModel, ConfigDict, Field | |
| class Foo(BaseModel): | |
| class_id: int = Field(validation_alias="id", serialization_alias="id") | |
| model_config = ConfigDict(validate_by_name=True, serialize_by_alias=True) | |
| class TestFoo: |
This file contains hidden or 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
| require "benchmark" | |
| def func_a(*arrays) | |
| enumerators = arrays.map {|a| (a.each + [Float::INFINITY]).each } | |
| output = Set.new | |
| until enumerators.all? { _1.peek.infinite? } | |
| output << enumerators.min {|a,b| a.peek <=> b.peek }.next | |
| end | |
| output | |
| end |
This file contains hidden or 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
| - layout: title | |
| content: | | |
| # Pry | |
| - content: | | |
| # Installation | |
| ### Global | |
| ```console |
This file contains hidden or 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
| from dataclasses import dataclass | |
| from typing import Literal, Protocol, Optional | |
| class Side: | |
| ... | |
| class Wombat: | |
| ... |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require "json" | |
| require "net/http" | |
| require "uri" | |
| require "irb" | |
| sentry_auth_token = ENV.fetch("SENTRY_AUTH_TOKEN") |
This file contains hidden or 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
| # https://codingdojo.org/kata/Args/ | |
| require "minitest" | |
| class TestArgs < Minitest::Test | |
| def test_args | |
| parser = ArgsParser.new(l: :bool, p: :int, d: :str) | |
| args = parser.parse(*%w[-l -p 8080 -d /usr/logs]) |
This file contains hidden or 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
| https://github.com/qmacro/level-up-your-json-fu-with-jq/blob/main/talknotes.md | |
| pbpaste | from json | |
| pbpaste | save environment.json | |
| # jq '.availableEnvironments|length' environments.json | |
| open environment.json | get availableEnvironments | length | |
| # jq -r '.[].name' offerings.json |
NewerOlder