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
namespace Manny; | |
/** | |
* SQLite Connection Manager | |
* | |
*/ | |
class Sqliter | |
{ | |
protected $sqlite = null; |
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
def strip_for_json(jstr): | |
""" | |
strip any unnecessary characters from string | |
to make it a json string. | |
does not garantee the returened string is a real json string. | |
just for next process. | |
""" | |
occupied = [('[',']'),('{','}')] |
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
https://engineering.soroco.com/building-large-scale-systems-and-products-with-python/ | |
아래 내용은 위 URL 에 나온 Soroco 라는 페이지의 회사의 경험을 참고하여 요약한 것임 | |
1. Dynamic Type 언어의 취약점 벗어나기 | |
PEP484 (Type Hint) 의 룰을 따라 코딩한다. | |
mypy 를 이용하여 PEP484 룰을 강제한다 |
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
<?php | |
/** | |
* @param $string | |
* @return bool | |
* | |
* 대한민국 이름인지 체크 | |
* 대법원 가족관계등록예규 제109호에 의하면 이름 글자수는 성을 제외하고 5자를 넘을 수 없다. | |
* | |
*/ |
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
<?php | |
/** | |
* @param $url | |
* @param bool $validate | |
* @return string | |
*/ | |
function get_linkable_url($url, $validate = true) | |
{ |