Skip to content

Instantly share code, notes, and snippets.

View springkim's full-sized avatar
🏠
Working from home

KimBomm springkim

🏠
Working from home
View GitHub Profile
curl -fsSL https://code-server.dev/install.sh | sh
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEA8NF3k4jKimNRl8oUnl6hXbxGVZWYlOnVwVRo+BdzfLvBvVXwHim8
i/+2UKDLhAtuD5K57zwiT+8ojlSJ4dyWR47Kf4JnrZatvadhJojoivN58FZ52jhQIQzFXC
g5FwYjFsX7dxMiRX/v9Y6mxAP9pCn7sGwkHoKyAyB2pmXycwVtO6D/ibbW4SyhiWeKkNEG
bkHYKdtRbK3+7/0mF9ViagwjqbhkZOfAbMkYExX25oJocoP0P7Y9M5msnNEVaXjARZs1wE
/XQ0isRZ6kZ2lbVZS+NLcXqaFbMWRFZK+FQZd81lWV6mDIJUBjql0uQugLO0fs9dXsf/ub
A84PDqmnzo/i8X3qryOHdOYeckLnRaP+/MP3Vhrblgw8ngcZ6LZSNiBwu4MTiiY+6F3lHd
M1VpAcp6J8T1FVaOHahQ9/oZ/3KYSaF6nuJSpWy3oC21g+tFk9Xkw9miI7L+O0yQDLUwGb
Tx4DLqujXhkyvCuHDobLezUji4P7HzQGGey23urrAAAFkHJpvuRyab7kAAAAB3NzaC1yc2
@springkim
springkim / cifar10.hpp
Created March 10, 2020 08:14
CIFAR10 Reader for libtorch 1.4.0>
#ifndef LIBTORCH_CIFAR10_H
#define LIBTORCH_CIFAR10_H
#include<torch/torch.h>
namespace {
constexpr uint32_t kTrainSize = 50000;
constexpr uint32_t kTestSize = 10000;
const std::vector<std::string> kTrainImagesFilename = { "data_batch_1.bin","data_batch_2.bin","data_batch_3.bin","data_batch_4.bin","data_batch_5.bin" };
const std::vector<std::string> kTestImagesFilename = {"test_batch.bin"};
constexpr uint32_t kImageRows = 32;
constexpr uint32_t kImageColumns = 32;
@springkim
springkim / ts3psr.h
Created April 9, 2019 02:12
ts3 format parser
/*
* ts3psr.h
* We wish you a merry DL training
*
* Created by kimbomm on 2019. 2. 27...
* Copyright 2019 VIRNECT. All rights reserved.
*
*/
#if !defined(WE_WISH_YOU_A_MERRY_DL_TRAINING_7E3_2_1B_TS3PSR_H_INCLUDED)
@springkim
springkim / cudaMemBlockShow.h
Created September 26, 2018 00:21
Shows the memory blocks of cuda.
#pragma once
#include<Windows.h>
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
__declspec(selectany) float* __host_block;
__declspec(selectany) size_t __host_block_size;
void CudaMemBlockShow(float* device_block, size_t size) {
__host_block = (float*)malloc(size*sizeof(float));
__host_block_size = size;
cudaMemcpy(__host_block, device_block, size*sizeof(float), cudaMemcpyDeviceToHost);
static TCHAR* title = TEXT("CudaMemoryBlock");
@springkim
springkim / .gitattributes
Created March 5, 2018 10:46
CRLF.gitattributes
# Project
* text eol=crlf
# Language Diffs
*.cs diff=csharp
*.css diff=css
@springkim
springkim / anchor_generator.cpp
Last active July 18, 2019 06:21
YOLOv2 Anchors Generator
#include<iostream>
#include<opencv2/opencv.hpp>
std::vector<std::string> GetTrainFiles(std::string filename) {
std::vector<std::string> ret;
std::fstream fin(filename, std::ios::in);
if (fin.is_open() == false) {
std::cout << "Incorrect file path" << std::endl;
exit(1);
}
while (fin.eof() == false) {
#if defined(_MSC_VER)
const char* compiler = "msvc";
#elif defined(__GNUC__)
const char* compiler = "gcc";
#elif defined(__clang__)
const char* compiler = "clang";
#endif