-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #817 from PrefectHQ/sorting-hat
Add sorting hat example
- Loading branch information
Showing
5 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
21 changes: 21 additions & 0 deletions
21
docs/examples/hogwarts_sorting_hat/hogwarts_sorting_hat.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Hogwarts sorting hat | ||
|
||
{width="400"} | ||
|
||
|
||
!!! example "Hogwarts sorting hat" | ||
```python | ||
import marvin | ||
|
||
student = "Brave, daring, chivalrous, and sometimes a bit reckless." | ||
|
||
house = marvin.classify( | ||
student, | ||
labels=["Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"] | ||
) | ||
``` | ||
|
||
!!! success "Welcome to Gryffindor!" | ||
```python | ||
assert house == "Gryffindor" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters