This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
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
sudo apt update | |
sudo apt-get -y install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev libgfortran3 | |
wget 'https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda_9.2.148_396.37_linux' -O cuda92.run | |
wget 'https://developer.nvidia.com/compute/cuda/9.2/Prod2/patches/1/cuda_9.2.148.1_linux' -O patch1.run | |
sudo sh cuda92.run | |
sudo sh patch1.run | |
echo "# CUDA9.2" >> ~/.bashrc | |
echo "export PATH=/usr/local/cuda/bin:\$PATH" >> ~/.bashrc | |
echo "export LD_LIBRARY_PATH=/usr/local/cuda/lib64:\$LD_LIBRARY_PATH" >> ~/.bashrc |
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 React from 'react'; | |
import videojs from 'video.js'; | |
import 'video.js/dist/video-js.css'; | |
// video.js player from the docs: https://github.com/videojs/video.js/blob/master/docs/guides/react.md | |
class VideoPlayer extends React.Component { | |
componentDidMount() { | |
// instantiate Video.js | |
this.player = videojs(this.videoNode, this.props, function onPlayerReady() { |
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
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
# Create dictionary of target classes | |
label_dict = { | |
0: ‘T-shirt/top’, | |
1: ‘Trouser’, | |
2: ‘Pullover’, | |
3: ‘Dress’, | |
4: ‘Coat’, | |
5: ‘Sandal’, | |
6: ‘Shirt’, | |
7: ‘Sneaker’, |
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 json | |
import numpy as np | |
import keras | |
import keras.preprocessing.text as kpt | |
from keras.preprocessing.text import Tokenizer | |
from keras.models import model_from_json | |
# we're still going to use a Tokenizer here, but we don't need to fit it | |
tokenizer = Tokenizer(num_words=3000) | |
# for human-friendly printing |
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
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import | |
from __future__ import division | |
from __future__ import print_function | |
import argparse | |
import numpy as np | |
import os | |
import random |
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
# -*- coding: utf-8 -*- | |
"""ResNet50 model for Keras with fused intermediate layers | |
# Reference: | |
https://arxiv.org/pdf/1604.00133.pdf | |
Adapted from original resnet | |
""" | |
from __future__ import print_function |
NewerOlder