Sentence Similarity
sentence-transformers
Safetensors
roberta
feature-extraction
dense
Generated from Trainer
dataset_size:3081
loss:BatchAllTripletLoss
text-embeddings-inference
Instructions to use buelfhood/SOCO-C-GraphCodeBERT-ST with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use buelfhood/SOCO-C-GraphCodeBERT-ST with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("buelfhood/SOCO-C-GraphCodeBERT-ST") sentences = [ "#include<stdio.h>\n#include<stdlib.h>\n#include<unistd.h>\n#define TRUE 0\n()\n{\nFILE *fp;\nsystem(\"rmdir ./www.cs.rmit.edu.\");\nchar chk[1];\nstrcpy(chk,\"n\");\n while(1)\n {\n \n \tsystem(\"wget -p http://www.cs.rmit.edu./students/\");\n\t\t\n\t\tsystem(\"md5sum ./www.cs.rmit.edu./images/*.* > ./www.cs.rmit.edu./text1.txt\");\n\t\t\n\t\t\n\t\tif (strcmp(chk,\"n\")==0)\t\t\n\t\t{\t\t\n\t\tsystem(\"mv ./www.cs.rmit.edu./text1.txt ./text2.txt\");\n\t\tsystem(\"mkdir ./\");\n\t\t\n\t\tsystem(\"mv ./www.cs.rmit.edu./students/index.html ./\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\n\t\t\n\t\tsystem(\" diff ./www.cs.rmit.edu./students/index.html .//index.html | mail @cs.rmit.edu. \");\n\t\tsystem(\" diff ./www.cs.rmit.edu./text1.txt ./text2.txt | mail @cs.rmit.edu. \");\n\t\tsystem(\"mv ./www.cs.rmit.edu./students/index.html ./\");\n\t\tsystem(\"mv ./www.cs.rmit.edu./text1.txt ./text2.txt\");\t\t\t\t\n\t\t}\n\t\tsleep(86400);\n\t\tstrcpy(chk,\"y\");\n\t\t\n\t}\n}\t\t \t \n \n \n", "#include <stdio.h>\n#include <stdlib.h>\n#include <sys/time.h>\n#include <strings.h>\n#include <ctype.h>\n\nint ()\n{\n FILE *fp; \n char *chk,[4];\n int i=1;\n while (i == 1) \n {\n \n system(\"wget -p --convert-links http://www.cs.rmit.edu./students/\");\n\n system(\"mkdir first\"); \n system(\"mkdir second\"); \n\n \n system(\"mv www.cs.rmit.edu./images/*.* first/\");\n system(\"mv www.cs.rmit.edu./students/*.* first/\");\n\n sleep(86400); \n\n \n system(\"wget -p --convert-links http://www.cs.rmit.edu./students/\");\n\n \n system(\"mv www.cs.rmit.edu./images/*.* second/\");\n system(\"mv www.cs.rmit.edu./students/*.* second/\");\n\n \n \n system(\"diff first second > imagesdifference.txt\");\n\n \n fp = fopen(\"imagesdifference.txt\",\"r\");\n \n chk = fgets(, 4, fp);\n \n if (strlen() != 0)\n system(\"mailx -s \\\"Difference from WatchDog\\\" < imagesdifference.txt\");\n }\n return 0;\n}\n", "\n\n#include<stdio.h>\n#include<stdlib.h>\n#include <sys/types.h>\n#include <unistd.h>\n#include <sys/time.h>\n#include<string.h>\nint ()\n{\nchar a[100];\nint count=0;\nchar ch;\nchar line[100];\nchar filename[50];\nchar *token;\nconst char delimiter[]=\" \\n.,;:!-\";\nFILE *fp;\nint total_time,start_time,end_time;\nstart_time = time();\nstrcpy(filename,\"/usr/share/lib/dict/words\");\nif((fp=fopen(filename,\"r\"))==NULL){\nprintf(\"cannot open file\\n\");\nexit(1);\n}\nwhile((fgets(line,sizeof(line),fp))!=NULL)\n{\n token=strtok(line,delimiter); \n while(token!=NULL)\n {\n count++;\n\t printf(\"ATTEMPT : %d\\n\",count);\nstrcpy(a,\"wget http://sec-crack.cs.rmit.edu./SEC/2/index.php --http-user= --http-passwd=\");\n strcat(a,token); \n printf(\"The request %s\\n\",a); \n if(system(a)==0)\n\t\t{\n\t\tprintf(\"Congratulations!!!Password obtained using DICTIONARY ATTACK\\n\");\n\t\tprintf(\"************************************************************\\n\");\n\t\tprintf(\"Your password is %s\\n\",token);\n\t\tprintf(\"The Request sent is %s \\n\",a);\n end_time = time();\n total_time = (end_time -start_time);\n total_time /= 1000000000.0;\n printf(\"The Time Taken is : %llds\\n\",total_time);\n\t\texit(1);\n\t\t}\n\n \n token=strtok(NULL,delimiter);\n \n }\n}\n\n\nfclose(fp);\nreturn 0;\n}\n", "\n\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <sys/time.h>\n#include <strings.h>\n#include <ctype.h>\n\nint ()\n{\n char word[15], *chk;\n system(\"wget -p --convert-links http://www.cs.rmit.edu./students/\");\n system(\"mkdir one\");\n system(\"mv www.cs.rmit.edu./images/*.* one/\");\n system(\"mv www.cs.rmit.edu./students/*.* one/\");\n sleep(15);\n system(\"wget -p --convert-links http://www.cs.rmit.edu./students/\");\n system(\"mkdir two\");\n system(\"mv www.cs.rmit.edu./images/*.* two/\");\n system(\"mv www.cs.rmit.edu./students/*.* two/\");\n system(\"diff one two > difference.txt\");\n system(\"mailx -s \\\"Message1\\\" < difference.txt\");\n return 0;\n}\n" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Ctrl+K