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 re | |
import datetime | |
import locale | |
import urllib3 | |
import urllib.parse | |
from bs4 import BeautifulSoup | |
def safe_cast(val, to_type, default=None): | |
try: |
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
def create_series_dag(parent_dag_name, table_name): | |
subdag = DAG( | |
dag_id="%s.%s" % (parent_dag_name, "child_task"), | |
default_args=dag_args, | |
) | |
delete = BigQueryTableDeleteOperator( | |
task_id="delete_summary_table", | |
deletion_dataset_table="{}.{}.{}".format(PROJECT_ID, DATASET_ID, table_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
bq --format=prettyjson show dataset_id.table_name | jq .schema > schema_def.json |
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
# deleted |
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
Bundle().apply { | |
putString(FirebaseAnalytics.Param.ITEM_ID, id) | |
putString(FirebaseAnalytics.Param.ITEM_NAME, name) | |
putString(FirebaseAnalytics.Param.CONTENT_TYPE, "image") | |
}.let { bundle -> | |
FirebaseAnalytics.getInstance(this) | |
.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle) | |
} |
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 | |
user_pseudo_id, | |
platform, | |
FORMAT_TIMESTAMP("%c", TIMESTAMP_MICROS(event_timestamp)) as time, | |
MAX(case when eventParams.key = "firebase_screen_class" then eventParams.value.string_value else null end) as transit_to, | |
MAX(case when eventParams.key = "firebase_previous_class" then eventParams.value.string_value else null end) as transit_from | |
FROM | |
`{your_project}.analytics_{your_id}.events_20*`, | |
UNNEST(event_params) as eventParams | |
WHERE |
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
binding.rootMotionLayout.setTransitionListener(object: MotionLayout.TransitionListener { | |
override fun onTransitionChange(view: MotionLayout?, fromSceneId: Int, toSceneId: Int, progress: Float) | |
// 進行状況を検知 | |
} | |
override fun onTransitionCompleted(view: MotionLayout?, completedState: Int) { | |
// 終了を検知 | |
} | |
}) |
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
// end_1の状態にアニメーションなしで遷移したいとき | |
binding.motionLayout.transitionToState(R.id.end_1) |
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
// start_1の状態にアニメーションして遷移したいとき | |
binding.motionLayout.transitionToStart() | |
// end_1の状態にアニメーションして遷移したいとき | |
binding.motionLayout.transitionToEnd() |
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
<Transition | |
motion:constraintSetEnd="@id/end_1" | |
motion:constraintSetStart="@id/start_1" | |
motion:duration="200"> | |
<OnSwipe | |
… /> | |
</Transition> |
NewerOlder