Skip to content

Instantly share code, notes, and snippets.

View shoveller's full-sized avatar

cinos shoveller

  • SEOUL, SouthKorea
  • 14:25 (UTC +09:00)
View GitHub Profile
@shoveller
shoveller / setCustomFooter_onPowerPoint.bas
Created September 23, 2012 07:48
파워포인트VBA_스닙펫:파워포인트 슬라이드마다 커스터마이즈된 푸터를 삽입
'작성일 : 2012.09.11
'작성자 : 서재원
'설명 : 파워포인트용 VBA모듈
' 파워포인트 슬라이드마다 커스터마이즈된 푸터를 삽입한다.
Sub setCustomFooter()
@shoveller
shoveller / ExportNotesText.bas
Created September 23, 2012 08:28
파워포인트VBA_스닙펫:파워포인트 메모를 모두 텍스트 파일로 익스포트
'작성일 : 2012.09.05
'작성자 : 서재원
'출처 : http://support.microsoft.com/kb/2669736/ko
'설명 : 파워포인트용 VBA모듈
' 파워포인트 메모를 모두 텍스트 파일로 익스포트 한다.
Sub ExportNotesText()
Dim oSlides As Slides
Dim oSl As Slide
@shoveller
shoveller / PasteRangeWithInsertRows.bas
Created September 23, 2012 08:34
엑셀VBA_스닙펫:열을 추가함과 동시에 셀 복사시키기
'사용법
'이 모듈은 셀을 복사할 시트에 열 추가 -> 셀 붙여넣기 의 작업을 단순화 시킨다.
'PasteRangeWithInsertRows함수를 특정 단축키에 지정하고 사용하면 유용하다.
'<사용법 동영상 삽입예정>
'작성일 : 2012.08.22
'작성자 : 서재원
'설명 : 엑셀 VBA 매크로
' 범위 열을 복사한다.
' 열이 모자라면 그만큼 열을 추가한다.
@shoveller
shoveller / GetSpecificTextInPowerpoint.bas
Created September 23, 2012 08:38
파워포인트VBA_스닙펫:검색조건에 부합하는 텍스트를 VBE콘솔에 출력
'작성일 : 2012.09.05
'작성자 : 서재원
'설명 : 파워포인트용 VBA모듈
' 파워포인트 택스트를 검색한다.
' 검색조건에 부합하는 텍스트를 디버깅 창에 출력한다.
'검색조건 딕셔너리 프로퍼티
Private Property Get keyWordsPatterns() As Collection
Dim patterns As New Collection
'이 시점에 검색할 문자열을 추가한다.
'RegExp형식이어야 한다.
@shoveller
shoveller / activeSheetPageSetup.bas
Created September 23, 2012 08:42
엑셀VBA_스닙펫:엑셀 시트를 나누어 출력함과 동시에 출력 헤더,푸터를 설정
'작성일 : 2012.09.11
'작성자 : 서재원
'출처 : http://support.microsoft.com/kb/2669736/ko
'설명 : 엑셀용 VBA모듈
' 엑셀 시트를 나누어 출력하도록 양식을 맞추어 준다.
Sub activeSheetPageSetup(ByVal printOrientation As XlPageOrientation, ByVal leftHeaderImgSrc As String)
Dim targetOrientation As XlPageOrientation
targetOrientation = printOrientation
'페이지를레이아웃뷰로변경
ActiveWindow.View = xlPageLayoutView
# -*- coding: utf-8 -*-
"""
This script will delete all of the tweets in the specified account.
You may need to hit the "more" button on the bottom of your twitter profile
page every now and then as the script runs, this is due to a bug in twitter.
You will need to get a consumer key and consumer secret token to use this
script, you can do so by registering a twitter application at https://dev.twitter.com/apps
@requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1)
@shoveller
shoveller / ClockThread.py
Last active August 29, 2015 14:02
Thread in python 2.7. 파이썬2.7에서 쓰레드 구현하기
# -*- coding: UTF-8 -*-
__author__ = 'cinos81'
import threading
import time
#함수를 쓰레드로 만들 때의 공유자원을 가정한 변수
globalResource = 0
@shoveller
shoveller / qryStrParser.js
Created June 24, 2014 00:38
쿼리스트링 parser
/**
* Created by cinos81 on 2014. 6. 24..
*/
var paramFromQryStr = function(url){
/*
* 첫번째 정규식
* . : 모든 글자로부터
* + : 1개 이상의 글자를
* ? : ? 를 만날 때까지
@shoveller
shoveller / gist:b4d2e1e6d33906f2a667
Created July 3, 2014 14:06
왜 파이썬 데코레이터를 만들때, @wraps어노테이션을 쓰는 것을 권장하는 걸까?
__author__ = 'artemr'
'''
왜 파이썬 데코레이터를 만들때, @wraps어노테이션을 쓰는 것을 권장하는 걸까?
이유인 즉슨, 데코레이터 내부에서 인자로 전달받은 함수가 익명함수 처럼 취급되어 버리므로 디버깅이 난해해지는 단점이 있었기 때문이다.
자세한 설명은 아래의 링크에 첨부되어 있다.
원본: http://artemrudenko.wordpress.com/2013/04/15/python-why-you-need-to-use-wraps-with-decorators/
사본: https://www.evernote.com/shard/s174/sh/78eaad5f-a8f2-4496-b984-e3385fb963c0/922d9ab4b5cd23ac7b85aab42536aa4f
'''
@shoveller
shoveller / dictionaryComprehension
Created July 14, 2014 09:51
select절을 사용하듯 딕셔너리 리스트에서 특정 키값으로 가리킬 수 있는 컬럼만 추출하려면?
__author__ = 'cinos81'
if __name__ == '__main__':
testList = [{'a': 1, 'b': 2}, {'a': 'a', 'b': 'b'}]
print testList
subsetList = [{key: value for key,value in record.items() if key == 'a'} for record in testList]
print subsetList