Skip to content

Instantly share code, notes, and snippets.

@cocodrips
cocodrips / fix.patch
Created February 12, 2020 07:00
fix create_oid_tf_record.py 2020/02
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:
@cocodrips
cocodrips / async_lesson.py
Created September 27, 2019 13:29
Async練習
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 July 28, 2019 16:17
isuconやることメモ

webアプリをgit対象に

base Makefile

SLACK_URL=http://XXX

end: alp slow
  
 
@cocodrips
cocodrips / flask_and_other_decorator.py
Created July 22, 2019 04:29
flaskのrouteデコレータとほかのデコレータの併用
import logging
import time
from functools import wraps
from flask import Flask, Response
app = Flask(__name__)
def stop_watch(func):
@cocodrips
cocodrips / Makefile
Created April 23, 2019 10:48
test -j option
work: w1 w2 w3
w1:
sleep 5
w2:
sleep 6
w3:
sleep 7
@cocodrips
cocodrips / Makefile
Created April 23, 2019 10:48
test -j option
work: w1 w2 w3
w1:
sleep 5
w2:
sleep 6
w3:
sleep 7
@cocodrips
cocodrips / corutine_.py
Created April 9, 2019 06:15
Pythonのasyncio
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 October 24, 2018 09:36
Setup kaggle server
@cocodrips
cocodrips / 転居.md
Last active October 2, 2018 02:05
お引越しTODOリスト
  • 水道停止/申し込み
  • ガス停止/申し込み
  • 電気停止/申し込み
  • インターネット停止/申し込み
  • 郵便物の転送申請
  • クレジットカード類の住所変更
  • 銀行の住所変更
  • 住民票の移動
    • 転出届(市区町村が変わる場合)
  • 転入届
@cocodrips
cocodrips / app.py
Created April 4, 2018 08:59 — forked from hoto17296/app.py
Nginx + uWSGI + Flask on Amazon Linux
from flask import Flask
application = Flask(__name__)
@application.route("/")
def hello():
return "Hello World!"