Skip to content

Instantly share code, notes, and snippets.

View DonghoonPark12's full-sized avatar

DHPark DonghoonPark12

  • HAE
  • Seoul, Rep.of.Korea.
View GitHub Profile
set nu
set ai cindent
set ts=4 sw=4
syntax enable
colo shine
" Enable folding
set foldmethod=indent
set foldlevel=99
--18.7.8--
[Error] lsb_release error
while installing anaconda...It happened.
[Solved]
sudo rm -rf /usr/bin/lsb_release
https://askubuntu.com/questions/853377/error-with-lsb-release-a-in-ubuntu-16-04-xenial
[Error]
OpenCV(3.4.1) Error: Assertion failed (chunk.m_size <= 0xFFFF) in readFrame, file /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/videoio/src/container_avi.cpp, line 514
$ pwd
/srv/workspace/barerepo
__file__ = ./dir.py
os.path.dirname(__file__) = . (relative path of file)
os.path.abspath(__file__) = /srv/workspace/barerepo/dir.py (absolute path of file)
os.path.abspath( os.path.dirname(__file__) ) = /srv/workspace/barerepo (If you want to know absolute dir path)
[Reference]
https://yunsangq.github.io/articles/2017-02/caffe
https://github.com/BVLC/caffe/issues/5308
https://yangcha.github.io/Caffe-Conda3/
# python3 -> make all -j $(($(nproc) + 1)) error occur so i change to conda vitrual enviroment python=2.7
@DonghoonPark12
DonghoonPark12 / 쉘 명령어
Created June 28, 2018 10:11
★Shell order
find -name '*.pl' : 현재 디렉토리에서 pl 확장자를 가진 모든 파일 찾기
find / -name '*.pl' -ls : 루트에서 부터 pl 확장자를 가진 모든 파일 찾기, ls명령으로 출력
find /medie -name 'et*' -type d : media에서 부터 이름이 et로 시작하는 모든 디렉토리 찾기
mkdir -p dir1/dir2 dir1/dir3 : 여러개의 디렉토리 생성가능
tree dir1 -> dir1/ : tree 명령어로 디텍토리, 파일구조를 볼 수 있다.
|----dir2
@DonghoonPark12
DonghoonPark12 / .bashrc
Last active October 3, 2018 12:39
.bashrc
alias eb='subl ~/.bashrc'
alias sb='source ~/.bashrc'
alias gs='git status'
alias gp='git pull'
alias at='source activate tf' #tensorflow python3.6
alias at2='source activate tf2' #tensorflow python2.7
alias dt='source deactivate tf || source deactivate tf2'
alias cw='cd ~/catkin_ws'
alias cs='cd ~/catkin_ws/src'
alias cm='cd ~/catkin_ws && sudo catkin_make'
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run
sudo sh cuda_8.0.61_375.26_linux.run --override --silent --toolkit # install cuda in /usr/local/cuda
cd /usr/local/cuda
tar -xzvf cudnn-8.0-linux-x64-v6.0.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
#add environment variables
#1. 이름 분석
'''
def chunk(long,n):
for i in range(0,len(long),n):
yield long[i:i+n]
f = open("input.txt","r")
long = f.read() #문자열로 읽음
#print(long)
print(type(long))
#4 DashInsert
f = open("input.txt","r")
long = f.read() #문자열로 읽음
#print(len(long))
flag1 = 0
flag2 = 0
list = []
for i in long:
list.append(i)
#!/bin/bash
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software