분류 전체보기
-
맥에 리눅스 명령어 및 설치카테고리 없음 2023. 9. 14. 13:02
#!/usr/bin/env bash set -eu wget https://srtm.csi.cgiar.org/wp-content/uploads/files/250m/SRTM_NE_250m_TIF.rar && \ wget https://srtm.csi.cgiar.org/wp-content/uploads/files/250m/SRTM_SE_250m_TIF.rar && \ wget https://srtm.csi.cgiar.org/wp-content/uploads/files/250m/SRTM_W_250m_TIF.rar && \ unar -f SRTM_NE_250m_TIF.rar && \ unar -f SRTM_SE_250m_TIF.rar && \ unar -f SRTM_W_250m_TIF.rar set -eu: 이 ..
-
파이참 def 디버깅카테고리 없음 2023. 9. 13. 19:58
파이참에서 디버그로 코드를 돌리는데 import numpy as np import tensorflow as tf # 학습 모델 종류 설정 model_prefix = "lstm" total_length = 10000 # 10 km window_size = int(total_length/link_length) shift_size = int(window_size/2) dp = DataPreprocessor(window_size=window_size, link_length=link_length, shift_size=shift_size, batch_size=1) 위와 같은 코드를 돌리는데는 이해가 갔는데 아래와 같이 def()형태로만 되어있는 코드가 돌아가는게 이해가 안갔다. import pandas as pd ..
-
-
-
Weather Observation Station 18<HackerRank> 2023. 7. 17. 21:25
Weather Observation Station 18 -- MYSQL WITH POINTS as ( SELECT MIN(LAT_N) AS a, MIN(LONG_W) AS b, MAX(LAT_N) AS c, MAX(LONG_W) AS d FROM STATION ) SELECT ROUND(ABS((a-c)+(b-d)),4) FROM POINTS -- MS SQL SERVER SELECT CAST(ABS((max(LAT_N) - min(LAT_N)) + (max(LONG_W) - min(LONG_W))) AS decimal(10,4)) FROM station -- ORACLE select round(max(LAT_N)-min(LAT_N)+max(LONG_W)-min(LONG_W),4) from STATION..
-
NEW Companies<HackerRank> 2023. 7. 14. 21:13
NEW Companies -- MYSQL SELECT e.company_code, c.founder, count( DISTINCT e.lead_manager_code ), count( DISTINCT e.senior_manager_code ), count( DISTINCT e.manager_code ), count( DISTINCT e.employee_code ) FROM Employee e, Company c WHERE e.company_code = c.company_code GROUP BY company_code, founder; -- oracle, db2 select c.company_code, c.founder, count(distinct e.lead_manager_code), count(dist..
-
Binary Tree Nodes<HackerRank> 2023. 7. 12. 21:36
Binary Tree Nodes -- DB2, ORACLE SELECT N, (CASE WHEN P IS NULL THEN 'Root' WHEN N NOT IN (SELECT NVL(P,0) FROM BST) THEN 'Leaf' ELSE 'Inner' END) FROM BST ORDER BY N; -- MYSQL, MS SQL SERVER SELECT N , CASE WHEN p IS NULL THEN "Root" WHEN N IN (SELECT DISTINCT P FROM BST) THEN "Inner" ELSE "Leaf" END FROM BST ORDER BY N;