# -*- coding: utf-8 -*-
import os
import csv
data_dir = 'some_dir'
input_file = os.path.join(data_dir, 'some_input_file.tsv')
output_file = os.path.join(data_dir, 'some_out_file.tsv')
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 GetScoreHandler_v2(BaseHandler): | |
def __init__(self, *args, **kwargs): | |
super(GetScoreHandler_v2, self).__init__(*args, **kwargs) | |
self.model = CleanscoringModelV2API() | |
@gen.coroutine | |
def post(self, slug=None): | |
try: | |
request_json_data = json.loads(self.request.body) |
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 os | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
import datetime | |
import PIL | |
from PIL import Image | |
from exifutil import exifutil |
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
split_cmd = "split -n l/{} -d -a 2 {} meta_input".format(file_num, file_path) | |
nohup /app/puser/catalog_preprocessor/src/run.sh today 1002,1003,153118,1001,1004,153106,1006,1007,153108,1531201,1005,153111,153112 &> /app/puser/catalog_preprocessor/log/run.log.`date +"\%Y\%m\%d"` & | |
신규생성된 상품은 일주일간 추가매칭에서 제외한다. | |
신규생성이 존재하면 추가매칭은 제거한다. | |
11->12일 증분 결과 |
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 python3 | |
import pyvips | |
import cv2 | |
from PIL import Image | |
import timeit | |
import numpy as np | |
import time | |
import cProfile |
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
# for ann in dic | |
cd $CONDA_PREFIX | |
mkdir -p ./etc/conda/activate.d | |
mkdir -p ./etc/conda/deactivate.d | |
touch ./etc/conda/activate.d/env_vars.sh | |
touch ./etc/conda/deactivate.d/env_vars.sh | |
# set alias for pip | |
cat >> ./etc/conda/activate.d/env_vars.sh << EOF | |
alias pip3='/app/recsy11/.conda/envs/ann/bin/pip3' |
#!/bin/bash
for i in $(seq -f "%04g" 0000 0249)
do
echo "=========================================================================================================="
input_file="input$i"
echo $input_file
/app/jdk/bin/java -Xmx2048m -jar -Dtarget=$input_file cleanscoring-batch-0.0.1.jar cleanScoringJob >> ./logs/clean_scoring_all_product.log 2>&1
done
OlderNewer