code
stringlengths
1
1.49M
file_id
stringlengths
42
46
node_count
int64
0
7.38k
total_lines
int64
1
20.9k
vector_dim
int64
15
15
vector_labels
stringclasses
1 value
nodes
stringlengths
2
3.75M
connections
stringlengths
2
964k
from django.db import models from django import forms from sms.students.models import StudentBasicInfo, AcademicYear from sms.students.models import ClassMaster, StudentYearlyInformation from sms.fees.vars import * # Create your models here. class FeeType(models.Model): ClassMaster = models.ForeignKey(ClassMaster...
ajibawa-2023/Python-Code-Large/train/row_78321
44
59
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78321:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0169, 0.0169, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78321:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78321:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78321:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78321:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django import forms from sms.fees.vars import * from sms.fees.models import *
ajibawa-2023/Python-Code-Large/train/row_78322
3
6
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78322:ImportFrom_L1_C0", "label": "from django import forms", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["forms...
[]
''' Module: orderedmapping.py Version: 1.0 Author: Taro Ogawa (tso@users.sourceforge.org) Copyright: Copyright (c) 2003, Taro Ogawa. All Rights Reserved. Licence: This module is distributed under the Lesser General Public Licence. http://www.opensource.org/licenses/lgpl-license.php ''...
ajibawa-2023/Python-Code-Large/train/row_78323
18
34
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78323:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 14], "level": 0, "parent": null, "vector": [8, 0, 0.2206, 0.4118, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78323:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78323:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78323:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78323:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-...
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ ...
ajibawa-2023/Python-Code-Large/train/row_78324
7
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78324:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1522, 0.2609, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78324:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78324:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78324:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78324:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Co...
from reportlab.lib.units import inch from sms.students.models import STANDARD_CHOICES from reportlab.rl_config import defaultPageSize from reportlab.lib.styles import getSampleStyleSheet RECEIPT_CHOICES = ( (1, 'Valid'), (2, 'Cancel'), ) FEE_FILTER_CHOICES = ( (1, 'All'), (2, 'Defaulters') ) FEE_DIVISION_C...
ajibawa-2023/Python-Code-Large/train/row_78325
15
35
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78325:ImportFrom_L1_C0", "label": "from reportlab.lib.units import inch", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0286, 0.0286, 0, 0.66, 0.0, 871, 0, 1, 0, 0, 871, 0, 0], "semantic": {"name": "reportlab.lib.units", "arg_names": []...
[]
''' Module: num2word_EN.py Requires: num2word_EU.py Version: 1.2 Author: Taro Ogawa (tso@users.sourceforge.org) Copyright: Copyright (c) 2003, Taro Ogawa. All Rights Reserved. Licence: This module is distributed under the Lesser General Public Licence. http://www.opensource.org/licens...
ajibawa-2023/Python-Code-Large/train/row_78326
62
137
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78326:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 37], "level": 0, "parent": null, "vector": [8, 0, 0.1387, 0.2701, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78326:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78326:FunctionDef_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78326:FunctionDef_L43_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78326:Assign_L44_C8"}, {"f": "ajibawa-2023/Python-...
# Create your views here. from django.db.models import Q from django.shortcuts import render_to_response, redirect from django.http import HttpResponse from django.template import Context, RequestContext from django.template.loader import get_template from reportlab.pdfgen import canvas from reportlab.platypus import...
ajibawa-2023/Python-Code-Large/train/row_78327
414
561
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78327:ImportFrom_L3_C0", "label": "from django.db.models import Q", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0053, 0.0018, 0, 0.66, 0.0, 680, 0, 1, 0, 0, 680, 0, 0], "semantic": {"name": "django.db.models", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78327:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78327:If_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78327:If_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78327:Return_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
''' Module: num2word_EU.py Requires: num2word_base.py Version: 1.1 Author: Taro Ogawa (tso@users.sourceforge.org) Copyright: Copyright (c) 2003, Taro Ogawa. All Rights Reserved. Licence: This module is distributed under the Lesser General Public Licence. http://www.opensource.org/lice...
ajibawa-2023/Python-Code-Large/train/row_78328
15
44
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78328:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 21], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.4773, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78328:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78328:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78328:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78328:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-...
from django.contrib.auth.models import User from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from sms.fees.models import FeeType, FeeReceipt, ScholarshipOrFee import datetime class feetypeAdmin(admin.ModelAdmin): list_display = ('ClassMaster','Type','Amount') o...
ajibawa-2023/Python-Code-Large/train/row_78330
22
30
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78330:ImportFrom_L1_C0", "label": "from django.contrib.auth.models import User", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0333, 0, 0.66, 0.0, 808, 0, 1, 0, 0, 808, 0, 0], "semantic": {"name": "django.contrib.auth.models", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78330:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78330:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78330:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78330:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
from django.conf.urls.defaults import * #from students import views # The next two lines enable the admin and load each admin.py file: from django.views.generic.simple import direct_to_template from django.contrib import admin from django.views.generic.simple import direct_to_template admin.autodiscover() urlpatterns ...
ajibawa-2023/Python-Code-Large/train/row_78331
6
132
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78331:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0076, 0.0076, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_n...
[]
from django.db import models from django.contrib import admin from django.contrib.auth.models import User CLASS_MASTER_CHOICES = ( ('P', 'Prashala'), ('D', 'Dal'), ) GENDER_CHOICES = ( ('M', 'Male'), ('F', 'Female'), ) STANDARD_CHOICES = ( (5, 'Fifth'), (6, 'Sixth'), (7, 'Seventh'), (...
ajibawa-2023/Python-Code-Large/train/row_78332
334
456
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78332:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0022, 0.0022, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78332:ClassDef_L98_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78332:Assign_L99_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78332:ClassDef_L98_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78332:Assign_L100_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from django import forms from django.forms.extras.widgets import SelectDateWidget from django.forms.models import modelformset_factory from sms.students.vars import * from sms.students.models import * class SearchDetailsForm(forms.Form): Year = forms.CharField(max_length=9) RegistrationNo = forms.IntegerF...
ajibawa-2023/Python-Code-Large/train/row_78333
260
287
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78333:ImportFrom_L1_C0", "label": "from django import forms", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0035, 0.0035, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["forms...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78333:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78333:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78333:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78333:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ ...
ajibawa-2023/Python-Code-Large/train/row_78334
7
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78334:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1522, 0.2609, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78334:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78334:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78334:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78334:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Co...
MONTH_CHOICES = { 1: 'Jan', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'May', 6: 'Jun', 7: 'Jul', 8: 'Aug', 9: 'Sep', 10: 'Oct', 11: 'Nov', 12: 'Dec' } FULLMONTH_CHOICES = { 1: 'January', 2: 'February', 3: 'March', 4: 'April', 5: 'May', 6: 'June', 7: 'J...
ajibawa-2023/Python-Code-Large/train/row_78335
11
114
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78335:Assign_L1_C0", "label": "MONTH_CHOICES =", "type": "assigned_variable", "loc": [1, 14], "level": 0, "parent": null, "vector": [14, 0, 0.0658, 0.1228, 0, 0.66, 0.0, 696, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "MONTH_CHOICES", "arg_names": [], "import_names": []...
[]
from sms.students.models import * from django.contrib.auth.models import User from django.contrib import admin from django.utils.translation import ugettext_lazy as _ class StudentBasicInfoAdmin(admin.ModelAdmin): list_display = ('RegistrationNo', 'DateOfRegistration', 'FirstName', 'LastNa...
ajibawa-2023/Python-Code-Large/train/row_78337
126
471
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78337:ImportFrom_L1_C0", "label": "from sms.students.models import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0021, 0.0021, 0, 0.66, 0.0, 505, 0, 1, 0, 0, 505, 0, 0], "semantic": {"name": "sms.students.models", "arg_names": [], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78337:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78337:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78337:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78337:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
from django.db import models from django import forms # import variables from sms.ams.vars import * # Create your models here. class AcademicYear(models.Model): Id = models.AutoField(primary_key=True) Title = models.CharField(max_length=30) StartDate = models.DateField() EndDate = models.DateField() ...
ajibawa-2023/Python-Code-Large/train/row_78338
138
222
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78338:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0045, 0.0045, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78338:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78338:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78338:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78338:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django import forms from sms.ams.vars import * from sms.ams.models import *
ajibawa-2023/Python-Code-Large/train/row_78339
3
6
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78339:ImportFrom_L1_C0", "label": "from django import forms", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["forms...
[]
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ ...
ajibawa-2023/Python-Code-Large/train/row_78340
7
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78340:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1522, 0.2609, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78340:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78340:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78340:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78340:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Co...
HOLIDAY_RULE='Holiday' DAY_CHOICES = ( (1, 'Monday'), (2, 'Tuesday'), (3, 'Wednesday'), (4, 'Thursday'), (5, 'Friday'), (6, 'Saturday'), (7, 'Sunday'), ) MONTH_CHOICES = ( (1, 'January'), (2, 'February'), (3, 'March'), (4, 'April'), (5, 'May'), (6, 'June'), (7, ...
ajibawa-2023/Python-Code-Large/train/row_78341
9
73
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78341:Assign_L1_C0", "label": "HOLIDAY_RULE =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0137, 0.0137, 0, 0.66, 0.0, 82, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "HOLIDAY_RULE", "arg_names": [], "import_names": [], "r...
[]
# Create your views here. from django.db.models import Q from django.shortcuts import render_to_response from django.http import HttpResponse from django.template import Context from django.template.loader import get_template from django.views.decorators.csrf import csrf_exempt import os import datetime from sms.ams...
ajibawa-2023/Python-Code-Large/train/row_78342
904
1,163
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78342:ImportFrom_L2_C0", "label": "from django.db.models import Q", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0017, 0.0009, 0, 0.66, 0.0, 680, 0, 1, 0, 0, 680, 0, 0], "semantic": {"name": "django.db.models", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78342:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78342:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78342:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78342:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
from django.contrib.auth.models import User from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from sms.ams.models import Category, User, UserStatus, TimeRules, DayRules from sms.ams.models import Attendance, TimeRecords, ForgotCheckout, Leaves from sms.ams.models import LeaveRule...
ajibawa-2023/Python-Code-Large/train/row_78343
141
211
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78343:ImportFrom_L1_C0", "label": "from django.contrib.auth.models import User", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0047, 0.0047, 0, 0.66, 0.0, 808, 0, 1, 0, 0, 808, 0, 0], "semantic": {"name": "django.contrib.auth.models", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78343:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78343:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78343:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78343:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# copy following after running 'manage.py shell' from students.models import * import sys prev_year = raw_input("Enter previous year: ") next_year = raw_input("Enter next year: ") for std in [5, 6, 7, 8, 9]: try: s = StudentYearlyInformation.objects.filter( ClassMaster__Standard=std, ...
ajibawa-2023/Python-Code-Large/train/row_78344
2
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78344:ImportFrom_L1_C0", "label": "from students.models import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 475, 0, 1, 0, 0, 475, 0, 0], "semantic": {"name": "students.models", "arg_names": [], "import_n...
[]
#!/home/prabodhini/opt/bin/python import os import sys import datetime import re from pprint import pprint from reportlab.lib import colors os.environ['DJANGO_SETTINGS_MODULE'] = 'sms.settings' if 'DATAPY' in os.environ: sys.path.append(os.environ['DATAPY']) else: sys.path.append('changeme') from sms.students.m...
ajibawa-2023/Python-Code-Large/train/row_78345
148
245
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78345:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0082, 0.0041, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78345:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78345:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78345:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78345:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78345...
import os import sys import datetime os.environ['DJANGO_SETTINGS_MODULE'] = 'sms.settings' sys.path.append(os.environ['DATAPY']) from sms.students.models import * from sms.fees.models import * op = {} op['StudentBasicInfo'] = [] #op['StudentAdditionalInformation'] = [] #op['StudentYearlyInformation'] = [] #op['Stud...
ajibawa-2023/Python-Code-Large/train/row_78346
33
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78346:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0208, 0.0208, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78346:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78346:If_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78346:If_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78346:If_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/home/prabodhini/opt/bin/python import os, sys, datetime, re from pprint import pprint from reportlab.lib import colors os.environ['DJANGO_SETTINGS_MODULE'] = 'sms.settings' if 'DATAPY' in os.environ: sys.path.append(os.environ['DATAPY']) else: sys.path.append('changeme') from sms.students.models import * fr...
ajibawa-2023/Python-Code-Large/train/row_78347
156
210
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78347:Import_L2_C0", "label": "os import os, sys, datetime\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0095, 0.0048, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78347:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78347:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78347:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78347:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78347:F...
# copy following after running 'manage.py shell' from pravesh.models import * s = Student.objects.all() import xlwt wb = Workbook() wb = xlwt.Workbook() ws = wb.add_sheet('2011-12 Pravesh') cols = [ 'FirstName', 'MiddleName', 'LastName', 'FatherName', 'MotherName', 'Address', 'Pincode', ...
ajibawa-2023/Python-Code-Large/train/row_78348
14
37
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78348:ImportFrom_L2_C0", "label": "from pravesh.models import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0541, 0.027, 0, 0.66, 0.0, 927, 0, 1, 0, 0, 927, 0, 0], "semantic": {"name": "pravesh.models", "arg_names": [], "import_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78348:For_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78348:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78348:For_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78348:For_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78...
""" URL patterns for the views included in ``django.contrib.auth``. Including these URLs (via the ``include()`` directive) will set up the following patterns based at whatever URL prefix they are included under: * User login at ``login/``. * User logout at ``logout/``. * The two-step password change at ``password/c...
ajibawa-2023/Python-Code-Large/train/row_78349
4
58
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78349:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 24], "level": 0, "parent": null, "vector": [8, 0, 0.2155, 0.4138, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
import datetime import random import re from django.conf import settings from django.contrib.auth.models import User from django.db import models from django.db import transaction from django.template.loader import render_to_string from django.utils.hashcompat import sha_constructor from django.utils.translation impor...
ajibawa-2023/Python-Code-Large/train/row_78350
75
257
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78350:Import_L1_C0", "label": "datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0039, 0.0039, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetim...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78350:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78350:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78350:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78350:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" Forms and validation code for user registration. """ from django.contrib.auth.models import User from django import forms from django.utils.translation import ugettext_lazy as _ # I put this on all required fields, because it's easier to pick up # on them with CSS or JavaScript if they have a class of "require...
ajibawa-2023/Python-Code-Large/train/row_78351
38
123
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78351:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0203, 0.0325, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78351:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78351:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78351:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78351:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" Backwards-compatible URLconf for existing django-registration installs; this allows the standard ``include('registration.urls')`` to continue working, but that usage is deprecated and will be removed for django-registration 1.0. For new installs, use ``include('registration.backends.default.urls')``. """ import w...
ajibawa-2023/Python-Code-Large/train/row_78352
4
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78352:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.3, 0.5333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
""" A management command which deletes expired accounts (e.g., accounts which signed up but never activated) from the database. Calls ``RegistrationProfile.objects.delete_expired_users()``, which contains the actual logic for determining which accounts are deleted. """ from django.core.management.base import NoArgsC...
ajibawa-2023/Python-Code-Large/train/row_78353
7
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78353:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.2368, 0.4211, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78353:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78353:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78353:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78353:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Cod...
import datetime import re from django.conf import settings from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core import mail from django.core import management from django.test import TestCase from django.utils.hashcompat import sha_constructor from registration.mod...
ajibawa-2023/Python-Code-Large/train/row_78354
111
225
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78354:Import_L1_C0", "label": "datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0044, 0.0044, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetim...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78354:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78354:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78354:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78354:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django.contrib.auth.models import User from django.test import TestCase from registration import forms class RegistrationFormTests(TestCase): """ Test the default registration forms. """ def test_registration_form(self): """ Test that ``RegistrationForm`` enforces username const...
ajibawa-2023/Python-Code-Large/train/row_78355
42
119
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78355:ImportFrom_L1_C0", "label": "from django.contrib.auth.models import User", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0084, 0.0084, 0, 0.66, 0.0, 808, 0, 1, 0, 0, 808, 0, 0], "semantic": {"name": "django.contrib.auth.models", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78355:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78355:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78355:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78355:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" URLs used in the unit tests for django-registration. You should not attempt to use these URLs in any sort of real or development environment; instead, use ``registration/backends/default/urls.py``. This URLconf includes those URLs, and also adds several additional URLs which serve no purpose other than to test tha...
ajibawa-2023/Python-Code-Large/train/row_78356
6
82
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78356:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0732, 0.1341, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
from registration.tests.backends import * from registration.tests.forms import * from registration.tests.models import * from registration.tests.views import *
ajibawa-2023/Python-Code-Large/train/row_78357
4
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78357:ImportFrom_L1_C0", "label": "from registration.tests.backends import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 424, 0, 1, 0, 0, 424, 0, 0], "semantic": {"name": "registration.tests.backends", "arg_n...
[]
import datetime from django.conf import settings from django.contrib import admin from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core import mail from django.core.exceptions import ImproperlyConfigured from django.core.handlers.wsgi import WSGIRequest from django.t...
ajibawa-2023/Python-Code-Large/train/row_78358
155
361
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78358:Import_L1_C0", "label": "datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0028, 0.0028, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetim...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78358:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78358:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78358:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78358:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-...
import datetime from django.conf import settings from django.contrib.auth.models import User from django.core import mail from django.core.urlresolvers import reverse from django.test import TestCase from registration import forms from registration.models import RegistrationProfile class RegistrationViewTests(TestC...
ajibawa-2023/Python-Code-Large/train/row_78359
107
246
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78359:Import_L1_C0", "label": "datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0041, 0.0041, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetim...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78359:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78359:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78359:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78359:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
VERSION = (0, 8, 0, 'alpha', 1) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: if VERSION[3] != 'final': version = '%s %...
ajibawa-2023/Python-Code-Large/train/row_78360
10
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78360:Assign_L1_C0", "label": "VERSION =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 557, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "VERSION", "arg_names": [], "import_names": [], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78360:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78360:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78360:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78360:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" URLconf for registration and activation, using django-registration's default backend. If the default behavior of these views is acceptable to you, simply use a line like this in your root URLconf to set up the default URLs for registration:: (r'^accounts/', include('registration.backends.default.urls')), Thi...
ajibawa-2023/Python-Code-Large/train/row_78361
6
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78361:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 18], "level": 0, "parent": null, "vector": [8, 0, 0.1759, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
from django.conf import settings from django.contrib.sites.models import RequestSite from django.contrib.sites.models import Site from registration import signals from registration.forms import RegistrationForm from registration.models import RegistrationProfile class DefaultBackend(object): """ A registrati...
ajibawa-2023/Python-Code-Large/train/row_78362
35
139
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78362:ImportFrom_L1_C0", "label": "from django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0072, 0.0072, 0, 0.66, 0.0, 128, 0, 1, 0, 0, 128, 0, 0], "semantic": {"name": "django.conf", "arg_names": [], "import_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78362:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78362:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78362:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78362:FunctionDef_L49_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" Views which allow users to create and activate accounts. """ from django.shortcuts import redirect from django.shortcuts import render_to_response from django.template import RequestContext from registration.backends import get_backend def activate(request, backend, template_name='registration/ac...
ajibawa-2023/Python-Code-Large/train/row_78364
42
204
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78364:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0123, 0.0196, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78364:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78364:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78364:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78364:Assign_L74_C4"}, {"f": "ajibawa-2023/Python-Code...
from django.contrib import admin from django.contrib.sites.models import RequestSite from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from registration.models import RegistrationProfile class RegistrationAdmin(admin.ModelAdmin): actions = ['activate_users', 're...
ajibawa-2023/Python-Code-Large/train/row_78365
25
46
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78365:ImportFrom_L1_C0", "label": "from django.contrib import admin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0217, 0.0217, 0, 0.66, 0.0, 302, 0, 1, 0, 0, 302, 0, 0], "semantic": {"name": "django.contrib", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78365:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78365:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78365:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78365:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django.dispatch import Signal # A new user has registered. user_registered = Signal(providing_args=["user", "request"]) # A user has activated his or her account. user_activated = Signal(providing_args=["user", "request"])
ajibawa-2023/Python-Code-Large/train/row_78366
3
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78366:ImportFrom_L1_C0", "label": "from django.dispatch import Signal", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 548, 0, 1, 0, 0, 548, 0, 0], "semantic": {"name": "django.dispatch", "arg_names": [], "impor...
[]
import httplib import datetime import urllib USER = '_change_me_' PASSWORD = '_change_me_' SENDERID = '_change_me_' ''' def sms_send(user=USER, password=PASSWORD, senderid=SENDERID, nos=None, msg=None, schedule=None): for no in nos: try: params = urllib.urlencode({'user': user, 'pwd': password...
ajibawa-2023/Python-Code-Large/train/row_78368
19
51
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78368:Import_L2_C0", "label": "httplib import httplib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0392, 0.0196, 0, 0.66, 0.0, 2, 0, 1, 0, 0, 2, 0, 0], "semantic": {"name": "httplib", "arg_names": [], "import_names": ["httplib"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78368:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78368:For_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78368:For_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78368:Assign_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
from django.db import models from django.contrib import admin from django.contrib.auth.models import User from django import forms MEDIUM_CHOICES = ( ('E', 'English'), ('M', 'Marathi'), ) GENDER_CHOICES = ( ('M', 'Male'), ('F', 'Female'), ) PAYMODE_CHOICES = ( ('C', 'Cash'), ('DD', 'Demand Draft')...
ajibawa-2023/Python-Code-Large/train/row_78369
80
107
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78369:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0093, 0.0093, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78369:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78369:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78369:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78369:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ ...
ajibawa-2023/Python-Code-Large/train/row_78370
7
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78370:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1522, 0.2609, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78370:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78370:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78370:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78370:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Co...
from sms.pravesh.models import ClassRoom, Session, Student, HallTicket from django.contrib import admin from django.utils.translation import ugettext_lazy as _ class ClassRoomAdmin(admin.ModelAdmin): list_display = ['id','Number', 'Medium', 'Name', 'Capacity'] search_fields = ['Number', 'Medium', 'Name', 'Cap...
ajibawa-2023/Python-Code-Large/train/row_78372
19
25
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78372:ImportFrom_L1_C0", "label": "from sms.pravesh.models import ClassRoom, Session, Student\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.04, 0.04, 0, 0.66, 0.0, 93, 0, 4, 0, 0, 93, 0, 0], "semantic": {"name": "sms.pravesh.mod...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78372:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78372:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78372:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78372:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from django.db import models # Create your models here. class TypeByObjective(models.Model): Name = models.CharField(max_length=100) def __unicode__(self): return "%s" % (self.Name) class TypeByLength(models.Model): Name = models.CharField(max_length=100) def __unicode__(self): return...
ajibawa-2023/Python-Code-Large/train/row_78373
30
38
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78373:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0263, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78373:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78373:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78373:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78373:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-La...
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ ...
ajibawa-2023/Python-Code-Large/train/row_78374
7
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78374:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1522, 0.2609, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78374:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78374:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78374:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78374:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Co...
# Create your views here.
ajibawa-2023/Python-Code-Large/train/row_78375
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
from sms.question_bank.models import * from django.contrib import admin class TypeByObjectiveAdmin(admin.ModelAdmin): list_display = ['Name'] search_fields = ['Name'] class TypeByLengthAdmin(admin.ModelAdmin): list_display = ['Name'] search_fields = ['Name'] class MarksAdmin(admin.ModelAdmin): li...
ajibawa-2023/Python-Code-Large/train/row_78376
22
30
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78376:ImportFrom_L1_C0", "label": "from sms.question_bank.models import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0333, 0, 0.66, 0.0, 313, 0, 1, 0, 0, 313, 0, 0], "semantic": {"name": "sms.question_bank.models", "arg_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78376:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78376:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78376:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78376:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
ajibawa-2023/Python-Code-Large/train/row_78377
8
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78377:ImportFrom_L2_C0", "label": "from django.core.management import execute_manager", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 879, 0, 1, 0, 0, 879, 0, 0], "semantic": {"name": "django.core.management"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78377:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78377:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78377:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78377:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_7...
#!/usr/bin/env python import codecs import re import jinja2 import markdown def process_slides(): with codecs.open('../../presentation-output.html', 'w', encoding='utf8') as outfile: md = codecs.open('slides.md', encoding='utf8').read() md_slides = md.split('\n---\n') print 'Compiled %s slides.' % len(m...
ajibawa-2023/Python-Code-Large/train/row_78378
41
57
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78378:Import_L3_C0", "label": "codecs import codecs", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0175, 0, 0.66, 0.0, 220, 0, 1, 0, 0, 220, 0, 0], "semantic": {"name": "codecs", "arg_names": [], "import_names": ["codecs"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78378:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78378:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78378:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78378:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code...
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the argume...
ajibawa-2023/Python-Code-Large/train/row_78379
38
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78379:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78379:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78379:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78379:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78379:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/python ''' Entry point for My Tracks i18n tool. @author: Rodrigo Damazio ''' import mytracks.files import mytracks.translate import mytracks.validate import sys def Usage(): print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0] print 'Commands are:' print ' cleanup' print ' translate' p...
ajibawa-2023/Python-Code-Large/train/row_78380
58
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78380:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78380:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78380:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78380:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78380:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-L...
''' Module which prompts the user for translations and saves them. TODO: implement @author: Rodrigo Damazio ''' class Translator(object): ''' classdocs ''' def __init__(self, language): ''' Constructor ''' self._language = language def Translate(self, string_names): print string_names
ajibawa-2023/Python-Code-Large/train/row_78381
8
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78381:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78381:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78381:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78381:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78381:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-La...
''' Module which compares languague files to the master file and detects issues. @author: Rodrigo Damazio ''' import os from mytracks.parser import StringsParser import mytracks.history class Validator(object): def __init__(self, languages): ''' Builds a strings file validator. Params: @para...
ajibawa-2023/Python-Code-Large/train/row_78382
65
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78382:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78382:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78382:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78382:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_78382:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Co...
''' Module for dealing with resource files (but not their contents). @author: Rodrigo Damazio ''' import os.path from glob import glob import re MYTRACKS_RES_DIR = 'MyTracks/res' ANDROID_MASTER_VALUES = 'values' ANDROID_VALUES_MASK = 'values-*' def GetMyTracksDir(): ''' Returns the directory in which the MyTrac...
ajibawa-2023/Python-Code-Large/train/row_78383
25
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78383:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78383:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78383:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78383:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78383:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code...
''' Module which parses a string XML file. @author: Rodrigo Damazio ''' from xml.parsers.expat import ParserCreate import re #import xml.etree.ElementTree as ET class StringsParser(object): ''' Parser for string XML files. This object is not thread-safe and should be used for parsing a single file at a time...
ajibawa-2023/Python-Code-Large/train/row_78384
54
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78384:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78384:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78384:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78384:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78384:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-...
from construct import RepeatUntil from construct.core import Struct, Union from construct.macros import * from crypto.aes import AESdecryptCBC from crypto.aeswrap import AESUnwrap from zipfile import crc32 import struct Dkey = 0x446B6579 EMF = 0x454D4621 BAG1 = 0x42414731 DONE = 0x444f4e45 #locker sentine...
ajibawa-2023/Python-Code-Large/train/row_78386
46
69
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78386:ImportFrom_L1_C0", "label": "from construct import RepeatUntil", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0145, 0.0145, 0, 0.66, 0.0, 235, 0, 1, 0, 0, 235, 0, 0], "semantic": {"name": "construct", "arg_names": [], "import_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78386:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78386:Assign_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78386:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78386:For_L30_C8"}, {"f": "ajibawa-2023/Python-Code-...
#HAX d=open("redsn0w_win_0.9.9b4/redsn0w.exe", "rb").read() i = d.find("<key>IV</key>") i = d.rfind("<?xml",0,i) j = d.find("</plist>", i) assert i != -1 assert j != -1 open("Keys.plist", "wb").write(d[i:j+8])
ajibawa-2023/Python-Code-Large/train/row_78387
5
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78387:Assign_L3_C0", "label": "d = read()", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.0833, 0, 0.66, 0.0, 355, 3, 0, 0, 0, 453, 10, 2], "semantic": {"name": "d", "arg_names": [], "import_names": [], "rhs_call_name"...
[]
""" 0 1:MCSHA256DigestWithSalt 2:SecKeyFromPassphraseDataHMACSHA1 """ from crypto.PBKDF2 import PBKDF2 import plistlib import hashlib SALT1 = "F92F024CA2CB9754".decode("hex") hashMethods={ 1: (lambda p,salt:hashlib.sha256(SALT1 + p)), 2: (lambda p,salt:PBKDF2(p, salt, iterations=1000).read(20)) ...
ajibawa-2023/Python-Code-Large/train/row_78388
16
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78388:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1111, 0.1852, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78388:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78388:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78388:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78388:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Co...
from keychain import Keychain from crypto.aes import AESdecryptCBC, AESencryptCBC import hashlib class Keychain3(Keychain): def __init__(self, filename, key835=None): Keychain.__init__(self, filename) self.key835 = key835 def decrypt_data(self, data): if data == None:...
ajibawa-2023/Python-Code-Large/train/row_78389
32
44
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78389:ImportFrom_L1_C0", "label": "from keychain import Keychain", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0227, 0.0227, 0, 0.66, 0.0, 466, 0, 1, 0, 0, 466, 0, 0], "semantic": {"name": "keychain", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78389:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78389:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78389:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78389:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-L...
from store import PlistKeychain, SQLiteKeychain from util import write_file from util.asciitables import print_table from util.bplist import BPlistReader from util.cert import RSA_KEY_DER_to_PEM, CERT_DER_to_PEM import M2Crypto import hashlib import plistlib import sqlite3 import string import struct KSECA...
ajibawa-2023/Python-Code-Large/train/row_78390
171
237
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78390:ImportFrom_L1_C0", "label": "from store import PlistKeychain, SQLiteKeychain", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0042, 0.0042, 0, 0.66, 0.0, 354, 0, 2, 0, 0, 354, 0, 0], "semantic": {"name": "store", "arg_names": [], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78390:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78390:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78390:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78390:If_L25_C4"}, {"f": "ajibawa-2023/Python-Code-L...
from crypto.aes import AESdecryptCBC import struct """ iOS 4 keychain-2.db data column format version 0x00000000 key class 0x00000008 kSecAttrAccessibleWhenUnlocked 6 kSecAttrAccessibleAfterFirstUnlock 7 ...
ajibawa-2023/Python-Code-Large/train/row_78391
59
92
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78391:ImportFrom_L1_C0", "label": "from crypto.aes import AESdecryptCBC", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0109, 0.0109, 0, 0.66, 0.0, 692, 0, 1, 0, 0, 692, 0, 0], "semantic": {"name": "crypto.aes", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78391:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78391:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78391:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78391:If_L33_C8"}, {"f": "ajibawa-2023/Python-Code...
import sqlite3 from keychain3 import Keychain3 from keychain4 import Keychain4 def keychain_load(filename, keybag, key835): version = sqlite3.connect(filename).execute("SELECT version FROM tversion").fetchone()[0] #print "Keychain version : %d" % version if version == 3: return Keychain3(fi...
ajibawa-2023/Python-Code-Large/train/row_78392
9
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78392:Import_L1_C0", "label": "sqlite3 import sqlite3", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 790, 0, 1, 0, 0, 790, 0, 0], "semantic": {"name": "sqlite3", "arg_names": [], "import_names": ["sqlite3"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78392:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78392:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78392:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78392:If_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
import plistlib import sqlite3 import struct from util import readPlist class KeychainStore(object): def __init__(self): pass def convertDict(self, d): return d def returnResults(self, r): for a in r: yield self.convertDict(a) def get_i...
ajibawa-2023/Python-Code-Large/train/row_78393
40
56
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78393:Import_L1_C0", "label": "plistlib import plistlib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0179, 0.0179, 0, 0.66, 0.0, 592, 0, 1, 0, 0, 592, 0, 0], "semantic": {"name": "plistlib", "arg_names": [], "import_names": ["plistli...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78393:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78393:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78393:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78393:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-C...
#!/usr/bin/python import plistlib import zipfile import struct import sys from optparse import OptionParser from Crypto.Cipher import AES from util.lzss import decompress_lzss devices = {"n82ap": "iPhone1,2", "n88ap": "iPhone2,1", "n90ap": "iPhone3,1", "n90bap": "iPhone3,2", ...
ajibawa-2023/Python-Code-Large/train/row_78394
108
224
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78394:Import_L3_C0", "label": "plistlib import plistlib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0134, 0.0045, 0, 0.66, 0.0, 592, 0, 1, 0, 0, 592, 0, 0], "semantic": {"name": "plistlib", "arg_names": [], "import_names": ["plistli...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78394:ClassDef_L69_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78394:FunctionDef_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78394:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78394:Assign_L71_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # -*- coding: utf-8 -*- # # usbmux.py - usbmux client library for Python # # Copyright (C) 2009 Hector Martin "marcan" <hector@marcansoft.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Soft...
ajibawa-2023/Python-Code-Large/train/row_78395
180
246
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78395:Import_L21_C0", "label": "socket import socket, struct, select\u2026", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.0854, 0.0041, 0, 0.66, 0.0, 687, 0, 4, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "impor...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78395:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78395:Import_L24_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78395:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78395:Assign_L25_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
from crypto.aes import AESdecryptCBC from util import read_file, write_file from util.ramdiskclient import RamdiskToolClient import M2Crypto import struct import hashlib import os import sys def decryptGID(data): try: client = RamdiskToolClient.get() except: return None r = cl...
ajibawa-2023/Python-Code-Large/train/row_78396
207
290
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78396:ImportFrom_L1_C0", "label": "from crypto.aes import AESdecryptCBC", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0034, 0.0034, 0, 0.66, 0.0, 692, 0, 1, 0, 0, 692, 0, 0], "semantic": {"name": "crypto.aes", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78396:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78396:Try_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78396:Try_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78396:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
from construct.core import Struct from construct.macros import * IMG2 = Struct("IMG2", String("magic",4), ULInt32("block_size"), ULInt32("images_offset"), ULInt32("images_block"), ULInt32("images_length"), Padding(0x1C), ...
ajibawa-2023/Python-Code-Large/train/row_78397
3
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78397:ImportFrom_L1_C0", "label": "from construct.core import Struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 880, 0, 1, 0, 0, 880, 0, 0], "semantic": {"name": "construct.core", "arg_names": [], "impor...
[]
from construct.core import Struct from construct.macros import * from construct import RepeatUntil, OneOf from util import hexdump SCFGItem = Struct("SCFGItem", String("tag", 4), String("data", 16, padchar="\x00") ) SCFG = Struct("SCFG", ...
ajibawa-2023/Python-Code-Large/train/row_78398
13
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78398:ImportFrom_L1_C0", "label": "from construct.core import Struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.037, 0, 0.66, 0.0, 880, 0, 1, 0, 0, 880, 0, 0], "semantic": {"name": "construct.core", "arg_names": [], "import_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78398:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78398:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78398:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78398:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Co...
from Crypto.Cipher import AES from hashlib import sha1 from struct import unpack import os MBDB_SIGNATURE = 'mbdb\x05\x00' MASK_SYMBOLIC_LINK = 0xa000 MASK_REGULAR_FILE = 0x8000 MASK_DIRECTORY = 0x4000 def warn(msg): print "WARNING: %s" % msg class MBFileRecord(object): def __init__(self,...
ajibawa-2023/Python-Code-Large/train/row_78399
123
174
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78399:ImportFrom_L1_C0", "label": "from Crypto.Cipher import AES", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0057, 0.0057, 0, 0.66, 0.0, 663, 0, 1, 0, 0, 663, 0, 0], "semantic": {"name": "Crypto.Cipher", "arg_names": [], "import_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78399:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78399:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78399:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78399:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Co...
from crypto.PBKDF2 import PBKDF2 from crypto.aes import AESdecryptCBC from util import read_file, write_file, makedirs, readPlist from util.bplist import BPlistReader import hashlib import struct import glob import sys import os """ decrypt iOS 3 backup blob (metadata and file contents) """ def decrypt_...
ajibawa-2023/Python-Code-Large/train/row_78400
49
67
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78400:ImportFrom_L1_C0", "label": "from crypto.PBKDF2 import PBKDF2", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0149, 0.0149, 0, 0.66, 0.0, 428, 0, 1, 0, 0, 428, 0, 0], "semantic": {"name": "crypto.PBKDF2", "arg_names": [], "import_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78400:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78400:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78400:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78400:If_L17_C4"}, {"f": "ajibawa-2023/Python-Code-L...
from Crypto.Cipher import AES ZEROIV = "\x00"*16 def removePadding(blocksize, s): 'Remove rfc 1423 padding from string.' n = ord(s[-1]) # last byte contains number of padding bytes if n > blocksize or n > len(s): raise Exception('invalid padding') return s[:-n] def AESdecryptCBC(da...
ajibawa-2023/Python-Code-Large/train/row_78401
21
26
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78401:ImportFrom_L1_C0", "label": "from Crypto.Cipher import AES", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0385, 0.0385, 0, 0.66, 0.0, 663, 0, 1, 0, 0, 663, 0, 0], "semantic": {"name": "Crypto.Cipher", "arg_names": [], "import_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78401:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78401:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78401:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78401:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import struct from Crypto.Cipher import AES """ http://www.ietf.org/rfc/rfc3394.txt quick'n'dirty AES wrap implementation used by iOS 4 KeyStore kernel extension for wrapping/unwrapping encryption keys """ def unpack64bit(s): return struct.unpack(">Q",s)[0] def pack64bit(s): return struc...
ajibawa-2023/Python-Code-Large/train/row_78402
44
70
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78402:Import_L1_C0", "label": "struct import struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0143, 0.0143, 0, 0.66, 0.0, 399, 0, 1, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names": ["struct"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78402:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78402:Return_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78402:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78402:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Cod...
from Crypto.Util import number CURVE_P = (2**255 - 19) CURVE_A = 121665 def curve25519_monty(x1, z1, x2, z2, qmqp): a = (x1 + z1) * (x2 - z2) % CURVE_P b = (x1 - z1) * (x2 + z2) % CURVE_P x4 = (a + b) * (a + b) % CURVE_P e = (a - b) * (a - b) % CURVE_P z4 = e * qmqp % CURVE_P a ...
ajibawa-2023/Python-Code-Large/train/row_78404
50
74
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78404:ImportFrom_L1_C0", "label": "from Crypto.Util import number", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0135, 0.0135, 0, 0.66, 0.0, 888, 0, 1, 0, 0, 888, 0, 0], "semantic": {"name": "Crypto.Util", "arg_names": [], "import_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78404:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78404:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78404:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78404:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/env python from Crypto.Cipher import AES from Crypto.Util import strxor from struct import pack, unpack def gcm_rightshift(vec): for x in range(15, 0, -1): c = vec[x] >> 1 c |= (vec[x-1] << 7) & 0x80 vec[x] = c vec[0] >>= 1 return vec def gcm_gf_mult(a, b): mask = [...
ajibawa-2023/Python-Code-Large/train/row_78405
85
129
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78405:ImportFrom_L3_C0", "label": "from Crypto.Cipher import AES", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0233, 0.0078, 0, 0.66, 0.0, 663, 0, 1, 0, 0, 663, 0, 0], "semantic": {"name": "Crypto.Cipher", "arg_names": [], "import_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78405:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78405:For_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78405:For_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78405:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
from backups.backup3 import decrypt_backup3 from backups.backup4 import MBDB from keystore.keybag import Keybag from util import readPlist, makedirs import os import sys import plistlib showinfo = ["Device Name", "Display Name", "Last Backup Date", "IMEI", "Serial Number", "Product Type", "Product Version"...
ajibawa-2023/Python-Code-Large/train/row_78406
60
78
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78406:ImportFrom_L1_C0", "label": "from backups.backup3 import decrypt_backup3", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0128, 0.0128, 0, 0.66, 0.0, 256, 0, 1, 0, 0, 256, 0, 0], "semantic": {"name": "backups.backup3", "arg_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78406:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78406:If_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78406:If_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78406:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
def print_table(title, headers, rows): widths = [] for i in xrange(len(headers)): z = map(len, [str(row[i]) for row in rows]) z.append(len(headers[i])) widths.append(max(z)) width = sum(widths) + len(headers) + 1 print "-"* width print "|" + title.center...
ajibawa-2023/Python-Code-Large/train/row_78407
22
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78407:FunctionDef_L2_C0", "label": "print_table", "type": "function", "loc": [2, 29], "level": 0, "parent": null, "vector": [2, 0, 0.5345, 0.9655, 0, 0.66, 0.0, 389, 0, 3, 0, 0, 0, 0, 29], "semantic": {"name": "print_table", "arg_names": ["title", "headers", "rows"], "i...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78407:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78407:Assign_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78407:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78407:For_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
""" /************************************************************** LZSS.C -- A Data Compression Program *************************************************************** 4/6/1989 Haruhiko Okumura Use, distribute, and modify this program freely. Please send me your improved versions. PC-VAN ...
ajibawa-2023/Python-Code-Large/train/row_78408
38
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78408:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 20], "level": 0, "parent": null, "vector": [8, 0, 0.1479, 0.2817, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78408:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78408:If_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78408:If_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78408:Expr_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
import base64 def chunks(l, n): return (l[i:i+n] for i in xrange(0, len(l), n)) def RSA_KEY_DER_to_PEM(data): a = ["-----BEGIN RSA PRIVATE KEY-----"] a.extend(chunks(base64.b64encode(data),64)) a.append("-----END RSA PRIVATE KEY-----") return "\n".join(a) def CERT_DER_to_PEM(data): ...
ajibawa-2023/Python-Code-Large/train/row_78409
13
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78409:Import_L1_C0", "label": "base64 import base64", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78409:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78409:Return_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78409:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78409:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import struct def tlvToDict(blob): d = {} for tag,data in loopTLVBlocks(blob): d[tag] = data return d def tlvToList(blob): return list(loopTLVBlocks(blob)) def loopTLVBlocks(blob): i = 0 while i + 8 <= len(blob): tag = blob[i:i+4] length = struct.unp...
ajibawa-2023/Python-Code-Large/train/row_78410
15
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78410:Import_L1_C0", "label": "struct import struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0526, 0, 0.66, 0.0, 399, 0, 1, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names": ["struct"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78410:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78410:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78410:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78410:For_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
import os import sys from util import sizeof_fmt, hexdump from progressbar import ProgressBar from crypto.aes import AESdecryptCBC, AESencryptCBC class FileBlockDevice(object): def __init__(self, filename, offset=0, write=False): flag = os.O_RDONLY if not write else os.O_RDWR if sys.platfo...
ajibawa-2023/Python-Code-Large/train/row_78411
109
139
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78411:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0072, 0.0072, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78411:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78411:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78411:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78411:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code...
""" http://github.com/farcaller/bplist-python/blob/master/bplist.py """ import struct import plistlib from datetime import datetime, timedelta class BPListWriter(object): def __init__(self, objects): self.bplist = "" self.objects = objects def binary(self): '''binary -> string ...
ajibawa-2023/Python-Code-Large/train/row_78412
157
251
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78412:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.008, 0.012, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78412:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78412:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78412:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78412:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod...
from keystore.keybag import Keybag from keystore.effaceable import EffaceableLockers from util.ramdiskclient import RamdiskToolClient import plistlib COMPLEXITY={ 0: "4 digits", 1: "n digits", 2: "n alphanum" } def checkPasscodeComplexity(data_volume): p...
ajibawa-2023/Python-Code-Large/train/row_78413
58
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78413:ImportFrom_L1_C0", "label": "from keystore.keybag import Keybag", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0141, 0.0141, 0, 0.66, 0.0, 856, 0, 1, 0, 0, 856, 0, 0], "semantic": {"name": "keystore.keybag", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78413:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78413:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78413:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78413:If_L14_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import glob import plistlib import os from bplist import BPlistReader import cPickle import gzip def read_file(filename): f = open(filename, "rb") data = f.read() f.close() return data def write_file(filename,data): f = open(filename, "wb") f.write(data) f.close() def ma...
ajibawa-2023/Python-Code-Large/train/row_78414
94
123
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78414:Import_L1_C0", "label": "glob import glob", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0081, 0.0081, 0, 0.66, 0.0, 958, 0, 1, 0, 0, 958, 0, 0], "semantic": {"name": "glob", "arg_names": [], "import_names": ["glob"], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78414:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78414:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78414:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78414:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-...
import plistlib import struct import socket from datetime import datetime from progressbar import ProgressBar, Percentage, Bar, SimpleProgress, ETA from usbmux import usbmux from util import sizeof_fmt kIOAESAcceleratorEncrypt = 0 kIOAESAcceleratorDecrypt = 1 kIOAESAcceleratorGIDMask = 0x3E8 kIOAESAccele...
ajibawa-2023/Python-Code-Large/train/row_78415
120
172
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78415:Import_L1_C0", "label": "plistlib import plistlib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0058, 0.0058, 0, 0.66, 0.0, 592, 0, 1, 0, 0, 592, 0, 0], "semantic": {"name": "plistlib", "arg_names": [], "import_names": ["plistli...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78415:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78415:FunctionDef_L18_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78415:FunctionDef_L18_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_78415:Try_L19_C2"}, {"f": "ajibawa-2023/Python-Cod...
from btree import AttributesTree, CatalogTree, ExtentsOverflowTree from structs import * from util import write_file from util.bdev import FileBlockDevice import datetime import hashlib import os import struct import sys import zlib def hfs_date(t): return datetime.datetime(1904,1,1) + datetime.timedelta(seconds=t...
ajibawa-2023/Python-Code-Large/train/row_78416
241
315
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78416:ImportFrom_L1_C0", "label": "from btree import AttributesTree, CatalogTree, ExtentsOverflowTree", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0032, 0.0032, 0, 0.66, 0.0, 641, 0, 3, 0, 0, 641, 0, 0], "semantic": {"name": "btree",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78416:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78416:Return_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78416:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78416:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-...
from crypto.aes import AESencryptCBC, AESdecryptCBC from emf import cprotect_xattr, EMFFile from structs import * from util import write_file, sizeof_fmt import hashlib """ Implementation of the following paper : Using the HFS+ Journal For Deleted File Recovery. Aaron Burghardt, Adam Feldman. DFRWS 2008 http:...
ajibawa-2023/Python-Code-Large/train/row_78417
109
152
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78417:ImportFrom_L1_C0", "label": "from crypto.aes import AESencryptCBC, AESdecryptCBC", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0066, 0.0066, 0, 0.66, 0.0, 692, 0, 2, 0, 0, 692, 0, 0], "semantic": {"name": "crypto.aes", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78417:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78417:Try_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78417:Try_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78417:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
from construct import Struct, ULInt16, ULInt32, String from construct.macros import ULInt64, Padding, If from crypto.aes import AESencryptCBC, AESdecryptCBC from hfs import HFSVolume, HFSFile from keystore.keybag import Keybag from structs import HFSPlusVolumeHeader, kHFSPlusFileRecord, getString, \ kHFSRootP...
ajibawa-2023/Python-Code-Large/train/row_78418
154
219
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78418:ImportFrom_L1_C0", "label": "from construct import Struct, ULInt16, ULInt32\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0046, 0.0046, 0, 0.66, 0.0, 235, 0, 4, 0, 0, 235, 0, 0], "semantic": {"name": "construct", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78418:ClassDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78418:FunctionDef_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78418:FunctionDef_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78418:Expr_L56_C8"}, {"f": "ajibawa-2023/Python-Co...
from structs import * """ Probably buggy HAX, only works on case SENSITIVE """ class BTree(object): def __init__(self, file, keyStruct, dataStruct): self.file = file self.keyStruct = keyStruct self.dataStruct = dataStruct block0 = self.file.readBlock(0) btnode ...
ajibawa-2023/Python-Code-Large/train/row_78419
200
268
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78419:ImportFrom_L1_C0", "label": "from structs import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0037, 0.0037, 0, 0.66, 0.0, 466, 0, 1, 0, 0, 466, 0, 0], "semantic": {"name": "structs", "arg_names": [], "import_names": ["*"], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78419:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78419:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78419:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78419:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod...
from construct import * from construct.macros import UBInt64 """ http://developer.apple.com/library/mac/#technotes/tn/tn1150.html """ def getString(obj): return obj.HFSUniStr255.unicode S_IFLNK = 0120000 kSymLinkFileType = 0x736C6E6B kSymLinkCreator = 0x72686170 kHardLinkFileType = 0x686C6E6B kHF...
ajibawa-2023/Python-Code-Large/train/row_78420
78
340
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78420:ImportFrom_L1_C0", "label": "from construct import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0029, 0.0029, 0, 0.66, 0.0, 235, 0, 1, 0, 0, 235, 0, 0], "semantic": {"name": "construct", "arg_names": [], "import_names": ["*"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78420:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78420:Return_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78420:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78420:Return_L20_C4"}]
import os import plistlib from keystore.keybag import Keybag from util.ramdiskclient import RamdiskToolClient """ this wont work on iOS 5 unless the passcode was already bruteforced """ def escrow(): client = RamdiskToolClient() di = client.getDeviceInfos() key835 = di.get("key835").decode("hex"...
ajibawa-2023/Python-Code-Large/train/row_78422
28
38
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78422:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0263, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78422:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78422:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78422:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78422:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code...
import os import sys from hfs.emf import EMFVolume from hfs.journal import do_emf_carving from util.bdev import FileBlockDevice if __name__ == "__main__": if len(sys.argv) < 2: print "Usage: emf_undelete.py disk_image.bin" sys.exit(0) filename = sys.argv[1] volume = EMFVolume(Fil...
ajibawa-2023/Python-Code-Large/train/row_78424
21
25
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78424:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.04, 0.04, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78424:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78424:If_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78424:If_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78424:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78424:If_...
from carver import NANDCarver from construct.core import Struct from construct.macros import ULInt32, ULInt16, Array, ULInt8, Padding from pprint import pprint from structs import SpareData from util import hexdump from vfl import VFL import plistlib """ openiboot/plat-s5l8900/ftl.c openiboot/plat-s5l8900/i...
ajibawa-2023/Python-Code-Large/train/row_78425
140
220
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78425:ImportFrom_L1_C0", "label": "from carver import NANDCarver", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0045, 0.0045, 0, 0.66, 0.0, 925, 0, 1, 0, 0, 925, 0, 0], "semantic": {"name": "carver", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78425:ClassDef_L69_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78425:FunctionDef_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78425:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78425:Assign_L71_C8"}, {"f": "ajibawa-2023/Python-...
from array import array from construct.core import Struct, Union from construct.macros import * from progressbar import ProgressBar from structs import * import struct #https://github.com/iDroid-Project/openiBoot/blob/master/openiboot/ftl-yaftl/yaftl.c YAFTL_CXT = Struct("YAFTL_CXT", String("version", 4...
ajibawa-2023/Python-Code-Large/train/row_78427
249
357
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78427:ImportFrom_L1_C0", "label": "from array import array", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0028, 0.0028, 0, 0.66, 0.0, 80, 0, 1, 0, 0, 80, 0, 0], "semantic": {"name": "array", "arg_names": [], "import_names": ["array"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78427:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78427:FunctionDef_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78427:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78427:Assign_L55_C8"}, {"f": "ajibawa-2023/Python-...
from progressbar import ProgressBar from usbmux import usbmux from util import hexdump, sizeof_fmt import datetime import hashlib import struct import os CMD_DUMP = 0 CMD_PROXY = 1 kIOFlashStorageOptionRawPageIO = 0x002 kIOFlashStorageOptionBootPageIO = 0x100 class IOFlashStorageKitClient(object): ...
ajibawa-2023/Python-Code-Large/train/row_78428
82
99
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78428:ImportFrom_L1_C0", "label": "from progressbar import ProgressBar", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0101, 0.0101, 0, 0.66, 0.0, 349, 0, 1, 0, 0, 349, 0, 0], "semantic": {"name": "progressbar", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78428:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78428:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78428:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78428:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-...
from construct import * from zipfile import crc32 GPT_HFS = "005346480000aa11aa1100306543ecac".decode("hex") GPT_EMF = "00464d450000aa11aa1100306543ecac".decode("hex") LWVM_partitionRecord = Struct("LWVM_partitionRecord", String("type", 16), String("...
ajibawa-2023/Python-Code-Large/train/row_78429
64
132
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78429:ImportFrom_L1_C0", "label": "from construct import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0076, 0.0076, 0, 0.66, 0.0, 235, 0, 1, 0, 0, 235, 0, 0], "semantic": {"name": "construct", "arg_names": [], "import_names": ["*"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78429:FunctionDef_L74_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78429:Try_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78429:Try_L75_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78429:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
import os import struct import sys """ row-by-row dump page = data + spare metadata + iokit return code + iokit return code 2 """ class NANDImageFlat(object): def __init__(self, filename, geometry): flags = os.O_RDONLY if sys.platform == "win32": flags |= os.O_BINARY ...
ajibawa-2023/Python-Code-Large/train/row_78430
68
86
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_78430:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0116, 0.0116, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_78430:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78430:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78430:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78430:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-C...