$ 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
This file contains 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
SELECT DISTINCT | |
r.ev_class::regclass AS materialized_view, | |
n.nspname AS schema_name, | |
c.relname AS object_name, | |
CASE c.relkind | |
WHEN 'r' THEN 'Table' | |
WHEN 'v' THEN 'View' | |
WHEN 'm' THEN 'Materialized View' | |
WHEN 'f' THEN 'Foreign Table' | |
WHEN 'p' THEN 'Partitioned Table' |
This file contains 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 json | |
import subprocess | |
import click | |
import requests | |
### https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions/get | |
### https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions/patch | |
This file contains 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
-------------------------------------------------- | |
------------------ Add role(s) ------------------- | |
-------------------------------------------------- | |
CREATE ROLE acme_admin | |
WITH ENCRYPTED PASSWORD 'devpassword_admin' | |
VALID UNTIL 'infinity' | |
CONNECTION LIMIT -1 | |
NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS; |
This file contains 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
# See: https://www.youtube.com/watch?v=EONem7cdmSM | |
import fractions | |
import numpy as np | |
def even_sum(m, n): | |
for i in range(n): | |
s = sum(m[i, :]) |
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 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 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 |
NewerOlder