TO DO LIST

  1. Review Python

WHAT I LEARNED

  • Difference between 'parameters' and 'arguments' in python
    • Parameters: variable you put inside parentheses in defintion
    • Arguments: value that will be sent when the definition is called
  • recursive=False: if you want to call direct son while using find_all()
  • reverse=true: if you want to reverse items inside list
  • lamda: to create anonymous function

 

reference: https://blog.naver.com/rkttndk/221836743731

 

ํŒŒ์ด์ฌ ํ•จ์ˆ˜ : Python Functions:์žฌ๊ท€ ํ•จ์ˆ˜:parameter/arguments ์ „๋‹ฌ

ํ•จ์ˆ˜๋Š” ํ˜ธ์ถœ ๋˜์—ˆ์„ ๋•Œ๋งŒ ์‹คํ–‰๋˜๋Š” ์ฝ”๋“œ ๋ธ”๋ฝ์ด๋‹ค.๋งค๊ฐœ ๋ณ€์ˆ˜๋ฅผ ์ด์šฉํ•˜์—ฌ ํ•จ์ˆ˜์—๊ฒŒ ๋ฐ์ดํ„ฐ๋ฅผ ๋„˜๊ฒจ์ค„ ์ˆ˜ ์žˆ์œผ...

blog.naver.com

stackoverflow.com/questions/8966538/syntax-behind-sortedkey-lambda

 

Syntax behind sorted(key=lambda: ...)

I don't quite understand the syntax behind the sorted() argument: key=lambda variable: variable[0] Isn't lambda arbitrary? Why is variable stated twice in what looks like a dict?

stackoverflow.com

 

'TIL' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

TIL 2020.10.27  (0) 2020.10.27
TIL 2020.10.26  (0) 2020.10.26
TIL 2020.10.22  (0) 2020.10.22
TIL 2020.10.21  (0) 2020.10.22
TIL 2020.10.20  (0) 2020.10.20

TO DO LIST

  1. Practice python using app.route โœ…

WHAT I LEARNED

  • request.args.get allows to get more than one positional argument
  • make fake database to shorten searching times when he searches same item again
  • better to use 'SINGLE QUOTE' for attributes

  • Can use python inside HTML 
    • Need to put both {% if __________________ %} and {% endif_______________ %}
  • Need to use the |safe filter to explicitly mark a string as safe HTML 

 

 

reference: http://flask.palletsprojects.com/en/1.1.x/templating/#controlling-autoescaping

'TIL' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

TIL 2020.10.24  (0) 2020.10.24
TIL 2020.10.22  (0) 2020.10.22
TIL 2020.10.20  (0) 2020.10.20
TIL 2020.10.19  (0) 2020.10.19
TIL 2020.10.16  (0) 2020.10.16

TO DO LIST

  1. review python โœ…
  2. review vanilla javascript โœ…

WHAT I LEARNED

  • How to use replace
    • word.replace(u'\xa0', u' ') = replaced with space
    • word.replace(u'\xa0', u'') # removed completely
  • How to make csv
    • mode="w" write only
    • mode="r" read only
    • has to put inside the list ynder wruter,writerow to be printed in csv as below

'TIL' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

TIL 2020.10.22  (0) 2020.10.22
TIL 2020.10.21  (0) 2020.10.22
TIL 2020.10.19  (0) 2020.10.19
TIL 2020.10.16  (0) 2020.10.16
TIL 2020.10.15  (0) 2020.10.15

TO DO LIST

  1. ์ฝ”๋“œ์Šคํ…Œ์ด์ธ  ์ง€์›์„œ ๋งˆ๋ฌด๋ฆฌ์™€ ์ œ์ถœ โœ…
  2. ํŒŒ์ด์ฌ ์ฑŒ๋ฆฐ์ง€-์•Œ๋ฐ”์ฒœ๊ตญ scrapping ํ•˜๊ธฐ โœ…

WHAT I LEARNED

  • Module = a file containing Python definitions and statements
  • Package = a way of structuring Python’s module namespace by using “dotted module names”. package can be module but not all module can be package

 

 

'TIL' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

TIL 2020.10.22  (0) 2020.10.22
TIL 2020.10.21  (0) 2020.10.22
TIL 2020.10.20  (0) 2020.10.20
TIL 2020.10.16  (0) 2020.10.16
TIL 2020.10.15  (0) 2020.10.15

TO DO LIST

  1. vanilla javascript๋ฅผ ์ด์šฉํ•ด์„œ ๊ณ„์‚ฐ๊ธฐ ๋งŒ๋“ค๊ธฐ โœ…
  2. python์„ ์ด์šฉํ•˜์—ฌ web scrappingํ•˜๊ธฐ โœ…
  3. ์ฝ”๋“œ์Šคํ…Œ์ด์ธ  ์ง€์›์„œ ์ž‘์„ฑ โŒ ์•„์ง 3์ผ์ด ๋” ๋‚จ์•˜์œผ๋‹ˆ, ๊ณ„์† ๊ณ ์ณ๋‚˜๊ฐˆ ์˜ˆ์ •..

WHAT I LEARNED

IF/ELSE/ELIF TRY/EXCEPT
3 ์ค‘ ํ•˜๋‚˜๊ฐ€ ์‹คํ–‰ ๋จ. IF/ELSE์™€ ๋น„์Šทํ•˜๊ฒŒ ์‚ฌ์šฉ๋˜์ง€๋งŒ, ์˜ˆ์ธก ๋ถˆ๊ฐ€๋Šฅํ•œ ์ผ์ด ๋ฐœ์ƒํ•˜์˜€์„ ๋•Œ, ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•จ.

 

'TIL' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

TIL 2020.10.22  (0) 2020.10.22
TIL 2020.10.21  (0) 2020.10.22
TIL 2020.10.20  (0) 2020.10.20
TIL 2020.10.19  (0) 2020.10.19
TIL 2020.10.15  (0) 2020.10.15

์˜ค๋Š˜๋ถ€ํ„ฐ TIL ์ž‘์„ฑ์„ ํ•ด๋ณด๋ ค๊ณ  ํ•œ๋‹ค.

 

ํ˜„์žฌ ๋…ธ๋งˆ๋“œ ์ฝ”๋” ์›น์‚ฌ์ดํŠธ์—์„œ ๋ฐ”๋‹๋ผ์Šคํฌ๋ฆฝํŠธ 2์ฃผ ์™„์„ฑ๋ฐ˜๊ณผ ํŒŒ์ด์ฌ 2์ฃผ ์™„์„ฑ๋ฐ˜ ์ฒผ๋ฆฐ์ง€๋ฅผ ์ง„ํ–‰ ์ค‘์ด๋‹ค.

 

ํŒŒ์ด์ฌ 2์ฃผ ์™„์„ฑ๋ฐ˜์—์„œ 4์งธ ๋‚ ์ด๊ณ , ๋ฐ”๋‹๋ผ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ 2์ฃผ ์™„์„ฑ๋ฐ˜์—์„œ๋Š” 11์ผ์งธ์ด๋‹ค. 


TO DO LIST

  1. python์„ ์ด์šฉํ•˜์—ฌ, url์ด ์˜จ๋ผ์ธ ์ธ์ง€ ์•„๋‹Œ ์ง€ ํ™•์ธํ•˜๊ธฐ โœ… ๊ฒจ์šฐ ๋๋ƒˆ์œผ๋‚˜, ๋‚ด์ผ ์ •๋‹ต์„ ๋ฐ›์œผ๋ฉด ์ขŒ์ ˆ ์˜ˆ์ƒ...  
  2. vanilla javascript ์ด์šฉํ•˜์—ฌ ์‚ฌ์ธก์—ฐ์‚ฐ ๊ณ„์‚ฐ๊ธฐ ๋งŒ๋“ค๊ธฐ โŒ 1๋ฒˆ์„ ํ•˜๋А๋ผ html๋งŒ ์™„์„ฑํ•œ ์ƒํƒœ... ๋‚ด์ผ ๋‚˜๋จธ์ง€ css์™€ js๋ฅผ ์™„์„ฑ์‹œ์ผœ์•ผ ๋œ๋‹ค.
  3. CSS ๋ณต์Šต โœ…
    • codepip.com/games/ - ์›น์‚ฌ์ดํŠธ ๊ฐ€์ž… ํ›„, ๋ฌด๋ฃŒ๋กœ ๋” ๋งŽ์ด ๊ฒŒ์ž„์œผ๋กœ ๋ณต์Šต ๊ฐ€๋Šฅ. ์œ ๋ฃŒ ๊ฒŒ์ž„๋„ ์žˆ์Œ. 
      • ์ด ์ค‘, Flexbox Froggy์™€ Grid Garden ํ•˜๊ธฐ
 

Sourcery - A magical game of coding HTML with Emmet

Learn to harness the power of Emmet, a popular code editor plugin. Mentored by the Sourceress, you'll summon large chunks of HTML code with just a snap of your fingertips. With Emmet, you can type shortcuts that expand to the code you want — helping you

codepip.com


WHAT I LEARNED

 

  1. python์—์„œ input์ด๋ž€ ๋ช…๋ น์–ด์ด๋ฉฐ, ๋‚ด๊ฐ€ ์ž…๋ ฅํ•œ ๊ฐ’์„ ์ปดํ“จํ„ฐ๊ฐ€ ๋ฐ›์„ ์ˆ˜ ์žˆ๊ฒŒ ๋„์™€์ค€๋‹ค. print์™€์˜ ์ฐจ์ด์ ์„ ์ดํ•ดํ•˜๋Š” ๋‚ ์ด์—ˆ๋‹ค. print ๊ฐ™์€ ๊ฒฝ์šฐ๋Š” ๊ทธ๋ƒฅ ๋‚ด๊ฐ€ ์ž…๋ ฅํ•œ ๊ฐ’๋งŒ ์ค€๋‹ค๋ฉด, input์€ ๋‚ด๊ฐ€ ์“ด ๊ฐ’์„ ๋‹ค์‹œ dictionary์—์„œ ๊ฐ€์ ธ์˜ค๋Š” ๊ฒƒ์ด๋‹ค. 
  2. input์„ ๊ฐ€์ ธ์™”์„ ๋•Œ, ์†Œ๋ฌธ์ž๋กœ ๋งŒ๋“œ๋Š” ๋ฒ•, ๋„์–ด์“ฐ๊ธฐ๋ฅผ ์—†์• ๋Š” ๋ฒ•, ์—ฌ๋Ÿฌ url์„ ๋„ฃ์—ˆ์„ ๋•Œ, ์‰ผํ‘œ๋กœ ๊ทธ๋“ค์„ ์ชผ๊ฐœ๋Š” ๋ฒ•์„ ์ตํ˜”๋‹ค.
  3. strip์„ ํ†ตํ•ด ๋ถˆํ•„์š”ํ•œ ์ŠคํŽ˜์ด์Šค๋“ค์„ ์ง€์šฐ๋Š” ๊ฒƒ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.
  4. status.code๊ฐ€ 200์ผ ๊ฒฝ์šฐ, ์›น์‚ฌ์ดํŠธ๊ฐ€ ์˜จ๋ผ์ธ์ž„์„ ํ™•์ธํ•œ๋‹ค.

'TIL' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

TIL 2020.10.22  (0) 2020.10.22
TIL 2020.10.21  (0) 2020.10.22
TIL 2020.10.20  (0) 2020.10.20
TIL 2020.10.19  (0) 2020.10.19
TIL 2020.10.16  (0) 2020.10.16

+ Recent posts