Skip to content

Instantly share code, notes, and snippets.

@AlanWZHU
AlanWZHU / pytorch_vision_spacy_torchtext_jetson_nano.sh
Created January 3, 2021 07:31 — forked from abishekmuthian/pytorch_vision_spacy_torchtext_jetson_nano.sh
Installing PyTorch, torchvision, spaCy, torchtext on Jetson Nanon [ARM]
#!/bin/bash
# This script will install pytorch, torchvision, torchtext and spacy on nano.
# If you have any of these installed already on your machine, you can skip those.
sudo apt-get -y update
sudo apt-get -y upgrade
#Dependencies
sudo apt-get install python3-setuptools
import datetime
import time
import asyncio
from concurrent.futures import ThreadPoolExecutor
"""
当必须等待的时候,可以使用pool
"""
def anything(i):
print(i,datetime.datetime.now())
import asyncio
loop = asyncio.get_event_loop()
async def hello():
await asyncio.sleep(3)
print('Hello!')
if __name__ == '__main__':
loop.run_until_complete(hello())