Best Python code snippet using sure_python
users_analytics.py
Source:users_analytics.py  
1from pyspark import SparkConf, SparkContext2import sys,re,math,os,gzip,uuid,datetime3assert sys.version_info >= (3, 5) # make sure we have Python 3.5+4from pyspark.sql import SparkSession, functions, types, Row5spark = SparkSession.builder.appName('StackExchange Data Loader').config("spark.executor.memory", "70g").config("spark.driver.memory", "50g").config("spark.memory.offHeap.enabled",'true').config("spark.memory.offHeap.size","16g").getOrCreate()6assert spark.version >= '2.3' # make sure we have Spark 2.3+7sc = spark.sparkContext8def main(inputs):9    # Read Users table10    users = spark.read.parquet(inputs).repartition(96)11    # Read ISO codes for country12    iso_codes = spark.read.csv("/user/cmandava/countrycodes.csv",header=True).select(functions.col('Name').alias('Country'),functions.col("country-code").alias('Countrycode')).cache()13    14    users.createOrReplaceTempView("users")15    users = spark.sql(" SELECT Reputation, \16           DisplayName AS Name, \17           Id AS UserId, \18          CASE \19                WHEN UPPER(Location) LIKE '%ADELAIDE%' THEN 'Australia' \20                WHEN UPPER(Location) LIKE '%AFGHANISTAN%' THEN 'Afghanistan' \21                WHEN UPPER(Location) LIKE '%AGGIELAND%' THEN 'United States' \22                WHEN UPPER(Location) LIKE '%AHEMEDABABD%' THEN 'India' \23                WHEN UPPER(Location) LIKE '%AHMEDABAD%' THEN 'India' \24                WHEN UPPER(Location) LIKE '%AJMER%' THEN 'India' \25                WHEN UPPER(Location) LIKE '%ALABAMA%' THEN 'United States' \26                WHEN UPPER(Location) LIKE '%ALASKA%' THEN 'United States' \27                WHEN UPPER(Location) LIKE '%ALBANIA%' THEN 'Albania' \28                WHEN UPPER(Location) LIKE '%ALBERTA%' THEN 'Alberta' \29                WHEN UPPER(Location) LIKE '%ALGERIA%' THEN 'Algeria' \30                WHEN UPPER(Location) LIKE '%ALICANTE%' THEN 'Spain' \31                WHEN UPPER(Location) LIKE '%AMERICAN SAMOA%' THEN 'United States' \32                WHEN UPPER(Location) LIKE '%AMMAN%' THEN 'Jordan' \33                WHEN UPPER(Location) LIKE '%AMSTERDAM%' THEN 'Netherlands' \34                WHEN UPPER(Location) LIKE '%ANDORRA%' THEN 'Andorra' \35                WHEN UPPER(Location) LIKE '%ANKARA%' THEN 'Turkey' \36                WHEN UPPER(Location) LIKE '%ANTARCTIC%' THEN 'Antarctica' \37                WHEN UPPER(Location) LIKE '%ANTIGUA AND BARBUDA%' THEN 'United Kingdom' \38                WHEN UPPER(Location) LIKE '%ARGENTINA%' THEN 'Argentina' \39                WHEN UPPER(Location) LIKE '%ARIZONA%' THEN 'United States' \40                WHEN UPPER(Location) LIKE '%ARKANSAS%' THEN 'United States' \41                WHEN UPPER(Location) LIKE '%ARLINGTON VA%' THEN 'United States' \42                WHEN UPPER(Location) LIKE '%ARMENIA%' THEN 'Armenia' \43                WHEN UPPER(Location) LIKE '%ARUBA%' THEN 'Netherlands' \44                WHEN UPPER(Location) LIKE '%ASTURIES%' THEN 'Spain' \45                WHEN UPPER(Location) LIKE '%AUCKLAND%' THEN 'New Zealand' \46                WHEN UPPER(Location) LIKE '%AUSTRALIA%' THEN 'Australia' \47                WHEN UPPER(Location) LIKE '%AUSTRIA%' THEN 'Austria' \48                WHEN UPPER(Location) LIKE '%AZERBAIJAN%' THEN 'Azerbaijan' \49                WHEN UPPER(Location) LIKE '%BAHAMAS%' THEN 'Bahamas' \50                WHEN UPPER(Location) LIKE '%BAHRAIN%' THEN 'Bahrain' \51                WHEN UPPER(Location) LIKE '%BANGALORE%' THEN 'India' \52                WHEN UPPER(Location) LIKE '%THAILAND%' THEN 'Thailand' \53                WHEN UPPER(Location) LIKE '%BANGLADESH%' THEN 'Bangladesh' \54                WHEN UPPER(Location) LIKE '%BANGLORE%' THEN 'India' \55                WHEN UPPER(Location) LIKE '%BARBADOS%' THEN 'Barbados' \56                WHEN UPPER(Location) LIKE '%BARCELONA%' THEN 'Spain' \57                WHEN UPPER(Location) LIKE '%BARODA%' THEN 'India' \58                WHEN UPPER(Location) LIKE '%BATTARAMULLA%' THEN 'Sri Lanka' \59                WHEN UPPER(Location) LIKE '%BEIJING%' THEN 'China' \60                WHEN UPPER(Location) LIKE '%BELARUS%' THEN 'Belarus' \61                WHEN UPPER(Location) LIKE '%BELGIUM%' THEN 'Belgium' \62                WHEN UPPER(Location) LIKE '%BELIZE%' THEN 'United Kingdom' \63                WHEN UPPER(Location) LIKE '%BENGALURU%' THEN 'India' \64                WHEN UPPER(Location) LIKE '%BENIN%' THEN 'Benin' \65                WHEN UPPER(Location) LIKE '%BERLIN%' THEN 'Germany' \66                WHEN UPPER(Location) LIKE '%BERMUDA%' THEN 'United Kingdom' \67                WHEN UPPER(Location) LIKE '%BHILWARA%' THEN 'India' \68                WHEN UPPER(Location) LIKE '%BHOPAL%' THEN 'India' \69                WHEN UPPER(Location) LIKE '%BHUBNESHWAR%' THEN 'India' \70                WHEN UPPER(Location) LIKE '%BHUTAN%' THEN 'Bhutan' \71                WHEN UPPER(Location) LIKE '%BISHOP AUCKLAND%' THEN 'United Kingdom' \72                WHEN UPPER(Location) LIKE '%BOLIVIA%' THEN 'Bolivia' \73                WHEN UPPER(Location) LIKE '%BOLOGNA%' THEN 'Italia' \74                WHEN UPPER(Location) LIKE '%BOSNIA%' THEN 'Bosnia and Herzegovina' \75                WHEN UPPER(Location) LIKE '%BOSTON%' THEN 'United States' \76                WHEN UPPER(Location) LIKE '%BOTSWANA%' THEN 'Botswana' \77                WHEN UPPER(Location) LIKE '%BRASIL%' THEN 'Brazil' \78                WHEN UPPER(Location) LIKE '%BRAZIL%' THEN 'Brazil' \79                WHEN UPPER(Location) LIKE '%BREMEN%' THEN 'Germany' \80                WHEN UPPER(Location) LIKE '%BRIBIE ISLAND%' THEN 'Australia' \81                WHEN UPPER(Location) LIKE '%BRIGHTON & HOVE%' THEN 'United Kingdom' \82                WHEN UPPER(Location) LIKE '%BRITISH COLUMBIA%' THEN 'Canada' \83                WHEN UPPER(Location) LIKE '%BRUNEI%' THEN 'United Kingdom' \84                WHEN UPPER(Location) LIKE '%BRUXELLES%' THEN 'Belgium' \85                WHEN UPPER(Location) LIKE '%BUDAPEST%' THEN 'Hungary' \86                WHEN UPPER(Location) LIKE '%BULGARIA%' THEN 'Bulgaria' \87                WHEN UPPER(Location) LIKE '%BURSA%' THEN 'Turkey' \88                WHEN UPPER(Location) LIKE '%CALIFORNIA%' THEN 'United States' \89                WHEN UPPER(Location) LIKE '%CAMBODIA%' THEN 'Cambodia' \90                WHEN UPPER(Location) LIKE '%CAMBRIDGE,UK%' THEN 'United Kingdom' \91                WHEN UPPER(Location) LIKE '%CAMEROON%' THEN 'Cameroon' \92                WHEN UPPER(Location) LIKE '%CANADA%' THEN 'Canada' \93                WHEN UPPER(Location) LIKE '%CANTABURY UK%' THEN 'United Kingdom' \94                WHEN UPPER(Location) LIKE '%CARIBBEAN%' THEN 'Caribbean' \95                WHEN UPPER(Location) LIKE '%CATALONIA%' THEN 'Spain' \96                WHEN UPPER(Location) LIKE '%CAYMAN ISLANDS%' THEN 'United Kingdom' \97                WHEN UPPER(Location) LIKE '%CHANDIGARH%' THEN 'India' \98                WHEN UPPER(Location) LIKE '%CHANDIGHAR%' THEN 'India' \99                WHEN UPPER(Location) LIKE '%CHANDIGHARH%' THEN 'India' \100                WHEN UPPER(Location) LIKE '%CHARLOTTE%' THEN 'United States' \101                WHEN UPPER(Location) LIKE '%CHENNAI%' THEN 'India' \102                WHEN UPPER(Location) LIKE '%CHICAGO%' THEN 'United States' \103                WHEN UPPER(Location) LIKE '%CHICOUTIMI%' THEN 'Canada' \104                WHEN UPPER(Location) LIKE '%CHILE%' THEN 'Chile' \105                WHEN UPPER(Location) LIKE '%CHINA%' THEN 'China' \106                WHEN UPPER(Location) LIKE '%CHITWAN%' THEN 'Nepal' \107                WHEN UPPER(Location) LIKE '%CHRISTCHURCH%' THEN 'New Zealand' \108                WHEN UPPER(Location) LIKE '%COLOMBIA%' THEN 'Colombia' \109                WHEN UPPER(Location) LIKE '%COLORADO%' THEN 'United States' \110                WHEN UPPER(Location) LIKE '%CONGO%' THEN 'Republic of the Congo' \111                WHEN UPPER(Location) LIKE '%CONNECTICUT%' THEN 'United States' \112                WHEN UPPER(Location) LIKE '%CORSICA%' THEN 'France' \113                WHEN UPPER(Location) LIKE '%COSTA RICA%' THEN 'Costa Rica' \114                WHEN UPPER(Location) LIKE '%COUMBIA SC%' THEN 'United States' \115                WHEN UPPER(Location) LIKE '%CROATIA%' THEN 'Croatia' \116                WHEN UPPER(Location) LIKE '%CUBA%' THEN 'Cuba' \117                WHEN UPPER(Location) LIKE '%CYPRUS%' THEN 'Cyprus' \118                WHEN UPPER(Location) LIKE '%CZECH%' THEN 'Czech Republic ' \119                WHEN UPPER(Location) LIKE '%DEHRADUN%' THEN 'India' \120                WHEN UPPER(Location) LIKE '%DELAWARE%' THEN 'United States' \121                WHEN UPPER(Location) LIKE '%DELHI%' THEN 'India' \122                WHEN UPPER(Location) LIKE '%DENMARK%' THEN 'Denmark' \123                WHEN UPPER(Location) LIKE '%DISTRICT OF COLUMBIA%' THEN 'United States' \124                WHEN UPPER(Location) LIKE '%DOMBIVLI%' THEN 'India' \125                WHEN UPPER(Location) LIKE '%DOMINICAN REPUBLIC%' THEN 'Dominican Republic' \126                WHEN UPPER(Location) LIKE '%DUBAI%' THEN 'United Arab Emirates' \127                WHEN UPPER(Location) LIKE '%DUBLIN%' THEN 'United Kingdom' \128                WHEN UPPER(Location) LIKE '%EASTER ISLAND%' THEN 'Chile' \129                WHEN UPPER(Location) LIKE '%ECUADOR%' THEN 'Ecuador' \130                WHEN UPPER(Location) LIKE '%EDINBURGH%' THEN 'United Kingdom' \131                WHEN UPPER(Location) LIKE '%EGYPT%' THEN 'Egypt' \132                WHEN UPPER(Location) LIKE '%EL SALVADOR%' THEN 'El Salvador' \133                WHEN UPPER(Location) LIKE '%EN_GB%' THEN 'United Kingdom' \134                WHEN UPPER(Location) LIKE '%ENGLAND%' THEN 'United Kingdom' \135                WHEN UPPER(Location) LIKE '%ESTONIA%' THEN 'Estonia' \136                WHEN UPPER(Location) LIKE '%ETHIOPIA%' THEN 'Ethiopia' \137                WHEN UPPER(Location) LIKE '%EYGPT%' THEN 'Egypt' \138                WHEN UPPER(Location) LIKE '%FABRIANO%' THEN 'Italy' \139                WHEN UPPER(Location) LIKE '%FAROE ISLANDS%' THEN 'Faroe Islands' \140                WHEN UPPER(Location) LIKE '%FIJI%' THEN 'Fiji' \141                WHEN UPPER(Location) LIKE '%FINLAND%' THEN 'Finland' \142                WHEN UPPER(Location) LIKE '%FRANCE%' THEN 'France' \143                WHEN UPPER(Location) LIKE '%FREMANTLE%' THEN 'Australia' \144                WHEN UPPER(Location) LIKE '%FRENCH RIVIERA%' THEN 'France' \145                WHEN UPPER(Location) LIKE '%GANDHINAGAR%' THEN 'India' \146                WHEN UPPER(Location) LIKE '%GEORGIA%' THEN 'Georgia' \147                WHEN UPPER(Location) LIKE '%GERMANY%' THEN 'Germany' \148                WHEN UPPER(Location) LIKE '%GERMNAY%' THEN 'Germany'                 \149                WHEN UPPER(Location) LIKE '%GHANA%' THEN 'Ghana' \150                WHEN UPPER(Location) LIKE '%GIBRALTAR%' THEN 'United Kingdom' \151                WHEN UPPER(Location) LIKE '%GOLD COAST%' THEN 'Australia' \152                WHEN UPPER(Location) LIKE '%GREECE%' THEN 'Greece' \153                WHEN UPPER(Location) LIKE '%GREENLAND%' THEN 'Denmark' \154                WHEN UPPER(Location) LIKE '%GUATEMALA%' THEN 'Guatemala' \155                WHEN UPPER(Location) LIKE '%GUELPH%' THEN 'Canada' \156                WHEN UPPER(Location) LIKE '%GURGAON%' THEN 'India' \157                WHEN UPPER(Location) LIKE '%GUYANA%' THEN 'Guyana' \158                WHEN UPPER(Location) LIKE '%HAMBURG%' THEN 'Germany' \159                WHEN UPPER(Location) LIKE '%HAWAI%' THEN 'Hawaii' \160                WHEN UPPER(Location) LIKE '%HO CHI MINH CITY%' THEN 'China' \161                WHEN UPPER(Location) LIKE '%HOBART%' THEN 'Australia' \162                WHEN UPPER(Location) LIKE '%HOLLYWOOD%' THEN 'United States' \163                WHEN UPPER(Location) LIKE '%HONDURAS%' THEN 'Honduras' \164                WHEN UPPER(Location) LIKE '%HONG KONG%' THEN 'China' \165                WHEN UPPER(Location) LIKE '%HONGKONG%' THEN 'China' \166                WHEN UPPER(Location) LIKE '%HUNGARY%' THEN 'Hungary' \167                WHEN UPPER(Location) LIKE '%HYDERABAD%' THEN 'India' \168                WHEN UPPER(Location) LIKE '%ICELAND%' THEN 'Iceland' \169                WHEN UPPER(Location) LIKE '%IDAHO%' THEN 'United States' \170                WHEN UPPER(Location) LIKE '%ILLINOIS%' THEN 'United States' \171                WHEN UPPER(Location) LIKE '%INDIA%' THEN 'India' \172                WHEN UPPER(Location) LIKE '%INDONESIA%' THEN 'Indonesia' \173                WHEN UPPER(Location) LIKE '%INDORE%' THEN 'India' \174                WHEN UPPER(Location) LIKE '%IOWA%' THEN 'United States' \175                WHEN UPPER(Location) LIKE '%IRAN%' THEN 'Iran' \176                WHEN UPPER(Location) LIKE '%IRAQ%' THEN 'Iraq' \177                WHEN UPPER(Location) LIKE '%IRELAND%' THEN 'United Kingdom' \178                WHEN UPPER(Location) LIKE '%ISLE OF MAN%' THEN 'United Kingdom' \179                WHEN UPPER(Location) LIKE '%ISRAEL%' THEN 'Israel' \180                WHEN UPPER(Location) LIKE '%ISTANBUL%' THEN 'Turkey' \181                WHEN UPPER(Location) LIKE '%ITALIA%' THEN 'Italy' \182                WHEN UPPER(Location) LIKE '%RAJASTHAN%' THEN 'India' \183                WHEN UPPER(Location) LIKE '%JAKARTA%' THEN 'Indonesia' \184                WHEN UPPER(Location) LIKE '%JAMAICA%' THEN 'Jamaica' \185                WHEN UPPER(Location) LIKE '%JAMKALYANPUR%' THEN 'India' \186                WHEN UPPER(Location) LIKE '%JAPAN%' THEN 'Japan' \187                WHEN UPPER(Location) LIKE '%JORDAN%' THEN 'Jordan' \188                WHEN UPPER(Location) LIKE '%KAMPALA%' THEN 'Uganda' \189                WHEN UPPER(Location) LIKE '%KAMPOT%' THEN 'Cambodia' \190                WHEN UPPER(Location) LIKE '%KANSAS%' THEN 'United States' \191                WHEN UPPER(Location) LIKE '%KARACHI%' THEN 'Pakistan' \192                WHEN UPPER(Location) LIKE '%KASHAN%' THEN 'Iran' \193                WHEN UPPER(Location) LIKE '%KATHMANDU%' THEN 'Nepala' \194                WHEN UPPER(Location) LIKE '%KAZAKHSTAN%' THEN 'Kazakhstan' \195                WHEN UPPER(Location) LIKE '%KENTUCKY%' THEN 'United States' \196                WHEN UPPER(Location) LIKE '%KENYA%' THEN 'Kenya' \197                WHEN UPPER(Location) LIKE '%KERALA%' THEN 'India' \198                WHEN UPPER(Location) LIKE '%KHARKOV%' THEN 'Ukraine' \199                WHEN UPPER(Location) LIKE '%KIEV%' THEN 'Ukraine' \200                WHEN UPPER(Location) LIKE '%KOREA%' THEN 'South Korea' \201                WHEN UPPER(Location) LIKE '%KRASNOYARSK%' THEN 'Russia' \202                WHEN UPPER(Location) LIKE '%KUWAIT%' THEN 'Kuwait' \203                WHEN UPPER(Location) LIKE '%KYIV%' THEN 'Ukraine' \204                WHEN UPPER(Location) LIKE '%KYRGYZSTAN%' THEN 'Kyrgyzstan' \205                WHEN UPPER(Location) LIKE '%LAHORE%' THEN 'Pakistan' \206                WHEN UPPER(Location) LIKE '%LATVIA%' THEN 'Latvia' \207                WHEN UPPER(Location) LIKE '%LEBANON%' THEN 'Lebanon' \208                WHEN UPPER(Location) LIKE '%LIBYA%' THEN 'Libya' \209                WHEN UPPER(Location) LIKE '%LIECHTENSTEIN%' THEN 'Liechtenstein' \210                WHEN UPPER(Location) LIKE '%LINDENWOLD NJ%' THEN 'United States' \211                WHEN UPPER(Location) LIKE '%LISBON%' THEN 'Portugal' \212                WHEN UPPER(Location) LIKE '%LITHUANIA%' THEN 'Lithuania' \213                WHEN UPPER(Location) LIKE '%LONDON%' THEN 'United Kingdom' \214                WHEN UPPER(Location) LIKE '%LONG ISLAND%' THEN 'United States' \215                WHEN UPPER(Location) LIKE '%LOS ANGELES%' THEN 'United States' \216                WHEN UPPER(Location) LIKE '%LOUISIANA%' THEN 'United States' \217                WHEN UPPER(Location) LIKE '%LUDHIANA%' THEN 'India' \218                WHEN UPPER(Location) LIKE '%LUXEMBOURG%' THEN 'Luxembourg' \219                WHEN UPPER(Location) LIKE '%LYON%' THEN 'France' \220                WHEN UPPER(Location) LIKE '%MACEDONIA%' THEN 'Macedonia' \221                WHEN UPPER(Location) LIKE '%MADURAI%' THEN 'India' \222                WHEN UPPER(Location) LIKE '%MAINE%' THEN 'United States' \223                WHEN UPPER(Location) LIKE '%MAKATI CITY%' THEN 'Philippines' \224                WHEN UPPER(Location) LIKE '%MALAYSIA%' THEN 'Malaysia' \225                WHEN UPPER(Location) LIKE '%MALDIVES%' THEN 'Maldives' \226                WHEN UPPER(Location) LIKE '%MALTA%' THEN 'Malta' \227                WHEN UPPER(Location) LIKE '%MANCHESTER%' THEN 'United Kingdom' \228                WHEN UPPER(Location) LIKE '%MARTINIQUE%' THEN 'France' \229                WHEN UPPER(Location) LIKE '%MARYLAND%' THEN 'United States' \230                WHEN UPPER(Location) LIKE '%MASHHAD%' THEN 'Iran' \231                WHEN UPPER(Location) LIKE '%MASSACHUSETTS%' THEN 'United States' \232                WHEN UPPER(Location) LIKE '%MAURITANIA%' THEN 'Mauritania' \233                WHEN UPPER(Location) LIKE '%MAURITIUS%' THEN 'Mauritius' \234                WHEN UPPER(Location) LIKE '%MEHRSHAHR%' THEN 'Iran' \235                WHEN UPPER(Location) LIKE '%METAXOURGIO%' THEN 'Greece' \236                WHEN UPPER(Location) LIKE '%MEXICO%' THEN 'Mexico' \237                WHEN UPPER(Location) LIKE '%MICHIGAN%' THEN 'United States' \238                WHEN UPPER(Location) LIKE '%MIDS. UK%' THEN 'United Kingdom' \239                WHEN UPPER(Location) LIKE '%MILAN%' THEN 'Italy' \240                WHEN UPPER(Location) LIKE '%MINNESOTA%' THEN 'United States' \241                WHEN UPPER(Location) LIKE '%MISSISSIPPI%' THEN 'United States' \242                WHEN UPPER(Location) LIKE '%MISSOURI%' THEN 'United States' \243                WHEN UPPER(Location) LIKE '%MOLDOVA%' THEN 'Moldova' \244                WHEN UPPER(Location) LIKE '%MONGOLIA%' THEN 'Mongolia' \245                WHEN UPPER(Location) LIKE '%MONTANA%' THEN 'United States' \246                WHEN UPPER(Location) LIKE '%MONTENEGRO%' THEN 'Montenegro' \247                WHEN UPPER(Location) LIKE '%MONTREAL%' THEN 'Canada' \248                WHEN UPPER(Location) LIKE '%MOROCCO%' THEN 'Morocco' \249                WHEN UPPER(Location) LIKE '%MOSCOW%' THEN 'Russia' \250                WHEN UPPER(Location) LIKE '%MOZAMBIQUE%' THEN 'Mozambique' \251                WHEN UPPER(Location) LIKE '%MULUND%' THEN 'India' \252                WHEN UPPER(Location) LIKE '%MUMBAI%' THEN 'India' \253                WHEN UPPER(Location) LIKE '%MUNICH%' THEN 'Germany' \254                WHEN UPPER(Location) LIKE '%MYANMAR%' THEN 'Myanmar' \255                WHEN UPPER(Location) LIKE '%NAMIBIA%' THEN 'Namibia' \256                WHEN UPPER(Location) LIKE '%NANKUNSHAN%' THEN 'China' \257                WHEN UPPER(Location) LIKE '%NAPOLI%' THEN 'Italy' \258                WHEN UPPER(Location) LIKE '%NASHIK%' THEN 'India' \259                WHEN UPPER(Location) LIKE '%NEBRASKA%' THEN 'United States' \260                WHEN UPPER(Location) LIKE '%NEPAL%' THEN 'Nepal' \261                WHEN UPPER(Location) LIKE '%NETHERLANDS%' THEN 'Netherlands' \262                WHEN UPPER(Location) LIKE '%NEVADA%' THEN 'United States' \263                WHEN UPPER(Location) LIKE '%NEW CALEDONIA%' THEN 'New Caledonia' \264                WHEN UPPER(Location) LIKE '%NEW DELHI%' THEN 'India' \265                WHEN UPPER(Location) LIKE '%NEW ENGLAND%' THEN 'United States' \266                WHEN UPPER(Location) LIKE '%NEW HAMPSHIRE%' THEN 'United States' \267                WHEN UPPER(Location) LIKE '%NEW JERSEY%' THEN 'United States' \268                WHEN UPPER(Location) LIKE '%NEW MALDEN%' THEN 'United Kingdom' \269                WHEN UPPER(Location) LIKE '%NEW MEXICO%' THEN 'United States' \270                WHEN UPPER(Location) LIKE '%NEW YORK%' THEN 'United States' \271                WHEN UPPER(Location) LIKE '%NEW ZEALAND%' THEN 'New Zealand' \272                WHEN UPPER(Location) LIKE '%NEWCASTLE%' THEN 'United Kingdom' \273                WHEN UPPER(Location) LIKE '%NICARAGUA%' THEN 'Nicaragua' \274                WHEN UPPER(Location) LIKE '%NIGER%' THEN 'Niger' \275                WHEN UPPER(Location) LIKE '%NIGERIA%' THEN 'Nigeria' \276                WHEN UPPER(Location) LIKE '%NOIDA%' THEN 'India' \277                WHEN UPPER(Location) LIKE '%NORTH AMERICA%' THEN 'United States' \278                WHEN UPPER(Location) LIKE '%NORTH CAROLINA%' THEN 'United States' \279                WHEN UPPER(Location) LIKE '%NORTH DAKOTA%' THEN 'United States' \280                WHEN UPPER(Location) LIKE '%NORTH LOUISIANA%' THEN 'United States' \281                WHEN UPPER(Location) LIKE '%NORTH RHINE-WESTPHALIA%' THEN 'Germany' \282                WHEN UPPER(Location) LIKE '%NORTH WALES%' THEN 'United Kingdom' \283                WHEN UPPER(Location) LIKE '%NORWAY%' THEN 'Norway' \284                WHEN UPPER(Location) LIKE '%NOTTINGHAM%' THEN 'United Kingdom' \285                WHEN UPPER(Location) LIKE '%OHIO%' THEN 'United States' \286                WHEN UPPER(Location) LIKE '%OKLAHOMA%' THEN 'United States' \287                WHEN UPPER(Location) LIKE '%OMAN%' THEN 'Oman' \288                WHEN UPPER(Location) LIKE '%ONTARIO%' THEN 'United States' \289                WHEN UPPER(Location) LIKE '%OREGON%' THEN 'United States' \290                WHEN UPPER(Location) LIKE '%PAKISTAN%' THEN 'Pakistan' \291                WHEN UPPER(Location) LIKE '%PALESTIN%' THEN 'Palestinian' \292                WHEN UPPER(Location) LIKE '%PANAMA%' THEN 'Panama' \293                WHEN UPPER(Location) LIKE '%PARAGUAY%' THEN 'Paraguay' \294                WHEN UPPER(Location) LIKE '%PARIS%' THEN 'France' \295                WHEN UPPER(Location) LIKE '%PATNA%' THEN 'India' \296                WHEN UPPER(Location) LIKE '%PEMBURY%' THEN 'United Kingdom' \297                WHEN UPPER(Location) LIKE '%PENANG%' THEN 'Malaysia' \298                WHEN UPPER(Location) LIKE '%PENNSYLVANIA%' THEN 'United States' \299                WHEN UPPER(Location) LIKE '%PERU%' THEN 'Peru' \300                WHEN UPPER(Location) LIKE '%PETERBOROUGH%' THEN 'United Kingdom' \301                WHEN UPPER(Location) LIKE '%PHILIPPINES%' THEN 'Philippines' \302                WHEN UPPER(Location) LIKE '%PITTSBURGH%' THEN 'United States' \303                WHEN UPPER(Location) LIKE '%POLAND%' THEN 'Poland' \304                WHEN UPPER(Location) LIKE '%PONDICHERRY%' THEN 'India' \305                WHEN UPPER(Location) LIKE '%PORTUGAL%' THEN 'Portugal' \306                WHEN UPPER(Location) LIKE '%PRAGUE%' THEN 'Czech Republic ' \307                WHEN UPPER(Location) LIKE '%PROVIDENCE RI%' THEN 'United States' \308                WHEN UPPER(Location) LIKE '%PUERTO RICO%' THEN 'Puerto Rico' \309                WHEN UPPER(Location) LIKE '%PUNE%' THEN 'India' \310                WHEN UPPER(Location) LIKE '%QATAR%' THEN 'Qatar' \311                WHEN UPPER(Location) LIKE '%QUAD CITIES%' THEN 'United States' \312                WHEN UPPER(Location) LIKE '%QUEBEC%' THEN 'Canada' \313                WHEN UPPER(Location) LIKE '%RAJKOT%' THEN 'India' \314                WHEN UPPER(Location) LIKE '%RHODE ISLAND%' THEN 'United States' \315                WHEN UPPER(Location) LIKE '%ROCHESTER NY%' THEN 'United States' \316                WHEN UPPER(Location) LIKE '%ROCKY MOUNTAINS%' THEN 'United States' \317                WHEN UPPER(Location) LIKE '%ROMANIA%' THEN 'Romania' \318                WHEN UPPER(Location) LIKE '%ROME%' THEN 'Italy' \319                WHEN UPPER(Location) LIKE '%RUSSIA%' THEN 'Russia' \320                WHEN UPPER(Location) LIKE '%SAI GON - VIET NAM%' THEN 'Vietnam' \321                WHEN UPPER(Location) LIKE '%SAINT-PETERSBURG%' THEN 'Russia' \322                WHEN UPPER(Location) LIKE '%SALEM OR%' THEN 'United States' \323                WHEN UPPER(Location) LIKE '%SALT LAKE CITY%' THEN 'United States' \324                WHEN UPPER(Location) LIKE '%SAMOA%' THEN 'Samoa' \325                WHEN UPPER(Location) LIKE '%SAN MARINO%' THEN 'San Marino' \326                WHEN UPPER(Location) LIKE '%SANDTON%' THEN 'South Africa' \327                WHEN UPPER(Location) LIKE '%SAO PAULO%' THEN 'Brazil' \328                WHEN UPPER(Location) LIKE '%SAUDI ARABIA%' THEN 'Saudi Arabia' \329                WHEN UPPER(Location) LIKE '%SAUERLAND%' THEN 'Germany' \330                WHEN UPPER(Location) LIKE '%SCOTLAND%' THEN 'United Kingdom' \331                WHEN UPPER(Location) LIKE '%SENEGAL%' THEN 'Senegal' \332                WHEN UPPER(Location) LIKE '%SERBIA%' THEN 'Serbia' \333                WHEN UPPER(Location) LIKE '%SEYCHELLES%' THEN 'Seychelles' \334                WHEN UPPER(Location) LIKE '%SHANDONG%' THEN 'China' \335                WHEN UPPER(Location) LIKE '%SHANGHAI%' THEN 'China' \336                WHEN UPPER(Location) LIKE '%SIBERIA%' THEN 'Russia' \337                WHEN UPPER(Location) LIKE '%SIERRA LEONE%' THEN 'Sierra Leone' \338                WHEN UPPER(Location) LIKE '%SILICON VALLEY%' THEN 'United States' \339                WHEN UPPER(Location) LIKE '%SINCELEJO%' THEN 'Colombia' \340                WHEN UPPER(Location) LIKE '%SINGAPORE%' THEN 'Singapore' \341                WHEN UPPER(Location) LIKE '%SLOVAKIA%' THEN 'Slovakia' \342                WHEN UPPER(Location) LIKE '%SLOVENIA%' THEN 'Slovenia' \343                WHEN UPPER(Location) LIKE '%SOCAL%' THEN 'United States' \344                WHEN UPPER(Location) LIKE '%SOLNA%' THEN 'Sweden' \345                WHEN UPPER(Location) LIKE '%SOUTH AFFRICA%' THEN 'South Africa' \346                WHEN UPPER(Location) LIKE '%SOUTH AFRICA%' THEN 'South Africa' \347                WHEN UPPER(Location) LIKE '%SOUTH AFRIKA%' THEN 'South Africa' \348                WHEN UPPER(Location) LIKE '%SOUTH CAROLINA%' THEN 'United States' \349                WHEN UPPER(Location) LIKE '%SOUTH DAKOTA%' THEN 'United States' \350                WHEN UPPER(Location) LIKE '%SPAIN%' THEN 'Spain' \351                WHEN UPPER(Location) LIKE '%SRI LANKA%' THEN 'Sri Lanka' \352                WHEN UPPER(Location) LIKE '%SUDAN%' THEN 'Sudan' \353                WHEN UPPER(Location) LIKE '%SURAT%' THEN 'India' \354                WHEN UPPER(Location) LIKE '%SUTTON%' THEN 'Canada' \355                WHEN UPPER(Location) LIKE '%SVALBARD AND JAN MAYEN%' THEN 'Norway' \356                WHEN UPPER(Location) LIKE '%SWANSEA%' THEN 'United Kingdom' \357                WHEN UPPER(Location) LIKE '%SWAZILAND%' THEN 'Swaziland' \358                WHEN UPPER(Location) LIKE '%SWEDEN%' THEN 'Sweden' \359                WHEN UPPER(Location) LIKE '%SWITZERLAND%' THEN 'Switzerland' \360                WHEN UPPER(Location) LIKE '%SWIZERLAND%' THEN 'Swizerland' \361                WHEN UPPER(Location) LIKE '%SYDNEY%' THEN 'Australia' \362                WHEN UPPER(Location) LIKE '%SYRIA%' THEN 'Syria' \363                WHEN UPPER(Location) LIKE '%TAIWAN%' THEN 'Taiwan' \364                WHEN UPPER(Location) LIKE '%TAJIKISTAN%' THEN 'Tajikistan' \365                WHEN UPPER(Location) LIKE '%TAKANINI%' THEN 'New Zealand' \366                WHEN UPPER(Location) LIKE '%TAMIL NADU%' THEN 'India' \367                WHEN UPPER(Location) LIKE '%TANZANIA%' THEN 'Tanzania' \368                WHEN UPPER(Location) LIKE '%TEHRAN%' THEN 'Iran' \369                WHEN UPPER(Location) LIKE '%TENNESSEE%' THEN 'United States' \370                WHEN UPPER(Location) LIKE '%TEXAS%' THEN 'United States' \371                WHEN UPPER(Location) LIKE '%THAILAND%' THEN 'Thailand' \372                WHEN UPPER(Location) LIKE '%THAILAND%' THEN 'Thailand' \373                WHEN UPPER(Location) LIKE '%THESSALONIKI%' THEN 'Greece' \374                WHEN UPPER(Location) LIKE '%TIZNIT%' THEN 'Morocco' \375                WHEN UPPER(Location) LIKE '%TOGO%' THEN 'Togo' \376                WHEN UPPER(Location) LIKE '%TORONTO%' THEN 'Canada' \377                WHEN UPPER(Location) LIKE '%TRENTO%' THEN 'Italy' \378                WHEN UPPER(Location) LIKE '%TRINIAD AND TOBAGO%' THEN 'Trinidad and Tobago' \379                WHEN UPPER(Location) LIKE '%TRINIDAD AND TOBAGO%' THEN 'Trinidad and Tobago' \380                WHEN UPPER(Location) LIKE '%TRIVANDRUM%' THEN 'India' \381                WHEN UPPER(Location) LIKE '%TUNISIA%' THEN 'Tunisia' \382                WHEN UPPER(Location) LIKE '%TURKEY%' THEN 'Turkey' \383                WHEN UPPER(Location) LIKE '%TURKIYE%' THEN 'Turkey' \384                WHEN UPPER(Location) LIKE '%TURKMENISTAN%' THEN 'Turkmenistan' \385                WHEN UPPER(Location) LIKE '%TUVALU%' THEN 'United Kingdom' \386                WHEN UPPER(Location) LIKE '%UDAIPUR%' THEN 'India' \387                WHEN UPPER(Location) LIKE '%UGANDA%' THEN 'Uganda' \388                WHEN UPPER(Location) LIKE '%UKRAINE%' THEN 'Ukraine' \389                WHEN UPPER(Location) LIKE '%UNITED ARAB EMIRATES%' THEN 'United Arab Emirates' \390                WHEN UPPER(Location) LIKE '%UNITED KINGDO%' THEN 'United Kingdom' \391                WHEN UPPER(Location) LIKE '%UNITED STATES%' THEN 'United States' \392                WHEN UPPER(Location) LIKE '%URUGUAY%' THEN 'Uruguay' \393                WHEN UPPER(Location) LIKE '%US VIRGIN ISLANDS%' THEN 'United States' \394                WHEN UPPER(Location) LIKE '%USA%' THEN 'United States' \395                WHEN UPPER(Location) LIKE '%USSR%' THEN 'Russia' \396                WHEN UPPER(Location) LIKE '%UTAH%' THEN 'United States' \397                WHEN UPPER(Location) LIKE '%UZBEKISTAN%' THEN 'Uzbekistan' \398                WHEN UPPER(Location) LIKE '%VALENCIA%' THEN 'Spain' \399                WHEN UPPER(Location) LIKE '%VAN NUYS%' THEN 'United States' \400                WHEN UPPER(Location) LIKE '%VANCOUVER%' THEN 'Canada' \401                WHEN UPPER(Location) LIKE '%VENEZUELA%' THEN 'Venezuela' \402                WHEN UPPER(Location) LIKE '%VENICE,CA%' THEN 'United States' \403                WHEN UPPER(Location) LIKE '%VERMONT%' THEN 'United States' \404                WHEN UPPER(Location) LIKE '%VIENNA%' THEN 'Austria' \405                WHEN UPPER(Location) LIKE '%VIETNAM%' THEN 'Vietnam' \406                WHEN UPPER(Location) LIKE '%VIJAYAWADA%' THEN 'India' \407                WHEN UPPER(Location) LIKE '%VIRGIN ISLANDS%' THEN 'United States' \408                WHEN UPPER(Location) LIKE '%VIRGINIA%' THEN 'United States' \409                WHEN UPPER(Location) LIKE '%VISHAKAPATNAM%' THEN 'India' \410                WHEN UPPER(Location) LIKE '%VIZAG%' THEN 'India' \411                WHEN UPPER(Location) LIKE '%WALES%' THEN 'United Kingdom' \412                WHEN UPPER(Location) LIKE '%WARRINGTON%' THEN 'United Kingdom' \413                WHEN UPPER(Location) LIKE '%WARSAW%' THEN 'Poland' \414                WHEN UPPER(Location) LIKE '%WASHING DC METRO AREA%' THEN 'United States' \415                WHEN UPPER(Location) LIKE '%WEST COAST NORTH AMERICA%' THEN 'United States' \416                WHEN UPPER(Location) LIKE '%WISCONAIN%' THEN 'United States' \417                WHEN UPPER(Location) LIKE '%WISCONSIN%' THEN 'United States' \418                WHEN UPPER(Location) LIKE '%WYOMING%' THEN 'United States' \419                WHEN UPPER(Location) LIKE '%YEMEN%' THEN 'Yemen' \420                WHEN UPPER(Location) LIKE '%ZAMBIA%' THEN 'Zambia' \421                WHEN UPPER(Location) LIKE '%ZHEJIANG%' THEN 'China' \422                WHEN UPPER(Location) LIKE '%ZIMBABWE%' THEN 'Zimbabwe' \423                WHEN UPPER(Location) LIKE '%UK%' THEN 'United Kingdom' \424            ELSE 'Unknown' \425         END AS Country \426      FROM users \427    ")428    429    #Total number of users by country 430    users.createOrReplaceTempView("users_by_country")431    user_base = users.filter(users.Country.isNotNull()).groupBy('country').agg(functions.count('UserId').alias("userCount"))432    user_base = user_base.join(iso_codes,['Country'])433    user_base.show()434    user_base.write.csv('user_base',mode="overwrite")435    reputaion_base = users.filter(users.Country.isNotNull()).groupBy('Country').agg(functions.sum('Reputation').alias("reputation"))436    reputaion_base = reputaion_base.join(iso_codes,['Country'])437    reputaion_base.show()438    reputaion_base.write.csv('reputation_base',mode="overwrite")439    440    #Users with highest reputation by country441    highest_reputation = spark.sql(" select distinct Username,Country,Reputation from (SELECT UserId, \442         Country, \443         Name as Username, \444         RANK() OVER (PARTITION BY Country ORDER BY int(Reputation) desc) AS Rank, \445         Reputation from (select * from users_by_country where Country!='Unknown')) where Rank =1 order by int(Reputation) desc")446    447    highest_reputation.show()448    highest_reputation.write.csv('highest_reputation',mode="overwrite")449    #Best Average Reputation of Top 100 Users by Country450    top100_rep =spark.sql(" select Country,avg(int(Reputation)) as reputation from (SELECT UserId, \451         Country, \452         Name as Username, \453         RANK() OVER (PARTITION BY Country ORDER BY int(Reputation) desc) AS Rank, \454         Reputation from (select * from users_by_country where Country!='Unknown')) where Rank <=100 group by Country order by avg(int(Reputation)) desc")455    top100_rep = top100_rep.join(iso_codes,['Country'])456    top100_rep.show()457    458    top100_rep.write.csv('top100_rep',mode="overwrite")459if __name__ == "__main__":460    inputs = sys.argv[1]461    main(inputs)462#How to run this file?...EnsPublicResolver.d.ts
Source:EnsPublicResolver.d.ts  
1/* Autogenerated file. Do not edit manually. */2/* tslint:disable */3/* eslint-disable */4import {5  ethers,6  EventFilter,7  Signer,8  BigNumber,9  BigNumberish,10  PopulatedTransaction,11  BaseContract,12  ContractTransaction,13  Overrides,14  CallOverrides,15} from "ethers";16import { BytesLike } from "@ethersproject/bytes";17import { Listener, Provider } from "@ethersproject/providers";18import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";19import { TypedEventFilter, TypedEvent, TypedListener } from "./commons";20interface EnsPublicResolverInterface extends ethers.utils.Interface {21  functions: {22    "ABI(bytes32,uint256)": FunctionFragment;23    "addr(bytes32)": FunctionFragment;24    "authorisations(bytes32,address,address)": FunctionFragment;25    "clearDNSZone(bytes32)": FunctionFragment;26    "contenthash(bytes32)": FunctionFragment;27    "dnsRecord(bytes32,bytes32,uint16)": FunctionFragment;28    "hasDNSRecords(bytes32,bytes32)": FunctionFragment;29    "interfaceImplementer(bytes32,bytes4)": FunctionFragment;30    "name(bytes32)": FunctionFragment;31    "pubkey(bytes32)": FunctionFragment;32    "setABI(bytes32,uint256,bytes)": FunctionFragment;33    "setAddr(bytes32,uint256,bytes)": FunctionFragment;34    "setAuthorisation(bytes32,address,bool)": FunctionFragment;35    "setContenthash(bytes32,bytes)": FunctionFragment;36    "setDNSRecords(bytes32,bytes)": FunctionFragment;37    "setInterface(bytes32,bytes4,address)": FunctionFragment;38    "setName(bytes32,string)": FunctionFragment;39    "setPubkey(bytes32,bytes32,bytes32)": FunctionFragment;40    "setText(bytes32,string,string)": FunctionFragment;41    "supportsInterface(bytes4)": FunctionFragment;42    "text(bytes32,string)": FunctionFragment;43  };44  encodeFunctionData(45    functionFragment: "ABI",46    values: [BytesLike, BigNumberish]47  ): string;48  encodeFunctionData(functionFragment: "addr", values: [BytesLike]): string;49  encodeFunctionData(50    functionFragment: "authorisations",51    values: [BytesLike, string, string]52  ): string;53  encodeFunctionData(54    functionFragment: "clearDNSZone",55    values: [BytesLike]56  ): string;57  encodeFunctionData(58    functionFragment: "contenthash",59    values: [BytesLike]60  ): string;61  encodeFunctionData(62    functionFragment: "dnsRecord",63    values: [BytesLike, BytesLike, BigNumberish]64  ): string;65  encodeFunctionData(66    functionFragment: "hasDNSRecords",67    values: [BytesLike, BytesLike]68  ): string;69  encodeFunctionData(70    functionFragment: "interfaceImplementer",71    values: [BytesLike, BytesLike]72  ): string;73  encodeFunctionData(functionFragment: "name", values: [BytesLike]): string;74  encodeFunctionData(functionFragment: "pubkey", values: [BytesLike]): string;75  encodeFunctionData(76    functionFragment: "setABI",77    values: [BytesLike, BigNumberish, BytesLike]78  ): string;79  encodeFunctionData(80    functionFragment: "setAddr",81    values: [BytesLike, BigNumberish, BytesLike]82  ): string;83  encodeFunctionData(84    functionFragment: "setAuthorisation",85    values: [BytesLike, string, boolean]86  ): string;87  encodeFunctionData(88    functionFragment: "setContenthash",89    values: [BytesLike, BytesLike]90  ): string;91  encodeFunctionData(92    functionFragment: "setDNSRecords",93    values: [BytesLike, BytesLike]94  ): string;95  encodeFunctionData(96    functionFragment: "setInterface",97    values: [BytesLike, BytesLike, string]98  ): string;99  encodeFunctionData(100    functionFragment: "setName",101    values: [BytesLike, string]102  ): string;103  encodeFunctionData(104    functionFragment: "setPubkey",105    values: [BytesLike, BytesLike, BytesLike]106  ): string;107  encodeFunctionData(108    functionFragment: "setText",109    values: [BytesLike, string, string]110  ): string;111  encodeFunctionData(112    functionFragment: "supportsInterface",113    values: [BytesLike]114  ): string;115  encodeFunctionData(116    functionFragment: "text",117    values: [BytesLike, string]118  ): string;119  decodeFunctionResult(functionFragment: "ABI", data: BytesLike): Result;120  decodeFunctionResult(functionFragment: "addr", data: BytesLike): Result;121  decodeFunctionResult(122    functionFragment: "authorisations",123    data: BytesLike124  ): Result;125  decodeFunctionResult(126    functionFragment: "clearDNSZone",127    data: BytesLike128  ): Result;129  decodeFunctionResult(130    functionFragment: "contenthash",131    data: BytesLike132  ): Result;133  decodeFunctionResult(functionFragment: "dnsRecord", data: BytesLike): Result;134  decodeFunctionResult(135    functionFragment: "hasDNSRecords",136    data: BytesLike137  ): Result;138  decodeFunctionResult(139    functionFragment: "interfaceImplementer",140    data: BytesLike141  ): Result;142  decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;143  decodeFunctionResult(functionFragment: "pubkey", data: BytesLike): Result;144  decodeFunctionResult(functionFragment: "setABI", data: BytesLike): Result;145  decodeFunctionResult(functionFragment: "setAddr", data: BytesLike): Result;146  decodeFunctionResult(147    functionFragment: "setAuthorisation",148    data: BytesLike149  ): Result;150  decodeFunctionResult(151    functionFragment: "setContenthash",152    data: BytesLike153  ): Result;154  decodeFunctionResult(155    functionFragment: "setDNSRecords",156    data: BytesLike157  ): Result;158  decodeFunctionResult(159    functionFragment: "setInterface",160    data: BytesLike161  ): Result;162  decodeFunctionResult(functionFragment: "setName", data: BytesLike): Result;163  decodeFunctionResult(functionFragment: "setPubkey", data: BytesLike): Result;164  decodeFunctionResult(functionFragment: "setText", data: BytesLike): Result;165  decodeFunctionResult(166    functionFragment: "supportsInterface",167    data: BytesLike168  ): Result;169  decodeFunctionResult(functionFragment: "text", data: BytesLike): Result;170  events: {171    "ABIChanged(bytes32,uint256)": EventFragment;172    "AddrChanged(bytes32,address)": EventFragment;173    "AddressChanged(bytes32,uint256,bytes)": EventFragment;174    "AuthorisationChanged(bytes32,address,address,bool)": EventFragment;175    "ContenthashChanged(bytes32,bytes)": EventFragment;176    "DNSRecordChanged(bytes32,bytes,uint16,bytes)": EventFragment;177    "DNSRecordDeleted(bytes32,bytes,uint16)": EventFragment;178    "DNSZoneCleared(bytes32)": EventFragment;179    "InterfaceChanged(bytes32,bytes4,address)": EventFragment;180    "NameChanged(bytes32,string)": EventFragment;181    "PubkeyChanged(bytes32,bytes32,bytes32)": EventFragment;182    "TextChanged(bytes32,string,string)": EventFragment;183  };184  getEvent(nameOrSignatureOrTopic: "ABIChanged"): EventFragment;185  getEvent(nameOrSignatureOrTopic: "AddrChanged"): EventFragment;186  getEvent(nameOrSignatureOrTopic: "AddressChanged"): EventFragment;187  getEvent(nameOrSignatureOrTopic: "AuthorisationChanged"): EventFragment;188  getEvent(nameOrSignatureOrTopic: "ContenthashChanged"): EventFragment;189  getEvent(nameOrSignatureOrTopic: "DNSRecordChanged"): EventFragment;190  getEvent(nameOrSignatureOrTopic: "DNSRecordDeleted"): EventFragment;191  getEvent(nameOrSignatureOrTopic: "DNSZoneCleared"): EventFragment;192  getEvent(nameOrSignatureOrTopic: "InterfaceChanged"): EventFragment;193  getEvent(nameOrSignatureOrTopic: "NameChanged"): EventFragment;194  getEvent(nameOrSignatureOrTopic: "PubkeyChanged"): EventFragment;195  getEvent(nameOrSignatureOrTopic: "TextChanged"): EventFragment;196}197export class EnsPublicResolver extends BaseContract {198  connect(signerOrProvider: Signer | Provider | string): this;199  attach(addressOrName: string): this;200  deployed(): Promise<this>;201  listeners<EventArgsArray extends Array<any>, EventArgsObject>(202    eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>203  ): Array<TypedListener<EventArgsArray, EventArgsObject>>;204  off<EventArgsArray extends Array<any>, EventArgsObject>(205    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,206    listener: TypedListener<EventArgsArray, EventArgsObject>207  ): this;208  on<EventArgsArray extends Array<any>, EventArgsObject>(209    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,210    listener: TypedListener<EventArgsArray, EventArgsObject>211  ): this;212  once<EventArgsArray extends Array<any>, EventArgsObject>(213    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,214    listener: TypedListener<EventArgsArray, EventArgsObject>215  ): this;216  removeListener<EventArgsArray extends Array<any>, EventArgsObject>(217    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,218    listener: TypedListener<EventArgsArray, EventArgsObject>219  ): this;220  removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(221    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>222  ): this;223  listeners(eventName?: string): Array<Listener>;224  off(eventName: string, listener: Listener): this;225  on(eventName: string, listener: Listener): this;226  once(eventName: string, listener: Listener): this;227  removeListener(eventName: string, listener: Listener): this;228  removeAllListeners(eventName?: string): this;229  queryFilter<EventArgsArray extends Array<any>, EventArgsObject>(230    event: TypedEventFilter<EventArgsArray, EventArgsObject>,231    fromBlockOrBlockhash?: string | number | undefined,232    toBlock?: string | number | undefined233  ): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;234  interface: EnsPublicResolverInterface;235  functions: {236    ABI(237      node: BytesLike,238      contentTypes: BigNumberish,239      overrides?: CallOverrides240    ): Promise<[BigNumber, string]>;241    addr(node: BytesLike, overrides?: CallOverrides): Promise<[string]>;242    authorisations(243      arg0: BytesLike,244      arg1: string,245      arg2: string,246      overrides?: CallOverrides247    ): Promise<[boolean]>;248    clearDNSZone(249      node: BytesLike,250      overrides?: Overrides & { from?: string | Promise<string> }251    ): Promise<ContractTransaction>;252    contenthash(node: BytesLike, overrides?: CallOverrides): Promise<[string]>;253    dnsRecord(254      node: BytesLike,255      name: BytesLike,256      resource: BigNumberish,257      overrides?: CallOverrides258    ): Promise<[string]>;259    hasDNSRecords(260      node: BytesLike,261      name: BytesLike,262      overrides?: CallOverrides263    ): Promise<[boolean]>;264    interfaceImplementer(265      node: BytesLike,266      interfaceID: BytesLike,267      overrides?: CallOverrides268    ): Promise<[string]>;269    name(node: BytesLike, overrides?: CallOverrides): Promise<[string]>;270    pubkey(271      node: BytesLike,272      overrides?: CallOverrides273    ): Promise<[string, string] & { x: string; y: string }>;274    setABI(275      node: BytesLike,276      contentType: BigNumberish,277      data: BytesLike,278      overrides?: Overrides & { from?: string | Promise<string> }279    ): Promise<ContractTransaction>;280    "setAddr(bytes32,uint256,bytes)"(281      node: BytesLike,282      coinType: BigNumberish,283      a: BytesLike,284      overrides?: Overrides & { from?: string | Promise<string> }285    ): Promise<ContractTransaction>;286    "setAddr(bytes32,address)"(287      node: BytesLike,288      a: string,289      overrides?: Overrides & { from?: string | Promise<string> }290    ): Promise<ContractTransaction>;291    setAuthorisation(292      node: BytesLike,293      target: string,294      isAuthorised: boolean,295      overrides?: Overrides & { from?: string | Promise<string> }296    ): Promise<ContractTransaction>;297    setContenthash(298      node: BytesLike,299      hash: BytesLike,300      overrides?: Overrides & { from?: string | Promise<string> }301    ): Promise<ContractTransaction>;302    setDNSRecords(303      node: BytesLike,304      data: BytesLike,305      overrides?: Overrides & { from?: string | Promise<string> }306    ): Promise<ContractTransaction>;307    setInterface(308      node: BytesLike,309      interfaceID: BytesLike,310      implementer: string,311      overrides?: Overrides & { from?: string | Promise<string> }312    ): Promise<ContractTransaction>;313    setName(314      node: BytesLike,315      name: string,316      overrides?: Overrides & { from?: string | Promise<string> }317    ): Promise<ContractTransaction>;318    setPubkey(319      node: BytesLike,320      x: BytesLike,321      y: BytesLike,322      overrides?: Overrides & { from?: string | Promise<string> }323    ): Promise<ContractTransaction>;324    setText(325      node: BytesLike,326      key: string,327      value: string,328      overrides?: Overrides & { from?: string | Promise<string> }329    ): Promise<ContractTransaction>;330    supportsInterface(331      interfaceID: BytesLike,332      overrides?: CallOverrides333    ): Promise<[boolean]>;334    text(335      node: BytesLike,336      key: string,337      overrides?: CallOverrides338    ): Promise<[string]>;339  };340  ABI(341    node: BytesLike,342    contentTypes: BigNumberish,343    overrides?: CallOverrides344  ): Promise<[BigNumber, string]>;345  addr(node: BytesLike, overrides?: CallOverrides): Promise<string>;346  authorisations(347    arg0: BytesLike,348    arg1: string,349    arg2: string,350    overrides?: CallOverrides351  ): Promise<boolean>;352  clearDNSZone(353    node: BytesLike,354    overrides?: Overrides & { from?: string | Promise<string> }355  ): Promise<ContractTransaction>;356  contenthash(node: BytesLike, overrides?: CallOverrides): Promise<string>;357  dnsRecord(358    node: BytesLike,359    name: BytesLike,360    resource: BigNumberish,361    overrides?: CallOverrides362  ): Promise<string>;363  hasDNSRecords(364    node: BytesLike,365    name: BytesLike,366    overrides?: CallOverrides367  ): Promise<boolean>;368  interfaceImplementer(369    node: BytesLike,370    interfaceID: BytesLike,371    overrides?: CallOverrides372  ): Promise<string>;373  name(node: BytesLike, overrides?: CallOverrides): Promise<string>;374  pubkey(375    node: BytesLike,376    overrides?: CallOverrides377  ): Promise<[string, string] & { x: string; y: string }>;378  setABI(379    node: BytesLike,380    contentType: BigNumberish,381    data: BytesLike,382    overrides?: Overrides & { from?: string | Promise<string> }383  ): Promise<ContractTransaction>;384  "setAddr(bytes32,uint256,bytes)"(385    node: BytesLike,386    coinType: BigNumberish,387    a: BytesLike,388    overrides?: Overrides & { from?: string | Promise<string> }389  ): Promise<ContractTransaction>;390  "setAddr(bytes32,address)"(391    node: BytesLike,392    a: string,393    overrides?: Overrides & { from?: string | Promise<string> }394  ): Promise<ContractTransaction>;395  setAuthorisation(396    node: BytesLike,397    target: string,398    isAuthorised: boolean,399    overrides?: Overrides & { from?: string | Promise<string> }400  ): Promise<ContractTransaction>;401  setContenthash(402    node: BytesLike,403    hash: BytesLike,404    overrides?: Overrides & { from?: string | Promise<string> }405  ): Promise<ContractTransaction>;406  setDNSRecords(407    node: BytesLike,408    data: BytesLike,409    overrides?: Overrides & { from?: string | Promise<string> }410  ): Promise<ContractTransaction>;411  setInterface(412    node: BytesLike,413    interfaceID: BytesLike,414    implementer: string,415    overrides?: Overrides & { from?: string | Promise<string> }416  ): Promise<ContractTransaction>;417  setName(418    node: BytesLike,419    name: string,420    overrides?: Overrides & { from?: string | Promise<string> }421  ): Promise<ContractTransaction>;422  setPubkey(423    node: BytesLike,424    x: BytesLike,425    y: BytesLike,426    overrides?: Overrides & { from?: string | Promise<string> }427  ): Promise<ContractTransaction>;428  setText(429    node: BytesLike,430    key: string,431    value: string,432    overrides?: Overrides & { from?: string | Promise<string> }433  ): Promise<ContractTransaction>;434  supportsInterface(435    interfaceID: BytesLike,436    overrides?: CallOverrides437  ): Promise<boolean>;438  text(439    node: BytesLike,440    key: string,441    overrides?: CallOverrides442  ): Promise<string>;443  callStatic: {444    ABI(445      node: BytesLike,446      contentTypes: BigNumberish,447      overrides?: CallOverrides448    ): Promise<[BigNumber, string]>;449    addr(node: BytesLike, overrides?: CallOverrides): Promise<string>;450    authorisations(451      arg0: BytesLike,452      arg1: string,453      arg2: string,454      overrides?: CallOverrides455    ): Promise<boolean>;456    clearDNSZone(node: BytesLike, overrides?: CallOverrides): Promise<void>;457    contenthash(node: BytesLike, overrides?: CallOverrides): Promise<string>;458    dnsRecord(459      node: BytesLike,460      name: BytesLike,461      resource: BigNumberish,462      overrides?: CallOverrides463    ): Promise<string>;464    hasDNSRecords(465      node: BytesLike,466      name: BytesLike,467      overrides?: CallOverrides468    ): Promise<boolean>;469    interfaceImplementer(470      node: BytesLike,471      interfaceID: BytesLike,472      overrides?: CallOverrides473    ): Promise<string>;474    name(node: BytesLike, overrides?: CallOverrides): Promise<string>;475    pubkey(476      node: BytesLike,477      overrides?: CallOverrides478    ): Promise<[string, string] & { x: string; y: string }>;479    setABI(480      node: BytesLike,481      contentType: BigNumberish,482      data: BytesLike,483      overrides?: CallOverrides484    ): Promise<void>;485    "setAddr(bytes32,uint256,bytes)"(486      node: BytesLike,487      coinType: BigNumberish,488      a: BytesLike,489      overrides?: CallOverrides490    ): Promise<void>;491    "setAddr(bytes32,address)"(492      node: BytesLike,493      a: string,494      overrides?: CallOverrides495    ): Promise<void>;496    setAuthorisation(497      node: BytesLike,498      target: string,499      isAuthorised: boolean,500      overrides?: CallOverrides501    ): Promise<void>;502    setContenthash(503      node: BytesLike,504      hash: BytesLike,505      overrides?: CallOverrides506    ): Promise<void>;507    setDNSRecords(508      node: BytesLike,509      data: BytesLike,510      overrides?: CallOverrides511    ): Promise<void>;512    setInterface(513      node: BytesLike,514      interfaceID: BytesLike,515      implementer: string,516      overrides?: CallOverrides517    ): Promise<void>;518    setName(519      node: BytesLike,520      name: string,521      overrides?: CallOverrides522    ): Promise<void>;523    setPubkey(524      node: BytesLike,525      x: BytesLike,526      y: BytesLike,527      overrides?: CallOverrides528    ): Promise<void>;529    setText(530      node: BytesLike,531      key: string,532      value: string,533      overrides?: CallOverrides534    ): Promise<void>;535    supportsInterface(536      interfaceID: BytesLike,537      overrides?: CallOverrides538    ): Promise<boolean>;539    text(540      node: BytesLike,541      key: string,542      overrides?: CallOverrides543    ): Promise<string>;544  };545  filters: {546    ABIChanged(547      node?: BytesLike | null,548      contentType?: BigNumberish | null549    ): TypedEventFilter<550      [string, BigNumber],551      { node: string; contentType: BigNumber }552    >;553    AddrChanged(554      node?: BytesLike | null,555      a?: null556    ): TypedEventFilter<[string, string], { node: string; a: string }>;557    AddressChanged(558      node?: BytesLike | null,559      coinType?: null,560      newAddress?: null561    ): TypedEventFilter<562      [string, BigNumber, string],563      { node: string; coinType: BigNumber; newAddress: string }564    >;565    AuthorisationChanged(566      node?: BytesLike | null,567      owner?: string | null,568      target?: string | null,569      isAuthorised?: null570    ): TypedEventFilter<571      [string, string, string, boolean],572      { node: string; owner: string; target: string; isAuthorised: boolean }573    >;574    ContenthashChanged(575      node?: BytesLike | null,576      hash?: null577    ): TypedEventFilter<[string, string], { node: string; hash: string }>;578    DNSRecordChanged(579      node?: BytesLike | null,580      name?: null,581      resource?: null,582      record?: null583    ): TypedEventFilter<584      [string, string, number, string],585      { node: string; name: string; resource: number; record: string }586    >;587    DNSRecordDeleted(588      node?: BytesLike | null,589      name?: null,590      resource?: null591    ): TypedEventFilter<592      [string, string, number],593      { node: string; name: string; resource: number }594    >;595    DNSZoneCleared(596      node?: BytesLike | null597    ): TypedEventFilter<[string], { node: string }>;598    InterfaceChanged(599      node?: BytesLike | null,600      interfaceID?: BytesLike | null,601      implementer?: null602    ): TypedEventFilter<603      [string, string, string],604      { node: string; interfaceID: string; implementer: string }605    >;606    NameChanged(607      node?: BytesLike | null,608      name?: null609    ): TypedEventFilter<[string, string], { node: string; name: string }>;610    PubkeyChanged(611      node?: BytesLike | null,612      x?: null,613      y?: null614    ): TypedEventFilter<615      [string, string, string],616      { node: string; x: string; y: string }617    >;618    TextChanged(619      node?: BytesLike | null,620      indexedKey?: string | null,621      key?: null622    ): TypedEventFilter<623      [string, string, string],624      { node: string; indexedKey: string; key: string }625    >;626  };627  estimateGas: {628    ABI(629      node: BytesLike,630      contentTypes: BigNumberish,631      overrides?: CallOverrides632    ): Promise<BigNumber>;633    addr(node: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;634    authorisations(635      arg0: BytesLike,636      arg1: string,637      arg2: string,638      overrides?: CallOverrides639    ): Promise<BigNumber>;640    clearDNSZone(641      node: BytesLike,642      overrides?: Overrides & { from?: string | Promise<string> }643    ): Promise<BigNumber>;644    contenthash(node: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;645    dnsRecord(646      node: BytesLike,647      name: BytesLike,648      resource: BigNumberish,649      overrides?: CallOverrides650    ): Promise<BigNumber>;651    hasDNSRecords(652      node: BytesLike,653      name: BytesLike,654      overrides?: CallOverrides655    ): Promise<BigNumber>;656    interfaceImplementer(657      node: BytesLike,658      interfaceID: BytesLike,659      overrides?: CallOverrides660    ): Promise<BigNumber>;661    name(node: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;662    pubkey(node: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;663    setABI(664      node: BytesLike,665      contentType: BigNumberish,666      data: BytesLike,667      overrides?: Overrides & { from?: string | Promise<string> }668    ): Promise<BigNumber>;669    "setAddr(bytes32,uint256,bytes)"(670      node: BytesLike,671      coinType: BigNumberish,672      a: BytesLike,673      overrides?: Overrides & { from?: string | Promise<string> }674    ): Promise<BigNumber>;675    "setAddr(bytes32,address)"(676      node: BytesLike,677      a: string,678      overrides?: Overrides & { from?: string | Promise<string> }679    ): Promise<BigNumber>;680    setAuthorisation(681      node: BytesLike,682      target: string,683      isAuthorised: boolean,684      overrides?: Overrides & { from?: string | Promise<string> }685    ): Promise<BigNumber>;686    setContenthash(687      node: BytesLike,688      hash: BytesLike,689      overrides?: Overrides & { from?: string | Promise<string> }690    ): Promise<BigNumber>;691    setDNSRecords(692      node: BytesLike,693      data: BytesLike,694      overrides?: Overrides & { from?: string | Promise<string> }695    ): Promise<BigNumber>;696    setInterface(697      node: BytesLike,698      interfaceID: BytesLike,699      implementer: string,700      overrides?: Overrides & { from?: string | Promise<string> }701    ): Promise<BigNumber>;702    setName(703      node: BytesLike,704      name: string,705      overrides?: Overrides & { from?: string | Promise<string> }706    ): Promise<BigNumber>;707    setPubkey(708      node: BytesLike,709      x: BytesLike,710      y: BytesLike,711      overrides?: Overrides & { from?: string | Promise<string> }712    ): Promise<BigNumber>;713    setText(714      node: BytesLike,715      key: string,716      value: string,717      overrides?: Overrides & { from?: string | Promise<string> }718    ): Promise<BigNumber>;719    supportsInterface(720      interfaceID: BytesLike,721      overrides?: CallOverrides722    ): Promise<BigNumber>;723    text(724      node: BytesLike,725      key: string,726      overrides?: CallOverrides727    ): Promise<BigNumber>;728  };729  populateTransaction: {730    ABI(731      node: BytesLike,732      contentTypes: BigNumberish,733      overrides?: CallOverrides734    ): Promise<PopulatedTransaction>;735    addr(736      node: BytesLike,737      overrides?: CallOverrides738    ): Promise<PopulatedTransaction>;739    authorisations(740      arg0: BytesLike,741      arg1: string,742      arg2: string,743      overrides?: CallOverrides744    ): Promise<PopulatedTransaction>;745    clearDNSZone(746      node: BytesLike,747      overrides?: Overrides & { from?: string | Promise<string> }748    ): Promise<PopulatedTransaction>;749    contenthash(750      node: BytesLike,751      overrides?: CallOverrides752    ): Promise<PopulatedTransaction>;753    dnsRecord(754      node: BytesLike,755      name: BytesLike,756      resource: BigNumberish,757      overrides?: CallOverrides758    ): Promise<PopulatedTransaction>;759    hasDNSRecords(760      node: BytesLike,761      name: BytesLike,762      overrides?: CallOverrides763    ): Promise<PopulatedTransaction>;764    interfaceImplementer(765      node: BytesLike,766      interfaceID: BytesLike,767      overrides?: CallOverrides768    ): Promise<PopulatedTransaction>;769    name(770      node: BytesLike,771      overrides?: CallOverrides772    ): Promise<PopulatedTransaction>;773    pubkey(774      node: BytesLike,775      overrides?: CallOverrides776    ): Promise<PopulatedTransaction>;777    setABI(778      node: BytesLike,779      contentType: BigNumberish,780      data: BytesLike,781      overrides?: Overrides & { from?: string | Promise<string> }782    ): Promise<PopulatedTransaction>;783    "setAddr(bytes32,uint256,bytes)"(784      node: BytesLike,785      coinType: BigNumberish,786      a: BytesLike,787      overrides?: Overrides & { from?: string | Promise<string> }788    ): Promise<PopulatedTransaction>;789    "setAddr(bytes32,address)"(790      node: BytesLike,791      a: string,792      overrides?: Overrides & { from?: string | Promise<string> }793    ): Promise<PopulatedTransaction>;794    setAuthorisation(795      node: BytesLike,796      target: string,797      isAuthorised: boolean,798      overrides?: Overrides & { from?: string | Promise<string> }799    ): Promise<PopulatedTransaction>;800    setContenthash(801      node: BytesLike,802      hash: BytesLike,803      overrides?: Overrides & { from?: string | Promise<string> }804    ): Promise<PopulatedTransaction>;805    setDNSRecords(806      node: BytesLike,807      data: BytesLike,808      overrides?: Overrides & { from?: string | Promise<string> }809    ): Promise<PopulatedTransaction>;810    setInterface(811      node: BytesLike,812      interfaceID: BytesLike,813      implementer: string,814      overrides?: Overrides & { from?: string | Promise<string> }815    ): Promise<PopulatedTransaction>;816    setName(817      node: BytesLike,818      name: string,819      overrides?: Overrides & { from?: string | Promise<string> }820    ): Promise<PopulatedTransaction>;821    setPubkey(822      node: BytesLike,823      x: BytesLike,824      y: BytesLike,825      overrides?: Overrides & { from?: string | Promise<string> }826    ): Promise<PopulatedTransaction>;827    setText(828      node: BytesLike,829      key: string,830      value: string,831      overrides?: Overrides & { from?: string | Promise<string> }832    ): Promise<PopulatedTransaction>;833    supportsInterface(834      interfaceID: BytesLike,835      overrides?: CallOverrides836    ): Promise<PopulatedTransaction>;837    text(838      node: BytesLike,839      key: string,840      overrides?: CallOverrides841    ): Promise<PopulatedTransaction>;842  };...fromnumeric.pyi
Source:fromnumeric.pyi  
1import datetime as dt2from collections.abc import Sequence3from typing import Union, Any, overload, TypeVar, Literal, SupportsIndex4from numpy import (5    ndarray,6    number,7    uint64,8    int_,9    int64,10    intp,11    float16,12    bool_,13    floating,14    complexfloating,15    object_,16    generic,17    _OrderKACF,18    _OrderACF,19    _ModeKind,20    _PartitionKind,21    _SortKind,22    _SortSide,23)24from numpy._typing import (25    DTypeLike,26    _DTypeLike,27    ArrayLike,28    _ArrayLike,29    NDArray,30    _ShapeLike,31    _Shape,32    _ArrayLikeBool_co,33    _ArrayLikeUInt_co,34    _ArrayLikeInt_co,35    _ArrayLikeFloat_co,36    _ArrayLikeComplex_co,37    _ArrayLikeObject_co,38    _IntLike_co,39    _BoolLike_co,40    _ComplexLike_co,41    _NumberLike_co,42    _ScalarLike_co,43)44_SCT = TypeVar("_SCT", bound=generic)45_SCT_uifcO = TypeVar("_SCT_uifcO", bound=number[Any] | object_)46_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any])47__all__: list[str]48@overload49def take(50    a: _ArrayLike[_SCT],51    indices: _IntLike_co,52    axis: None = ...,53    out: None = ...,54    mode: _ModeKind = ...,55) -> _SCT: ...56@overload57def take(58    a: ArrayLike,59    indices: _IntLike_co,60    axis: None | SupportsIndex = ...,61    out: None = ...,62    mode: _ModeKind = ...,63) -> Any: ...64@overload65def take(66    a: _ArrayLike[_SCT],67    indices: _ArrayLikeInt_co,68    axis: None | SupportsIndex = ...,69    out: None = ...,70    mode: _ModeKind = ...,71) -> NDArray[_SCT]: ...72@overload73def take(74    a: ArrayLike,75    indices: _ArrayLikeInt_co,76    axis: None | SupportsIndex = ...,77    out: None = ...,78    mode: _ModeKind = ...,79) -> NDArray[Any]: ...80@overload81def take(82    a: ArrayLike,83    indices: _ArrayLikeInt_co,84    axis: None | SupportsIndex = ...,85    out: _ArrayType = ...,86    mode: _ModeKind = ...,87) -> _ArrayType: ...88@overload89def reshape(90    a: _ArrayLike[_SCT],91    newshape: _ShapeLike,92    order: _OrderACF = ...,93) -> NDArray[_SCT]: ...94@overload95def reshape(96    a: ArrayLike,97    newshape: _ShapeLike,98    order: _OrderACF = ...,99) -> NDArray[Any]: ...100@overload101def choose(102    a: _IntLike_co,103    choices: ArrayLike,104    out: None = ...,105    mode: _ModeKind = ...,106) -> Any: ...107@overload108def choose(109    a: _ArrayLikeInt_co,110    choices: _ArrayLike[_SCT],111    out: None = ...,112    mode: _ModeKind = ...,113) -> NDArray[_SCT]: ...114@overload115def choose(116    a: _ArrayLikeInt_co,117    choices: ArrayLike,118    out: None = ...,119    mode: _ModeKind = ...,120) -> NDArray[Any]: ...121@overload122def choose(123    a: _ArrayLikeInt_co,124    choices: ArrayLike,125    out: _ArrayType = ...,126    mode: _ModeKind = ...,127) -> _ArrayType: ...128@overload129def repeat(130    a: _ArrayLike[_SCT],131    repeats: _ArrayLikeInt_co,132    axis: None | SupportsIndex = ...,133) -> NDArray[_SCT]: ...134@overload135def repeat(136    a: ArrayLike,137    repeats: _ArrayLikeInt_co,138    axis: None | SupportsIndex = ...,139) -> NDArray[Any]: ...140def put(141    a: NDArray[Any],142    ind: _ArrayLikeInt_co,143    v: ArrayLike,144    mode: _ModeKind = ...,145) -> None: ...146@overload147def swapaxes(148    a: _ArrayLike[_SCT],149    axis1: SupportsIndex,150    axis2: SupportsIndex,151) -> NDArray[_SCT]: ...152@overload153def swapaxes(154    a: ArrayLike,155    axis1: SupportsIndex,156    axis2: SupportsIndex,157) -> NDArray[Any]: ...158@overload159def transpose(160    a: _ArrayLike[_SCT],161    axes: None | _ShapeLike = ...162) -> NDArray[_SCT]: ...163@overload164def transpose(165    a: ArrayLike,166    axes: None | _ShapeLike = ...167) -> NDArray[Any]: ...168@overload169def partition(170    a: _ArrayLike[_SCT],171    kth: _ArrayLikeInt_co,172    axis: None | SupportsIndex = ...,173    kind: _PartitionKind = ...,174    order: None | str | Sequence[str] = ...,175) -> NDArray[_SCT]: ...176@overload177def partition(178    a: ArrayLike,179    kth: _ArrayLikeInt_co,180    axis: None | SupportsIndex = ...,181    kind: _PartitionKind = ...,182    order: None | str | Sequence[str] = ...,183) -> NDArray[Any]: ...184def argpartition(185    a: ArrayLike,186    kth: _ArrayLikeInt_co,187    axis: None | SupportsIndex = ...,188    kind: _PartitionKind = ...,189    order: None | str | Sequence[str] = ...,190) -> NDArray[intp]: ...191@overload192def sort(193    a: _ArrayLike[_SCT],194    axis: None | SupportsIndex = ...,195    kind: None | _SortKind = ...,196    order: None | str | Sequence[str] = ...,197) -> NDArray[_SCT]: ...198@overload199def sort(200    a: ArrayLike,201    axis: None | SupportsIndex = ...,202    kind: None | _SortKind = ...,203    order: None | str | Sequence[str] = ...,204) -> NDArray[Any]: ...205def argsort(206    a: ArrayLike,207    axis: None | SupportsIndex = ...,208    kind: None | _SortKind = ...,209    order: None | str | Sequence[str] = ...,210) -> NDArray[intp]: ...211@overload212def argmax(213    a: ArrayLike,214    axis: None = ...,215    out: None = ...,216    *,217    keepdims: Literal[False] = ...,218) -> intp: ...219@overload220def argmax(221    a: ArrayLike,222    axis: None | SupportsIndex = ...,223    out: None = ...,224    *,225    keepdims: bool = ...,226) -> Any: ...227@overload228def argmax(229    a: ArrayLike,230    axis: None | SupportsIndex = ...,231    out: _ArrayType = ...,232    *,233    keepdims: bool = ...,234) -> _ArrayType: ...235@overload236def argmin(237    a: ArrayLike,238    axis: None = ...,239    out: None = ...,240    *,241    keepdims: Literal[False] = ...,242) -> intp: ...243@overload244def argmin(245    a: ArrayLike,246    axis: None | SupportsIndex = ...,247    out: None = ...,248    *,249    keepdims: bool = ...,250) -> Any: ...251@overload252def argmin(253    a: ArrayLike,254    axis: None | SupportsIndex = ...,255    out: _ArrayType = ...,256    *,257    keepdims: bool = ...,258) -> _ArrayType: ...259@overload260def searchsorted(261    a: ArrayLike,262    v: _ScalarLike_co,263    side: _SortSide = ...,264    sorter: None | _ArrayLikeInt_co = ...,  # 1D int array265) -> intp: ...266@overload267def searchsorted(268    a: ArrayLike,269    v: ArrayLike,270    side: _SortSide = ...,271    sorter: None | _ArrayLikeInt_co = ...,  # 1D int array272) -> NDArray[intp]: ...273@overload274def resize(275    a: _ArrayLike[_SCT],276    new_shape: _ShapeLike,277) -> NDArray[_SCT]: ...278@overload279def resize(280    a: ArrayLike,281    new_shape: _ShapeLike,282) -> NDArray[Any]: ...283@overload284def squeeze(285    a: _SCT,286    axis: None | _ShapeLike = ...,287) -> _SCT: ...288@overload289def squeeze(290    a: _ArrayLike[_SCT],291    axis: None | _ShapeLike = ...,292) -> NDArray[_SCT]: ...293@overload294def squeeze(295    a: ArrayLike,296    axis: None | _ShapeLike = ...,297) -> NDArray[Any]: ...298@overload299def diagonal(300    a: _ArrayLike[_SCT],301    offset: SupportsIndex = ...,302    axis1: SupportsIndex = ...,303    axis2: SupportsIndex = ...,  # >= 2D array304) -> NDArray[_SCT]: ...305@overload306def diagonal(307    a: ArrayLike,308    offset: SupportsIndex = ...,309    axis1: SupportsIndex = ...,310    axis2: SupportsIndex = ...,  # >= 2D array311) -> NDArray[Any]: ...312@overload313def trace(314    a: ArrayLike,  # >= 2D array315    offset: SupportsIndex = ...,316    axis1: SupportsIndex = ...,317    axis2: SupportsIndex = ...,318    dtype: DTypeLike = ...,319    out: None = ...,320) -> Any: ...321@overload322def trace(323    a: ArrayLike,  # >= 2D array324    offset: SupportsIndex = ...,325    axis1: SupportsIndex = ...,326    axis2: SupportsIndex = ...,327    dtype: DTypeLike = ...,328    out: _ArrayType = ...,329) -> _ArrayType: ...330@overload331def ravel(a: _ArrayLike[_SCT], order: _OrderKACF = ...) -> NDArray[_SCT]: ...332@overload333def ravel(a: ArrayLike, order: _OrderKACF = ...) -> NDArray[Any]: ...334def nonzero(a: ArrayLike) -> tuple[NDArray[intp], ...]: ...335def shape(a: ArrayLike) -> _Shape: ...336@overload337def compress(338    condition: _ArrayLikeBool_co,  # 1D bool array339    a: _ArrayLike[_SCT],340    axis: None | SupportsIndex = ...,341    out: None = ...,342) -> NDArray[_SCT]: ...343@overload344def compress(345    condition: _ArrayLikeBool_co,  # 1D bool array346    a: ArrayLike,347    axis: None | SupportsIndex = ...,348    out: None = ...,349) -> NDArray[Any]: ...350@overload351def compress(352    condition: _ArrayLikeBool_co,  # 1D bool array353    a: ArrayLike,354    axis: None | SupportsIndex = ...,355    out: _ArrayType = ...,356) -> _ArrayType: ...357@overload358def clip(359    a: _SCT,360    a_min: None | ArrayLike,361    a_max: None | ArrayLike,362    out: None = ...,363    *,364    dtype: None = ...,365    where: None | _ArrayLikeBool_co = ...,366    order: _OrderKACF = ...,367    subok: bool = ...,368    signature: str | tuple[None | str, ...] = ...,369    extobj: list[Any] = ...,370) -> _SCT: ...371@overload372def clip(373    a: _ScalarLike_co,374    a_min: None | ArrayLike,375    a_max: None | ArrayLike,376    out: None = ...,377    *,378    dtype: None = ...,379    where: None | _ArrayLikeBool_co = ...,380    order: _OrderKACF = ...,381    subok: bool = ...,382    signature: str | tuple[None | str, ...] = ...,383    extobj: list[Any] = ...,384) -> Any: ...385@overload386def clip(387    a: _ArrayLike[_SCT],388    a_min: None | ArrayLike,389    a_max: None | ArrayLike,390    out: None = ...,391    *,392    dtype: None = ...,393    where: None | _ArrayLikeBool_co = ...,394    order: _OrderKACF = ...,395    subok: bool = ...,396    signature: str | tuple[None | str, ...] = ...,397    extobj: list[Any] = ...,398) -> NDArray[_SCT]: ...399@overload400def clip(401    a: ArrayLike,402    a_min: None | ArrayLike,403    a_max: None | ArrayLike,404    out: None = ...,405    *,406    dtype: None = ...,407    where: None | _ArrayLikeBool_co = ...,408    order: _OrderKACF = ...,409    subok: bool = ...,410    signature: str | tuple[None | str, ...] = ...,411    extobj: list[Any] = ...,412) -> NDArray[Any]: ...413@overload414def clip(415    a: ArrayLike,416    a_min: None | ArrayLike,417    a_max: None | ArrayLike,418    out: _ArrayType = ...,419    *,420    dtype: DTypeLike,421    where: None | _ArrayLikeBool_co = ...,422    order: _OrderKACF = ...,423    subok: bool = ...,424    signature: str | tuple[None | str, ...] = ...,425    extobj: list[Any] = ...,426) -> Any: ...427@overload428def clip(429    a: ArrayLike,430    a_min: None | ArrayLike,431    a_max: None | ArrayLike,432    out: _ArrayType,433    *,434    dtype: DTypeLike = ...,435    where: None | _ArrayLikeBool_co = ...,436    order: _OrderKACF = ...,437    subok: bool = ...,438    signature: str | tuple[None | str, ...] = ...,439    extobj: list[Any] = ...,440) -> _ArrayType: ...441@overload442def sum(443    a: _ArrayLike[_SCT],444    axis: None = ...,445    dtype: None = ...,446    out: None  = ...,447    keepdims: bool = ...,448    initial: _NumberLike_co = ...,449    where: _ArrayLikeBool_co = ...,450) -> _SCT: ...451@overload452def sum(453    a: ArrayLike,454    axis: None | _ShapeLike = ...,455    dtype: DTypeLike = ...,456    out: None  = ...,457    keepdims: bool = ...,458    initial: _NumberLike_co = ...,459    where: _ArrayLikeBool_co = ...,460) -> Any: ...461@overload462def sum(463    a: ArrayLike,464    axis: None | _ShapeLike = ...,465    dtype: DTypeLike = ...,466    out: _ArrayType  = ...,467    keepdims: bool = ...,468    initial: _NumberLike_co = ...,469    where: _ArrayLikeBool_co = ...,470) -> _ArrayType: ...471@overload472def all(473    a: ArrayLike,474    axis: None = ...,475    out: None = ...,476    keepdims: Literal[False] = ...,477    *,478    where: _ArrayLikeBool_co = ...,479) -> bool_: ...480@overload481def all(482    a: ArrayLike,483    axis: None | _ShapeLike = ...,484    out: None = ...,485    keepdims: bool = ...,486    *,487    where: _ArrayLikeBool_co = ...,488) -> Any: ...489@overload490def all(491    a: ArrayLike,492    axis: None | _ShapeLike = ...,493    out: _ArrayType = ...,494    keepdims: bool = ...,495    *,496    where: _ArrayLikeBool_co = ...,497) -> _ArrayType: ...498@overload499def any(500    a: ArrayLike,501    axis: None = ...,502    out: None = ...,503    keepdims: Literal[False] = ...,504    *,505    where: _ArrayLikeBool_co = ...,506) -> bool_: ...507@overload508def any(509    a: ArrayLike,510    axis: None | _ShapeLike = ...,511    out: None = ...,512    keepdims: bool = ...,513    *,514    where: _ArrayLikeBool_co = ...,515) -> Any: ...516@overload517def any(518    a: ArrayLike,519    axis: None | _ShapeLike = ...,520    out: _ArrayType = ...,521    keepdims: bool = ...,522    *,523    where: _ArrayLikeBool_co = ...,524) -> _ArrayType: ...525@overload526def cumsum(527    a: _ArrayLike[_SCT],528    axis: None | SupportsIndex = ...,529    dtype: None = ...,530    out: None = ...,531) -> NDArray[_SCT]: ...532@overload533def cumsum(534    a: ArrayLike,535    axis: None | SupportsIndex = ...,536    dtype: None = ...,537    out: None = ...,538) -> NDArray[Any]: ...539@overload540def cumsum(541    a: ArrayLike,542    axis: None | SupportsIndex = ...,543    dtype: _DTypeLike[_SCT] = ...,544    out: None = ...,545) -> NDArray[_SCT]: ...546@overload547def cumsum(548    a: ArrayLike,549    axis: None | SupportsIndex = ...,550    dtype: DTypeLike = ...,551    out: None = ...,552) -> NDArray[Any]: ...553@overload554def cumsum(555    a: ArrayLike,556    axis: None | SupportsIndex = ...,557    dtype: DTypeLike = ...,558    out: _ArrayType = ...,559) -> _ArrayType: ...560@overload561def ptp(562    a: _ArrayLike[_SCT],563    axis: None = ...,564    out: None = ...,565    keepdims: Literal[False] = ...,566) -> _SCT: ...567@overload568def ptp(569    a: ArrayLike,570    axis: None | _ShapeLike = ...,571    out: None = ...,572    keepdims: bool = ...,573) -> Any: ...574@overload575def ptp(576    a: ArrayLike,577    axis: None | _ShapeLike = ...,578    out: _ArrayType = ...,579    keepdims: bool = ...,580) -> _ArrayType: ...581@overload582def amax(583    a: _ArrayLike[_SCT],584    axis: None = ...,585    out: None = ...,586    keepdims: Literal[False] = ...,587    initial: _NumberLike_co = ...,588    where: _ArrayLikeBool_co = ...,589) -> _SCT: ...590@overload591def amax(592    a: ArrayLike,593    axis: None | _ShapeLike = ...,594    out: None = ...,595    keepdims: bool = ...,596    initial: _NumberLike_co = ...,597    where: _ArrayLikeBool_co = ...,598) -> Any: ...599@overload600def amax(601    a: ArrayLike,602    axis: None | _ShapeLike = ...,603    out: _ArrayType = ...,604    keepdims: bool = ...,605    initial: _NumberLike_co = ...,606    where: _ArrayLikeBool_co = ...,607) -> _ArrayType: ...608@overload609def amin(610    a: _ArrayLike[_SCT],611    axis: None = ...,612    out: None = ...,613    keepdims: Literal[False] = ...,614    initial: _NumberLike_co = ...,615    where: _ArrayLikeBool_co = ...,616) -> _SCT: ...617@overload618def amin(619    a: ArrayLike,620    axis: None | _ShapeLike = ...,621    out: None = ...,622    keepdims: bool = ...,623    initial: _NumberLike_co = ...,624    where: _ArrayLikeBool_co = ...,625) -> Any: ...626@overload627def amin(628    a: ArrayLike,629    axis: None | _ShapeLike = ...,630    out: _ArrayType = ...,631    keepdims: bool = ...,632    initial: _NumberLike_co = ...,633    where: _ArrayLikeBool_co = ...,634) -> _ArrayType: ...635# TODO: `np.prod()``: For object arrays `initial` does not necessarily636# have to be a numerical scalar.637# The only requirement is that it is compatible638# with the `.__mul__()` method(s) of the passed array's elements.639# Note that the same situation holds for all wrappers around640# `np.ufunc.reduce`, e.g. `np.sum()` (`.__add__()`).641@overload642def prod(643    a: _ArrayLikeBool_co,644    axis: None = ...,645    dtype: None = ...,646    out: None = ...,647    keepdims: Literal[False] = ...,648    initial: _NumberLike_co = ...,649    where: _ArrayLikeBool_co = ...,650) -> int_: ...651@overload652def prod(653    a: _ArrayLikeUInt_co,654    axis: None = ...,655    dtype: None = ...,656    out: None = ...,657    keepdims: Literal[False] = ...,658    initial: _NumberLike_co = ...,659    where: _ArrayLikeBool_co = ...,660) -> uint64: ...661@overload662def prod(663    a: _ArrayLikeInt_co,664    axis: None = ...,665    dtype: None = ...,666    out: None = ...,667    keepdims: Literal[False] = ...,668    initial: _NumberLike_co = ...,669    where: _ArrayLikeBool_co = ...,670) -> int64: ...671@overload672def prod(673    a: _ArrayLikeFloat_co,674    axis: None = ...,675    dtype: None = ...,676    out: None = ...,677    keepdims: Literal[False] = ...,678    initial: _NumberLike_co = ...,679    where: _ArrayLikeBool_co = ...,680) -> floating[Any]: ...681@overload682def prod(683    a: _ArrayLikeComplex_co,684    axis: None = ...,685    dtype: None = ...,686    out: None = ...,687    keepdims: Literal[False] = ...,688    initial: _NumberLike_co = ...,689    where: _ArrayLikeBool_co = ...,690) -> complexfloating[Any, Any]: ...691@overload692def prod(693    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,694    axis: None | _ShapeLike = ...,695    dtype: None = ...,696    out: None = ...,697    keepdims: bool = ...,698    initial: _NumberLike_co = ...,699    where: _ArrayLikeBool_co = ...,700) -> Any: ...701@overload702def prod(703    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,704    axis: None = ...,705    dtype: _DTypeLike[_SCT] = ...,706    out: None = ...,707    keepdims: Literal[False] = ...,708    initial: _NumberLike_co = ...,709    where: _ArrayLikeBool_co = ...,710) -> _SCT: ...711@overload712def prod(713    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,714    axis: None | _ShapeLike = ...,715    dtype: None | DTypeLike = ...,716    out: None = ...,717    keepdims: bool = ...,718    initial: _NumberLike_co = ...,719    where: _ArrayLikeBool_co = ...,720) -> Any: ...721@overload722def prod(723    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,724    axis: None | _ShapeLike = ...,725    dtype: None | DTypeLike = ...,726    out: _ArrayType = ...,727    keepdims: bool = ...,728    initial: _NumberLike_co = ...,729    where: _ArrayLikeBool_co = ...,730) -> _ArrayType: ...731@overload732def cumprod(733    a: _ArrayLikeBool_co,734    axis: None | SupportsIndex = ...,735    dtype: None = ...,736    out: None = ...,737) -> NDArray[int_]: ...738@overload739def cumprod(740    a: _ArrayLikeUInt_co,741    axis: None | SupportsIndex = ...,742    dtype: None = ...,743    out: None = ...,744) -> NDArray[uint64]: ...745@overload746def cumprod(747    a: _ArrayLikeInt_co,748    axis: None | SupportsIndex = ...,749    dtype: None = ...,750    out: None = ...,751) -> NDArray[int64]: ...752@overload753def cumprod(754    a: _ArrayLikeFloat_co,755    axis: None | SupportsIndex = ...,756    dtype: None = ...,757    out: None = ...,758) -> NDArray[floating[Any]]: ...759@overload760def cumprod(761    a: _ArrayLikeComplex_co,762    axis: None | SupportsIndex = ...,763    dtype: None = ...,764    out: None = ...,765) -> NDArray[complexfloating[Any, Any]]: ...766@overload767def cumprod(768    a: _ArrayLikeObject_co,769    axis: None | SupportsIndex = ...,770    dtype: None = ...,771    out: None = ...,772) -> NDArray[object_]: ...773@overload774def cumprod(775    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,776    axis: None | SupportsIndex = ...,777    dtype: _DTypeLike[_SCT] = ...,778    out: None = ...,779) -> NDArray[_SCT]: ...780@overload781def cumprod(782    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,783    axis: None | SupportsIndex = ...,784    dtype: DTypeLike = ...,785    out: None = ...,786) -> NDArray[Any]: ...787@overload788def cumprod(789    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,790    axis: None | SupportsIndex = ...,791    dtype: DTypeLike = ...,792    out: _ArrayType = ...,793) -> _ArrayType: ...794def ndim(a: ArrayLike) -> int: ...795def size(a: ArrayLike, axis: None | int = ...) -> int: ...796@overload797def around(798    a: _BoolLike_co,799    decimals: SupportsIndex = ...,800    out: None = ...,801) -> float16: ...802@overload803def around(804    a: _SCT_uifcO,805    decimals: SupportsIndex = ...,806    out: None = ...,807) -> _SCT_uifcO: ...808@overload809def around(810    a: _ComplexLike_co | object_,811    decimals: SupportsIndex = ...,812    out: None = ...,813) -> Any: ...814@overload815def around(816    a: _ArrayLikeBool_co,817    decimals: SupportsIndex = ...,818    out: None = ...,819) -> NDArray[float16]: ...820@overload821def around(822    a: _ArrayLike[_SCT_uifcO],823    decimals: SupportsIndex = ...,824    out: None = ...,825) -> NDArray[_SCT_uifcO]: ...826@overload827def around(828    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,829    decimals: SupportsIndex = ...,830    out: None = ...,831) -> NDArray[Any]: ...832@overload833def around(834    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,835    decimals: SupportsIndex = ...,836    out: _ArrayType = ...,837) -> _ArrayType: ...838@overload839def mean(840    a: _ArrayLikeFloat_co,841    axis: None = ...,842    dtype: None = ...,843    out: None = ...,844    keepdims: Literal[False] = ...,845    *,846    where: _ArrayLikeBool_co = ...,847) -> floating[Any]: ...848@overload849def mean(850    a: _ArrayLikeComplex_co,851    axis: None = ...,852    dtype: None = ...,853    out: None = ...,854    keepdims: Literal[False] = ...,855    *,856    where: _ArrayLikeBool_co = ...,857) -> complexfloating[Any, Any]: ...858@overload859def mean(860    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,861    axis: None | _ShapeLike = ...,862    dtype: None = ...,863    out: None = ...,864    keepdims: bool = ...,865    *,866    where: _ArrayLikeBool_co = ...,867) -> Any: ...868@overload869def mean(870    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,871    axis: None = ...,872    dtype: _DTypeLike[_SCT] = ...,873    out: None = ...,874    keepdims: Literal[False] = ...,875    *,876    where: _ArrayLikeBool_co = ...,877) -> _SCT: ...878@overload879def mean(880    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,881    axis: None | _ShapeLike = ...,882    dtype: DTypeLike = ...,883    out: None = ...,884    keepdims: bool = ...,885    *,886    where: _ArrayLikeBool_co = ...,887) -> Any: ...888@overload889def mean(890    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,891    axis: None | _ShapeLike = ...,892    dtype: DTypeLike = ...,893    out: _ArrayType = ...,894    keepdims: bool = ...,895    *,896    where: _ArrayLikeBool_co = ...,897) -> _ArrayType: ...898@overload899def std(900    a: _ArrayLikeComplex_co,901    axis: None = ...,902    dtype: None = ...,903    out: None = ...,904    ddof: float = ...,905    keepdims: Literal[False] = ...,906    *,907    where: _ArrayLikeBool_co = ...,908) -> floating[Any]: ...909@overload910def std(911    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,912    axis: None | _ShapeLike = ...,913    dtype: None = ...,914    out: None = ...,915    ddof: float = ...,916    keepdims: bool = ...,917    *,918    where: _ArrayLikeBool_co = ...,919) -> Any: ...920@overload921def std(922    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,923    axis: None = ...,924    dtype: _DTypeLike[_SCT] = ...,925    out: None = ...,926    ddof: float = ...,927    keepdims: Literal[False] = ...,928    *,929    where: _ArrayLikeBool_co = ...,930) -> _SCT: ...931@overload932def std(933    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,934    axis: None | _ShapeLike = ...,935    dtype: DTypeLike = ...,936    out: None = ...,937    ddof: float = ...,938    keepdims: bool = ...,939    *,940    where: _ArrayLikeBool_co = ...,941) -> Any: ...942@overload943def std(944    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,945    axis: None | _ShapeLike = ...,946    dtype: DTypeLike = ...,947    out: _ArrayType = ...,948    ddof: float = ...,949    keepdims: bool = ...,950    *,951    where: _ArrayLikeBool_co = ...,952) -> _ArrayType: ...953@overload954def var(955    a: _ArrayLikeComplex_co,956    axis: None = ...,957    dtype: None = ...,958    out: None = ...,959    ddof: float = ...,960    keepdims: Literal[False] = ...,961    *,962    where: _ArrayLikeBool_co = ...,963) -> floating[Any]: ...964@overload965def var(966    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,967    axis: None | _ShapeLike = ...,968    dtype: None = ...,969    out: None = ...,970    ddof: float = ...,971    keepdims: bool = ...,972    *,973    where: _ArrayLikeBool_co = ...,974) -> Any: ...975@overload976def var(977    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,978    axis: None = ...,979    dtype: _DTypeLike[_SCT] = ...,980    out: None = ...,981    ddof: float = ...,982    keepdims: Literal[False] = ...,983    *,984    where: _ArrayLikeBool_co = ...,985) -> _SCT: ...986@overload987def var(988    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,989    axis: None | _ShapeLike = ...,990    dtype: DTypeLike = ...,991    out: None = ...,992    ddof: float = ...,993    keepdims: bool = ...,994    *,995    where: _ArrayLikeBool_co = ...,996) -> Any: ...997@overload998def var(999    a: _ArrayLikeComplex_co | _ArrayLikeObject_co,1000    axis: None | _ShapeLike = ...,1001    dtype: DTypeLike = ...,1002    out: _ArrayType = ...,1003    ddof: float = ...,1004    keepdims: bool = ...,1005    *,1006    where: _ArrayLikeBool_co = ...,...numeric.pyi
Source:numeric.pyi  
...47_ArrayType = TypeVar("_ArrayType", bound=NDArray[Any])48_CorrelateMode = Literal["valid", "same", "full"]49__all__: list[str]50@overload51def zeros_like(52    a: _ArrayType,53    dtype: None = ...,54    order: _OrderKACF = ...,55    subok: Literal[True] = ...,56    shape: None = ...,57) -> _ArrayType: ...58@overload59def zeros_like(60    a: _ArrayLike[_SCT],61    dtype: None = ...,62    order: _OrderKACF = ...,63    subok: bool = ...,64    shape: None | _ShapeLike = ...,65) -> NDArray[_SCT]: ...66@overload67def zeros_like(68    a: object,69    dtype: None = ...,70    order: _OrderKACF = ...,71    subok: bool = ...,72    shape: None | _ShapeLike= ...,73) -> NDArray[Any]: ...74@overload75def zeros_like(76    a: Any,77    dtype: _DTypeLike[_SCT],78    order: _OrderKACF = ...,79    subok: bool = ...,80    shape: None | _ShapeLike= ...,81) -> NDArray[_SCT]: ...82@overload83def zeros_like(84    a: Any,85    dtype: DTypeLike,86    order: _OrderKACF = ...,87    subok: bool = ...,88    shape: None | _ShapeLike= ...,89) -> NDArray[Any]: ...90@overload91def ones(92    shape: _ShapeLike,93    dtype: None = ...,94    order: _OrderCF = ...,95    *,96    like: _SupportsArrayFunc = ...,97) -> NDArray[float64]: ...98@overload99def ones(100    shape: _ShapeLike,101    dtype: _DTypeLike[_SCT],102    order: _OrderCF = ...,103    *,104    like: _SupportsArrayFunc = ...,105) -> NDArray[_SCT]: ...106@overload107def ones(108    shape: _ShapeLike,109    dtype: DTypeLike,110    order: _OrderCF = ...,111    *,112    like: _SupportsArrayFunc = ...,113) -> NDArray[Any]: ...114@overload115def ones_like(116    a: _ArrayType,117    dtype: None = ...,118    order: _OrderKACF = ...,119    subok: Literal[True] = ...,120    shape: None = ...,121) -> _ArrayType: ...122@overload123def ones_like(124    a: _ArrayLike[_SCT],125    dtype: None = ...,126    order: _OrderKACF = ...,127    subok: bool = ...,128    shape: None | _ShapeLike = ...,129) -> NDArray[_SCT]: ...130@overload131def ones_like(132    a: object,133    dtype: None = ...,134    order: _OrderKACF = ...,135    subok: bool = ...,136    shape: None | _ShapeLike= ...,137) -> NDArray[Any]: ...138@overload139def ones_like(140    a: Any,141    dtype: _DTypeLike[_SCT],142    order: _OrderKACF = ...,143    subok: bool = ...,144    shape: None | _ShapeLike= ...,145) -> NDArray[_SCT]: ...146@overload147def ones_like(148    a: Any,149    dtype: DTypeLike,150    order: _OrderKACF = ...,151    subok: bool = ...,152    shape: None | _ShapeLike= ...,153) -> NDArray[Any]: ...154@overload155def full(156    shape: _ShapeLike,157    fill_value: Any,158    dtype: None = ...,159    order: _OrderCF = ...,160    *,161    like: _SupportsArrayFunc = ...,162) -> NDArray[Any]: ...163@overload164def full(165    shape: _ShapeLike,166    fill_value: Any,167    dtype: _DTypeLike[_SCT],168    order: _OrderCF = ...,169    *,170    like: _SupportsArrayFunc = ...,171) -> NDArray[_SCT]: ...172@overload173def full(174    shape: _ShapeLike,175    fill_value: Any,176    dtype: DTypeLike,177    order: _OrderCF = ...,178    *,179    like: _SupportsArrayFunc = ...,180) -> NDArray[Any]: ...181@overload182def full_like(183    a: _ArrayType,184    fill_value: Any,185    dtype: None = ...,186    order: _OrderKACF = ...,187    subok: Literal[True] = ...,188    shape: None = ...,189) -> _ArrayType: ...190@overload191def full_like(192    a: _ArrayLike[_SCT],193    fill_value: Any,194    dtype: None = ...,195    order: _OrderKACF = ...,196    subok: bool = ...,197    shape: None | _ShapeLike = ...,198) -> NDArray[_SCT]: ...199@overload200def full_like(201    a: object,202    fill_value: Any,203    dtype: None = ...,204    order: _OrderKACF = ...,205    subok: bool = ...,206    shape: None | _ShapeLike= ...,207) -> NDArray[Any]: ...208@overload209def full_like(210    a: Any,211    fill_value: Any,212    dtype: _DTypeLike[_SCT],213    order: _OrderKACF = ...,214    subok: bool = ...,215    shape: None | _ShapeLike= ...,216) -> NDArray[_SCT]: ...217@overload218def full_like(219    a: Any,220    fill_value: Any,221    dtype: DTypeLike,222    order: _OrderKACF = ...,223    subok: bool = ...,224    shape: None | _ShapeLike= ...,225) -> NDArray[Any]: ...226@overload227def count_nonzero(228    a: ArrayLike,229    axis: None = ...,230    *,231    keepdims: Literal[False] = ...,232) -> int: ......Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!
