block size must be smaller than physical ram size
sudo dd if=/dev/zero of=/swapfile bs=500M count=2
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon -s
block size must be smaller than physical ram size
sudo dd if=/dev/zero of=/swapfile bs=500M count=2
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon -s
| # brew cask install anaconda | |
| export PATH="/usr/local/anaconda3/bin:$PATH" | |
| # chrome terminal command | |
| alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" | |
| # terminal colors | |
| PS1="%{%F{red}%}%n%{%f%}@%{%F{blue}%}%m %{%F{yellow}%}%~ %{%f%}%% " | |
| export CLICOLOR=1 |
| #include <vector> | |
| #include <opencv2/highgui/highgui.hpp> | |
| #include <opencv2/plot.hpp> | |
| int main() { | |
| std::vector<double> x{0,1,2,3,4,5,6,7,8,9}; | |
| std::vector<double> y{0,-1,-3,-6,-7,-6,-5,-3,-1,0}; | |
| cv::Mat1d xData(x); |
| from IPython.core.magic import register_cell_magic | |
| @register_cell_magic | |
| def cellscope(line, cell): exec(cell) | |
| ## Example (in a code cell): | |
| # %%cellscope | |
| # x = 'hello' # x is local to current code cell |
| from moviepy.editor import VideoFileClip | |
| def test_video_to_gif(): | |
| clip = VideoFileClip('test_videos/solidWhiteRight.mp4').subclip(0,1) | |
| clip.write_gif('test.gif', fps=24) | |
| test_video_to_gif() |
| cmake_minimum_required(VERSION 3.12 FATAL_ERROR) | |
| project(3d-tracking-fusion) | |
| set(CMAKE_CXX_STANDARD 14) | |
| find_package(OpenCV 4.1 REQUIRED) | |
| set(CMAKE_BUILD_TYPE Release) | |
| set(CMAKE_CXX_FLAGS_RELEASE "-Ofast") |
| template<typename PointT> | |
| std::pair<typename pcl::PointCloud<PointT>::Ptr, typename pcl::PointCloud<PointT>::Ptr> | |
| ProcessPointClouds<PointT>::SegmentPlane( typename pcl::PointCloud<PointT>::Ptr cloud, int maxIterations, float distanceThreshold) { | |
| // Time segmentation process | |
| auto startTime = std::chrono::steady_clock::now(); | |
| // downsample input point cloud | |
| auto cloud_ds = DownSample(cloud, 1.0); |
| void matchBoundingBoxes(std::vector<cv::DMatch> &matches, | |
| std::map<int, int> &bbBestMatches, | |
| DataFrame &prev_frame, | |
| DataFrame &curr_frame) { | |
| /* TODO: for each bbox in current frame, find the best matching bbox in previous frame */ | |
| /* ... */ | |
| /* Now visualize bounding box matches */ |