hojzas commited on
Commit
e246548
1 Parent(s): a6ab2b9

Upload proj9_1_lab2.csv

Browse files
Files changed (1) hide show
  1. proj9_1_lab2.csv +17 -0
proj9_1_lab2.csv ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ sentence,label
2
+ " async with aiohttp.ClientSession() as session:\n tasks = [fetch_url(session, url) for url in urls]\n return await asyncio.gather(*tasks)",0
3
+ " tasks = [download_url(url) for url in urls]\n results = await asyncio.gather(*tasks)\n return results",0
4
+ " async with ClientSession() as client_session:\n tasks = [asyncio.create_task(fetch_single_url(client_session, url)) for url in urls]\n results = await asyncio.gather(*tasks)\n return results",0
5
+ " async with aiohttp.ClientSession() as session:\n tasks = [fetch_url(session, url) for url in urls]\n results = await asyncio.gather(*tasks)\n return results",0
6
+ " async with aiohttp.ClientSession() as current_session:\n pairs = [fetch_url(current_session, url) for url in url_list]\n res_pairs = await asyncio.gather(*pairs)\n return res_pairs",0
7
+ " async with aiohttp.ClientSession() as session:\n tasks = [download_url(session, url) for url in urls]\n results = await asyncio.gather(*tasks)\n return results",0
8
+ " async with aiohttp.ClientSession() as session:\n return await asyncio.gather(*[fetch_url(session, url) for url in urls])",0
9
+ " try:\n async with aiohttp.ClientSession(headers = fake_headers) as session:\n async with session.get(url) as response:\n outcome = response.status\n except Exception as e:\n outcome = e.__class__.__name__\n return (outcome, url)",0
10
+
11
+ " coros = [get_url(url) for url in urls]\n results = asyncio.get_event_loop().run_until_complete(asyncio.gather(*coros))\n return results",1
12
+ " with aiohttp.ClientSession() as client:\n tasks = [retrieve_data(client, target) for target in urls]\n outcomes = asyncio.gather(*tasks)\n return outcomes",1
13
+ "tasks = [asyncio.create_task(fetch_single_url(url)) for url in urls]\n results = asyncio.gather(*tasks)\n return results",1
14
+ " results = []\n with concurrent.futures.ThreadPoolExecutor() as executor:\n futures = [executor.submit(download_url, url) for url in urls]\n for future in concurrent.futures.as_completed(futures):\n results.append(future.result())\n return results",1
15
+ " tasks = [download_url(url) for url in urls]\n results = asyncio.gather(*tasks)\n return results",1
16
+ " with aiohttp.ClientSession() as session:\n tasks = [fetch_url(session, url) for url in urls]\n return asyncio.gather(*tasks)",1
17
+ " with aiohttp.ClientSession() as session:\n tasks = [fetch(session, url) for url in urls_array]\n return asyncio.gather(*tasks)",1