Skip to content

Instantly share code, notes, and snippets.

View lseongjoo's full-sized avatar

Lee Seongjoo lseongjoo

  • CodeBasic
  • Seoul, Korea
View GitHub Profile
public class MainActivity extends android.support.v4.app.FragmentActivity {
// Only one MapView instance is allowed per MapActivity,
// so we inflate it in the MainActivity and tie its
// lifetime here to the MainActivity. Package scope
// so we can grab them from different instances of map
// fragments.
//
// The other option was to make them static, but that causes
// memory leaks on screen rotation.
View mMapViewContainer;
@lseongjoo
lseongjoo / imagenet1000_clsid_to_human.txt
Created December 13, 2017 12:54 — forked from yrevar/imagenet1000_clsidx_to_labels.txt
text: imagenet 1000 class id to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@lseongjoo
lseongjoo / coro_life.py
Created June 7, 2018 05:34 — forked from ramalho/coro_life.py
John Conway's Game of Life implemented with coroutines, by Brett Slatkin
#!/usr/bin/env python3
# Copyright 2014 Brett Slatkin, Pearson Education Inc.
#
# 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
#
@lseongjoo
lseongjoo / 한글과유니코드.md
Created May 13, 2019 04:53 — forked from Pusnow/한글과유니코드.md
한글과 유니코드

한글과 유니코드

유니코드에서 한글을 어떻게 다루는지를 정리하였다.

유니코드

  • 유니코드(Unicode)는 전 세계의 모든 문자를 컴퓨터에서 일관되게 표현하고 다룰 수 있도록 설계된 산업 표준 (위키 백과)
  • 단순히 문자마다 번호를 붙임
  • 계속 업데이트되며 현재는 Unicode Version 9.0.0 이 최신이다.

UTF

  • 유니코드를 실제 파일 등에 어떻게 기록할 것인지를 표준화한 것이다.
@lseongjoo
lseongjoo / install-nanum-fonts-on-ubuntu.md
Created September 27, 2022 00:25 — forked from tiglek/install-nanum-fonts-on-ubuntu.md
Ubuntu 한글 글꼴 설치
@lseongjoo
lseongjoo / cuda_11.2_installation_on_Ubuntu_20.04
Created October 1, 2022 06:42 — forked from cuongtvee/cuda_11.2_installation_on_Ubuntu_20.04
Instructions for CUDA v11.2 and cuDNN 8.1 installation on Ubuntu 20.04 for Pytorch 1.8 & Tensorflow 2.7.0
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@lseongjoo
lseongjoo / m1-max-numpy-setup.md
Created March 10, 2023 15:21 — forked from MarkDana/m1-max-numpy-setup.md
Install NumPy on M1 Max

How to install numpy on M1 Max, with the most accelerated performance (Apple's vecLib)? Here's the answer as of Dec 6 2021.


Steps

I. Install miniforge

So that your Python is run natively on arm64, not translated via Rosseta.

  1. Download Miniforge3-MacOSX-arm64.sh, then
  2. Run the script, then open another shell
$ bash Miniforge3-MacOSX-arm64.sh
@lseongjoo
lseongjoo / vhd4wsl2.md
Created October 1, 2023 05:09 — forked from spajak/vhd4wsl2.md
Creating virtual hard disk (VHD) for WSL2

Creating additional virtual hard disk (VHDX) for WSL2 with ext4 filesystem

Lines starting with # mean the commands have to be executed by root user under Linux shell (WSL distro). All other commands have to be executed under Windows-PowerShell as Administrator.

Make VHDX disk file and mount it under Windows

New-VHD support.vhdx -SizeBytes 25GB -Dynamic -BlockSizeBytes 1MB
Write-Output "\\.\PhysicalDrive$((Mount-VHD -Path support.vhdx -PassThru | Get-Disk).Number)"