Skip to content

Instantly share code, notes, and snippets.

@unmeshvrije
Created August 10, 2019 10:21
Show Gist options
  • Save unmeshvrije/c239db1c8cb511e60084cca5ac8d577e to your computer and use it in GitHub Desktop.
Save unmeshvrije/c239db1c8cb511e60084cca5ac8d577e to your computer and use it in GitHub Desktop.
def sum_all(*args):
total = 0
for item in args:
total += item
return total
'''
some calls to test the function
>>> sum_all(1,2,3,4)
10
>>> sum_all(1,2,3,4,5,6)
21
>>> sum_all(1,2,3,4,5,6,7,8)
36
>>> sum_all(1,2)
3
>>> sum_all(1)
1
>>> sum_all()
0
'''
@kadimaolivier
Copy link

Hi,

i saw one of your post on Pytorch-Biggraph, i would like to use that tool for knowledge Graph embedding ,i have a data set with triple and want to get vectors and calculate the simularity between entities ,is there any step by step guide line to that either with Pytorchbiggraph or other tools that you may know? thanks for sharing....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment