{"success":true,"data":{"ext":"nb","name":"NB","description":"Notebook (NB) is a file format created and maintained by Wolfram Research for Wolfram Mathematica. It is used to store interactive computational notebooks containing text, formulas, code, graphics, and results for scientific, engineering, and mathematical work. The format is generally safe, though notebooks can evaluate embedded Wolfram Language code when opened, so files from untrusted sources should be reviewed before execution.","mime":["application/mathematica"],"risk_level":"Safe","signatures":[{"hex":"28 2A 2A","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"28 2A 20","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]}],"related":["ma","mb"],"usage":{"python":"def is_nb(file_path: str) -> bool:\n    \"\"\"Check if file is a valid NB by magic bytes.\"\"\"\n    signature = bytes([0x28, 0x2A, 0x2A])\n    with open(file_path, \"rb\") as f:\n        return f.read(3) == signature","node":"function isNB(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x28, 0x2A, 0x2A]);\n  return buffer.subarray(0, 3).equals(signature);\n}","go":"func IsNB(data []byte) bool {\n    signature := []byte{0x28, 0x2A, 0x2A}\n    if len(data) < 3 {\n        return false\n    }\n    return bytes.Equal(data[:3], signature)\n}"}}}