Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

buelfhood
/
SOCO-C-GraphCodeBERT-ST

Sentence Similarity
sentence-transformers
Safetensors
roberta
feature-extraction
dense
Generated from Trainer
dataset_size:3081
loss:BatchAllTripletLoss
text-embeddings-inference
Model card Files Files and versions
xet
Community

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
SOCO-C-GraphCodeBERT-ST
504 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
buelfhood's picture
buelfhood
Add new SentenceTransformer model
e80d0c2 verified 11 months ago
  • 1_Pooling
    Add new SentenceTransformer model 11 months ago
  • .gitattributes
    1.52 kB
    initial commit 11 months ago
  • README.md
    76.6 kB
    Add new SentenceTransformer model 11 months ago
  • config.json
    689 Bytes
    Add new SentenceTransformer model 11 months ago
  • config_sentence_transformers.json
    283 Bytes
    Add new SentenceTransformer model 11 months ago
  • merges.txt
    456 kB
    Add new SentenceTransformer model 11 months ago
  • model.safetensors
    499 MB
    xet
    Add new SentenceTransformer model 11 months ago
  • modules.json
    229 Bytes
    Add new SentenceTransformer model 11 months ago
  • sentence_bert_config.json
    57 Bytes
    Add new SentenceTransformer model 11 months ago
  • special_tokens_map.json
    957 Bytes
    Add new SentenceTransformer model 11 months ago
  • tokenizer.json
    3.56 MB
    Add new SentenceTransformer model 11 months ago
  • tokenizer_config.json
    1.25 kB
    Add new SentenceTransformer model 11 months ago
  • vocab.json
    798 kB
    Add new SentenceTransformer model 11 months ago