You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 96823cb
Browse filesBrowse the repository at this point in the historyBrowse files
Fix path search for key files in public_key_cryptography notebook
- Implement proper upward directory search for key files
- Check current, parent, and grandparent directories
- Add helpful debug output showing search path
- Works in both local dev and CI environments
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
_The examples for this lecture are implemented in R. For the Python implementation, please refer to the [serverless](/serverless/) folder of the repository._
5
-
6
3
## Introduction
7
4
Data on the web is growing exponentially, with platforms like Google serving as the first source for knowledge. Despite the vast availability of data, much of it is unstructured (in HTML format) and not readily downloadable. This requires expertise to access and utilize effectively for building useful models.
8
5
@@ -23,28 +20,12 @@ There are several popular methods for scraping data from the web:
Using the **`requests`** and **`BeautifulSoup`** libraries in Python, we can scrape data from websites.
43
25
**Package Installation**
44
26
Make sure to install the necessary packages:
45
-
```r
46
-
install.packages("rvest")
47
-
install.packages("httr")
27
+
```bash
28
+
pip install requests beautifulsoup4
48
29
```
49
30
**Selector Gadget**
50
31
@@ -56,89 +37,50 @@ Use Selector Gadget, an open-source tool, to easily select elements on a webpage
56
37
57
38
Good bots comply to the rules set by websites in their robots.txt file and follow best practices while crawling and scraping.
58
39
59
-
IMDB Robots.txt: https://www.imdb.com/robots.txt
60
-
61
-
In order to scrape various fields, we’ll use the selector Google Chrome extension gadget that you've downloaded already to get the specific CSS selectors that encloses the rankings. You can click on the extension in your browser and select the rankings field with the cursor.
62
-
63
-
Make sure that all the rankings are selected. You can select some more ranking sections in case you are not able to get all of them and you can also de-select them by clicking on the selected section to make sure that you only have those sections highlighted that you want to scrape for that go.
Again, I have the corresponding CSS selector for the titles – .lister-item-header a. I will use this selector to scrape all the titles using the following code.
old_polly=r'''### Installation\nTo install the Amazon Polly package in R:\n```r\ninstall\.packages\("aws\.polly".*?```r\nlibrary\("aws\.polly"\).*?play\(vec\) # Play the synthesized speech\n```'''
62
+
63
+
new_polly='''### Installation
64
+
To install the Amazon Polly SDK for Python (boto3):
65
+
```bash
66
+
pip install boto3
67
+
```
68
+
69
+
### Setting Up Credentials
70
+
You can set AWS credentials using environment variables or AWS CLI configuration:
0 commit comments