<jupyter_start><jupyter_text>Test methods<jupyter_code>method = 'healthcheck'

resp = r.get(addr+method)
resp
method = 'recommend'

resp = r.get(addr+method, params={'user_id': user_id, 'n_recs': 4})
resp.json()
method = 'topPopular'

resp = r.get(addr+method, params={'user_id': user_id, 'n_recs': 10})
resp.json()
method = 'recalculate'

resp = r.get(addr+method)
resp.json()
method = 'explorations'
# without uid

resp = r.get(addr+method)
resp.json()
# str(resp.json())[:200]
method = 'explorations'
# with uid

resp = r.get(addr+method, params={'user_id': user_id}) # filtred of seen items
str(resp.json())[:200]
method = 'rateItem'

i=0
resp = r.post(addr+method, params={'user_id': user_id, 'item_id': 1265+i, 'rate': 10})
eval(resp.text)
method = 'similarItems'
item = 232863

resp = r.get(addr+method, params={'item_id': item, 'n_recs': 10})
eval(resp.text)
method = 'similarItems'

resp = r.get(addr+method, params={'item_id': item, 'user_id': user_id, 'n_recs': 10})
eval(resp.text)
method = 'rateItem'

resp = r.post(addr+method, params={'user_id': 4, 'item_id': 197664, 'positive': 1, 'site_id': 6})
resp.json()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19584055459272098, 'fraction_numerical': 0.030329289428076257, 'mean_word_length': 6.598684210526316, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '623313', 'license': 'MIT', 'n_tokens_mistral': 497, 'n_tokens_neox': 470, 'n_words': 97, 'path': 'notebooks/test_service.ipynb', 'repo_name': 'ARQtty/grouple-recsys', 'size': '1154'}