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
#olalekan ogunmolu | |
#June 25, 2014 | |
#I generally use this script to do my basic package installation after a dry format of ubuntu 14.04.2 LTS | |
#!/bin/bash | |
#creates most of the packages I normally use in ubuntu | |
echo "setting up sources for ros indigo" | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
echo "setting up your ros keys" | |
sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 0xB01FA116 |
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
cmake_minimum_required(VERSION 2.8.12) | |
project(xbox_tracker) | |
SET(CMAKE_BUILD_TYPE RelWithDebInfo) | |
find_package(PkgConfig) | |
find_package(PythonLibs REQUIRED) | |
find_package(Matlab REQUIRED) | |
find_package(OpenCV REQUIRED) |
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
cmake_minimum_required(VERSION 2.8.3) | |
project(opencv_examples) | |
OPTION(ENABLE_CXX11 "Enable C++11 support" ON) | |
IF(ENABLE_CXX11) | |
INCLUDE(CheckCXXCompilerFlag) | |
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) | |
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) | |
IF(COMPILER_SUPPORTS_CXX11) | |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") |
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
# ---------------------------------------------------------------------------- | |
# Root CMake file for OpenCV | |
# | |
# From the off-tree build directory, invoke: | |
# $ cmake <PATH_TO_OPENCV_ROOT> | |
# | |
# | |
# - OCT-2008: Initial version <joseluisblancoc@gmail.com> | |
# | |
# ---------------------------------------------------------------------------- |
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 scipy | |
import logging | |
import argparse | |
import scipy.io as sio | |
from scipy.sparse import load_npz, \ | |
csc_matrix, save_npz, vstack | |
from os.path import join, expanduser | |
from .utils.optim import FMO | |
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) |
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 h5py | |
import numpy as np | |
from skimage.transform import resize | |
import os | |
import logging | |
from os.path import join, expanduser | |
logger = logging.getLogger(__name__) |
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 os | |
import copy | |
import time | |
import random | |
import h5py | |
import h5sparse | |
import logging | |
import numpy as np | |
from scipy.sparse import vstack |
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 a global gitignore for macOS | |
curl https://raw.githubusercontent.com/github/gitignore/master/Global/macOS.gitignore >> ~/.gitignore_global | |
git config --global core.excludesfile ~/.gitignore_global | |
# Send screenshots to a directory that isn't the desktop | |
mkdir -p ~/Screenshots | |
defaults write com.apple.screencapture location ~/Screenshots | |
# Show all hidden files (like dotfiles) | |
defaults write com.apple.finder AppleShowAllFiles YES; killall Finder; |
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 os | |
import cupy as cp | |
import numpy as np | |
class chambollepock(object): | |
def __init__(self): | |
self.proxops = proxops() | |
self.variables = cpk_variables() | |
self.applyK = cpk_applyK() | |
self.optimizer = cpk_optimizer(self) |
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 numpy as np | |
""" | |
For details, see | |
[1] https://people.eecs.berkeley.edu/~wkahan/ieee754status/IEEE754.PDF | |
[2] https://docs.scipy.org/doc/numpy/reference/generated/numpy.around.html?highlight=round#numpy.around | |
Thanks to fesetround from ctypes. We can manually set the rounding mode | |
""" | |
import ctypes, sys |
OlderNewer