Skip to content

convert any codebase into a coding exercise ๐Ÿ’ช with AI ๐Ÿค–๐Ÿง 

Notifications You must be signed in to change notification settings

FarisHijazi/code-coach-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AI code-coach ๐Ÿ‹๏ธ

Trying to learn a new coding concept quickly? ๐Ÿ‘€๐Ÿ“š

Just give AI Code Coach some codebases you want to learn, and AI Code Coach converts any codebase into coding practice quizzes/exercises ๐Ÿšดโ€โ™€๏ธ๐Ÿƒโ€โ™‚๏ธ๐Ÿ‹๏ธ

tldr: generate practice problems to learn the important concepts of any codebase!

How it works

Takes a code file, and hides some blocks, and you'll have to practice implementing it.

  • Input: any code file(s) .../gpt.py

    ...
    # original code block
    def sum_of_squares(a, b):
        return (a**2 + b**2)
  • Output: practice format (scroll to the right for HINT and ANSWER)

    ...
    # now you ๐Ÿซต need to write this codeblock
    def sum_of_squares(a, b):
        return #PRACTICE-1: calculate the sum of squares of a and b --> HINT: -->                                          HINT: use the "**" operator and "+" operator --> SOLUTION: -->                                                     Chunk 1: return (a**2 + b**2)

How to use it? (Install + Demo)

pip install git+https://github.com/FarisHijazi/code-coach-ai

Try it out with Andrej Karpathy's GPT video

code-coach https://github.com/karpathy/ng-video-lecture

# see the result: code_coach_output/ng-video-lecture/gpt.practice.py

# open in VSCode:
code code_coach_output/ng-video-lecture/

image

TODO

Click to expand TODO list
  • make a webpage that takes a repo URL and gives cards
  • make a server that takes the github.com path but with a different domain name and clones the repo
  • deploy this on google cloudrun and use modal for serverless LLMs
  • add an option for the user to add a simple prompt to tell it what to focus on
  • make a pyproject.toml or setup.py and make it easily installable
  • support jupyter notebooks
  • add joblib persistent caching
  • support for multiple files
  • add a way to specify the number of questions to generate
  • count token cost and report it at the end
  • count questions and report them at the end
  • jupyter notebooks add collapsible cells with hints and solutions
  • BIG FEATURE: output Jupyter notebooks even for .py files, this way they're interactive and can be tested one practice section at a time rather than having it
  • BIG FEATURE: generate unit tests for the user to check each section

About

convert any codebase into a coding exercise ๐Ÿ’ช with AI ๐Ÿค–๐Ÿง 

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages