응애나애기
Bronze개인인증
팔로워0 팔로우
소개
등록된 소개글이 없습니다.
전문분야 등록된 전문분야가 없습니다.
판매자 정보
학교정보
입력된 정보가 없습니다.
직장정보
입력된 정보가 없습니다.
자격증
  • 입력된 정보가 없습니다.
판매지수
전체자료 2
검색어 입력폼
  • 파이썬 불법사이트 탐지 및 차단
    # -*- coding: utf-8 -*-# -*- coding: euc-kr -*-import pandas as pdimport numpy as npfrom urllib.request import Request, urlopenimport requestsimport tkinter.messagebox as msgboxfrom tkinter import *from urllib.parse import quote_plusfrom bs4 import BeautifulSoupfrom selenium import webdriverimport sysimport osimport win32com.shell.shell as shellimport re#get adminif sys.argv[-1] != 'asadmin':script = os.path.abspath(sys.argv[0])params = ' '.join([script] + sys.argv[1:] + ['asadmin'])shell.ShellExecuteEx(lpVerb='runas', lpFile=sys.executable, lpParameters=params)sys.exit(0)#root windowtk = Tk()tk.geometry('600x440')tk.title("team_M.D")#widget-eventdef for_listbox():global list_blist_b = []f = open('C:/Windows/System32/drivers/etc/hosts','r')line = f.readline()listbox.delete(0,END)while line:if (line.startswith('127.0.0.1 ')):l_text = (line.split('127.0.0.1 ')[1])list_b.append(l_text.split('n')[0])listbox.insert(END, l_text)line = f.readline()else:line = f.readline()f.close()def search_는 문자열들for index, value in enumerate(search_word):plusurl = search_word[index]url = baseurl + quote_plus(plusurl)driver = webdriver.Chrome()driver.get(url)#url crawlinghtml = driver.page_sourcesoup = BeautifulSoup(html, "html.parser")list = soup.select('.yuRUbf')for link in list:for index2, value2 in enumerate(catch_word):if catch_word[index2] in link.a.attrs['href']:s_url=link.a.attrs['href'].split('/')[2]list_a.append(s_url)driver.close()#중복제거list_a_set = set(list_a)list_a_set = list_a_set - set(list_b)list_a = [a for a in list_a_set]#list-box insertlistbox_search.delete(0,END)for a in list_a:listbox_search.insert(END,a)def block_url():global list_a, list_bfor_listbox()if listbox_search.size() != 0:# 중복제거list_a_set = set(list_a)list_a_set = list_a_set - set(list_b)list_a = [a for a in list_a_set]print("a: ",list_a)print("b: ", list_b)#blockf_hosts = open('C:/Windows/System32/drivers/etc/hosts', 'a')for data in list_a:f_hosts.write('127.0.0.1 ' + data)f_hosts.write('n')f_hosts.close()ta_bad_head.tail(10) # 데이터 뒤 10줄url_data_good = pd.read_csv("URLS.txt", header=None, names=["url", "class"])data = pd.concat([url_data_bad_head, url_data_good]) # 데이터 프레임 합치기data['class'].unique()data.shape # 행열 차원확인data[data['class'] == 0]data[data['class'] == 1].head()data_arr = np.array(data) # 배열 생성def get_tokens(input_url):tokens_by_slash = str(input_url.encode('utf-8')).split('/') # 인코딩 해서 /를 기준으로 쪼개기all_tokens = []for i in tokens_by_slash:tokens = str(i).split('-')tokens_by_dot = []for j in range(0, len(tokens)):temp_tokens = str(tokens).split('.')tokens_by_dot = tokens_by_dot + temp_tokensall_tokens = all_tokens + tokens + tokens_by_dot# 중복제거all_tokens = list(set(all_tokens))# .com 추가할 필요 없는듯?if 'com' in all_tokens:all_tokens.remove('com')return all_tokenstest = [te[1] for te in data_arr]testtrain = [tr[0] for tr in data_arr]train# TfidfVectorizer: TF-IDF라는 값을 사용하여 CountVectorizer의 단점을 보완# CountVectorizer: 각 텍스트에서 단어 출현 횟수를 카운팅한 벡터from sklearn.feature_extraction.text import Tfi 범주에 속하는 것으로# 분류해주는 지도 학습 알고리즘from sklearn.linear_model import LogisticRegressionlreg = LogisticRegression(random_state=0)lreg.fit(x_train, y_train)#model_1 = lreg.score(x_test, y_test)#model_1# ## KNN: 새로운 데이터와 기존 데이터들간 거리를 측정하고 가까운 데이터들의 종류가 무엇인지 확인하여# 새로운 데이터의 종류를 판별하는 알고리즘from sklearn.neighbors import KNeighborsClassifierclassifier = KNeighborsClassifier(n_neighbors=5)classifier.fit(x_test, y_test)#model_2 = classifier.score(x_test, y_test)#model_2# ## 결정 트리: 의사결정 규칙을 나무 구조로 나타내어 전체 자료를 몇 개의 작은 집단으로 나누어서 분석from sklearn.tree import DecisionTreeClassifierdct = DecisionTreeClassifier(criterion='entropy', random_state=0)dct.fit(x_train, y_train)#model_3 = dct.score(x_test, y_test)#model_3# ## Random Forestfrom sklearn.ensemble import RandomForestClassifierrf = RandomForestClassifier()rf.fit(x_train, y_train)#model_4 = rf.score(x_test, y_test)#model_4# ## SVM: 분류를 위한 기준 선을 정의하는 모델from sklearn.svm import SVCclf = SVC(kernel='linear', random_state=1) # 'linear'로 선형분리 진행clf.fit(x_test, y_tser-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0'}html = requests.get(urls)req = Request(urls, headers=header)page = urlopen(req).read()bsObject = BeautifulSoup(html.text, "html.parser")keyword = bsObject.head.find("meta", {"name": "keywords"}) # meta 태그 name=keywords 필터링title = bsObject.head.find("meta", {"name": "title"})stl = re.findall("d+", urls) # 도메인 시퀀스 번호ans = prediction(urls)if (ans == 0):#print("정상 url 입니다")am = "정상 url 입니다"else:#print("악성 url 입니다")am = "악성 url 입니다"if keyword or title or stl:#print("유해 사이트 입니다")km = "유해 사이트 입니다"else:#print("정상 사이트 입니다")km = "정상 사이트 입니다"msgbox.showinfo("result",am+"n"+km)#widgetbutton_read = Button(tk, text='read_hosts', command=for_listbox)button_search = Button(tk, text='search-url', command=search_t3)button_block = Button(tk, text='block-url', command=block_url)listbox = Listbox(tk)listbox.config(selectmode="extended")listbox.config(height=0)listbox_search = Listbox(tk)listbox_search.config(sele
    공학/기술| 2023.01.27| 6페이지| 2,500원| 조회(132)
    미리보기
  • 파이썬 GUI 영화예매 프로젝트
    영화관 프로젝트영화 예매 프로그램개발 동기파이썬 GUI를 배우면서 내가 이 과목을 마무리할 프로젝트는 과연 무엇일까 하는 의문에서 시작했습니다. 아직 많이 부족하지만 내가 할 수 있고 배운 것들을 토대로 만들었습니다.프로젝트 설명영화 예매를 하기 위해 영화 선택, 인원 선택, 좌석 선택 그리고 마무리로 영화 예매율을 표로 나타냈습니다.개발 기간2020년 11월 20일~2020년 11월 22일(2일)개발 인원기획 및 프로그래밍 1명담당 업무프로그램 기획 및 프로그래밍담당 업무 내용전체적인 틀을 만든 후 기획했고 부분별로 만들어서 프로그래밍했습니다.플랫폼/사용언어/사용 툴-플랫폼: PC-사용언어: PYTHON-사용 툴: Spyder(anaconda3)?프로젝트 내용?기획서 등 자료 이미지?결과 화면 이미지\\from tkinter import *from tkinter import messageboxfrom matplotlib.backends.backend_tkagg import FigureCanvasTkAggfrom matplotlib.figure import Figureimport matplotlib.font_manager as fmimport numpy as npimport matplotlib.pyplot as plotfont_location='/Windows/Fonts/KCCDodamdodam.ttf'font_name = fm.FontProperties(fname=font_location,).get_name()plot.rc('font',family=font_name)fig = plot.figure()window=Tk()window.geometry('300x200-600+200')window.title('영화 예매')def quit_1():window.destroy()def num():ww=Tk()def quit_3():ww.destroy()ww.geometry('400x300-600+200')ww.title('인원')labelP=Label(ww,text=kA=Checkbutton(wi,text="애비규환",variable=nb4,command=ca)checkA.pack(side=TOP)btnQ=Button(wi,text=" 선택 ",bg="white",fg="black",command=lambda:[quit_2(),num()]).pack(side=BOTTOM,pady=10)def res():w=Tk()w.geometry('600x400-500+200')w.title('예매')def quit_4():w.destroy()def i1():btn1['bg']='yellow'def i2():btn2['bg']='yellow'def i3():btn3['bg']='yellow'def i4():btn4['bg']='yellow'def i5():btn5['bg']='yellow'def i6():btn6['bg']='yellow'def i7():btn7['bg']='yellow'def i8():btn8['bg']='yellow'def i9():btn9['bg']='yellow'def i10():btn10['bg']='yellow'def i11():btn11['bg']='yellow'def i12():btn12['bg']='yellow'def i13():btn13['bg']='yellow'def i14():btn14['bg']='yellow'def i15():btn15['bg']='yellow'def i16():btn16['bg']='yellow'def i17():btn17['bg']='yellow'def i18():btn18['bg']='yellow'def i19():btn19['bg']='yellow'def i20():btn20['bg']='yellow'def i21():btn21['bg']='yellow'def i22():btn22['bg']='yellow'def i23():btn23['bg']='yellow'def i24():btn24['bg']='yellow'def i25():btn25['bg']='yellow'def lace(x=10,y=100)labelC=Label(w,text='C',font=("Berlin Sans FB",10)).place(x=10,y=140)labelD=Label(w,text='D',font=("Berlin Sans FB",10)).place(x=10,y=180)labelE=Label(w,text='E',font=("Berlin Sans FB",10)).place(x=10,y=220)labelF=Label(w,text='F',font=("Berlin Sans FB",10)).place(x=10,y=260)labelG=Label(w,text='G',font=("Berlin Sans FB",10)).place(x=10,y=300)btn1=Button(w,text=" 1 ",font=("Berlin Sans FB",10),command=i1)btn1.place(x=100,y=60)btn2=Button(w,text=" 2 ",font=("Berlin Sans FB",10),command=i2)btn2.place(x=130,y=60)btn3=Button(w,text=" 3 ",font=("Berlin Sans FB",10),command=i3)btn3.place(x=160,y=60)btn4=Button(w,text=" 4 ",font=("Berlin Sans FB",10),command=i4)btn4.place(x=220,y=60)btn5=Button(w,text=" 5 ",font=("Berlin Sans FB",10),command=i5)btn5.place(x=250,y=60)btn6=Button(w,text=" 6 ",font=("Berlin Sans FB",10),command=i6)btn6.place(x=310,y=60)btn7=Button(w,text=" 7 ",font=("Berlin Sans FB",10),command=i7)btn7.place(x=340,y=60)btn8=Button(w,text=" 8 ",font=("Berlin Sans Button(w,text=" 26 ",font=("Berlin Sans FB",10),command=i26)btn26.place(x=310,y=140)btn27=Button(w,text=" 27 ",font=("Berlin Sans FB",10),command=i27)btn27.place(x=340,y=140)btn28=Button(w,text=" 28 ",font=("Berlin Sans FB",10),command=i28)btn28.place(x=370,y=140)btn29=Button(w,text=" 29 ",font=("Berlin Sans FB",10),command=i29)btn29.place(x=430,y=140)btn30=Button(w,text=" 30 ",font=("Berlin Sans FB",10),command=i30)btn30.place(x=460,y=140)btn31=Button(w,text=" 31 ",font=("Berlin Sans FB",10),command=i31)btn31.place(x=100,y=180)btn32=Button(w,text=" 32 ",font=("Berlin Sans FB",10),command=i32)btn32.place(x=130,y=180)btn33=Button(w,text=" 33 ",font=("Berlin Sans FB",10),command=i33)btn33.place(x=160,y=180)btn34=Button(w,text=" 34 ",font=("Berlin Sans FB",10),command=i34)btn34.place(x=220,y=180)btn35=Button(w,text=" 35 ",font=("Berlin Sans FB",10),command=i35)btn35.place(x=250,y=180)btn36=Button(w,text=" 36 ",font=("Berlin Sans FB",10),command=i36)btn36.place(x=310,y=180)btn37=Button(w,tmand=i54)btn54.place(x=220,y=260)btn55=Button(w,text=" 55 ",font=("Berlin Sans FB",10),command=i55)btn55.place(x=250,y=260)btn56=Button(w,text=" 56 ",font=("Berlin Sans FB",10),command=i56)btn56.place(x=310,y=260)btn57=Button(w,text=" 57 ",font=("Berlin Sans FB",10),command=i57)btn57.place(x=340,y=260)btn58=Button(w,text=" 58 ",font=("Berlin Sans FB",10),command=i58)btn58.place(x=370,y=260)btn59=Button(w,text=" 59 ",font=("Berlin Sans FB",10),command=i59)btn59.place(x=430,y=260)btn60=Button(w,text=" 60 ",font=("Berlin Sans FB",10),command=i60)btn60.place(x=460,y=260)btn61=Button(w,text=" 61 ",font=("Berlin Sans FB",10),command=i61)btn61.place(x=100,y=300)btn62=Button(w,text=" 62 ",font=("Berlin Sans FB",10),command=i62)btn62.place(x=130,y=300)btn63=Button(w,text=" 63 ",font=("Berlin Sans FB",10),command=i63)btn63.place(x=160,y=300)btn64=Button(w,text=" 64 ",font=("Berlin Sans FB",10),command=i64)btn64.place(x=220,y=300)btn65=Button(w,text=" 65 ",font=("Berlin Sans FB",10),command=i65)b
    공학/기술| 2021.09.07| 14페이지| 1,000원| 조회(640)
    미리보기
전체보기
해캠 AI 챗봇과 대화하기
챗봇으로 간편하게 상담해보세요.
2026년 05월 05일 화요일
AI 챗봇
안녕하세요. 해피캠퍼스 AI 챗봇입니다. 무엇이 궁금하신가요?
1:38 오후
문서 초안을 생성해주는 EasyAI
안녕하세요 해피캠퍼스의 20년의 운영 노하우를 이용하여 당신만의 초안을 만들어주는 EasyAI 입니다.
저는 아래와 같이 작업을 도와드립니다.
- 주제만 입력하면 AI가 방대한 정보를 재가공하여, 최적의 목차와 내용을 자동으로 만들어 드립니다.
- 장문의 콘텐츠를 쉽고 빠르게 작성해 드립니다.
- 스토어에서 무료 이용권를 계정별로 1회 발급 받을 수 있습니다. 지금 바로 체험해 보세요!
이런 주제들을 입력해 보세요.
- 유아에게 적합한 문학작품의 기준과 특성
- 한국인의 가치관 중에서 정신적 가치관을 이루는 것들을 문화적 문법으로 정리하고, 현대한국사회에서 일어나는 사건과 사고를 비교하여 자신의 의견으로 기술하세요
- 작별인사 독후감