티스토리

검색하기내 프로필

블로그 홈

nAAAms

구독자
0

구독하기 방명록
신고

주요 글 목록

  • 11. 업무자동화 관련 module글 내용

    웹크롤링 HTML parsing 기반 import requests from bs4 import BeautifulSoup as bp 사람 Action 기반 from selenium import webdriver

    좋아요0
    댓글0작성시간2019. 11. 20.
  • 5일차 정규식글 내용

    정규식 기본반복 메타 문자 * 0회 이상 반복 ap*le > apple, ale, aple + 1회 이상 반복ap+le > apple, aple ? 0회 또는 1회 ap?le > aple, ale {m} m회 반복 ap{2}le > apple {m,n} m회부터 n회까지 반복ap{2,4}le > apple, appple, apppple 매칭 메타 문자 . 줄바꿈 문자를 제외한 모든 문자와 매치됨 ki.i > kiwi, ki3i, ki#i ^ 문자열의 시작과 매치됨 input - "apple kiwi banana"output - ^ap > ap $ 문자열의 마지막과 매치됨 input - "apple kiwi banana"output - nana$ > nana [] 문자 집합 중 한 문자를 의미이 안에 있는..

    좋아요0
    댓글0작성시간2018. 7. 13.
  • 4일차 sqlite글 내용

    import sqlite3 def createTable(): # 없으면 만들고 connect, 있으면 connect try: sql = "create table if not exists student(name varchar(20), age int)" db = sqlite3.connect('my.db') db.execute(sql) db.commit() # sql 명령 확정 # db.rollback() # sql 명령 취소 db.close() print('create success') except Exception as err: print('에러: ', err) def insertTable(): try: db = sqlite3.connect('my.db') sql = "insert into student(..

    좋아요0
    댓글0작성시간2018. 7. 12.
  • 4일차 python 확장 - C 언어글 내용

    Python 에서 C Library 사용python 이 32bit 기본설치의 경우 아래의 경로에 python 관련 파일들이 존재함%LocalAppData%\Programs\Python\Python37-32 C 로 작성된 DLL 을 python 에서 활용하기DLL 만들기 Visual Studio Community 설치 (C++ 개발환경)빈프로젝트 생성, 프로젝트 이름을 dll 파일명과 동일하게 하기파일 생성, 파일명도 dll 파일명과 동일하기 하기 솔루션 구성 - Release, 솔루션 플랫폼 - 64bit or 84bit 설정하기프로젝트 > 속성 > C/C++ 탭 > 추가 포함 디렉터리에 아래 경로 포함 %LocalAppData%\Programs\Python\Python37-32\include프로젝트 >..

    좋아요0
    댓글0작성시간2018. 7. 12.
  • 3일차 library글 내용

    librarylibrary 설치방법파이참 > ctrl + alt + s 눌러 셋팅 창 띄움Project > Project interpreter 선택 > + 버튼 선택 > packet 검색 및 설치 Object Serializationpicklepickle.loadpickle.dump DBshelve - DB. dict처럼 사용 엑셀 파일 제어xlsxWriter: 쓰기전용openpyxl: 읽기 쓰기 가능 (library 설치 필요)import openpyxl # overwritewb = openpyxl.Workbook()ws1 = wb.activews1.title = 'sheet1'ws2 = wb.create_sheet('sheet2') ws1['A1'] = 10ws1['B1'] = 20ws1['C1'] ..

    좋아요0
    댓글0작성시간2018. 7. 11.
  • 3일차 Class글 내용

    Classclass Test: # 모든 class 는 object 를 상속받고 있음 def __new__(cls): # class method print('new call') return object.__new__(cls) # object class 의 객체생성 def __init__(self): #생성자 print('init call') self.a = 10 self.b = 20 def __del__(self): #소멸자 print('destory') @staticmethod def staticFunc(): # self 가 없으면 static 함수 print('call staticFunc') obj = Test() # 힙영역에 Test 메모리 할당되고 다음 두 과정이 수행됨## 1. obj = Test..

    좋아요0
    댓글0작성시간2018. 7. 11.
  • 2일차 module글 내용

    moduledef hap(a, b):return a + b; import mymodule # py, pyc, pydmymodule.hap(1, 2)# pyc 는 compile 된 binary module: "python -m py_compile mymodule.py" 명령어로 생성가능# pyd 는 python dll 로 c로 만든 파이썬 library# import 하고자 하는 module 은 sys.path 내에 있어야 함 (sys.path.append('경로') 로 추가 후 사용가능) import 방법import mymodule as mm.hap(1, 2) from mymodule import haphap(1, 2) from mymodule import * # 패키지로 recursive하게 파일이 있..

    좋아요0
    댓글0작성시간2018. 7. 10.
  • 1일차글 내용

    교육위한 설치 프로그램들파이썬 인터프리터파이참 Edu - 무료버전. 프로페셔널 대비 웹개발 관련 기능 빠짐. Community 버전 이후 나온 것으로 동일함신규 프로젝트 생성 시, virtualenv 에 기존의 python 인터프리터의 내용을 복사해서 사용한다.이 부분이 싫으면 Existing interpreter > System Interpreter 를 활용하면 기존에 설치된 인터프리터를 사용한다 파이참 단축키ctrl + shift + f10 : Runctrl + / : 주석처리 데이터타입기본데이터 - 정수, 실수, bool, 복소수, None복합데이터 - str, bytes, 리스트,튜플, 세트, 딕셔너리 False => None, 0, '', [] 비어있는 애들은 모두 False 로 간주됨 순서있는..

    좋아요0
    댓글0작성시간2018. 7. 9.
  • Windows10 에서 Samba 접속 불가 해결글 내용

    Windows 10에서 Linux서버의 samba 폴더 탐지 불가. (경로를 찾지 못하는 현상)samba 버젼은 4.x인 경우 Windows 10 에서 미지원하기 때문 Windows Powershell(관리자) 실행 방법: Windows + x > a 아래 명령어 수행 powershell.exe -Executionpolicy Bypass -command "Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 0 -Force" powershell.exe -Executionpolicy Bypass -command "sc.exe config lanmanworkst..

    좋아요3
    댓글0작성시간2018. 1. 28.
  • RSAES-OAEP encrypt / decrypt글 내용

    RSAES-OAEP-ENCRYPT ((n, e), M, L)RSAES-OAEP-DECRYPT defined by PKCS #1 v2.1: RSA Cryptography Standard 다음 함수들을 사용하면 위 작업 가능https://www.openssl.org/docs/man1.0.2/crypto/RSA_private_decrypt.htmlRSA_public_encrypt ()RSA_private_decrypt ()https://github.com/openssl/openssl/blob/master/crypto/rsa/rsa_oaep.c RSA_padding_add_PKCS1_OAEP_mgf1 ()RSA_padding_check_PKCS1_OAEP_mgf1 ()Encrypt 과정은 아래와 같이 풀어 쓸 ..

    좋아요2
    댓글0작성시간2018. 1. 24.
  • RSASSA PKCS1 v1.5글 내용

    RSASSA-PKCS1-v1_5 as defined by PKCS #1 V2.1: RSA Cryptography Standard.SHA-256 is the underlying hash function referencehttps://www.bmt-online.org/geekisms/RSA_verifyhttps://www.openssl.org/docs/manmaster/man3/RSA_sign.htmlhttps://www.openssl.org/docs/man1.1.0/crypto/RSA_size.htmlhttps://www.openssl.org/docs/man1.0.2/crypto/BIO_s_mem.htmlhttps://www.openssl.org/docs/man1.1.0/crypto/PEM_read_bio..

    좋아요0
    댓글0작성시간2018. 1. 24.
  • HMAC-SHA256글 내용

    HMAC-SHA256 #include #include #include //for ERR_error_string()#include //for SHA256_DIGEST_LENGTH#include void main(){ gint i; guint md_len; guint8 md[SHA256_DIGEST_LENGTH]; guint8 src[] = "abc"; guint8 key[] = "key"; guint8 expected[32] = { 0x9C, 0x19, 0x6E, 0x32, 0xDC, 0x01, 0x75, 0xF8, 0x6F, 0x4B, 0x1C, 0xB8, 0x92, 0x89, 0xD6, 0x61, 0x9D, 0xE6, 0xBE, 0xE6, 0x99, 0xE4, 0xC3, 0x78, 0xE6, 0x83,..

    좋아요0
    댓글0작성시간2018. 1. 24.
  • SHA256글 내용

    openssl SHA256 #include #include #include void main(){ gint i; guint8 src[] = "abc"; guint8 dest[SHA256_DIGEST_LENGTH]; guint8 expected_sha256_of_abc[32] = { 0xBA, 0x78, 0x16, 0xBF, 0x8F, 0x01, 0xCF, 0xEA, 0x41, 0x41, 0x40, 0xDE, 0x5D, 0xAE, 0x22, 0x23, 0xB0, 0x03, 0x61, 0xA3, 0x96, 0x17, 0x7A, 0x9C, 0xB4, 0x10, 0xFF, 0x61, 0xF2, 0x00, 0x15, 0xAD }; /* https://www.openssl.org/docs/man1.0.2/crypt..

    좋아요0
    댓글0작성시간2018. 1. 24.
  • AES-CTR글 내용

    openssl 을 활용한 AES-CTR (key, IV) reference: https://www.openssl.org/docs/manmaster/man3/EVP_EncryptInit_ex.html #include #include #include //for AES_BLOCK_SIZE#include //for ERR_error_string()#include static gboolean encrypt_data_by_aes_ctr (guint8 **out_data, gint *out_data_len, guint8 *in_data, gint in_data_len, guint8 *key, guint8 *iv){ gboolean ret = FALSE; EVP_CIPHER_CTX *ctx = NULL; gint c_..

    좋아요0
    댓글0작성시간2018. 1. 24.
  • Windows Subsystem for Linux Documentation글 내용

    Windows 10 에서 Ubuntu Shell / Bash 사용하기https://msdn.microsoft.com/commandline/wsl/about?ocid=TipsApp_Ver2_Bash_WSL 설치가이드https://msdn.microsoft.com/commandline/wsl/install-win10 $ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 16.04.3 LTSRelease: 16.04Codename: xenial

    좋아요0
    댓글0작성시간2017. 11. 6.
  • ubuntu configure 시 dependency 자동설치글 내용

    http://www.howtogeek.com/106526/how-to-resolve-dependencies-while-compiling-software-on-ubuntu/ sudo apt-get install auto-aptsudo auto-apt updatesudo auto-apt updatedb && sudo auto-apt update-localsudo auto-apt run ./configure sudo apt-get install apt-fileapt-file search "filename" -l

    좋아요0
    댓글0작성시간2016. 12. 5.
  • Ubuntu 한글입력글 내용

    go to terminal, and type ibus-setup click the "input method" tab, and add "Korean - Hangul". go to "System Settings" -> "Text Entry" and add "Korean - Hangul" sudo vi /bin/xkorkeymap아래 내용 입력 후 저장xmodmap -e 'keycode 105 = Hangul_Hanja' xmodmap -e 'keycode 108 = Hangul' xmodmap -e 'remove mod1 = Hangul' xmodmap -e 'remove control = Hangul_Hanja' sudo chmod +x /bin/xkorkeymap hud 에서 'gnome session'..

    좋아요0
    댓글0작성시간2016. 1. 17.
  • [빌드 환경] glib openssl글 내용

    glib.h glib-object.hopenssl/crypto.h 위와 같은 header 를 포함하기 위해서는 아래 package 설치해야함sudo apt-get install glib2.0-dev sudo apt-get install libssl-dev makefile 내용CC = gccCFLAGS = -g -O0 $(shell pkg-config --cflags glib-2.0) $(shell pkg-config --cflags gobject-2.0) $(shell pkg-config --cflags openssl)LDFLAGS = -lm $(shell pkg-config --libs glib-2.0) $(shell pkg-config --libs gobject-2.0) $(shell pkg-conf..

    좋아요0
    댓글0작성시간2015. 7. 11.
  • Eclipse 환경설정글 내용

    한글사용하기http://deviantcj.tistory.com/501 페이지 참고 C 개발환경 구축을 위한 eclipse 환경설정 sudo apt-get install eclipse eclipse-cdt glib 사용하기pkg-config plugin 설치 http://marketplace.eclipse.org/content/pkg-config-support-eclipse-cdt help > install new software... > work with : http://petrituononen.com/pkg-config-support-for-eclipse-cdt/updatepkg-config 설치 후 eclipse 재시작 > Project 생성 > Project 우클릭 > Properties > C/C..

    좋아요0
    댓글0작성시간2015. 5. 7.
  • 10. Unit Test글 내용

    import unittest 클래스 생성 시 unittest.TestCase 상속받아 클래스 정의 #-*- coding:ms949 -*-import unittest class MyMath: @staticmethod def mySum(n): nSum = 0 for n in range(1,n+1): nSum += n return nSum @staticmethod def hap(a,b): return a+b class MyMathUnitTest(unittest.TestCase): def setUp(self): #unit test 시작 시 호출됨 print("start unit Test") def tearDown(self): #unit test 종료 시 호출됨 print("end unit Test") def t..

    좋아요0
    댓글0작성시간2015. 3. 13.
문의안내
  • 티스토리
  • 로그인
  • 고객센터
© Kakao Corp.