<jupyter_start><jupyter_text>__Installation for working crawling with selenium__ - !pip install selenium- !conda install -c conda-forge geckodriver --yesCreate new Terminal and do:- apt-get update- apt install firefox<jupyter_code>%matplotlib inline
%reload_ext autoreload
%autoreload 2
from crawling import get_random_crops_around_nets, SatImageryRequestHandler, load_webdriver, get_total_memory_percent
import datetime

from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))

date = datetime.datetime.now().strftime("%Y-%m-%d")<jupyter_output><empty_output><jupyter_text>Crawling images  Getting images centered on nets<jupyter_code>driver = load_webdriver()
for zoom_level in [16, 17][:1]:
    rr = SatImageryRequestHandler(driver=driver, _save_dir="data/nets", filename_prefix='2019-11-17', zoom_level=zoom_level)
    for coords in fish_coordinates:
        rr.request_screenshot(lat=coords[0], long=coords[1])
        if get_total_memory_percent() > 25:
            # driver can load too much memory, then we need to reload it
            print(f"Total memory used by webdriver reported to be {get_total_memory_percent():.2f}% of system,"
                  f" loading new webdriver")
            driver.quit()
            driver = load_webdriver()<jupyter_output><empty_output><jupyter_text>Get random crops from all around<jupyter_code>get_random_crops_around_nets(zoom_levels=[16], _save_dir="data/inference_random", filename_prefix="2019-11-17", download_how_many=5000)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10325047801147227, 'fraction_numerical': 0.022944550669216062, 'mean_word_length': 5.514522821576763, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '643838', 'license': 'MIT', 'n_tokens_mistral': 534, 'n_tokens_neox': 488, 'n_words': 113, 'path': '2019-11-16-pp-Download_net_images_and_around_nets.ipynb', 'repo_name': 'DeepVoltaire/SalmonDetection', 'size': '1569'}