Skip to content

Instantly share code, notes, and snippets.

View search5's full-sized avatar

Jiho Persy Lee search5

View GitHub Profile
@search5
search5 / pyver_extract.ps1
Created April 30, 2024 12:22
파이썬 버전 추출
# python --version 명령 실행
$pythonVersionOutput = python --version
# 버전 문자열에서 숫자 부분 추출
$pythonVersion = $pythonVersionOutput -replace 'Python ', ''
# 첫 번째와 두 번째 숫자 추출
$majorMinorVersion = $pythonVersion -replace '^(\d+)\.(\d+).*', '$1$2'
# 숫자로 변환
@search5
search5 / pyinstaller_win32.sh
Created April 23, 2024 21:31
windows service with python on windows
pipenv install pyinstaller
pipenv run pyinstaller --onfile --hidden-import win32timezone service.py
import argparse
def main():
parser = argparse.ArgumentParser(
prog=__file__,
description='What the program does',
epilog='Text at the bottom of help')
parser.add_argument('filename', nargs='?', choices=['install', 'update', 'remove'])
args = parser.parse_args()
print(args)
@search5
search5 / trac_on_window_service.py
Last active April 23, 2024 10:55
trac windows service
import socket
import win32serviceutil
import servicemanager
import win32event
import win32service
import sys
import os
@search5
search5 / NounAvartar.vue
Last active June 30, 2025 19:18
Flask 기반의 파이썬 웹 프로그래밍 - 쇼핑몰에서 사용되는 코드
<template>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 40 45" version="1.1"
xml:space="preserve" style="" x="0px" y="0px" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round"
stroke-miterlimit="1.41421"><path d="M39.526,35.115l0,0c0,-6.673 -4.468,-12.302 -10.576,-14.058c-1.142,1.028 -2.46,1.858 -3.882,2.44c-1.597,0.653 -3.317,0.987 -5.042,0.987c-1.724,0 -3.444,-0.334 -5.041,-0.987c-1.422,-0.582 -2.741,-1.412 -3.882,-2.44c-6.108,1.755 -10.577,7.384 -10.577,14.056c0,0.001 0,0.002 0,0.002l39,0Zm-19.568,-13.001l-0.002,0l-0.038,0l-0.024,0l-0.002,0l-0.007,0l-0.053,-0.001l-0.005,0l-0.001,0c-1.393,-0.025 -2.723,-0.311 -3.944,-0.81l-0.051,-0.02l-0.006,-0.003l-0.005,-0.002l-0.014,-0.006l-0.025,-0.011l-0.012,-0.004l-0.01,-0.005l-0.014,-0.006l-0.015,-0.006l-0.016,-0.007l-0.017,-0.007l-0.011,-0.005l-0.006,-0.003l-0.017,-0.007c-3.885,-1.688 -6.605,-5.562 -6.605,-10.065c0,-6.054 4.915,-10.969 10.968,-10.969c6.054,0 10.969,4.915 10.969,10.969c0,4.
@search5
search5 / naver_oauth2_login.py
Created March 26, 2024 16:28
Naver Oauth Login
from requests_oauthlib import OAuth2Session
from flask import Flask, render_template_string, request
client_id = ''
redirect_uri = 'http://localhost:5000/callback'
client_secret = ''
authorization_url = 'https://nid.naver.com/oauth2.0/authorize'
token_url = 'https://nid.naver.com/oauth2.0/token'
function Add-EnvPath {
param(
[Parameter(Mandatory=$true)]
[string] $Path,
[ValidateSet('Machine', 'User', 'Session')]
[string] $Container = 'Session'
)
if ($Container -ne 'Session') {
#!/usr/bin/env python3
import argparse
import subprocess
import shlex
import os, sys
from datetime import timedelta, datetime
parser = argparse.ArgumentParser(description='통째 영상 파일을 여러개의 비디오 파일로 분할합니다')
parser.add_argument('description', metavar='description', type=str, nargs=1, help='분할 영상 정보 파일을 제공하세요')
@search5
search5 / cybercop_missing_account_read.py
Last active November 11, 2021 04:34
경찰청 사기계좌(휴대번호) 조회 with 파이썬
import requests
from urllib import parse
import json
import re
headers = {
'Referer': 'https://cyberbureau.police.go.kr/prevention/sub7.jsp?mid=020600',
}
fieldType = 'A' # 휴대폰은 H, A는 계좌번호
@search5
search5 / aldin_crawl.py
Created December 20, 2020 13:03
aldin_crawl.py
# 제목, 지은이, 출판사, 출판일, ISBN, 그림
url1 = "https://www.aladin.co.kr/shop/wproduct.aspx?ItemId=248169181"
# url = "https://www.aladin.co.kr/shop/wproduct.aspx?ItemId=256383383"
# url = "https://www.aladin.co.kr/shop/wproduct.aspx?ItemId=220179301"
# url = "https://www.aladin.co.kr/shop/wproduct.aspx?ItemId=200010445"
# url = "https://www.aladin.co.kr/shop/UsedShop/wuseditemall.aspx?ItemId=243636605"
# url = "https://www.aladin.co.kr/shop/wproduct.aspx?ItemId=165668006"
import requests
from bs4 import BeautifulSoup, Tag, NavigableString