I have a git repo ,which has a python file and in that file I have defined a function.
for eg :
import pandas as pd
def return_square(num):
return num*num
This is my function in a file square.py in git repo math_calculation
math_calculation
-- square.py
How to access this function from my local notebook in Jupyter environment
from github import Github
g = Github("***********************")
# Github objects:
for repo in g.get_user().get_repos():
print(repo.name)
##Use the function square
print(return_square(4))
To get 16 answer in my local notebook