Dev Language
-
전각문자(full-width) 로 변경 코드Dev Language/Python 2022. 4. 18. 20:37
def convert_full_witdh_char(line) : """ Converts characters to full-width characters Args: line(string) : mixed characters(half-width, full-width)) Return: string : only full-width characters exist """ def convert(x): unicode_x = ord(x) if 0x21
-
python code를 cython compile / deployDev Language/Python 2020. 4. 24. 22:17
python 모듈을 간단히 개발하여, 팀 내부에 공유해야 할 일이 생겼다. 그 모듈내 db connection 정보가 있어서, code를 그대로 공유하게 되면 db 접속용 id, pwd도 그대로 노출되게 되었다. 방법을 고민했다. 코드 난독화python compile 후 .pyc 공유cython compile 후 .so 공유 코드 난독화는 id, pwd 정보도 난독화 하게 되어, db connection이 제대로 이루어지지 않을거 같아서 제외했다. python comple output 이든, cython comple ouput이든 reverse engineering(decompile) 해버리면 code는 보여지게 된다. (난독화 후 compile 하는 방법도 있을 것이다. )그러나 결국은 reverse ..
-
SQLAlchemyDev Language/Python 2020. 3. 6. 08:31
Overview Database Oracle PostgresSQL MySQL SQLite Microsoft SQL Server External Dialects ibm_db_sa - driver for IBM DB2 and Informix. PyHive - driver for Apache Hive and Presto. teradatasqlalchemy - driver for Teradata Vantage. pybigquery - driver for Google BigQuery. sqlalchemy-redshift - driver for Amazon Redshift, adapts the existing PostgreSQL/psycopg2 driver. sqlalchemy-drill - driver for A..
-
python libraryDev Language/Python 2020. 3. 3. 23:06
Html Library lxml : http://lxml.deHTML Parser : https://docs.python.org/3/library/html.parser.htmlBeautifulSoup : https://www.crummy.com/software/BeautifulSoup/bs4/doc/- Hive Clientimpyla : https://github.com/cloudera/impylarequirement : thrift_sasl == 0.2.1PyHive : https://github.com/dropbox/PyHive Networkscapy : network packer 조작. https://scapy.net
-
Code ConventionDev Language/Python 2020. 2. 10. 23:02
PEP 8 "Style Guide for Python Code" : https://www.python.org/dev/peps/pep-0008/ PEP 8 -- Style Guide for Python Code The official home of the Python Programming Language www.python.org google python style guide : http://google.github.io/styleguide/pyguide.html styleguide Style guides for Google-originated open-source projects google.github.io pylint