td-client-goのEndpoint設定にハマったのでメモ
client, err := td_client.NewTDClient(td_client.Settings{
ApiKey: "ApiKey",
})
READMEを読むとSettingsという構造体をNewTDClientに渡す必要がありそうなことがわかる。 US Regionを使っているならendpointについては特に気にしなくても良さそうだが、
td-client-goのEndpoint設定にハマったのでメモ
client, err := td_client.NewTDClient(td_client.Settings{
ApiKey: "ApiKey",
})
READMEを読むとSettingsという構造体をNewTDClientに渡す必要がありそうなことがわかる。 US Regionを使っているならendpointについては特に気にしなくても良さそうだが、
package main | |
import ( | |
"compress/gzip" | |
"encoding/json" | |
"io" | |
"net/http" | |
"os" | |
) |
# ここはビルド用のコンテナ | |
FROM python:3.8-buster as builder | |
WORKDIR /opt/app | |
COPY requirements.lock /opt/app | |
RUN pip3 install -r requirements.lock | |
# ここからは実行用コンテナの準備 | |
FROM python:3.8-slim-buster as runner |
mkdir -p ~/.vim/pack/plugins/start | |
echo "packloadall " Load all plugins." >> ~/.zshrc | |
echo "silent! helptags ALL " Load help files for all plugins." >> ~/.zshrc | |
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/pack/plugins/start/nerdtree |
syntax on " Enable syntax highlighting. | |
filetype plugin indent on " Enable file type based indentation. | |
set autoindent " Respect indentation when starting a new line. | |
set expandtab " Expand tabs to spaces. Essential in Python. | |
set tabstop=4 " Number of spaces tab is counted for. | |
set shiftwidth=4 " Number of spaces to use for autoindent. | |
set backspace=2 " Fix backspace behavior on most terminals. | |
set undofile |
WITH source AS (
SELECT 'KEY001' AS key_col, '[{"key":"k1","value":"v11"},{"key":"k2","value":"v12"}]' AS json_array_col
UNION ALL
SELECT 'KEY002' AS key_col, '[{"key":"k2","value":"v22"},{"key":"k3","value":"v23"}]' AS json_array_col
#!/bin/bash | |
digdag attempts | grep "attempt id" | awk '{print $3}' | while read -r f; do | |
digdag kill "$f" | |
done |
function postTreasureData() { | |
database = "databasename" | |
table = "tablename" | |
var payload = { | |
'name': 'Bob Smith', | |
'age': 35, | |
'pets': ['fido', 'fluffy'] | |
} | |
Logger.log(payload); |
const request = require('request'); | |
function getPageHtml(url){ | |
return new Promise(function(resolve,reject) { | |
request(url,function(error,response,body) { | |
resolve(body); | |
}); | |
}); | |
} | |
async function main() { |