Skip to content

Commit c73e949

Browse files
committed
Fix merge conflicts
2 parents b6e6a3d + 6c80e2e commit c73e949

File tree

123 files changed

+301352
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+301352
-23
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: 2
66
jobs:
77
build:
88
docker:
9-
- image: circleci/python:3.6
9+
- image: circleci/python:3.8
1010

1111
working_directory: ~/repo
1212

@@ -21,7 +21,7 @@ jobs:
2121
- v1-dependencies-
2222

2323
- run:
24-
name: install dependencies
24+
name: Install dependencies
2525
command: |
2626
python3 -m venv venv
2727
. venv/bin/activate

.dependabot/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: 1
2+
update_configs:
3+
- package_manager: "python"
4+
directory: "/requirements.txt"
5+
update_schedule: "monthly"

arcade-a-primer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Source files supporting the **Arcade - A Modern Python Game Framework** article
1+
Source files supporting the [Arcade: A Primer on the Python Game Framework](https://realpython.com/arcade-python-game-framework/) article on [Real Python](https://realpython.com/).

arcade-a-primer/arcade_game.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class SpaceShooter(arcade.Window):
4040
Collisions end the game
4141
"""
4242

43-
def __init__(self, width, height, title):
43+
def __init__(self, width: int, height: int, title: str):
4444
"""Initialize the game
4545
"""
4646
super().__init__(width, height, title)
@@ -131,7 +131,7 @@ def add_cloud(self, delta_time: float):
131131
self.clouds_list.append(cloud)
132132
self.all_sprites.append(cloud)
133133

134-
def on_key_press(self, symbol, modifiers):
134+
def on_key_press(self, symbol: int, modifiers: int):
135135
"""Handle user keyboard input
136136
Q: Quit the game
137137
P: Pause the game

build-a-web-scraper/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
venv
2+
.ipynb*

build-a-web-scraper/01_inspect.ipynb

Lines changed: 1779 additions & 0 deletions
Large diffs are not rendered by default.

build-a-web-scraper/02_scrape.ipynb

Lines changed: 223 additions & 0 deletions
Large diffs are not rendered by default.

build-a-web-scraper/03_parse.ipynb

Lines changed: 2321 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# Your Turn: Build A Pipeline\n",
8+
"\n",
9+
"- Combine Your Knowledge of the Website, `requests` and `bs4`\n",
10+
"- Automate Your Scraping Process Across Multiple Pages\n",
11+
"- Generalize Your Code For Varying Searches\n",
12+
"- Target & Save Specific Information You Want"
13+
]
14+
},
15+
{
16+
"cell_type": "markdown",
17+
"metadata": {},
18+
"source": [
19+
"## Your Tasks:\n",
20+
"\n",
21+
"- Scrape the first 100 available search results\n",
22+
"- Generalize your code to allow searching for different locations/jobs\n",
23+
"- Pick out information about the URL, job title, and job location\n",
24+
"- Save the results to a file"
25+
]
26+
},
27+
{
28+
"cell_type": "code",
29+
"execution_count": 1,
30+
"metadata": {},
31+
"outputs": [],
32+
"source": [
33+
"import requests\n",
34+
"from bs4 import BeautifulSoup"
35+
]
36+
},
37+
{
38+
"cell_type": "markdown",
39+
"metadata": {},
40+
"source": [
41+
"### Part 1: Inspect\n",
42+
"\n",
43+
"- How do the URLs change when you navigate to the next results page?\n",
44+
"- How do the URLs change when you use a different location and/or job title search?\n",
45+
"- Which HTML elements contain the link, title, and location of each job?"
46+
]
47+
},
48+
{
49+
"cell_type": "code",
50+
"execution_count": null,
51+
"metadata": {},
52+
"outputs": [],
53+
"source": []
54+
},
55+
{
56+
"cell_type": "markdown",
57+
"metadata": {},
58+
"source": [
59+
"### Part 2: Scrape\n",
60+
"\n",
61+
"- Build the code to fetch the first 100 search results. This means you will need to automatically navigate to multiple results pages\n",
62+
"- Write functions that allow you to specify the job title, location, and amount of results as arguments"
63+
]
64+
},
65+
{
66+
"cell_type": "code",
67+
"execution_count": null,
68+
"metadata": {},
69+
"outputs": [],
70+
"source": []
71+
},
72+
{
73+
"cell_type": "markdown",
74+
"metadata": {},
75+
"source": [
76+
"### Part 3: Parse\n",
77+
"\n",
78+
"- Sieve through your HTML soup to pick out only the job title, link, and location\n",
79+
"- Format the results in a readable format (e.g. JSON)\n",
80+
"- Save the results to a file"
81+
]
82+
},
83+
{
84+
"cell_type": "code",
85+
"execution_count": null,
86+
"metadata": {},
87+
"outputs": [],
88+
"source": []
89+
}
90+
],
91+
"metadata": {
92+
"kernelspec": {
93+
"display_name": "Python 3",
94+
"language": "python",
95+
"name": "python3"
96+
},
97+
"language_info": {
98+
"codemirror_mode": {
99+
"name": "ipython",
100+
"version": 3
101+
},
102+
"file_extension": ".py",
103+
"mimetype": "text/x-python",
104+
"name": "python",
105+
"nbconvert_exporter": "python",
106+
"pygments_lexer": "ipython3",
107+
"version": "3.8.0"
108+
}
109+
},
110+
"nbformat": 4,
111+
"nbformat_minor": 4
112+
}

0 commit comments

Comments
 (0)