본문 바로가기

세계정복의주인장

(1145)
[leetcode] dfs / bfs 재밌는 문제들 https://leetcode.com/problems/surrounded-regions/ Surrounded Regions - LeetCode Surrounded Regions - Given an m x n matrix board containing 'X' and 'O', capture all regions that are 4-directionally surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in that surrounded region. Example 1: [https://assets.leetcode. leetcode.com https://leetcode.com/problems/count-servers-that-com..
[leetcode] dfs/bfs 섬 문제들 https://leetcode.com/problems/number-of-islands/ Number of Islands - LeetCode Number of Islands - Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may ass leetcode.com https://leetcode.com/problems/island-perimeter/ Is..
lambda docker 이미지에 mecab 설치 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 FROM public.ecr.aws/lambda/python:3.8 # install build libs RUN yum groupinstall -y "Development Tools" \ && yum install -y which openssl # setup package RUN yum install -y glibc ld-linux.so.2 curl git patch RUN yum install -y gcc-c++ java-1.8.0-openjdk-devel python3 python3-..
mecab 설치 후 libmecab.so.2 파일 에러 mecab 이 아래와 같이 에러가 났다면!! Python 3.6.6 |Anaconda, Inc.| (default, Oct 9 2018, 12:34:16) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import MeCab Traceback (most recent call last): File "/tmp/mecab-python-0.996/MeCab.py", line 18, in swig_import_helper fp, pathname, description = imp.find_module('_MeCab', [dirname(__file__)]) File "/root/minicond..
openapi chatGPT 사용기 https://openai.com/api/pricing/ Pricing OpenAI is an AI research and deployment company. Our mission is to ensure that artificial general intelligence benefits all of humanity. openai.com Ada 는 가장 빠른 모델이고 Davinci 는 가장 강력한 모델 가격은 1,000 토큰당 사용량이된다. 토큰은 답변으로 나온 단어 조각으로 생각할 수 있다. 여기서 1,000개의 토큰은 약 750개의 단어입니다. 처음 가입하면 $18달러를 준다. 이정도면 3개월 내내써도 문제 없을꺼 같다. 바로 사용 가능하도록 에디터창이 있다. https://beta.openai.com/..
역행자 https://www.youtube.com/watch?v=n123UqppM_Q 1단계 자의식 해체 2단계 정체성 만들기 3단계 유전자 오작동 4단계 뇌 자동화 5단계 역행자의 지식 6단계 경제적 자유를 얻는 구체적 루트 7단계 역행자의 쳇바퀴 ☝ 하루 2시간 동안 책을 읽거나 글을 쓴다. 뇌를 업그레이드 하는 가장 좋은 방법이다. 하루에 한번, “5분의 생각” 시간을 갖는다. 여백의 사간을 통해 좋은 결정을 쌓는다. 적극적으로 논다. 무조건 7시간 이상 숙면한다. 1단계 자의식 해체 💡 나는 물건을 살때 어떻게 행동하는가? 검색을 했다. 해당 검색어로 지식인 작업을 하고 블로그를 쓰자. 나와 같은 고민을 하는 사람들은 키워드로 검색할 것이다. 블로그나 지식인을 타고 온 사람들에게 신뢰를 주기 위해선 전문..
postgresql SQL Error [42P10]: ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification 문제점 다음과 같이 insert on conflict 구문일때 실행시 에러가 발생했다. INSERT INTO frame (id, chnl_id, frame_body_cntt, create_at, updated_at) VALUES ('A0016','A','오렌지', now(), now()) ON CONFLICT (id) DO nothing; 해결책 공식문서를 보자!! https://www.postgresql.org/docs/current/sql-insert.html INSERT INSERT INSERT — create new rows in a table Synopsis [ WITH [ RECURSIVE ] with_query [, ...] ] INSERT … www.postgresql.org on conf..
airflow ModuleNotFoundError: No module named 'slacker’ 문제점 airflow를 docker-compose로 관리하며 사용중이며 python 패키지를 추가해야하는데, docker 빌드시 requirement.txt에 패키지를 추가 했지만 airflow에서는 설치가 안되엇다고 계속 에러 메시지가 뜬다. 심지어 도커 빌드시 설치가 되는것을 확인했다!!! dockerfile에서 설치하려는 나의 노력을 볼수있다! 하지만 소용이 없었다. FROM apache/airflow:2.1.3 USER root RUN apt-get update \ && apt-get install -y --no-install-recommends \ openjdk-11-jre-headless \ && apt-get autoremove -yqq --purge \ && apt-get clean \ &..