$ python transformed.py
{'points': []}
{'points': []}
`grid3` failed as expected
{'points': [{'x': 3, 'y': 4}]}
{'points': [{'x': 3, 'y': 4}, {'x': 5, 'y': 12}]}
`grid6` failed as expected
All gcloud config fields involving region / location
Via https://cloud.google.com/sdk/gcloud/reference/topic/configurations
ai_platform/region
ai/region
artifacts/location
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
| CREATE TABLE foo ( | |
| id INTEGER PRIMARY KEY, | |
| v1 INTEGER NOT NULL, | |
| v2 INTEGER NOT NULL, | |
| v3 INTEGER NOT NULL | |
| ); | |
| ALTER TABLE foo | |
| ADD CONSTRAINT uniq_except_v3_zero | |
| EXCLUDE USING GIST (v1 WITH =, v2 WITH =, v3 WITH =) WHERE (v3 <> 0); |
Came up in hardfinhq/go-date#13
Consider
package main
import (
"fmt"
"os"
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
| /1930s.html | |
| /1960s.html | |
| /1970s.html | |
| /1980s.html | |
| /1990s.html | |
| /2000s.html | |
| /2010s.html |
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
| import graphql.language | |
| import networkx as nx | |
| import tabulate | |
| def _find_field_fragment_dependencies( | |
| field_node: graphql.language.ast.FieldNode, | |
| ) -> list[str]: | |
| if field_node.selection_set is None: | |
| return [] |
The TL;DR here is that if the standard encoding/json machinery in
Go sees a null in a JSON field or a nil pointer in a Go field (of type
*T), then it will not invoke the UnmarshalJSON() / MarshalJSON() on
your type.
$ go run ./main.go
t1 = main.T{Shift:(*main.Point)(nil)} (nil stays nil, UnmarshalJSON() not invoked)
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
| # Copyright (c) 2023 - Present. Hardfin, Inc. All rights reserved. | |
| # Hardfin Confidential - Restricted | |
| import csv | |
| import io | |
| import pathlib | |
| import subprocess | |
| import tempfile | |