728x90
๋ฐ˜์‘ํ˜•

[SECOND, MINUTE, HOUR, DAY, MONTH, YEAR] ๊ด„ํ˜ธ์— ๋„ฃ์„ ์ˆ˜ ์žˆ์Œ

DATE_ADD, DATE_SUB, ์‚ฌ์น™์—ฐ์‚ฐ(+, - ๋จ)

 

1. ๋‚ ์งœ ๋”ํ•˜๊ธฐ

SELECT DATE_ADD(NOW(), INTERVAL 1 MONTH); 

SELECT DATE_ADD(NOW(), INTERVAL -1 MONTH);  

SELECT NOW + INTERVAL 1 MONTH

 

2. ๋‚ ์งœ ๋นผ๊ธฐ

SELECT DATE_SUB(NOW(), INTERVAL 1 MONTH); 
SELECT DATE_SUB(NOW(), INTERVAL -1 MONTH);  
SELECT NOW + INTERVAL 1 MONTH

728x90
๋ฐ˜์‘ํ˜•
728x90
๋ฐ˜์‘ํ˜•

๋ธŒ๋ผ์šฐ์ €์—์„œ๋Š” ์•„๋ฌด๋Ÿฐ ์ด์ƒ์—†์ด ์ž˜ ๋Œ์•„๊ฐ€์ง€๋งŒ ๊ฐœ๋ฐœ์ž๋„๊ตฌ(ํฌ๋กฌ๊ธฐ์ค€) ์ฝ˜์†”์—์„œ ๋ณด๋ฉด ์ด๋Ÿฌํ•œ ์˜ค๋ฅ˜๋“ค์„ ๋งŽ์ด ๋ดค์„๊ฑฐ๋‹ค.

 


Failed to load resource: the server responded with a status of 404 ()


 

์ € ์˜ค๋ฅ˜์˜ ๋Œ€๋ถ€๋ถ„์ด ์ž‘์—…ํ•˜๋‹ค๊ฐ€ ๊ฒฝ๋กœ๋ฅผ ์ˆ˜์ •์„ ์•ˆ ํ–ˆ๊ฑฐ๋‚˜ ๊ฒฝ๋กœ๋ฅผ ์ง€์› ์„ ๋•Œ ๋งŽ์ด ์ผ์–ด๋‚œ๋‹ค.

์ง€๊ธˆ ์—ฌ๊ธฐ์—์„œ๋Š” ์˜ค๋ฅ˜ ๋‚ด์šฉ๋งŒ ์ ์—ˆ์ง€๋งŒ ์™ผ์ชฝ์— ๋ณด๋ฉด ๋ญ๊ฐ€ ์—†๋Š”์ง€ ํŒŒ์ผ๋ช…์ด๋‚˜ ํฐํŠธ๋ช… ๋“ฑ๋“ฑ์ด ์ ํ˜€ ์žˆ์œผ๋‹ˆ ์ž˜ ๋ณด๊ณ  ๊ทธ ํŽ˜์ด์ง€์—์„œ ์ž˜ ํ™•์ธํ•ด๋ณด์ž! 

 

๊ฐ„๋‹จํ•˜๊ฒŒ "Failed to load resource: the server responded with a status of 404 () = ๊ฒฝ๋กœ ์ˆ˜์ •" ์ด๋ผ ์ƒ๊ฐํ•˜๋ฉด ๋ ๊ฑฐ ๊ฐ™๋‹ค.

๋ฌผ๋ก  ์ด๊ฒŒ ์ •ํ™•ํ•œ์ง€๋Š” ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ ๋‚ด ๊ฒฝํ—˜์œผ๋กœ๋Š”..... ใ…Žใ…Ž  ํ‹€๋ฆฌ๋ฉด ๋Œ“๊ธ€๋กœ ์•Œ๋ ค์ฃผ์„ธ์š”!

728x90
๋ฐ˜์‘ํ˜•
728x90
๋ฐ˜์‘ํ˜•

์ธ๊ณต์ง€๋Šฅ, ๋น…๋ฐ์ดํ„ฐ, ๋จธ์‹ ๋Ÿฌ๋‹๋“ฑ......

 

ํŒŒ์ด์ฌ, ์ˆ˜ํ•™, ํ†ต๊ณ„, SQL, ๋น…๋ฐ์ดํ„ฐ ์ด๋ก , ์ธ๊ณต์ง€๋Šฅ ์ด๋ก , ๋จธ์‹ ๋Ÿฌ๋‹ ์ด๋ก  ๋“ฑ ๋นก์„ธ๊ฒŒ ๊ณต๋ถ€ํ•˜์„ธ์š”...

 

๋ถ„์•ผ๊ฐ€ ์ •๋ง ์–ด๋ ต๋„ค์š” ใ… 

728x90
๋ฐ˜์‘ํ˜•
728x90
๋ฐ˜์‘ํ˜•

ํŒŒ์ด์ฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ Matplotlib๋กœ ๋ฐ์ดํ„ฐ ์‹œ๊ฐํ™” ํ•  ๋•Œ๋งˆ๋‹ค ํ•œ๊ธ€๋“ค์ด ๊นจ์ง€๋Š” ํ˜„์ƒ๋“ค์„ ๋งŽ์ด ๋ณผ๊ฑฐ๋‹ค.

๋ฌผ๋ก  ์˜์–ด๋กœ ์ž‘์„ฑํ•˜๋ฉด ์ด๋Ÿฌํ•œ ์˜ค๋ฅ˜๋Š” ๋‚˜ํƒ€๋‚˜์ง€ ์•Š์„๊ฑฐ์ง€๋งŒ.....

์—ฌํŠผ ์˜ค๋Š˜์€ ํ•œ๊ธ€๊นจ์ง ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์„ ์˜ฌ๋ฆฌ๊ณ ์ž ํ•œ๋‹ค.

 

๊ฐœ๋ฐœํ™˜๊ฒฝ - Jupyter Notebook

 

Matplotlib ํ•œ๊ธ€ ํฐํŠธ ์ •๋ณด ์กฐํšŒ

1. Matplotlib์˜ font_manager์— ํ˜„์žฌ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์ „์ฒด ํฐํŠธ์™€ ๊ฒฝ๋กœ๋ฅผ ํ•˜๋‚˜ ํ•˜๋‚˜์”ฉ ์ฐพ๋Š” ๋ฐฉ๋ฒ•

import matplotlib.font_manager as fm
font_list = fm.findSystemFonts(fontpaths=None, fontext='ttf')
font_list[:]

 

2. ์•Œ๊ณ  ์žˆ๋Š” ํฐํŠธ๋ฅผ ์ž…๋ ฅํ•ด์„œ ํฐํŠธ์˜ ์—ฌ๋ถ€๋ฅผ ํ™•์ธ ํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•

import matplotlib.font_manager as fm

font_name = 'Nanum'
[(f.name, f.name) for f in fm.fontManager.ttflist if f'{font_name}' in f.name]

 

2๊ฐ€์ง€ ๋ฐฉ๋ฒ• ์ค‘ ์•„๋ฌด ๋ฐฉ๋ฒ•์ด๋‚˜ ์‚ฌ์šฉํ•ด์„œ ํฐํŠธ ์—ฌ๋ถ€๋ฅผ ํ™•์ธํ•ด์ฃผ๋ฉฐ ๋ฉ๋‹ˆ๋‹ค.

 

Matplotlib ํ•œ๊ธ€ ์ ์šฉ

ํ•œ๊ธ€ ์ ์šฉ์€ importํ•ด์„œ ๋ถˆ๋Ÿฌ์™€์ฃผ๊ธฐ๋งŒ ํ•˜๋ฉด๋œ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ํ•œ๊ธ€ ํฐํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๊ฒŒ๋˜๋ฉด ๋งˆ์ด๋„ˆ์Šค ( - )๊ฐ€ ๊นจ์ง ํ˜„์ƒ๋„ ์ผ์–ด๋‚˜๋Š”๋ฐ ๊ทธ ๋งˆ์ด๋„ˆ์Šค์— ๊ด€ํ•œ ๋‚ด์šฉ๋„ ๋ฐ‘์— ์ ์–ด ๋‘์—ˆ๋‹ค.

import matplotlib.pyplot as plt

# family์—๋‹ค๊ฐ€ ์ž๊ธฐ๊ฐ€ ์“ธ ํฐํŠธ ์ด๋ฆ„์„ ์ ์–ด์ค€๋‹ค.
# ํฐํŠธ ์„ค์ •
plt.rc('font', family='NanumGothicCoding')
# ๋งˆ์ด๋„ˆ์Šค ๊นจ์ง ํ˜„์ƒ
plt.rc('axes', unicode_minus=False)

 

728x90
๋ฐ˜์‘ํ˜•
728x90
๋ฐ˜์‘ํ˜•

์ฐพ์•„๋ณด๋ฉด์„œ ์ข‹์€ ์ž๋ฃŒ๋“ค ๊ณ„์† ์—…๋ฐ์ดํŠธ ํ•  ์˜ˆ์ •


 

HIRA OAK Repository: ์ด์ƒ์น˜ ํƒ์ƒ‰์„ ์œ„ํ•œ ํ†ต๊ณ„์  ๋ฐฉ๋ฒ•

HIRA OAK Repository HIRA ๋ฐœ๊ฐ„ 3. ์ •์ฑ…๋™ํ–ฅ ์ด์ƒ์น˜ ํƒ์ƒ‰์„ ์œ„ํ•œ ํ†ต๊ณ„์  ๋ฐฉ๋ฒ• Metadata Downloads DC(XML) EXCEL Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.

repository.hira.or.kr

 

728x90
๋ฐ˜์‘ํ˜•
728x90
๋ฐ˜์‘ํ˜•

์‚ฌ์šฉ๋ฐฉ๋ฒ•

grep ๋ช…๋ น ๋’ค์— ์—ฌ๋Ÿฌ ๋ฌธ์ž์—ด, ํŒŒ์ผ ์ด๋ฆ„, ํ•ด๋‹น ๊ฒฝ๋กœ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค

 

์ž‘์€ ๋”ฐ์˜ดํ‘œ(' ')๋กœ ๋ฌถ๊ณ  ํŒŒ์ดํ”„( | )๋กœ ๊ตฌ๋ถ„ํ•˜๊ณ  ํŒŒ์ดํ”„์•ž์— ๋ฐฑ์Šฌ๋ž˜์‹œ( \ ) ์‚ฌ์šฉํ•จ

grep 'abc\|def' fileName_or_filePath

์ตœ๊ทผ์— ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์€ -E ์˜ต์…˜์„ ์‚ฌ์šฉํ•จ

-E ์˜ต์…˜์€ ํ™•์žฅ ์ •๊ทœ ํ‘œํ˜„์‹์œผ๋กœ ์ฒ˜๋ฆฌํ•จ

grep -E 'abc|def' fileName_or_filePath

grep์˜ ํ™•์žฅ๋ฒ„์ „์ธ egrep ๋˜ ๊ฐ€๋Šฅ

egrep 'abc|def' fileName_or_filePath

-e๋ฅผ ์—ฌ๋Ÿฌ๋ฒˆ ์‚ฌ์šฉ๋„ ๊ฐ€๋Šฅ

grep -e abc -e def fileName_or_filePath

 

grep, grep -E ๋ฐ egrep์˜ ์ฐจ์ด์ 

  1. grep์ด egrep ๋ณด๋‹ค ์˜ค๋ž˜๋œ ๋ฒ„์ „์ž„
  2. grep์€ ํ•˜๋‚˜์˜ ๋ฌธ์ž์—ด์„ ์ฐพ๊ณ , egrep์€ ์—ฌ๋Ÿฌ๊ฐœ์˜ ๋ฌธ์ž์—ด์„ ๋™์‹œ์— ์ฐพ์„ ์ˆ˜ ์žˆ์Œ
  3. grep์—์„œ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ฉ”ํƒ€๋ฌธ์ž ์ด์™ธ์— ์ถ”๊ฐ€ ์ •๊ทœํ‘œํ˜„์‹ ๋ฉ”ํƒ€๋ฌธ์ž๋ฅผ ์ง€์› ํ•จ

* 2021.11.29 ์ถ”๊ฐ€๋‚ด์šฉ

- egrep ์—์„œ ํŒŒ์ดํ”„๋กœ ๊ตฌ๋ถ„ํ•  ๋•Œ ๋„์–ด์“ฐ๊ธฐ ํ•˜์ง€๋ง๊ณ  ๋ถ™์—ฌ์„œ ์‚ฌ์šฉ.  ๋„์–ด ์“ฐ๋‹ˆ ์กฐํšŒ๋˜์ง€ ์•Š์•˜์Œ

 ์˜ˆ) ps -ef | egrep 'A|B|C|D' 

 

grep๊ณผ egrep์— ๋Œ€ํ•œ ์˜ต์…˜์ด๋‚˜ ์„ค๋ช…์€ ๋‚˜์ค‘์— ๋‹ค์‹œ ์ž‘์„ฑ


์ฐธ๊ณ ์‚ฌ์ดํŠธ

 

How to Grep for Multiple Strings, Patterns or Words

Use grep to search for multiple patterns or words in a file by following examples in this guide. The grep tool is one of the most famous command-line tools.

phoenixnap.com

 

728x90
๋ฐ˜์‘ํ˜•
728x90
๋ฐ˜์‘ํ˜•

DB๋‚˜ CSV ๋“ฑ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์–‘์ด ๋งŽ์€ ์ƒํƒœ์—์„œ Jupyter์— ์ถœ๋ ฅ์„ ํ•˜๊ฒŒ๋œ๋‹ค๋ฉด

 

IOPub data rate exceeded.
The notebook server will temporarily stop sending output
to the client in order to avoid crashing it.
To change this limit, set the config variable
`--NotebookApp.iopub_data_rate_limit`.

Current values:
NotebookApp.iopub_data_rate_limit=1000000.0 (bytes/sec)
NotebookApp.rate_limit_window=3.0 (secs)

 

์ด๋Ÿฌํ•œ ์˜ค๋ฅ˜๋ฅผ ๋ฐœ์ƒํ•  ๊ฒƒ์ด๋‹ค. ์ด ์˜ค๋ฅ˜๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ์•„๋ž˜์ฒ˜๋Ÿผ ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

 

1.  Jupyter ๋‚ด๋ถ€ ํ„ฐ๋ฏธ๋„ ์‚ฌ์šฉ

 โ˜ž Jupyter ๋‚ด๋ถ€์— ์žˆ๋Š” ํ„ฐ๋ฏธ๋„์„ ์‚ฌ์šฉํ•˜์—ฌ ์•„๋ž˜์˜ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•จ.

jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10

 โ˜ž Jupyter ์ƒˆ๋กœ ์ผœ์ง€๊ฒŒ ๋˜๊ณ  ์‹คํ–‰ ์‹œํ‚ค๋ฉด ์˜ค๋ฅ˜๊ฐ€ ํ•ด๊ฒฐ๋˜๋Š” ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ์Œ.

 

2.  ํ™˜๊ฒฝ์„ค์ • ๋ณ€๊ฒฝ

โ˜ž ๋ฆฌ๋ˆ…์Šค, cmd, ํŒŒ์›Œ์…€ ๋“ฑ ๋ช…๋ น์–ด ์ ๋Š” ๊ณณ์—๋‹ค ์•„๋ž˜ ๋ช…๋ น์–ด ์‚ฌ์šฉ

jupyter notebook --generate-config

โ˜ž Jupyter ํ™˜๊ฒฝ์„ค์ • ํŒŒ์ผ์ด ์žˆ๋Š” ๊ฒฝ๋กœ๊ฐ€ ๋‚˜์˜ด

โ˜ž ๊ทธ ๊ฒฝ๋กœ์— ๊ฐ€์„œ ๋ฉ”๋ชจ์žฅ์ด๋‚˜ vi, vim ๋“ฑ ํŽธ์ง‘์—๋””ํ„ฐ๋ฅผ ์ด์šฉํ•ด " jupyter_notebook_config.py " ํŒŒ์ผ์„ ์—ผ

โ˜ž ํ™˜๊ฒฝ์„ค์ •์— ๊ด€ํ•œ ๋‚ด์šฉ๋“ค์ด ์žˆ๋Š”๋ฐ ์—ฌ๊ธฐ์„œ " c.NotebookApp.iopub_data_rate_limit  " ๋ฌธ์žฅ์„ ์ฐพ์Œ

โ˜ž #c.NotebookApp.iopub_data_rate_limit = 1000000 #(์ฃผ์„)๊ณผ 1000000์„ ์ง€์šฐ๊ณ  1000000 ์ž๋ฆฌ์— 1.0e10 ๋ฅผ ์ž‘์„ฑํ•˜๊ณ  ์ €์žฅํ•จ

 โ˜ž Jupyter ์ƒˆ๋กœ ํ‚ค๋ฉด ์˜ค๋ฅ˜๊ฐ€ ํ•ด๊ฒฐ๋˜๋Š” ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ์Œ.

728x90
๋ฐ˜์‘ํ˜•

'๊ฐœ๋ฐœ ยท๊ณต๋ถ€ > ETC' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[JAVA] ์ฝ”๋“œ ์ทจ์†Œ์„  (Deprecated)  (0) 2022.05.03
[Jupyter Notebook] ๋‹จ์ถ•ํ‚ค ๋ชจ์Œ  (0) 2021.10.18
728x90
๋ฐ˜์‘ํ˜•

1. vi ํŽธ์ง‘๊ธฐ์—์„œ ' : ' ๋ฅผ ๋ˆŒ๋Ÿฌ ๋ช…๋ น์–ด ๋ชจ๋“œ๋กœ ๋“ค์–ด๊ฐ

2. ' / ' ๋˜๋Š” ' ? ' ์œผ๋กœ ๋ฌธ์ž์—ด ํƒ์ƒ‰

  • /์ฐพ์„ ๋ฌธ์ž์—ด : ํ˜„์žฌ ์ปค์„œ ์œ„์น˜์—์„œ ์•„๋ž˜ ๋ฐฉํ–ฅ์œผ๋กœ ํƒ์ƒ‰
  • ?์ฐพ์„ ๋ฌธ์ž์—ด : ํ˜„์žฌ ์ปค์„œ ์œ„์น˜์—์„œ ์œ— ๋ฐฉํ–ฅ์œผ๋กœ ํƒ์ƒ‰

3. ๋‹ค์Œ ๋ฌธ์ž์—ด์„ ๊ณ„์† ํƒ์ƒ‰ํ•˜๋ ค๋ฉด ์†Œ๋ฌธ์ž ' n '์„ ๋ˆ„๋ ค๋ฉด ๋˜๊ณ  ์ด์ „ ๋ฌธ์ž์—ด์„ ํƒ์ƒ‰ํ•˜๋ ค๋ฉด ๋Œ€๋ฌธ์ž ' N '์„ ๋ˆ„๋ฅด๋ฉด ๋จ

 

 

* ์ถ”๊ฐ€ ์˜ต์…˜์ด๋‚˜ ๊ด€๋ จ ์ž๋ฃŒ๋Š” ๋‚˜์ค‘์— ์ถ”๊ฐ€ํ•  ์˜ˆ์ •

 

728x90
๋ฐ˜์‘ํ˜•
728x90
๋ฐ˜์‘ํ˜•

728x90
๋ฐ˜์‘ํ˜•
728x90
๋ฐ˜์‘ํ˜•

Seaborn : ํ†ต๊ณ„ ๋ฐ์ดํ„ฐ ์‹œ๊ฐํ™”

 

seaborn.boxplot — seaborn 0.11.2 documentation

Vectors of data represented as lists, numpy arrays, or pandas Series objects passed directly to the x, y, and/or hue parameters.

seaborn.pydata.org

Matplotlib : Python์„ ์‚ฌ์šฉํ•œ ์‹œ๊ฐํ™”

 

Matplotlib: Python plotting — Matplotlib 3.4.3 documentation

 

matplotlib.org

Pandas : ๋ฐ์ดํ„ฐ ์กฐ์ž‘ ๋ฐ ๋ถ„์„

 

pandas documentation — pandas 1.3.3 documentation

The reference guide contains a detailed description of the pandas API. The reference describes how the methods work and which parameters can be used. It assumes that you have an understanding of the key concepts.

pandas.pydata.org

 

728x90
๋ฐ˜์‘ํ˜•

+ Recent posts