<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Arxiv summary auto translation
Set up
import modules.
Step1:  Set credentials.<br>
Need to prepare the credentials file form GCP console.
Step2:  Set the dates.<br>
No argument leads to set today as the reference date.<br>
You can set the reference data like '20150417' and days we go back.
Step3:  Category list.<br>
Set the category key you would like to check.<br>
You can add categories by following https
Step4:  Set the query.<br>
How to make a query 
Step5:  Get bulk data from arXiv.
Step6:  Set target language and create the instance.<br>
You can select {'ja','de','es','fr','ko','pt','tr','zh-CN'} as of 20/3/2017.
Step7:  Execute translations
nmt = True 
<ASSISTANT_TASK:>
Python Code:
import os
from modules.DataArxiv import get_date
from modules.DataArxiv import execute_query
from modules.Translate import Translate
Explanation: Arxiv summary auto translation
Set up
import modules.
End of explanation
CREDENTIALS_JSON = "credentials.json"
CREDENTIALS_PATH = os.path.normpath(
    os.path.join(os.getcwd(), CREDENTIALS_JSON)
)
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = CREDENTIALS_PATH
Explanation: Set credentials.<br>
Need to prepare the credentials file form GCP console.
End of explanation
REF_DATE, PREV_DATE = get_date()
#REF_DATE, PREV_DATE = get_date(baseday='20170420', beforeNdays=7)
Explanation: Set the dates.<br>
No argument leads to set today as the reference date.<br>
You can set the reference data like '20150417' and days we go back.
End of explanation
CATEGORY_LIST = {
    'ml' : ["cat:stat.ML","cat:cs.AI","cat:cs.CC","cat:cs.CE","cat:cs.CG","cat:cs.CV","cat:cs.DC","cat:cs.IR","cat:cs.IT","cat:cs.NE"]
    , 'ph' : ["hep-ph"]
    , 'th' : ["hep-th"]
}
CATEGORY_KEY = 'ml'
Explanation: Category list.<br>
Set the category key you would like to check.<br>
You can add categories by following https://arxiv.org/help/api/user-manual#subject_classifications.
End of explanation
CATEGORY = "+OR+".join(CATEGORY_LIST[CATEGORY_KEY])
QUERY = '''({})+AND+submittedDate:[{}0000+TO+{}0000]'''.format(
    CATEGORY,PREV_DATE,REF_DATE
)
Explanation: Set the query.<br>
How to make a query : https://arxiv.org/help/api/index#about
End of explanation
BULK = execute_query(QUERY, prune=True, start=0, max_results=200)
Explanation: Get bulk data from arXiv.
End of explanation
TARGET_LANG = 'ja'
TRANSLATE_CLIENT = Translate(TARGET_LANG)
Explanation: Set target language and create the instance.<br>
You can select {'ja','de','es','fr','ko','pt','tr','zh-CN'} as of 20/3/2017.
End of explanation
TRANSLATE_CLIENT.check_arxiv(BULK, nmt=True)
Explanation: Execute translations
nmt = True : neural machine translation<br>
nmt = False : previous version
End of explanation
<END_TASK>