BGA Siber Güvenlik Kış Kampı 2016 Notları
Linux Yaz Kampı 2016 - Ağ Güvenliği ve Sızma Testleri Notları
# 1 | |
def random_yuz_sayi(): | |
import random | |
a, b = [], [] | |
[(a if i % 2 == 0 else b).append(i) for i in random.sample(xrange(0, 500), 100)] | |
print("A listesindeki elemanlar toplami: %d" % (sum(a))) | |
print("B listesindeki elemanlar toplami: %d" % (sum(b))) | |
random_yuz_sayi() |
def gcd(a, b): | |
"""Calculate the Greatest Common Divisor of a and b. | |
Unless b==0, the result will have the same sign as b (so that when | |
b is divided by it, the result comes out positive). | |
""" | |
while b: | |
a, b = b, a%b | |
return a |
# Kod kismi | |
class StatisticalSummary(object): | |
def __init__(self, seq): | |
self.seq = seq | |
def five_figure_summary(self, precision=None): | |
return ("N", "extreme_lower", "extreme_upper", "lower_quartile", "median", "upper_quartile") | |
# Test kismi |
*** 1-100 | |
11 | |
22 | |
33 | |
44 | |
55 | |
66 | |
77 | |
88 |