프로그래밍 47

[오토핫키] 이미지서치 대체 라이브러리 ShinsImageScanClass

GitHub - Spawnova/ShinsImageScanClass: A library/class for fast AutoHotKey image/pixel searching Functions#Image....................Find an image; Returns 1 on success and updates returnX and returnY variables; 0 otherwiseImage(image, variance=0, ByRef returnX=0, ByRef returnY=0, centerResults=0, scanDir:=0)#ImageRegion..............Find an image in a specified region; Returns 1 on success and u..

TextMeshPro 한글 폰트 추가하기

상업용 무료 폰트를 받는다https://hangeul.naver.com/fonts/search?f=nanum 네이버 글꼴 모음네이버가 만든 150여종의 글꼴을 한번에 만나보세요hangeul.naver.comhttps://fonts.google.com/selection Google FontsMaking the web more beautiful, fast, and open through great typographyfonts.google.com 다운 받은 글꼴을 Assets/TextMesh Pro/Fonts에 집어 넣는다 Window -> TextMeshPro -> Font Asset Creator를 실행한다.아래와 같이 세팅한다.Character Sequence : 32-126,44032-55203,125..

배치파일을 통해 관리자 권한으로 실행하기

pyautogui를 이용해 키를 보내기 위해서는 관리자 권한으로 실행해야함 아래와 같이 배치파일을 이용해 파이썬 파일을 관리자 권한으로 실행한다.@echo off:: Check for administrator permissionsnet session >nul 2>&1if %errorLevel% == 0 ( echo Running with administrator permissions.) else ( echo Requesting administrator permissions... powershell -Command "Start-Process '%~0' -Verb runAs" exit /b):: Place your batch script commands hereecho This batc..

matplotlib로 차트 그리기

1. 기본 사용법  2x2 배열의 서브플롯에 각각 선 그래프, 막대 그래프, 산점도, 히스토그램이 그려집니다. tight_layout() 함수로 서브플롯 간의 간격이 자동으로 조정됩니다.  import matplotlib.pyplot as plt# 하나의 Figure와 2x2 배열의 서브플롯 생성fig, axs = plt.subplots(2, 2)# 각각의 서브플롯에 접근하여 차트를 그릴 수 있습니다axs[0, 0].plot([1, 2, 3], [1, 4, 9])axs[0, 1].bar([1, 2, 3], [1, 4, 9])axs[1, 0].scatter([1, 2, 3], [1, 4, 9])axs[1, 1].hist([1, 2, 3, 1, 2, 3, 1, 2, 3])# 레이아웃 조정plt.tight_l..

ta_lib를 이용하여 슬로우 스토캐스틱 구하기

ta_lib를 이용하면 간단하게 각종 주식 지표를 구할수 있는 다양한 함수를 제공하고 있음하지만  ta.momentum.stoch 함수는 기본적으로 fast stochastict 값을 반환하므로 스토캐스틱 계산 방식과 같이 fast 값을 3일 이동평균하면 slow 값을 얻을수 있다. 그리고 signal값을 다시 slow값을 3일 이동평균하면 값을 구할 수 있다.https://github.com/bukosabino/ta/tree/master?tab=readme-ov-file GitHub - bukosabino/ta: Technical Analysis Library using Pandas and NumpyTechnical Analysis Library using Pandas and Numpy. Contrib..

sql 명령어 예제

특정 필드값 변경하기UPDATE financialinfoSET year = 2023WHERE year = 2003; 새로운 테이블로 옮기기INSERT INTO financialinfo2SELECT id, year, fiscalgubun, industry, company_name, CASE WHEN length(stock_code)   특정 필드 기준으로 그룹화하고, 각 그룹별로 필드의 평균을 계산한 후, 이를 테이블에 삽입INSERT INTO industry (year, fiscalgubun, industry, debt_ratio, total_asset_growth_rate, sales_growth_rate, net_profit_growth_rate, op..

프로그래밍 2024.05.15

딕셔너리 사용법

딕셔너리(Dictionary)는 키(key)와 값(value)의 쌍으로 데이터를 저장하는 데이터 구조입니다. C#에서 딕셔너리는 Dictionary 클래스를 사용하여 선언하고, 키와 값을 추가, 수정, 삭제할 수 있습니다.다음은 딕셔너리의 기본적인 사용법입니다. 딕셔너리 선언Dictionary myDictionary = new Dictionary(); 위의 코드에서는 문자열을 키(key)로, 정수를 값(value)으로 갖는 딕셔너리를 선언했습니다.값 추가 또는 수정myDictionary["apple"] = 10; // "apple"이라는 키에 10을 추가하거나 수정합니다.myDictionary["banana"] = 5; // "banana"라는 키에 5를 추가하거나 수정합니다. 값 조회int value ..

프로그래밍/c# 2024.05.06