- Create certificates
- Edit Docker options
- Restart Docker
- Copy client certificates from host
- (optional) Add remote endpoint in Portainer
Tested on a standard $5/mo DigitalOcean VPS running Ubuntu 16.04.
Tested on a standard $5/mo DigitalOcean VPS running Ubuntu 16.04.
Samples need to be 16 bit / 48kHz mono wav files.
This guide is for UNIX (MacOS or Linux) users, the process would be similar on Windows machines with FFmpeg though. The required FFmpeg options are:
ffmpeg -i $INPUT -acodec pcm_s16le -ac 1 -ar 48000 $OUTPUT
Combining TensorFlow for Poets and TensorFlow.js.
Retrain a MobileNet V1 or V2 model on your own dataset using the CPU only.
I'm using a MacBook Pro without Nvidia GPU.
MobileNets can be used for image classification. This guide shows the steps I took to retrain a MobileNet on a custom dataset, and how to convert and use the retrained model in the browser using TensorFlow.js. The total time to set up, retrain the model and use it in the browser can take less than 30 minutes (depending on the size of your dataset).
Example app - HTML/JS and a retrained MobileNet V1/V2 model.
# Example repository with Dockerfile and NGINX config: https://github.com/woudsma/es6-boilerplate | |
name: Deploy to Dokku | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- develop |
.git
folder to appsGIT_DIR
and GIT_WORK_TREE
environment variables to containers// Simulates try/catch statements wrapping async functions in (nested) object | |
// Returns copy of original object with basic promise-rejection handling for async functions using .catch | |
// Saves the time of writing try/catch statements in every single async function | |
const trycatch = obj => Object.keys(obj) | |
.reduce((acc, curr) => ({ ...acc, [curr]: obj[curr] instanceof Function | |
? (...args) => obj[curr](...args).catch(::console.error) | |
: trycatch(obj[curr]) }), {}) | |
function gitignore() { | |
TAGS="${@}" | |
TAGS="${TAGS/mac/macos}" | |
GITIGNORE_IO_URL="https://www.toptal.com/developers/gitignore/api/${TAGS// /,}" | |
GITIGNORE_FILE="$(pwd)/.gitignore" | |
echo "--> Fetching: $GITIGNORE_IO_URL" | |
echo "--> Writing: $GITIGNORE_FILE" | |
curl -fsSL "$GITIGNORE_IO_URL" >> "$GITIGNORE_FILE" | |
} |
#!/bin/bash | |
### | |
### my-script — does one thing well | |
### | |
### Usage: | |
### my-script <input> <output> | |
### | |
### Options: | |
### <input> Input file to read. | |
### <output> Output file to write. Use '-' for stdout. |
import math | |
from bigfloat import * | |
class LazyCartesianProduct: | |
def __init__(self, sets, context): | |
self.sets = sets | |
self.context = context | |
self.divs = [] | |
self.mods = [] | |
self.maxSize = BigFloat.exact(1) |
# Quick and dirty script for streaming a video file to Twitch (as if it were live) | |
# Requirements: ffmpeg (http://www.ffmpeg.org) | |
# Copy-paste the function and call it in your command line | |
# Or add the function to ~/.bash_profile, ~/.zshrc, ..etc. | |
# Usage: | |
# twitch STREAM_KEY FILEPATH | |
# Example: |