SYMBOL INDEX (590 symbols across 98 files) FILE: go/cli/cli.go constant assetsDirEnv (line 13) | assetsDirEnv = "MAGIKA_ASSETS_DIR" constant modelNameEnv (line 14) | modelNameEnv = "MAGIKA_MODEL" function cli (line 20) | func cli(w io.Writer, args ...string) error { FILE: go/cli/cli_test.go function TestCLI (line 13) | func TestCLI(t *testing.T) { FILE: go/cli/main.go function main (line 21) | func main() { FILE: go/example/main.go constant assetsDir (line 24) | assetsDir = "/opt/magika/assets" constant modelName (line 26) | modelName = "standard_v3_3" function main (line 29) | func main() { FILE: go/magika/config.go constant configFile (line 11) | configFile = "config.min.json" constant contentTypesKBFile (line 12) | contentTypesKBFile = "content_types_kb.min.json" constant modelFile (line 13) | modelFile = "model.onnx" constant modelsDir (line 14) | modelsDir = "models" type Config (line 19) | type Config struct function ReadConfig (line 35) | func ReadConfig(assetsDir, name string) (Config, error) { function contentTypesKBPath (line 50) | func contentTypesKBPath(assetDir string) string { function configPath (line 56) | func configPath(assetDir, name string) string { function modelPath (line 61) | func modelPath(assetDir, name string) string { FILE: go/magika/content.go constant contentTypeLabelEmpty (line 10) | contentTypeLabelEmpty = "empty" constant contentTypeLabelTxt (line 11) | contentTypeLabelTxt = "txt" constant contentTypeLabelUnknown (line 12) | contentTypeLabelUnknown = "unknown" type ContentType (line 16) | type ContentType struct function readContentTypesKB (line 29) | func readContentTypesKB(assetsDir string) (map[string]ContentType, error) { FILE: go/magika/features.go type Features (line 10) | type Features struct method Flatten (line 51) | func (f Features) Flatten() []int32 { function ExtractFeatures (line 23) | func ExtractFeatures(cfg Config, r io.ReaderAt, size int) (Features, err... type errReader (line 63) | type errReader struct method readAt (line 69) | func (e *errReader) readAt(off, n int) []byte { function buildFeatures (line 88) | func buildFeatures(cfg Config, beg, mid, end []byte) Features { function padInt32 (line 111) | func padInt32(cfg Config, b []byte, prefix, size int) []int32 { function safeSlice (line 128) | func safeSlice(b []byte, from, to int) []byte { FILE: go/magika/features_test.go function TestExtractFeatures (line 15) | func TestExtractFeatures(t *testing.T) { function TestReferenceExtractFeatures (line 41) | func TestReferenceExtractFeatures(t *testing.T) { function loadArtifacts (line 70) | func loadArtifacts(t *testing.T, path string) ([]byte, error) { FILE: go/magika/scanner.go type Scanner (line 16) | type Scanner struct method Scan (line 51) | func (s *Scanner) Scan(r io.ReaderAt, size int) (ContentType, error) { method scanScore (line 59) | func (s *Scanner) scanScore(r io.ReaderAt, size int) (ContentType, flo... method contentType (line 95) | func (s *Scanner) contentType(best int, score float32) (ContentType, e... function NewScanner (line 24) | func NewScanner(assetsDir, name string) (*Scanner, error) { FILE: go/magika/scanner_test.go function TestScannerBasic (line 17) | func TestScannerBasic(t *testing.T) { function TestScannerSmall (line 49) | func TestScannerSmall(t *testing.T) { function TestScannerReference (line 80) | func TestScannerReference(t *testing.T) { function newTestScanner (line 151) | func newTestScanner(t *testing.T) *Scanner { FILE: go/onnx/onnx.go type Onnx (line 4) | type Onnx interface FILE: go/onnx/onnx_runtime.go function NewOnnx (line 16) | func NewOnnx(modelPath string, sizeTarget int) (Onnx, error) { type onnxRuntime (line 29) | type onnxRuntime struct method Run (line 36) | func (ort *onnxRuntime) Run(features []int32) ([]float32, error) { FILE: go/onnx/onnx_runtime.h function OrtApi (line 11) | const OrtApi *GetApiBase() { function OrtStatus (line 15) | OrtStatus *CreateSession(const OrtApi *ort, const char *model, OrtSessio... function OrtStatus (line 27) | OrtStatus *Run(const OrtApi *ort, OrtSession *session, OrtMemoryInfo *me... FILE: go/onnx/onnx_runtime_test.go function TestONNXRuntime (line 13) | func TestONNXRuntime(t *testing.T) { FILE: go/onnx/onnx_zero.go function NewOnnx (line 7) | func NewOnnx(string, int) (Onnx, error) { FILE: js/magika-node.ts class MagikaNode (line 45) | class MagikaNode extends Magika { method constructor (line 49) | protected constructor() { method create (line 64) | public static async create(options?: MagikaOptions): Promise { method identifyStream (line 97) | public async identifyStream( method _identifyFromStream (line 105) | private async _identifyFromStream( FILE: js/magika.ts class Magika (line 44) | class Magika { method constructor (line 55) | protected constructor() { method create (line 70) | public static async create(options?: MagikaOptions): Promise { method load (line 76) | protected async load(options?: MagikaOptions): Promise { method identifyBytes (line 93) | public async identifyBytes(fileBytes: Uint8Array): Promise { FILE: js/src/content-type-info.ts type ContentTypeInfo (line 17) | interface ContentTypeInfo { FILE: js/src/content-type-label.ts type ContentTypeLabel (line 19) | enum ContentTypeLabel { FILE: js/src/content-types-infos.ts type ContentTypesInfos (line 20) | type ContentTypesInfos = Record; FILE: js/src/magika-options.ts type MagikaOptions (line 15) | interface MagikaOptions { FILE: js/src/magika-prediction.ts type MagikaPrediction (line 19) | interface MagikaPrediction { FILE: js/src/magika-result.ts type MagikaResult (line 18) | interface MagikaResult { FILE: js/src/model-config-node.ts class ModelConfigNode (line 18) | class ModelConfigNode extends ModelConfig { method loadFile (line 19) | async loadFile(configPath: string): Promise { FILE: js/src/model-config.ts class ModelConfig (line 17) | class ModelConfig { method loadUrl (line 31) | async loadUrl(configURL: string): Promise { method setConfig (line 43) | protected setConfig(config: Record): void { FILE: js/src/model-features.ts class ModelFeatures (line 15) | class ModelFeatures { method constructor (line 20) | constructor( method withStart (line 43) | withStart(data: Uint8Array, offset: number): this { method withEnd (line 51) | withEnd(data: Uint8Array, offset: number): this { method toArray (line 59) | toArray(): number[] { FILE: js/src/model-node.ts class ModelNode (line 19) | class ModelNode extends Model { method loadFile (line 20) | async loadFile(modelPath: string): Promise { FILE: js/src/model-prediction.ts type ModelPrediction (line 17) | interface ModelPrediction { FILE: js/src/model.ts class Model (line 22) | class Model { method constructor (line 25) | constructor(public model_config: ModelConfig) {} method loadUrl (line 27) | async loadUrl(modelURL: string): Promise { method predict (line 33) | async predict(features: ModelFeatures): Promise { FILE: js/src/overwrite-reason.ts type OverwriteReason (line 15) | enum OverwriteReason { FILE: js/src/prediction-mode.ts type PredictionMode (line 15) | enum PredictionMode { FILE: js/src/status.ts type Status (line 15) | enum Status { FILE: js/test/features-extraction-vs-reference.test.ts constant FEATURES_EXTRACTION_EXAMPLES (line 20) | const FEATURES_EXTRACTION_EXAMPLES: FeaturesExtractionExamples = [ class TestableMagika (line 24) | class TestableMagika extends Magika { method extractFeaturesFromBytes (line 25) | public static extractFeaturesFromBytes( type FeaturesExtractionExample (line 79) | interface FeaturesExtractionExample { type FeaturesExtractionExampleArgs (line 86) | interface FeaturesExtractionExampleArgs { type FeaturesExtractionExampleMetadata (line 95) | interface FeaturesExtractionExampleMetadata { type ExampleModelFeatures (line 101) | interface ExampleModelFeatures { type FeaturesExtractionExamples (line 111) | type FeaturesExtractionExamples = FeaturesExtractionExample[]; function parseGzippedFeaturesExtractionExamples (line 113) | function parseGzippedFeaturesExtractionExamples(): FeaturesExtractionExa... FILE: js/test/inference-vs-reference.test.ts constant EXAMPLES_BY_PATH_INFO (line 27) | const EXAMPLES_BY_PATH_INFO: Array<[string, ExampleByPath]> = (() => { constant EXAMPLES_BY_CONTENT (line 35) | const EXAMPLES_BY_CONTENT: ExamplesByContent = [ type Prediction (line 125) | interface Prediction { type ExampleByPath (line 132) | interface ExampleByPath { type ExamplesByPath (line 139) | type ExamplesByPath = ExampleByPath[]; type ExampleByContent (line 141) | interface ExampleByContent { type ExamplesByContent (line 148) | type ExamplesByContent = ExampleByContent[]; function parseGzippedExamplesByPath (line 150) | function parseGzippedExamplesByPath(): ExamplesByPath { function parseGzippedExamplesByContent (line 167) | function parseGzippedExamplesByContent(): ExamplesByContent { function validatePredictionMode (line 184) | function validatePredictionMode(prediction_mode: PredictionMode): boolean { function validatePrediction (line 188) | function validatePrediction(prediction?: Prediction): boolean { FILE: js/test/magika-cli.test.ts function executeCli (line 23) | async function executeCli( FILE: js/test/magika.test.ts constant BASIC_TEST_FILES (line 59) | const BASIC_TEST_FILES: Array<[string, string, Dirent]> = [ FILE: js/test/tfnHook.ts class TfnMock (line 17) | class TfnMock { method get (line 30) | get(): any { method reset (line 41) | static reset() { FILE: js/test/utils.ts function parseGzippedJSON (line 18) | function parseGzippedJSON(filePath: string): Array { FILE: python/scripts/check_copyright.py function main (line 29) | def main(): function get_relevant_files_paths (line 54) | def get_relevant_files_paths() -> list[Path]: function has_copyright (line 93) | def has_copyright(path: Path) -> bool: FILE: python/scripts/check_documentation.py function main (line 49) | def main(verbose: bool) -> None: function check_versions_are_up_to_date (line 67) | def check_versions_are_up_to_date() -> bool: function get_python_latest_stable_version (line 124) | def get_python_latest_stable_version() -> str: function get_python_default_model_name (line 132) | def get_python_default_model_name() -> str: function get_javascript_default_model_name (line 139) | def get_javascript_default_model_name() -> str: function get_demo_model_name (line 146) | def get_demo_model_name() -> str: function get_rust_default_model_name (line 157) | def get_rust_default_model_name() -> str: function check_markdown_links (line 163) | def check_markdown_links(verbose: bool) -> bool: function enumerate_markdown_files_in_dir (line 202) | def enumerate_markdown_files_in_dir(rel_dir: Path) -> list[Path]: function extract_uris_infos_from_file (line 220) | def extract_uris_infos_from_file(path: Path, verbose: bool) -> list[UriI... function get_max_stable_version_for_crate (line 313) | def get_max_stable_version_for_crate(crate_name: str) -> str: function get_latest_version_for_npm_package (line 320) | def get_latest_version_for_npm_package(package_name: str) -> str: function extract_one_match_with_regex_from_file (line 327) | def extract_one_match_with_regex_from_file(path: Path, regex: str) -> str: class UriInfo (line 347) | class UriInfo: FILE: python/scripts/generate_reference.py function main (line 25) | def main(): FILE: python/scripts/pre_release_check.py function main (line 51) | def main( function get_rust_cli_version (line 146) | def get_rust_cli_version() -> str: function get_magika_package_version_via_pip_show (line 166) | def get_magika_package_version_via_pip_show() -> str: function is_valid_python_version (line 184) | def is_valid_python_version(version: str) -> bool: function test_is_valid_python_version (line 217) | def test_is_valid_python_version() -> None: FILE: python/scripts/prepare_pyproject_for_pure_python_wheel.py function main (line 22) | def main() -> None: FILE: python/scripts/run_quick_test_magika_cli.py function main (line 39) | def main(client_path: Optional[Path]) -> None: FILE: python/scripts/run_quick_test_magika_module.py function main (line 35) | def main(print_inference_stats: bool, repeat: int) -> None: FILE: python/scripts/sync.py class Target (line 71) | class Target(enum.StrEnum): function main (line 83) | def main(target: Target, models_names_str: Optional[str]) -> None: function update_python_content_type_kb (line 107) | def update_python_content_type_kb() -> None: function add_model_to_python_package (line 115) | def add_model_to_python_package(model_name: str) -> None: function update_python_content_type_label_py (line 154) | def update_python_content_type_label_py() -> None: function update_js_content_type_files (line 218) | def update_js_content_type_files() -> None: FILE: python/scripts/test_magika_model.py function main (line 35) | def main(model_dir_or_name: str) -> None: function log_ok (line 76) | def log_ok(msg: str) -> None: function log_error (line 80) | def log_error(msg: str) -> None: FILE: python/src/magika/cli/magika_client.py function main (line 133) | def main( function _should_read_from_stdin (line 339) | def _should_read_from_stdin(files_paths: List[Path]) -> bool: function _get_magika_result_from_stdin (line 343) | def _get_magika_result_from_stdin(magika: Magika) -> MagikaResult: FILE: python/src/magika/cli/magika_rust_client_not_found_warning.py function main (line 31) | def main() -> None: # noqa: D103 FILE: python/src/magika/logger.py class SimpleLogger (line 28) | class SimpleLogger: method __init__ (line 36) | def __init__(self, use_colors: bool = False): method setLevel (line 40) | def setLevel(self, level: int) -> None: method raw_print_to_stdout (line 43) | def raw_print_to_stdout(self, msg: str) -> None: method raw_print (line 46) | def raw_print( method debug (line 58) | def debug(self, msg: str) -> None: method info (line 65) | def info(self, msg: str) -> None: method warning (line 69) | def warning(self, msg: str) -> None: method error (line 76) | def error(self, msg: str) -> None: function get_logger (line 84) | def get_logger(use_colors: bool = False) -> SimpleLogger: FILE: python/src/magika/magika.py class Magika (line 50) | class Magika: method __init__ (line 57) | def __init__( method __repr__ (line 125) | def __repr__(self) -> str: method __str__ (line 128) | def __str__(self) -> str: method get_module_version (line 131) | def get_module_version(self) -> str: method get_model_name (line 135) | def get_model_name(self) -> str: method identify_path (line 139) | def identify_path(self, path: Union[str, os.PathLike]) -> MagikaResult: method identify_paths (line 150) | def identify_paths( method identify_bytes (line 168) | def identify_bytes(self, content: bytes) -> MagikaResult: method identify_stream (line 177) | def identify_stream(self, stream: BinaryIO) -> MagikaResult: method get_output_content_types (line 213) | def get_output_content_types(self) -> List[ContentTypeLabel]: method get_model_content_types (line 241) | def get_model_content_types(self) -> List[ContentTypeLabel]: method _get_default_model_name (line 260) | def _get_default_model_name() -> str: method _load_content_types_kb (line 269) | def _load_content_types_kb( method _load_model_config (line 306) | def _load_model_config(model_config_path: Path) -> ModelConfig: method _init_onnx_session (line 330) | def _init_onnx_session(self) -> rt.InferenceSession: method _get_ct_info (line 344) | def _get_ct_info(self, content_type: ContentTypeLabel) -> ContentTypeI... method _get_results_from_paths (line 347) | def _get_results_from_paths(self, paths: List[Path]) -> List[MagikaRes... method _get_result_from_path (line 393) | def _get_result_from_path(self, path: Path) -> MagikaResult: method _get_result_from_seekable (line 396) | def _get_result_from_seekable(self, seekable: Seekable) -> MagikaResult: method _extract_features_from_seekable (line 404) | def _extract_features_from_seekable( method _get_beg_ints_with_padding (line 482) | def _get_beg_ints_with_padding( method _get_end_ints_with_padding (line 506) | def _get_end_ints_with_padding( method _get_model_outputs_from_features (line 529) | def _get_model_outputs_from_features( method _get_results_from_features (line 544) | def _get_results_from_features( method _get_output_label_from_dl_label_and_score (line 578) | def _get_output_label_from_dl_label_and_score( method _get_result_from_labels_and_score (line 636) | def _get_result_from_labels_and_score( method _get_result_or_features_from_path (line 654) | def _get_result_or_features_from_path( method _get_result_or_features_from_seekable (line 712) | def _get_result_or_features_from_seekable( method _get_result_from_few_bytes (line 774) | def _get_result_from_few_bytes( method _get_label_from_few_bytes (line 786) | def _get_label_from_few_bytes(self, content: bytes) -> ContentTypeLabel: method _get_raw_predictions (line 794) | def _get_raw_predictions( FILE: python/src/magika/types/content_type_info.py class ContentTypeInfo (line 26) | class ContentTypeInfo: method ct_label (line 47) | def ct_label(self) -> str: method score (line 62) | def score(self) -> float: method magic (line 75) | def magic(self) -> str: FILE: python/src/magika/types/content_type_label.py class ContentTypeLabel (line 24) | class ContentTypeLabel(StrEnum): method __repr__ (line 385) | def __repr__(self) -> str: FILE: python/src/magika/types/magika_error.py class MagikaError (line 18) | class MagikaError(Exception): FILE: python/src/magika/types/magika_prediction.py class MagikaPrediction (line 26) | class MagikaPrediction: FILE: python/src/magika/types/magika_result.py class MagikaResult (line 26) | class MagikaResult: method __init__ (line 29) | def __init__( method __post_init__ (line 47) | def __post_init__(self) -> None: method path (line 57) | def path(self) -> Path: method ok (line 66) | def ok(self) -> bool: method status (line 75) | def status(self) -> Status: method prediction (line 84) | def prediction(self) -> MagikaPrediction: method dl (line 106) | def dl(self) -> ContentTypeInfo: method output (line 117) | def output(self) -> ContentTypeInfo: method score (line 128) | def score(self) -> float: method asdict (line 138) | def asdict(self) -> Dict: method __repr__ (line 155) | def __repr__(self) -> str: method __str__ (line 158) | def __str__(self) -> str: FILE: python/src/magika/types/model.py class ModelFeatures (line 25) | class ModelFeatures: class ModelOutput (line 38) | class ModelOutput: class ModelConfig (line 44) | class ModelConfig: FILE: python/src/magika/types/overwrite_reason.py class OverwriteReason (line 23) | class OverwriteReason(LowerCaseStrEnum): FILE: python/src/magika/types/prediction_mode.py class PredictionMode (line 25) | class PredictionMode(LowerCaseStrEnum): method get_valid_prediction_modes (line 36) | def get_valid_prediction_modes() -> List[str]: FILE: python/src/magika/types/seekable.py class Seekable (line 21) | class Seekable: method __init__ (line 22) | def __init__(self, stream: BinaryIO) -> None: method size (line 28) | def size(self) -> int: method read_at (line 31) | def read_at(self, offset: int, size: int) -> bytes: FILE: python/src/magika/types/status.py class Status (line 22) | class Status(LowerCaseStrEnum): FILE: python/src/magika/types/strenum.py class StrEnum (line 32) | class StrEnum(str, enum.Enum): method __new__ (line 40) | def __new__(cls, value: Union[str, StrEnum], *args, **kwargs): # type... method __str__ (line 47) | def __str__(self) -> str: method _generate_next_value_ (line 50) | def _generate_next_value_(name, *_): # type: ignore[no-untyped-def,ov... class LowerCaseStrEnum (line 54) | class LowerCaseStrEnum(StrEnum): method _generate_next_value_ (line 55) | def _generate_next_value_(name, *_): # type: ignore[no-untyped-def,ov... FILE: python/tests/test_features_extraction_vs_reference.py function cli (line 43) | def cli(): function run_tests (line 49) | def run_tests(debug: bool) -> None: function generate_tests (line 55) | def generate_tests(test_mode: bool) -> None: function test_features_extraction_vs_reference (line 59) | def test_features_extraction_vs_reference(debug: bool = False) -> None: function test_reference_generation (line 81) | def test_reference_generation() -> None: function _generate_reference_features_extraction (line 85) | def _generate_reference_features_extraction(test_mode: bool) -> None: function _dump_reference_features_extraction_examples (line 92) | def _dump_reference_features_extraction_examples( function _generate_reference_features_extraction_tests_cases (line 114) | def _generate_reference_features_extraction_tests_cases() -> List[ function _generate_reference_features_extraction_tests_cases_inputs (line 145) | def _generate_reference_features_extraction_tests_cases_inputs() -> List[ function _generate_content_from_metadata (line 211) | def _generate_content_from_metadata( function _get_examples_from_reference (line 238) | def _get_examples_from_reference() -> List[FeaturesExtractionExample]: function _check_features_vs_reference_example_features (line 253) | def _check_features_vs_reference_example_features( class FeaturesExtractionExample (line 281) | class FeaturesExtractionExample: class FeaturesExtractionExampleArgs (line 291) | class FeaturesExtractionExampleArgs: class FeaturesExtractionExampleMetadata (line 301) | class FeaturesExtractionExampleMetadata: FILE: python/tests/test_inference_vs_reference.py function cli (line 47) | def cli(): function run_tests (line 53) | def run_tests(debug: bool) -> None: function generate_tests (line 59) | def generate_tests(test_mode: bool) -> None: function test_inference_vs_reference (line 63) | def test_inference_vs_reference(debug: bool = False) -> None: function test_reference_generation (line 129) | def test_reference_generation() -> None: function _get_examples_by_path (line 135) | def _get_examples_by_path(model_name: str) -> List[ExampleByPath]: function _get_examples_by_content (line 155) | def _get_examples_by_content(model_name: str) -> List[ExampleByContent]: function _generate_reference_for_inference (line 175) | def _generate_reference_for_inference(test_mode: bool) -> None: function _generate_examples_by_path (line 183) | def _generate_examples_by_path( function _generate_examples_by_content (line 226) | def _generate_examples_by_content( function _dump_examples_by_path (line 339) | def _dump_examples_by_path( function _dump_examples_by_content (line 367) | def _dump_examples_by_content( class CornerCaseInfo (line 397) | class CornerCaseInfo: method __repr__ (line 403) | def __repr__(self) -> str: class LabelCategory (line 413) | class LabelCategory(enum.Enum): class ScoreRange (line 420) | class ScoreRange(enum.Enum): class CornerCaseCollector (line 427) | class CornerCaseCollector: method __init__ (line 428) | def __init__(self, magika: Magika): method inspect_content (line 457) | def inspect_content( method is_complete (line 467) | def is_complete(self) -> bool: method get_missing_examples (line 470) | def get_missing_examples(self) -> Set[CornerCaseInfo]: method get_missing_examples_num (line 473) | def get_missing_examples_num(self) -> int: method _get_cornern_case_example (line 476) | def _get_cornern_case_example( method _get_label_category (line 486) | def _get_label_category(self, dl_label: ContentTypeLabel) -> LabelCate... method _is_generic (line 499) | def _is_generic(self, dl_label: ContentTypeLabel) -> bool: method _is_text (line 502) | def _is_text(self, dl_label: ContentTypeLabel) -> bool: method _has_threshold (line 505) | def _has_threshold(self, dl_label: ContentTypeLabel) -> bool: method _get_threshold (line 508) | def _get_threshold(self, dl_label: ContentTypeLabel) -> float: method _has_overwrite (line 511) | def _has_overwrite(self, dl_label: ContentTypeLabel) -> bool: method _get_score_range (line 514) | def _get_score_range(self, dl_label: ContentTypeLabel, score: float) -... method get_corner_case_candidates_generator (line 526) | def get_corner_case_candidates_generator( function _check_result_vs_reference_example (line 593) | def _check_result_vs_reference_example( class ExampleByPath (line 613) | class ExampleByPath: class ExampleByContent (line 623) | class ExampleByContent: class Prediction (line 633) | class Prediction: FILE: python/tests/test_magika_python_module.py function test_magika_module_check_version (line 36) | def test_magika_module_check_version() -> None: function test_magika_module_with_one_test_file (line 50) | def test_magika_module_with_one_test_file() -> None: function test_magika_module_with_explicit_model_dir (line 63) | def test_magika_module_with_explicit_model_dir() -> None: function test_magika_module_with_basic_tests_by_paths (line 76) | def test_magika_module_with_basic_tests_by_paths() -> None: function test_magika_module_with_basic_tests_by_path (line 84) | def test_magika_module_with_basic_tests_by_path() -> None: function test_magika_module_with_basic_tests_by_bytes (line 94) | def test_magika_module_with_basic_tests_by_bytes() -> None: function test_magika_module_with_basic_tests_by_stream (line 107) | def test_magika_module_with_basic_tests_by_stream() -> None: function test_magika_module_with_all_models (line 120) | def test_magika_module_with_all_models() -> None: function test_magika_module_with_previously_missdetected_samples (line 131) | def test_magika_module_with_previously_missdetected_samples() -> None: function test_magika_module_with_empty_content (line 140) | def test_magika_module_with_empty_content() -> None: function test_magika_module_with_short_content (line 170) | def test_magika_module_with_short_content() -> None: function test_magika_module_with_python_and_non_python_content (line 208) | def test_magika_module_with_python_and_non_python_content() -> None: function test_magika_module_identify_stream_does_not_alter_position (line 225) | def test_magika_module_identify_stream_does_not_alter_position() -> None: function test_magika_module_with_whitespaces (line 245) | def test_magika_module_with_whitespaces() -> None: function test_magika_module_with_different_prediction_modes (line 302) | def test_magika_module_with_different_prediction_modes() -> None: function test_magika_module_overwrite_reason (line 401) | def test_magika_module_overwrite_reason() -> None: function test_magika_module_with_directory (line 470) | def test_magika_module_with_directory() -> None: function test_magika_module_multiple_copies_of_the_same_file (line 483) | def test_magika_module_multiple_copies_of_the_same_file() -> None: function test_magika_module_with_symlink (line 499) | def test_magika_module_with_symlink() -> None: function test_magika_module_with_non_existing_file (line 528) | def test_magika_module_with_non_existing_file() -> None: function test_magika_module_with_permission_error (line 540) | def test_magika_module_with_permission_error() -> None: function test_magika_module_with_really_many_files (line 573) | def test_magika_module_with_really_many_files() -> None: function test_magika_module_with_big_file (line 588) | def test_magika_module_with_big_file() -> None: function test_api_call_with_bad_types (line 612) | def test_api_call_with_bad_types() -> None: function test_access_magika_result_and_prediction (line 645) | def test_access_magika_result_and_prediction(): function test_access_backward_compatibility_layer (line 692) | def test_access_backward_compatibility_layer() -> None: function test_get_model_and_output_content_types (line 721) | def test_get_model_and_output_content_types() -> None: function test_magika_imports (line 764) | def test_magika_imports(): function get_expected_content_type_label_from_test_file_path (line 795) | def get_expected_content_type_label_from_test_file_path( function check_result_vs_expected_result (line 801) | def check_result_vs_expected_result( function check_results_vs_expected_results (line 812) | def check_results_vs_expected_results( FILE: python/tests/test_python_magika_client.py function test_python_magika_client (line 19) | def test_python_magika_client() -> None: FILE: python/tests/utils.py function get_repo_root_dir (line 25) | def get_repo_root_dir() -> Path: function get_tests_data_dir (line 29) | def get_tests_data_dir() -> Path: function get_basic_tests_files_dir (line 39) | def get_basic_tests_files_dir() -> Path: function get_mitra_tests_files_dir (line 45) | def get_mitra_tests_files_dir() -> Path: function get_previously_missdetected_files_dir (line 51) | def get_previously_missdetected_files_dir() -> Path: function get_basic_test_files_paths (line 57) | def get_basic_test_files_paths() -> List[Path]: function get_mitra_test_files_paths (line 63) | def get_mitra_test_files_paths() -> List[Path]: function get_previously_missdetected_files_paths (line 69) | def get_previously_missdetected_files_paths() -> List[Path]: function get_reference_features_extraction_examples_path (line 75) | def get_reference_features_extraction_examples_path() -> Path: function get_reference_for_inference_examples_by_path_path (line 79) | def get_reference_for_inference_examples_by_path_path(model_name: str) -... function get_reference_for_inference_examples_by_content_path (line 87) | def get_reference_for_inference_examples_by_content_path(model_name: str... function get_one_basic_test_file_path (line 95) | def get_one_basic_test_file_path() -> Path: function get_random_ascii_bytes (line 99) | def get_random_ascii_bytes(size: int) -> bytes: function get_random_bytes (line 108) | def get_random_bytes(size: int) -> bytes: function get_lines_from_stream (line 112) | def get_lines_from_stream(stream: str) -> List[str]: function write_random_file_with_size (line 123) | def write_random_file_with_size(sample_path: Path, sample_size: int) -> ... function get_models_dir (line 138) | def get_models_dir() -> Path: function get_default_model_dir (line 142) | def get_default_model_dir() -> Path: function generate_whitespaces (line 148) | def generate_whitespaces(size: int) -> bytes: function generate_pattern (line 154) | def generate_pattern(size: int, only_printable: bool) -> bytes: function gzip_compress (line 169) | def gzip_compress(content: bytes) -> bytes: function gzip_decompress (line 173) | def gzip_decompress(content: bytes) -> bytes: function get_imported_objects_after_wildcard (line 177) | def get_imported_objects_after_wildcard() -> Dict[str, Any]: FILE: rust/cli/src/main.rs type Flags (line 37) | struct Flags { type Version (line 64) | struct Version; method into_resettable (line 66) | fn into_resettable(self) -> clap::builder::Resettable Result<()> { function extract_features (line 245) | async fn extract_features( type ProcessPath (line 279) | enum ProcessPath { method from (line 286) | fn from(value: FeaturesOrRuled) -> Self { function process_path (line 294) | async fn process_path( function build_session (line 330) | fn build_session(flags: &Flags) -> Result { function infer_batch (line 358) | async fn infer_batch( type Reorder (line 374) | struct Reorder { method is_empty (line 380) | fn is_empty(&self) -> bool { method push (line 384) | fn push(&mut self, response: Response) { method pop (line 390) | fn pop(&mut self) -> Option { type Batch (line 397) | struct Batch { type Response (line 403) | struct Response { method format (line 438) | fn format(self, flags: &Flags) -> Result { method json (line 496) | fn json(self) -> Result { method label (line 514) | fn label(&self) -> &str { method description (line 521) | fn description(&self) -> Cow<'_, str> { method group (line 528) | fn group(&self) -> &str { method mime_type (line 535) | fn mime_type(&self) -> &str { method extensions (line 542) | fn extensions(&self) -> &[&str] { method score (line 549) | fn score(&self) -> f32 { method color (line 556) | fn color(&self, result: ColoredString) -> ColoredString { type JsonError (line 411) | enum JsonError { method from (line 425) | fn from(value: magika::Error) -> Self { type JsonResult (line 418) | struct JsonResult<'a> { function join (line 578) | fn join>(xs: impl IntoIterator) -> String { FILE: rust/gen/src/main.rs function main (line 23) | fn main() -> Result<()> { function generate_content_types (line 40) | fn generate_content_types( function generate_model_config (line 112) | fn generate_model_config(content_types: &[String], model_config: ModelCo... function create_generated_file (line 182) | fn create_generated_file(path: impl AsRef) -> Result { type ContentType (line 194) | struct ContentType { type ModelConfig (line 204) | struct ModelConfig { function enum_name (line 223) | fn enum_name(xs: &str) -> String { function const_name (line 234) | fn const_name(xs: &str) -> String { FILE: rust/lib/src/builder.rs type Builder (line 21) | pub struct Builder { method with_inter_threads (line 30) | pub fn with_inter_threads(mut self, num_threads: usize) -> Self { method with_intra_threads (line 36) | pub fn with_intra_threads(mut self, num_threads: usize) -> Self { method with_optimization_level (line 42) | pub fn with_optimization_level(mut self, opt_level: GraphOptimizationL... method with_parallel_execution (line 48) | pub fn with_parallel_execution(mut self, parallel_execution: bool) -> ... method build (line 54) | pub fn build(self) -> Result { method build_ (line 58) | fn build_(self) -> ort::Result { FILE: rust/lib/src/config.rs type ModelConfig (line 20) | pub(crate) struct ModelConfig { method features_size (line 36) | pub(crate) fn features_size(&self) -> usize { method split_features (line 40) | pub(crate) fn split_features<'a>(&self, features: &'a mut [i32]) -> Sp... type SplitFeatures (line 30) | pub(crate) struct SplitFeatures<'a> { FILE: rust/lib/src/content.rs constant MODEL_NAME (line 21) | pub const MODEL_NAME: &str = "standard_v3_3"; constant MODEL_MAJOR_VERSION (line 24) | pub const MODEL_MAJOR_VERSION: u32 = 3; type ContentType (line 2000) | pub enum ContentType { constant SIZE (line 2438) | pub(crate) const SIZE: usize = 217; method info (line 2441) | pub fn info(self) -> &'static TypeInfo { FILE: rust/lib/src/error.rs type Result (line 16) | pub type Result = core::result::Result; type Error (line 20) | pub enum Error { FILE: rust/lib/src/file.rs type FileType (line 25) | pub enum FileType { method content_type (line 67) | pub fn content_type(&self) -> Option { method info (line 77) | pub fn info(&self) -> &'static TypeInfo { method score (line 89) | pub fn score(&self) -> f32 { method convert (line 132) | pub(crate) fn convert(tensor: ArrayViewD) -> Vec { type InferredType (line 41) | pub struct InferredType { method content_type (line 101) | pub fn content_type(&self) -> ContentType { type OverwriteReason (line 57) | pub enum OverwriteReason { type TypeInfo (line 111) | pub struct TypeInfo { FILE: rust/lib/src/future.rs function exec (line 28) | pub(crate) fn exec(mut future: impl Future) -> T { type Env (line 38) | pub(crate) trait Env { method symlink_metadata (line 40) | async fn symlink_metadata(path: &Path) -> Result; method open (line 41) | async fn open(path: &Path) -> Result; method ort_session_run (line 42) | async fn ort_session_run( type File (line 49) | type File = std::fs::File; method symlink_metadata (line 51) | async fn symlink_metadata(path: &Path) -> Result { method open (line 55) | async fn open(path: &Path) -> Result { method ort_session_run (line 59) | async fn ort_session_run( type File (line 68) | type File = tokio::fs::File; method symlink_metadata (line 70) | async fn symlink_metadata(path: &Path) -> Result { method open (line 74) | async fn open(path: &Path) -> Result { method ort_session_run (line 78) | async fn ort_session_run( type SyncEnv (line 47) | pub(crate) enum SyncEnv {} type AsyncEnv (line 66) | pub(crate) enum AsyncEnv {} function panic_waker (line 94) | fn panic_waker() -> Waker { FILE: rust/lib/src/input.rs type Features (line 25) | pub struct Features(pub(crate) Vec); type SyncInput (line 28) | pub trait SyncInput { method length (line 30) | fn length(&self) -> Result; method read_at (line 33) | fn read_at(&mut self, buffer: &mut [u8], offset: u64) -> Result<()>; method length (line 51) | fn length(&self) -> Result { method read_at (line 55) | fn read_at(&mut self, buffer: &mut [u8], offset: u64) -> Result<()> { method length (line 63) | fn length(&self) -> Result { method read_at (line 67) | fn read_at(&mut self, buffer: &mut [u8], offset: u64) -> Result<()> { method length (line 74) | fn length(&self) -> Result { method read_at (line 78) | fn read_at(&mut self, buffer: &mut [u8], offset: u64) -> Result<()> { type AsyncInput (line 37) | pub trait AsyncInput { method length (line 39) | fn length(&self) -> impl Future>; method read_at (line 42) | fn read_at(&mut self, buffer: &mut [u8], offset: u64) -> impl Future impl Future> { method read_at (line 88) | fn read_at(&mut self, buffer: &mut [u8], offset: u64) -> impl Future Result { method read_at (line 98) | async fn read_at(&mut self, buffer: &mut [u8], offset: u64) -> Result<... constant _ (line 45) | const _: () = const { type FeaturesOrRuled (line 106) | pub enum FeaturesOrRuled { method extract_sync (line 118) | pub fn extract_sync(file: impl SyncInput) -> Result { method extract_async (line 125) | pub async fn extract_async(file: impl AsyncInput) -> Result { method extract (line 129) | pub(crate) async fn extract(file: impl AsyncInput) -> Result { function extract_features_async (line 148) | async fn extract_features_async( function copy_features (line 167) | fn copy_features(dst: &mut [i32], src: &[u8], align: usize) { function strip_prefix (line 177) | fn strip_prefix(xs: &[u8]) -> &[u8] { function strip_suffix (line 181) | fn strip_suffix(xs: &[u8]) -> &[u8] { function strip (line 185) | fn strip(mut xs: &[u8], mut split: impl FnMut(&[u8]) -> Option<(&u8, &[u... function is_whitespace (line 195) | fn is_whitespace(x: u8) -> bool { function features_extraction_reference (line 211) | fn features_extraction_reference() { FILE: rust/lib/src/lib.rs type Prediction (line 81) | struct Prediction { function assert_float (line 88) | fn assert_float(actual: f32, expected: f32, debug: &str) { function assert_prediction (line 95) | fn assert_prediction(actual: FileType, expected: Prediction, debug: &str) { function identify_by_path_reference (line 119) | fn identify_by_path_reference() { function identify_by_content_reference (line 146) | fn identify_by_content_reference() { FILE: rust/lib/src/model.rs constant CONFIG (line 23) | pub(crate) const CONFIG: ModelConfig = ModelConfig { constant THRESHOLDS (line 34) | const THRESHOLDS: [f32; ContentType::SIZE] = [0.5, 0.5, 0.5, 0.5, 0.5, 0... constant OVERWRITE_MAP (line 35) | const OVERWRITE_MAP: [ContentType; ContentType::SIZE] = [ type Label (line 258) | pub(crate) enum Label { method content_type (line 477) | pub(crate) fn content_type(self) -> ContentType { constant NUM_LABELS (line 475) | pub(crate) const NUM_LABELS: usize = 214; FILE: rust/lib/src/session.rs type Session (line 24) | pub struct Session { method new (line 30) | pub fn new() -> Result { method builder (line 35) | pub fn builder() -> Builder { method identify_file_sync (line 40) | pub fn identify_file_sync(&mut self, file: impl AsRef) -> Result... method identify_file_async (line 45) | pub async fn identify_file_async(&mut self, file: impl AsRef) ->... method identify_file (line 49) | async fn identify_file(&mut self, file: &Path) -> Result Resul... method identify_content_async (line 67) | pub async fn identify_content_async(&mut self, file: impl AsyncInput) ... method identify_content (line 71) | async fn identify_content(&mut self, file: impl AsyncInput) ->... method identify_features_sync (line 79) | pub fn identify_features_sync(&mut self, features: &Features) -> Resul... method identify_features_async (line 84) | pub async fn identify_features_async(&mut self, features: &Features) -... method identify_features (line 88) | async fn identify_features(&mut self, features: &Features) -> ... method identify_features_batch_sync (line 95) | pub fn identify_features_batch_sync(&mut self, features: &[Features]) ... method identify_features_batch_async (line 100) | pub async fn identify_features_batch_async( method identify_features_batch (line 106) | async fn identify_features_batch( FILE: tests_data/basic/c/code.c function main (line 3) | int main() { FILE: tests_data/basic/javascript/code.js function q (line 6) | function q(){for(var a=r,b={},c=0;c=100*R(a,Ka))throw"abor... function Ma (line 38) | function Ma(a){if(G(P(a,Na)))throw"abort";} function Oa (line 38) | function Oa(){var a=M.location.protocol;if("http:"!=a&&"https:"!=a)throw... function pf (line 39) | function pf(a){var b=!1,c=!1;if(vd.get(89)){c=!0;var d=a.get(kb),e=M.loc... function Pa (line 40) | function Pa(a){try{O.navigator.sendBeacon?J(42):O.XMLHttpRequest&&"withC... function Sa (line 41) | function Sa(a){var b=P(a,fa);!b&&a.get(Vd)&&(b="beacon");var c=P(a,gd),d... function Hc (line 42) | function Hc(a){qc().expId&&a.set(Nc,qc().expId);qc().expVar&&a.set(Oc,qc... function cd (line 43) | function cd(){if(O.navigator&&"preview"==O.navigator.loadPurpose)throw"a... function yd (line 43) | function yd(a){var b=O.gaDevIds||[];if(ka(b)){var c=a.get("&did");qa(c)&... function vb (line 43) | function vb(a){if(!a.get(Na))throw"abort";} function Pe (line 44) | function Pe(a){try{if(!a.get(Qe)&&(a.set(Qe,!0),!a.get(">m"))){var b=v... function lf (line 45) | function lf(a){if(null==a||0===a.length)return!1;a=Number(a);var b=Date.... function Ta (line 45) | function Ta(a){var b=R(a,Ua);500<=b&&J(15);var c=P(a,Va);if("transaction... function hf (line 48) | function hf(a,b){var c=gf[a];c&&J(c);"displayFeaturesTask"===a&&void 0==... function mf (line 48) | function mf(a,b){if(a)if("object"===typeof a)for(var c in a)a.hasOwnProp... function $a (line 48) | function $a(a){var b=ue.get(a);if(!b)for(var c=0;c None: function is_prime (line 7) | def is_prime(n: int) -> bool: FILE: tests_data/basic/ruby/code.rb class Kalimat (line 1) | class Kalimat method initialize (line 2) | def initialize(nama = "Dunia") method sapaan (line 5) | def sapaan method perpisahan (line 8) | def perpisahan FILE: tests_data/basic/rust/asm.rs function main (line 3) | fn main() { FILE: tests_data/basic/rust/code.rs function main (line 1) | fn main() { FILE: tests_data/basic/rust/test_case1.rs function load_model (line 2) | fn load_model() { function main (line 9) | fn main() { FILE: tests_data/basic/rust/test_case2.rs function create_csv (line 5) | fn create_csv() -> std::io::Result<()> { function create_json (line 15) | fn create_json() -> std::io::Result<()> { function main (line 22) | fn main() -> std::io::Result<()> { FILE: tests_data/basic/typescript/code.ts type Person (line 2) | interface Person { function greet (line 7) | function greet(person: Person): string { FILE: website-ng/src/lib/components/ui/file-drop-zone/index.ts constant BYTE (line 19) | const BYTE = 1; constant KILOBYTE (line 20) | const KILOBYTE = 1024; constant MEGABYTE (line 21) | const MEGABYTE = 1024 * KILOBYTE; constant GIGABYTE (line 22) | const GIGABYTE = 1024 * MEGABYTE; constant ACCEPT_IMAGE (line 25) | const ACCEPT_IMAGE = "image/*"; constant ACCEPT_VIDEO (line 26) | const ACCEPT_VIDEO = "video/*"; constant ACCEPT_AUDIO (line 27) | const ACCEPT_AUDIO = "audio/*"; FILE: website-ng/src/lib/components/ui/file-drop-zone/types.ts type FileRejectedReason (line 8) | type FileRejectedReason = type FileDropZonePropsWithoutHTML (line 13) | type FileDropZonePropsWithoutHTML = WithChildren<{ type FileDropZoneProps (line 50) | type FileDropZoneProps = FileDropZonePropsWithoutHTML & FILE: website-ng/src/lib/utils.ts function cn (line 4) | function cn(...inputs: ClassValue[]) { type WithoutChild (line 9) | type WithoutChild = T extends { child?: any } ? Omit : T; type WithoutChildren (line 11) | type WithoutChildren = T extends { children?: any } ? Omit = WithoutChildren>; type WithElementRef (line 13) | type WithElementRef = T & { ref?... FILE: website-ng/src/lib/utils/utils.ts function cn (line 8) | function cn(...inputs: ClassValue[]) { type WithoutChild (line 13) | type WithoutChild = T extends { child?: any } ? Omit : T; type WithoutChildren (line 15) | type WithoutChildren = T extends { children?: any } type WithoutChildrenOrChild (line 18) | type WithoutChildrenOrChild = WithoutChildren>; type WithElementRef (line 19) | type WithElementRef = T & { FILE: website-ng/src/pages/install.ps1.ts function GET (line 5) | async function GET({ redirect }: APIContext) { FILE: website-ng/src/pages/install.sh.ts function GET (line 5) | async function GET({ redirect }: APIContext) { FILE: website/vite.config.js method configureServer (line 14) | configureServer(server) {