Skip to content

Instantly share code, notes, and snippets.

Avatar

Kim Jeong Ju haje01

View GitHub Profile
View Dockerfile
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 Dec 17, 2015
Dockerfile for Caffe (for AWS GPU Instace)
View Dockerfile
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 && \
View calc.py
#!/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 Dec 25, 2015
집단지성프로그래밍 3장 for 파이썬 코리아 강남 스터디
View gist:6892583
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@haje01
haje01 / tictactoe.py
Last active Mar 15, 2017
Tictactoe RL Tutorial
View tictactoe.py
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 Jun 16, 2017
Distributed TensorFlow
View README.md

분산 텐서플로우

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

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

개념 설명

  • 클러스터는 텐서플로우 그래프의 분산 수행에 참여하는 테스크들의 집합
@haje01
haje01 / reivew.py
Last active Nov 21, 2017
Google Play Review Scraper
View reivew.py
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 / input_data.py
Last active Dec 6, 2017
input_data.py for TensorFlow MNIST Sample
View input_data.py
"""Functions for downloading and reading MNIST data."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import gzip
import os
import numpy
from six.moves import urllib
from six.moves import xrange # pylint: disable=redefined-builtin
SOURCE_URL = 'http://yann.lecun.com/exdb/mnist/'
@haje01
haje01 / DeepMind Lab 설치.md
Last active Dec 7, 2017
DeepMind Lab 설치
View DeepMind Lab 설치.md

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 Mar 8, 2018
Pandas 예제
View sample.py
def do_group(gdf):
"""각 그룹별 처리."""
# 대상 그룹이 아니면 그대로
if gdf.group.iloc[0] not in groups_need_change:
return gdf
# value가 없는 인덱스
nidx = gdf.value.isna()
# value가 있는 인덱스
pidx = ~nidx