MCPcopy Index your code
hub / github.com/pytorch/tutorials / printLines

Function printLines

beginner_source/chatbot_tutorial.py:144–148  ·  view source on GitHub ↗
(file, n=10)

Source from the content-addressed store, hash-verified

142corpus = os.path.join("data", corpus_name)
143
144def printLines(file, n=10):
145 with open(file, 'rb') as datafile:
146 lines = datafile.readlines()
147 for line in lines[:n]:
148 print(line)
149
150printLines(os.path.join(corpus, "utterances.jsonl"))
151

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected