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 |
|---|---|---|---|---|---|---|---|
# -*- coding: utf8 -*-
# this is the master test file, collecting and running all
# test suits
import os
try:
import unittest2
ts = unittest2.defaultTestLoader.discover(".", pattern="test_*.py")
runner = unittest2.runner.TextTestRunner()
runner.run(ts)
except:
raise
print "You need to have unittest2 instal... | ajibawa-2023/Python-Code-Large/train/row_81715 | 11 | 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_81715:Import_L4_C0", "label": "os import os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.2105, 0.0526, 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_81715:Try_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81715:Import_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81715:Try_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81715:Assign_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_8... |
# -*- coding: utf-8 -*-
import json
from base import app
from flask import Flask, session, g, render_template, url_for, request, redirect, make_response
from utils import to_dict, parse_range
import base
def is_safe(name):
return name not in ('admin', 'local', 'system.indexes', 'users')
@app.route("/raw")
def da... | ajibawa-2023/Python-Code-Large/train/row_81721 | 76 | 103 | 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_81721:Import_L2_C0", "label": "json import json", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0194, 0.0097, 0, 0.66, 0.0, 463, 0, 1, 0, 0, 463, 0, 0], "semantic": {"name": "json", "arg_names": [], "import_names": ["json"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81721:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81721:Return_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81721:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81721:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Cod... |
# -*- coding: utf-8 -*-
import os.path, gzip, re, sys, time
import pymongo
import base
fields = base.getDBConnection().numberfields.fields
fields.ensure_index('degree')
fields.ensure_index('galois_group')
fields.ensure_index('signature')
fields.ensure_index('discriminant')
fields.ensure_index('class_number')
fields.en... | ajibawa-2023/Python-Code-Large/train/row_81722 | 62 | 108 | 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_81722:Import_L2_C0", "label": "os.path import os.path, gzip, re\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0185, 0.0093, 0, 0.66, 0.0, 79, 0, 5, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81722:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81722:Return_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81722:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81722:Return_L19_C4"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: utf-8 -*-
import sys, time
from pymongo.connection import Connection
fields = Connection(port=37010).numberfields.fields
def coeffs(s):
return [a for a in s[1:-1].split(',')]
def base_label(d,r1,D,ind):
return str(d)+"."+str(r1)+"."+str(abs(D))+"."+str(ind)
def parse_xall(line):
data = eva... | ajibawa-2023/Python-Code-Large/train/row_81723 | 43 | 80 | 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_81723:Import_L2_C0", "label": "sys import sys, time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.0125, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "time"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81723:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81723:Return_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81723:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81723:Return_L11_C4"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: utf-8 -*-
import os.path, gzip, re, sys, time, base
fields = base.getDBConnection().numberfields.fields
fields.ensure_index('degree')
fields.ensure_index('galois_group')
fields.ensure_index('signature')
fields.ensure_index('discriminant')
fields.ensure_index('class_number')
fields.ensure_index([('degree'... | ajibawa-2023/Python-Code-Large/train/row_81724 | 38 | 60 | 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_81724:Import_L2_C0", "label": "os.path import os.path, gzip, re\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0167, 0, 0.66, 0.0, 79, 0, 6, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81724:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81724:Return_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81724:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81724:Return_L20_C4"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: utf-8 -*-
import os.path, gzip, re, sys, time, base
from pymongo.connection import Connection
fields = Connection(port=37010).numberfields.fields
#
# This is a list of pairs of lists [pol1,pol2] where pol1 is a list of
# the coefficients of a defining polynomial in the database (as of
# 2011-09-02) and p... | ajibawa-2023/Python-Code-Large/train/row_81725 | 18 | 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_81725:Import_L2_C0", "label": "os.path import os.path, gzip, re\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0541, 0.027, 0, 0.66, 0.0, 79, 0, 6, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81725:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81725:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81725:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81725:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code... |
import sys
sys.path.append("../")
print "Importing sage in base"
import base
from math_classes import NumberFieldGaloisGroup as NF
print "Sage loaded"
print "getting connection"
base._init(37010,"")
print "I have it"
base.getDBConnection()
for nf_dict in NF.collection().find():
from copy import deepcopy
nf_di... | ajibawa-2023/Python-Code-Large/train/row_81726 | 20 | 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_81726:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.04, 0.04, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81726:For_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81726:ImportFrom_L16_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81726:For_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81726:Assign_L17_C3"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
# -*- coding: utf-8 -*-
import sys, time
import sage.all
from sage.all import gap
from pymongo.connection import Connection
groups = Connection(port=37010).transitivegroups.groups
groups.ensure_index('n')
groups.ensure_index('t')
# Import information in the a database of transitive groups
def base_label(n,t):
... | ajibawa-2023/Python-Code-Large/train/row_81727 | 48 | 83 | 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_81727:Import_L2_C0", "label": "sys import sys, time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0241, 0.012, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "time"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81727:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81727:Return_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81727:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81727:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: utf-8 -*-
from base import app
from utils import make_logger
from flask import Blueprint
nf_page = Blueprint("number_fields", __name__, template_folder='templates', static_folder="static")
nf_logger = make_logger(nf_page)
@nf_page.context_processor
def body_class():
return { 'body_class' : 'nf' }
fr... | ajibawa-2023/Python-Code-Large/train/row_81728 | 9 | 18 | 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_81728:ImportFrom_L3_C0", "label": "from base import app", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0556, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["app"], "rhs_c... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81728:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81728:Return_L12_C2"}] |
# -*- coding: utf-8 -*-
import math
#from Lfunctionutilities import pair2complex, splitcoeff, seriescoeff
from sage.all import *
import sage.libs.lcalc.lcalc_Lfunction as lc
import re
import pymongo
import bson
from utils import parse_range, make_logger
logger = make_logger("DC")
#import web_modforms
from modular_forms... | ajibawa-2023/Python-Code-Large/train/row_81730 | 117 | 193 | 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_81730:Import_L2_C0", "label": "math import math", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0104, 0.0052, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81730:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81730:ImportFrom_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81730:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81730:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
from base import app
import flask
from flask import render_template, request
mod = flask.Blueprint('zeros', __name__, template_folder="templates")
title = "zeros"
@mod.context_processor
def body_class():
return { 'body_class' : 'LfunctionDB' }
@mod.route("/")
def default_route():
return ""
@mod.route("/zeta")... | ajibawa-2023/Python-Code-Large/train/row_81731 | 10 | 18 | 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_81731:ImportFrom_L1_C0", "label": "from base import app", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["app"], "rhs_c... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81731:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81731:Return_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81731:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81731:Return_L14_C4"}] |
import flask
import utils
import os
from flask import render_template, request
FirstZeros = flask.Blueprint('first L-function zeros', __name__, template_folder = "templates")
logger = utils.make_logger(FirstZeros)
import sqlite3
data_location = os.path.expanduser("~/data/zeros/")
print data_location
try:
db = sql... | ajibawa-2023/Python-Code-Large/train/row_81732 | 61 | 103 | 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_81732:Import_L1_C0", "label": "flask import flask", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0097, 0.0097, 0, 0.66, 0.0, 782, 0, 1, 0, 0, 782, 0, 0], "semantic": {"name": "flask", "arg_names": [], "import_names": ["flask"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81732:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81732:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81732:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81732:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
import flask
import utils
from flask import render_template, request
ZetaZeros = flask.Blueprint("zeta zeros", __name__, template_folder = "templates")
logger = utils.make_logger(ZetaZeros)
from platt_zeros import *
@ZetaZeros.route("/")
def zetazeros():
N = request.args.get("N", None, int)
t = request.args.... | ajibawa-2023/Python-Code-Large/train/row_81733 | 43 | 61 | 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_81733:Import_L1_C0", "label": "flask import flask", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0164, 0.0164, 0, 0.66, 0.0, 782, 0, 1, 0, 0, 782, 0, 0], "semantic": {"name": "flask", "arg_names": [], "import_names": ["flask"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81733:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81733:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81733:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81733:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Co... |
#
# AUTHOR: Jonathan Bober <jwbober@gmail.com>
#
# Simple Python module for extracting lists of zeros from Dave Platt's
# tables of zeros of the zeta function.
#
import sqlite3
import os
import struct
import sys
from math import log, floor
import mpmath
mpmath.mp.prec = 300
data_location = os.path.expanduser('~/data... | ajibawa-2023/Python-Code-Large/train/row_81734 | 73 | 186 | 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_81734:Import_L8_C0", "label": "sqlite3 import sqlite3", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.043, 0.0054, 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_81734:Try_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81734:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81734:Try_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81734:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
from base import app
import main
import zeta.zetazeros
import first.firstzeros
app.register_blueprint(main.mod, url_prefix="/zeros")
app.register_blueprint(zeta.zetazeros.ZetaZeros, url_prefix="/zeros/zeta")
app.register_blueprint(first.firstzeros.FirstZeros, url_prefix="/zeros/first")
| ajibawa-2023/Python-Code-Large/train/row_81735 | 7 | 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_81735:ImportFrom_L1_C0", "label": "from base import app", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["app"], "rhs_cal... | [] |
# Guess how to parse an arbitrary file.
# 1) If the file isn't mostly [a-zA-Z0-9 .-_] then ignore it
# 2) Ignore lines beginning with '#' or '//'
# 3) If one of the first 20 lines begins with [ or { start parsing as an array or map from that point
# Assume lines before are comments
# Strings may or may not be sur... | ajibawa-2023/Python-Code-Large/train/row_81736 | 107 | 177 | 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_81736:ImportFrom_L14_C0", "label": "from curses.ascii import isgraph, isspace", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0791, 0.0056, 0, 0.66, 0.0, 97, 0, 2, 0, 0, 97, 0, 0], "semantic": {"name": "curses.ascii", "arg_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81736:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81736:Try_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81736:Try_L30_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_81736:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
# -*- coding: utf-8 -*-
from upload import upload_page
from base import app
app.register_blueprint(upload_page, url_prefix="/upload")
| ajibawa-2023/Python-Code-Large/train/row_81737 | 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_81737:ImportFrom_L2_C0", "label": "from upload import upload_page", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.1667, 0, 0.66, 0.0, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "upload", "arg_names": [], "import_names": [... | [] |
# -*- coding: utf-8 -*-
# This Blueprint is for handling data uploads.
# Authenticated users also have access to the raw entries,
# selected users can edit metadata, …
#
# author:
import pymongo
import flask
import copy
import datetime
import json
import re
import tarfile
from base import app, getDBConnection, fmtda... | ajibawa-2023/Python-Code-Large/train/row_81738 | 177 | 284 | 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_81738:Import_L8_C0", "label": "pymongo import pymongo", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0282, 0.0035, 0, 0.66, 0.0, 19, 0, 1, 0, 0, 19, 0, 0], "semantic": {"name": "pymongo", "arg_names": [], "import_names": ["pymongo"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81738:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81738:Return_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81738:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81738:Return_L38_C2"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: utf-8 -*-
r"""
Import data from cremona tables and merging or updating existing database.
Before running this script run import_ec_data.py
Gagan Sekhon (2011)
"""
import os.path, gzip, re, sys, time
import pymongo
import base
conn = base.getDBConnection()
isogeny=conn.ellcurves.isogeny
curves=conn.ellc... | ajibawa-2023/Python-Code-Large/train/row_81740 | 68 | 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_81740:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0479, 0.0638, 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_81740:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81740:Return_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81740:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81740:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: utf-8 -*-
from base import app
from flask import Flask, session, g, render_template, url_for, request, redirect, make_response
_bc = 'intro'
@app.route("/intro")
def introduction():
return render_template("intro.html", title="Gentle Introduction", kid='intro', body_class=_bc)
@app.route("/intro/fea... | ajibawa-2023/Python-Code-Large/train/row_81742 | 13 | 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_81742:ImportFrom_L2_C0", "label": "from base import app", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0385, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["app"], "rhs_c... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81742:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81742:Return_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81742:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81742:Return_L13_C4"}, {"f": "ajibawa-2023/Python-Code... |
import sys
from sage.all import DirichletGroup
import pymongo
from pymongo import Connection
import sage.libs.lcalc.lcalc_Lfunction as lc
import base
C = base.getDBConnection()
db = C.Lfunctions
first_zeros = db.first_zeros_testing
first_zeros.drop()
for q in range(3, 1500):
print q
sys.stdout.flush()
... | ajibawa-2023/Python-Code-Large/train/row_81743 | 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_81743:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.04, 0.04, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81743:For_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81743:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81743:For_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81743:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_8... |
# This builds a database of L-functions that occur (maybe on the fly) on the website
#
import pymongo
import base
C = base.getDBConnection()
db = C.Lfunctions
from Lfunction import Lfunction, Lfunction_Dirichlet
# Iterators over L-functions. It would be nice to have all of the types of forms that appear on the site... | ajibawa-2023/Python-Code-Large/train/row_81744 | 26 | 40 | 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_81744:Import_L3_C0", "label": "pymongo import pymongo", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.075, 0.025, 0, 0.66, 0.0, 19, 0, 1, 0, 0, 19, 0, 0], "semantic": {"name": "pymongo", "arg_names": [], "import_names": ["pymongo"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81744:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81744:For_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81744:For_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81744:For_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
import sys
from sage.all import DirichletGroup
from sage.all import CC, EllipticCurve, sqrt
import pymongo
from pymongo import Connection
import sage.libs.lcalc.lcalc_Lfunction as lc
import base
C = base.getDBConnection()
Lfunctions = C.test.Lfunctions_test2
def remove_all():
Lfunctions.drop()
def insert_diri... | ajibawa-2023/Python-Code-Large/train/row_81745 | 85 | 117 | 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_81745:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0085, 0.0085, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81745:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81745:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81745:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81745:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
import re
import base
from pymongo import ASCENDING
import utils
logger = utils.make_logger("LFComp")
from elliptic_curve import lmfdb_label_regex
def characterlist(N,type):
from sage.modular.dirichlet import DirichletGroup
G = DirichletGroup(N)
primitive = []
all = []
for i in r... | ajibawa-2023/Python-Code-Large/train/row_81747 | 46 | 64 | 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_81747:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0156, 0.0156, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81747:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81747:ImportFrom_L10_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81747:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81747:Assign_L11_C5"}, {"f": "ajibawa-2023/Python-... |
import re
from sage.all import *
import utils
logger = utils.make_logger("LF")
def pair2complex(pair):
local = re.match(" *([^ ]+)[ \t]*([^ ]*)", pair)
if local:
rp = local.group(1)
if local.group(2):
ip = local.group(2)
else:
ip=0
else:
... | ajibawa-2023/Python-Code-Large/train/row_81749 | 240 | 359 | 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_81749:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0028, 0.0028, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81749:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81749:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81749:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81749:If_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
# -*- coding: utf-8 -*-
import re
from pymongo import ASCENDING
import base
from base import app
from flask import Flask, session, g, render_template, url_for, request, redirect, make_response
import flask
from utils import ajax_more, image_src, web_latex, to_dict, parse_range
import sage.all
from sage.all import Z... | ajibawa-2023/Python-Code-Large/train/row_81750 | 50 | 105 | 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_81750:Import_L2_C0", "label": "re import re", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.019, 0.0095, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81750:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81750:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81750:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81750:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Co... |
from pymongo import Connection
import math
import cmath
import datetime
from flask import url_for, make_response
import base
from modular_forms.elliptic_modular_forms.backend.web_modforms import *
from utils import make_logger
logger = make_logger("LF")
## ============================================
## Returns the ... | ajibawa-2023/Python-Code-Large/train/row_81751 | 500 | 1,160 | 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_81751:ImportFrom_L1_C0", "label": "from pymongo import Connection", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0009, 0.0009, 0, 0.66, 0.0, 19, 0, 1, 0, 0, 19, 0, 0], "semantic": {"name": "pymongo", "arg_names": [], "import_names": ["... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81751:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81751:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81751:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81751:If_L21_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# -*- coding: utf-8 -*-
import re
from pymongo import ASCENDING
import base
from base import app
from flask import Flask, session, g, render_template, url_for, request, redirect, make_response
import tempfile
import os
from utils import ajax_more, image_src, web_latex, to_dict, parse_range2, web_latex_split_on_pm, ma... | ajibawa-2023/Python-Code-Large/train/row_81752 | 378 | 606 | 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_81752:Import_L2_C0", "label": "re import re", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0033, 0.0017, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81752:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81752:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81752:If_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81752:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
# -*- encoding: utf-8 -*-
# this holds all the flask-login specific logic (+ url mapping an rendering templates)
# for the user management
# author: harald schilly <harald.schilly@univie.ac.at>
import pymongo
ASC = pymongo.ASCENDING
import flask
from functools import wraps
from base import app, getDBConnection
from fl... | ajibawa-2023/Python-Code-Large/train/row_81753 | 175 | 275 | 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_81753:Import_L6_C0", "label": "pymongo import pymongo", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0218, 0.0036, 0, 0.66, 0.0, 19, 0, 1, 0, 0, 19, 0, 0], "semantic": {"name": "pymongo", "arg_names": [], "import_names": ["pymongo"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81753:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81753:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81753:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81753:Return_L33_C2"}, {"f": "ajibawa-2023/Pytho... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# store passwords, check users, ...
# password hashing is done with fixed and variable salting
# Author: Harald Schilly <harald.schilly@univie.ac.at>
__all__ = [ 'LmfdbUser', 'user_exists' ]
# NEVER EVER change the fixed_salt!
fixed_salt = '=tU\xfcn|\xab\x0b!\x08\xe3\x... | ajibawa-2023/Python-Code-Large/train/row_81754 | 135 | 229 | 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_81754:Assign_L8_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [8, 8], "level": 0, "parent": null, "vector": [14, 0, 0.0349, 0.0044, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81754:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81754:Import_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81754:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81754:Return_L19_C2"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: utf8 -*-
"""
POST:
privatekey (required) Your private key
remoteip (required) The IP address of the user who solved the CAPTCHA.
challenge (required) The value of "recaptcha_challenge_field" sent via the form
response (required) The value of "recaptcha_response_field" sent via the form
"""
... | ajibawa-2023/Python-Code-Large/train/row_81755 | 16 | 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_81755:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.1486, 0.2162, 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_81755:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81755:Assign_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81755:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81755:Assign_L23_C2"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: utf-8 -*-
from main import login_page, login_manager, admin_required, housekeeping
from base import app
# secret key, necessary for sessions, and sessions are
# in turn necessary for users to login
app.secret_key = '9af"]ßÄ!_°$2ha€42~µ…010'
login_manager.setup_app(app)
app.register_blueprint(login_pa... | ajibawa-2023/Python-Code-Large/train/row_81756 | 5 | 14 | 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_81756:ImportFrom_L3_C0", "label": "from main import login_page, login_manager, admin_required\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2143, 0.0714, 0, 0.66, 0.0, 624, 0, 4, 0, 0, 624, 0, 0], "semantic": {"name": "main", "a... | [] |
artin_location = ("limbo","tim_artin_02")
galois_group_location = ("limbo","tim_nfgal_02")
from type_generation import String, Array, Dict, Int, Anything, Float
from standard_types import PolynomialAsString, PermutationAsList,\
TooLargeInt, LabelString, FiniteSequence, FiniteSet, PrimeIndexedSequence, AlgebraicNu... | ajibawa-2023/Python-Code-Large/train/row_81757 | 27 | 111 | 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_81757:Assign_L1_C0", "label": "artin_location =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.009, 0.009, 0, 0.66, 0.0, 938, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "artin_location", "arg_names": [], "import_names": [],... | [] |
# This implements new type generation facilities
# For instance, we can do Array(Int, Int, Int), immediately creating a type that consists of length 3 lists of int
# This can then inherit additional functionalities:
# class WithFunctionalities(Array(Int,Int,Int)):
# def extra_func(self,...):
# pass
# In addi... | ajibawa-2023/Python-Code-Large/train/row_81758 | 48 | 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_81758:FunctionDef_L20_C0", "label": "wrapper", "type": "function", "loc": [20, 28], "level": 0, "parent": null, "vector": [2, 0, 0.1951, 0.0732, 0, 0.66, 0.0, 353, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "wrapper", "arg_names": ["f"], "import_names": [], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81758:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81758:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81758:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81758:Expr_L22_C8"}, {"f": "ajibawa-2023/Python... |
from type_generation import String, Array, Dict, Int, Anything, Float
def PolynomialAsString(convention):
class ParametrizedPolynomialAsString(String):
def sage(self):
return convention(self)
def latex(self, letter = convention.variable_name()):
return self.sage().c... | ajibawa-2023/Python-Code-Large/train/row_81759 | 42 | 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_81759:ImportFrom_L1_C0", "label": "from type_generation import String, Array, Dict\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0145, 0.0145, 0, 0.66, 0.0, 946, 0, 6, 0, 0, 946, 0, 0], "semantic": {"name": "type_generation", "a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81759:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81759:ClassDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81759:ClassDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81759:FunctionDef_L5_C8"}, {"f": "ajibawa-2023/Python-Co... |
from base import getDBConnection
from pymongo.collection import Collection
from databases import databases_logger
def bind_collection(name, type_conversion):
database, collection = name
def tmp(connection):
return ExtendedCollection(connection[database], collection, type_conversion)
return tmp
cla... | ajibawa-2023/Python-Code-Large/train/row_81760 | 30 | 40 | 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_81760:ImportFrom_L1_C0", "label": "from base import getDBConnection", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["get... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81760:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81760:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81760:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81760:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-C... |
from utils import make_logger
databases_logger = make_logger("databases_logger", hl = True)
from type_generation import *
from standard_types import *
from Dokchitser_databases import *
| ajibawa-2023/Python-Code-Large/train/row_81761 | 5 | 7 | 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_81761:ImportFrom_L1_C0", "label": "from utils import make_logger", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 970, 0, 1, 0, 0, 970, 0, 0], "semantic": {"name": "utils", "arg_names": [], "import_names": ["m... | [] |
# -*- coding: utf-8 -*-
# This Blueprint is about Artin representations
# Author: Paul-Olivier Dehaye
import pymongo
ASC = pymongo.ASCENDING
import flask
from base import app, getDBConnection
from flask import render_template, render_template_string, request, abort, Blueprint, url_for, make_response
from artin_represe... | ajibawa-2023/Python-Code-Large/train/row_81762 | 47 | 84 | 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_81762:Import_L5_C0", "label": "pymongo import pymongo", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0595, 0.0119, 0, 0.66, 0.0, 19, 0, 1, 0, 0, 19, 0, 0], "semantic": {"name": "pymongo", "arg_names": [], "import_names": ["pymongo"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81762:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81762:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81762:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81762:For_L16_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# -*- coding: utf-8 -*-
from base import app, getDBConnection
from utils import make_logger
from flask import Blueprint
artin_representations_page = Blueprint("artin_representations", __name__, template_folder='templates', static_folder="static")
artin_logger = make_logger("artin", hl = True)
artin_logger.info("Ini... | ajibawa-2023/Python-Code-Large/train/row_81763 | 10 | 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_81763:ImportFrom_L2_C0", "label": "from base import app, getDBConnection", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1053, 0.0526, 0, 0.66, 0.0, 47, 0, 2, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81763:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81763:Return_L13_C2"}] |
# -*- coding: utf-8 -*-
# This Blueprint is about Galois Groups
# Author: John Jones
import pymongo
ASC = pymongo.ASCENDING
import flask
import base
from base import app, getDBConnection
from flask import render_template, render_template_string, request, abort, Blueprint, url_for, make_response
from utils import ajax_... | ajibawa-2023/Python-Code-Large/train/row_81764 | 117 | 162 | 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_81764:Import_L5_C0", "label": "pymongo import pymongo", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0309, 0.0062, 0, 0.66, 0.0, 19, 0, 1, 0, 0, 19, 0, 0], "semantic": {"name": "pymongo", "arg_names": [], "import_names": ["pymongo"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81764:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81764:Assign_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81764:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81764:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
# -*- coding: utf-8 -*-
from base import app
from utils import make_logger
from flask import Blueprint
galois_groups_page = Blueprint("galois_groups", __name__, template_folder='templates', static_folder="static")
logger = make_logger(galois_groups_page)
@galois_groups_page.context_processor
def body_class():
retur... | ajibawa-2023/Python-Code-Large/train/row_81765 | 9 | 17 | 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_81765:ImportFrom_L2_C0", "label": "from base import app", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1176, 0.0588, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["app"], "rhs_c... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81765:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81765:Return_L11_C2"}] |
# -*- coding: utf-8 -*-
# This Blueprint is about the Galois groups of number fields
# Author: Paul-Olivier Dehaye
import pymongo
ASC = pymongo.ASCENDING
import flask
from base import app, getDBConnection, url_for
from flask import render_template, render_template_string, request, abort, Blueprint, url_for, make_respo... | ajibawa-2023/Python-Code-Large/train/row_81766 | 43 | 80 | 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_81766:Import_L5_C0", "label": "pymongo import pymongo", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0125, 0, 0.66, 0.0, 19, 0, 1, 0, 0, 19, 0, 0], "semantic": {"name": "pymongo", "arg_names": [], "import_names": ["pymongo"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81766:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81766:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81766:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81766:For_L15_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# -*- coding: utf-8 -*-
from base import app
from utils import make_logger
from flask import Blueprint
nfgg_page = Blueprint("number_field_galois_groups", __name__, template_folder='templates', static_folder="static")
nfgg_logger = make_logger(nfgg_page)
@nfgg_page.context_processor
def body_class():
return { 'body... | ajibawa-2023/Python-Code-Large/train/row_81767 | 9 | 17 | 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_81767:ImportFrom_L2_C0", "label": "from base import app", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1176, 0.0588, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["app"], "rhs_c... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81767:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81767:Return_L11_C2"}] |
# -*- encoding: utf-8 -*-
# this is the caching wrapper, use it like this:
# @app.route(....)
# @cached()
# def func(): ...
import logging
import re
from flask import request, make_response
from functools import wraps
from werkzeug.contrib.cache import SimpleCache
from copy import copy
from werkzeug import cached_pr... | ajibawa-2023/Python-Code-Large/train/row_81768 | 295 | 433 | 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_81768:Import_L6_C0", "label": "logging import logging", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0139, 0.0023, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81768:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81768:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81768:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81768:FunctionDef_L22_C8"}, {"f": "ajibawa-2023... |
# -*- coding: utf-8 -*-
# This Blueprint is about Local Number Fields
# Author: John Jones
import pymongo
ASC = pymongo.ASCENDING
import flask
import base
from base import app, getDBConnection
from flask import render_template, render_template_string, request, abort, Blueprint, url_for, make_response
from utils import... | ajibawa-2023/Python-Code-Large/train/row_81769 | 130 | 194 | 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_81769:Import_L5_C0", "label": "pymongo import pymongo", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0258, 0.0052, 0, 0.66, 0.0, 19, 0, 1, 0, 0, 19, 0, 0], "semantic": {"name": "pymongo", "arg_names": [], "import_names": ["pymongo"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81769:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81769:Assign_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81769:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81769:For_L21_C2"}, {"f": "ajibawa-2023/Python-Code-... |
import sys, time
from pymongo.connection import Connection
fields = Connection(port=37010).localfields.fields
# The database entries have the following fields
# p: the prime
# n: the degree
# c: discriminant exponent
# e: ramification index
# f: residue field degree
# coefs: a vector of coefficients
# gal: code for t... | ajibawa-2023/Python-Code-Large/train/row_81770 | 34 | 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_81770:Import_L1_C0", "label": "sys import sys, time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0106, 0.0106, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "time"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81770:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81770:Return_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81770:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81770:Return_L30_C4"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: utf-8 -*-
from base import app
from utils import make_logger
from flask import Blueprint
local_fields_page = Blueprint("local_fields", __name__, template_folder='templates', static_folder="static")
logger = make_logger(local_fields_page)
@local_fields_page.context_processor
def body_class():
return { ... | ajibawa-2023/Python-Code-Large/train/row_81771 | 9 | 17 | 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_81771:ImportFrom_L2_C0", "label": "from base import app", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1176, 0.0588, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["app"], "rhs_c... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81771:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81771:Return_L11_C2"}] |
#from mf_utils import ModularFormDisplay
from mf_classes import MFDataTable
import mf_classes
import mf_utils
| ajibawa-2023/Python-Code-Large/train/row_81772 | 3 | 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_81772:ImportFrom_L2_C0", "label": "from mf_classes import MFDataTable", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.25, 0, 0.66, 0.0, 708, 0, 1, 0, 0, 708, 0, 0], "semantic": {"name": "mf_classes", "arg_names": [], "import_names"... | [] |
import base
def get_distinct_keys(dbname,key):
res = []
db = base.DBConnect(dbname)
for c in db.collection_names():
res.extend(db[c].distinct(key))
res = set(res)
res = list(res)
return res
def my_get(dict,key,default,f=None):
r"""
Improved version of dict.get where an empty s... | ajibawa-2023/Python-Code-Large/train/row_81773 | 17 | 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_81773:Import_L1_C0", "label": "base import base", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.037, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["base"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81773:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81773:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81773:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81773:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
from base import app
from flask import render_template,url_for
from modular_forms import mf,MF,mf_logger
@mf.context_processor
def body_class():
return { 'body_class' : MF }
mf_logger.debug("EN_V path: {0}".format(app.jinja_loader.searchpath ))
@mf.route("/")
def modular_form_main_page():
info=dict()
title ... | ajibawa-2023/Python-Code-Large/train/row_81775 | 10 | 14 | 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_81775:ImportFrom_L1_C0", "label": "from base import app", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["app"], "rhs_c... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81775:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81775:Return_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81775:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81775:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code... |
from mf_main import *
| ajibawa-2023/Python-Code-Large/train/row_81776 | 1 | 2 | 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_81776:ImportFrom_L1_C0", "label": "from mf_main import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 626, 0, 1, 0, 0, 626, 0, 0], "semantic": {"name": "mf_main", "arg_names": [], "import_names": ["*"], "rhs_cal... | [] |
from base import app
from flask import render_template,url_for
##from modular_forms.maass_forms import maassf,MAASSF,maassf_logger
from modular_forms.maass_forms import maassf,MAASSF,maassf_logger
@maassf.context_processor
def body_class():
return { 'body_class' : MAASSF }
@maassf.route("/")
def maass_forms_main_pa... | ajibawa-2023/Python-Code-Large/train/row_81777 | 10 | 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_81777:ImportFrom_L1_C0", "label": "from base import app", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0667, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["app"], "rhs_c... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81777:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81777:Return_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81777:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81777:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code... |
from base import app
from utils import make_logger
import flask
### The different kinds of Maass forms we have.
import maassf_main
#app.register_blueprint(views.mwf_main.mwf, url_prefix="/ModularForm/GL2/Q/Maass")
#app.register_blueprint(views.mwfp_main.mwfp, url_prefix="/ModularForm/GL2/C/Maass")
| ajibawa-2023/Python-Code-Large/train/row_81778 | 4 | 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_81778:ImportFrom_L1_C0", "label": "from base import app", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0909, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["app"], "rhs_c... | [] |
#from utils import *
from modular_forms.maass_forms.picard import * #MWFP,mwfp_logger, mwfp
from modular_forms.backend.mf_utils import *
from modular_forms.backend.mf_classes import MFDataTable
from flask import url_for
class PicardDataTable(MFDataTable):
def __init__(self,dbname='HTPicard',**kwds):
... | ajibawa-2023/Python-Code-Large/train/row_81779 | 83 | 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_81779:ImportFrom_L2_C0", "label": "from modular_forms.maass_forms.picard import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0106, 0, 0.66, 0.0, 513, 0, 1, 0, 0, 513, 0, 0], "semantic": {"name": "modular_forms.maass_forms.p... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81779:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81779:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81779:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81779:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-... |
from mwfp_classes import PicardDataTable,PicardFormTable
| ajibawa-2023/Python-Code-Large/train/row_81780 | 1 | 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"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81780:ImportFrom_L1_C0", "label": "from mwfp_classes import PicardDataTable, PicardFormTable", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 686, 0, 2, 0, 0, 686, 0, 0], "semantic": {"name": "mwfp_classes", "arg_na... | [] |
import flask
from flask import render_template,url_for,request,render_template_string
#import bson
#import base
#from base import app
#from modular_forms.maass_forms.picard import MWFP,mwfp,mwfp_logger
#logger = mwfp_logger
#from modular_forms.maass_forms.maass_waveform import MWFTable
#import modular_forms.maass_for... | ajibawa-2023/Python-Code-Large/train/row_81781 | 48 | 79 | 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_81781:Import_L1_C0", "label": "flask import flask", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0127, 0.0127, 0, 0.66, 0.0, 782, 0, 1, 0, 0, 782, 0, 0], "semantic": {"name": "flask", "arg_names": [], "import_names": ["flask"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81781:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81781:Return_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81781:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81781:Return_L28_C4"}, {"f": "ajibawa-2023/Python-Co... |
import mwfp_main
| ajibawa-2023/Python-Code-Large/train/row_81782 | 1 | 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_81782:Import_L1_C0", "label": "mwfp_main import mwfp_main", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 926, 0, 1, 0, 0, 926, 0, 0], "semantic": {"name": "mwfp_main", "arg_names": [], "import_names": ["mwfp_mai... | [] |
from utils import make_logger
from flask import Blueprint
MWFP="mwfp"
mwfp = Blueprint(MWFP, __name__, template_folder="views/templates")
mwfp_logger=make_logger(mwfp)
mwfp_dbname = 'HTPicard'
import views
import backend
| ajibawa-2023/Python-Code-Large/train/row_81783 | 8 | 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_81783:ImportFrom_L1_C0", "label": "from utils import make_logger", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 970, 0, 1, 0, 0, 970, 0, 0], "semantic": {"name": "utils", "arg_names": [], "import_names": ["m... | [] |
r"""
Classes for displaying Maass waveforms on the web.
"""
class WebMaassFormSpace:
pass
class WebMaassForm:
pass
| ajibawa-2023/Python-Code-Large/train/row_81784 | 3 | 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_81784:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.2727, 0.2727, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
from web_maassforms import WebMaassFormSpace,WebMaassForm
from mwf_utils import *
from mwf_classes import *
| ajibawa-2023/Python-Code-Large/train/row_81787 | 3 | 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_81787:ImportFrom_L1_C0", "label": "from web_maassforms import WebMaassFormSpace, WebMaassForm", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 107, 0, 2, 0, 0, 107, 0, 0], "semantic": {"name": "web_maassforms"... | [] |
import mwf_main
| ajibawa-2023/Python-Code-Large/train/row_81791 | 1 | 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_81791:Import_L1_C0", "label": "mwf_main import mwf_main", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 690, 0, 1, 0, 0, 690, 0, 0], "semantic": {"name": "mwf_main", "arg_names": [], "import_names": ["mwf_mai... | [] |
from utils import make_logger
from flask import Blueprint
MWF="mwf" # Maass waveforms
mwf = Blueprint(MWF, __name__, template_folder="views/templates",static_folder="views/static")
mwf_logger = make_logger(mwf)
import backend
import views
| ajibawa-2023/Python-Code-Large/train/row_81792 | 7 | 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_81792:ImportFrom_L1_C0", "label": "from utils import make_logger", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0909, 0, 0.66, 0.0, 970, 0, 1, 0, 0, 970, 0, 0], "semantic": {"name": "utils", "arg_names": [], "import_names": ["m... | [] |
# /modular_forms/maass_forms/__init__.py
from utils import make_logger
from flask import Blueprint
MAASSF = "maassf"
maassf = Blueprint(MAASSF, __name__, template_folder="views/templates")
maassf_logger=make_logger(maassf)
import maass_waveforms
import picard
| ajibawa-2023/Python-Code-Large/train/row_81793 | 7 | 13 | 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_81793:ImportFrom_L3_C0", "label": "from utils import make_logger", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2308, 0.0769, 0, 0.66, 0.0, 970, 0, 1, 0, 0, 970, 0, 0], "semantic": {"name": "utils", "arg_names": [], "import_names": ["m... | [] |
# / modular_forms/__init__.py
import base
import utils
import flask
MF_TOP = "Modular Forms"
MF = "mf"
mf = flask.Blueprint(MF, __name__, template_folder="views/templates",static_folder="views/static")
mf_logger=utils.make_logger(mf)
import views
import backend
import elliptic_modular_forms
import maass_forms
from ... | ajibawa-2023/Python-Code-Large/train/row_81794 | 18 | 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_81794:Import_L2_C0", "label": "base import base", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0435, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["base"], "rhs_call_name... | [] |
# -*- coding: utf-8 -*-
#*****************************************************************************
# Copyright (C) 2010 Fredrik Strömberg <fredrik314@gmail.com>,
#
# Distributed under the terms of the GNU General Public License (GPL)
#
# This code is distributed in the hope that it will be useful,
# but WIT... | ajibawa-2023/Python-Code-Large/train/row_81796 | 199 | 278 | 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_81796:Expr_L16_C0", "label": "expression", "type": "expression", "loc": [16, 21], "level": 0, "parent": null, "vector": [8, 0, 0.0665, 0.0216, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81796:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81796:If_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81796:If_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81796:Return_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
r"""
Contains basic classes for displaying holomorphic modular forms.
"""
from sage.all import vector,is_odd,DirichletGroup,is_even,Gamma1,dimension_new_cusp_forms,kronecker_character_upside_down,loads,Integer
from modular_forms.backend.mf_classes import MFDisplay,MFDataTable
emf_dbname = 'modularforms'
from utils i... | ajibawa-2023/Python-Code-Large/train/row_81797 | 229 | 300 | 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_81797:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.01, 0.0167, 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_81797:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81797:Import_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81797:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81797:Return_L14_C4"}, {"f": "ajibawa-2023/Python-Co... |
from plot_dom import *
from web_modforms import WebModFormSpace,WebNewForm,html_table
from emf_classes import *
| ajibawa-2023/Python-Code-Large/train/row_81798 | 3 | 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_81798:ImportFrom_L1_C0", "label": "from plot_dom import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 849, 0, 1, 0, 0, 849, 0, 0], "semantic": {"name": "plot_dom", "arg_names": [], "import_names": ["*"], ... | [] |
# -*- coding: utf-8 -*-
#*****************************************************************************
# Copyright (C) 2010 Fredrik Strömberg <fredrik314@gmail.com>,
#
# Distributed under the terms of the GNU General Public License (GPL)
#
# This code is distributed in the hope that it will be useful,
# but WIT... | ajibawa-2023/Python-Code-Large/train/row_81801 | 59 | 80 | 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_81801:Expr_L16_C0", "label": "expression", "type": "expression", "loc": [16, 21], "level": 0, "parent": null, "vector": [8, 0, 0.2313, 0.075, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81801:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81801:Expr_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81801:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81801:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
from emf_main import *
| ajibawa-2023/Python-Code-Large/train/row_81805 | 1 | 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"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81805:ImportFrom_L1_C0", "label": "from emf_main import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 27, 0, 1, 0, 0, 27, 0, 0], "semantic": {"name": "emf_main", "arg_names": [], "import_names": ["*"], "rhs_cal... | [] |
from utils import to_dict,image_src
from sage.all import dimension_new_cusp_forms,dimension_cusp_forms,dimension_eis,dimension_modular_forms
from modular_forms.elliptic_modular_forms import EMF, emf_logger, emf,EMF_TOP
from modular_forms.elliptic_modular_forms.backend.emf_core import get_geometric_data
from modular_for... | ajibawa-2023/Python-Code-Large/train/row_81806 | 268 | 337 | 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_81806:ImportFrom_L1_C0", "label": "from utils import to_dict, image_src", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.003, 0.003, 0, 0.66, 0.0, 970, 0, 2, 0, 0, 970, 0, 0], "semantic": {"name": "utils", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81806:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81806:If_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81806:If_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81806:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
import utils
import flask
## Some common definitions to use in this module.
default_prec = 10 # The default number of terms in a q-expansion
default_bprec = 26 # The default number of bits of precision to display in floating point data
EMF_TOP = "Holomorphic Modular Forms" # The name to use for the top of this cate... | ajibawa-2023/Python-Code-Large/train/row_81807 | 13 | 18 | 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_81807:Import_L1_C0", "label": "utils import utils", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 970, 0, 1, 0, 0, 970, 0, 0], "semantic": {"name": "utils", "arg_names": [], "import_names": ["utils"], "rhs_ca... | [] |
import math
import logging
class WebHMF:
"""Class for presenting a Hilbert modular form on a web page
"""
def __init__(self, dict):
self.type = dict['type']
self.coefficient_period = 0
self.poles = []
self.residues = []
self.kappa_fe = []
... | ajibawa-2023/Python-Code-Large/train/row_81808 | 109 | 154 | 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_81808:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0065, 0.0065, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81808:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81808:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81808:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81808:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# -*- coding: utf-8 -*-
import os.path, sys
from sage.all import SQLDatabase
import base
padic_db = base.getDBConnection().ellcurves.padic_db
padic_db.ensure_index("label")
padic_db.ensure_index("prime")
def lookup_or_create(label,p):
item = padic_db.find_one({'label': label, 'p': p})
if item is None:
... | ajibawa-2023/Python-Code-Large/train/row_81809 | 11 | 33 | 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_81809:Import_L2_C0", "label": "os.path import os.path, sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0606, 0.0303, 0, 0.66, 0.0, 79, 0, 2, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81809:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81809:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81809:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81809:If_L12_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# search in arrays of ints or bucket search for floats in arrays
# copyright: harald schilly <harald.schilly@gmail.com>
# license: Apache 2.0
from pymongo import *
import random
from math import floor, ceil
import base
conn = base.getDBConnection()
test = conn.testdb.test
test.remove()
test.ensure_index('list')
for ... | ajibawa-2023/Python-Code-Large/train/row_81810 | 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_81810:ImportFrom_L1_C0", "label": "from pymongo import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 19, 0, 1, 0, 0, 19, 0, 0], "semantic": {"name": "pymongo", "arg_names": [], "import_names": ["*"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81810:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81810:Import_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81810:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81810:Return_L8_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# Map/Reduce example for MongoDB
# returns the minimum and maxium lenght of the interval between two values with sign changes around the origin.
# this mimics searching for ranges where there is no root around the origin.
# copyright harald schilly <harald.schilly@gmail.com>
# license apach 2.0
from pymongo import *
f... | ajibawa-2023/Python-Code-Large/train/row_81811 | 15 | 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_81811:ImportFrom_L7_C0", "label": "from pymongo import *", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.0179, 0, 0.66, 0.0, 19, 0, 1, 0, 0, 19, 0, 0], "semantic": {"name": "pymongo", "arg_names": [], "import_names": ["*"], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81811:For_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81811:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81811:For_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81811:Expr_L54_C4"}] |
# reference other objects in the same collection or across to other collections *automatically*
# copyright: harald schilly <harald.schilly@gmail.com>
# license: Apache 2.0
from pymongo import *
import base
db = base.getDBConnection().db
data1 = db.refdata1
data1.remove()
data2 = db.refdata2
data2.remove()
# here c... | ajibawa-2023/Python-Code-Large/train/row_81812 | 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_81812:ImportFrom_L1_C0", "label": "from pymongo import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 19, 0, 1, 0, 0, 19, 0, 0], "semantic": {"name": "pymongo", "arg_names": [], "import_names": ["*"], "rhs... | [] |
# -*- coding: utf8 -*-
#ListCharacters.py
import re
from flask import render_template, url_for, make_response
from sage.all import *
import tempfile, os
import pymongo
from WebCharacter import *
from utils import to_dict
from sage.rings.arith import euler_phi
#from dirichlet_conrey import *
def get_character_modul... | ajibawa-2023/Python-Code-Large/train/row_81815 | 87 | 122 | 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_81815:Import_L4_C0", "label": "re import re", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0328, 0.0082, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81815:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81815:ImportFrom_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81815:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81815:Assign_L19_C4"}, {"f": "ajibawa-2023/Pytho... |
# -*- coding: utf-8 -*-
### THIS IS JUST FOR DEMO PURPOSES ###
from flask import make_response
import tempfile
import os
from sage.all import var, plot, sin
def render_plot(args):
data = plotit(**args)
response = make_response(data)
response.headers['Content-type'] = 'image/png'
return response
de... | ajibawa-2023/Python-Code-Large/train/row_81817 | 18 | 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_81817:ImportFrom_L5_C0", "label": "from flask import make_response", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1852, 0.037, 0, 0.66, 0.0, 782, 0, 1, 0, 0, 782, 0, 0], "semantic": {"name": "flask", "arg_names": [], "import_names": ["... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81817:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81817:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81817:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81817:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Co... |
from base import app, getDBConnection
import flask
from flask import render_template, request
from utils import LazyMongoDBPagination
from copy import copy
import pymongo
mod = flask.Blueprint('LfunctionDB', __name__, template_folder="templates")
title = "L-function search"
@mod.context_processor
def body_class():
... | ajibawa-2023/Python-Code-Large/train/row_81821 | 47 | 72 | 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_81821:ImportFrom_L1_C0", "label": "from base import app, getDBConnection", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0139, 0.0139, 0, 0.66, 0.0, 47, 0, 2, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81821:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81821:Return_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81821:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81821:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Co... |
from base import app
import main
app.register_blueprint(main.mod, url_prefix="/LfunctionDB")
| ajibawa-2023/Python-Code-Large/train/row_81822 | 3 | 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_81822:ImportFrom_L1_C0", "label": "from base import app", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["app"], "rhs_call_... | [] |
# -*- coding: utf-8 -*-
# the basic knowlege object, with database awareness, …
from knowledge import logger
from base import getDBConnection
from datetime import datetime
import pymongo
ASC = pymongo.ASCENDING
DSC = pymongo.DESCENDING
def get_knowls():
_C = getDBConnection()
knowls = _C.knowledge.knowls
knowls.... | ajibawa-2023/Python-Code-Large/train/row_81824 | 183 | 321 | 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_81824:ImportFrom_L3_C0", "label": "from knowledge import logger", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0093, 0.0031, 0, 0.66, 0.0, 130, 0, 1, 0, 0, 130, 0, 0], "semantic": {"name": "knowledge", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81824:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81824:Assign_L11_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81824:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81824:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: utf-8 -*-
from base import app
from utils import make_logger
from flask import Blueprint
knowledge_page = Blueprint("knowledge", __name__, template_folder='templates')
logger = make_logger(knowledge_page)
import main
app.register_blueprint(knowledge_page, url_prefix="/knowledge")
| ajibawa-2023/Python-Code-Large/train/row_81825 | 7 | 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_81825:ImportFrom_L2_C0", "label": "from base import app", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0833, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["app"], "rhs_c... | [] |
import re
import pymongo
import string
from base import app, getDBConnection
from flask import Flask, session, g, render_template, url_for, request, redirect
import sage.all
from sage.all import ZZ, latex, AbelianGroup, pari, gap
from utils import ajax_more, image_src, web_latex, to_dict, parse_range
from pymongo.c... | ajibawa-2023/Python-Code-Large/train/row_81826 | 263 | 391 | 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_81826:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0026, 0.0026, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81826:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81826:Return_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81826:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81826:Assign_L21_C2"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: utf-8 -*-
from base import *
from flask import Flask, session, g, render_template, url_for, request, redirect, make_response, abort
from sage.all import *
import tempfile, os
import pymongo
from Lfunction import *
import LfunctionComp
import LfunctionPlot
from utils import to_dict #, make_logger
import b... | ajibawa-2023/Python-Code-Large/train/row_81827 | 377 | 726 | 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_81827:ImportFrom_L2_C0", "label": "from base import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0028, 0.0014, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["*"], "rhs_call_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81827:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81827:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81827:FunctionDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81827:Expr_L58_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
import sys
import os
import glob
def main():
source_folder = os.path.join('bin', 'release')
new_version = None
suggest_string = ''
for testfile in glob.glob( os.path.join(source_folder, 'Duplicati *.zip') ):
version_info = testfile[testfile.rfind('Duplicati ') + ... | ajibawa-2023/Python-Code-Large/train/row_81828 | 81 | 120 | 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_81828:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.0083, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81828:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81828:Assign_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81828:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81828:Assign_L11_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementat... | ajibawa-2023/Python-Code-Large/train/row_81829 | 90 | 248 | 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_81829:Expr_L46_C0", "label": "expression", "type": "expression", "loc": [46, 47], "level": 0, "parent": null, "vector": [8, 0, 0.1875, 0.0081, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81829:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81829:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81829:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81829:If_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
"""
This file is a standalone python script that is tested with python 2.6.5
If Duplicati is producing a backup with the option --create-verification-file,
it will produce a .verification file on the backend, which can be verified
by this script. Simply run this script with the path to the ... | ajibawa-2023/Python-Code-Large/train/row_81830 | 59 | 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_81830:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0638, 0.0745, 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_81830:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81830:While_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81830:While_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_81830:Assign_L21_C3"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_81831 | 133 | 305 | 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_81831:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0557, 0.0033, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81831:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81831:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81831:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81831:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_81832 | 218 | 605 | 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_81832:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0281, 0.0017, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81832:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81832:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81832:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81832:Return_L54_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | ajibawa-2023/Python-Code-Large/train/row_81834 | 51 | 187 | 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_81834:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1818, 0.0267, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81834:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81834:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81834:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81834:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | ajibawa-2023/Python-Code-Large/train/row_81836 | 86 | 244 | 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_81836:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0738, 0.0041, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81836:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81836:Expr_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81836:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81836:FunctionDef_L39_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | ajibawa-2023/Python-Code-Large/train/row_81838 | 155 | 378 | 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_81838:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0741, 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_81838:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81838:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81838:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81838:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_81839 | 7 | 32 | 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_81839:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81839:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81839:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81839:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81839:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_81841 | 396 | 1,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_81841:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0145, 0.0035, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81841:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81841:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81841:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81841:ImportFrom_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_81842 | 33 | 105 | 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_81842:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1619, 0.0476, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81842:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81842:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81842:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81842:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_81843 | 46 | 106 | 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_81843:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1604, 0.0472, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81843:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81843:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81843:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81843:FunctionDef_L35_C2"}, {"f": "ajibawa-2023/Python-Code-... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_81844 | 1 | 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"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81844:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_81845 | 63 | 124 | 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_81845:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1371, 0.0403, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81845:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81845:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81845:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81845:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_81847 | 57 | 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_81847:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0814, 0.1105, 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_81847:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81847:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81847:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81847:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_81848 | 114 | 303 | 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_81848:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1205, 0.1452, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81848:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81848:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81848:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81848:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.