# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in 

import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

# Input data files are available in the "../input/" directory.
# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory

import os,requests,math,string,itertools,fractions,heapq,collections,re,array,bisect
print(os.listdir("../input"))

# Any results you write to the current directory are saved as output.

API_KEY = ''

def request_value(api_key, **kwargs):
    r = requests.get("http://139.59.68.8/get_value/{}/".format(api_key), params=kwargs)
    if r.status_code == 200:
        try:
            return r.json()['response']
        except Exception:
            print(r.content)
    else:
        print("Response code is {}".fomrat(r.status_code))
        
    return None

# Kaggle doesn't allow external requests?

if False:
    value = request_value(api_key = API_KEY, 
                  d1=1, d2=2, d3=3, d4=4, d5=5, 
                  d6=6, d7=8, d8=9, d9=10, d10=11)
    print(value)
