| 221 | |
| 222 | # algo cat <file> |
| 223 | def cat(self, path, client): |
| 224 | result = "" |
| 225 | for f in path: |
| 226 | if '://' in f and not f.startswith("http"): |
| 227 | if f[-1] == '*': |
| 228 | path += ['data://' + file.path for file in client.dir(f[:len(f) - 2]).files()] |
| 229 | else: |
| 230 | file = client.file(f) |
| 231 | |
| 232 | if file.exists(): |
| 233 | result += file.getString() |
| 234 | else: |
| 235 | result = "file does not exist " + f |
| 236 | break |
| 237 | else: |
| 238 | print("operands must be a path to a remote data source data://") |
| 239 | break |
| 240 | |
| 241 | return result |
| 242 | |
| 243 | # algo freeze |
| 244 | def freezeAlgo(self, client, manifest_path="model_manifest.json"): |