Git Product home page Git Product logo

blog-comments's Introduction

Tap to restart!

GAME OVER? Tap to restart!

Github stats

taptorestart's GitHub stats

Top Langs

blog-comments's People

Contributors

taptorestart avatar

Stargazers

 avatar

Watchers

 avatar

blog-comments's Issues

Q. Python에서 함수나 구문의 속도를 측정하는 방법은?

Q. Python에서 함수나 구문의 속도를 측정하는 방법은?

A. cProfile을 이용해서 측정할 수 있다.출처: 파이썬 프로파일러 인라인 리스트 예아래 같은 코드를 추가하고 실행해보자.import cProfile def get_number_list(): number_list = [] for i in range(1000000): number_list.append(i) return number_list cProfile.run(statement="get_number_list()") cProfile.run(statement="[i for i in range(1000000)]") 실행결과 같은 숫자 배열을 얻는 경우인데, 인

https://taptorestart.tistory.com/entry/Q-Python%EC%97%90%EC%84%9C-%ED%95%A8%EC%88%98%EB%82%98-%EA%B5%AC%EB%AC%B8%EC%9D%98-%EC%86%8D%EB%8F%84%EB%A5%BC-%EC%B8%A1%EC%A0%95%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95%EC%9D%80

Q. NGINX에서 CORS(Cross-Origin Resource Sharing)처리할 경우 설정 방법은?

Q. NGINX에서 CORS(Cross-Origin Resource Sharing)처리할 경우 설정 방법은?

A. 요청 메소드 OPTIONS에 대한 설정을 추가하면 된다. CORS 관련 확인을 위해서 사전요청preflight이 발생한다. 이 사전요청은 OPTIONS 요청 메소드로 이루어진다. 그래서 NGINX에서 OPTIONS 요청 메소드 처리를 추가하면 된다. server { ... location / { if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' $http_origin; add_header 'Access-Control-Allow-Methods' 'GET, POST, PATCH, DELETE, OPTIONS'; add_header 'Access-Control-A

https://taptorestart.tistory.com/entry/Q-NGINX%EC%97%90%EC%84%9C-CORSCross-Origin-Resource-Sharing%EC%B2%98%EB%A6%AC%ED%95%A0-%EA%B2%BD%EC%9A%B0-%EC%84%A4%EC%A0%95-%EB%B0%A9%EB%B2%95%EC%9D%80

Q. 깃허브github에서 깃플로git-flow와 스쿼시와 병합Squash and merge을 함께 쓰면 안 되는 이유는?

Q. 깃허브github에서 깃플로git-flow와 스쿼시와 병합Squash and merge을 함께 쓰면 안 되는 이유는?

A. release 브랜치에서 main 브랜치로 PR(Pull Request) 요청할 때마다 충돌이 발생한다. 스쿼시와 병합Squash and merge이란?여러 커밋을 하나의 커밋으로 밀어넣어서(squash) 병합(merge)해주는 기능이다. 예를 들어서 feature 브랜치에서 develop 브랜치로 PR을 만들었다고 하자. feature 브랜치에서 작업한 커밋이 10개다. 스쿼시와

https://taptorestart.tistory.com/entry/Q-%EA%B9%83%ED%97%88%EB%B8%8Cgithub%EC%97%90%EC%84%9C-%EA%B9%83%ED%94%8C%EB%A1%9Cgit-flow%EC%99%80-%EC%8A%A4%EC%BF%BC%EC%8B%9C%EC%99%80-%EB%B3%91%ED%95%A9Squash-and-merge%EC%9D%84-%ED%95%A8%EA%BB%98-%EC%93%B0%EB%A9%B4-%EC%95%88-%EB%90%98%EB%8A%94-%EC%9D%B4%EC%9C%A0%EB%8A%94

Jupyter Notebook 주피터 노트북 단축키shortcuts 정리

Jupyter Notebook 주피터 노트북 단축키shortcuts 정리

주피터 노트북 단축키를 알면 훨씬 편하게 쓸 수 있다. 주피터 노트북은 파이썬python 개발을 할 때 많이 쓴다. 기본 단축키 tap: 파이썬 들여쓰기를 하니 tap을 많이 쓰게 된다. shift + tap: 들여쓰기 반대인 내..

https://taptorestart.tistory.com/entry/Jupyter-Notebook-%EC%A3%BC%ED%94%BC%ED%84%B0-%EB%85%B8%ED%8A%B8%EB%B6%81-%EB%8B%A8%EC%B6%95%ED%82%A4shortcuts-%EC%A0%95%EB%A6%AC

DRF(Django Rest Framework) API 서버에 requests로 PUT할 때 나타나는 이상현상

DRF(Django Rest Framework) API 서버에 requests로 PUT할 때 나타나는 이상현상

BooleanField로 설정한 필드의 값이 만약 default=false라면 모두 false로 변경된다. 간단히 테스트를 위해서 DRF로 API 서버를 만들었다. 주요 모델은 아래처럼 생겼다. (예제코드: DRF CRUD) 모델 class Category(models.Model): name = models.CharField(max_length=200) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Beverage(models.Model): name = models.CharField(max_length=200) category = models.ForeignKe..

https://taptorestart.tistory.com/entry/DRFDjango-Rest-Framework-API-%EC%84%9C%EB%B2%84%EC%97%90-requests%EB%A1%9C-PUT%ED%95%A0-%EB%95%8C-%EB%82%98%ED%83%80%EB%82%98%EB%8A%94-%EC%9D%B4%EC%83%81%ED%98%84%EC%83%81

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.