semvec/pypi-packages huggingface dataset:
binocular-birds 0.1.0
A bird species classifier
Requires Python: >=3.8

# NABirds Species Classifier

<img src="./Binocular/assets/binacular.png" width="100" alt="Binocular">

This project provides a pretrained, species-level bird classifier for North American birds, built on the [NABirds dataset](https://dl.allaboutbirds.org/nabirds). It uses a powerful DINOv2 Vision Transformer (ViT) backbone with a linear probe, allowing for accurate and efficient classification.

The model can be easily loaded and used for inference directly from the [Hugging Face Hub](https://huggingface.co/jiujiuche/Binocular).

## Quick Start: Inference with a Pretrained Model

Get predictions from the pretrained model in just a few lines of code.

### 1. Setup

First, set up the environment and install the required dependencies.

```bash
# Clone the repository
git clone https://github.com/jiujiuche/Binocular.git
cd Binocular

# Create a virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt
```

### 2. Run Inference

Use the example script to run inference on an image of your choice. The script will automatically download the pretrained model from the Hugging Face Hub.

```bash
python Binocular/examples/huggingface_inference.py \
    --repo-id "jiujiuche/Binocular" \
    --image "path/to/your/bird_image.jpg"
```

The output will be a list of the top 5 predicted bird species and their confidence scores.

## Training (Optional)

This repository also contains the full pipeline for training the model from scratch.

### Dataset Setup

1.  Download the NABirds dataset from [https://dl.allaboutbirds.org/nabirds](https://dl.allaboutbirds.org/nabirds).
2.  Extract the dataset files into the `Binocular/datasets/nabirds/` directory.

### Training Command

The training process is managed through a main script that uses configuration files to define the training parameters.

```bash
# Example for training on an M2 Mac
python Binocular/scripts/train.py --config Binocular/configs/m2_dev.yaml

# Example for training on a CUDA-enabled GPU
python Binocular/scripts/train.py --config Binocular/configs/rtx4090.yaml
```

Training configurations can be found in the `Binocular/configs/` directory.

## Project Structure

```
Binocular/
├── assets/           # Project icons
├── datasets/         # Data loaders and dataset files
├── models/           # Model implementations and inference logic
├── configs/          # Configuration files for experiments
├── scripts/          # Training, evaluation, and utility scripts
└── examples/         # Example scripts for using the models
```

## Dependencies

- **PyTorch**
- **torchvision**
- **huggingface-hub**
- **Pillow**, **tqdm**, **numpy**, etc.

See [`requirements.txt`](./requirements.txt) for the complete list.

## License

The code in this repository is provided under the MIT License. The NABirds dataset has its own [license terms](https://dl.allaboutbirds.org/nabirds), which should be reviewed before use.
cocotb_kernel 2.0.1
Jupyter kernel for cocotb
Requires Python: <3.14,>=3.11

# cocotb Jupyter Kernel
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/mmichilot/cocotb_kernel/HEAD?labpath=example%2FQuickstart+Guide.ipynb)

This kernel adds support for using [cocotb](https://docs.cocotb.org/en/stable/) within 
Jupyter notebooks. 

## Why is a dedicated kernel needed?
cocotb works in conjunction with an HDL simulator. As such, attempting to `import cocotb`
within a notebook will not work because no simulator is attached. This kernel works by first building the HDL design and launching the simulator using cocotb's [runners](https://docs.cocotb.org/en/stable/library_reference.html#cocotb.runner.Simulator), then
having a cocotb test module launch ipykernel, which will connect to the notebook and execute code cells.

## Installation
Prerequisites:
- Python >=3.11,<3.14 (cocotb 2.0.1 supports up to 3.13)
- JupyterLab 4+ or Jupyter Notebook 6+
- An HDL simulator (such as Icarus Verilog, Verilator, or GHDL)

After installing the prerequisites, the kernel can be installed via pip.
```bash
pip install cocotb_kernel
```

To complete the installation of kernel, execute one of the following commands:
 ```
# Install to Jupyter's user directory, ~/.local/share/jupyter/kernel
python -m cocotb_kernel.install --user

# or, if using conda / venv
python -m cocotb_kernel.install --sys-prefix

# or, a custom prefix (Warning: kernel might not be detected by Jupyter)
python -m cocotb_kernel.install --prefix PREFIX

# or, install to Jupyter's base directory, /usr/local/share/jupyter (requires root)
sudo python -m cocotb_kernel.install
```

## Usage
Before launching the kernel, create a TOML file named `cocotb.toml` within the project's root directory (similar to cocotb's Makefile).

The TOML file follows the cocotb [runner](https://docs.cocotb.org/en/stable/library_reference.html#cocotb.runner.Simulator) 
`build()` and `test()` arguments, with a few exceptions, as shown:

```toml
# The simulator to build and simulate the HDL design
# https://docs.cocotb.org/en/stable/simulator_support.html
simulator = "icarus"

# The top level HDL module
hdl_toplevel = "foo"

# The language of the top level HDL module
hdl_toplevel_lang = "verilog"

# Optional: Verilog parameters or VHDL generics
[parameters]

# Build options
# https://docs.cocotb.org/en/stable/library_reference.html#cocotb.runner.Simulator.build
[build]
sources = ["hdl/foo.sv", "../hdl/foo.sv", "hdl/*.vhdl", "**/*.vhdl"] # specify sources relative to cocotb.toml

# Optional: Defines to set for building
[build.defines]

# Optional: Test options
# https://docs.cocotb.org/en/stable/library_reference.html#cocotb.runner.Simulator.test
[test]

# Optional: Extra environment variables to set for testing
[test.extra_env]
```

Once the TOML file is created, navigate to or launch JupyterLab within the project's
root directory and create or open a notebook with the cocotb kernel.
minigamesbyvedcodes 0.1.0
A simple Python games library (Tic Tac Toe, RPS, Maths Quiz)
Requires Python: >=3.7

📦 minigamesbyvedcodes – A Simple Python Games Library
🎮 Overview

minigamesbyvedcodes is a beginner-friendly Python library that lets users play classic games by calling simple functions — no complex setup, no boilerplate code.

This is my first Python module, built to understand:

Python packages & modules

Clean API design

Code reuse

Real-world library structure

✨ Features

✅ Tic Tac Toe (2-player)

✅ Rock Paper Scissors (Player vs Computer)

✅ Maths Quiz (Score-based)

✅ Shared player name system

✅ Single-function game execution

✅ Clean and extendable structure

📁 Project Structure
minigamesbyvedcodes/
│
├── minigamesbyvedcodes/
│   ├── __init__.py
│   ├── users.py
│   ├── tictactoe.py
│   ├── rps.py
│   └── maths_quiz.py
│
├── README.md
└── setup.py


Each file has a single responsibility, following professional Python library practices.

🚀 Installation

After publishing on PyPI:

pip install minigamesbyvedcodes

▶️ Usage
import minigamesbyvedcodes as mnigames 

minigames.tic_tac_toe()
minigames.rock_paper_scissors()
minigames.maths_quiz()


That’s it — the game starts instantly 🎉

🧠 Module Explanation
__init__.py

Acts as the public API

Controls what users can import

Keeps internal files hidden

users.py

Handles player name input

Reused across all games

Prevents code duplication (DRY principle)

tictactoe.py

Implements board logic

Player switching

Win & draw conditions

Fully terminal-based

rps.py

Rock Paper Scissors logic

Player vs Computer

Randomized computer moves

maths_quiz.py

Generates random math questions

Tracks score

Interactive quiz format

🎯 Why This Project?

This project helped me learn:

How real Python libraries are structured

How to expose clean functions

How to reuse logic across modules

How PyPI publishing works

📄 License

MIT License — free to use and modify.