Skip to content

Instantly share code, notes, and snippets.

View Kyungpyo-Kim's full-sized avatar
๐Ÿ˜

Kyungpyo Kim Kyungpyo-Kim

๐Ÿ˜
View GitHub Profile
@Kyungpyo-Kim
Kyungpyo-Kim / python_google_style_temp.py
Created August 31, 2018 09:32
Example Google Style Python Docstrings
# -*- coding: utf-8 -*-
"""Example Google style docstrings.
This module demonstrates documentation as specified by the `Google Python
Style Guide`_. Docstrings may extend over multiple lines. Sections are created
with a section header and a colon followed by a block of indented text.
Example:
Examples can be given using either the ``Example`` or ``Examples``
sections. Sections support any reStructuredText formatting, including
@Kyungpyo-Kim
Kyungpyo-Kim / ekf_measure_update_heading.py
Last active September 4, 2018 02:18
measurement update with heading(yaw)
"""
tracker.py
"""
yaw_prev = self.tracks[idx_old_t].akf.state.item(3)
yaw = box[4]
while yaw_prev < 0:
yaw_prev += 2.0*np.pi
while yaw_prev > 2.0*np.pi:
@Kyungpyo-Kim
Kyungpyo-Kim / python_path_dir_arg_utils.py
Last active December 6, 2018 02:06
python path, directory, argument parsing ๊ด€๋ จ
""" argument """
import argparse
parser = argparse.ArgumentParser(description='h5 data generation')
parser.add_argument('--data_dir', default = '/data',
type=str, help='data directory')
parser.add_argument('--out_dir', default = '/output',
type=str, help='output directory')
@Kyungpyo-Kim
Kyungpyo-Kim / gen_color.hpp
Created October 1, 2018 10:16
light color map generation (c++)
/// ๋‹ค์Œ์˜ ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•˜์—ฌ ์‚ฌ์šฉ https://gist.github.com/ialhashim/f52e1a4788e9feaf7d51
/// Color map based on work by Kenneth Moreland: http://www.sandia.gov/~kmorel/documents/ColorMaps/
#pragma once
#include <vector>
#include <cstdlib>
#include <ctime>
inline std::vector< std::vector<double> > makeColorMap(int num)
{
@Kyungpyo-Kim
Kyungpyo-Kim / motion_compensation.cpp
Created November 8, 2018 03:23
Motion compensation
void LTKalmanFilter::EgoMotionCompensation(double ego_spd, double ego_yawrate, double dt)
{
// Get track info
double dx = X_.at<double>(0, 0);
double dy = X_.at<double>(0, 1);
// Get motion
double d_dist = ego_spd * dt;
double d_angle = ego_yawrate * dt;
@Kyungpyo-Kim
Kyungpyo-Kim / run_tf_gpu_multi_model.py
Created December 1, 2018 04:03
Tensorflow-gpu, releasing GPU Memory
""" Reference
https://stackoverflow.com/questions/39758094/clearing-tensorflow-gpu-memory-after-model-execution
"""
import tensorflow as tf
import multiprocessing
import numpy as np
def run_tensorflow():
@Kyungpyo-Kim
Kyungpyo-Kim / how_to_copy_git_repository.md
Last active November 11, 2023 14:33
Repository ๋ณต์‚ฌํ•ด ์˜ค๊ธฐ

Repository ๋ณต์‚ฌํ•ด ์˜ค๊ธฐ

์ค€๋น„๋ฌผ

๊ฒฐ๊ณผ

  • ๋ชจ๋“  branch ๋ณ„ commit ๋ฐ tag ๋‚ด์šฉ ๊ทธ๋Œ€๋กœ ๋ณต์‚ฌ
  • github ์‚ฌ์šฉ์ž๋Š” ๊ทธ๋Œ€๋กœ ์—ฐ๊ฒฐ๋จ
  • private repo ๋„ ๊ฐ€๋Šฅ
@Kyungpyo-Kim
Kyungpyo-Kim / safepasslib.js
Created February 14, 2019 08:14 — forked from kde713/safepass.js
์•ˆ์ „๊ต์œก ์ด์ˆ˜ ์Šคํฌ๋ฆฝํŠธ
var page_no = getCurrentPageNumber();
var macro_flag = false;
function wait(msecs) {
var start = new Date().getTime();
var cur = start;
while (cur - start < msecs) {
cur = new Date().getTime();
}
}
@Kyungpyo-Kim
Kyungpyo-Kim / pic2Info3d.py
Created November 5, 2019 05:55
3d information from 2d image
# camera parameter
# Intrinsic calibration
FocalLength = [ 4600.525, 5000.167 ]# ยฑ [ 198.571 280.700 ] [ 4457.525, 4874.167 ]
PrincipalPoint = [ 691.377, 565.018 ]# ยฑ [ 41.489 52.776 ]
[fx, fy] = FocalLength
[cx, cy] = PrincipalPoint
# Extrinsic calibration
# [rslidar16_tractor]
# frame = rslidar
@Kyungpyo-Kim
Kyungpyo-Kim / CMakeLists.txt
Created February 14, 2020 06:34 — forked from dirk-thomas/CMakeLists.txt
CMakeLists.txt example with ament
cmake_minimum_required(VERSION 2.8.3)
project(foo)
if(NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
endif()
# find dependencies