Skip to content

Instantly share code, notes, and snippets.

View andreupifarre's full-sized avatar

andreupifarre

  • San Francisco
  • 04:51 (UTC -12:00)
View GitHub Profile
@andreupifarre
andreupifarre / Fast.ai install script
Created August 11, 2018 19:50 — forked from gilrosenthal/Fast.ai install script
Fast.ai Install on Google Colab
!pip install fastai
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
from os import path
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl torchvision
const preload = Preload();
preload.fetch([
'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4',
'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4',
'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerJoyrides.mp4'
]).then(result => {
// use either a promise or 'oncomplete'
});