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 xml.etree.ElementTree as ET | |
import csv | |
tree = ET.parse('pepup_download.xml') | |
root = tree.getroot() | |
csv_data = [] | |
for child in root: | |
if child.tag != '{http://xml.e-tax.nta.go.jp/XSD/kyotsu}WBD00000': | |
continue |
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
/** | |
* 処理の実行時間を計測してログに出力する便利ロジック | |
* buildConfigFieldのPERFORMANCEフラグがtrueのとき、かつ、デバッグ時のみ計測される | |
呼び出しサンプル: | |
``` | |
val result: String | |
measure("copy time") { | |
// 計測したい処理 | |
result = execute() |
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 requests | |
import time | |
import logging | |
import arrow | |
import random | |
logging.basicConfig(level=logging.DEBUG) | |
URL = "http://xxx.xxx.xxx.xxx:5000/" |
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
/* Interface is necessary for Delegate */ | |
interface RxJava2LifecycleDelegate { | |
fun Disposable.autoDispose(): Disposable | |
fun Lifecycle.setupRxJava2Observer(func: () -> Unit) | |
} | |
/* Class for Delegate implementing LifecycleObserver */ | |
class RxJava2LifecycleDelegateImpl : RxJava2LifecycleDelegate { | |
private var composite = CompositeDisposable() |
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
class HomeFragment : Fragment() { | |
private lateinit var scope: Scope | |
private lateinit var vm: HomeViewModel | |
@Inject lateinit var dialogDelegation: DialogDelegation | |
override fun onCreate(savedInstanceState: Bundle?) { | |
scope = Toothpick.openScopes(activity.application, activity, this) | |
scope.installModules(FragmentModule(this)) |
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
autoshell(){ | |
[[ -n $AUTOLS_DIR ]] && [[ $AUTOLS_DIR != $PWD ]] && [ -e ./.start.sh ] && ./.start.sh | |
AUTOLS_DIR="${PWD}" | |
} | |
PROMPT_COMMAND="autoshell" |
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
# coding=utf-8 | |
import time | |
from selenium import webdriver | |
if __name__ == '__main__': | |
try: | |
browser = webdriver.Chrome('./chromedriver') |
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
rename 's/\@2x//' * |
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
# Script Name : fabfile.py | |
# Author : shikajiro | |
# Created : 2016-11-03 | |
# Last Modified : 2016-11-21 | |
# Version : 1.1.0 | |
# Modifications : | |
# Description : | |
# Script to perform the build of Android on another machine | |
# By performing such a build of severely time on another machine, | |
# it is possible to ensure the CPU resources of the development machine, |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
backlogが出力したcsvファイルをgitlabに登録するスクリプト | |
user_id は予め登録しておく必要があります。 | |
users に追記してください。 | |
gitlabのtokenは暫定で特定ユーザーのものを利用しています。 |
NewerOlder