Skip to content

Instantly share code, notes, and snippets.

View nglee's full-sized avatar

Namgoo Lee nglee

View GitHub Profile
@nglee
nglee / onnx-tensorflow_error
Created May 16, 2019 09:17
onnx-tensorflow error
(base) root@7f12:~# python
Python 3.7.3 (default, Mar 27 2019, 22:11:17)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import onnx
>>> from onnx_tf.backend import prepare
/root/onnx-tensorflow/onnx_tf/common/__init__.py:87: UserWarning: onnx_tf.common.get_outputs_names is deprecated. It will be removed in future release. Use TensorflowGraph.get_outputs_names instead.
warnings.warn(message)
WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
@nglee
nglee / bitest1_win.cpp
Last active July 17, 2018 01:32
Persistence of managed_windows_shared_memory
#include <boost/interprocess/managed_windows_shared_memory.hpp>
#include <iostream>
using namespace boost::interprocess;
int main()
{
managed_windows_shared_memory *shm = nullptr;
try {
@nglee
nglee / bitest5.cpp
Created July 14, 2018 05:09
Persistence of file_lock
#include <boost/interprocess/sync/file_lock.hpp>
#include <iostream>
using namespace boost::interprocess;
int main()
{
file_lock flock("bitest5.cpp");
flock.lock();
std::cout << "The process locked an file_lock," << std::endl;
@nglee
nglee / bitest4.cpp
Last active April 3, 2020 07:31
Automatic unlocking of interprocess_mutex with scoped_lock
#include <boost/interprocess/managed_xsi_shared_memory.hpp>
#include <boost/interprocess/xsi_key.hpp>
#include <boost/interprocess/sync/scoped_lock.hpp>
#include <iostream>
using namespace boost::interprocess;
void first_process(managed_xsi_shared_memory *shm);
void second_process(managed_xsi_shared_memory *shm);
@nglee
nglee / bitest3.cpp
Last active April 3, 2020 07:18
Nonautomatic unlocking of interprocess_mutex
#include <boost/interprocess/managed_xsi_shared_memory.hpp>
#include <boost/interprocess/xsi_key.hpp>
#include <iostream>
using namespace boost::interprocess;
void first_process(managed_xsi_shared_memory *shm);
void second_process(managed_xsi_shared_memory *shm);
int main()
@nglee
nglee / bitest2.cpp
Last active September 24, 2018 15:05
Persistence of interprocess_mutex
#include <boost/interprocess/managed_xsi_shared_memory.hpp>
#include <boost/interprocess/xsi_key.hpp>
#include <iostream>
using namespace boost::interprocess;
int main()
{
managed_xsi_shared_memory *shm = nullptr;
@nglee
nglee / bitest1.cpp
Last active April 3, 2020 06:48
Persistence of managed_xsi_shared_memory
#include <boost/interprocess/managed_xsi_shared_memory.hpp>
#include <boost/interprocess/xsi_key.hpp>
#include <iostream>
using namespace boost::interprocess;
int main()
{
managed_xsi_shared_memory *shm = nullptr;
@nglee
nglee / opencv_hack.cpp
Created May 29, 2018 11:32
Let's hack OpenCV!
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace cv::cuda;
int main()
{
setBufferPoolUsage(true);
BufferPool pool(Stream::Null());
@nglee
nglee / .vimrc
Last active November 14, 2019 11:55
.vimrc for Ubuntu / VsVim / Windows 10 bash on Ubuntu
" Firstly, do
" git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
set nocompatible " require Vi iMproved
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
@nglee
nglee / windows_bash_zenburn_d2coding.reg
Last active November 20, 2017 08:13
Appearance settings for Windows 10 bash on Ubuntu with Zenburn colorscheme and Naver D2Coding font
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console\%SystemRoot%_System32_bash.exe]
; ****IMPORTANT****
; Set to utf-8 to make the modified font/colorscheme to be saved
; (https://mnpk.github.io/2017/11/03/bash_on_ubuntu_on_windows.html)
"CodePage"=dword:0000fde9
; Select font