View gistpy.py
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 func(): | |
print("Success!!") |
View bq_profile
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 | |
if [ "$1" = "upgrade" ]; then | |
echo "updating..." | |
docker pull colorfulboard/bq_profile:latest --quiet > /dev/null | |
echo "done" | |
elif [ "$1" = "local" ]; then | |
docker run -it --rm -v ~/.config/gcloud:/root/.config/gcloud -v $(pwd):/usr/src/app colorfulboard/bq_profile:latest "${@:2:($#-1)}" | |
else | |
docker run -it --rm -v $(pwd):/usr/src/app colorfulboard/bq_profile:latest "$@" |
View Dockerfile
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
# 下記を参考にして作成したtextlint | |
# https://efcl.info/2015/09/10/introduce-textlint/ | |
# docker run -it --rm -v $(pwd):/tmp -w /tmp textlint:0.1 *.md | |
FROM node:8-jessie | |
RUN npm i -g textlint | |
RUN npm i -g textlint-rule-max-ten textlint-rule-spellcheck-tech-word textlint-rule-no-mix-dearu-desumasu | |
ENTRYPOINT ["textlint", "--rule", "no-mix-dearu-desumasu", "--rule", "max-ten", "--rule", "spellcheck-tech-word"] |
View extract_outline.py
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 sys | |
import unicodedata | |
MAX_LENGTH = 60 | |
CHECK_ONLY_OUTPUT = False | |
def check_line(line): | |
if line.startswith('#'): | |
print(line, end='') |
View create_doctestfile.py
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
""" | |
# 下記を実行するとコードブロックからdoctestファイル ham_doctest.py、egg_doctest.py を作成する | |
$ python3 create_doctestfile.py ham.md egg.md | |
# doctestは下記で実行可能 | |
$ python3 ham_doctest.py | |
""" | |
import sys | |
View check.py
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
""" | |
$ python3 check.py xxx.md yyy.md | |
Markdownのコードブロック内の各行の長さがMAX_LENGTHを超えている場合のみその行を出力する | |
""" | |
import sys | |
import unicodedata | |
MAX_LENGTH = 60 | |
CHECK_ONLY_OUTPUT = False |
View Dockerfile
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
FROM python:3.7 | |
WORKDIR /usr/src/app | |
RUN pip install psutil memory-profiler | |
COPY . . | |
RUN ./mkdummy.sh | |
ENTRYPOINT ["python", "-m", "memory_profiler", "copy_file.py"] |
View delete_instance.py
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
""" | |
Cloud Function: DeleteInstance | |
google-api-python-client==1.7.8 | |
Environment Variable | |
AUTO_TOKEN: a value which is set in Stackdriver Notification WebHook | |
""" | |
import json | |
import os |
View janken.py
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
from random import randint | |
from enum import Enum | |
class Card(Enum): | |
Rock = 0 | |
Paper = 1 | |
Scissors = 2 |
View post.js
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
alert("hoge"); |
NewerOlder