This file contains hidden or 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
| python3 -m virtualenv venv | |
| source venv/bin/activate | |
| python -m ipykernel install --user --name venv | |
| jupyter notebook |
This file contains hidden or 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 json | |
| import sys | |
| from asyncio import ensure_future | |
| from aiohttp import ClientSession | |
| async def fetch(domain, session): | |
| url = 'http://localhost:8080/allicons.json' | |
| params = {'url': domain, 'format': 'png'} | |
| async with session.get(url, params=params, timeout=600) as response: |
This file contains hidden or 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 tensorflow as tf | |
| num_cores = 4 | |
| GPU = True | |
| CPU = False | |
| if GPU: | |
| num_GPU = 1 | |
| num_CPU = 1 | |
| if CPU: |