- Machine Learning for Cybersecurity Cookbook
- Emmanuel Tsukerman
- 207字
- 2021-06-24 12:29:06
How it works...
We start by importing the PyGitHub library in Step 1 in order to be able to conveniently call the GitHub APIs. These will allow us to scrape and explore the universe of repositories. We also import the base64 module for decoding the base64 encoded files that we will be downloading from GitHub. Note that there is a rate limit on the number of API calls a generic user can make to GitHub. For this reason, you will find that if you attempt to download too many files in a short duration, your script will not get all of the files. Our next step is to supply our credentials to GitHub (step 2), and specify that we are looking for repositories with JavaScript, using the query='language:javascript' command. We enumerate such repositories matching our criteria of being associated with JavaScript, and if they do, we search through these for files ending with .js and create local copies (steps 3 to 6). Since these files are encoded in base64, we make sure to decode them to plaintext in step 7. Finally, we show you how to adjust the script in order to scrape other file types, such as Python and PowerShell (Step 8).
- 大學計算機信息技術導論
- Java編程全能詞典
- PowerShell 3.0 Advanced Administration Handbook
- 流處理器研究與設計
- 機器自動化控制器原理與應用
- SharePoint 2010開發最佳實踐
- OpenStack Cloud Computing Cookbook(Second Edition)
- Arduino &樂高創意機器人制作教程
- 基于32位ColdFire構建嵌入式系統
- Windows Server 2003系統安全管理
- 中國戰略性新興產業研究與發展·智能制造裝備
- R Data Analysis Projects
- PowerMill 2020五軸數控加工編程應用實例
- 智能制造系統及關鍵使能技術
- 從零開始學ASP.NET