<jupyter_start><jupyter_text>Example: View Profile<jupyter_code>from datetime import date
from IPython.display import Image, display
import tinder_api
def calculate_age(birthday_string):
    '''
    Converts from '1997-03-25T22:49:41.151Z' to an integer (age)
    '''
    birthyear = int(birthday_string[:4])
    birthmonth = int(birthday_string[5:7])
    birthday = int(birthday_string[8:10])
    today = date.today()
    return today.year - birthyear - ((today.month, today.day) < (birthmonth, birthday))
username=''
password=''
tinder = tinder_api.Client(username=username, password=password)
my_profile = tinder.get_profile()
my_profile
profile_id = my_profile.get('_id')
profile_id
photos = []
my_photos = my_profile.get('photos')
for i in range(len(my_photos)):
    photo_url = my_photos[i].get('processedFiles')[0].get('url')
    success_rate = my_photos[i].get('successRate')
    photos.append([photo_url, success_rate])
photos
images = []
for i in range(len(photos)):
    images.append(Image(url=photos[i][0]))
display(*images)
name = my_profile.get('name')
name
age = calculate_age(my_profile.get('birth_date'))
age
schools = []
my_schools = my_profile.get('schools')
for i in range(len(my_schools)):
    schools.append(my_schools[i].get('name'))
if len(schools):
    schools = schools[0]
schools
distance = my_profile.get('distance_mi', 1)
distance
bio = my_profile.get('bio')
bio<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14848698099929628, 'fraction_numerical': 0.019000703729767768, 'mean_word_length': 5.970588235294118, 'pattern_counts': {'":': 0, '<': 6, '<?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': '554138', 'license': 'MIT', 'n_tokens_mistral': 526, 'n_tokens_neox': 498, 'n_words': 95, 'path': 'examples/profile.ipynb', 'repo_name': 'socialocean/tinder-api-python', 'size': '1421'}