Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 100.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 100new.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 10C.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 10new.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 2C.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 2Cstats.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 2stats.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 4C.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 4Cstats.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 5C.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 5Cstats.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 5new.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions CPUBound.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from hashlib import md5
from random import choice
import concurrent.futures


def generator(n):
while True:
s = "".join([choice("0123456789") for i in range(50)])
h = md5(s.encode('utf8')).hexdigest()
if h.endswith("00000"):
return s+","+h


def main():
with concurrent.futures.ProcessPoolExecutor(max_workers=10) as executor:
for coin in zip(executor.map(generator, range(3))):
print(coin)


if __name__ == '__main__':
main()
38 changes: 38 additions & 0 deletions RESULTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#IO-bound:
###Синхронно в 1 поток:
![](sync.jpg)
###5 воркеров:
![](5new.jpg)
![](m5.jpg)
###10 воркеров
![](10new.jpg)
![](m10.jpg)
###100 воркеров
![](100new.jpg)

Количество памяти и нагрузка на ЦП не изменяется практически совсем,
количество воркеров только немного отображается на загруженности сети. Трудно:
было поймать конкретные числа, так как они постоянно плавали, но примерные значения:
####5 воркеров: +-4Мбит/с
####10 воркеров: +-7Мбит/с
####100 воркеров: один раз прыгнуло до 120Мбит/с, но возможно я просто не увидел запятую :)
График нагруженности сети выглядит следующим образом:
![](set.jpg)


#CPU-Bound
###1 ядро для 3х монет:
![](syncC.jpg)
###2 ядра для 3х монет:
![](2stats.jpg)
![](2C.jpg)
###4 ядра для 3х монет:
![](4.jpg)
![](4C.jpg)


У моего процессора времен Петра 1 всего 2 ядра (intel i3-4330), поэтому существенная разница была
только у теста с 1 ядром и 2. Из-за того, что программа так или иначе зависила от рандома
(могла выполниться за 60000мс, а в следующий раз за 20000мс), то результаты отличались
с каждым выполнением даже без изменения воркеров.
Начиная с 4х воркеров, среднее время выполнения работы было идентично.
18 changes: 18 additions & 0 deletions getLinks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from urllib.request import urlopen
from urllib.parse import unquote
from bs4 import BeautifulSoup
from tqdm import tqdm

url = 'https://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:%D0%A1%D0%BB%D1%83%D1%87%D0%B0%D0%B9%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0'

res = open('res.txt', 'w', encoding='utf8')

for i in tqdm(range(100)):
html = urlopen(url).read().decode('utf8')
soup = BeautifulSoup(html, 'html.parser')
links = soup.find_all('a')

for l in links:
href = l.get('href')
if href and href.startswith('http') and 'wiki' not in href:
print(href, file=res)
23 changes: 23 additions & 0 deletions iobound.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import urllib.request
from urllib.request import Request, urlopen
from urllib.parse import unquote
import concurrent.futures

links = open('res.txt', encoding='utf8').read().split('\n')


def load_url(url, timeout):
with urllib.request.urlopen(url, timeout=timeout) as conn:
return conn.read()


with concurrent.futures.ThreadPoolExecutor(max_workers=100) as executor:
future_to_url = {executor.submit(load_url, url, 5): url for url in links}
for future in concurrent.futures.as_completed(future_to_url):
url = future_to_url[future]
try:
data = future.result()
except Exception as exc:
print(url, exc)
else:
print(200)
Binary file added m10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added m5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
106 changes: 106 additions & 0 deletions res.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
http://forum.guns.ru/forum_light_message/79/667112-m16465632.html
http://www.jasenovac-info.com/cd/biblioteka/pavelicpapers/artukovic/aa0006.html
http://web.archive.org/web/20110930080443/http://www.jasenovac-info.com/cd/biblioteka/pavelicpapers/artukovic/aa0006.html
http://www.jasenovac-info.com/cd/biblioteka/jasenovac1946/jasenovac-1946_en.html
http://web.archive.org/web/20111119215914/http://www.jasenovac-info.com/cd/biblioteka/jasenovac1946/jasenovac-1946_en.html
http://www.jasenovac-info.com/cd/biblioteka/wschindley-jasenovac_en.html
https://web.archive.org/web/20090501115807/http://www.jasenovac-info.com/cd/biblioteka/wschindley-jasenovac_en.html
http://public.carnet.hr/sakic/hinanews/arhiva/9904/hina-15-g.html
http://www.reformation.org/holoc5.html
https://creativecommons.org/licenses/by-sa/3.0/deed.ru
http://terskyi.ru/
https://rosstat.gov.ru/storage/mediabank/CcG8qBhP/mun_obr2020.rar
https://web.archive.org/web/20200822004543/https://rosstat.gov.ru/storage/mediabank/CcG8qBhP/mun_obr2020.rar
http://zakon.scli.ru/ru/legal_texts/all/index.php?do4=document&id4=57aeddd4-f67d-4c00-9a70-46a916c0eebe
http://publication.pravo.gov.ru/Document/View/2600202002030015
http://stavropol.news-city.info/docs/sistemsy/dok_oeyqqo.htm
http://archive.li/wM27p
http://stavrop.gks.ru/perepis/vpn2002/informaciya/Cis89_02.zip
http://www.webcitation.org/6VWEeLJjO
http://stavstat.gks.ru/wps/wcm/connect/rosstat_ts/stavstat/resources/637137804cdc73498baa8b49c24a3eb2/07_wpn_2010_cisl_mo_np.zip
http://www.webcitation.org/6XYoIx2h8
http://www.stavstat.ru/perepis/vpn2010/podgotovka_vpn2010/CisL_MO_WPN_01_01_2011.zip
http://stavrop.gks.ru/region_v_cifrah/demografiya/DocLib/Копия%20Копия%2007_MO_CisL_1_1_2012.xls
https://web.archive.org/web/20150112114219/http://stavrop.gks.ru/region_v_cifrah/demografiya/DocLib/Копия%20Копия%2007_MO_CisL_1_1_2012.xls
http://www.gks.ru/free_doc/doc_2013/bul_dr/mun_obr2013.rar
http://www.webcitation.org/6LAdCWSxH
http://stavstat.gks.ru/wps/wcm/connect/rosstat_ts/stavstat/resources/8c10d60043677e43a0dde174665da2b8/MO_chisl_na2014_za2013.xls
http://www.webcitation.org/6OWympuaO
http://www.gks.ru/free_doc/doc_2015/bul_dr/mun_obr2015.rar
http://www.webcitation.org/6aaNzOlFO
http://www.gks.ru/free_doc/doc_2016/bul_dr/mun_obr2016.rar
https://web.archive.org/web/20171010164656/http://www.gks.ru/free_doc/doc_2016/bul_dr/mun_obr2016.rar
http://www.gks.ru/free_doc/doc_2017/bul_dr/mun_obr2017.rar
http://web.archive.org/web/20170731141731/http://www.gks.ru/free_doc/doc_2017/bul_dr/mun_obr2017.rar
http://stavstat.gks.ru/wps/wcm/connect/rosstat_ts/stavstat/resources/806f830045393f6c84a3dec4d78fa45b/Численность+населения+по+муниципальным+образованиям+Ставропольского+края.rar
http://stavstat.gks.ru/wps/wcm/connect/rosstat_ts/stavstat/resources/806f830045393f6c84a3dec4d78fa45b/Численность+населения+на+01.01.2019+г.+и+в+среднем+за+2018+год.rar
http://stavstat.gks.ru/wps/wcm/connect/rosstat_ts/stavstat/resources/52f1a4804f47c390bed9ffe1000af5d8/Том+3+книга+1.rar
https://www.webcitation.org/6XYomlxa2?url=http://stavstat.gks.ru/wps/wcm/connect/rosstat_ts/stavstat/resources/52f1a4804f47c390bed9ffe1000af5d8/%D0%A2%D0%BE%D0%BC+3+%D0%BA%D0%BD%D0%B8%D0%B3%D0%B0+1.rar
http://budennovsk-rayon.ru/2011-12-07-09-37-55/orajone/chislennost-naseleniia
http://www.webcitation.org/6Upg96duc
https://www.ncfu.ru/export/uploads/Dokumenty-Obrazovanie/Gorodskie-i-sel_skie-naselennye-punkty-Stavropol_skogo-kraya-na-1-yanvarya-2021-goda-.pdf
https://stavregion.ru/_/cms_page_media/471/15012019.pdf
https://www.nytimes.com/2004/12/20/international/europe/20reykjavik.html?pagewanted=print&position=&_r=1&
https://www.government.is/news/article/2007/03/26/Iceland-Committed-to-Afghanistan/
http://www.isaf.nato.int/images/stories/File/Placemats/PLACEMAT.MARCH%2004..pdf
http://web.archive.org/web/20110406003726/http://www.isaf.nato.int/images/stories/File/Placemats/PLACEMAT.MARCH%2004..pdf
http://www.nato.int/isaf/docu/epub/pdf/placemat.pdf
http://www.isaf.nato.int/images/media/20140603_isaf-placemat-final.pdf
http://web.archive.org/web/20140714123657/http://www.isaf.nato.int/images/media/20140603_isaf-placemat-final.pdf
http://www.rs.nato.int/troop-numbers-and-contributions/index.php
https://archive.is/20150228192832/http://www.rs.nato.int/troop-numbers-and-contributions/index.php
https://www.unroca.org/united-kingdom/report/2015/
http://www.kompromat.lv/item.php?docid=readn&id=8844
http://www.shamir.lv/en/item/143-_.html
http://rus.delfi.lv/archive/article.php?id=6067989
http://www.kompromat.lv/item.php?docid=readn&id=8844
http://www.kompromat.lv/item.php?docid=readn&id=8851
http://www.ves.lv/article/121067
https://www.openstreetmap.org/?mlat=43.17833&mlon=141.30667&zoom=12
https://www.openstreetmap.org/?mlat=43.17833&mlon=141.30667&zoom=12
http://www.city.ishikari.hokkaido.jp/
https://books.google.ru/books?redir_esc=y&hl=ru&id=bocmAAAAMAAJ&focus=searchwithinvolume&q=%D0%98%D1%81%D0%B8%D0%BA%D0%B0%D1%80%D0%B8
http://www.gsi.go.jp/KOKUJYOHO/MENCHO-title.htm
http://www.gsi.go.jp/KOKUJYOHO/MENCHO/201110/opening.htm
http://www.pref.hokkaido.lg.jp/ss/tuk/900brr/index2.htm
https://web.archive.org/web/20060524091506/http://www.city.ishikari.hokkaido.jp/russian/index.htm
https://books.google.com.ua/books?id=uMMaAAAAYAAJ&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false
http://gajl.wielcy.pl/herby_nazwiska.php?lang=en&herb=lada4
http://emptylighthouse.com/young-turks-ana-kasparian-reveals-shes-secretly-been-married-november-241275271
http://www.theyoungturks.com/story/2007/10/26/124637/27/news/The-Young-Turks-From-an-Armenian-s-Perspective
https://web.archive.org/web/20120604092736/http://www.theyoungturks.com/story/2007/10/26/124637/27/news/The-Young-Turks-From-an-Armenian-s-Perspective
http://newmediarockstars.com/2012/07/young-turks-declare-independence-on-youtube-exclusive
https://www.youtube.com/watch?v=orc7YVkkR34&list=UU1yBKRuGpC1tSM73A0ZjYjQ&index=22
https://www.youtube.com/watch?v=72GOysAf2Ug
https://www.youtube.com/watch?v=UhXwi3LQr1w
http://www.lausd.net/Valley_Alternative_Magnet/alumni/2000_current/2004.htm
http://thelip.tv/the-other-side-of-the-news-with-ana-kasparian-of-the-young-turks
https://web.archive.org/web/20131021100038/http://thelip.tv/the-other-side-of-the-news-with-ana-kasparian-of-the-young-turks/
https://www.youtube.com/watch?v=AAW31zGSXGc
http://www.hollywoodreporter.com/news/miptv-online-video-gets-day-695032
https://www.youtube.com/watch?v=QZ18TY38OgY
http://csunshinetoday.csun.edu/csun-profiles/anti-establishment-truth-teller-kasparian-makes-forbes-30-under-30/
http://www.tytnetwork.com
http://simbad.u-strasbg.fr/simbad/sim-id?Ident=V*%20V404%20Aur
https://www.worldcat.org/issn/0004-6361
https://www.worldcat.org/issn/0365-0138
https://www.worldcat.org/issn/1432-0746
https://www.worldcat.org/issn/1286-4846
https://www.worldcat.org/issn/0001-5237
https://www.worldcat.org/issn/0004-6337
https://www.worldcat.org/issn/1521-3994
https://dx.doi.org/10.1002/ASNA.201311942
https://www.worldcat.org/issn/0004-6361
https://www.worldcat.org/issn/0365-0138
https://www.worldcat.org/issn/1432-0746
https://www.worldcat.org/issn/1286-4846
https://dx.doi.org/10.1051/0004-6361:20053137
http://webviz.u-strasbg.fr/viz-bin/VizieR-S?V*%20V404%20Aur
http://cdsarc.u-strasbg.fr/viz-bin/Cat?II/250
http://www.cnews.ru/reviews/free/marketBD/articles/articles2.shtml
http://www.cnews.ru/reviews/free/marketBD/articles/articles2.shtml
http://www.osp.ru/os/1999/11-12/177904/
https://archive.org/details/fundingrevolutio00nati
https://muse.jhu.edu/article/522037
http://www.oracle.com/us/corporate/profit/p27anniv-timeline-151918.pdf
http://www.warheroes.ru/hero/hero.asp?Hero_id=16420
Binary file added set.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sync.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added syncC.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.