- Mastering Machine Learning on AWS
- Dr. Saket S.R. Mengle Maximo Gurmendez
- 125字
- 2021-06-24 14:23:15
Collecting the tweets
We will start by using the Twython library to access the Twitter API and collect a series of tweets, labeling them with the originating political party.
The details of the implementation can be found in our GitHub repository in the following Jupyter Notebook:
chapter2/collect_tweets.ipynb
We need to invoke the following method in the Twython library to save tweets from @GOP and @TheDemocrats into two text files, gop.txt and dems.txt:
twitter.get_user_timeline(screen_name='GOP', tweet_mode='extended', count=500)
Each file contains 200 tweets. The following are some excerpts from the dems.txt file:
- This cannot be who we are as a country. We need to find out what happened and ensure it never happens again.
- RT @AFLCIO: Scott Walker. Forever a national disgrace.
推薦閱讀
- Aftershot Pro:Non-destructive photo editing and management
- 深入淺出SSD:固態存儲核心技術、原理與實戰(第2版)
- AMD FPGA設計優化寶典:面向Vivado/SystemVerilog
- Learning Game Physics with Bullet Physics and OpenGL
- 電腦軟硬件維修從入門到精通
- 筆記本電腦維修不是事兒(第2版)
- 分布式微服務架構:原理與實戰
- 筆記本電腦使用、維護與故障排除從入門到精通(第5版)
- 單片機開發與典型工程項目實例詳解
- Intel FPGA權威設計指南:基于Quartus Prime Pro 19集成開發環境
- Blender for Video Production Quick Start Guide
- The Applied Artificial Intelligence Workshop
- Zabbix 4 Network Monitoring
- 計算機組裝與維護教程
- Exceptional C++:47個C++工程難題、編程問題和解決方案(中文版)