Skip to content

Instantly share code, notes, and snippets.

View channprj's full-sized avatar

Heechan Park channprj

View GitHub Profile
@vmadman
vmadman / apache-json-log-format
Created April 27, 2013 06:59
An apache log format that allow access logs (but not error logs) to be output in JSON format. I found this here: http://untergeek.com/2012/10/11/getting-apache-to-output-json-for-logstash/ -- but modified it for my purposes a good bit.
# Access Logs
LogFormat "{ \
\"@vips\":[\"%v\"], \
\"@source\":\"%v%U%q\", \
\"@source_host\": \"%v\", \
\"@source_path\": \"%f\", \
\"@tags\":[\"Apache\",\"Access\"], \
\"@message\": \"%h %l %u %t \\\"%r\\\" %>s %b\", \
\"@fields\": { \
\"timestamp\": \"%{%Y-%m-%dT%H:%M:%S%z}t\", \
@mcchae
mcchae / memprofile.py
Last active August 12, 2020 08:10
Python guppy memory profiling
#!/usr/bin/env python
#coding=utf8
##########################################################################################
class HeapMon:
"""
guppy 모듈을 이용하여 메모리 Heap의 소모량을 구하는 클래스
.. note:: guppy 모듈 설치 방법
sudo apt-get install python-dev
sudo pip install guppy
@timmyomahony
timmyomahony / nginx.conf
Created June 26, 2011 13:29
Python, UWSGI, Supervisor & Nginx
upstream uwsgi {
ip_hash;
server 127.0.0.1:40000;
}
server {
listen 80;
server_name www.domain.com;
root /sites/mysite/;
access_log /sites/mysite/log/nginx/access.log;
@haje01
haje01 / 도커와 AWS를 활용한 클라우드 딥러닝 환경 구축.md
Last active December 20, 2020 08:56
도커와 AWS를 활용한 클라우드 딥러닝 환경 구축

도커와 AWS를 활용한 클라우드 딥러닝 환경 구축

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

최근 딥러닝 관련 패키지들은 대부분 CPU와 GPU를 함께 지원하고 있습니다. GPU를 사용하면 보다 빠르게 학습 결과를 낼 수 있지만, GPU를 활용하기 위해서는 NVIDIA계열의 그래픽 카드, 드라이버 S/W 그리고 CUDA의 설치를 필요로 합니다.

이 글에서는 AWS의 GPU 인스턴스와 도커를 활용해 딥러닝 패키지(Caffe)를 편리하게 사용하는 방법을 소개합니다.


@allieus
allieus / README.md
Last active January 20, 2021 02:23
네이버 블로그 크롤링

네이버 블로그 크롤링

  • 파이썬3 에서 동작합니다.
  • requests, beautifulsoup4 라이브러리가 필요합니다.
pip install requests beautifulsoup4

AskDjango

@pfctdayelise
pfctdayelise / 00-intro_errorreporting.txt
Created August 18, 2012 13:47
Examples of pytest, especially funcargs
These are snippets of py.test in action, used in a talk given at
PyCon AU 2012 in Hobart, Tasmania. They are all relevant for
py.test 2.2 except where specified. Where taken from open source
projects I have listed a URL, some examples are from the py.test
documentation, some are from my workplace.
Apart from things called test_*, these functions should probably
be in your conftest.py, although they can generally start life in
your test files.
@mnot
mnot / urlnorm.py
Created December 1, 2009 05:29
urlnorm.py: URL normalisation
#!/usr/bin/env python
"""
urlnorm.py - URL normalisation routines
urlnorm normalises a URL by;
* lowercasing the scheme and hostname
* taking out default port if present (e.g., http://www.foo.com:80/)
* collapsing the path (./, ../, etc)
* removing the last character in the hostname if it is '.'
@starenka
starenka / .gitignore
Created September 18, 2011 20:02
fabfile to deploy flask app to nginx/supervisor/uwsgi stack
.idea/*
*.pyc
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
name: prometheus-deployment
name: prometheus
spec:
replicas: 1
template:
@mdeguzis
mdeguzis / Difference between sh and bash.md
Last active April 6, 2021 17:22
Difference between sh and bash

Source: StackOverflow
By: roman-cheplyaka
Note: Full credit goes to the author and source website you see above.

What is sh

sh (or the Shell Command Language) is a programming language described by the POSIX standard. It has many implementations (ksh88, dash, ...). bash can also be considered an implementation of sh (see below).

Because sh is a specification, not an implementation, /bin/sh is a symlink (or a hard link) to an actual implementation on most POSIX systems.