This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import requests | |
import shutil | |
def get_url_and_fname(line): | |
if 'i.imgur.com/' in line: | |
regex = r"(https?://i.imgur.com/(.*.png))" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./data_viz_easy/raw/tut1.ipynb: "\n", | |
./data_viz_easy/raw/tut1.ipynb: "\n", | |
./data_viz_easy/raw/tut1.ipynb: "\n", | |
./data_viz_easy/raw/tut3.ipynb: "\n", | |
./data_viz_easy/raw/ex2.ipynb: "\n", | |
./data_viz_easy/raw/ex6.ipynb: "\n", | |
./data_viz_easy/raw/ex6.ipynb: "\n", | |
./data_viz_easy/raw/ex6.ipynb: "\n", | |
./data_viz_easy/raw/ex6.ipynb: "\n", | |
./data_viz_easy/raw/tut7.ipynb: "\n", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import aiohttp | |
# Example async function that simulates making an API call | |
async def make_api_call(semaphore, session, task_id): | |
async with semaphore: # Ensure we respect the semaphore limit | |
print(f"Task {task_id}: Starting API call...") | |
try: | |
async with session.get(f"https://httpbin.org/get?task={task_id}") as response: | |
result = await response.json() |
OlderNewer