반응형
반응형



조용하고 키감 좋은 키보드 / 로지텍 Keys to go 리뷰


올해 맥북 프로 사고, 캐논 카메라 사고 이제 전자제품 안 살 줄 알았더니 블루투스 키보드를 잃어버렸습니다! ^^ 아이패드 프로를 구입한 이후 2만원짜리 Pisnet키보드(http://bitly.kr/WfKm3)를 3-4년간사용했었고 사용하면서 특별히 불편했던 점은 없었는데 굳이 몇 개 꼽아보자면 1. 시끄러운 타이핑 소리 : 특히 강의 들으면서 타이핑하는 일이 종종 있었는데 그 소리까지 녹음되어서 상당히 신경 쓰였다는 점 2. 키보드가 미끄러워서 별도의 밀림 방지 스티커가 필요 : 타이핑 할 때 고정이 되어 있어야하는데 움직이는게 불편했습니다. 사실 이 정도 말곤 더 없어서 가성비로 최고로 잘 쓰고 잃어버린 것 같다는 생각이 듭니다. 




여튼 고심하다가 로지텍 Keys to go 키보드(https://www.apple.com/kr/shop/product/HLPU2ZP/A/logitech-keys-to-go-ultra-slim-keyboard-with-iphone-stand?fnode=3e)를 질러버렸습니다. 사실 이 제품말고 애플 키보드와 비슷한 디자인의 카넥스 키보드(http://bitly.kr/uxAcg)를 찾아봤었는데 로지텍으로 결정한 이유는 조용한 타이핑! 시끄럽지 않아야 한다는 점이 가장 컸어요. 도서관이나 독서실에서도 쓸 수 있을 정도로 진-짜 조용합니다. (디자인은 사실 카넥스 키보드도 너무 이뻐서 끌렸음) 심지어 로지텍 Keys to go는 위에 Logi 로고가 없는 것은 구버전, 있는 건 신버전인데 애플에서만 팔고 있었고, 구버전은 직구로 5만원 대에 살 수 있었으나 2주나 기다리는 비용이 컸으므로 그냥 공식 홈페이지에서 7.9에 그냥 샀습니다. (대신 black밖에 없음)




크기는 아이패드 프로 9.7 인치의 가로 길이와 똑습니다.



이거 부러질 것 같다고 말하는 사람 많았는데 나는 그냥 막부러질 것 같지 않던데.. 






타이핑 해보니까 정말 조용했었고, 아직은 저 실리콘 키스킨이 새거라서 그런지 조금 꾹꾹 눌러야 한다는 느낌이 들긴 합니다.

뭐 오래치다보면 사라질 것 같음!



출처 내 지갑

반응형

화딱지나니까 정리한다. 

 

현상 : 2017년형 맥북 프로 13인치 최신버전에서 PDF 파일 공유가 안되는 현상 

- 현재 확인된 것은 PDF 파일 전송시에만 파일 전송실패 얼럿이 지속적으로 노출되며, PPT나 PNG 파일과 같은 형식은 잘 전송됩니다.

 

어드바이저를 통해서 최초로 문의 접수 후 해본 내용들

1) wifi 끄고 10초 뒤에 켜기
결과 : 안됨 


2) bluetooth 끄고 10초 뒤에 켜기 
결과 : 안됨


3) PRAM 초기화하기
결과 : 안됨 
NVRAM 재설정 :
맥북 시동시 command + option + P + R 버튼을 동시에 눌러서 진행을 하시는 작업(이게 블루투스 관련 장치 리셋하는 방법)입니다.  관련문서:Mac에서 NVRAM을 재설정하는 방법 -  
https://support.apple.com/ko-kr/HT204063   



4) OS 재설치하기
결과 : 처음에는 되는 것 같으나 이후에는 다시 안됨


5) 로그인 계정 새로 생성해보기
결과 : 처음에는 되는 것 같으나 이후에는 다시 안됨
새로운 사용자 계정에서 확인하기 :
시스템 환경설정> 사용자 및 그룹에서 새롭게 사용자 하나를 추가하셔서 새로운 사용자에서  정상적으로 작동이 되는지 확인해 보시면 됩니다. (저는 처음엔 잘되는 것 같아서 주계정으로 바꾸니까 다시 PDF 전송이 안됐음)



6) 공장 초기화하기 
결과 : 처음에는 되는 것 같으나 소프트웨어 설치 이후 안됨.
클린 재설치 
1. 부팅 시 Command+R +option 키를 꾹 눌러서 복구모드로 진입 합니다. 
2. 복구모드에 진입 하시면 4가지 옵션이 있는데요, 맨 아래에 있는 디스크 유틸리티로 진입 합니다. 진입 후 매킨토시 선택하시고 오른쪽에서 <지우기>를 합니다. 포맷형식은 APFS 으로 하시고 적용 하시면 됩니다. 
3. 포맷이 완료가 되면 디스크 유틸리티를 종료하고 다시 복구모드 화면에서 두번째< OS X 다시 설치>를 선택 하셔서 안내에 따라 설치 하시면 됩니다.

7) 맥북 프로 메인보드 교체 
결과 : 안됨 (교체 이유는 블루투스와 관련된 장치들이 메인보드에 모두 붙어있기 때문)


8) 맥북/아이패드 로그 분석 요청
결과 : 원인 파악 불가


9) A/S 센터 방문 후, 내부 프로그램 정상 작동여부 확인
결과 : 정상


10) 아이클라우드 끄고 PDF 파일 전송 시도해보기
결과 : 안됨

 

특히, 공장 초기화는 2회나 실시했음에도 불구하고 이후 다시 안되는 현상 발생

당시 설치한 소프트웨어 프로그램 : Office 365 학생용(정품), 카카오톡, 크롬, 맥북용 한글(정품)

 

딱 4개 설치하고서 조금 사용하면 PDF 전송만 안됨. 받는건 그렇게 잘되면서 왜 PDF파일만 안되냐?..

(최초 접수 했을때, 내부 소프트웨어를 잘못 설치하면 그렇게 될 수 있다고 해서 다 정품사서 깔았는데 안됨)

 

더 화딱지나는건 애플 공식 홈페이지를 통해서 구입했고, 2주가 지나서 교환이나 반품이 안됐음ㅋㅋㅋ

본인은 딱 3주 지나서 테스트해봤는데 안된거라 어쩔 수가 없다고ㅋ

----------------------------------------------------------------------------------------------------------------------

 

1월 24일 애플케어 후기

11월부터 1월 24일 전까지 했던 어드바이저가 요청한 모든 짓은 위에 다 열거 되어있으므로..

오늘 날짜로 AS 받은 내용들을 정리해보면 현재 새 로그인 계정을 만들어서 사용 중이며 예전에 PDF 파일 전송에 성공했던 파일(통계연보)은 정상적으로 전달이 되었으나 새로 다운로드 받은 다른 PDF 파일(안전탄력성)에 대해서는 다시 Airdrop 실패남! (맥에서 아이패드로  전송 시, 맥에서 아이폰으로 전송 시에도 실패) 모두 실패가 되자 맥북 로그 취합을 한번 더 해갔으며 (맥북과 아이패드에 대해서 각각 로그 취합, 아이패드는 홈버튼과 전원 버튼을 누른 상태로 5초 기다리면 로그 수집 모드로 변경됨) 로그 취합 및 전송은 10분 정도 소요되었고, 메일로 전송된 로그 파일 업로드 url을 통해서 전달했음! 또한, 최초 접수 시 모든 파일이 airdrop이 안됐는데 현재는 어떤건 되고 어떤 파일은 안되는 현상으로 현상이 변경됨.

 

지난 주에는 아이클라우드 문제일 수 있다며 아이클라우드 끄고나서 로그를 한번 더 수집해가더니 이제 와서 또 수집 ㅋㅋ ㅋ

로그 수집만 3주째 하는게 말이되는지 (말이되는 소릴 하고 자빠졌어ㅠㅠㅠㅠㅠㅠㅠㅠㅠ)

 

 

2월 21일 애플케어 후기

 

 

ㅋㅋㅋㅋ현재 맥북 구입한지 4개월 째! 애플쪽에 로그 넘겨서 확인해본다고 하고서 결과 전달하러 전화 왔을 때, 맥북/아이패드/아이폰에 업데이트 버전이 새롭게 나왔으니까 그거 새로 깔아보라고 함. 무려 2.번.이.나 그래서 화가 치밀어서 "고쳐달란거 고쳐달라니까, 매번 애플 소프트웨어 업데이트 기다리면서 개선되길 기다려야하는거냐, 내가 지금 4개월째 매달려서 받을 수 있는 대답이 이게 다냐, 애플 맥북 산 이유가 PDF나 파일 전송이 제일 커서 제품들 다 이걸로 맞춘것도 과언이 아닌데 지금 나보고 매번 소프트웨어 업데이트 기다리라고 하는건지 궁금하다. 누가 그리고 4개월째 A/S 팔로업을 이렇게 하냐 진짜 나에게 중요한 기능이니까 그런거아니냐, 이런 식으로 매번 로그만 가져가고 애플 소프트웨어 업데이트때마다 업데이트하라고 가이드 줘놓고선 우리는 최선을 다했다며 책임 회피하는 것 아니냐ㅠㅠㅠㅠㅠ"하며 불만을 말했습니다..

이후, 3번째 로그를 취합해가더라구요.(1/29, 1/31 전화 함) 앞으론 절대 로그 취합을 요청하는 일이 없을 것이라면서 죄송하다면서 미국 본사쪽에 로그를 가져가겠다고요. (그러고서 아직 연락 없다..)

 

+ 증상 추가

근데 나 또 이상한거 발견했는데! 맥북 13인치 왼쪽에 C타입 포트가 2개가 있는데, 첫번째 포트에 HDMI 케이블을 꽂아서 외부 모니터(디스플레이) 연결 시 인터넷이 안되는 현상있음ㅋㅋㅋㅋㅋㅋㅋㅋ 첫번째에 맥북 충전기 꽂아두고, 두번째 C타입에 HDMI 케이블 연결되는거 꽂으면 안그럼ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ나 동영상 ㄷㅏ 찍어뒀다..

 

4개월 만에 A/S 종료 후기

결국 애플은 본사까지 메일을 보내서 엔지니어링 OS 담당팀으로 넘겼으나 문제를 해결하지 못해서 애플 OS 업데이트를 기다리라가 최종 답변ㅋㅋ 4개월간 에러 고치기 위해서 내가 이렇게까지 노력하고 고생했고 A/S 팔로업 한 것에 대해서 애플 케어 서비스 기간 연장을 요구(왜냐면 난 맥북받고 3주만에 안됐고 이거 때문에 AS센터만 들락거리기를 여러번.. 그리고 13인치로 바꾸기 전에 구입한 15인치 맥북 프로에선 전혀 이런 문제 없이 잘 썼었음..)했으나 그런 경우는 지금까지 한번도 없었고 그렇게까지 보상할 수 없다고 함.. 너무 허무하다..ㅠ_ㅠ 근데 해외 커뮤니티에서도 에어드롭 실패 현상에 관한 것은 정말 글이 많은데.. 제발 좀 밝혀졌으면.. 

 

 

반응형
  • 불 대수는 하나의 명제가 '참' 또는 '거짓'인가를 판단하는데 이용되는 수학적인 방법이다.
  • 영국의 수학자 불(G. Boole)에 의해 개발되었다.
  • 디지털 컴퓨터는 참과 거짓을 나타내는 1(참)과 0(거짓)의 두 가지 상태로만 표현하여 처리하는 2진(Binary) 논리회로로 구성되었고, 이때 불 대수가 사용된다.
1) 기본적인 논리 함수

AND

OR 

NOT 

A       B

A AND B

A       B

A OR B 

A

NOT B 

0       0

 0

0       0

 0

 0

 1

0       1

 0

0       1

 1

 1

 0

1        0

 0

1        0

 1

 

 

1        1

 1

1        1 

 1

 

 


AND
  • 입력 정보 값이 모두 1일 때 1이 출력된다.
  • 표현식 : 
OR
  • 입력 정보 값이 하나라도 1이면 1이 출력된다.
  • 표현식 : 
NOT
  • 입력되는 정보의 반대값이 출력된다.
  • 입력되는 값이 항상 1개이다.
  • 표현식 : 

2) 불 대수의 기본 공식


 법칙명

 예제

 비고

 
교환법칙

 

 

 
결합법칙

 

 


분배법칙

 

  A+B*C=(A+B)*(A+C)는 일반 대수식에서는 성립하지 않으므로 그냥 외울 것


멱등법칙

 

 


보수법칙

 

 


항등법칙

 

 


콘센서스

 

 


드모르강

 

 


복원법칙

 

 


3) 논리식의 간소화


불 대수의 기본 공식을 이용하여 간소화하면 된다.

  1. 합의 곱 표현곱의 합 표현으로 변환한다.
  2. 공통 인수를 뽑아 묶는다.
  3. 멱등법칙, 보수법칙, 항등법칙 등의 기본 공식 형태로 유하여 줄여 나간다.

4) 카르노 맵 (카르노 도, Karnaugh Map) 이용하기

  • 카르노 맵은 설계된 논리식을 도표로 표현하여 최소화하는 방법이다.
  • 카르노 맵은 변수 (입력선)의 개수에 따라 표의 크기가 달라지며 칸의 위치에 따라서 각 칸의 불 함수가 정해진다.


참고

  • https://en.wikipedia.org/wiki/Boolean_algebra


반응형

아파치 2.4.25 conf 파일 


# # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See for detailed information.

# In particular, see # # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/access_log" # with ServerRoot set to "/usr/local/apache2" will be interpreted by the # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" # will be interpreted as '/logs/access_log'. # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk, be sure to specify a local disk on the # Mutex directive, if file-based mutexes are used. If you wish to share the # same ServerRoot for multiple httpd daemons, you will need to change at # least PidFile. # ServerRoot "/usr" # # Mutex: Allows you to set the mutex mechanism and mutex file directory # for individual mutexes, or change the global defaults # # Uncomment and change the directory if mutexes are file-based and the default # mutex file directory is not on a local disk or is not appropriate for some # other reason. # # Mutex default:/private/var/run # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 80 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # LoadModule authn_file_module libexec/apache2/mod_authn_file.so #LoadModule authn_dbm_module libexec/apache2/mod_authn_dbm.so #LoadModule authn_anon_module libexec/apache2/mod_authn_anon.so #LoadModule authn_dbd_module libexec/apache2/mod_authn_dbd.so #LoadModule authn_socache_module libexec/apache2/mod_authn_socache.so LoadModule authn_core_module libexec/apache2/mod_authn_core.so LoadModule authz_host_module libexec/apache2/mod_authz_host.so LoadModule authz_groupfile_module libexec/apache2/mod_authz_groupfile.so LoadModule authz_user_module libexec/apache2/mod_authz_user.so #LoadModule authz_dbm_module libexec/apache2/mod_authz_dbm.so #LoadModule authz_owner_module libexec/apache2/mod_authz_owner.so #LoadModule authz_dbd_module libexec/apache2/mod_authz_dbd.so LoadModule authz_core_module libexec/apache2/mod_authz_core.so #LoadModule authnz_ldap_module libexec/apache2/mod_authnz_ldap.so LoadModule access_compat_module libexec/apache2/mod_access_compat.so LoadModule auth_basic_module libexec/apache2/mod_auth_basic.so #LoadModule auth_form_module libexec/apache2/mod_auth_form.so #LoadModule auth_digest_module libexec/apache2/mod_auth_digest.so #LoadModule allowmethods_module libexec/apache2/mod_allowmethods.so #LoadModule file_cache_module libexec/apache2/mod_file_cache.so #LoadModule cache_module libexec/apache2/mod_cache.so #LoadModule cache_disk_module libexec/apache2/mod_cache_disk.so #LoadModule cache_socache_module libexec/apache2/mod_cache_socache.so #LoadModule socache_shmcb_module libexec/apache2/mod_socache_shmcb.so #LoadModule socache_dbm_module libexec/apache2/mod_socache_dbm.so #LoadModule socache_memcache_module libexec/apache2/mod_socache_memcache.so #LoadModule watchdog_module libexec/apache2/mod_watchdog.so #LoadModule macro_module libexec/apache2/mod_macro.so #LoadModule dbd_module libexec/apache2/mod_dbd.so #LoadModule dumpio_module libexec/apache2/mod_dumpio.so #LoadModule echo_module libexec/apache2/mod_echo.so #LoadModule buffer_module libexec/apache2/mod_buffer.so #LoadModule data_module libexec/apache2/mod_data.so #LoadModule ratelimit_module libexec/apache2/mod_ratelimit.so LoadModule reqtimeout_module libexec/apache2/mod_reqtimeout.so #LoadModule ext_filter_module libexec/apache2/mod_ext_filter.so #LoadModule request_module libexec/apache2/mod_request.so #LoadModule include_module libexec/apache2/mod_include.so LoadModule filter_module libexec/apache2/mod_filter.so #LoadModule reflector_module libexec/apache2/mod_reflector.so #LoadModule substitute_module libexec/apache2/mod_substitute.so #LoadModule sed_module libexec/apache2/mod_sed.so #LoadModule charset_lite_module libexec/apache2/mod_charset_lite.so #LoadModule deflate_module libexec/apache2/mod_deflate.so #LoadModule xml2enc_module libexec/apache2/mod_xml2enc.so #LoadModule proxy_html_module libexec/apache2/mod_proxy_html.so LoadModule mime_module libexec/apache2/mod_mime.so #LoadModule ldap_module libexec/apache2/mod_ldap.so LoadModule log_config_module libexec/apache2/mod_log_config.so #LoadModule log_debug_module libexec/apache2/mod_log_debug.so #LoadModule log_forensic_module libexec/apache2/mod_log_forensic.so #LoadModule logio_module libexec/apache2/mod_logio.so LoadModule env_module libexec/apache2/mod_env.so #LoadModule mime_magic_module libexec/apache2/mod_mime_magic.so #LoadModule expires_module libexec/apache2/mod_expires.so LoadModule headers_module libexec/apache2/mod_headers.so #LoadModule usertrack_module libexec/apache2/mod_usertrack.so ##LoadModule unique_id_module libexec/apache2/mod_unique_id.so LoadModule setenvif_module libexec/apache2/mod_setenvif.so LoadModule version_module libexec/apache2/mod_version.so #LoadModule remoteip_module libexec/apache2/mod_remoteip.so #LoadModule proxy_module libexec/apache2/mod_proxy.so #LoadModule proxy_connect_module libexec/apache2/mod_proxy_connect.so #LoadModule proxy_ftp_module libexec/apache2/mod_proxy_ftp.so #LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so #LoadModule proxy_fcgi_module libexec/apache2/mod_proxy_fcgi.so #LoadModule proxy_scgi_module libexec/apache2/mod_proxy_scgi.so #LoadModule proxy_wstunnel_module libexec/apache2/mod_proxy_wstunnel.so #LoadModule proxy_ajp_module libexec/apache2/mod_proxy_ajp.so #LoadModule proxy_balancer_module libexec/apache2/mod_proxy_balancer.so #LoadModule proxy_express_module libexec/apache2/mod_proxy_express.so #LoadModule proxy_hcheck_module libexec/apache2/mod_proxy_hcheck.so #LoadModule session_module libexec/apache2/mod_session.so #LoadModule session_cookie_module libexec/apache2/mod_session_cookie.so #LoadModule session_dbd_module libexec/apache2/mod_session_dbd.so LoadModule slotmem_shm_module libexec/apache2/mod_slotmem_shm.so #LoadModule slotmem_plain_module libexec/apache2/mod_slotmem_plain.so #LoadModule ssl_module libexec/apache2/mod_ssl.so #LoadModule dialup_module libexec/apache2/mod_dialup.so #LoadModule lbmethod_byrequests_module libexec/apache2/mod_lbmethod_byrequests.so #LoadModule lbmethod_bytraffic_module libexec/apache2/mod_lbmethod_bytraffic.so #LoadModule lbmethod_bybusyness_module libexec/apache2/mod_lbmethod_bybusyness.so ##LoadModule lbmethod_heartbeat_module libexec/apache2/mod_lbmethod_heartbeat.so LoadModule unixd_module libexec/apache2/mod_unixd.so #LoadModule heartbeat_module libexec/apache2/mod_heartbeat.so #LoadModule heartmonitor_module libexec/apache2/mod_heartmonitor.so #LoadModule dav_module libexec/apache2/mod_dav.so LoadModule status_module libexec/apache2/mod_status.so LoadModule autoindex_module libexec/apache2/mod_autoindex.so #LoadModule asis_module libexec/apache2/mod_asis.so #LoadModule info_module libexec/apache2/mod_info.so #LoadModule cgi_module libexec/apache2/mod_cgi.so #LoadModule dav_fs_module libexec/apache2/mod_dav_fs.so #LoadModule dav_lock_module libexec/apache2/mod_dav_lock.so #LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so LoadModule negotiation_module libexec/apache2/mod_negotiation.so LoadModule dir_module libexec/apache2/mod_dir.so #LoadModule imagemap_module libexec/apache2/mod_imagemap.so #LoadModule actions_module libexec/apache2/mod_actions.so #LoadModule speling_module libexec/apache2/mod_speling.so #LoadModule userdir_module libexec/apache2/mod_userdir.so LoadModule alias_module libexec/apache2/mod_alias.so #LoadModule rewrite_module libexec/apache2/mod_rewrite.so #LoadModule php5_module libexec/apache2/libphp5.so #LoadModule perl_module libexec/apache2/mod_perl.so LoadModule hfs_apple_module libexec/apache2/mod_hfs_apple.so # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User _www Group _www # 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # definition. These values also provide defaults for # any containers you may define later in the file. # # All of these directives may appear inside containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # ServerAdmin you@example.com # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered DNS name, enter its IP address here. # #ServerName www.example.com:80 # # Deny access to the entirety of your server's filesystem. You must # explicitly permit access to web content directories in other # blocks below. # AllowOverride none Require all denied # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/Library/WebServer/Documents" # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options FollowSymLinks Multiviews MultiviewsMatch Any # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Require all granted # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # DirectoryIndex index.html # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # Require all denied # # Apple specific filesystem protection. # Require all denied Require all denied # # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a # container, that host's errors will be logged there and not here. # ErrorLog "/private/var/log/apache2/error_log" # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a # container, they will be logged here. Contrariwise, if you *do* # define per- access logfiles, transactions will be # logged therein and *not* in this file. # CustomLog "/private/var/log/apache2/access_log" common # # If you prefer a logfile with access, agent, and referer information # (Combined Logfile Format) you can use the following directive. # #CustomLog "/private/var/log/apache2/access_log" combined # # Redirect: Allows you to tell clients about documents that used to # exist in your server's namespace, but do not anymore. The client # will make a new request for the document at its new location. # Example: # Redirect permanent /foo http://www.example.com/bar # # Alias: Maps web paths into filesystem paths and is used to # access content that does not live under the DocumentRoot. # Example: # Alias /webpath /full/filesystem/path # # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a section to allow access to # the filesystem path. # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/WebServer/CGI-Executables/$1" # # ScriptSock: On threaded servers, designate the path to the UNIX # socket used to communicate with the CGI daemon of mod_cgid. # #Scriptsock cgisock # # "/Library/WebServer/CGI-Executables" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # AllowOverride None Options None Require all granted # # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied # backend servers which have lingering "httpoxy" defects. # 'Proxy' request header is undefined by the IETF, not listed by IANA # RequestHeader unset Proxy early # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-type. # TypesConfig /private/etc/apache2/mime.types # # AddType allows you to add to or override the MIME configuration # file specified in TypesConfig for specific file types. # #AddType application/x-gzip .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi # For type maps (negotiated resources): #AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # #MIMEMagicFile /private/etc/apache2/magic # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # # # MaxRanges: Maximum number of Ranges in a request before # returning the entire resource, or one of the special # values 'default', 'none' or 'unlimited'. # Default setting is to accept 200 Ranges. #MaxRanges unlimited # # EnableMMAP and EnableSendfile: On systems that support it, # memory-mapping or the sendfile syscall may be used to deliver # files. This usually improves server performance, but must # be turned off when serving from networked-mounted # filesystems or if support for these functions is otherwise # broken on your system. # Defaults: EnableMMAP On, EnableSendfile Off # #EnableMMAP off #EnableSendfile on TraceEnable off # Supplemental configuration # # The configuration files in the /private/etc/apache2/extra/ directory can be # included to add extra features or to modify the default configuration of # the server, or you may simply copy their contents here and change as # necessary. # Server-pool management (MPM specific) Include /private/etc/apache2/extra/httpd-mpm.conf # Multi-language error messages #Include /private/etc/apache2/extra/httpd-multilang-errordoc.conf # Fancy directory listings Include /private/etc/apache2/extra/httpd-autoindex.conf # Language settings #Include /private/etc/apache2/extra/httpd-languages.conf # User home directories #Include /private/etc/apache2/extra/httpd-userdir.conf # Real-time info on requests and configuration #Include /private/etc/apache2/extra/httpd-info.conf # Virtual hosts #Include /private/etc/apache2/extra/httpd-vhosts.conf # Local access to the Apache HTTP Server Manual #Include /private/etc/apache2/extra/httpd-manual.conf # Distributed authoring and versioning (WebDAV) #Include /private/etc/apache2/extra/httpd-dav.conf # Various default settings #Include /private/etc/apache2/extra/httpd-default.conf # Configure mod_proxy_html to understand HTML4/XHTML1 Include /private/etc/apache2/extra/proxy-html.conf # Secure (SSL/TLS) connections #Include /private/etc/apache2/extra/httpd-ssl.conf # # Note: The following must must be present to support # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # SSLRandomSeed startup builtin SSLRandomSeed connect builtin Include /private/etc/apache2/other/*.conf


반응형



doc2vec이란?

paragraph2vec으로 뉴스 기사 본문과 같은 큰 텍스트 블록에 대하여 vector값으로 변환시키는 것을 말한다.

word2vec에서 확장된 버전이라고 생각하면 쉽다. 


시작하기

코퍼스(Corpus)의 크기, 문서의 개수가 많을수록 좋다.


실습

word2vec 모델에서는 두 개의 중요한 알고리즘이 있었다. (CBOW와 Skip-gram)

마찬가지로 doc2vec 모델에서도 Distribted memory(DM)과 Distributed bag of words(DBOW)가 있다.


doc2vec의 입력은 Labeled Sentence 객체의 iterator(연속)이다.

각 객체는 하나의 문장을 나타내며 단어 목록과 레이블 목록으로 구성된다.



참고문서




반응형

3단계) 모델 학습 수행 ( Training )

 

전체 순서

  1. 데이터 수집
    • 기존에 수집되어 있는 데이타가 없다면 수집을 하는 단계
    • Python을 이용한 크롤러 만들기
  2. 데이터 전처리 (Data preprocessing)
    • 특수문자, 단어 형태소 분석 등의 처리 등을 하는 단계 
    • 스페이스로 자르기 (어절 단위)
    • 불용어 제거하기 (ex. stop > stopped > stopping)
    • 어간 추출하기 (어간, 어미, 어근, 어절...)
    • 문서 표현
  3. 모델 학습 수행 (Training)
    • 데이타에 알고리즘 적용 
  4. 학습결과 확인 및 평가 
    • 완료된 학습에 대한 결과를 평가하고 성능을 더 높이고 싶다면 전저리나 알고리즘을 변경하며 작업한다. 
  5. 2~3단계를 수정하며 반복 

 

반응형

[2단계] 데이터 전처리 (Preprocessing 및 파이썬 자연어처리 라이브러리 정리)



데이터 전처리 순서 (Preprocessing Step)


  1. 토큰화 (Tokenization)
    • 문자열에서 단어로 분리시키는 단계
  2. 불용어 제거 (Stop word elimination)
    • 전치사, 관사 등 너무 많이 등장하는 단어 등 문장이나 문서의 특징을 표현하는데 불필요한 단어를 삭제하는 단계
  3. 어간 추출 (Stemming)
    • 단어의 기본 형태를 추출하는 단계
  4. 문서 표현 (Representation)
    • 주어진 문서나 문장을 하나의 벡터로 표현하는 단계
    • 단어들을 모두 인덱싱(indexing)하고 주어진 문서에 존재하는 단어의 빈도수를 사용하여 문서를 표현


자연어처리를 위한 Python 라이브러리 종류


1. KoNLPy (코엔엘파이)http://konlpy-ko.readthedocs.io/ko/v0.4.3/#

  • 한국어 자연어처리를 위한 대표적인 파이썬 라이브러리 
  • NLP (Natural Language Processing, 자연어처리)란? 텍스트(Text)에서 의미있는 정보를 분석, 추출하고 이해하는 일련의 기술 집합
  • Twitter, Komoran, Mecab 등 다양한 형태소 분석기를 내장하고 있음

관련된 글


2. NLTK (Natural Language Toolkit) http://www.nltk.org/

  • 영어로된 텍스트의 자연어처리를 위한 대표적인 파이썬 라이브러리
  • NLTK is a leading platform for building Python programs to work with human language data.
  • It provides easy-to-use interfaces to over 50 corpora and lexical resources such as WordNet, along with a suite of text processing libraries for classification, tokenization, stemming, tagging, parsing, and semantic reasoning, wrappers for industrial-strength NLP libraries, and an active discussion forum.


3. Gensim https://radimrehurek.com/gensim/

  • 주로 Topic modeling, Corpus(말뭉치) 및 Word Embedding 모델을 지원해줌
  • 한국어 및 다양한 언어를 지원해줌
관련된 글

전처리 과정


1. 토큰화 (Tokenization) : 단어를 떼어내는 단계

ex) I loved you. data-mining

= I / love / you 로 띄어쓰기나 개행을 기준으로 단어를 떼어내는 것을 말한다. 

  • 1-1) 단어를 띄어쓰기와 개행을 기준으로 단어를 떼어낸다.   ex) I / loved / you. / data-mining
  • 1-2) 문장 부호를 기준으로 한번 더 떼어낸다.                      ex) I / loved / you / . / data / - / mining
  • 1-3) 문장 부호를 떼어 내는데 예외를 둔다.                         ex) I / loved / you / . / data-mining

파이썬 3.6 Tokenizer 가이드 : https://docs.python.org/3/library/tokenize.html

파이썬 2.7 Tokenizer 가이드 : https://docs.python.org/2.7/library/tokenize.html


2. 불용어 제거 (Stop word elimination) : 불필요한 단어들을 제거하는 단계

  • 2-1) 모든 단어를 소문자화한다.
  • 2-2) 불용어 사전을 검색하여 불용어를 삭제한다. 
  • 2-3) 전제 말뭉치(corpus)에서 n번 이상 등장하지 않는 단어를 삭제한다.
    • why? 별로 중요한 단어라고 생각하지 않기 때문에

3. 어간 추출 (Stemming)
  • 단어를 기본형으로 표현하여 같은 단어가 표현형 때문에 다른 단어로 인덱싱(indexing)되는 일 없도록 한다.
  • 이때, 다양한 알고리즘을 사용하는데, 기본형으로부터 단어들을 자동으로 파생시켜서 리스트를 만들고 매칭을 시키기도 한다.
관련된 글
  • https://datascienceschool.net/view-notebook/118731eec74b4ad3bdd2f89bab077e1b/

4. 문서 표현 (Representation)

다양한 알고리즘을 사용하여서 문서(Text)를 벡터(Vector)값으로 변환하는 단계이다. (=임베딩, Embedding)
이렇게 바뀐 벡터(Vector)값을 통해서 우리는 유클리디안 거리, 코사인 유사도 등을 통해 단어간의 유사성 등을 구할 수 있다.
  • word2vec
  • doc2vec

Dictionary (사전)
  • 단어와 단어에 대한 인덱스가 표시된 사전
  • 단어 자체를 사용하여 문서를 표현하면 비효율적이다.
  • 문서 집합에 있는 문서 전체를 읽어가면서 토큰화, 불용어 제거 등의 순서를 진행하여 사전을 구축한다.
  • 불용어, 어간추출 등의 비적용/부분적용이 가능하다. (선택적)
  • ex) 사전 파일 (line 번호를 단어 index로 간주)


예제

뉴스 제목 = 한글 + 영어 + 한자 + 특수문자 

1차 가정 : 한글만 허용하고 나머지는 삭제해서 학습시켜보기 (추후에 regex 라이브러리 찾아보기, + 영어 라이브러리 적용)

Read Document 
from konlpy.corpus import kobill    # Docs from pokr.kr/bill
files_ko = kobill.fileids()         # Get file ids
doc_ko = kobill.open('1809890.txt').read()


Tokenize 

from konlpy.tag import Twitter; t = Twitter()
tokens_ko = t.morphs(doc_ko)

Load tokens
import nltk
ko = nltk.Text(tokens_ko, name='대한민국 국회 의안 제 1809890호')   # For Python 2, input `name` as u'유니코드'

기능1) tokens 
print(len(ko.tokens))       # returns number of tokens (document length)
print(len(set(ko.tokens)))  # returns number of unique tokens
ko.vocab()        
기능2) count 
ko.count('초등학교')   # Counts occurrences
기능3) Concordance 
ko.concordance('초등학교')
기능4) Similar word 
ko.similar('자녀')
ko.similar('육아휴직')
기능5) Collocations
en.collocations()
POS Tagging
from konlpy.tag import Twitter; t = Twitter()
tags_ko = t.pos("작고 노란 강아지가 페르시안 고양이에게 짖었다")

# 수집된 txt 파일을 한 줄씩 \n (줄바꿈)을 기준으로 읽어들인다.
def read_data(filename):
with open(filename, 'r') as f:
data = [line.split('\t') for line in f.read().splitlines()]
data = data[1:] # header 제외
return data
train_data = read_data('ratings_train.txt')

test_data = read_data('ratings_test.txt')

# row, column의 수가 제대로 읽혔는지 확인
print(len(train_data)) # nrows: 150000
print(len(train_data[0])) # ncols: 3
print(len(test_data)) # nrows: 50000

print(len(test_data[0])) # ncols: 3


# 형태소(POS) 분석을 하고, Tokenizing 한다.

    • Q. 꼭 형태소/품사를 나눠야하는가? 
      데이터가 정말 충분하다면, 어절 단위로도 분석이 가능하지만 데이터가 적으므로 형태소로 나누는 것이 필요하다.
      품사를 태깅해둔다면 동음이의어를 구분할 수 있다. 
from konlpy.tag import Twitter
pos_tagger = Twitter()
def tokenize(doc):
# norm, stem은 optional
return ['/'.join(t) for t in pos_tagger.pos(doc, norm=True, stem=True)]
train_docs = [(tokenize(row[1]), row[2]) for row in train_data] # Training Data ( 학습용 데이터 )
test_docs = [(tokenize(row[1]), row[2]) for row in test_data] # Test Data ( 검증용 데이터 )
# 잘 들어갔는지 확인
from pprint import pprint
pprint(train_docs[0])
# => [(['아/Exclamation',
# '더빙/Noun',
# '../Punctuation',
# '진짜/Noun',
# '짜증/Noun',
# '나다/Verb',
# '목소리/Noun'],

# '0')]


# 말뭉치(Corpus)가 어떤 특징을 가지고 있는지 Training Data의 Token 모으기

tokens = [t for d in train_docs for t in d[0]]
print(len(tokens))
# => 2194536

# NLTK를 통한 tokenize
import nltk
text = nltk.Text(tokens, name='NMSC')
print(text)
# => <Text: NMSC>

print(len(text.tokens)) # returns number of tokens
# => 2194536
print(len(set(text.tokens))) # returns number of unique tokens
# => 48765
pprint(text.vocab().most_common(10)) # returns frequency distribution
# => [('./Punctuation', 68630),
# ('영화/Noun', 51365),
# ('하다/Verb', 50281),
# ('이/Josa', 39123),
# ('보다/Verb', 34764),
# ('의/Josa', 30480),
# ('../Punctuation', 29055),
# ('에/Josa', 27108),
# ('가/Josa', 26696),


Doc2vec 예제 

from collections import namedtuple
TaggedDocument = namedtuple('TaggedDocument', 'words tags')
# 여기서는 15만개 training documents 전부 사용함
tagged_train_docs = [TaggedDocument(d, [c]) for d, c in train_docs]

tagged_test_docs = [TaggedDocument(d, [c]) for d, c in test_docs]


from gensim.models import doc2vec
# 사전 구축
doc_vectorizer = doc2vec.Doc2Vec(size=300, alpha=0.025, min_alpha=0.025, seed=1234)
doc_vectorizer.build_vocab(tagged_train_docs)
# Train document vectors!
for epoch in range(10):
doc_vectorizer.train(tagged_train_docs)
doc_vectorizer.alpha -= 0.002 # decrease the learning rate
doc_vectorizer.min_alpha = doc_vectorizer.alpha # fix the learning rate, no decay
# To save

# doc_vectorizer.save('doc2vec.model')


pprint(doc_vectorizer.most_similar('공포/Noun'))
# => [('서스펜스/Noun', 0.5669919848442078),
# ('미스터리/Noun', 0.5522832274436951),
# ('스릴러/Noun', 0.5021427869796753),
# ('장르/Noun', 0.5000861287117004),
# ('판타지/Noun', 0.4368450343608856),
# ('무게/Noun', 0.42848479747772217),
# ('호러/Noun', 0.42714330554008484),
# ('환타지/Noun', 0.41590073704719543),
# ('멜로/Noun', 0.41056352853775024),
# ('공포영화/Noun', 0.4052993059158325)]


해당 예제는 https://www.lucypark.kr/courses/2015-dm/text-mining.html 를 참고하여 만들어졌습니다. 



참고 문서


반응형

K-means Clustering 테스트 자료 


import tensorflow as tf
from tensorflow.contrib.factorization import KMeans
from tensorflow.python.framework import ops


k = 3 #3개의 Cluster로 설정
num_features = 3 #데이터 Feature 2 (카테고리 분류 코드, 제목)

# 데이터 읽어오기
Data_X = []
with open("C:/Users/N3815/Desktop/sample_kmeans_data.txt", 'r') as f:
for line in f.readlines():
dump = []
dump.append(float(line.split()[1].split(":")[1]) )
dump.append(float(line.split()[2].split(":")[1]))
dump.append(float(line.split()[3].split(":")[1]))
Data_X.append(dump)

print(Data_X)

X = tf.placeholder(tf.float32, shape = [None, num_features])

kmeans = KMeans(inputs=X, num_clusters=k, distance_metric='squared_euclidean', use_mini_batch=True)

(all_scores, cluster_idx, scores, cluster_centers_initialized, init_op, train_op) = kmeans.training_graph()
cluster_idx = cluster_idx[0]
avg_distance = tf.reduce_mean(scores)

init = tf.global_variables_initializer()
sess = tf.Session()
sess.run(init)
sess.run(init_op, feed_dict={X: Data_X})

#학습
for i in range(1, 100) :
_, d, idx = sess.run([train_op, avg_distance, cluster_idx], feed_dict={X: Data_X})

#확인
print(idx, d)
for i in range(0,k) :
result = []
for j in range(0, idx.size,1) :
if(idx[j] == i):
result.append(Data_X[j])
print(i, '에 속한 데이터 :', result)

0 1:0.0 2:0.0 3:0.0
1 1:0.1 2:0.1 3:0.1
2 1:0.2 2:0.2 3:0.2
3 1:9.0 2:9.0 3:9.0
4 1:9.1 2:9.1 3:9.1
5 1:9.2 2:9.2 3:9.2
6 1:5.5 2:2.5 3:5.7
7 1:5.2 2:2.5 3:5.3
8 1:5.4 2:5.9 3:5.9
9 1:0.1 2:9.0 3:9.1
10 1:9.1 2:9.2 3:9.3

참고 : http://iamksu.tistory.com/84

+ Recent posts