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
#!/bin/bash | |
gcloud --project deeplearning-platform-release \ | |
compute images list --no-standard-images |
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
function getBqTempTableByJobid { | |
local JOBID=$1 | |
bq show --format json -j ${JOBID} \ | |
| jq -r '.configuration.query.destinationTable | .projectId +":"+.datasetId+"."+.tableId' | |
} | |
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 day | |
FROM UNNEST( | |
GENERATE_DATE_ARRAY(DATE('2020-01-01'), DATE('2020-01-31'), INTERVAL 1 DAY) | |
) as day |
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
defaults write com.apple.Preview PVImagePrintingAutoRotate 0 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<!-- | |
# full credit to one of the comments here https://stackoverflow.com/questions/55880595/cant-connect-cloud-data-fusion-with-google-cloud-sql-for-postgresql | |
# just updated the dependency and mvn plugin versions | |
$ mvn clean package | |
--> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.altostrat.moritani</groupId> |
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
#!/bin/bash | |
gcloud --format json compute zones list | jq -r '.[] | select((.availableCpuPlatforms[]) | contains("Intel Skylake")) | .name' |
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
#!/bin/bash | |
## lists project quota in use | |
## "jq" is required | |
## usage: ./checkquota.sh <PROJECTID> | |
PROJECT=$1 | |
NOW=`date +%Y-%m-%d` | |
gcloud compute regions list --format json --project $PROJECT \ |
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
#standardSQL | |
CREATE TEMP FUNCTION | |
testVolonoi (data ARRAY<STRUCT<x float64, y float64, id string, name string>>, margin_ratio float64) | |
RETURNS ARRAY<STRUCT<id string, name string, wkt String>> | |
LANGUAGE js AS """ | |
let xl,xr=data[0].x; | |
let yt,yb=data[0].y; | |
for(i=1;i<data.length;i++){ | |
if(data[i].x < xl) xl=data[i].x ; |
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
#!/bin/bash | |
wget -qO - http://ipecho.net/plain; echo |
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
function clear(){ | |
var pdf_folderid="XXXXXXX"; | |
_clearPDFs(pdf_folderid); | |
} | |
function convert(){ | |
var src_folderid="YYYYYYY"; | |
var pdf_folderid="XXXXXXX"; | |
_doc2pdf(src_folderid,pdf_folderid); | |
} |