Skip to content

Instantly share code, notes, and snippets.

View headupinclouds's full-sized avatar

David Hirvonen headupinclouds

  • Elucideye
  • Brooklyn, NY
View GitHub Profile
#!/bin/bash
set -e
X264_URL=ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-20190430-2245.tar.bz2
FFMPEG_URL=https://github.com/headupinclouds/FFmpeg/archive/n4.1-dev-45499e557c-x264-0.tar.gz
install_dir=${PWD}/_install
mkdir -p ${install_dir}
#!/bin/bash
set -e
# Get a test image:
wget https://s-i.huffpost.com/gen/2125210/images/n-EYES-628x314.jpg
TOOLCHAIN=gcc-5-pic-hid-sections
CONFIG=Release
@headupinclouds
headupinclouds / CMakeLists.txt
Created January 2, 2019 04:00
tvm cpp example
cmake_minimum_required(VERSION 3.2)
project(tvm-deploy-gpu-sample)
include_directories(/dl/mxnet/3rdparty/tvm/3rdparty/dlpack/include)
include_directories(/dl/mxnet/3rdparty/tvm/3rdparty/dmlc-core/include)
include_directories(/dl/mxnet/3rdparty/tvm/include)
function(print_cmake_vars)
get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
@headupinclouds
headupinclouds / gist:3a43990da30aee603917a103c3ffe48d
Created April 16, 2018 21:58
build pycaffe on OS X with consistent python via cmake using https://gitHub.com/ruslo/polly
polly.py --toolchain xcode --verbose --install --config Release --fwd CPU_ONLY=ON PYTHON_LIBRARY=$(python-config --prefix)/lib/libpython2.7.dylib PYTHON_INCLUDE_DIR=$(python-config --prefix)/include/python2.7 PYTHON_EXECUTABLE=$(python-config --prefix)/bin/python2.7
( cd _install/xcode/python/caffe/ && ln -s _caffe.dylib _caffe.so )
export PYTHONPATH=${PYTHONPATH}:${PWD}/_install/xcode/python
python
import caffe
@headupinclouds
headupinclouds / how-to.txt
Created February 3, 2018 16:49 — forked from simonw/how-to.md
How to create a tarball of a git repository using "git archive"
git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
@headupinclouds
headupinclouds / gist:4d700e4602b2f46a2179ff2859110e6f
Created February 24, 2017 12:49
android-ndk-r11c-api-21-arm64-v8a-clang-hid-sections-lto.cmake
# Copyright (c) 2016-2017, Michele Caini
# Copyright (c) 2017, David Hirvonen
# All rights reserved.
if(DEFINED POLLY_ANDROID_NDK_R11C_API_21_ARM64_V8A_CLANG_35_HID_SECTIONS_LTO_CMAKE_)
return()
else()
set(POLLY_ANDROID_NDK_R11C_API_21_ARM64_V8A_CLANG_35_HID_SECTIONS_LTO_CMAKE_ 1)
endif()
# Copyright (c) 2014-2017, Ruslan Baratov
# Copyright (c) 2017, David Hirvonen
# All rights reserved.
if(DEFINED POLLY_FLAGS_LTO_CMAKE_)
return()
else()
set(POLLY_FLAGS_LTO_CMAKE_ 1)
endif()
@headupinclouds
headupinclouds / hdf5_simple.cpp
Created December 13, 2016 12:02 — forked from YukiSakamoto/hdf5_simple.cpp
simple example to write hdf5 using c++.
#include <string>
#include <iostream>
#include "H5Cpp.h"
#define MAX_NAME_LENGTH 32
const std::string FileName("SimpleCompound.h5");
const std::string DatasetName("PersonalInformation");
const std::string member_age("Age");
const std::string member_sex("Sex");
const std::string member_name("Name");