본문 바로가기

IT/Python30

pynecone get started - pc run error > pc run ... > dev > next dev ready - started server on 0.0.0.0:3000, url: http://localhost:3000 event - compiled client and server successfully in 4.4s (761 modules) wait - compiling /404 (client and server)... event - compiled client and server successfully in 289 ms (765 modules) warn - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/basic-features/fast-refresh#h.. 2023. 1. 16.
python re sub remove special characters # remove special characters corpus = "learning% makes 'me' happy. i am happy be-cause i am learning! :)" corpus = re.sub(r"[^a-zA-Z0-9.?! ]+", "", corpus) print(corpus) learning makes me happy. i am happy because i am learning! 2022. 11. 17.
aws s3 upload image using boto3, 이미지 올리기 1. AWS S3에서 버킷을 생성한다. ​ 2. 버킷 이름을 정한다. ​ 3. 버킷의 권한을 Public으로 변경한다. (테스트 용이므로 퍼블릭 엑세스 가능하도록 변경) ​ 4. IAM 키를 만든다. 자세한 사항은 검색해서 하도록 한다. 여기서는 있다고 가정한다. ​ 5. 액세스 관리자에 S3에 관한 권한이 있어야 한다. 정책을 추가하도록 한다. ​ 6. 보안 자격 증며에서 액세스 키를 만든다. 액세스 키를 누르면 처음 한번만 창이 뜨는데, 그 후에는 안뜬다. csv파일을 받을 수 있는데, 거기에 secret key가 있으니 받도록 한다. ​ 7. 위에서 받은 키를 가지고 아래 정보를 입력한 파일을 만든다. 아래는 아마존에서 설명한 설명이다. 참고할 것. But, 나는 그냥 파일을 하나 만들고 거기에 저.. 2019. 4. 20.
dataframe, head(), show all columns dataframe, head 사용시 모든 컬럼 보이도록 하려면 아래 코드를 미리 실행시켜주면 된다. To show all columns when use head() or tail() Excute those command to show all of columns. pd.set_option('display.max_columns', None) pd.set_option('display.max_rows', None) 2019. 4. 18.
반응형