'''simple docstring'''




from __future__ import annotations

import json

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

__UpperCAmelCase					={"UserAgent": UserAgent().random}






def __lowerCAmelCase					(				UpperCamelCase__							)      ->       dict:
    __lowerCamelCase            =    script.contents[0]
    __lowerCamelCase            =    json.loads(data[data.find('''{"config"'''							) : -1]							)
    return info["entry_data"]["ProfilePage"][0]["graphql"]["user"]




class        a__ :






     def __init__(					self						:						Optional[Any]    ,							a						:						Optional[int]       ):





         """simple docstring"""



         __lowerCamelCase            =    f"""https://www.instagram.com/{username}/"""
         __lowerCamelCase            =    self.get_json()






     def   SCREAMING_SNAKE_CASE__  (					self						:						Tuple       ):





         """simple docstring"""



         __lowerCamelCase            =    requests.get(self.url    ,							headers=a       ).text
         __lowerCamelCase            =    BeautifulSoup(a    ,							'''html.parser'''       ).find_all('''script'''       )
         try:
             return extract_user_profile(scripts[4]       )
         except (json.decoder.JSONDecodeError, KeyError):
             return extract_user_profile(scripts[3]       )






     def __repr__(					self						:						int       ):





         """simple docstring"""



         return f"""{self.__class__.__name__}('{self.username}')"""






     def __str__(					self						:						str       ):





         """simple docstring"""



         return f"""{self.fullname} ({self.username}) is {self.biography}"""






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						Union[str, Any]       ):





         """simple docstring"""



         return self.user_data["username"]






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						Union[str, Any]       ):





         """simple docstring"""



         return self.user_data["full_name"]






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						Dict       ):





         """simple docstring"""



         return self.user_data["biography"]






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						Dict       ):





         """simple docstring"""



         return self.user_data["business_email"]






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						Tuple       ):





         """simple docstring"""



         return self.user_data["external_url"]






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						str       ):





         """simple docstring"""



         return self.user_data["edge_followed_by"]["count"]






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						int       ):





         """simple docstring"""



         return self.user_data["edge_follow"]["count"]






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						Any       ):





         """simple docstring"""



         return self.user_data["edge_owner_to_timeline_media"]["count"]






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						List[str]       ):





         """simple docstring"""



         return self.user_data["profile_pic_url_hd"]






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						List[str]       ):





         """simple docstring"""



         return self.user_data["is_verified"]






     @property
     def   SCREAMING_SNAKE_CASE__  (					self						:						str       ):





         """simple docstring"""



         return self.user_data["is_private"]






def __lowerCAmelCase					(				UpperCamelCase__ = "github"							)      ->       None:
    import os

    if os.environ.get('''CI'''							):
        return  # test failing on GitHub Actions
    __lowerCamelCase            =    InstagramUser(UpperCamelCase__							)
    assert instagram_user.user_data
    assert isinstance(instagram_user.user_data							,    UpperCamelCase__							)
    assert instagram_user.username == username
    if username != "github":
        return
    assert instagram_user.fullname == "GitHub"
    assert instagram_user.biography == "Built for developers."
    assert instagram_user.number_of_posts > 1_50
    assert instagram_user.number_of_followers > 12_00_00
    assert instagram_user.number_of_followings > 15
    assert instagram_user.email == "support@github.com"
    assert instagram_user.website == "https://github.com/readme"
    assert instagram_user.profile_picture_url.startswith('''https://instagram.'''							)
    assert instagram_user.is_verified is True
    assert instagram_user.is_private is False


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  __UpperCAmelCase					=InstagramUser("github")
  print(instagram_user)
  print(f'{instagram_user.number_of_posts = }')
  print(f'{instagram_user.number_of_followers = }')
  print(f'{instagram_user.number_of_followings = }')
  print(f'{instagram_user.email = }')
  print(f'{instagram_user.website = }')
  print(f'{instagram_user.profile_picture_url = }')
  print(f'{instagram_user.is_verified = }')
  print(f'{instagram_user.is_private = }')

'''simple docstring'''




def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							,    UpperCamelCase__							)      ->       int:

    def count_of_possible_combinations(UpperCamelCase__							) -> int:
        if target < 0:
            return 0
        if target == 0:
            return 1
        return sum(count_of_possible_combinations(target - item							) for item in array							)

    return count_of_possible_combinations(UpperCamelCase__							)






def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							,    UpperCamelCase__							)      ->       int:

    def count_of_possible_combinations_with_dp_array(
        UpperCamelCase__							,    UpperCamelCase__							) -> int:
        if target < 0:
            return 0
        if target == 0:
            return 1
        if dp_array[target] != -1:
            return dp_array[target]
        __lowerCamelCase            =    sum(
            count_of_possible_combinations_with_dp_array(target - item							,    UpperCamelCase__							)
            for item in array							)
        __lowerCamelCase            =    answer
        return answer

    __lowerCamelCase            =    [-1] * (target + 1)
    return count_of_possible_combinations_with_dp_array(UpperCamelCase__							,    UpperCamelCase__							)






def __lowerCAmelCase					(				UpperCamelCase__							,    UpperCamelCase__							,    UpperCamelCase__							)      ->       int:
    __lowerCamelCase            =    [0] * (target + 1)
    __lowerCamelCase            =    1

    for i in range(1							,    target + 1							):
        for j in range(UpperCamelCase__							):
            if i - array[j] >= 0:
                dp_array[i] += dp_array[i - array[j]]

    return dp_array[target]


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  __UpperCAmelCase					=3
  __UpperCAmelCase					=5
  __UpperCAmelCase					=[1, 2, 5]
  print(combination_sum_iv(n, array, target))
