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
""" | |
# This code works on a Zapier Action of "Code by Zapier" choosed its "Action Event" as "Run Python". | |
# Please set some values as "Input Data" | |
# - NOTION_BEARER_TOKEN : e.g. Bearer secret_aBcDefg... | |
# - NOTION_VERSION : e.g. 2022-02-22 | |
# - DATABASE_ID : e.g. 12ab3c... | |
# - PROPERTY_NAME_OF_LAST_CONTACT_DATE : e.g. last contacted at | |
# - PROPERTY_NAME_OF_CHURN_DATE : e.g. churned at | |
""" |
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 csv | |
import requests | |
from bs4 import BeautifulSoup | |
def main(): | |
stallions = [ | |
{'name' : 'グラスワンダー', 'id' : '0000299089'} | |
,{'name' : 'スクリーンヒーロー', 'id' : '0000801447'} | |
,{'name' : 'アーネストリー', 'id' : '0000885246'} | |
,{'name' : 'モーリス', 'id' : '0001138240'} |
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 | |
# usage: | |
# . ./metabase_api_exe.sh [HTTP method] [path] | |
# sample: | |
# . ./metabase_api_exe.sh GET /api/pulse | |
urlbase='http://path.to.your.metabase' | |
username='your_account@example.com' | |
password='your_password' |
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
# copy to your bash_profile or somewhere you write aliases, | |
# then you can convert a number to different base by cbase | |
# エイリアスを設定しているあたりにでも以下のコードをコピペすると基数変換がcbaseコマンドで簡単できるようになります | |
function cbase() { | |
function echo_usage() { | |
cat << USAGE | |
usage: cbase [-i num] [-o num] num | |
-i num | |
Set a number of base you want to convert FROM. | |
Default is 10. |