The above mentioned comments are very useful but they are a bit difficult to implement. Below steps you can try, I also tried it and it worked:
- Download that file from your notebook in PY file format (You can find that option in File tab).
- Now copy that downloaded file into the working directory of Jupyter Notebook
- You are now ready to use it. Just import .PY File into the ipynb file