Text Classification
sentence-transformers
Joblib
Scikit-learn
safety
malware
code
multilingual
red-team
Instructions to use NecroMOnk/malicious-coding-intent-v6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use NecroMOnk/malicious-coding-intent-v6 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("NecroMOnk/malicious-coding-intent-v6") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Scikit-learn
How to use NecroMOnk/malicious-coding-intent-v6 with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("NecroMOnk/malicious-coding-intent-v6", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
| { | |
| "model_dir": "models\\v6_code_aware_50k_oss_clean_benign_code", | |
| "holdout": "data\\external\\hf_benign_code_codeparrot_clean_project_10k.jsonl", | |
| "overall": { | |
| "n": 10000, | |
| "threshold": 0.5, | |
| "false_positive_rate": 0.0713, | |
| "flagged": 713, | |
| "score_mean": 0.095502, | |
| "score_p50": 0.007208, | |
| "score_p90": 0.331408, | |
| "score_p95": 0.657149, | |
| "score_p99": 0.9478, | |
| "score_max": 0.998492 | |
| }, | |
| "by_source": { | |
| "hf_benign_code:codeparrot/codeparrot-clean-train:default:train": { | |
| "n": 10000, | |
| "threshold": 0.5, | |
| "false_positive_rate": 0.0713, | |
| "flagged": 713, | |
| "score_mean": 0.095502, | |
| "score_p50": 0.007208, | |
| "score_p90": 0.331408, | |
| "score_p95": 0.657149, | |
| "score_p99": 0.9478, | |
| "score_max": 0.998492 | |
| } | |
| }, | |
| "flagged_examples": [ | |
| { | |
| "score": 0.6146, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "video/hud.py", | |
| "preview": "append( self.ladder_helper(q0, 0, 2.0) ) pts.append( self.ladder_helper(q0, 0.0, -2.0) ) pts.append( self.ladder_helper(q0, 1.5, -2.0) ) pts.append( self.ladder_helper(q0, 1.5, -1.0) ) pts.append( center ) pts.append( self.ladder_helper(q0," | |
| }, | |
| { | |
| "score": 0.988829, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "crwls.py", | |
| "preview": "* 1000) crtwls.log( \"Fazendo undeploy da Aplicacao '%s'\" % self.name) progress = wlst.undeploy(self.name, block='true') wlst.activate() crtwls.edit(10 * 60 * 1000, 5 * 60 * 1000) crtwls.log(\"Fazendo deploy da Aplicacao '%s'\" % self.name) pr" | |
| }, | |
| { | |
| "score": 0.995816, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "crwls.py", | |
| "preview": "ParallelConnectDelay(5) auth.setResultsTimeLimit(1000) auth.setAllUsersFilter('objectClass=user') auth.setPropagateCauseForLoginException(False) auth.setHost( 'sptbrdc04.petrobras.biz sptbrdc14.petrobras.biz sptbrdc08.petrobras.biz sptbrdc0" | |
| }, | |
| { | |
| "score": 0.975665, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "crwls.py", | |
| "preview": "r) authenticator = classmethod(authenticator) def configure(cls): crtwls.connectToAdminServer() crtwls.edit() domainName = wlst.cmo.getName() crtwls.log(\"Configurando o Domain Log\") wlst.cmo.getLog().setFileMinSize(40000) wlst.cmo.getLog()." | |
| }, | |
| { | |
| "score": 0.504215, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "crwls.py", | |
| "preview": "port) nmgr.getNodeManager().setDebugEnabled(True) crtwls.save() createMachine = classmethod(createMachine) def mailSession(cls): crtwls.connectToAdminServer() crtwls.edit() crtwls.log(\"Buscando o MailSession\") mailsession = wlst.cmo.lookupM" | |
| }, | |
| { | |
| "score": 0.846977, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "crwls.py", | |
| "preview": "envSuffix = argv(4) adminAddress = argv(5) Domain.create(domainName, envSuffix, adminAddress) elif subcmd == 'configure': Domain.configure() elif subcmd == 'configure-authenticator': Domain.authenticator() elif subcmd == 'list-datasource': " | |
| }, | |
| { | |
| "score": 0.914316, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "kbe/src/lib/python/Lib/encodings/cp863.py", | |
| "preview": "00ac, # NOT SIGN 0x00ab: 0x00bd, # VULGAR FRACTION ONE HALF 0x00ac: 0x00bc, # VULGAR FRACTION ONE QUARTER 0x00ad: 0x00be, # VULGAR FRACTION THREE QUARTERS 0x00ae: 0x00ab, # LEFT-POINTING DOUBLE ANGLE QUOTATION MARK 0x00af: 0x00bb, # RIGHT-P" | |
| }, | |
| { | |
| "score": 0.824451, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "kbe/src/lib/python/Lib/encodings/cp863.py", | |
| "preview": "E 0x00c8: 0x255a, # BOX DRAWINGS DOUBLE UP AND RIGHT 0x00c9: 0x2554, # BOX DRAWINGS DOUBLE DOWN AND RIGHT 0x00ca: 0x2569, # BOX DRAWINGS DOUBLE UP AND HORIZONTAL 0x00cb: 0x2566, # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL 0x00cc: 0x2560, # BO" | |
| }, | |
| { | |
| "score": 0.992852, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "kbe/src/lib/python/Lib/encodings/cp863.py", | |
| "preview": "-> CARRIAGE RETURN '\\x0e' # 0x000e -> SHIFT OUT '\\x0f' # 0x000f -> SHIFT IN '\\x10' # 0x0010 -> DATA LINK ESCAPE '\\x11' # 0x0011 -> DEVICE CONTROL ONE '\\x12' # 0x0012 -> DEVICE CONTROL TWO '\\x13' # 0x0013 -> DEVICE CONTROL THREE '\\x14' # 0x0" | |
| }, | |
| { | |
| "score": 0.734134, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "kbe/src/lib/python/Lib/encodings/cp863.py", | |
| "preview": "x005e -> CIRCUMFLEX ACCENT '_' # 0x005f -> LOW LINE '`' # 0x0060 -> GRAVE ACCENT 'a' # 0x0061 -> LATIN SMALL LETTER A 'b' # 0x0062 -> LATIN SMALL LETTER B 'c' # 0x0063 -> LATIN SMALL LETTER C 'd' # 0x0064 -> LATIN SMALL LETTER D 'e' # 0x006" | |
| }, | |
| { | |
| "score": 0.689507, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "kbe/src/lib/python/Lib/encodings/cp863.py", | |
| "preview": "ART OF TEXT 0x0003: 0x0003, # END OF TEXT 0x0004: 0x0004, # END OF TRANSMISSION 0x0005: 0x0005, # ENQUIRY 0x0006: 0x0006, # ACKNOWLEDGE 0x0007: 0x0007, # BELL 0x0008: 0x0008, # BACKSPACE 0x0009: 0x0009, # HORIZONTAL TABULATION 0x000a: 0x000" | |
| }, | |
| { | |
| "score": 0.97725, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "kbe/src/lib/python/Lib/encodings/cp863.py", | |
| "preview": "STOP 0x002f: 0x002f, # SOLIDUS 0x0030: 0x0030, # DIGIT ZERO 0x0031: 0x0031, # DIGIT ONE 0x0032: 0x0032, # DIGIT TWO 0x0033: 0x0033, # DIGIT THREE 0x0034: 0x0034, # DIGIT FOUR 0x0035: 0x0035, # DIGIT FIVE 0x0036: 0x0036, # DIGIT SIX 0x0037: " | |
| }, | |
| { | |
| "score": 0.957955, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "kbe/src/lib/python/Lib/encodings/cp863.py", | |
| "preview": "0x0057: 0x0057, # LATIN CAPITAL LETTER W 0x0058: 0x0058, # LATIN CAPITAL LETTER X 0x0059: 0x0059, # LATIN CAPITAL LETTER Y 0x005a: 0x005a, # LATIN CAPITAL LETTER Z 0x005b: 0x005b, # LEFT SQUARE BRACKET 0x005c: 0x005c, # REVERSE SOLIDUS 0x00" | |
| }, | |
| { | |
| "score": 0.976132, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "kbe/src/lib/python/Lib/encodings/cp863.py", | |
| "preview": "7d: 0x007d, # RIGHT CURLY BRACKET 0x007e: 0x007e, # TILDE 0x007f: 0x007f, # DELETE 0x00a0: 0x00ff, # NO-BREAK SPACE 0x00a2: 0x009b, # CENT SIGN 0x00a3: 0x009c, # POUND SIGN 0x00a4: 0x0098, # CURRENCY SIGN 0x00a6: 0x00a0, # BROKEN BAR 0x00a7" | |
| }, | |
| { | |
| "score": 0.652318, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "kbe/src/lib/python/Lib/encodings/cp863.py", | |
| "preview": "S DOUBLE DOWN AND LEFT 0x2558: 0x00d4, # BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE 0x2559: 0x00d3, # BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE 0x255a: 0x00c8, # BOX DRAWINGS DOUBLE UP AND RIGHT 0x255b: 0x00be, # BOX DRAWINGS UP SINGLE AND LEFT " | |
| }, | |
| { | |
| "score": 0.759528, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "lib/youtube_dl/extractor/baidu (VJ Washington's conflicted copy 2017-08-29).py", | |
| "preview": "# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import unescapeHTML class BaiduVideoIE(InfoExtractor): IE_DESC = '百度视频' _VALID_URL = r'https?://v\\.baidu\\.com/(?P<type>[a-z]+)/" | |
| }, | |
| { | |
| "score": 0.796715, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "addons/account/wizard/account_move_line_reconcile_select.py", | |
| "preview": "# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: y" | |
| }, | |
| { | |
| "score": 0.846741, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "engine/SCons/compat/__init__.py", | |
| "preview": "# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (" | |
| }, | |
| { | |
| "score": 0.56719, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "test/IECore/Shader.py", | |
| "preview": "########################################################################## # # Copyright (c) 2007-2011, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are" | |
| }, | |
| { | |
| "score": 0.818233, | |
| "source": "hf_benign_code:codeparrot/codeparrot-clean-train:default:train", | |
| "path": "allauth/socialaccount/providers/orcid/provider.py", | |
| "preview": "from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class Scope(object): USERINFO_PROFILE = \"/authenticate\" class OrcidAccount(ProviderAccount): def get" | |
| } | |
| ] | |
| } |