Created
August 10, 2019 10:21
-
-
Save unmeshvrije/c239db1c8cb511e60084cca5ac8d577e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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....