├── .gitignore ├── FunPy01_CayViewYoutube ├── CayView.py ├── IEDriverServer.exe ├── README.md ├── TangView.py ├── chromedriver.exe ├── videolist.txt └── viewcount.txt ├── FunPy02_SanDealTiki ├── README.md ├── TikiDisplayThread.py ├── TikiHelper.py ├── TikiHunterThread.py ├── TikiItem.py ├── TikiMain.py ├── TikiTarget.py ├── _ClassDiagram.png ├── _System.jpg ├── target_list.txt ├── temp.html └── test.txt ├── FunPy03_WorkingWithExel ├── Input.xlsx └── README.md ├── README.md └── Temp ├── Note.txt ├── main.py └── main.qml /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | # C++ objects and libs 3 | *.slo 4 | *.lo 5 | *.o 6 | *.a 7 | *.la 8 | *.lai 9 | *.so 10 | *.so.* 11 | *.dll 12 | *.dylib 13 | 14 | # Qt-es 15 | object_script.*.Release 16 | object_script.*.Debug 17 | *_plugin_import.cpp 18 | /.qmake.cache 19 | /.qmake.stash 20 | *.pro.user 21 | *.pro.user.* 22 | *.qbs.user 23 | *.qbs.user.* 24 | *.moc 25 | moc_*.cpp 26 | moc_*.h 27 | qrc_*.cpp 28 | ui_*.h 29 | *.qmlc 30 | *.jsc 31 | Makefile* 32 | *build-* 33 | *.qm 34 | *.prl 35 | 36 | # Qt unit tests 37 | target_wrapper.* 38 | 39 | # QtCreator 40 | *.autosave 41 | 42 | # QtCreator Qml 43 | *.qmlproject.user 44 | *.qmlproject.user.* 45 | 46 | # QtCreator CMake 47 | CMakeLists.txt.user* 48 | 49 | # QtCreator 4.8< compilation database 50 | compile_commands.json 51 | 52 | # QtCreator local machine specific files for imported projects 53 | *creator.user* 54 | 55 | *_qmlcache.qrc 56 | 57 | # ========= Python Ignore ====================== 58 | 59 | # Byte-compiled / optimized / DLL files 60 | __pycache__/ 61 | *.py[cod] 62 | *$py.class 63 | 64 | # C extensions 65 | *.so 66 | 67 | # Distribution / packaging 68 | .Python 69 | build/ 70 | develop-eggs/ 71 | dist/ 72 | downloads/ 73 | eggs/ 74 | .eggs/ 75 | lib/ 76 | lib64/ 77 | parts/ 78 | sdist/ 79 | var/ 80 | wheels/ 81 | share/python-wheels/ 82 | *.egg-info/ 83 | .installed.cfg 84 | *.egg 85 | MANIFEST 86 | 87 | # PyInstaller 88 | # Usually these files are written by a python script from a template 89 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 90 | *.manifest 91 | *.spec 92 | 93 | # Installer logs 94 | pip-log.txt 95 | pip-delete-this-directory.txt 96 | 97 | # Unit test / coverage reports 98 | htmlcov/ 99 | .tox/ 100 | .nox/ 101 | .coverage 102 | .coverage.* 103 | .cache 104 | nosetests.xml 105 | coverage.xml 106 | *.cover 107 | *.py,cover 108 | .hypothesis/ 109 | .pytest_cache/ 110 | cover/ 111 | 112 | # Translations 113 | *.mo 114 | *.pot 115 | 116 | # Django stuff: 117 | *.log 118 | local_settings.py 119 | db.sqlite3 120 | db.sqlite3-journal 121 | 122 | # Flask stuff: 123 | instance/ 124 | .webassets-cache 125 | 126 | # Scrapy stuff: 127 | .scrapy 128 | 129 | # Sphinx documentation 130 | docs/_build/ 131 | 132 | # PyBuilder 133 | .pybuilder/ 134 | target/ 135 | 136 | # Jupyter Notebook 137 | .ipynb_checkpoints 138 | 139 | # IPython 140 | profile_default/ 141 | ipython_config.py 142 | 143 | # pyenv 144 | # For a library or package, you might want to ignore these files since the code is 145 | # intended to run in multiple environments; otherwise, check them in: 146 | # .python-version 147 | 148 | # pipenv 149 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 150 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 151 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 152 | # install all needed dependencies. 153 | #Pipfile.lock 154 | 155 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 156 | __pypackages__/ 157 | 158 | # Celery stuff 159 | celerybeat-schedule 160 | celerybeat.pid 161 | 162 | # SageMath parsed files 163 | *.sage.py 164 | 165 | # Environments 166 | .env 167 | .venv 168 | env/ 169 | venv/ 170 | ENV/ 171 | env.bak/ 172 | venv.bak/ 173 | 174 | # Spyder project settings 175 | .spyderproject 176 | .spyproject 177 | 178 | # Rope project settings 179 | .ropeproject 180 | 181 | # mkdocs documentation 182 | /site 183 | 184 | # mypy 185 | .mypy_cache/ 186 | .dmypy.json 187 | dmypy.json 188 | 189 | # Pyre type checker 190 | .pyre/ 191 | 192 | # pytype static type analyzer 193 | .pytype/ 194 | 195 | # Cython debug symbols 196 | cython_debug/ -------------------------------------------------------------------------------- /FunPy01_CayViewYoutube/CayView.py: -------------------------------------------------------------------------------- 1 | import time 2 | from selenium import webdriver 3 | from selenium.webdriver.common.keys import Keys 4 | 5 | cssSelectorBtPlay = "#movie_player > div.ytp-cued-thumbnail-overlay > button" 6 | 7 | WIN_SIZE = 100 8 | 9 | url = "https://www.youtube.com/watch?v=9EqZrpEs5rw" 10 | 11 | url2 = "https://www.youtube.com/watch?v=VIHXxOWeszQ" 12 | 13 | driver1 = webdriver.Chrome() 14 | driver1.set_window_size(WIN_SIZE, WIN_SIZE) 15 | driver1.set_window_position(0, 0) 16 | driver1.get(url) 17 | elem1 = driver1.find_element_by_css_selector(cssSelectorBtPlay) 18 | elem1.click() 19 | print (driver1.current_window_handle) 20 | 21 | time.sleep(1) 22 | 23 | driver2 = webdriver.Chrome() 24 | driver2.set_window_size(100, 100) 25 | driver2.set_window_position(driver1.get_window_rect()['width'], 0) 26 | driver2.get(url2) 27 | elem2 = driver2.find_element_by_css_selector(cssSelectorBtPlay) 28 | elem2.click() 29 | print (driver2.current_window_handle) 30 | 31 | time.sleep(1) 32 | 33 | driver3 = webdriver.Chrome() 34 | driver3.set_window_size(100, 100) 35 | driver3.set_window_position(0, driver1.get_window_rect()['height']) 36 | driver3.get(url2) 37 | elem3 = driver3.find_element_by_css_selector(cssSelectorBtPlay) 38 | elem3.click() 39 | 40 | time.sleep(1) 41 | 42 | driver4 = webdriver.Chrome() 43 | driver4.set_window_size(100, 100) 44 | driver4.set_window_position(driver1.get_window_rect()['width'], driver1.get_window_rect()['height']) 45 | driver4.get(url2) 46 | elem4 = driver4.find_element_by_css_selector(cssSelectorBtPlay) 47 | elem4.click() 48 | 49 | count = 0; 50 | while True: 51 | count = (count + 1) % 2; 52 | if count == 0: 53 | driver2.get(url2) 54 | else: 55 | driver1.get(url2) 56 | 57 | time.sleep(5); 58 | -------------------------------------------------------------------------------- /FunPy01_CayViewYoutube/IEDriverServer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thebrownbox/HaveFunWithPython/ae9b7bf833ee4742e06c786ab8ff36fdd28b528f/FunPy01_CayViewYoutube/IEDriverServer.exe -------------------------------------------------------------------------------- /FunPy01_CayViewYoutube/README.md: -------------------------------------------------------------------------------- 1 | # Have Fun With Python [#No.1] 2 | ## Cày View Youtube 3 | 4 | Sử dụng python và Selenium để tạo ra một sript tự động mở browser và view một list các video được chỉ định sẵn. 5 | Kiến thức: 6 | - Biết cách đọc/ghi file 7 | - Biết cách cài đặt một thư viện 8 | - Biết cách sử dụng thư viện Selenium cơ bản 9 | - Các câu lệnh cơ bản trong Python 10 | 11 | Video hướng dẫn chi tiết: https://www.youtube.com/watch?v=XSQT9RBKoCs 12 | 13 | Bài viết hướng dẫn chi tiết: http://www.hoangvancong.com/2020/07/02/web-automation-with-selenium-python/ 14 | 15 | * FireFox Driver: 16 | geckodriver: https://github.com/mozilla/geckodriver/releases 17 | 18 | * Chrome Driver: 19 | http://chromedriver.storage.googleapis.com/index.html 20 | 21 | 22 | Add Driver to you PATH. 23 | With MAC, copy driver to /usr/local/bin folder 24 | -------------------------------------------------------------------------------- /FunPy01_CayViewYoutube/TangView.py: -------------------------------------------------------------------------------- 1 | import time 2 | from selenium import webdriver 3 | 4 | cssSelectorBtPlay = "#movie_player > div.ytp-cued-thumbnail-overlay > button" 5 | videoFileName = "videolist.txt" 6 | viewCountFileName = "viewcount.txt" 7 | 8 | videoFile = open(videoFileName) 9 | listVideo = videoFile.readlines() 10 | 11 | saveViewFile = open(viewCountFileName, "r") 12 | viewCount = int(saveViewFile.read()) 13 | saveViewFile.close() 14 | 15 | NUMBER_OF_WINDOW = 4 16 | NUMBER_OF_VIDEO = len(listVideo) 17 | LOOP_TIME = 3 18 | 19 | print("WINDOW: " + str(NUMBER_OF_WINDOW)) 20 | print("VIDEO: " + str(NUMBER_OF_VIDEO)) 21 | 22 | videoIndex = 0 23 | windowIndex = 0 24 | windowCount = 1 25 | 26 | browser = webdriver.Chrome() 27 | browser.get(listVideo[videoIndex]) 28 | browser.set_window_position(100,100); 29 | time.sleep(2) 30 | e = browser.find_element_by_css_selector(cssSelectorBtPlay) 31 | e.click() 32 | time.sleep(1) 33 | 34 | while True: 35 | videoIndex = (videoIndex + 1) % NUMBER_OF_VIDEO 36 | windowIndex = (windowIndex + 1) % NUMBER_OF_WINDOW 37 | print(str(windowIndex) + " : " + str(videoIndex)) 38 | url = listVideo[videoIndex].strip(); 39 | 40 | if windowCount < NUMBER_OF_WINDOW: 41 | windowCount = windowCount + 1; 42 | browser.execute_script("window.open('"+url+"')") 43 | else: 44 | browser.switch_to.window(browser.window_handles[windowIndex]) 45 | time.sleep(0.5) 46 | browser.get(url) 47 | 48 | viewCount = viewCount+1 49 | 50 | saveViewFile = open(viewCountFileName, "w") 51 | saveViewFile.write(str(viewCount)) 52 | saveViewFile.close() 53 | 54 | time.sleep(LOOP_TIME) 55 | -------------------------------------------------------------------------------- /FunPy01_CayViewYoutube/chromedriver.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thebrownbox/HaveFunWithPython/ae9b7bf833ee4742e06c786ab8ff36fdd28b528f/FunPy01_CayViewYoutube/chromedriver.exe -------------------------------------------------------------------------------- /FunPy01_CayViewYoutube/videolist.txt: -------------------------------------------------------------------------------- 1 | https://www.youtube.com/watch?v=9EqZrpEs5rw 2 | https://www.youtube.com/watch?v=VIHXxOWeszQ 3 | https://www.youtube.com/watch?v=IRoOEsNqgzM 4 | https://www.youtube.com/watch?v=MxAybn96rlQ 5 | https://www.youtube.com/watch?v=Lh1cpUO0ywc 6 | https://www.youtube.com/watch?v=BJNvpYLw4Rg 7 | https://www.youtube.com/watch?v=RzKE5ZIg1gc 8 | https://www.youtube.com/watch?v=-x9T4LBrTmA 9 | https://www.youtube.com/watch?v=AOP4FhSnkHE 10 | https://www.youtube.com/watch?v=pMK8R3M_Lwk 11 | https://www.youtube.com/watch?v=OSgK6a_y-SI 12 | https://www.youtube.com/watch?v=5tZarJ6LiZc 13 | https://www.youtube.com/watch?v=FAQtUPvtwEc 14 | https://www.youtube.com/watch?v=UsUTHGbpvzY 15 | https://www.youtube.com/watch?v=09MKgIyj_1w 16 | https://www.youtube.com/watch?v=9IjY90pkWj0 17 | https://www.youtube.com/watch?v=vcXTtMlDhLs 18 | https://www.youtube.com/watch?v=jc99cVBkac0 19 | https://www.youtube.com/watch?v=1j-fMOGdE-Q 20 | https://www.youtube.com/watch?v=0Q3RBacgpjM 21 | https://www.youtube.com/watch?v=1-AXNmmNW7E 22 | https://www.youtube.com/watch?v=iQZkN44SHpY 23 | https://www.youtube.com/watch?v=6yfoH8OAQu8 24 | https://www.youtube.com/watch?v=YxtsZfc-zp4 25 | https://www.youtube.com/watch?v=pKSQvjeuWM4 26 | https://www.youtube.com/watch?v=N8jsojWHIgY 27 | https://www.youtube.com/watch?v=e29cATDEe2w 28 | https://www.youtube.com/watch?v=nIT3aO0pCJU 29 | https://www.youtube.com/watch?v=BHbKJeXeW4E 30 | https://www.youtube.com/watch?v=YqOf8XD_0Ko 31 | https://www.youtube.com/watch?v=ipovEFTOGyE 32 | https://www.youtube.com/watch?v=eFmikAqRsNc -------------------------------------------------------------------------------- /FunPy01_CayViewYoutube/viewcount.txt: -------------------------------------------------------------------------------- 1 | 59 -------------------------------------------------------------------------------- /FunPy02_SanDealTiki/README.md: -------------------------------------------------------------------------------- 1 | # Have Fun With Python No.2: Săn Deal Tiki with Python 2 | # In this project we will learn: 3 | - How to read data from file. 4 | - How to create and work with multiple python source files at a time. 5 | - How to create class and working with OOP (Object Oriented Programming). 6 | - How to use module Request to get data from a web site. 7 | - How to use module Beautiful Soup to parse data from html contents from above step. 8 | - How to create a Thread and how to work with multiple threads at a time. 9 | - Also know how to handle code with difference operating system. 10 | Above knowlegde is very nessesary when you crawling data from some where. 11 | 12 | # Install required modules 13 | * Module: Requests 14 | `pip install requests` 15 | * Module: Beautiful Soup 16 | `pip install beautifulsoup4` 17 | * Module: lxml 18 | `pip install lxml` 19 | 20 | # System Design 21 |  22 | 23 | # Project structure | Class Diagram 24 |  25 | -------------------------------------------------------------------------------- /FunPy02_SanDealTiki/TikiDisplayThread.py: -------------------------------------------------------------------------------- 1 | from threading import Thread 2 | from TikiHunterThread import TikiHunterThread 3 | import time 4 | from os import system 5 | from sys import platform 6 | 7 | class TikiDisplayThread(Thread): 8 | 9 | def __init__(self): 10 | Thread.__init__(self) 11 | self.hunters = [] 12 | self.index = 0 13 | 14 | def addHunter(self, hunter): 15 | self.hunters.append(hunter) 16 | 17 | def show(self): 18 | for h in self.hunters: 19 | if(h.bestItem != None): 20 | print(h.bestItem.info()) 21 | print("----------------") 22 | 23 | def isAllAlive(self): 24 | for h in self.hunters: 25 | if h.isAlive() == False: 26 | return False 27 | return True 28 | 29 | def run(self): 30 | while True and self.isAllAlive(): 31 | self.index = (self.index + 1) % 100 32 | print("index: " + str(self.index)) 33 | self.show() 34 | time.sleep(3) 35 | if platform == "win32": # for Windows 36 | system("cls") 37 | else: # for others 38 | system("clear") -------------------------------------------------------------------------------- /FunPy02_SanDealTiki/TikiHelper.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from TikiTarget import TikiTarget 3 | from sys import platform 4 | 5 | def getTargetsFromFile(fileName): 6 | if platform == "win32": # for Windows 7 | targetFile = open(fileName, "r", encoding="utf8") 8 | else: # for Others 9 | targetFile = open(fileName, "r") 10 | 11 | lines = targetFile.readlines() 12 | targetFile.close() 13 | 14 | targets = [] 15 | n = len(lines) 16 | print("n = " + str(n)) 17 | i = 0 18 | while i < n: 19 | newTarget = TikiTarget(lines[i].strip(), lines[i+1].strip()) 20 | # print(newTarget.info()) 21 | targets.append(newTarget) 22 | i = i+2 23 | 24 | return targets 25 | 26 | # 1.499.000đ => 1499000 27 | def convertToPrice(strPrice): 28 | strPrice = strPrice.replace('.', '') 29 | strPrice = strPrice.replace('₫', '') 30 | return(int(strPrice)) 31 | # -53% => 53 32 | def convertToDiscount(strDiscount): 33 | strDiscount = strDiscount.replace('-', '') 34 | strDiscount = strDiscount.replace('%', '') 35 | return (int(strDiscount)) -------------------------------------------------------------------------------- /FunPy02_SanDealTiki/TikiHunterThread.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from threading import Thread 3 | from TikiTarget import TikiTarget 4 | from TikiItem import TikiItem 5 | from TikiHelper import * 6 | from bs4 import BeautifulSoup 7 | import requests 8 | import time 9 | 10 | 11 | class TikiHunterThread(Thread): 12 | MAX_PAGE = 1 13 | 14 | def __init__(self, target): 15 | Thread.__init__(self) 16 | self.target = target 17 | self.bestItem = None 18 | self.name = target.getKeyword() 19 | 20 | def __findBestItem(self): 21 | # for to MAX_PAGE 22 | headers = { 23 | 'User-Agent': 'Go to | https://www.whatismybrowser.com/detect/what-is-my-user-agent |, Get your User-Agent and paste here'} 24 | searchLink = self.target.getSearchLink(1) 25 | response = requests.get(searchLink, headers=headers) 26 | # response = requests.get(searchLink) 27 | 28 | if response.status_code != 200: 29 | return 30 | 31 | 32 | bsoup = BeautifulSoup(response.text, "lxml") 33 | # class = search-a-product-item 34 | listElement = bsoup.findAll("a", {"class": "product-item"}) 35 | 36 | i = 0 37 | for e in listElement: 38 | # print(str(i) + " : ") 39 | 40 | if(e.get_text().find("Đã hết hàng") >= 0 or e.get_text().find("Ngừng kinh doanh") >= 0): 41 | # print("=========== Đã hết hàng ======") 42 | continue 43 | 44 | newItem = TikiItem() 45 | 46 | newItem.title = (e.find("div", {"class": "name"}).text) 47 | newItem.url = "https://tiki.vn" + e.get("href") 48 | span = e.find("div", {"class": "price-discount__price"}) 49 | newItem.price = convertToPrice(span.text) 50 | 51 | 52 | span = e.find("div", {"class":"price-discount__discount"}) 53 | if(span != None): 54 | newItem.discount = convertToDiscount(span.text) 55 | 56 | if(newItem.isValidItem(self.target.patterns)): 57 | # print(newItem.info()) 58 | if(self.bestItem == None): 59 | self.bestItem = newItem 60 | else: 61 | if(newItem.price < self.bestItem.price): 62 | self.bestItem = newItem 63 | i = i + 1 64 | 65 | # print("Best Item: " + self.name) 66 | # if(self.bestItem != None): 67 | # print(self.bestItem.info()) 68 | # print("--------------") 69 | 70 | 71 | def run(self): 72 | print("Start Thread: " + self.name) 73 | while True: 74 | try: 75 | self.__findBestItem() 76 | except: 77 | print("Something Wrong!!!!") 78 | time.sleep(2) 79 | print("End Thread: " + self.name) 80 | -------------------------------------------------------------------------------- /FunPy02_SanDealTiki/TikiItem.py: -------------------------------------------------------------------------------- 1 | 2 | class TikiItem: 3 | def __init__(self): 4 | self.title = "" 5 | self.price = 0 6 | self.discount = 0 7 | self.url = "" 8 | 9 | def info(self): 10 | return self.title +" | " + str(self.price) + " | " + self.url 11 | 12 | def isValidItem(self, patterns): 13 | for p in patterns: 14 | if self.title.lower().find(p.lower()) < 0: 15 | return False 16 | return True -------------------------------------------------------------------------------- /FunPy02_SanDealTiki/TikiMain.py: -------------------------------------------------------------------------------- 1 | from TikiTarget import TikiTarget 2 | from TikiItem import TikiItem 3 | from TikiHunterThread import TikiHunterThread 4 | from TikiDisplayThread import TikiDisplayThread 5 | from TikiHelper import * 6 | from bs4 import BeautifulSoup 7 | import requests 8 | import time 9 | 10 | TARGET_FILE = "target_list.txt" 11 | 12 | targets = getTargetsFromFile(TARGET_FILE) 13 | threads = [] 14 | displayThread = TikiDisplayThread() 15 | 16 | for t in targets: 17 | hunter = TikiHunterThread(t) 18 | hunter.start() 19 | threads.append(hunter) 20 | displayThread.addHunter(hunter) 21 | 22 | displayThread.start() 23 | 24 | for t in threads: 25 | t.join() 26 | 27 | print ("===== END Main ====") -------------------------------------------------------------------------------- /FunPy02_SanDealTiki/TikiTarget.py: -------------------------------------------------------------------------------- 1 | 2 | class TikiTarget: 3 | def __init__(self, patternStr="", categoryStr = ""): 4 | self.patternsString = patternStr 5 | self.patterns = self.__splitPattern() 6 | self.categoryUrl = categoryStr 7 | 8 | def info(sefl): 9 | return "Patterns: " + str(sefl.patterns) + " | category: " + sefl.categoryUrl 10 | 11 | def __splitPattern(sefl): 12 | newList = sefl.patternsString.split(",") 13 | i = 0 14 | while i < len(newList): 15 | newList[i] = newList[i].strip() 16 | i = i+1 17 | return newList 18 | 19 | # Máy ảnh, lấy liền, Fujifilm => Máy ảnh lấy liền Fujifilm 20 | def getKeyword(sefl): 21 | keyword = "" 22 | for key in sefl.patterns: 23 | keyword = keyword + " " + key 24 | return keyword 25 | 26 | def getSearchLink(sefl, pageNum): 27 | return sefl.categoryUrl +"?q="+ sefl.getKeyword() + "&ref=categorySearch&page=" + str(pageNum) -------------------------------------------------------------------------------- /FunPy02_SanDealTiki/_ClassDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thebrownbox/HaveFunWithPython/ae9b7bf833ee4742e06c786ab8ff36fdd28b528f/FunPy02_SanDealTiki/_ClassDiagram.png -------------------------------------------------------------------------------- /FunPy02_SanDealTiki/_System.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thebrownbox/HaveFunWithPython/ae9b7bf833ee4742e06c786ab8ff36fdd28b528f/FunPy02_SanDealTiki/_System.jpg -------------------------------------------------------------------------------- /FunPy02_SanDealTiki/target_list.txt: -------------------------------------------------------------------------------- 1 | Máy ảnh, lấy liền, Fujifilm 2 | https://tiki.vn/may-anh-lay-lien/c2144 3 | Nồi Chiên Không Dầu, Philips 4 | https://tiki.vn/noi-chien/c8123 -------------------------------------------------------------------------------- /FunPy02_SanDealTiki/temp.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 34 | 38 | 39 | GIAO NGAY 2H - 3H 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini... 50 | 51 | 52 | 53 | 1.499.000đ 54 | -25% 55 | 56 | 57 | 58 | 59 | 1.990.000đ 60 | -25% 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | (37 nhận xét) 86 | 87 | 88 | 89 | 90 | 91 | 92 | Quà tặng kèm 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /FunPy02_SanDealTiki/test.txt: -------------------------------------------------------------------------------- 1 | n = 4 2 | Start Thread: Máy ảnh lấy liền Fujifilm 3 | Start Thread: Nồi Chiên Không Dầu Philips 4 | 0 : 5 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini 9 - Smoky White - Hàng Chính Hãng | 1499000 | https://tiki.vn/may-anh-selfie-lay-lien-fujifilm-instax-mini-9-smoky-white-hang-chinh-hang-p683684.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 6 | 1 : 7 | Máy ảnh lấy liền Fujifilm Instax Mini LiPlay - Hàng chính hãng | 3390000 | https://tiki.vn/may-anh-lay-lien-fujifilm-instax-mini-liplay-hang-chinh-hang-p26432268.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 8 | 2 : 9 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini 9 - Lime Green - Hàng Chính Hãng | 1499000 | https://tiki.vn/may-anh-selfie-lay-lien-fujifilm-instax-mini-9-lime-green-hang-chinh-hang-p683688.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 10 | 3 : 11 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini 9 - Flamingo Pink - Hàng Chính Hãng | 1499000 | https://tiki.vn/may-anh-selfie-lay-lien-fujifilm-instax-mini-9-flamingo-pink-hang-chinh-hang-p683686.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 12 | 4 : 13 | Máy Ảnh Lấy Liền Fujifilm Instax Mini 11-Hàng Chính Hãng | 1790000 | https://tiki.vn/may-anh-lay-lien-fujifilm-instax-mini-11-hang-chinh-hang-p55930758.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 14 | 5 : 15 | 6 : 16 | Máy Ảnh Lấy Liền Fujifilm Instax Square SQ20 - Hàng Chính Hãng | 4290000 | https://tiki.vn/may-anh-lay-lien-fujifilm-instax-square-sq20-hang-chinh-hang-p14497415.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 17 | 7 : 18 | 8 : 19 | 9 : 20 | Máy Ảnh Lấy Liền Fujifilm Instax SQ6 - Hàng Chính Hãng | 2990000 | https://tiki.vn/may-anh-lay-lien-fujifilm-instax-sq6-hang-chinh-hang-p2383179.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 21 | 10 : 22 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini 9 - Cobalt Blue - Hàng Chính Hãng | 1399000 | https://tiki.vn/may-anh-selfie-lay-lien-fujifilm-instax-mini-9-cobalt-blue-hang-chinh-hang-p683666.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 23 | 11 : 24 | 12 : 25 | 13 : 26 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini 9 Clear Purple - Hàng Chính Hãng | 1499000 | https://tiki.vn/may-anh-selfie-lay-lien-fujifilm-instax-mini-9-clear-purple-hang-chinh-hang-p27777121.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 27 | 14 : 28 | 15 : 29 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini 70 - Đen - Hàng Chính Hãng | 2690000 | https://tiki.vn/may-anh-selfie-lay-lien-fujifilm-instax-mini-70-den-hang-chinh-hang-p627687.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 30 | 16 : 31 | 17 : 32 | 18 : 33 | Máy Ảnh Lấy Liền Fujifilm Instax SQ6 Taylor Swift (Special Edition) - Hàng chính hãng | 4290000 | https://tiki.vn/may-anh-lay-lien-fujifilm-instax-sq6-taylor-swift-special-edition-hang-chinh-hang-p4595147.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 34 | 19 : 35 | 20 : 36 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini 70 - Xanh - Hàng Chính Hãng | 2690000 | https://tiki.vn/may-anh-selfie-lay-lien-fujifilm-instax-mini-70-xanh-hang-chinh-hang-p454832.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 37 | 21 : 38 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini 70 - Vàng - Hàng Chính Hãng | 2690000 | https://tiki.vn/may-anh-selfie-lay-lien-fujifilm-instax-mini-70-vang-hang-chinh-hang-p454834.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 39 | 22 : 40 | 23 : 41 | 24 : 42 | 25 : 43 | 26 : 44 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini 70 - Vàng Đồng - Hàng Chính Hãng | 2690000 | https://tiki.vn/may-anh-selfie-lay-lien-fujifilm-instax-mini-70-vang-dong-hang-chinh-hang-p627682.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 45 | 27 : 46 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini 70 - Trắng - Hàng Chính Hãng | 2690000 | https://tiki.vn/may-anh-selfie-lay-lien-fujifilm-instax-mini-70-trang-hang-chinh-hang-p454836.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 47 | 28 : 48 | 29 : 49 | 30 : 50 | 31 : 51 | 32 : 52 | 33 : 53 | 34 : 54 | 35 : 55 | 36 : 56 | 37 : 57 | 38 : 58 | =========== Đã hết hàng ====== 59 | 38 : 60 | =========== Đã hết hàng ====== 61 | 38 : 62 | =========== Đã hết hàng ====== 63 | 38 : 64 | 39 : 65 | 40 : 66 | =========== Đã hết hàng ====== 67 | Best Item: 68 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini 9 - Cobalt Blue - Hàng Chính Hãng | 1399000 | https://tiki.vn/may-anh-selfie-lay-lien-fujifilm-instax-mini-9-cobalt-blue-hang-chinh-hang-p683666.html?src=search&2hi=0&keyword=M%C3%A1y+%E1%BA%A3nh+l%E1%BA%A5y+li%E1%BB%81n+Fujifilm 69 | End Thread: Máy ảnh lấy liền Fujifilm 70 | 0 : 71 | Nồi Chiên Không Dầu Philips HD9220/20 - Hàng chính hãng | 2649000 | https://tiki.vn/noi-chien-khong-dau-philips-hd9220-20-hang-chinh-hang-p406414.html?src=search&2hi=0&keyword=N%E1%BB%93i+Chi%C3%AAn+Kh%C3%B4ng+D%E1%BA%A7u+Philips 72 | 1 : 73 | 2 : 74 | Nồi Chiên Không Dầu Philips HD9745 (1500W) - Hàng Chính Hãng | 4899000 | https://tiki.vn/noi-chien-khong-dau-philips-hd9745-1500w-hang-chinh-hang-p51200047.html?src=search&2hi=0&keyword=N%E1%BB%93i+Chi%C3%AAn+Kh%C3%B4ng+D%E1%BA%A7u+Philips 75 | 3 : 76 | Nồi Chiên Không Dầu Điện Tử Philips HD9650/91 XXL (1.4kg) - Hàng Chính Hãng | 6399000 | https://tiki.vn/noi-chien-khong-dau-dien-tu-philips-hd9650-91-xxl-1-4kg-hang-chinh-hang-p13516156.html?src=search&2hi=0&keyword=N%E1%BB%93i+Chi%C3%AAn+Kh%C3%B4ng+D%E1%BA%A7u+Philips 77 | 4 : 78 | 5 : 79 | Nồi Chiên Không Dầu Philips HD9220/20 - Hàng nhập khẩu | 2699000 | https://tiki.vn/noi-chien-khong-dau-philips-hd9220-20-hang-nhap-khau-p21388715.html?src=search&2hi=0&keyword=N%E1%BB%93i+Chi%C3%AAn+Kh%C3%B4ng+D%E1%BA%A7u+Philips 80 | 6 : 81 | Nồi chiên không dầu Philips HD9654 - Hàng nhập khẩu | 6098000 | https://tiki.vn/noi-chien-khong-dau-philips-hd9654-hang-nhap-khau-p38243191.html?src=search&2hi=0&keyword=N%E1%BB%93i+Chi%C3%AAn+Kh%C3%B4ng+D%E1%BA%A7u+Philips 82 | 7 : 83 | 8 : 84 | 9 : 85 | 10 : 86 | 11 : 87 | 12 : 88 | Nồi Chiên Không Dầu Philips HD9218 (1425W) - Hàng Chính Hãng | 4190000 | https://tiki.vn/noi-chien-khong-dau-philips-hd9218-1425w-hang-chinh-hang-p51200049.html?src=search&2hi=0&keyword=N%E1%BB%93i+Chi%C3%AAn+Kh%C3%B4ng+D%E1%BA%A7u+Philips 89 | 13 : 90 | 14 : 91 | 15 : 92 | 16 : 93 | 17 : 94 | 18 : 95 | 19 : 96 | 20 : 97 | 21 : 98 | 22 : 99 | 23 : 100 | 24 : 101 | 25 : 102 | 26 : 103 | 27 : 104 | 28 : 105 | 29 : 106 | 30 : 107 | 31 : 108 | Nồi Chiên Không Dầu Philips HD9220/20 - Hàng Nhập Khẩu | 2699000 | https://tiki.vn/noi-chien-khong-dau-philips-hd9220-20-hang-nhap-khau-p3873839.html?src=search&2hi=0&keyword=N%E1%BB%93i+Chi%C3%AAn+Kh%C3%B4ng+D%E1%BA%A7u+Philips 109 | 32 : 110 | 33 : 111 | Nồi chiên không dầu Philips HD9654- Hàng nhập khẩu | 6299000 | https://tiki.vn/noi-chien-khong-dau-philips-hd9654-hang-nhap-khau-p20419553.html?src=search&2hi=0&keyword=N%E1%BB%93i+Chi%C3%AAn+Kh%C3%B4ng+D%E1%BA%A7u+Philips 112 | 34 : 113 | Nồi Chiên Không Dầu Philips HD9745 (1500W). Hàng nhập khẩu | 4790000 | https://tiki.vn/noi-chien-khong-dau-philips-hd9745-1500w-hang-nhap-khau-p54590145.html?src=search&2hi=0&keyword=N%E1%BB%93i+Chi%C3%AAn+Kh%C3%B4ng+D%E1%BA%A7u+Philips 114 | 35 : 115 | 36 : 116 | 37 : 117 | 38 : 118 | Nồi chiên không dầu Philips HD9860. Hàng nhập khẩu | 9009000 | https://tiki.vn/noi-chien-khong-dau-philips-hd9860-hang-nhap-khau-p54442732.html?src=search&2hi=0&keyword=N%E1%BB%93i+Chi%C3%AAn+Kh%C3%B4ng+D%E1%BA%A7u+Philips 119 | 39 : 120 | 40 : 121 | 41 : 122 | 42 : 123 | 43 : 124 | 44 : 125 | 45 : 126 | 46 : 127 | 47 : 128 | 48 : 129 | Best Item: 130 | Nồi Chiên Không Dầu Philips HD9220/20 - Hàng chính hãng | 2649000 | https://tiki.vn/noi-chien-khong-dau-philips-hd9220-20-hang-chinh-hang-p406414.html?src=search&2hi=0&keyword=N%E1%BB%93i+Chi%C3%AAn+Kh%C3%B4ng+D%E1%BA%A7u+Philips 131 | End Thread: Nồi Chiên Không Dầu Philips 132 | Duration: 1.5549781322479248 133 | ===== END Main ==== 134 | -------------------------------------------------------------------------------- /FunPy03_WorkingWithExel/Input.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thebrownbox/HaveFunWithPython/ae9b7bf833ee4742e06c786ab8ff36fdd28b528f/FunPy03_WorkingWithExel/Input.xlsx -------------------------------------------------------------------------------- /FunPy03_WorkingWithExel/README.md: -------------------------------------------------------------------------------- 1 | # Have Fun With Python No.3: Working with Exel 2 | # In this project we will learn: 3 | - How to read an exel file and working with it's data 4 | - How to create new exel file 5 | 6 | # Install required modules 7 | * Module: Requests 8 | `pip install requests` 9 | * Module: Beautiful Soup 10 | `pip install beautifulsoup4` 11 | * Module: lxml 12 | `pip install lxml` 13 | 14 | # System Design 15 |  16 | 17 | # Project structure | Class Diagram 18 |  19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Have Fun With Python 4 | 5 | ## Create small and fun projects with Python 6 | * Series on Youtube: https://www.youtube.com/playlist?list=PLqLksqdSk4b1EXGs7zxIIUjAT0Qi-mRMQ 7 | * If you like this repo, please "star" it! <3 Nếu bạn thích repo này hãy cho nó 1 star <3 8 | 9 | **[01]** Cày view Youtube | Get more view for your Youtube video 10 | > (https://github.com/thebrownbox/HaveFunWithPython/tree/master/FunPy_CayViewYoutube) 11 | 12 | **[02]** Sắn Deal với Tiki | Get the best price from Shopping site tiki.vn 13 | > (https://github.com/thebrownbox/HaveFunWithPython/tree/master/FunPy02_SanDealTiki) 14 | 15 | **[03]** Title_Here 16 | > (link_here) 17 | 18 | **[04]** Title_Here 19 | > (link_here) 20 | 21 | My website: www.hoangvancong.com 22 | My Youtube: https://www.youtube.com/c/TheBrownBox 23 | Buy me a coffee: http://www.hoangvancong.com/buy-me-a-coffee/ 24 | -------------------------------------------------------------------------------- /Temp/Note.txt: -------------------------------------------------------------------------------- 1 | https://doc.qt.io/qtforpython/quickstart.html 2 | https://doc.qt.io/qtforpython/tutorials/qmlapp/qmlapplication.html 3 | 4 | conda create --name py_env 5 | conda activate py_env 6 | pip install pyside6 7 | 8 | C:\Users\Admin\anaconda3 9 | C:\Users\Admin\anaconda3\Scripts 10 | C:\Users\Admin\anaconda3\Library\bin -------------------------------------------------------------------------------- /Temp/main.py: -------------------------------------------------------------------------------- 1 | # import sys 2 | 3 | # from PySide6.QtGui import QGuiApplication 4 | # from PySide6.QtQml import QQmlApplicationEngine 5 | 6 | 7 | # app = QGuiApplication(sys.argv) 8 | 9 | # engine = QQmlApplicationEngine() 10 | # engine.quit.connect(app.quit) 11 | # engine.load('main.qml') 12 | 13 | # sys.exit(app.exec_()) 14 | import sys 15 | 16 | from PyQt6.QtGui import QGuiApplication 17 | from PyQt6.QtQml import QQmlApplicationEngine 18 | 19 | 20 | app = QGuiApplication(sys.argv) 21 | 22 | engine = QQmlApplicationEngine() 23 | engine.quit.connect(app.quit) 24 | engine.load('main.qml') 25 | 26 | sys.exit(app.exec()) -------------------------------------------------------------------------------- /Temp/main.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.15 2 | import QtQuick.Controls 2.15 3 | 4 | ApplicationWindow { 5 | visible: true 6 | width: 600 7 | height: 500 8 | title: "HelloApp" 9 | 10 | Text { 11 | anchors.centerIn: parent 12 | text: "Hello World" 13 | font.pixelSize: 24 14 | } 15 | 16 | } --------------------------------------------------------------------------------
27 | 28 |
GIAO NGAY 2H - 3H
47 | 48 | 49 | Máy Ảnh Selfie Lấy Liền Fujifilm Instax Mini...
53 | 1.499.000đ 54 | -25% 55 | 56 | 57 | 58 | 59 | 1.990.000đ 60 | -25% 61 |
70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 |
(37 nhận xét)