- フォロワーIDを取得する => 5,000*15で15分で75,000フォロワー取得可能
- IDからユーザーを検索 => 100*900で15分で90,000分のユーザー情報取得可能
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 | |
## Linux | |
START_DATE="20160902" | |
END_DATE="20170303" | |
for (( DATE=${START_DATE}; ${DATE} < ${END_DATE}; DATE=`date -d "${DATE} 1 day" '+%Y%m%d'`)) | |
do | |
TARGET_DATE=`date -d ${DATE} '+%Y-%m-%d'` |
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
// dtoSeqを5000で分割して、それぞれに別々のトークンを付与する | |
protected def mapToken[T](dtoSeq: Seq[InstagramDto[T]], tokens: Seq[String]): Seq[InstagramDto[T]] = { | |
dtoSeq.grouped(5000).toSeq.zipWithIndex.flatMap { | |
case (d, i) => d.map { s => | |
def getIndex(index: Int): Int = { | |
if (index < tokens.length) index | |
else getIndex(index - tokens.length) | |
} |
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
# 全投稿view数順 | |
SELECT | |
p.post_title, | |
pm.meta_value, | |
p.guid | |
FROM wp_posts p | |
INNER JOIN wp_postmeta pm | |
ON p.id = pm.post_id | |
AND pm.meta_key = "post_views_count" |
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
var BK = SpreadsheetApp.getActiveSpreadsheet(), | |
SHEET = BK.getSheetByName('portfolio'); | |
function onOpen() { | |
function showMenu() { | |
var menu = [ | |
{name: "Get Crypto Currency Data", functionName: "setData"} | |
]; | |
BK.addMenu("Custom Management", menu); | |
} |
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
var BK = SpreadsheetApp.getActiveSpreadsheet(), | |
SHEET = BK.getSheetByName('portfolio'); | |
function onOpen() { | |
function showMenu() { | |
var menu = [ | |
{name: "Get Crypto Currency Data", functionName: "setData"} | |
]; | |
BK.addMenu("Custom Management", menu); | |
} |
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
var BK = SpreadsheetApp.getActiveSpreadsheet(), | |
SHEET = BK.getSheetByName('portfolio'), | |
QUERY_STRING = Math.random(), | |
BTC_SYMBOL = 'BTC'; | |
function onOpen() { | |
function showMenu() { | |
var menu = [ | |
{name: "Get Crypto Currency Data", functionName: "setData"} | |
]; |
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
var BK = SpreadsheetApp.getActiveSpreadsheet(), | |
SHEET = BK.getSheetByName('portfolio'), | |
BTC_SYMBOL = 'BTC'; | |
function onOpen() { | |
function showMenu() { | |
var menu = [ | |
{name: "Get Crypto Currency Data", functionName: "setData"} | |
]; | |
BK.addMenu("Custom Management", menu); |
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
version: '2' | |
services: | |
db: | |
image: mysql:5.7 | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: {root-pass} | |
MYSQL_DATABASE: {db-name} | |
MYSQL_USER: {user-name} | |
MYSQL_PASSWORD: {user-password} |