def upload_content()

in sage_maker_magic/sage_maker_kernel/kernelmagics.py [0:0]


    def upload_content(content, path=None):
        if path is None:
            local_file = '/tmp/tmp-%s.py' % str(uuid.uuid4())
        else:
            local_file = path
        with open(local_file, 'w') as f:
            f.write(content)
        return local_file