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
# this Dockerfile is based on https://github.com/facebookresearch/DensePose/blob/master/docker/Dockerfile | |
FROM caffe2/caffe2:snapshot-py2-cuda9.0-cudnn7-ubuntu16.04 | |
RUN mv /usr/local/caffe2 /usr/local/caffe2_build | |
ENV Caffe2_DIR /usr/local/caffe2_build | |
ENV PYTHONPATH /usr/local/caffe2_build:${PYTHONPATH} | |
ENV LD_LIBRARY_PATH /usr/local/caffe2_build/lib:${LD_LIBRARY_PATH} | |
RUN git clone https://github.com/facebookresearch/densepose /densepose |
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 functools import partial | |
import numpy as np | |
from tqdm import tqdm | |
LUT_SIZE = 33 | |
def _convert(pixel, lut): | |
r, g, b = map(lambda x: round((x / 255) * LUT_SIZE - 1), pixel) | |
idx = r + g * LUT_SIZE + b * (LUT_SIZE ** 2) |
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 datetime import datetime | |
from itertools import product | |
from random import randint | |
import pandas as pd | |
def generate_df(): | |
# just example | |
index = pd.date_range('2017-01-01', datetime.now(), freq='H') |
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 logging | |
import pandas as pd | |
import requests | |
logging.basicConfig(level=logging.INFO, | |
format='%(asctime)s - %(levelname)s - %(message)s', | |
datefmt='%H:%M:%S', ) | |
logger = logging.getLogger(__name__) | |
token = 'Bearer INSERT_YOUR_TOKEN_HERE' |