Skip to content

Commit

Permalink
Merge branch 'master' into python-set-comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
lpozo authored Nov 8, 2024
2 parents eb1b800 + 214480e commit 0ae7a54
Show file tree
Hide file tree
Showing 43 changed files with 945 additions and 204 deletions.
9 changes: 0 additions & 9 deletions concurrency-overview/README.md

This file was deleted.

21 changes: 0 additions & 21 deletions concurrency-overview/cpu_mp.py

This file was deleted.

20 changes: 0 additions & 20 deletions concurrency-overview/cpu_non_concurrent.py

This file was deleted.

21 changes: 0 additions & 21 deletions concurrency-overview/cpu_threading.py

This file was deleted.

35 changes: 0 additions & 35 deletions concurrency-overview/io_mp.py

This file was deleted.

17 changes: 0 additions & 17 deletions concurrency-overview/race_condition.py

This file was deleted.

35 changes: 0 additions & 35 deletions concurrency-overview/requirements.txt

This file was deleted.

3 changes: 3 additions & 0 deletions interacting-with-python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Interacting With Python

This folder contains the code examples for the [Interacting With Python](https://realpython.com/interacting-with-python/) tutorial.
3 changes: 3 additions & 0 deletions interacting-with-python/hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
greeting = "Hello, World!"
print(greeting)
print("Printing from a file.")
3 changes: 3 additions & 0 deletions numpy-examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
These files are used in the tutorial [NumPy Practical Examples: Useful Techniques](https://realpython.com/numpy-example-useful-practical-techniques/).

The various csv files contain data that is uses to create and populate various NumPy arrays in both the main tutorial and in the various embedded exercises. The tutorial_code.ipynb is a Jupyter Notebook containing the code used in the tutorials.
8 changes: 8 additions & 0 deletions numpy-examples/cashed_checks.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Check_ID,Amount,Date_Cashed
1341,150.00,2024-04-12
1342,175.00,2024-04-16
1343,30.00,2024-04-12
1345,65.00,2024-04-12
1346,430.00,2024-04-08
1349,500.00,2024-04-08
1350,220.00,2024-04-15
12 changes: 12 additions & 0 deletions numpy-examples/check_list_duplicates.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Check_ID,Payee,Amount,Date_Issued
1341,K.Starmer,150.00,2024-03-29
1342,R Sunak,175.00,2024-03-29
1343,L Truss,30.00,2024-03-29
1344,B Johnson,45.00,2024-03-22
1344,B Johnson,45.00,2024-03-22
1345,T May,65.00,2024-03-22
1346,D Cameron,430.00,2024-03-22
1347,G Brown,100.00,2024-03-15
1348,T Blair,250.00,2024-03-15
1349,J Major,500.00,2024-03-15
1350,M Thatcher,220.00,2024-03-15
4 changes: 4 additions & 0 deletions numpy-examples/ex1a.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
5,10,15,20
25,30,35,40
45,50,55,60
65,70,75,80
1 change: 1 addition & 0 deletions numpy-examples/ex1b.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1,3,5
3 changes: 3 additions & 0 deletions numpy-examples/ex1c.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2
4
6
2 changes: 2 additions & 0 deletions numpy-examples/file1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1.1,1.2,1.3
1.4,1.5,1.6
2 changes: 2 additions & 0 deletions numpy-examples/file2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2.1,2.2,2.3
2.4,2.5,2.6
2 changes: 2 additions & 0 deletions numpy-examples/file3.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
3.1,3.2,3.3
3.4,3.5,3.6
11 changes: 11 additions & 0 deletions numpy-examples/issued_checks.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Check_ID,Payee,Amount,Date_Issued
1341,K.Starmer,150.00,2024-03-29
1342,R Sunak,175.00,2024-03-29
1343,L Truss,30.00,2024-03-29
1344,B Johnson,45.00,2024-03-22
1345,T May,65.00,2024-03-22
1346,D Cameron,430.00,2024-03-22
1347,G Brown,100.00,2024-03-15
1348,T Blair,250.00,2024-03-15
1349,J Major,500.00,2024-03-15
1350,M Thatcher,220.00,2024-03-15
12 changes: 12 additions & 0 deletions numpy-examples/london_temperatures.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Jan,5
Feb,7
Mar,9
Apr,11
May,14
Jun,16
Jul,19
Aug,19
Sep,17
Oct,13
Nov,10
Dec,7
3 changes: 3 additions & 0 deletions numpy-examples/long_file.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
4.1,4.2,4.3
4.4,4.5,4.6
4.7,4.8,4.9
12 changes: 12 additions & 0 deletions numpy-examples/new_york_temperatures.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Jan,2
Feb,2
Mar,4
Apr,11
May,16
Jun,22
Jul,25
Aug,24
Sep,20
Oct,14
Nov,12
Dec,9
22 changes: 22 additions & 0 deletions numpy-examples/passengers.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
passenger_no,first_name,last_name
1,Olivia,Smith
2,Amelia,Jones
3,Isla,Williams
4,Ava,Taylor
5,Ivy,Brown
6,Freya,Davies
7,Lily,Evans
8,Florence,Wilson
9,Mia,Thomas
10,Willow,Johnson
11,Noah,Roberts
12,Oliver,Robinson
13,George,Thompson
14,Arthur,Wright
14,Arthur,Wright
15,Muhammad,Walker
16,Leo,White
17,Harry,Edwards
18,Oscar,Hughes
19,Archie,Green
20,Henry,Hall
22 changes: 22 additions & 0 deletions numpy-examples/passports.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
passport_no,passenger_no,nationality
123656489,1,British
373456789,2,British
493456399,3,American
375456228,4,American
457345975,5,Austrian
345957363,6,Norewegian
567546577,7,French
453667456,8,German
456785778,9,Danish
456785778,9,Danish
679857668,10,Dutch
456657867,11,Dutch
467775488,12,French
884393487,13,Danish
122647657,15,Dutch
534677673,16,British
786737688,17,American
654672278,18,Spanish
683637288,19,Norwegian
768357788,20,British
768357788,21,American
7 changes: 7 additions & 0 deletions numpy-examples/portfolio.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Company,Sector
Company_A,technology
Company_B,finance
Company_C,healthcare
Company_D,technology
Company_E,finance
Company_F,healthcare
12 changes: 12 additions & 0 deletions numpy-examples/rome_temperatures.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Jan,8
Feb,9
Mar,12
Apr,14
May,21
Jun,23
Jul,26
Aug,24
Sep,22
Oct,18
Nov,13
Dec,10
7 changes: 7 additions & 0 deletions numpy-examples/share_prices-1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Company,mon
Company_A,100.5
Company_B,200.1
Company_C,50.3
Company_D,110.5
Company_E,200.1
Company_F,55.3
7 changes: 7 additions & 0 deletions numpy-examples/share_prices-2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Company,tue
Company_A,101.2
Company_B,199.8
Company_C,50.5
Company_D,101.2
Company_E,200.8
Company_F,50.5
7 changes: 7 additions & 0 deletions numpy-examples/share_prices-3.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Company,Wed
Company_A,102
Company_B,200.5
Company_C,51.0
Company_D,102
Company_E,200.5
Company_F,53.0
7 changes: 7 additions & 0 deletions numpy-examples/share_prices-4.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Company,Thu
Company_A,101.8
Company_B,201.0
Company_C,50.8
Company_D,111.8
Company_E,211.0
Company_F,50.8
7 changes: 7 additions & 0 deletions numpy-examples/share_prices-5.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Company,Fri
Company_A,112.5
Company_B,200.8
Company_C,51.2
Company_D,97.5
Company_E,200.8
Company_F,52.2
1 change: 1 addition & 0 deletions numpy-examples/short_file.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.1,4.2,4.3
Loading

0 comments on commit 0ae7a54

Please sign in to comment.