Added first EVI 2018 files.

This commit is contained in:
2018-11-26 22:47:22 -04:00
parent 2b5fb28780
commit 64a907c835
21 changed files with 8159 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,132 @@
#####################
# Atomic data types #
#####################
a = 89 # Integer
b = 0.5 # Float
c = 9 + 0.4j # Complex
d = True # Boolean
e = None # Nonetype
########################
# Composite data types #
########################
f = [1, '2', 3] # List
g = (1, '2', 3) # Tuple
h = {1: 'one', # Dict
'two': 2,
3: 'Three'}
i = set([1, 2, 3]) # Set
j = frozenset(f) # Frozen set
######################
# Control structures #
######################
# If
if 1 < 2:
print("It's true!")
elif 2 < 1:
print("It's false!")
else:
print("It's neither!")
# For
for i in f:
print(i)
# While
while a > 80:
print(a)
a -= 1
########################
# Function definitions #
########################
# No arguments
def fun():
return 89
fun()
# Functions without a return statement return None
def non():
pass
print(non())
# Positional arguments
def sum(a, b):
return a + b
print(sum(1, 2))
# Keyword arguments
def divide(dividend = 1, divisor = 1):
return dividend / divisor # Unsafe!!
print(divide())
print(divide(divisor = 2))
print(divide(dividend = 4, divisor = 2))
print(divide(divisor = 4, dividend = 2))
# Both argument types
def xnp(x, n, p = 1):
# Keyword args MUST appear AFTER positional args!
return (x * n) + p
# Variable length arguments
def varargs(*args):
for a in args:
print("Argument " + str(args.index(a)) + " is " + str(a))
varargs(1)
varargs(2, 3)
varargs(4, 5, 6)
# Variable keyword arguments
def varkwargs(**kwargs):
for k in kwargs.keys():
print('Argument "' + str(k) + '" is "' + str(kwargs[k]))
varkwargs(a = 1, b = 2, c = 3)
# Everything!
def allargs(a, b, c = None, *args, **kwargs):
print("a is " + str(a))
print("b is " + str(b))
if c is None:
print("c is None")
else:
print("c is Some")
for a in args:
print("Argument " + str(args.index(a)) + " is " + str(a))
for k in kwargs.keys():
print('Argument "' + str(k) + '" is "' + str(kwargs[k]))
allargs('a', 1, None, 2, 3, 4, q = "Hail", w = "Caesar!")
allargs(1, 2, c = 89)
# Nested functions
def outer(x):
def inner(y):
return x + y
return inner(9)
print(outer(1))

View File

@@ -0,0 +1,33 @@
################
# Simple class #
################
class Class(object):
def __init__(self, a):
self.a = a
def method(self):
return self.a
o = Class(1)
print(o.method())
print(o.a) # !
####################
# With inheritance #
####################
class Subclass(Class):
def __init__(self, a, b):
super(Subclass, self).__init__(a)
self.b = b
def method(self):
return self.b
def sub_method(self):
return self.a
s = Subclass(1, 2)
print(s.method())
print(s.sub_method())

View File

@@ -0,0 +1 @@
{"info": {"Weight": 80, "Height": 1.72}, "Age": 27, "Name": "Miguel", "ID": 18810993}

View File

@@ -0,0 +1,36 @@
import sqlite3
# "Connect" to a database
conn = sqlite3.connect('example.db')
# Get a cursor to operate on the database
c = conn.cursor()
# Create table
c.execute('''CREATE TABLE stocks
(date text, trans text, symbol text, qty real, price real)''')
# Insert a row of data
c.execute("INSERT INTO stocks VALUES ('2006-01-05','BUY','RHAT',100,35.14)")
# Save (commit) the changes
conn.commit()
# Select
t = ('RHAT',)
c.execute('SELECT * FROM stocks WHERE symbol=?', t)
print(c.fetchone())
# Larger example that inserts many records at a time
purchases = [('2006-03-28', 'BUY', 'IBM', 1000, 45.00),
('2006-04-05', 'BUY', 'MSFT', 1000, 72.00),
('2006-04-06', 'SELL', 'IBM', 500, 53.00),
]
c.executemany('INSERT INTO stocks VALUES (?,?,?,?,?)', purchases)
for row in c.execute('SELECT * FROM stocks ORDER BY price'):
print(row)
# We can also close the connection if we are done with it.
# Just be sure any changes have been committed or they will be lost.
conn.close()

Binary file not shown.

View File

@@ -0,0 +1,28 @@
{
"firstName": "John",
"lastName": "Smith",
"isAlive": true,
"age": 25,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021-3100"
},
"phoneNumbers": [
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "office",
"number": "646 555-4567"
},
{
"type": "mobile",
"number": "123 456-7890"
}
],
"children": [],
"spouse": null
}

View File

@@ -0,0 +1,31 @@
################################
# Lambda (anonymous) functions #
################################
f = lambda x, y: x + y
print(f(1, 2))
print()
##########################
# Higher order functions #
##########################
# Map: Applies a function to many lists. Returns a generator.
for i in map(lambda x: x*x, [1, 2, 3, 4, 5, 6]):
print(i)
print()
for i in map(f, [1, 2, 3, 4, 5, 6], [2, 3, 4, 5, 6, 7]):
print(i)
print()
# Custom higher order function
def hof(function = lambda x: x, *args):
for a in args:
print(function(a))
hof(lambda s: s.upper(), "a", "b", "c")
print()
hof(lambda x: x is None, 1, ["a", "b"], None, {})

View File

@@ -0,0 +1,46 @@
####################
# Generator object #
####################
def simple_generator():
i = 0
while(i < 10):
yield i
i += 1
raise StopIteration
g = simple_generator()
for i in g:
print(i)
try:
print(next(g))
except StopIteration:
print("Generator exhausted!")
else:
print("Generator success!")
finally:
print("At the end!")
####################
# Collection class #
####################
class Collection(object):
def __init__(self):
self.c = []
def add(self, x):
self.c.append(x)
def __iter__(self):
for i in self.c:
yield i
c = Collection()
c.add(1)
c.add(2)
c.add(3)
for i in c:
print(i)

View File

@@ -0,0 +1,9 @@
import urllib2
# Create an HTTP request.
request = urllib2.Request("http://www.concisa.net.ve/2016/evi-2016-tutoriales/")
# Perform the request.
response = urllib2.urlopen(request)
# Get the response data.
document = response.read()
print(document)

View File

@@ -0,0 +1,8 @@
from http.server import HTTPServer, SimpleHTTPRequestHandler
def run(server_class = HTTPServer, handler_class = SimpleHTTPRequestHandler):
server_address = ('127.0.0.1', 8000)
httpd = server_class(server_address, handler_class)
httpd.serve_forever()
run()

View File

@@ -0,0 +1,16 @@
import json
data = {"Name": "Miguel",
"Age": 27,
"ID": 18810993,
"info" : {"Height": 1.72,
"Weight": 80
}
}
with open("data.json", "w") as f:
f.write(json.dumps(data))
with open("example.json") as f:
j = json.loads(f.read())
print(j["isAlive"])

View File

@@ -0,0 +1,60 @@
a = [1, 2, 3, 4, 5, 6, 7, 8, 9]
#################
# List indexing #
#################
# Classical position indexing
i = 0
while i < len(a):
print(a[i])
i += 1
# Negative indices
print(a[-1])
print(a[-2])
print(a[-3])
################
# List slicing #
################
# Elements between indices 3 and 7
print(a[3:7])
# Elements from index 5 onwards
print(a[5:])
# Elements from the start up to index 8
print(a[:8])
#######################
# List comprehensions #
#######################
# The first 10 square natural numbers
l = [x * x for x in range(1, 10)]
print(l)
# The first even square natural numbers
l = [x * x for x in range(1, 10) if (x * x) % 2 == 0]
print(l)
# Some numbers from the first list
l = [x for x in a if x > 2 and x < 7]
print(l)
#######
# zip #
#######
l = zip([1, 2, 3, 4], ["a", "b", "c"], ["Hello", ",", "World", "!"])
print(l)

View File

@@ -0,0 +1,16 @@
import random as r
def qsort(l):
if len(l) == 0:
return []
elif len(l) == 1:
return l
else:
less = qsort([x for x in l[1:] if x <= l[0]])
more = qsort([x for x in l[1:] if x > l[0]])
return less + [l[0]] + more
a = [r.randint(0, 100) for x in xrange(100)]
b = qsort(a)
print a
print b

1533
EVI - 2018/EVI 04/Modulo1.ipynb Executable file

File diff suppressed because one or more lines are too long

3170
EVI - 2018/EVI 04/Modulo2.ipynb Executable file

File diff suppressed because one or more lines are too long

2885
EVI - 2018/EVI 04/Modulo3.ipynb Executable file

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -0,0 +1,5 @@
Nombre,Departamento,Mes de Cumpleaños
Adelis Nieves, Matemáticas, Junio
Miguel Astor, Redes, Septiembre
Francisco Sans, Computación Gráfica, Diciembre
Antonio Escalante, Letras, Diciembre

Binary file not shown.

149
EVI - 2018/EVI 04/olympics.csv Executable file
View File

@@ -0,0 +1,149 @@
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
,№ Summer,01 !,02 !,03 !,Total,№ Winter,01 !,02 !,03 !,Total,№ Games,01 !,02 !,03 !,Combined total
Afghanistan (AFG),13,0,0,2,2,0,0,0,0,0,13,0,0,2,2
Algeria (ALG),12,5,2,8,15,3,0,0,0,0,15,5,2,8,15
Argentina (ARG),23,18,24,28,70,18,0,0,0,0,41,18,24,28,70
Armenia (ARM),5,1,2,9,12,6,0,0,0,0,11,1,2,9,12
Australasia (ANZ) [ANZ],2,3,4,5,12,0,0,0,0,0,2,3,4,5,12
Australia (AUS) [AUS] [Z],25,139,152,177,468,18,5,3,4,12,43,144,155,181,480
Austria (AUT),26,18,33,35,86,22,59,78,81,218,48,77,111,116,304
Azerbaijan (AZE),5,6,5,15,26,5,0,0,0,0,10,6,5,15,26
Bahamas (BAH),15,5,2,5,12,0,0,0,0,0,15,5,2,5,12
Bahrain (BRN),8,0,0,1,1,0,0,0,0,0,8,0,0,1,1
Barbados (BAR) [BAR],11,0,0,1,1,0,0,0,0,0,11,0,0,1,1
Belarus (BLR),5,12,24,39,75,6,6,4,5,15,11,18,28,44,90
Belgium (BEL),25,37,52,53,142,20,1,1,3,5,45,38,53,56,147
Bermuda (BER),17,0,0,1,1,7,0,0,0,0,24,0,0,1,1
Bohemia (BOH) [BOH] [Z],3,0,1,3,4,0,0,0,0,0,3,0,1,3,4
Botswana (BOT),9,0,1,0,1,0,0,0,0,0,9,0,1,0,1
Brazil (BRA),21,23,30,55,108,7,0,0,0,0,28,23,30,55,108
British West Indies (BWI) [BWI],1,0,0,2,2,0,0,0,0,0,1,0,0,2,2
Bulgaria (BUL) [H],19,51,85,78,214,19,1,2,3,6,38,52,87,81,220
Burundi (BDI),5,1,0,0,1,0,0,0,0,0,5,1,0,0,1
Cameroon (CMR),13,3,1,1,5,1,0,0,0,0,14,3,1,1,5
Canada (CAN),25,59,99,121,279,22,62,56,52,170,47,121,155,173,449
Chile (CHI) [I],22,2,7,4,13,16,0,0,0,0,38,2,7,4,13
China (CHN) [CHN],9,201,146,126,473,10,12,22,19,53,19,213,168,145,526
Colombia (COL),18,2,6,11,19,1,0,0,0,0,19,2,6,11,19
Costa Rica (CRC),14,1,1,2,4,6,0,0,0,0,20,1,1,2,4
Ivory Coast (CIV) [CIV],12,0,1,0,1,0,0,0,0,0,12,0,1,0,1
Croatia (CRO),6,6,7,10,23,7,4,6,1,11,13,10,13,11,34
Cuba (CUB) [Z],19,72,67,70,209,0,0,0,0,0,19,72,67,70,209
Cyprus (CYP),9,0,1,0,1,10,0,0,0,0,19,0,1,0,1
Czech Republic (CZE) [CZE],5,14,15,15,44,6,7,9,8,24,11,21,24,23,68
Czechoslovakia (TCH) [TCH],16,49,49,45,143,16,2,8,15,25,32,51,57,60,168
Denmark (DEN) [Z],26,43,68,68,179,13,0,1,0,1,39,43,69,68,180
Djibouti (DJI) [B],7,0,0,1,1,0,0,0,0,0,7,0,0,1,1
Dominican Republic (DOM),13,3,2,1,6,0,0,0,0,0,13,3,2,1,6
Ecuador (ECU),13,1,1,0,2,0,0,0,0,0,13,1,1,0,2
Egypt (EGY) [EGY] [Z],21,7,9,10,26,1,0,0,0,0,22,7,9,10,26
Eritrea (ERI),4,0,0,1,1,0,0,0,0,0,4,0,0,1,1
Estonia (EST),11,9,9,15,33,9,4,2,1,7,20,13,11,16,40
Ethiopia (ETH),12,21,7,17,45,2,0,0,0,0,14,21,7,17,45
Finland (FIN),24,101,84,117,302,22,42,62,57,161,46,143,146,174,463
France (FRA) [O] [P] [Z],27,202,223,246,671,22,31,31,47,109,49,233,254,293,780
Gabon (GAB),9,0,1,0,1,0,0,0,0,0,9,0,1,0,1
Georgia (GEO),5,6,5,14,25,6,0,0,0,0,11,6,5,14,25
Germany (GER) [GER] [Z],15,174,182,217,573,11,78,78,53,209,26,252,260,270,782
United Team of Germany (EUA) [EUA],3,28,54,36,118,3,8,6,5,19,6,36,60,41,137
East Germany (GDR) [GDR],5,153,129,127,409,6,39,36,35,110,11,192,165,162,519
West Germany (FRG) [FRG],5,56,67,81,204,6,11,15,13,39,11,67,82,94,243
Ghana (GHA) [GHA],13,0,1,3,4,1,0,0,0,0,14,0,1,3,4
Great Britain (GBR) [GBR] [Z],27,236,272,272,780,22,10,4,12,26,49,246,276,284,806
Greece (GRE) [Z],27,30,42,39,111,18,0,0,0,0,45,30,42,39,111
Grenada (GRN),8,1,0,0,1,0,0,0,0,0,8,1,0,0,1
Guatemala (GUA),13,0,1,0,1,1,0,0,0,0,14,0,1,0,1
Guyana (GUY) [GUY],16,0,0,1,1,0,0,0,0,0,16,0,0,1,1
Haiti (HAI) [J],14,0,1,1,2,0,0,0,0,0,14,0,1,1,2
Hong Kong (HKG) [HKG],15,1,1,1,3,4,0,0,0,0,19,1,1,1,3
Hungary (HUN),25,167,144,165,476,22,0,2,4,6,47,167,146,169,482
Iceland (ISL),19,0,2,2,4,17,0,0,0,0,36,0,2,2,4
India (IND) [F],23,9,6,11,26,9,0,0,0,0,32,9,6,11,26
Indonesia (INA),14,6,10,11,27,0,0,0,0,0,14,6,10,11,27
Iran (IRI) [K],15,15,20,25,60,10,0,0,0,0,25,15,20,25,60
Iraq (IRQ),13,0,0,1,1,0,0,0,0,0,13,0,0,1,1
Ireland (IRL),20,9,8,12,29,6,0,0,0,0,26,9,8,12,29
Israel (ISR),15,1,1,5,7,6,0,0,0,0,21,1,1,5,7
Italy (ITA) [M] [S],26,198,166,185,549,22,37,34,43,114,48,235,200,228,663
Jamaica (JAM) [JAM],16,17,30,20,67,7,0,0,0,0,23,17,30,20,67
Japan (JPN),21,130,126,142,398,20,10,17,18,45,41,140,143,160,443
Kazakhstan (KAZ),5,16,17,19,52,6,1,3,3,7,11,17,20,22,59
Kenya (KEN),13,25,32,29,86,3,0,0,0,0,16,25,32,29,86
North Korea (PRK),9,14,12,21,47,8,0,1,1,2,17,14,13,22,49
South Korea (KOR),16,81,82,80,243,17,26,17,10,53,33,107,99,90,296
Kuwait (KUW),12,0,0,2,2,0,0,0,0,0,12,0,0,2,2
Kyrgyzstan (KGZ),5,0,1,2,3,6,0,0,0,0,11,0,1,2,3
Latvia (LAT),10,3,11,5,19,10,0,4,3,7,20,3,15,8,26
Lebanon (LIB),16,0,2,2,4,16,0,0,0,0,32,0,2,2,4
Liechtenstein (LIE),16,0,0,0,0,18,2,2,5,9,34,2,2,5,9
Lithuania (LTU),8,6,5,10,21,8,0,0,0,0,16,6,5,10,21
Luxembourg (LUX) [O],22,1,1,0,2,8,0,2,0,2,30,1,3,0,4
Macedonia (MKD),5,0,0,1,1,5,0,0,0,0,10,0,0,1,1
Malaysia (MAS) [MAS],12,0,3,3,6,0,0,0,0,0,12,0,3,3,6
Mauritius (MRI),8,0,0,1,1,0,0,0,0,0,8,0,0,1,1
Mexico (MEX),22,13,21,28,62,8,0,0,0,0,30,13,21,28,62
Moldova (MDA),5,0,2,5,7,6,0,0,0,0,11,0,2,5,7
Mongolia (MGL),12,2,9,13,24,13,0,0,0,0,25,2,9,13,24
Montenegro (MNE),2,0,1,0,1,2,0,0,0,0,4,0,1,0,1
Morocco (MAR),13,6,5,11,22,6,0,0,0,0,19,6,5,11,22
Mozambique (MOZ),9,1,0,1,2,0,0,0,0,0,9,1,0,1,2
Namibia (NAM),6,0,4,0,4,0,0,0,0,0,6,0,4,0,4
Netherlands (NED) [Z],25,77,85,104,266,20,37,38,35,110,45,114,123,139,376
Netherlands Antilles (AHO) [AHO] [I],13,0,1,0,1,2,0,0,0,0,15,0,1,0,1
New Zealand (NZL) [NZL],22,42,18,39,99,15,0,1,0,1,37,42,19,39,100
Niger (NIG),11,0,0,1,1,0,0,0,0,0,11,0,0,1,1
Nigeria (NGR),15,3,8,12,23,0,0,0,0,0,15,3,8,12,23
Norway (NOR) [Q],24,56,49,43,148,22,118,111,100,329,46,174,160,143,477
Pakistan (PAK),16,3,3,4,10,2,0,0,0,0,18,3,3,4,10
Panama (PAN),16,1,0,2,3,0,0,0,0,0,16,1,0,2,3
Paraguay (PAR),11,0,1,0,1,1,0,0,0,0,12,0,1,0,1
Peru (PER) [L],17,1,3,0,4,2,0,0,0,0,19,1,3,0,4
Philippines (PHI),20,0,2,7,9,4,0,0,0,0,24,0,2,7,9
Poland (POL),20,64,82,125,271,22,6,7,7,20,42,70,89,132,291
Portugal (POR),23,4,8,11,23,7,0,0,0,0,30,4,8,11,23
Puerto Rico (PUR),17,0,2,6,8,6,0,0,0,0,23,0,2,6,8
Qatar (QAT),8,0,0,4,4,0,0,0,0,0,8,0,0,4,4
Romania (ROU),20,88,94,119,301,20,0,0,1,1,40,88,94,120,302
Russia (RUS) [RUS],5,132,121,142,395,6,49,40,35,124,11,181,161,177,519
Russian Empire (RU1) [RU1],3,1,4,3,8,0,0,0,0,0,3,1,4,3,8
Soviet Union (URS) [URS],9,395,319,296,1010,9,78,57,59,194,18,473,376,355,1204
Unified Team (EUN) [EUN],1,45,38,29,112,1,9,6,8,23,2,54,44,37,135
Saudi Arabia (KSA),10,0,1,2,3,0,0,0,0,0,10,0,1,2,3
Senegal (SEN),13,0,1,0,1,5,0,0,0,0,18,0,1,0,1
Serbia (SRB) [SRB],3,1,2,4,7,2,0,0,0,0,5,1,2,4,7
Serbia and Montenegro (SCG) [SCG],3,2,4,3,9,3,0,0,0,0,6,2,4,3,9
Singapore (SIN),15,0,2,2,4,0,0,0,0,0,15,0,2,2,4
Slovakia (SVK) [SVK],5,7,9,8,24,6,2,2,1,5,11,9,11,9,29
Slovenia (SLO),6,4,6,9,19,7,2,4,9,15,13,6,10,18,34
South Africa (RSA),18,23,26,27,76,6,0,0,0,0,24,23,26,27,76
Spain (ESP) [Z],22,37,59,35,131,19,1,0,1,2,41,38,59,36,133
Sri Lanka (SRI) [SRI],16,0,2,0,2,0,0,0,0,0,16,0,2,0,2
Sudan (SUD),11,0,1,0,1,0,0,0,0,0,11,0,1,0,1
Suriname (SUR) [E],11,1,0,1,2,0,0,0,0,0,11,1,0,1,2
Sweden (SWE) [Z],26,143,164,176,483,22,50,40,54,144,48,193,204,230,627
Switzerland (SUI),27,47,73,65,185,22,50,40,48,138,49,97,113,113,323
Syria (SYR),12,1,1,1,3,0,0,0,0,0,12,1,1,1,3
Chinese Taipei (TPE) [TPE] [TPE2],13,2,7,12,21,11,0,0,0,0,24,2,7,12,21
Tajikistan (TJK),5,0,1,2,3,4,0,0,0,0,9,0,1,2,3
Tanzania (TAN) [TAN],12,0,2,0,2,0,0,0,0,0,12,0,2,0,2
Thailand (THA),15,7,6,11,24,3,0,0,0,0,18,7,6,11,24
Togo (TOG),9,0,0,1,1,1,0,0,0,0,10,0,0,1,1
Tonga (TGA),8,0,1,0,1,1,0,0,0,0,9,0,1,0,1
Trinidad and Tobago (TRI) [TRI],16,2,5,11,18,3,0,0,0,0,19,2,5,11,18
Tunisia (TUN),13,3,3,4,10,0,0,0,0,0,13,3,3,4,10
Turkey (TUR),21,39,25,24,88,16,0,0,0,0,37,39,25,24,88
Uganda (UGA),14,2,3,2,7,0,0,0,0,0,14,2,3,2,7
Ukraine (UKR),5,33,27,55,115,6,2,1,4,7,11,35,28,59,122
United Arab Emirates (UAE),8,1,0,0,1,0,0,0,0,0,8,1,0,0,1
United States (USA) [P] [Q] [R] [Z],26,976,757,666,2399,22,96,102,84,282,48,1072,859,750,2681
Uruguay (URU),20,2,2,6,10,1,0,0,0,0,21,2,2,6,10
Uzbekistan (UZB),5,5,5,10,20,6,1,0,0,1,11,6,5,10,21
Venezuela (VEN),17,2,2,8,12,4,0,0,0,0,21,2,2,8,12
Vietnam (VIE),14,0,2,0,2,0,0,0,0,0,14,0,2,0,2
Virgin Islands (ISV),11,0,1,0,1,7,0,0,0,0,18,0,1,0,1
Yugoslavia (YUG) [YUG],16,26,29,28,83,14,0,3,1,4,30,26,32,29,87
Independent Olympic Participants (IOP) [IOP],1,0,1,2,3,0,0,0,0,0,1,0,1,2,3
Zambia (ZAM) [ZAM],12,0,1,1,2,0,0,0,0,0,12,0,1,1,2
Zimbabwe (ZIM) [ZIM],12,3,4,1,8,1,0,0,0,0,13,3,4,1,8
Mixed team (ZZX) [ZZX],3,8,5,4,17,0,0,0,0,0,3,8,5,4,17
Totals,27,4809,4775,5130,14714,22,959,958,948,2865,49,5768,5733,6078,17579
1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
2 № Summer 01 ! 02 ! 03 ! Total № Winter 01 ! 02 ! 03 ! Total № Games 01 ! 02 ! 03 ! Combined total
3 Afghanistan (AFG) 13 0 0 2 2 0 0 0 0 0 13 0 0 2 2
4 Algeria (ALG) 12 5 2 8 15 3 0 0 0 0 15 5 2 8 15
5 Argentina (ARG) 23 18 24 28 70 18 0 0 0 0 41 18 24 28 70
6 Armenia (ARM) 5 1 2 9 12 6 0 0 0 0 11 1 2 9 12
7 Australasia (ANZ) [ANZ] 2 3 4 5 12 0 0 0 0 0 2 3 4 5 12
8 Australia (AUS) [AUS] [Z] 25 139 152 177 468 18 5 3 4 12 43 144 155 181 480
9 Austria (AUT) 26 18 33 35 86 22 59 78 81 218 48 77 111 116 304
10 Azerbaijan (AZE) 5 6 5 15 26 5 0 0 0 0 10 6 5 15 26
11 Bahamas (BAH) 15 5 2 5 12 0 0 0 0 0 15 5 2 5 12
12 Bahrain (BRN) 8 0 0 1 1 0 0 0 0 0 8 0 0 1 1
13 Barbados (BAR) [BAR] 11 0 0 1 1 0 0 0 0 0 11 0 0 1 1
14 Belarus (BLR) 5 12 24 39 75 6 6 4 5 15 11 18 28 44 90
15 Belgium (BEL) 25 37 52 53 142 20 1 1 3 5 45 38 53 56 147
16 Bermuda (BER) 17 0 0 1 1 7 0 0 0 0 24 0 0 1 1
17 Bohemia (BOH) [BOH] [Z] 3 0 1 3 4 0 0 0 0 0 3 0 1 3 4
18 Botswana (BOT) 9 0 1 0 1 0 0 0 0 0 9 0 1 0 1
19 Brazil (BRA) 21 23 30 55 108 7 0 0 0 0 28 23 30 55 108
20 British West Indies (BWI) [BWI] 1 0 0 2 2 0 0 0 0 0 1 0 0 2 2
21 Bulgaria (BUL) [H] 19 51 85 78 214 19 1 2 3 6 38 52 87 81 220
22 Burundi (BDI) 5 1 0 0 1 0 0 0 0 0 5 1 0 0 1
23 Cameroon (CMR) 13 3 1 1 5 1 0 0 0 0 14 3 1 1 5
24 Canada (CAN) 25 59 99 121 279 22 62 56 52 170 47 121 155 173 449
25 Chile (CHI) [I] 22 2 7 4 13 16 0 0 0 0 38 2 7 4 13
26 China (CHN) [CHN] 9 201 146 126 473 10 12 22 19 53 19 213 168 145 526
27 Colombia (COL) 18 2 6 11 19 1 0 0 0 0 19 2 6 11 19
28 Costa Rica (CRC) 14 1 1 2 4 6 0 0 0 0 20 1 1 2 4
29 Ivory Coast (CIV) [CIV] 12 0 1 0 1 0 0 0 0 0 12 0 1 0 1
30 Croatia (CRO) 6 6 7 10 23 7 4 6 1 11 13 10 13 11 34
31 Cuba (CUB) [Z] 19 72 67 70 209 0 0 0 0 0 19 72 67 70 209
32 Cyprus (CYP) 9 0 1 0 1 10 0 0 0 0 19 0 1 0 1
33 Czech Republic (CZE) [CZE] 5 14 15 15 44 6 7 9 8 24 11 21 24 23 68
34 Czechoslovakia (TCH) [TCH] 16 49 49 45 143 16 2 8 15 25 32 51 57 60 168
35 Denmark (DEN) [Z] 26 43 68 68 179 13 0 1 0 1 39 43 69 68 180
36 Djibouti (DJI) [B] 7 0 0 1 1 0 0 0 0 0 7 0 0 1 1
37 Dominican Republic (DOM) 13 3 2 1 6 0 0 0 0 0 13 3 2 1 6
38 Ecuador (ECU) 13 1 1 0 2 0 0 0 0 0 13 1 1 0 2
39 Egypt (EGY) [EGY] [Z] 21 7 9 10 26 1 0 0 0 0 22 7 9 10 26
40 Eritrea (ERI) 4 0 0 1 1 0 0 0 0 0 4 0 0 1 1
41 Estonia (EST) 11 9 9 15 33 9 4 2 1 7 20 13 11 16 40
42 Ethiopia (ETH) 12 21 7 17 45 2 0 0 0 0 14 21 7 17 45
43 Finland (FIN) 24 101 84 117 302 22 42 62 57 161 46 143 146 174 463
44 France (FRA) [O] [P] [Z] 27 202 223 246 671 22 31 31 47 109 49 233 254 293 780
45 Gabon (GAB) 9 0 1 0 1 0 0 0 0 0 9 0 1 0 1
46 Georgia (GEO) 5 6 5 14 25 6 0 0 0 0 11 6 5 14 25
47 Germany (GER) [GER] [Z] 15 174 182 217 573 11 78 78 53 209 26 252 260 270 782
48 United Team of Germany (EUA) [EUA] 3 28 54 36 118 3 8 6 5 19 6 36 60 41 137
49 East Germany (GDR) [GDR] 5 153 129 127 409 6 39 36 35 110 11 192 165 162 519
50 West Germany (FRG) [FRG] 5 56 67 81 204 6 11 15 13 39 11 67 82 94 243
51 Ghana (GHA) [GHA] 13 0 1 3 4 1 0 0 0 0 14 0 1 3 4
52 Great Britain (GBR) [GBR] [Z] 27 236 272 272 780 22 10 4 12 26 49 246 276 284 806
53 Greece (GRE) [Z] 27 30 42 39 111 18 0 0 0 0 45 30 42 39 111
54 Grenada (GRN) 8 1 0 0 1 0 0 0 0 0 8 1 0 0 1
55 Guatemala (GUA) 13 0 1 0 1 1 0 0 0 0 14 0 1 0 1
56 Guyana (GUY) [GUY] 16 0 0 1 1 0 0 0 0 0 16 0 0 1 1
57 Haiti (HAI) [J] 14 0 1 1 2 0 0 0 0 0 14 0 1 1 2
58 Hong Kong (HKG) [HKG] 15 1 1 1 3 4 0 0 0 0 19 1 1 1 3
59 Hungary (HUN) 25 167 144 165 476 22 0 2 4 6 47 167 146 169 482
60 Iceland (ISL) 19 0 2 2 4 17 0 0 0 0 36 0 2 2 4
61 India (IND) [F] 23 9 6 11 26 9 0 0 0 0 32 9 6 11 26
62 Indonesia (INA) 14 6 10 11 27 0 0 0 0 0 14 6 10 11 27
63 Iran (IRI) [K] 15 15 20 25 60 10 0 0 0 0 25 15 20 25 60
64 Iraq (IRQ) 13 0 0 1 1 0 0 0 0 0 13 0 0 1 1
65 Ireland (IRL) 20 9 8 12 29 6 0 0 0 0 26 9 8 12 29
66 Israel (ISR) 15 1 1 5 7 6 0 0 0 0 21 1 1 5 7
67 Italy (ITA) [M] [S] 26 198 166 185 549 22 37 34 43 114 48 235 200 228 663
68 Jamaica (JAM) [JAM] 16 17 30 20 67 7 0 0 0 0 23 17 30 20 67
69 Japan (JPN) 21 130 126 142 398 20 10 17 18 45 41 140 143 160 443
70 Kazakhstan (KAZ) 5 16 17 19 52 6 1 3 3 7 11 17 20 22 59
71 Kenya (KEN) 13 25 32 29 86 3 0 0 0 0 16 25 32 29 86
72 North Korea (PRK) 9 14 12 21 47 8 0 1 1 2 17 14 13 22 49
73 South Korea (KOR) 16 81 82 80 243 17 26 17 10 53 33 107 99 90 296
74 Kuwait (KUW) 12 0 0 2 2 0 0 0 0 0 12 0 0 2 2
75 Kyrgyzstan (KGZ) 5 0 1 2 3 6 0 0 0 0 11 0 1 2 3
76 Latvia (LAT) 10 3 11 5 19 10 0 4 3 7 20 3 15 8 26
77 Lebanon (LIB) 16 0 2 2 4 16 0 0 0 0 32 0 2 2 4
78 Liechtenstein (LIE) 16 0 0 0 0 18 2 2 5 9 34 2 2 5 9
79 Lithuania (LTU) 8 6 5 10 21 8 0 0 0 0 16 6 5 10 21
80 Luxembourg (LUX) [O] 22 1 1 0 2 8 0 2 0 2 30 1 3 0 4
81 Macedonia (MKD) 5 0 0 1 1 5 0 0 0 0 10 0 0 1 1
82 Malaysia (MAS) [MAS] 12 0 3 3 6 0 0 0 0 0 12 0 3 3 6
83 Mauritius (MRI) 8 0 0 1 1 0 0 0 0 0 8 0 0 1 1
84 Mexico (MEX) 22 13 21 28 62 8 0 0 0 0 30 13 21 28 62
85 Moldova (MDA) 5 0 2 5 7 6 0 0 0 0 11 0 2 5 7
86 Mongolia (MGL) 12 2 9 13 24 13 0 0 0 0 25 2 9 13 24
87 Montenegro (MNE) 2 0 1 0 1 2 0 0 0 0 4 0 1 0 1
88 Morocco (MAR) 13 6 5 11 22 6 0 0 0 0 19 6 5 11 22
89 Mozambique (MOZ) 9 1 0 1 2 0 0 0 0 0 9 1 0 1 2
90 Namibia (NAM) 6 0 4 0 4 0 0 0 0 0 6 0 4 0 4
91 Netherlands (NED) [Z] 25 77 85 104 266 20 37 38 35 110 45 114 123 139 376
92 Netherlands Antilles (AHO) [AHO] [I] 13 0 1 0 1 2 0 0 0 0 15 0 1 0 1
93 New Zealand (NZL) [NZL] 22 42 18 39 99 15 0 1 0 1 37 42 19 39 100
94 Niger (NIG) 11 0 0 1 1 0 0 0 0 0 11 0 0 1 1
95 Nigeria (NGR) 15 3 8 12 23 0 0 0 0 0 15 3 8 12 23
96 Norway (NOR) [Q] 24 56 49 43 148 22 118 111 100 329 46 174 160 143 477
97 Pakistan (PAK) 16 3 3 4 10 2 0 0 0 0 18 3 3 4 10
98 Panama (PAN) 16 1 0 2 3 0 0 0 0 0 16 1 0 2 3
99 Paraguay (PAR) 11 0 1 0 1 1 0 0 0 0 12 0 1 0 1
100 Peru (PER) [L] 17 1 3 0 4 2 0 0 0 0 19 1 3 0 4
101 Philippines (PHI) 20 0 2 7 9 4 0 0 0 0 24 0 2 7 9
102 Poland (POL) 20 64 82 125 271 22 6 7 7 20 42 70 89 132 291
103 Portugal (POR) 23 4 8 11 23 7 0 0 0 0 30 4 8 11 23
104 Puerto Rico (PUR) 17 0 2 6 8 6 0 0 0 0 23 0 2 6 8
105 Qatar (QAT) 8 0 0 4 4 0 0 0 0 0 8 0 0 4 4
106 Romania (ROU) 20 88 94 119 301 20 0 0 1 1 40 88 94 120 302
107 Russia (RUS) [RUS] 5 132 121 142 395 6 49 40 35 124 11 181 161 177 519
108 Russian Empire (RU1) [RU1] 3 1 4 3 8 0 0 0 0 0 3 1 4 3 8
109 Soviet Union (URS) [URS] 9 395 319 296 1010 9 78 57 59 194 18 473 376 355 1204
110 Unified Team (EUN) [EUN] 1 45 38 29 112 1 9 6 8 23 2 54 44 37 135
111 Saudi Arabia (KSA) 10 0 1 2 3 0 0 0 0 0 10 0 1 2 3
112 Senegal (SEN) 13 0 1 0 1 5 0 0 0 0 18 0 1 0 1
113 Serbia (SRB) [SRB] 3 1 2 4 7 2 0 0 0 0 5 1 2 4 7
114 Serbia and Montenegro (SCG) [SCG] 3 2 4 3 9 3 0 0 0 0 6 2 4 3 9
115 Singapore (SIN) 15 0 2 2 4 0 0 0 0 0 15 0 2 2 4
116 Slovakia (SVK) [SVK] 5 7 9 8 24 6 2 2 1 5 11 9 11 9 29
117 Slovenia (SLO) 6 4 6 9 19 7 2 4 9 15 13 6 10 18 34
118 South Africa (RSA) 18 23 26 27 76 6 0 0 0 0 24 23 26 27 76
119 Spain (ESP) [Z] 22 37 59 35 131 19 1 0 1 2 41 38 59 36 133
120 Sri Lanka (SRI) [SRI] 16 0 2 0 2 0 0 0 0 0 16 0 2 0 2
121 Sudan (SUD) 11 0 1 0 1 0 0 0 0 0 11 0 1 0 1
122 Suriname (SUR) [E] 11 1 0 1 2 0 0 0 0 0 11 1 0 1 2
123 Sweden (SWE) [Z] 26 143 164 176 483 22 50 40 54 144 48 193 204 230 627
124 Switzerland (SUI) 27 47 73 65 185 22 50 40 48 138 49 97 113 113 323
125 Syria (SYR) 12 1 1 1 3 0 0 0 0 0 12 1 1 1 3
126 Chinese Taipei (TPE) [TPE] [TPE2] 13 2 7 12 21 11 0 0 0 0 24 2 7 12 21
127 Tajikistan (TJK) 5 0 1 2 3 4 0 0 0 0 9 0 1 2 3
128 Tanzania (TAN) [TAN] 12 0 2 0 2 0 0 0 0 0 12 0 2 0 2
129 Thailand (THA) 15 7 6 11 24 3 0 0 0 0 18 7 6 11 24
130 Togo (TOG) 9 0 0 1 1 1 0 0 0 0 10 0 0 1 1
131 Tonga (TGA) 8 0 1 0 1 1 0 0 0 0 9 0 1 0 1
132 Trinidad and Tobago (TRI) [TRI] 16 2 5 11 18 3 0 0 0 0 19 2 5 11 18
133 Tunisia (TUN) 13 3 3 4 10 0 0 0 0 0 13 3 3 4 10
134 Turkey (TUR) 21 39 25 24 88 16 0 0 0 0 37 39 25 24 88
135 Uganda (UGA) 14 2 3 2 7 0 0 0 0 0 14 2 3 2 7
136 Ukraine (UKR) 5 33 27 55 115 6 2 1 4 7 11 35 28 59 122
137 United Arab Emirates (UAE) 8 1 0 0 1 0 0 0 0 0 8 1 0 0 1
138 United States (USA) [P] [Q] [R] [Z] 26 976 757 666 2399 22 96 102 84 282 48 1072 859 750 2681
139 Uruguay (URU) 20 2 2 6 10 1 0 0 0 0 21 2 2 6 10
140 Uzbekistan (UZB) 5 5 5 10 20 6 1 0 0 1 11 6 5 10 21
141 Venezuela (VEN) 17 2 2 8 12 4 0 0 0 0 21 2 2 8 12
142 Vietnam (VIE) 14 0 2 0 2 0 0 0 0 0 14 0 2 0 2
143 Virgin Islands (ISV) 11 0 1 0 1 7 0 0 0 0 18 0 1 0 1
144 Yugoslavia (YUG) [YUG] 16 26 29 28 83 14 0 3 1 4 30 26 32 29 87
145 Independent Olympic Participants (IOP) [IOP] 1 0 1 2 3 0 0 0 0 0 1 0 1 2 3
146 Zambia (ZAM) [ZAM] 12 0 1 1 2 0 0 0 0 0 12 0 1 1 2
147 Zimbabwe (ZIM) [ZIM] 12 3 4 1 8 1 0 0 0 0 13 3 4 1 8
148 Mixed team (ZZX) [ZZX] 3 8 5 4 17 0 0 0 0 0 3 8 5 4 17
149 Totals 27 4809 4775 5130 14714 22 959 958 948 2865 49 5768 5733 6078 17579