Vadim Markovtsev, source{d}.
Vadim Markovtsev, source{d}
Another example: DeepCode.ai.
class foobar:
def connecttoserver(self):
myserverhost = globalconfig.server.host
class FooBar:
def connect_to_server(self):
myServerHost = globalConfig.server.host
>>> from sourced.engine import Engine
>>> engine = Engine(spark, "/path/to/siva/files", "siva")
>>> engine.repositories.references.head_ref \
.commits.tree_entries.blobs \
.classify_languages() \
.select("blob_id", "path", "lang") \
.show()
pip3 install bblfshpython3 -m bblfsh -f /path/to/file
bblfsh/client-pythonimport bblfshclient = bblfsh.BblfshClient("0.0.0.0:9432")client.parse("/file").uast
>>> engine.repositories.references.head_ref \
.commits.tree_entries.blobs \
.classify_languages() \
.filter('lang = "Python"') \
.extract_uasts() \
.query_uast('//*[@roleIdentifier]') \
.extract_tokens("result", "tokens") \
.select("blob_id", "path", "tokens")
tqdmContacts: