일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- 다이어트
- urllib
- pandas
- Excel
- tensorflow
- Unity
- 맛집
- python
- mssql
- 날짜
- sqlite
- MySQL
- ASP
- IOS
- javascript
- flutter
- port
- PyQt
- Linux
- PyQt5
- 라즈베리파이
- 함수
- node.js
- 리눅스
- 유니티
- GIT
- swift
- ubuntu
- MS-SQL
- PER
목록랭귀지/python (244)
아미(아름다운미소)
import pandas as pdimport requestsfrom typing import Optional, Dict, Any, Tupleimport warningswarnings.filterwarnings('ignore')class EnhancedFinancialAnalyzer: """네이버 금융 재무제표 분석기 - 확장된 재무비율 포함""" def __init__(self): self.headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' } ..
import pandas as pdimport requestsfrom typing import Optional, Dict, Anyimport warningswarnings.filterwarnings('ignore')class FinancialAnalyzer: """네이버 금융 재무제표 분석기""" def __init__(self): self.headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' } def get_financial_..
import pandas as pdimport requestsdef get_financial_statement(ticker): """ 네이버 금융에서 손익계산서 데이터를 가져오는 함수 """ url = f'https://finance.naver.com/item/main.naver?code={ticker}' try: tables = pd.read_html(url, encoding='euc-kr') except: return None for table in tables: if table.shape[1] >= 3 and '매출액' in table.iloc[:, 0].values: return table retu..
import osimport timefrom openpyxl import load_workbooktemp_path = "temp.xlsx"try: wb = load_workbook(temp_path) ws = wb.active # ... 작업 ...finally: # 임시 파일 닫고 삭제 (삭제 실패 시 재시도) try: wb.close() except: pass max_retries = 5 retry_delay = 0.5 # 초 for attempt in range(1, max_retries + 1): try: os.remove(temp_path) print(f"✅ 임시 파일 ..
# 1. 현재 어떤 브랜치에 있는지 확인git branch# 2. main 브랜치로 이동git checkout main# 3. 최신 상태로 업데이트 (필요 시)git pull origin main# 4. a 브랜치를 main에 머지git merge a# 5. 원격 저장소에 반영git push origin main
def write_limited_lines(file_path, new_line, max_lines=5): # 기존 파일 읽기 try: with open(file_path, "r", encoding="utf-8") as f: lines = f.readlines() except FileNotFoundError: lines = [] # 기존 내용에서 마지막 (max_lines - 1) 줄만 유지 lines = lines[-(max_lines - 1):] # 새로운 줄 추가 lines.append(new_line + "\n") # 파일 다시 쓰기 with open(file_path, "w", encoding="utf..
import timestart_time = time.time() # 시작 시간 기록for i in range(100): # 예시로 100회 반복 # 작업 수행 time.sleep(1) # 예시로 1초 대기 # 현재 시간 체크 elapsed_time = time.time() - start_time if elapsed_time > 30: # 30초 초과 시 print("30초 이상 지연되어 루프를 벗어납니다.") break
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-arm64sudo install minikube-linux-arm64 /usr/local/bin/minikubesudo chmod +x /usr/local/bin/minikubesudo apt-get updatesudo apt-get upgrade docker-cesudo systemctl status dockersudo systemctl start dockerminikube startminikube statusminikube dashboard
result = int(value) if isinstance(value, int) or (isinstance(value, str) and value.isdigit()) else 0
sqliteimport sqlite3import firebase_adminfrom firebase_admin import credentialsfrom firebase_admin import messagingclass FCMNotifier: def __init__(self, db_path, firebase_config): # Firebase Admin SDK 초기화 cred = credentials.Certificate(firebase_config) firebase_admin.initialize_app(cred) # SQLite 데이터베이스 경로 저장 self.db_path = db_path def get_device_tokens(s..