profile
๐Ÿ”ฐ
ํƒœ๊ทธ ๋ชฉ๋ก
์ „์ฒด๋ณด๊ธฐ (81)django(13)python(9)git(6)์žฅ๊ณ (6)JavaScript(4)mongodb(4)dictionary(4)enumerate(3)์•Œ๊ณ ๋ฆฌ์ฆ˜(3)List(3)ORM(2)min(2)merge(2)sorted(2)sql(2)max(2)ํ† ํฐ(2)Blob(2)์•”ํ˜ธํ™”(2)nosql(2)mysql(2)html(2)render(2)git๋ช…๋ น์–ด(2)JWT(2)scraping(2)zip(1)regular expression(1)prefetch_related(1)substring(1)record(1)TCP/IP(1)404์—๋Ÿฌ(1)์ž๋ฃŒ๊ตฌ์กฐ(1)Azure(1)timeit(1)requests(1)ํด๋ž˜์Šค๋ฒ ์ด์Šค๋ทฐ(1)์žฅ๊ณ  templates(1)header(1)GET(1)POST(1)two sum(1)fontawseome(1)web framework(1)field(1)sum(1)rebase(1)kanban(1)queryset(1)google cloud storage(1)http(1)๋ณตํ˜ธํ™”(1)stack(1)queue(1)agile(1)scrum(1)sprint(1)encryption(1)ํ•ด์‹œ(1)for๋ฌธ(1)callable(1)http๋ฉ”์„ธ์ง€ํ˜•์‹(1)http๋ฉ”์†Œ๋“œ(1)list๋ฉ”์†Œ๋“œ(1)location object(1)์›น์Šคํฌ๋ž˜ํ•‘(1)Vim ๋ช…๋ น์–ด(1)generator(1)์ œ๋„ˆ๋ ˆ์ดํ„ฐ(1)length(1)Joi(1)validation(1)project(1)shard key(1)views(1)story(1)selectrelated(1)TDD(1)MVC(1)selenium(1).startswith(1)beautifulsoup(1)๋ฐ์ฝ”๋ ˆ์ดํ„ฐ(1)csrf(1)sessionStorage(1)cherrypick(1)binary tree(1)ajax(1)pipreqs(1)์žฅ๊ณ ๋ณด์•ˆ(1)argon2(1)branch(1)http ์—๋Ÿฌ(1)์žฅ๊ณ  ์†Œ์…œ๋กœ๊ทธ์ธ(1)mongoose(1)decoding(1)transaction(1)tcp(1)ํŽ˜์ด์Šค๋ถ ๋กœ๊ทธ์ธ(1)init(1)git flow(1)sharded cluster(1)query(1)๋ชจ๋ธ๋ง(1)reversed(1)palindrome(1)์žฅ๊ณ  ๋ทฐ(1)models.py(1)settings.py(1)urls.py(1)ssh(1)ec2(1)Time Complexity(1)Node(1)json(1)pathname(1)javascript time(1)list method(1)big o notation(1)์›นํ”„๋กœํ† ์ฝœ(1)์žฅ๊ณ ๋กœ๊ทธ์ธ(1)backlog(1)href(1)gcs(1)conflict(1)regex(1)bcrypt(1)String(1)bool(1)commit(1)์†Œ์…œ๋กœ๊ทธ์ธ(1)JsonResponse(1)maxprofit(1)trello(1)azure storage(1)SQLAlchemy(1)http request header(1)DOM(1)๋ฌธ์ž์—ด์ •๋ ฌ(1)longest substring(1)encoding(1)์ปค์„œ(1)replica set(1)class based view(1)views.py(1)erd(1)window.location.(1)merge commit(1)string sorted(1)template(1)models(1)python time(1)split()(1)reverse(1)MVT(1)Table(1)requiremetns.txt(1)form(1)aws(1)github(1)mongoengine(1)app(1)merge conflict(1)urls(1)redirect(1)morsel objects(1)toggle(1)integer(1)cookie(1)slice(1)๊ฐ์ฒด์ ‘๊ทผ๋ฐฉ๋ฒ•(1)RDBMS(1)๋‚ด์žฅํ•จ์ˆ˜(1)squash(1)Database(1)Token(1)python in vs(1)Hash Table(1)file(1)prefix(1)if(1)hash(1)algorithm(1)python library(1)tuple(1)set(1)์ฟผ๋ฆฌ์…‹(1)์œ ๋‹›ํ…Œ์ŠคํŠธ(1)for loop(1)html5(1)vim(1)migration(1)์ •๊ทœํ‘œํ˜„์‹(1)๋กœ๊ทธ์ธ(1)packages(1)modules(1)sys modules(1)CBV(1)์ธ์ฆ(1)์ธ๊ฐ€(1)e2e testing(1)

[mongodb] copying over other field values

Note:wrap $set with array,$ in front of the name of the existing field

2021๋…„ 10์›” 27์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

Start Python Project in VS code

Make sure to download Python extension and enable it.You will see this at the bottom of your screen if it is enabled.Set up a virtual environment by r

2021๋…„ 1์›” 25์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

Joi : data validation library

In the new portal project, we implemented a validator to check whether the request data received from the client's request was in an acceptable format

2020๋…„ 9์›” 21์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

(Useful Library) When you want to generate requirements.txt based on imports

github repo:https://github.com/bndr/pipreqsInstall using pipCreate a new directory and put all the python files that you want to base on.Run the

2020๋…„ 8์›” 27์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

Uploading a blob in Azure Storage

Assuming, you already have pre-defined storage and container in Azure, here is how to upload a blob into the container.

2020๋…„ 7์›” 31์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

[Reference] Javascript Object/Array Destructuring

https://thenextweb.com/syndication/2020/07/25/how-to-write-cleaner-code-with-javascript/

2020๋…„ 7์›” 27์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

Using Transaction in Mongoose

Transactions let you execute multiple operations in isolation and potentially undo all the operations if one of them fails. import models you defined,

2020๋…„ 7์›” 20์ผ
ยท
3๊ฐœ์˜ ๋Œ“๊ธ€
ยท

Save form file data to GCS using Django

Premise: A user wants to upload an audio file that is stored in her computer to a specific Google Cloud Server. Frontend HTML JS Create a form data

2020๋…„ 6์›” 17์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

Toggling Font Awesome Icons

A basic <i> tag you'd get from font awesome would look like the following:As you can see, it is consisted of two different classes. fas is fixed, s

2020๋…„ 6์›” 15์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

(python) Removing a dictionary element in a list

How to delete a dictionary element in a list?You might think, "well, that is a no-brainer, just use good-old del."Well, not quite so. The del does rem

2020๋…„ 5์›” 27์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

DOM Location (Location Object)

ํ˜„์žฌ URL์— ๊ด€ํ•œ ์ •๋ณด๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” object์ด๋‹ค.window.location ์†์„ฑ์„ ํ†ตํ•˜์—ฌ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋‹ค.๋ฉ”์†Œ๋“œ๋Š” ์•„๋ž˜ 3๊ฐ€์ง€๊ฐ€ ์žˆ๋‹ค.์ด๋•Œ ์ฃผ์˜ํ• ์ ์€, assign๊ณผ replace์˜ ๊ฒฝ์šฐ, parameter๋กœ ๋„˜๊ฒจ์ง€๋Š” ์ŠคํŠธ๋ง์ด ํ˜„์žฌ ์›นํŽ˜์ด์ง€ ์ฃผ์†Œ์— ์ถ”๊ฐ€๋œ๋‹ค.

2020๋…„ 5์›” 8์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

split()

ํŠน์ • URL์—์„œ id์˜ ๊ฐ’์„ ํ•ญ์ƒ ์ฐพ๊ณ  ์‹ถ๋‹ค๊ณ  ํ•˜์ž.query string์ด ์ถ”๊ฐ€๋จ์— ๋”ฐ๋ผ, id์˜ ์œ„์น˜๋Š” ๋ฐ”๋€”์ˆ˜ ์žˆ๋‹ค (์˜ˆ์‹œ์˜ url, url2 ์ฒ˜๋Ÿผ).์ด๋•Œ, split()์„ ์‚ฌ์šฉํ•˜์—ฌ ํ•ญ์ƒ id์˜ ๊ฐ’์„ ์ฐพ์•„๋‚ผ ์ˆ˜ ์žˆ๋‹ค.string.split(separator, max

2020๋…„ 5์›” 4์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

ํ•จ์ˆ˜ ํ˜ธ์ถœ์— ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„ ์žฌ๊ธฐ

์†Œ์Šค์ฝ”๋“œ์˜ performance๋ฅผ ํ…Œ์ŠคํŠธ ํ•  ๋•Œ, ํ•จ์ˆ˜์—์„œ ํ•œ ๋ถ€๋ถ„์„ ํ˜ธ์ถœํ•˜๋Š”๋ฐ ๊ฑธ๋ฆฌ๋Š” ์‹œ๊ฐ„์„ ์žฌ๊ณ  ์‹ถ์„ ๊ฒฝ์šฐ, python์—์„œ ์ œ๊ณตํ•˜๋Š” time๋ฉ”์†Œ๋“œ๋ฅผ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.๋ฐฉ๋ฒ•์€ ๊ฐ„๋‹จํ•˜๋‹ค. time.time() ์„ ํ…Œ์ŠคํŠธํ•˜๊ณ  ์‹ถ์€ ๋ถ€๋ถ„์˜ ์•ž๋’ค์— ์ž‘์„ฑํ•˜๊ณ , print๋กœ ๋

2020๋…„ 4์›” 23์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

(Django) render ์™€ redirect์˜ ์ฐจ์ด

ํ˜„์žฌ ์ธํ„ด์ค‘์ธ ํšŒ์‚ฌ์—์„œ ๊ธฐ์กด์— ์“ฐ์ธ ์†Œ์Šค์ฝ”๋“œ์˜ url, view, template์„ ๋ชจ๋‘๋ฅผ ์ˆ˜์ •ํ•ด์•ผ ํ•˜๋Š” ์ผ์ด ์ƒ๊ฒผ๋‹ค. ์ด๋“ค์˜ ๊ด€๊ณ„์„ฑ์— ๋Œ€ํ•œ ์ดํ•ด๊ฐ€ ๋ถ€์กฑํ•ด์„œ ์•Œ๊ณ ๋ณด๋ฉด ๊ฐ„๋‹จํ•œ ์ž‘์—…์ด์—ˆ๋˜๊ฒƒ์„ ํ•˜๋ฃจ์ข…์ผ ๊ฑธ๋ ค์„œ ์ˆ˜์ •ํ–ˆ๋‹ค.. ์ด ๋•Œ ๋ฐฐ์šด ๋‚ด์šฉ์„ ์ •๋ฆฌํ•ด ๋ณด๋ ค๊ณ  ํ•œ๋‹ค.url ํ˜ธ์ถœ

2020๋…„ 4์›” 23์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

sessionStorage

html5์—์„œ ์ œ๊ณตํ•˜๋Š” API๋กœ, key-value ํŽ˜์–ด๋ฅผ ๋ธŒ๋ผ์šฐ์ €์— ์ €์žฅํ•˜๋Š”๋ฐ ์“ฐ์ธ๋‹ค. ํ•˜๋‚˜์˜ ์„ธ์…˜์€ ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋ธŒ๋ผ์šฐ์ €๋ฅผ ์ข…๋ฃŒํ•  ๋•Œ ๊นŒ์ง€๋งŒ ์ง€์†๋œ๋‹ค. ๋”ฐ๋ผ์„œ, ์ด๊ณณ์— ์ €์žฅ๋œ ๊ฐ์ฒด๋Š” ๋ธŒ๋ผ์šฐ์ €๋ฅผ ์ข…๋ฃŒํ•˜๋Š” ๋™์‹œ์— ์‚ฌ๋ผ์ง€๊ฒŒ ๋˜๋ฉฐ, ์ ˆ๋Œ€ ์„œ๋ฒ„์— ์ €์žฅ๋˜์ง€ ์•Š๋Š”๋‹ค.๊ฐ™์€ URL

2020๋…„ 4์›” 23์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

(git) PR merge conflict ํ•ด๊ฒฐํ•˜๊ธฐ

PR์ฐฝ์—์„œ conflict๋ฉ”์„ธ์ง€ ํ™•์ธํ›„,pull์€ fetch ์™€ merge๋ฅผ ์‹คํ–‰ํ•˜๋ฉฐ, conflict์ด ์žˆ๋Š” ์ƒํƒœ์—์„œ๋Š” merge๋Š” failํ•œ๋‹ค.๋กœ์ปฌ์—์„œ conflict ํ•ด๊ฒฐ.git push origin

2020๋…„ 4์›” 16์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

(Django) ๋กœ๊ทธ์ธ ์‹œ cookie์— token ์ €์žฅํ•˜๊ธฐ

์œ ์ €๊ฐ€ ๋กœ๊ทธ์ธ์— ์„ฑ๊ณตํ–ˆ์„๋•Œ, ํ•ด๋‹น ์œ ์ €๋ฅผ ๋กœ๊ทธ์ธ ๊ธฐ๊ฐ„๋™์•ˆ ์ธ์ฆํ•˜๋Š” ํ† ํฐ์„ cookie์— ์ €์žฅํ•ด์•ผ ํ•  ๊ฒฝ์šฐ, HttpResponse ๋˜๋Š” JsonResponse์— set_cookie ๋ฉ”์†Œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ, ํ† ํฐ์„ ๋ฐœํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค.Http request header๋ฅผ ์ถœ๋ ฅํ•ด๋ณด

2020๋…„ 4์›” 15์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

๋– ์˜ค๋ฅด๋Š” ์•”ํ˜ธํ™”ํˆด: Argon2

2015๋…„์— Password Hashing Competition์—์„œ ์šฐ์Šนํ•œ ์•”ํ˜ธํ™” SW์˜ ๋– ์˜ค๋ฅด๋Š” ๊ฐ•์ž(?) ์ธ argon2๋ฅผ ์†Œ๊ฐœํ•œ๋‹ค.์™œ bcrypt๊ฐ€ ์•„๋‹ˆ๋ผ argon2 ๋ฅผ ์จ์•ผ ํ•˜๋Š”๊ฐ€์— ๋Œ€ํ•ด์„œ๋Š” ์—ฌ๊ธฐ๋ฅผ ์ฐธ์กฐ. pip install argon2-cfficryptog

2020๋…„ 4์›” 13์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

Database architecture

ํ˜„์žฌ ์ธํ„ด์ค‘์ธ ํšŒ์‚ฌ์—์„œ mongodb์— ์ ‘์†ํ• ๋•Œ, ip์™€ port์ฃผ์†Œ๊ฐ€ ๋‘๊ฐœ ์„ค์ •๋˜์–ด ์žˆ์–ด์„œ ๊ทธ ์ด์œ ๋ฅผ techlead ์—๊ฒŒ ๋ฌผ์–ด๋ดค๋”๋‹ˆ, db architecture์— ๊ด€ํ•ด์„œ ์ž์„ธํ•˜๊ฒŒ ์„ค๋ช…ํ•ด ์ฃผ์…”์„œ ๊ทธ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•ด ๋ณธ๋‹ค.์„œ๋ฒ„๊ฐ€ ์˜ค์ง ํ•˜๋‚˜์˜ db์™€ ์—ฐ๊ฒฐ๋˜์–ด ์žˆ๋Š” ๊ตฌ์กฐ์„œ

2020๋…„ 4์›” 12์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท

(Python) timeit module

timeit runs your snippet of code millions of time (default value is 1000000) so that you get the statistically most relevant measurement of code execu

2020๋…„ 4์›” 9์ผ
ยท
0๊ฐœ์˜ ๋Œ“๊ธ€
ยท