# 2021 PTHS Google Colab tools ## 《hackmd》=> 先連到這個頁面喔 reurl.cc/raAe0E --- ## 《Colab 連結》 ### 04/09 Tenser Flow example https://reurl.cc/4ynA0R first order model https://colab.research.google.com/drive/1sfF4tL8yXmTmUcvvGznLpuSHlvvRP4U5?usp=sharing GPT2 Chinese https://colab.research.google.com/drive/1fQvjgCuyX-9ZrserR53ukc5tHvTvS08u?usp=sharing ### 04/16 <!-- fun section --> OpenPose https://colab.research.google.com/drive/1DkoWfgYnDsXQ3c-MGj7ZR1fUm69bJWRq?usp=sharing <!-- 崇瑞第二天第一個 --> QA 回答 https://colab.research.google.com/drive/1Bgd3L-839NVZiP3QqWfpkYIufQIm4Rar?usp=sharing SiamMask https://colab.research.google.com/drive/1GmZF1XzlgTxuNPMnZXaREpoCPFQtxG3B?usp=sharing ### 04/23 openai/jukebox(GPU, 16GB+ VRAM NEEDED) https://colab.research.google.com/drive/1DtGqeAGLTp5FxcYxMGPnrcha51qGXAX6?usp=sharing 句子分類 https://colab.research.google.com/drive/1grpTVPHkCxKSqmR1bIx32D89CZ7e__6b?authuser=2#scrollTo=ZCtTclt7VpMv 網頁爬蟲 https://colab.research.google.com/drive/1vZOV1GBnGw72V_9dahX2XrDwo_WSXnCT?usp=sharing 程式碼 https://drive.google.com/file/d/19va3EbQA7O65RbzcDJRGJQCAgRDdS5SY/view?usp=sharing ```from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor class UdnSpider(CrawlSpider): name = 'udn' custom_settings={ 'DOWNLOAD_DELAY':'3', 'FEED_EXPORT_ENCODING':'utf-8', } allowed_domains = ['udn.com'] start_urls = ['https://udn.com/news/index'] allow_list = ['news/story/\d+/\d+'] rules = [Rule(LinkExtractor(allow = allow_list), callback = 'parse_item', follow = True)] def parse_item(self, response): title = response.css('h1.article-content_title::text').get() ps = response.css('section.article-content__editor p::text').getall() content = ''.join(ps) url = response.url datetime = response.css('time.article-content__time::text').get() author = response.css('span.article-content__author a::text').get() yield{ 'title':title, 'content':content, 'url':url, 'datetime':datetime, 'author':author } ``` <!-- 崇瑞第二個 --> <!-- https://reurl.cc/V3lrdN --> <!-- YOLO v3 https://colab.research.google.com/drive/1L_kAub93jxAJJCMOQjTDyiHhj1s17yfa?usp=sharing --> <!-- YOLOv3 and DeepSORT https://colab.research.google.com/drive/1JxIlUQbBrSjKdlfGpDo2gxeIbYKDhu48?usp=sharing --> <!-- Pipeline https://colab.research.google.com/drive/1QP4sRArN5GEwdTAVOn9fNGbXByZGeoP5?usp=sharing --> <!-- TensorFlow 1 https://colab.research.google.com/drive/1gC0Im0UX2xdseAqZkcgohF41xeY2ZtJb?usp=sharing TensorFlow 2 https://colab.research.google.com/drive/1D-iNDU7WnxOfmtqHHspUZtBt9DNBfGZL?usp=sharing TensorFlow 3 https://colab.research.google.com/drive/1E5-1KbX-A2Ze7891Gv4-SmP9nLh-Ncww?usp=sharing TensorFlow 4 https://colab.research.google.com/drive/1iay8uaVk6i6Q2yXRYbQFThDH25RHXSh-?usp=sharing --> ## 《程式碼範本》 ``` # 20210416 檔名:helloworld.ipynb print("hello world") myWord = "greeting" print(myWord) answer = 1 + 2 print(answer) answer += 1 print(answer) classmate = 9 pizza = 0 for range in {classmate}: pizza = pizza + 1 print(pizza) fullPeople = 0 while fullPeople < classmate: pizza -= 1 fullPeople += 1 print(fullPeople," of all classmates are full.") ``` --- ## 補充資料 ### 04/09 ReLU sigmoid 激勵函數 ![](https://i.imgur.com/6nH2I7l.png) <!-- openpose https://github.com/CMU-Perceptual-Computing-Lab/openpose/tree/master/examples/tutorial_api_python --> ### 04/16 #### AI 生成音樂 實作範例 https://youtu.be/iJgNpm8cTE8 原始專案 https://github.com/openai/jukebox/ 套件 https://openai.com/blog/jukebox/ <!-- 參考資料 https://github.com/tugstugi/dl-colab-notebooks --> ### 04/23 lyre bird https://www.descript.com/overdub?lyrebird=true iis ckip lab demo https://ckip.iis.sinica.edu.tw/demo iis ckip lab github https://github.com/ckiplab --- <!-- ## 《程式碼範本》 ``` # 20210409 檔名:ooxx.py print("hello world") ``` --> ###### tags: `tku`, `ML`, `NLP`