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 | |
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| import os | |
| import sys | |
| import argparse | |
| import cv2 |
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
| # /etc/profile.d/alias.sh | |
| # https://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html | |
| ## ls command | |
| alias ls='ls --color=auto' | |
| alias wl='ls | wc -l' | |
| alias l='ls -l --color=auto' | |
| alias lh='ls -lh --color=auto' | |
| alias ll='ls -la --color=auto' # use a long listing format |
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 <sstream> | |
| #include <iomanip> | |
| #include <string> | |
| // e.g. 1584773265.928826 | |
| std::stringstream oss; | |
| oss << std::setfill('0') << std::setw(17) << std::fixed | |
| << std::setprecision(6) << timestamp << ".png"; | |
| std::string filename = oss.str(); |
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 <fstream> | |
| #include <string> | |
| // e.g. ./main data_tracking_velodyne/testing/velodyne/0000/000000.bin | |
| int main(int argc, char **argv) { | |
| if (argc != 2) { | |
| std::cerr << "Usage: " << argv[0] << " <filepath>\n"; | |
| return 1; | |
| } |
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
| void PrintEigenMat(const Eigen::Ref<const Eigen::MatrixXd> &x, | |
| const std::string mat_name) { | |
| if (!mat_name.empty()) { | |
| std::cout << mat_name << " =\n"; | |
| } | |
| const int rows = x.rows(); | |
| const int cols = x.cols(); | |
| char buf[200]; | |
| for (int i = 0; i < rows; ++i) { | |
| for (int j = 0; j < cols; ++j) { |
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 python3 | |
| import time | |
| import datetime | |
| # change your birthday here | |
| my_birthday = datetime.datetime(2000, 1, 1, 00, 00, 00) | |
| dt_now = datetime.datetime.now() | |
| print(dt_now) | |
| print('UNIX timestamp: {}'.format(dt_now.timestamp())) |
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
| function timestampToDateStr(timestamp) { | |
| var format = 'Y/M/D h:m:s'; | |
| var formatArr = ['Y','M','D','h','m','s']; | |
| var returnArr = []; | |
| var formatNumber = function(n) { | |
| n = n.toString(); | |
| return n[1] ? n : '0' + n; | |
| }; | |
| var date = new Date(timestamp * 1000); |
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
| # https://stackoverflow.com/questions/343865 | |
| def utm_to_lat_lon(zone, easting, northing, northern_hemisphere=True): | |
| if not northern_hemisphere: | |
| northing = 10000000 - northing | |
| a = 6378137 | |
| e = 0.081819191 | |
| e1sq = 0.006739497 | |
| k0 = 0.9996 |
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 <iomanip> | |
| #include <fstream> | |
| #include <string> | |
| #include <sstream> | |
| int main(int argc, char **argv) { | |
| if (argc != 2) { | |
| std::cout << "Usage: ./load_big_ply <filename>\n"; | |
| return 1; |
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 <thread> | |
| #include <chrono> | |
| void foo() { | |
| std::this_thread::sleep_for(std::chrono::milliseconds(100)); | |
| } | |
| int main(int argc, char **argv) { | |
| auto start_time = std::chrono::high_resolution_clock::now(); |