Skip to content

Instantly share code, notes, and snippets.

Avatar

ku-mu cocodrips

View GitHub Profile
@cocodrips
cocodrips / fix.patch
Created Feb 12, 2020
fix create_oid_tf_record.py 2020/02
View fix.patch
diff --git a/research/object_detection/dataset_tools/create_oid_tf_record.py b/research/object_detection/dataset_tools/create_oid_tf_record.py
index 26d9699c..458037a1 100644
--- a/research/object_detection/dataset_tools/create_oid_tf_record.py
+++ b/research/object_detection/dataset_tools/create_oid_tf_record.py
@@ -103,7 +103,7 @@ def main(_):
image_id, image_annotations = image_data
# In OID image file names are formed by appending ".jpg" to the image ID.
image_path = os.path.join(FLAGS.input_images_directory, image_id + '.jpg')
- with tf.gfile.Open(image_path) as image_file:
+ with tf.gfile.Open(image_path, 'rb') as image_file:
View async_lesson.py
import asyncio
import time
import typing
async def say(t: int, word):
await asyncio.sleep(t)
print(word)
return word
@cocodrips
cocodrips / README.md
Last active Jul 28, 2019
isuconやることメモ
View README.md

webアプリをgit対象に

base Makefile

SLACK_URL=http://XXX

end: alp slow
  
  
@cocodrips
cocodrips / flask_and_other_decorator.py
Created Jul 22, 2019
flaskのrouteデコレータとほかのデコレータの併用
View flask_and_other_decorator.py
import logging
import time
from functools import wraps
from flask import Flask, Response
app = Flask(__name__)
def stop_watch(func):
@cocodrips
cocodrips / Makefile
Created Apr 23, 2019
test -j option
View Makefile
work: w1 w2 w3
w1:
sleep 5
w2:
sleep 6
w3:
sleep 7
@cocodrips
cocodrips / Makefile
Created Apr 23, 2019
test -j option
View Makefile
work: w1 w2 w3
w1:
sleep 5
w2:
sleep 6
w3:
sleep 7
View corutine_.py
def averager():
total = 0
count = 0
average = 0
while True:
term = yield average
total += term
count += 1
average = total / count
@cocodrips
cocodrips / DeepLearningServer.md
Last active Oct 24, 2018
Setup kaggle server
View DeepLearningServer.md
@cocodrips
cocodrips / 転居.md
Last active Oct 2, 2018
お引越しTODOリスト
View 転居.md
  • 水道停止/申し込み
  • ガス停止/申し込み
  • 電気停止/申し込み
  • インターネット停止/申し込み
  • 郵便物の転送申請
  • クレジットカード類の住所変更
  • 銀行の住所変更
  • 住民票の移動
    • 転出届(市区町村が変わる場合)
    • 転入届
@cocodrips
cocodrips / app.py
Created Apr 4, 2018 — forked from hoto17296/app.py
Nginx + uWSGI + Flask on Amazon Linux
View app.py
from flask import Flask
application = Flask(__name__)
@application.route("/")
def hello():
return "Hello World!"
You can’t perform that action at this time.