ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"
Requests are handled by flask
, a bunch of urls are inserted in the object store (redis
)
and arguments are put on the queue (redis
again) for workers to consume. More workers
would mean more items processed in parallel.
Other possible implementations:
multiprocessing
module for consuming all cpus.multiprocessing.managers.SyncManager
for distributing task to other machines.
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
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/sem.h> | |
#include <unistd.h> | |
#include <sys/types.h> |
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
#!/usr/bin/env sh | |
# Clone Boost.Compute-Android | |
git clone --recursive https://github.com/tzutalin/Boost.Compute-Android | |
# Download NDK | |
wget https://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin | |
chmod +x android-ndk-r10e-linux-x86_64.bin | |
./android-ndk-r10e-linux-x86_64.bin 1> /dev/null 2>&1 | |
mv android-ndk-r10e android-ndk | |
export PATH=`pwd`/android-ndk:$PATH |
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
#!/usr/bin/env python | |
__author__ = 'TzuTaLin' | |
# Copyright (c) 2016 Tzutalin | |
# Create by TzuTaLin <[email protected]> | |
import os | |
import platform | |
import subprocess |
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
#!/bin/sh | |
git remote add upstream $1 | |
git fetch upstream | |
git pull --rebase upstream master |
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
#! /bin/bash | |
# | |
# This file is part of keytool-importkeypair. | |
# | |
# keytool-importkeypair is free software: you can redistribute it | |
# and/or modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation, either version 3 of | |
# the License, or (at your option) any later version. | |
# | |
# keytool-importkeypair is distributed in the hope that it will be |
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
#!/usr/bin/env sh | |
NDK_ROOT="${1:-${NDK_ROOT}}" | |
if [ ! -d "${WD}/android-cmake" ]; then | |
echo 'Cloning android-cmake' | |
git clone https://github.com/taka-no-me/android-cmake.git | |
fi | |
### ABI setup | |
#ANDROID_ABI=${ANDROID_ABI:-"armeabi-v7a with NEON"} |
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
DIR=. | |
VERSION=12 | |
echo "Downloading headers for version ${VERSION}..." | |
mkdir -p "${DIR}/CL-${VERSION}" | |
cd "${DIR}/CL-${VERSION}" | |
wget https://raw.githubusercontent.com/KhronosGroup/OpenCL-Headers/opencl${VERSION}/opencl.h |
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
#include <iostream> | |
#include <ctime> | |
class Timer | |
{ | |
public: | |
Timer() { clock_gettime(CLOCK_REALTIME, &beg_); } | |
double elapsed() { | |
clock_gettime(CLOCK_REALTIME, &end_); |