Skip to content

fxpl/bocpy-introduction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BocPy Introduction

This repository provides a minimal starting point for using bocpy with Python.

Prerequisites

  • Python 3.10+ installed
  • pip available in your Python installation

1. Create a virtual environment

From the project root:

python3 -m venv .venv

If python3 is not available on your machine, try:

python -m venv .venv

2. Activate the virtual environment

macOS / Linux:

source .venv/bin/activate

Windows (PowerShell):

.venv\Scripts\Activate.ps1

Windows (Command Prompt):

.venv\Scripts\activate.bat

You should now see your shell prompt prefixed with (.venv).

3. Install dependencies

Install bocpy from requirements.txt:

pip install -r requirements.txt

4. Verify installation

BocPy comes with several examples. We can run the fibonacci example to verify the installation:

bocpy-fibonacci

Getting started

Now you can simply run any Python file using python <file>. hello.py has a minimal "hello " example you can run with this:

python hello.py

Cooking with Boc

You can find the cooking with BoC example from the lecture in cooking.py. You can try adding a plating step or maybe another ingredient.

Passwords

passwords.py contains a simple brute-force hash cracking script. It currently uses one core, try making it concurrent using BocPy. You only need to modify the crack function for this.

The implementation doesn't need to terminate early.

Dining Philosophers

philosophers.py contains a basic setup for dining philosophers. However, currently all philosophers dine in order. Try enabling them to dine concurrently using BocPy.

Additional Resources

About

A small repo to get started playing with BocPy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages