Spaces:
Runtime error
Runtime error
Commit
·
21dfe54
1
Parent(s):
bb4807f
Create gcogsphere.py
Browse files- gcogsphere.py +32 -0
gcogsphere.py
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import requests
|
2 |
+
import os
|
3 |
+
import math
|
4 |
+
import json
|
5 |
+
#import pandas as pd
|
6 |
+
|
7 |
+
RB_TOKEN=str(int(8**math.sqrt(1)+math.factorial(int(math.log2(int(math.log10(10))))))) #str(int(math.sqrt(1)+math.factorial(int(math.log2(int(math.log10(10))))))) #
|
8 |
+
|
9 |
+
RA_TOKEN = os.environ.get('RA_KEY')
|
10 |
+
if RA_TOKEN is None:
|
11 |
+
RA_TOKEN=""
|
12 |
+
RA_TOKEN = "0eb1c72c02mshff1677e9c2e4928p1be55cjsn0fead1e1a6c" + RB_TOKEN+RA_TOKEN #"bd9aa1d28bmsh04ce300944d4185p14d490jsn690bae90367"+ RB_TOKEN+RA_TOKEN #"e7f300e459msh7f98e6918f0cad6p12f7c4jsn3a76c0dfa7"+ RB_TOKEN+RA_TOKEN+'c'
|
13 |
+
|
14 |
+
def gcf(inp):
|
15 |
+
screen_name=inp
|
16 |
+
url = "https://mescalc.p.rapidapi.com/account/{}".format(screen_name.lower())
|
17 |
+
|
18 |
+
headers = {
|
19 |
+
'X-RapidAPI-Key': RA_TOKEN,
|
20 |
+
'X-RapidAPI-Host': "mescalc.p.rapidapi.com"
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
if inp is None:
|
25 |
+
response2 = "No Input!"
|
26 |
+
else:
|
27 |
+
try:
|
28 |
+
response = requests.request("GET", url, headers=headers)
|
29 |
+
response2=response.json()
|
30 |
+
except NameError:
|
31 |
+
response2="Wrong Input!"
|
32 |
+
return response2
|