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
File size: 9,666 Bytes
b6ac206 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | {
"model_dir": "models\\v6_code_aware_50k_oss_clean_benign_code",
"holdout": "data\\clf\\v6_code_aware_50k_oss_clean_benign_code\\test_benign_code.jsonl",
"overall": {
"n": 4000,
"threshold": 0.5,
"false_positive_rate": 0.0112,
"flagged": 45,
"score_mean": 0.021763,
"score_p50": 0.000615,
"score_p90": 0.029012,
"score_p95": 0.087068,
"score_p99": 0.528293,
"score_max": 0.994358
},
"by_source": {
"local_project_code": {
"n": 69,
"threshold": 0.5,
"false_positive_rate": 0.0145,
"flagged": 1,
"score_mean": 0.025583,
"score_p50": 0.002739,
"score_p90": 0.032642,
"score_p95": 0.058193,
"score_p99": 0.459886,
"score_max": 0.955582
},
"local_repo_hs": {
"n": 5,
"threshold": 0.5,
"false_positive_rate": 0.4,
"flagged": 2,
"score_mean": 0.362695,
"score_p50": 0.463005,
"score_p90": 0.664624,
"score_p95": 0.714744,
"score_p99": 0.75484,
"score_max": 0.764864
},
"local_repo_isre": {
"n": 82,
"threshold": 0.5,
"false_positive_rate": 0.0,
"flagged": 0,
"score_mean": 0.013356,
"score_p50": 0.000632,
"score_p90": 0.049498,
"score_p95": 0.083969,
"score_p99": 0.150854,
"score_max": 0.175909
},
"local_repo_job_application_pipeline": {
"n": 224,
"threshold": 0.5,
"false_positive_rate": 0.0,
"flagged": 0,
"score_mean": 0.014154,
"score_p50": 0.001108,
"score_p90": 0.03532,
"score_p95": 0.110907,
"score_p99": 0.178361,
"score_max": 0.307832
},
"local_repo_olympiad_math": {
"n": 36,
"threshold": 0.5,
"false_positive_rate": 0.0,
"flagged": 0,
"score_mean": 0.010981,
"score_p50": 0.001557,
"score_p90": 0.01338,
"score_p95": 0.06752,
"score_p99": 0.139294,
"score_max": 0.164571
},
"local_repo_vesuvius": {
"n": 360,
"threshold": 0.5,
"false_positive_rate": 0.075,
"flagged": 27,
"score_mean": 0.118965,
"score_p50": 0.019934,
"score_p90": 0.431837,
"score_p95": 0.631086,
"score_p99": 0.937073,
"score_max": 0.994358
},
"python_stdlib": {
"n": 3224,
"threshold": 0.5,
"false_positive_rate": 0.0047,
"flagged": 15,
"score_mean": 0.011161,
"score_p50": 0.000412,
"score_p90": 0.015134,
"score_p95": 0.035724,
"score_p99": 0.217896,
"score_max": 0.97892
}
},
"flagged_examples": [
{
"score": 0.557154,
"source": "local_repo_vesuvius",
"path": null,
"preview": "b.createAttrBuffer([-1,-1,0,1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,1,0],3)};c.RenderEngine.prototype.destroy=function(){this.ctx&&(this.volume.destroy(),this.volume=null,this.auxVolume.destroy(),this.auxVolume=null,this.volMask.destroy(),this.volMas"
},
{
"score": 0.683458,
"source": "local_repo_vesuvius",
"path": null,
"preview": "evel,this.multiInteractor.wlEnabled=h.winlevel,this.multiInteractor.panEnabled=this.multiInteractor.zoomEnabled=this.multiInteractor.rotEnabled=h.pose)};c.MprViewer.prototype.clearDisplay=function(){this.canvas.getContext(\"2d\").clearRect(0,"
},
{
"score": 0.795035,
"source": "local_repo_vesuvius",
"path": null,
"preview": "ed(__ARMEB__) || \\ defined(__THUMBEB__) || \\ defined(__AARCH64EB__) || \\ defined(_MIBSEB) || defined(__MIBSEB) || defined(__MIBSEB__) const bool big_endian = true; #else const bool big_endian = false; #endif const char magic_string[] = \"\\x9"
},
{
"score": 0.913212,
"source": "python_stdlib",
"path": null,
"preview": "'iso_ir_127' : 'iso8859_6', # iso8859_7 codec 'csisolatingreek' : 'iso8859_7', 'ecma_118' : 'iso8859_7', 'elot_928' : 'iso8859_7', 'greek' : 'iso8859_7', 'greek8' : 'iso8859_7', 'iso_8859_7' : 'iso8859_7', 'iso_8859_7_1987' : 'iso8859_7', '"
},
{
"score": 0.528228,
"source": "local_repo_vesuvius",
"path": null,
"preview": "var db = this.db; this._cfg.storesSource = this._cfg.storesSource ? extend(this._cfg.storesSource, stores) : stores; var versions = db._versions; var storesSpec = {}; var dbschema = {}; versions.forEach(function (version) { extend(storesSpe"
},
{
"score": 0.542192,
"source": "python_stdlib",
"path": null,
"preview": "class Purpose(_ASN1Object, _Enum): \"\"\"SSLContext purpose flags with X509v3 Extended Key Usage objects \"\"\" SERVER_AUTH = '1.3.6.1.5.5.7.3.1' CLIENT_AUTH = '1.3.6.1.5.5.7.3.2'"
},
{
"score": 0.97892,
"source": "python_stdlib",
"path": null,
"preview": ": 'iso8859_14', 'iso_ir_199' : 'iso8859_14', 'l8' : 'iso8859_14', 'latin8' : 'iso8859_14', # iso8859_15 codec 'iso_8859_15' : 'iso8859_15', 'l9' : 'iso8859_15', 'latin9' : 'iso8859_15', # iso8859_16 codec 'iso_8859_16' : 'iso8859_16', 'iso_"
},
{
"score": 0.534763,
"source": "local_repo_vesuvius",
"path": null,
"preview": "index_t idx = 0; for (size_t i = dim; i-- > 0;) { idx += pixelCoordinates[i] * pixelCoordFactor[i]; } return idx; } value_t CubicalGridComplex::getValue(const vector<index_t> &pixelCoordinates) const { return image[getIndex(pixelCoordinates"
},
{
"score": 0.955582,
"source": "local_project_code",
"path": null,
"preview": "def download_vxunderground( spec: dict, builder: PoolBuilder, chunk_cfg: dict, insecure: bool ) -> None: repo = spec[\"repo\"] cache = ROOT / spec.get(\"cache_dir\", \"data/external/vxunderground\") cache.mkdir(parents=True, exist_ok=True) for su"
},
{
"score": 0.651096,
"source": "local_repo_vesuvius",
"path": null,
"preview": "bs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= EPSILON * Math.max(1.0, Math.a"
},
{
"score": 0.910128,
"source": "python_stdlib",
"path": null,
"preview": "' : 'cp037', # cp1026 codec '1026' : 'cp1026', 'csibm1026' : 'cp1026', 'ibm1026' : 'cp1026', # cp1125 codec '1125' : 'cp1125', 'ibm1125' : 'cp1125', 'cp866u' : 'cp1125', 'ruscii' : 'cp1125', # cp1140 codec '1140' : 'cp1140', 'ibm1140' : 'cp"
},
{
"score": 0.635939,
"source": "python_stdlib",
"path": null,
"preview": "async def __aexit__( self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType], ) -> Optional[bool]: assert self._state in (_State.ENTERED, _State.EXPIRING) if self._timeout_handler is "
},
{
"score": 0.544642,
"source": "local_repo_vesuvius",
"path": null,
"preview": "ysPromise_1.then(function (_a) { var resultingKeys = _a.result; pkRangeSet_1.addKeys(resultingKeys); return res; }); } var pKeys = req.values ? res.result.map(extractKey) : res.result; if (req.values) { pkRangeSet_1.addKeys(pKeys); } else {"
},
{
"score": 0.57395,
"source": "python_stdlib",
"path": null,
"preview": "class STARTUPINFO: def __init__(self, *, dwFlags=0, hStdInput=None, hStdOutput=None, hStdError=None, wShowWindow=0, lpAttributeList=None): self.dwFlags = dwFlags self.hStdInput = hStdInput self.hStdOutput = hStdOutput self.hStdError = hStdE"
},
{
"score": 0.926499,
"source": "local_repo_vesuvius",
"path": null,
"preview": "w Uint16Array(k[h]),n=0;n<b;n++){var l=n*e;m[l]=m[l+e-1]=0}for(n=0;n<e;n++)m[n]=m[d+n]=0}e=[];e.push(0<g?new Uint8Array(k[0]):null);e.push(1<g?new Uint8Array(k[1]):null);b=0;d=2*f;for(h=0;h<d;h+=2)for(f=0;2>f;f++)e[f]?(this.rgbaBuf[b++]=a.b"
},
{
"score": 0.987301,
"source": "local_repo_vesuvius",
"path": null,
"preview": "<< 2) & 0x3fc) | (getBufferDataRW6(10) >> 6); bytes[9] = ((getBufferDataRW6(10) << 4) | (getBufferDataRW6(11) >> 4)) & 0x3ff; bytes[10] = (getBufferDataRW6(11) >> 2) & 0x3; bytes[11] = ((getBufferDataRW6(11) & 0x3) << 8) | getBufferDataRW6("
},
{
"score": 0.542918,
"source": "local_repo_vesuvius",
"path": null,
"preview": "X=V+1,k=X%2,j=0,I=0,a=0,l,R,w=e[Q],S=e[Q-1],H=e[Q-2][X],g=S[X-1],Y=S[X],P=S[X+1],A=w[X-1],v=w[X+1],y=Math.abs,d,C,n,h; if(k){d=y(P-Y);C=y(H-Y);n=y(g-Y)}if(k){h=d>n&&C<d?H+g:d<n&&C<n?H+P:P+g;h=h+2*Y>>>2;if(o){w[X]=h;return}l=Z.t*Z.c[t.g+Y-H]"
},
{
"score": 0.914576,
"source": "python_stdlib",
"path": null,
"preview": "def DllGetClassObject(rclsid, riid, ppv): try: ccom = __import__(\"comtypes.server.inprocserver\", globals(), locals(), ['*']) except ImportError: return -2147221231 # CLASS_E_CLASSNOTAVAILABLE else: return ccom.DllGetClassObject(rclsid, riid"
},
{
"score": 0.98419,
"source": "local_repo_vesuvius",
"path": null,
"preview": ",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
},
{
"score": 0.887868,
"source": "local_repo_vesuvius",
"path": null,
"preview": "; string unmatched0Filename = \"unmatched_0.csv\"; string unmatched1Filename = \"unmatched_1.csv\"; fileFormat format0; fileFormat format1; bool print = false; bool saveResult = false; for (int i = 1; i < argc; ++i) { const string arg(argv[i]);"
}
]
} |