Skip to content

Commit a66e1bf

Browse files
committed
Cleanup 7.1 from RustWeek
1 parent c521a6b commit a66e1bf

File tree

3 files changed

+13
-145
lines changed

3 files changed

+13
-145
lines changed

book/src/rust-from-python.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Exercise 7.1.1: Test your environment
66

7-
Install uv (https://docs.astral.sh/uv/#installation) and Rust (https://www.rust-lang.org/tools/install)
7+
Install [uv](https://docs.astral.sh/uv/#installation) and [Rust](https://www.rust-lang.org/tools/install)
88

99
Check it is working:
1010
```bash
@@ -34,4 +34,4 @@ test_validation.py . [100%]
3434

3535
## Exercise 7.1.2: Translating Python to rust
3636

37-
Follow the steps in `exercises/7-rust-for-data-science/1-rust-from-python/main.py` to translate the logic to Rust in `exercises/7-rust-for-data-science/1-rust-from-python/rust-dna/lib.rs`.
37+
Open `exercises/7-rust-for-data-science/1-rust-from-python/` in your editor and follow the steps in `main.py` to translate the logic to Rust in `rust-dna/lib.rs`.

exercises/7-rust-for-data-science/1-rust-from-python/rust-dna/.gitignore renamed to exercises/7-rust-for-data-science/1-rust-from-python/.gitignore

File renamed without changes.

slides/7_1-rust-from-python.md

Lines changed: 11 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -3,91 +3,23 @@ theme: tweedegolf
33
class: text-center
44
highlighter: shiki
55
lineNumbers: true
6-
info: "Rust - 7.1: Calling Rust from Python"
6+
info: "Rust - 7.1: Rust from Python"
77
drawings:
88
persist: false
99
fonts:
1010
mono: Fira Mono
1111
layout: cover
12-
title: "Rust - 7.1: Calling Rust from Python"
12+
title: "Rust - 7.1: Rust from Python"
1313
routerMode: hash
1414
---
1515

16-
1716
# Rust programming
1817

19-
A language empowering everyone
20-
to build reliable and efficient software.
21-
22-
## Python to Rust Interop Intro
23-
24-
<img src="https://raw.githubusercontent.com/tweedegolf/slidev-theme-tweedegolf/1bc81d09e326fcecb531108a5a3bcd9e1856dd84/images/shield-large.png" class=bg-image>
25-
26-
---
27-
layout: trainer-intro
28-
---
29-
30-
# Who are we?
31-
32-
## Tamme Dittrich
33-
34-
<br/>
35-
36-
- Embedded software engineer & Rust-lang trainer
37-
- Worked on ntpd-rs, statime, and [drive-rs](https://github.com/tweedegolf/drive-rs)
38-
- Worked in applied research in machine vision systems
39-
- Taught the Embedded Rust Advanced class at EW24
40-
41-
::right::
42-
<center>
43-
<img class="face" src="https://tweedegolf.nl/images/tamme400x400.jpg" alt="Photo Tamme"/>
44-
</center>
45-
---
46-
layout: trainer-intro
47-
---
48-
49-
# Who are we?
50-
51-
## Folkert de Vries
52-
53-
<br/>
54-
55-
- Software engineer & Rust-lang trainer
56-
- Worked on NTP, PTP, P2000, zlib-rs
57-
- Contributor Roc programming language
58-
- Talk to me about compilers, linkers, functional & systems programming
18+
Module 7: Rust for Data Science
5919

60-
::right::
61-
<center>
62-
<img class="face" src="https://tweedegolf.nl/images/folkert.jpg" alt="Photo Folkert"/>
63-
</center>
64-
65-
---
66-
layout: with-footer
67-
---
68-
69-
# A quick note about Tweede golf
70-
71-
- **Leading Rust experts** Running Rust in production since 2017
72-
- **Engineers** Web, systems, embedded software development
73-
- **Open source** Impactful implementations of Network Time Protocol, sudo
74-
- **Adoption** Through both teach-rs and in-company training
75-
- **Community** Organizing RustNL and active in Rust meetups
20+
## Unit 1
7621

77-
<p></p>
78-
79-
<center>
80-
<img class="logo" src="https://tweedegolf.nl/images/client-bluebird-v2.png" alt="Bluebird">
81-
<img class="logo-smaller" src="https://tweedegolf.nl/images/kelvin-logo.png" alt="Kelvin">
82-
<img class="logo-small" src="https://tweedegolf.nl/images/client-dutch-iot.jpg" alt="DIS">
83-
<img class="logo-small" src="https://tweedegolf.nl/images/client-technolution.png" alt="Technolution">
84-
<img class="logo-smaller" style="width: 75px" src="https://tweedegolf.nl/images/gama-logo2.png" alt="GAMA">
85-
<br>
86-
<img class="logo-small" src="https://tweedegolf.nl/assets/client-ferrous-BiR_kvPj.png" alt="Ferrous">
87-
<img class="logo-small" src="https://tweedegolf.nl/images/client-isrg.jpg" alt="ISRG">
88-
<img class="logo-small" src="https://tweedegolf.nl/assets/client-nlnetlabs-CCcsDspS.png" alt="NLNet">
89-
<img class="logo-small" src="https://tweedegolf.nl/assets/client-rustfoundation-Chh3nH12.png" alt="Rust Foundation">
90-
</center>
22+
Rust from Python
9123

9224
---
9325
layout: cover
@@ -123,33 +55,6 @@ layout: with-footer
12355
layout: with-footer
12456
---
12557

126-
# Training format
127-
128-
```rust
129-
fn training() {
130-
let t = thread::spawn(|| loop {
131-
let question = Question::read_from_crowd();
132-
question.answer();
133-
});
134-
135-
136-
for part in training.parts() {
137-
part.slides();
138-
part.exercises();
139-
}
140-
141-
t.join();
142-
}
143-
```
144-
145-
<br/>
146-
147-
### Ask questions anytime!
148-
149-
---
150-
layout: with-footer
151-
---
152-
15358
# Teaching goals
15459

15560
* Call Rust from Python
@@ -217,52 +122,15 @@ Attribution: ["Group 3"](https://commons.wikimedia.org/wiki/File:K-mer_diagram.s
217122
under [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en)
218123

219124
---
220-
layout: cover
125+
layout: default
221126
---
222127

223-
# Task 1: `count_kmers`
128+
# Practice time!
224129

225-
---
226-
layout: cover
227-
---
130+
&nbsp;
228131

229-
# Task 2: Throw an exception
230-
231-
---
232-
layout: cover
233-
---
234-
235-
# Task 3: `class` to `struct`
236-
237-
---
238-
layout: cover
239-
---
240-
241-
# Task 4: `dataclass` to `struct`
242-
243-
---
244-
layout: cover
245-
---
246-
247-
# (Stretch) Task 5: Iterators
248-
249-
---
250-
layout: with-footer
251-
---
252-
253-
# Evaluation
254-
255-
A 5 minute survey
256-
257-
- Share your thoughts - help us improve!
258-
- Anonymously if desired
259-
260-
<https://training.tweede.golf/wrap-up.html>
261-
262-
---
263-
layout: with-footer
264-
---
132+
Unit 7.1.2 exercise description: [training.tweede.golf](https://training.tweede.golf/foreign-function-interface.html)
265133

266-
# Reminder
134+
*Don't forget to* `git pull`!
267135

268-
Installation instructions: <https://training.tweede.golf>
136+
<!-- For further steps use the PyO3 docs live -->

0 commit comments

Comments
 (0)