Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.99 KB

README.md

File metadata and controls

61 lines (40 loc) · 1.99 KB

PyBreak - StackOverflow in your terminal

This is a simple tool for Python 3 which brings StackOverflow in your terminal. Just include @PyBreak in your project and don't get stuck. The tool uses data crunched from StackOverflow's Python dataset from August 2, 2008 and October 19, 2016.

When you get an exception, it will automatically recommend you relevant questions and their answers to help solve your problem.

How it works

Easy to Use

There are not many requirements for this tool.

html2text==2018.1.9
scikit-learn==0.20.2
pandas==0.23.0
nltk==3.4

Works best on Ubuntu. On Windows, this may cause MemoryError while saving data using Pickle.

Step 0: Installation


  • Run pip3 install -r requirements.txt in the terminal.
  • Run download.sh. It downloads csv files from My GitLab repository
  • Clone this repository and add the above .csv files into the repository folder (Recommended). Or you can directly download model files from my GitLab (Not recommended).
  • Run prepare_data.py to create data files. The size of these files is large and thus, not included with this repository.

Soon, the tool will be converted into a library and can be then installed using pip.

Step 1: Wrap your program into a function as below:


def some_wrapper_function():
    # Do something here. It's safe now.
    # Bye

Step 2: Import PyBreak and put @PyBreak decorator before your wrapper function.


from PyBreak import PyBreak

@PyBreak
def some_wrapper_function():
    # Do something here. It's safe now.
    # Bye

Whenever your program raises an exception, PyBreak will catch it and do it's magic.

Credits

StackOverflow's Python dataset from Kaggle

StackOverflow.com