This file contains hidden or 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
name: "Notice of need review PR" | |
on: | |
schedule: | |
- cron: "0 10,17 * * 1-5" # 月〜金の10時, 17時に実行 | |
jobs: | |
notice: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Search requested review PR |
This file contains hidden or 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
codes = Set[] | |
while codes.size != num | |
code = (0...6).map { '1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'.chars[rand(62)] }.join | |
next if codes.add?(code).nil? | |
end |
This file contains hidden or 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
func deleteAllRows(ctx context.Context, db *spanner.Client, tableName string) { | |
stmt := spanner.Statement{ | |
SQL: "DELETE FROM `" + tableName + "` WHERE true", | |
} | |
_, err := db.PartitionedUpdate(ctx, stmt) | |
if err != nil { | |
panic(err) | |
} | |
return |
This file contains hidden or 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
func ReverseBit(num uint64) uint64 { | |
return bits.Reverse64(num) | |
} |
This file contains hidden or 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
func deleteAllRowsByMultiPK(ctx context.Context, db *spanner.Client, tableName string, primaryFirstKeyName string, primarySecondKeyName string) { | |
var primaryKeys []*spanner.Mutation | |
stmt := spanner.Statement{SQL: "SELECT `" + primaryFirstKeyName + "`, `" + primarySecondKeyName + "` FROM `" + tableName + "`"} | |
iter := db.Single().Query(ctx, stmt) | |
defer iter.Stop() | |
for { | |
row, err := iter.Next() | |
if err == iterator.Done { | |
break |
This file contains hidden or 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
func deleteAllRows(ctx context.Context, db *spanner.Client, tableName string, primaryKeyName string) { | |
var primaryKeys []string | |
stmt := spanner.Statement{SQL: `SELECT ` + primaryKeyName + ` FROM ` + tableName} | |
iter := db.Single().Query(ctx, stmt) | |
defer iter.Stop() | |
for { | |
row, err := iter.Next() | |
if err == iterator.Done { | |
break |
This file contains hidden or 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 requests | |
import re | |
import json | |
from airflow import DAG | |
from airflow.contrib.sensors.gcs_sensor import GoogleCloudStoragePrefixSensor | |
from airflow.contrib.operators.gcs_to_bq import GoogleCloudStorageToBigQueryOperator | |
from airflow.exceptions import AirflowException | |
from airflow.hooks.http_hook import HttpHook | |
from airflow.operators.http_operator import SimpleHttpOperator |
This file contains hidden or 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 requests | |
from airflow import DAG | |
from airflow.contrib.sensors.gcs_sensor import GoogleCloudStoragePrefixSensor | |
from airflow.contrib.operators.gcs_to_bq import GoogleCloudStorageToBigQueryOperator | |
from airflow.exceptions import AirflowException | |
from airflow.hooks.http_hook import HttpHook | |
from airflow.operators.http_operator import SimpleHttpOperator | |
from airflow.operators.python_operator import PythonOperator | |
from airflow.utils.dates import days_ago |
This file contains hidden or 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 requests | |
from airflow import DAG | |
from airflow.contrib.sensors.gcs_sensor import GoogleCloudStoragePrefixSensor | |
from airflow.contrib.operators.gcs_to_bq import GoogleCloudStorageToBigQueryOperator | |
from airflow.exceptions import AirflowException | |
from airflow.hooks.http_hook import HttpHook | |
from airflow.operators.http_operator import SimpleHttpOperator | |
from airflow.utils.dates import days_ago | |
from datetime import timedelta, datetime |
This file contains hidden or 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 requests | |
from airflow import DAG | |
from airflow.contrib.sensors.gcs_sensor import GoogleCloudStoragePrefixSensor | |
from airflow.exceptions import AirflowException | |
from airflow.hooks.http_hook import HttpHook | |
from airflow.operators.http_operator import SimpleHttpOperator | |
from airflow.utils.dates import days_ago | |
from datetime import timedelta, datetime |