
    Mg                     V    S SK r S SKJr  S SKJrJr  \" SS9\" S5      S 5       5       rg)    N)Fore)pluginrequireT)networknationalizec           	      t   [         R                  " SU-   5      nUR                  5       nUS:X  a!  U R                  S[        R
                  5        gUS:X  a!  U R                  S[        R
                  5        gSnUR                  S5       H  n[         R                  " SUR                  S	5      R                  5       -   5      nUR                  5       nU[        [        UR                  S
5      S-  5      5      S-   UR                  S5      -   S-   -  nM     U R                  U[        R
                  5        g)zOTells the nationality of someone based on his name, powered by www.boredapi.comz https://api.nationalize.io?name= zSorry, an error occuredNz'Sorry, please give me a name to analysez
There are countryz'https://restcountries.eu/rest/v2/alpha/
country_idprobabilityd   z% chances that you are from namez,
)	requestsgetjsonsayr   BLUElowerstrround)jarvissreqdataresponsenationalityr
   s          A/Users/admin/workspace/ai/Jarvis/jarviscli/plugins/nationalize.pyr   r      s	    ,,9A=
>C88:Drz

,dii8Bw

<diiHHxx	*llD&??<8>>@A B((*Ckoom<sBCD*+-4[[-@ACHI 	I	 + JJx#    )r   coloramar   r   r   r    r   r   <module>r!      s4      " 	$  $r   