Coder Social home page Coder Social logo

advent2022's Introduction

Structure

  • May create a notebooks/ folder in the future, top level pyproject is set up to run local Jupyter.
  • All Python/Rust file-based solutions will be in specific folders day##. Each folder is a hybrid Rust/Python repo, effectively with cargo init and poetry init. main.py and main.rs will both be in the src/ folder.

Jupyter Rust Kernel

In order to run the Notebooks with Rust Kernels locally, you'll need to set up the Rust toolchain and evcxr.

Once that's one, you should have a Rust kernel available. You can check with jupyter kernelspec list

❯ poetry run jupyter kernelspec list
Available kernels:
  python3    /home/kafonek/advent2022/.venv/share/jupyter/kernels/python3
  rust       /home/kafonek/.local/share/jupyter/kernels/rust

Timing

  1. Cd into directory (cd day01)
  2. Compile packages
  • poetry run python -m compileall src/
  • cargo build --release
  1. Time and run
  • time poetry run python src/main.py
  • time cargo run --release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.