Skip to content

Instantly share code, notes, and snippets.

View haje01's full-sized avatar

Kim Jeong Ju haje01

View GitHub Profile
@haje01
haje01 / Dockerfile
Last active November 6, 2015 01:24
Dockerfile for Caffe - original from https://github.com/tleyden/docker/tree/master/caffe
FROM ubuntu:14.04
ENV PYTHONPATH /opt/caffe/python
# Add caffe binaries to path
ENV PATH $PATH:/opt/caffe/.build_release/tools
# Get dependencies
RUN apt-get update && apt-get install -y \
@haje01
haje01 / Dockerfile
Last active December 17, 2015 07:18
Dockerfile for Caffe (for AWS GPU Instace)
FROM ubuntu:14.04
# A docker container with the Nvidia kernel module and CUDA drivers installed
ENV CUDA_RUN http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.14_linux_64.run
RUN apt-get update && apt-get install -q -y \
wget \
build-essential
RUN cd /opt && \
@haje01
haje01 / calc.py
Last active December 22, 2015 17:28
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Caculator for Python Korea GangNam Study
"""
import re
from collections import deque
@haje01
haje01 / gist:6892583
Last active December 25, 2015 01:09
집단지성프로그래밍 3장 for 파이썬 코리아 강남 스터디
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@haje01
haje01 / tictactoe.py
Last active March 15, 2017 12:16
Tictactoe RL Tutorial
import time
import random
import pytest
import numpy as np
EPS = 0.1
ALPHA = 0.1
MAX_EPISODE = 100000
@haje01
haje01 / README.md
Last active June 16, 2017 01:46
Distributed TensorFlow

분산 텐서플로우

이 글을 작성하는 시점(2017-01-11)에서 분산 텐서플로우의 관련 자료 부족으로 확실히 분산 학습이 되는지 확인이 되지 않았습니다. 안타깝지만 본 내용은 참고만 하시기 바랍니다.

원문 [https://www.tensorflow.org/how_tos/distributed/] (https://www.tensorflow.org/how_tos/distributed/)

개념 설명

  • 클러스터는 텐서플로우 그래프의 분산 수행에 참여하는 테스크들의 집합
@haje01
haje01 / reivew.py
Last active November 21, 2017 07:18
Google Play Review Scraper
import sys
import urllib
import urllib2
import json
import codecs
url = "https://play.google.com/store/getreviews"
values = {
"reviewType": "0", "pageNum": "2",
"id":
@haje01
haje01 / DeepMind Lab 설치.md
Last active December 7, 2017 12:39
DeepMind Lab 설치

DeepMind Lab 설치

호스트가 Linux가 아닌 경우 VM 셋팅

  1. VirtualBox 설치
  2. Ubuntu 개발자용 Desktop 받기 https://www.ubuntu.com/download/desktop
  3. VirtualBox에서 가상머신을 만들고 시작
  4. 받아둔 Ubuntu .ISO를 지정

설치

@haje01
haje01 / sample.py
Last active March 8, 2018 04:25
Pandas 예제
def do_group(gdf):
"""각 그룹별 처리."""
# 대상 그룹이 아니면 그대로
if gdf.group.iloc[0] not in groups_need_change:
return gdf
# value가 없는 인덱스
nidx = gdf.value.isna()
# value가 있는 인덱스
pidx = ~nidx

Docker로 Caffe 실습하기

글쓴이: 김정주(haje01@gmail.com)

Caffe는 강력한 딥러닝 툴이지만, 설치가 까다로워 접근하기가 쉽지 않습니다. 이에 Docker를 활용하여 실습하는 방법을 소개합니다.

Docker 설치

설치과정은 많은 파일을 받아야 하기에 인터넷이 빠른 곳에서, 충분한 시간(2시간 이상)을 가지고 진행해야 합니다.