This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# r 또는 R 을 문자열 가장 앞에 붙여 주면 raw string으로 인식합니다. | |
assert '\\Programing Files\\Common Files' == r'\Programing Files\Common Files' | |
assert '\\Programing Files\\Common Files' == R'\Programing Files\Common Files' | |
# raw string에서 \는 마지막 문자로는 사용할 수 없습니다. | |
# r'\' 또는 r'some string\' 은 구문 오류가 납니다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
# os.sep는 각 운영체제별 경로 구분자가 지정되어 있습니다. | |
program_files_common_files = os.path.join(os.sep, 'Program Files', 'Common Files') | |
assert ('/Program Files/Common Files' if os.sep == '/' else '\\Program Files\\Common Files') == program_files_common_files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" href="http://shjs.sourceforge.net/css/sh_ide-eclipse.min.css" type="text/css"/> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script src="http://shjs.sourceforge.net/sh_main.min.js"></script> | |
<script src="http://shjs.sourceforge.net/lang/sh_html.min.js"></script> | |
<script src="http://shjs.sourceforge.net/lang/sh_cpp.min.js"></script> | |
<script src="http://shjs.sourceforge.net/lang/sh_c.min.js"></script> | |
<script src="http://shjs.sourceforge.net/lang/sh_python.min.js"></script> | |
<script src="http://shjs.sourceforge.net/lang/sh_ruby.min.js"></script> | |
<script src="http://shjs.sourceforge.net/lang/sh_javascript.min.js"></script> | |
<script src="https://raw.github.com/gist/1589565/1890acf64804527f6c323a7dff8ac4523c0a6e14/jquery.github.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
sh_languages['c++'] = sh_languages['cpp']; | |
$.shjs = function(codes, language) { | |
var lang = sh_languages[language.toString().toLowerCase()]; | |
return $('<pre>').text(codes).each(function() { | |
sh_highlightElement(this, lang); | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$.github = function(method, id, callback) { | |
return $.ajax('https://api.github.com' + method + '/' + id, { | |
cache : true, | |
dataType : 'jsonp', | |
success : function(data) { | |
if(data.meta.status != 200) { | |
return console.error(data.meta); | |
} | |
return callback(data.data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" href="http://shjs.sourceforge.net/css/sh_ide-eclipse.min.css" type="text/css"/> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script src="http://shjs.sourceforge.net/sh_main.min.js"></script> | |
<script src="http://shjs.sourceforge.net/lang/sh_html.min.js"></script> | |
<script src="http://shjs.sourceforge.net/lang/sh_cpp.min.js"></script> | |
<script src="http://shjs.sourceforge.net/lang/sh_c.min.js"></script> | |
<script src="http://shjs.sourceforge.net/lang/sh_python.min.js"></script> | |
<script src="http://shjs.sourceforge.net/lang/sh_ruby.min.js"></script> | |
<script src="http://shjs.sourceforge.net/lang/sh_javascript.min.js"></script> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* removes google hot topics */ | |
$('head').append('<style type="text/css">dl#ht {display:none}</style>'); |
NewerOlder