seq_id string | text string | repo_name string | sub_path string | file_name string | file_ext string | file_size_in_byte int64 | program_lang string | lang string | doc_type string | stars int64 | dataset string | pt string | api list |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
56301273 | from kafka import KafkaConsumer
from textbooks import usedBookCost
from time import sleep
def consumer3():
# This consumer tells the user which texbook they need
consumer = KafkaConsumer('book_price', bootstrap_servers='localhost:9092')
for msg in consumer:
og_price = float(msg.value)
print("U... | null | usedbooks_consumer.py | usedbooks_consumer.py | py | 419 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "kafka.KafkaConsumer",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "textbooks.usedBookCost",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 12,
"usage_type": "call"
}
] |
298751092 | from django.conf.urls import url
from django.urls import path, re_path
from .views import item_page, edit_page, hello, delete_page, search_page,stream_http_download
app_name="item"
urlpatterns = [
url(r'^(?P<id>[\w-]+)/$',item_page , name='item_page'),
url(r'^edit/(?P<id>[\w-]+)/$',edit_page , name='edit_pag... | null | item/urls.py | urls.py | py | 614 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.conf.urls.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "views.item_page",
"line_number": 6,
"usage_type": "argument"
},
{
"api_name": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.edit... |
275945411 |
from os import system, environ
from os.path import join, exists
from shell import file_tree_list, banner, shell
from log import log
# ----------------------------
# Command Interpreter
def src_command(options):
log('src command %s' % options)
if options:
cmd = options[0]
args = options[1:]... | null | bin/src.py | src.py | py | 4,806 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "log.log",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "shell.shell",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "shell.file_tree_list",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_n... |
21080562 | # This class should represent the agent-environment interface needed
# for the setup of every experiment.
import numpy as np
import tensorflow as tf
import tflearn
from gym import make
from ddpg.actor_network import ActorNetwork
from ddpg.critic_network import CriticNetwork
from utils.noise import OrnsteinUhlenbeckAc... | null | reinforcement-learning-robohand/experiment_setup.py | experiment_setup.py | py | 5,401 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "tensorflow.Variable",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "tensorflow.summary.scalar",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "tensorflow.summary",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": ... |
289215587 | #!/usr/bin/env python
# coding: utf-8
import os
from flask import Flask, render_template, request
import logging
# for import top level package
# ref: [[Python3] 相対パスのimportで上位ディレクトリを指定できない問題とその対策いろいろ](http://nisihunabasi.mods.jp/blog/?p=796)
import sys
from pathlib import Path
sys.path.append(str(Path(__file__).paren... | null | src/python/server/server.py | server.py | py | 1,371 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.path.append",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_nu... |
311642360 | from random import randrange,randint
from math import log
from scipy import ndimage
import Image
import numpy as np
import sys
import os
from scipy.sparse import coo_matrix
import scipy.sparse.linalg as linsolve
import pyopencl as cl
import pyopencl.array as cla
ctx = cl.create_some_context()
queue = cl.CommandQueue(c... | null | scripts/singularityCL.py | singularityCL.py | py | 8,818 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pyopencl.create_some_context",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pyopencl.CommandQueue",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pyopencl.mem_flags",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_na... |
99417641 | import boto3
sts_client = boto3.client('sts')
def assume_aws_role(account_id, role_name):
assumed_role_object = sts_client.assume_role(
RoleArn="arn:aws:iam::{}:role/{}".format(account_id, role_name),
RoleSessionName="starchart-web"
)
credentials = assumed_role_object['Credentials']
... | null | main/lib/assume_role.py | assume_role.py | py | 340 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "boto3.client",
"line_number": 3,
"usage_type": "call"
}
] |
466466019 | from collections import defaultdict
class graph:
def __init__(self):
self.graph = defaultdict(list)
self.status = False
def addgraph(self, u, v):
self.graph[u].append(v)
def BFS(self, s, t):
visited = [False] * (len(self.graph))
queue = []
queue.append(s)
... | null | SearchingAlgorithms/breadth_first_search.py | breadth_first_search.py | py | 976 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "collections.defaultdict",
"line_number": 4,
"usage_type": "call"
}
] |
582048825 | from urllib.request import urlopen
from bs4 import BeautifulSoup
from bs4 import re
import string
def clean(input):
input = re.sub('\n+'," ",input) # eliminate the newline character
input = re.sub('\[[0-9]*\]',"",input) # eliminate numbers
input = re.sub(' +'," ",input) # eliminate multiple spaces in ... | null | Practices/6.modifyData/1.cleanNgram.py | 1.cleanNgram.py | py | 1,142 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "bs4.re.sub",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "bs4.re",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "bs4.re.sub",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bs4.re",
"line_number": 8,
"usage_t... |
277025258 | #!/usr/bin/env python
"""
This module is for classes that holds stages of a workflow (BackupStages) or
a whole workflow (BackupSequence)
"""
import datetime
import logging
import os
import time
import scripts.python.backup_scheduler.workflows as workflows
import scripts.python.backup_scheduler.backup_utils as utils
... | null | scripts/python/backup_scheduler/backup_handlers.py | backup_handlers.py | py | 21,825 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.basename",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "scripts.python.backup... |
533658448 | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 6 13:56:29 2019
@author: Administrator
"""
import cv2
import os
import numpy as np
from PIL import Image
path = 'dataset1'
recognizer = cv2.face.EigenFaceRecognizer_create()
def getImagesAndLabels(path):
imagePaths = [os.path.join(path,f) for f in os.listdir(path)... | null | facetrain.py | facetrain.py | py | 949 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "cv2.face.EigenFaceRecognizer_create",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "cv2.face",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.pat... |
392719767 | import cv2
import numpy as np
import datetime
from PIL import ImageFont, ImageDraw, Image
from numpy.core.numeric import False_
#카메라 기본 틀
##영상에 글자 출력
cap = cv2.VideoCapture(0) #번호 0부터 시작 +1, = cap.open(웹캠 오픈)
#나눔고딕볼드 로드
font = ImageFont.truetype('./fonts/NanumGothicBold.ttf')
#영상 코덱 설정
fourcc = cv2.VideoWriter_fourc... | null | oepncv_mov06.py | oepncv_mov06.py | py | 2,050 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "PIL.ImageFont.truetype",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "PIL.ImageFont",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "cv2.VideoWriter_... |
405532666 | import sys
sys.path.append('Aula/Aula38')
import MySQLdb
from model.squad import Squad
class SquadDao:
def __init__(self):
self.conexao = MySQLdb.connect(host='mysql.padawans.dev', database='padawans19', user='padawans19', passwd='vt2019')
self.cursor = self.conexao.cursor()
def listar_todos... | null | AULAS_60/exercise_class_due_squad/dao/squad_dao.py | squad_dao.py | py | 3,482 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.path.append",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "MySQLdb.connect",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "model.squad.Squad",
"... |
472223113 | # --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incor... | null | src/swiftlet/azext_swiftlet/generated/_params.py | _params.py | py | 4,673 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "azure.cli.core.commands.parameters.resource_group_name_type",
"line_number": 28,
"usage_type": "argument"
},
{
"api_name": "azure.cli.core.commands.parameters.resource_group_name_type",
"line_number": 31,
"usage_type": "argument"
},
{
"api_name": "azure.cli.core.co... |
555173956 | import urllib2
import logging
from datetime import datetime
from django_pybrowscap import settings
from pybrowscap.loader.csv import load_file, URL
from pybrowscap.loader import Downloader
log = logging.getLogger(__name__)
class PybrowscapMiddleware(object):
"""Django middleware class for pybrowscap package.""... | null | django_pybrowscap/middleware.py | middleware.py | py | 2,671 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django_pybrowscap.settings.PYBROWSCAP_INITIALIZE",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "django_pybrowscap.settings",
"line_number": 22,
"usage_type": "na... |
393992658 | from __future__ import print_function
from pymongo import *
from apiclient.discovery import build
from httplib2 import Http
from oauth2client import file, client, tools
from googleapiclient import discovery
import pprint as pp
import re
client = MongoClient('mongodb://localhost:27017/')
SCOPES = 'https://www.googleap... | null | cooling_query.py | cooling_query.py | py | 3,024 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "oauth2client.client",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "oauth2client.file.Storage",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "oauth2client.file",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "oauth... |
421322062 | from nose.tools import eq_
from revscoring.extractors import OfflineExtractor
from ..process_pool import ProcessPool
from ...metrics_collectors import Logger
from .util import fakewiki, wait_time, test_scoring_system
from ...scorer_models import RevIdScorer
from ...scoring_context import ScoringContext
from ...score_c... | null | ores/scoring_systems/tests/test_process_pool.py | test_process_pool.py | py | 1,588 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "process_pool.ProcessPool",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "util.fakewiki",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "util.test_scoring_system",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "score... |
608608568 | '''
ciftoase.py: Converting CIF files to ASE Atoms object to use in GPAW calculation
Usage: $ python ciftoase.py file.cif
'''
import sys, os
from ase.io import read
# -------------------------------------------------------------
# Parameters
# -------------------------------------------------------------
Scaled = Fals... | null | optimizations/ciftoase.py | ciftoase.py | py | 2,461 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.argv",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "ase.io.read",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.splitext",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
544777982 | # encoding: utf-8
"""
Description: Class Fontaine for ENS mini project
Author: Adrien Llave - CentraleSupelec
Date: 04/03/2020
Version: 2.1
Date | Auth. | Vers. | Comments
30/01/20 VPe 1.0 Initialization
06/02/20 VPe 2.0 added class Fontaine débruitage un peu
04/03/20 ALl 2.1 - ... | null | src/Fontaine.py | Fontaine.py | py | 2,771 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.mod",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.euler_gamma",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_... |
551411401 | import bpy
import subprocess
import sys
import os
from . import uibase, ecs
from .utils import *
class Smithy2D_ComponentListAction(bpy.types.Operator, uibase.LexBaseListAction):
bl_idname = "lexlistaction.smithy2d_component_list_action"
bl_label = "Smithy2D Component List Action"
def get_collection(self)... | null | ui.py | ui.py | py | 6,975 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "bpy.types",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "bpy.context",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "bpy.context",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "bpy.types",
"line... |
598019317 | # Copyright 2021 The HuggingFace Team, Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# 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-... | null | tests/unit/test_mms_model_server.py | test_mms_model_server.py | py | 4,434 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sagemaker_huggingface_inference_toolkit.mms_model_server.start_model_server",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "sagemaker_huggingface_inference_toolkit.mms_model_server",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "sagemaker_in... |
318540795 | from enum import Enum
import wikipedia
import re
from googletrans import Translator
import unidecode
import pyowm
from PIL import Image, ImageDraw, ImageFont, ImageFilter
import requests
import urllib.request
from bs4 import BeautifulSoup
from io import BytesIO
import tempfile
from telebot.credentials import OWM_KEY
... | null | telebot/engine.py | engine.py | py | 3,874 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "enum.Enum",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "wikipedia.set_lang",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "googletrans.Translator",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pyowm.OWM",
"... |
188850627 | import pandas as pd
import pandas.io.data as web
import datetime
import matplotlib.pyplot as plt
from matplotlib import style
from statistics import mean
style.use('fivethirtyeight')
start = datetime.datetime(2007,1,1)
end = datetime.datetime(2016,12,1)
att = web.DataReader("T", 'yahoo', start, end)
describe = at... | null | DataAnalysis/pdFillNA.py | pdFillNA.py | py | 894 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.style.use",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.style",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "datetime.dateti... |
202251920 | from flask import Blueprint, render_template, request
from marshmallow import EXCLUDE, ValidationError
from logger import logger
from models.web.error_response import ErrorResponse
from models.web.signup_request import SignupRequestSchema
from services.customer import CustomerService
signup = Blueprint('user', __name... | null | controllers/signup/__init__.py | __init__.py | py | 1,128 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.Blueprint",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logger.logger.info",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "logger.logger",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "models.web.signup_req... |
136295179 | import json
import sys
import os
from math import hypot
DEFAULT_FILE_NAME = 'default.json'
DEFAULT_FILE_ENCODING = 'windows-1251'
def load_data(file_path, file_encoding):
with open(file_path, 'r', encoding=file_encoding) as json_file:
json_string = json_file.read()
parsed_string = json.loads(json... | null | bars.py | bars.py | py | 1,898 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "json.loads",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "math.hypot",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "os.path.isfile",
"line_number... |
217585536 | import os
import json
root = os.path.dirname(os.path.realpath(__file__))
with open('./config.json') as fp:
config = json.load(fp)
DB_URL = os.environ.get('DB_URL', None) or config['db']['url'].format(root=root)
REDIS_HOST = config['redis']['host']
REDIS_PORT = config['redis']['port']
# 'redis://localhost:6379'
R... | null | config.py | config.py | py | 415 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.dirname",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_numb... |
248728431 | import logging
import django_wysiwyg
# django
from django.core.urlresolvers import reverse
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import HttpResponseNotFound, Http404
from django.conf import settings
from django.shortcuts import render_to_response, redirect, HttpResp... | null | flatpage_composer/sites_flatpage/views.py | views.py | py | 4,772 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.views.generic.base.View",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "sites_flatpage.utils.delete_record",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "sites_flatpage.models.ExtendedFlatPage",
"line_number": 33,
"usage_type... |
2190748 | from src.repository.user_repository import UserRepository
from src.repository.task_repository import TaskRepository
from src.common.result import Result
from src.domain.task import Task
from datetime import datetime
from dataclasses import dataclass
from src.common.validators import empty_or_none_string, not_int
@dat... | null | src/use_caces/create_task_use_case.py | create_task_use_case.py | py | 2,082 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "src.common.validators.empty_or_none_string",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "src.common.result.Result.failure",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "src.common.result.Result",
"line_number": 20,
"usage_type": "... |
190071806 | from django.db import models
from django.db.models import Q
REPOSITORY_PUBLIC_FILTER = lambda u: Q(is_public=True)
REPOSITORY_LOGGED_IN_FILTER = lambda u: Q(Q(is_public=True) | Q(member__user=u))
class RepositoryManager(models.Manager):
def visible_repositories_for_user(self, user=None):
if not user or no... | null | gitweb/managers.py | managers.py | py | 521 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.db.models.Q",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "django.db.models.Q",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.db.models.Manager",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "djan... |
249989466 | # coding: utf-8
"""
Registry of Open Community Challenge API
The OpenAPI specification implemented by the Challenge Registries. # Introduction TBA # noqa: E501
The version of the OpenAPI document: 0.1.4
Contact: thomas.schaffter@sagebionetworks.org
Generated by: https://openapi-generator.tech
"... | null | roccclient/models/page_of_persons.py | page_of_persons.py | py | 7,031 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "roccclient.configuration.Configuration",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "six.iteritems",
"line_number": 196,
"usage_type": "call"
},
{
"api_name": "pprint.pformat",
"line_number": 218,
"usage_type": "call"
}
] |
30324793 | import matplotlib.pyplot as plt
import numpy as np
import gmeep as ms
def find_modes_sweep_width(wg_widths, **kwargs):
"""Returns effective index and group index for a mode.
Args:
wg_widths: list of widths (um)
mode_solver: you can pass an mpb.ModeSolver
mode_number: to compute
... | null | plugins/gmeep/gmeep/find_modes_sweep_width.py | find_modes_sweep_width.py | py | 1,378 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "gmeep.find_modes",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyp... |
276294128 | from shiftschema.validators.abstract_validator import AbstractValidator
from shiftschema.result import Error
from functools import reduce
class UniqueTypeHandle(AbstractValidator):
"""
Unique type handle
Checks that content type handle is unique and not repeated
"""
handle_not_unique = 'Content t... | null | shiftcontent/definition_schema/validators/unique_type_handle.py | unique_type_handle.py | py | 1,505 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "shiftschema.validators.abstract_validator.AbstractValidator",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "functools.reduce",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "shiftschema.result.Error",
"line_number": 46,
"usage_type": "... |
609976844 | # uncompyle6 version 3.7.4
# Python bytecode 3.6 (3379)
# Decompiled from: Python 3.6.9 (default, Apr 18 2020, 01:56:04)
# [GCC 8.4.0]
# Embedded file name: /Users/prihodad/Documents/projects/visitor/golm/golm/golm_admin/templatetags/golem_extras.py
# Compiled at: 2018-04-15 14:00:29
# Size of source mod 2**32: 416 by... | null | pycfiles/golm-0.9.1b0-py2.py3-none-any/golem_extras.cpython-36.py | golem_extras.cpython-36.py | py | 766 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.template.Library",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.template",
"line_number": 9,
"usage_type": "name"
}
] |
632670090 | import pyshader
from pytest import raises, mark
from testutils import can_use_vulkan_sdk
vertex_code = """
#version 450
out gl_PerVertex {
vec4 gl_Position;
};
const vec2 positions[3] = vec2[3](
vec2(0.0, -0.5),
vec2(0.5, 0.5),
vec2(-0.5, 0.5)
);
void main() {
gl_Position = vec4(positions[gl_... | null | tests/test_dev.py | test_dev.py | py | 1,736 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pyshader.dev.glsl2spirv",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "pyshader.dev",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "pyshader.dev.validate",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "pysha... |
413866030 | import pytest
from mock import Mock, call, patch
from pganonymizer.utils import get_connection, truncate_tables
class TestGetConnection:
@patch('pganonymizer.utils.psycopg2.connect')
def test(self, mock_connect):
connection_data = {
'dbname': 'test',
'user': 'user',
... | null | tests/test_utils.py | test_utils.py | py | 1,261 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pganonymizer.utils.get_connection",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "mock.patch",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "mock.Mock",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "mock.Mock",
... |
333324475 | # -*- coding: utf-8 -*-
import httplib as http
from flask import request
from dropbox.rest import ErrorResponse
from urllib3.exceptions import MaxRetryError
from framework.exceptions import HTTPError
from website.project.decorators import must_be_contributor_or_public, must_have_addon
from website.util import rubeus... | null | website/addons/dropbox/views/hgrid.py | hgrid.py | py | 3,005 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.request.args",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "website.util.rubeus.FOLDER",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": ... |
381045911 | import globalvars
import cv2 as cv
from iploader import read_inputs
import numpy as np
from blurproc import foccal, newmaskimg, renderopfast
from tqdm import tqdm
def application():
globalvars.img = cv.imread(globalvars.dirr + '/(01).jpg')
globalvars.arr1 = np.load(globalvars.dirr + '/(01).npy')
globalva... | null | code/application.py | application.py | py | 1,087 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "globalvars.img",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "cv2.imread",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "globalvars.dirr",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "globalvars.arr1",... |
5827127 | from django.urls import path
from account import views
from django.conf.urls import include
app_name = 'account'
urlpatterns = [
path('register/', views.register, name='register'),
path('login/', views.login, name='login'),
path('logout/', views.logout, name='logout'),
path('', include('social_django.urls... | null | account/urls.py | urls.py | py | 347 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "account.views.register",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "account.views",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.urls.p... |
74948467 | from django.contrib import admin
from .models import *
# Register your models here.
class CarImgInline(admin.TabularInline):
"""设置多表在一表中的直接进行管理的类"""
model = CarImg
extra=1
# class CarInfoInline(admin.TabularInline):
# model = CarInfo
# extra=1
@admin.register(CarInfo)
class CarInfoAdmin(admi... | null | django/youjuncar/carinfo/admin.py | admin.py | py | 1,973 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.contrib.admin.TabularInline",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.contrib.admin.ModelAdmin",
"line_number": 20,
"usage_type": "attribute"... |
288480782 | #<ImportModules>
import collections
import copy
import tables
import os
import ShareYourSystem as SYS
import sys
#</ImportModules>
#<DefineLocals>
BasingLocalTypeString="Tablor"
BasedLocalClass=getattr(SYS,SYS.getClassStringWithTypeString(BasingLocalTypeString))
#</DefineLocals>
#<DefineClass>
class RowerClass(
... | null | Modules/Init/Modules/_LastDrafts/07d_Rower/Rower.py | Rower.py | py | 3,163 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "ShareYourSystem.getClassStringWithTypeString",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 29,
"usage_type": "call"
... |
192717574 | """
Embedding Extension for Python-Markdown
=============================================
Added youtube, vimeo, etc video embedding to Python-Markdown.
A simple example:

Outputs:
<iframe allowfullscreen="" frameborder="0" height="375" moza... | null | iwg_blog/markdown_extensions/embedding.py | embedding.py | py | 2,960 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "markdown.blockprocessors.ParagraphProcessor",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "re.compile",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "re.... |
492930384 | import requests
from tkinter import *
def weather():
city = city_listbox.get()
url = "https://openweathermap.org/data/2.5/weather?q={}&appid=b6907d289e10d714a6e88b30761fae22".format(city)
res = requests.get(url)
output = res.json()
weather_status = output['weather'][0]['description']
temperat... | null | weather.py | weather.py | py | 1,615 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
}
] |
148712383 | # -*- coding: utf-8 -*-
"""
Created on Sun Feb 11 16:48:28 2018
@author: zhouying
"""
def random_pick(some_list, probabilities):
import random
x = random.uniform(0,1)
cumulative_probability = 0.0
for item, item_probability in zip(some_list, probabilities):
cumulative_probability += ite... | null | paper_experiment/other/nihao.py | nihao.py | py | 2,759 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "random.uniform",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "generalized_ir.general_ir",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.delete",
... |
511795579 | #!/usr/bin/env python3
import pdb
from itertools import product
import numpy as np
from scipy import stats
from sklearn import linear_model
from sklearn.metrics import mean_squared_error
from common import load_numpy_data
numpy_data = load_numpy_data()
train_data = numpy_data["train"]
sample_data = numpy_data["sam... | null | copy_closest.py | copy_closest.py | py | 1,884 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "common.load_numpy_data",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.isnan",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.median",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.isnan",
"li... |
490582944 | import cv2
import numpy as np
from matplotlib import pyplot as plt
img = cv2.imread('hu.jpg',1)
b = cv2.imread('hu.jpg',1)
b[100:200,:,0]=0
b[300:400,:,0]=0
print(b)
# roi=img[149:194,460:608]
# img[77:122,640:788]=roi
# img1 = cv2.cvtColor(img,cv2.COLOR_BGR2RGB)
# plt.imshow(img1)
# plt.xticks([]), plt.yticks([])
#... | null | test/filterphoto.py | filterphoto.py | py | 456 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "cv2.imread",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.namedWindow",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "cv2.WINDOW_NORMAL",
"line_num... |
549315954 | import os
import numpy as np
from bluesky.callbacks.broker import LiveImage
from shed.translation import FromEventStream, ToEventStream
from skbeam.io import save_output
from skbeam.io.fit2d import fit2d_save
from streamz_ext import Stream
from tifffile import imsave
from xpdan.db_utils import query_background, query_... | null | xpdan/pipelines/main.py | main.py | py | 6,705 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "xpdconf.conf.glbl_dict",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "xpdconf.conf.glbl_dict",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "xpdan.pipelines.pipeline_utils.Filler",
"line_number": 38,
"usage_type": "call"
},
{
... |
148118352 | from setuptools import setup, Extension, find_packages
import platform, os
# Note we don't import Numpy at the toplevel, since setup.py
# should be able to run without Numpy for pip to discover the
# build dependencies
import numpy.distutils.misc_util as np_misc
#import copy
import versioneer
# Inject required option... | null | setup.py | setup.py | py | 11,224 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.distutils.misc_util.get_info",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.distutils.misc_util",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "platform.system",
"line_number": 15,
"usage_type": "call"
},
{
"api_... |
43708227 | """
This file is for crawling the posted message by tweeter
"""
from twython import Twython
from unidecode import unidecode
from UtilProperty import ReadProperty
import json
import pandas as pd
import mysql.connector
import time
import pathlib
tweetList = []
"""
Tweet info
"""
class Tweets:
def __init__(self, u... | null | pythonCode/TweetKLSEAPI.py | TweetKLSEAPI.py | py | 4,022 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "json.load",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "twython.Twython",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "unidecode.unidecode",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "time.strptime",
"li... |
616668266 | from collections import defaultdict
from numpy import binary_repr
from sys import argv
num_inputs = int(argv[1])
# Input space exploration
statebinout = []
changebinout = []
stateout = []
changeout = []
spiceout = []
for i in range(num_inputs):
stateout.append([])
changeout.append([])
spiceout.append("")
visited... | null | spice_scripts/vmerge_characterize/ise1.py | ise1.py | py | 2,849 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.argv",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "collections.defaultdict",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.binary_repr",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.binary_repr",... |
410805411 | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 8 20:03:46 2019
@author: rayde
"""
import requests, pandas, lxml
from bs4 import BeautifulSoup as soup
from urllib.request import urlopen
from lxml import html
import re, json
from finance_python import stock
class dividend_calendar:
calendars = []
def __init_... | null | nasdaq_calendars (2).py | nasdaq_calendars (2).py | py | 1,930 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.get",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 43,
"usage_type": "call"
}
] |
242449389 | import pdb
from django.conf.urls import patterns, include, url
import os
here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x)
from . import ajaxHandeler
urlpatterns = patterns('',)
TEMPLATE_DIRS =('',here('templates'),)
urlpatterns += patterns('',
# Read Operation
(r'^api/author/$',ajax... | null | MiniProjects/genApps/AppsEngines/sample/mapping.py | mapping.py | py | 3,263 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.join",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_nu... |
298948725 |
from fabric.api import env, execute, puts
from fabric.state import output
import functools
def once(f):
"""
Decorator ensuring that the wrapped function is executed once per host
during fabric's execution. The return value is cached for further
invocations. This is distinctly different from ``fabric... | null | prefab/pipeline.py | pipeline.py | py | 3,276 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "fabric.api.puts",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "fabric.state.output.debug",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "fabric.state.output",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "fa... |
485948380 | #!/usr/bin/env python
import os
import sys
import subprocess
import tempfile
BINDGEN_FLAGS_PREFIX = "// bindgen-flags: ";
COMMON_PRELUDE = """
#![allow(non_snake_case)]
"""
if len(sys.argv) != 4:
print("Usage: {} [bindgen-path] [c-path] [rust-path]\n".format(sys.argv[0]))
flags = [];
with open(sys.argv[2]) as f:
... | null | tests/tools/run-bindgen.py | run-bindgen.py | py | 910 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.argv",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number... |
401791632 | # -*- coding:utf-8 -*-
# @author :adolf
import os
import cv2
import numpy as np
import json
from numpy.core._multiarray_umath import ndarray
file_dir = "data/icdar15/train/"
img_dir = os.path.join(file_dir, "imgs")
gt_dir = os.path.join(file_dir, "gts")
img_list = os.listdir(img_dir)
class NumpyEncoder(json.JSONEnc... | null | tmp/handle_icdar.py | handle_icdar.py | py | 2,772 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.join",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 1... |
322441362 | from sklearn.feature_extraction.text import TfidfVectorizer
import numpy as np
import json
# %matplotlib inline
import re
import matplotlib.pyplot as plt
import nltk
nltk.download('stopwords')
import sys
assert sys.version_info.major == 3
from nltk.corpus import stopwords
np.random.seed(42)
import tensorflow as tf
f... | null | ML.py | ML.py | py | 2,725 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "nltk.download",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.version_info",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.seed",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.random",
... |
139065879 | # -*- coding: utf-8 -*-
""" wrapper for model training
* avoids repetition by using shared parameters
* enables one-liners for common training and reporting tasks
* logs inputs and outputs for crossval model runs
* accepts numpy or pandas inputs
* uses numpy internally (keras prefers. supports sparse matrix bette... | null | analysis/model.py | model.py | py | 11,247 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pandas.DataFrame",
"line_number": 56,
"usage_type": "attribute"
},
{
"api_name": "pandas.get_dummies",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "pandas.Series",
"line_number": 62,
"usage_type": "attribute"
},
{
"api_name": "sklearn.p... |
549116710 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue May 8 02:27:17 2018
@author: siwen_chen
"""
import cv2
from matplotlib import pyplot as plt
from IPython.core.pylabtools import figsize
from random import randint
import segment_function
import cal_IOU
from scipy import misc
#import turnin_points
im... | null | tracking/Tobacco_tracking.py | Tobacco_tracking.py | py | 11,295 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.listdir",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "writeinexcel.read_parameter",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "segment_function.leaf_segment",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "... |
321495014 | # coding=utf-8
"""
Created on 2015-09-04 @author: Eastmount
"""
import time
import re
import os
import sys
import codecs
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import selenium.webdriver.support.ui as ui
from selenium.webdriver.com... | null | newsOfbanks.py | newsOfbanks.py | py | 6,307 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "selenium.webdriver.PhantomJS",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.support.ui.WebDriverWait",
"line_number": 25,
"usage_type": "call"
}... |
638997146 | import serial
import pyrebase
from geopy.geocoders import Nominatim
import datetime
import time
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
# DANGER! This is insecure. See http://twil.io/secure
account_sid = 'AC2dce27e75c86d4feda1ff5aaee9c91d4'
auth_token = '53789efb8eeba8... | null | server/processData.py | processData.py | py | 2,917 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "twilio.rest.Client",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "geopy.geocoders.Nominatim",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "serial.Serial",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pyrebase.i... |
178266262 | import glob
import json
import os
import random
from pprint import pprint
class EventDataReader:
__contents = {}
def __init__(self, json_dir_name):
json_pattern = os.path.join(json_dir_name, '*.json')
file_list = glob.glob(json_pattern)
for file in file_list:
event_key = f... | null | System/EventSystem.py | EventSystem.py | py | 8,165 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "glob.glob",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 17... |
301771500 | import pickle
import os
import sqlite3
import jsonpickle
# region stateFunctions
# Checks if the state file exists
# Creates the state file if it doesn't exist
# Then returns hash map representing the state file
def initializeState():
filepath = "state"
if not os.path.isfile(filepath):
saveState(crea... | null | officialProj/Project/databaseInit.py | databaseInit.py | py | 1,559 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.isfile",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "pickle.dump",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_numbe... |
191987866 | import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from sklearn import metrics
def split_train_test(X, y, test_size, seed):
idx_norm = y == 0
idx_out = y == 1
# keep outlier ratio, norm is normal out is outlier
... | null | utils.py | utils.py | py | 4,548 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.concatenate",
"line_number": 22,
"usage_type": "c... |
9051373 | from __future__ import absolute_import, unicode_literals
from django.template import engines
from django.template.loader import render_to_string
from django.test import TestCase
from wagtail.wagtailcore import __version__, blocks
from wagtail.wagtailcore.models import Page, Site
class TestCoreJinja(TestCase):
... | null | wagtail/wagtailcore/tests/test_jinja2.py | test_jinja2.py | py | 3,156 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.test.TestCase",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "django.template.engines",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "wagtail.wagtailcore.models.Site.objects.get",
"line_number": 22,
"usage_type": "call"
},
... |
112933136 | import csv
import random
import math
import cv2
import numpy as np
import sklearn
import argparse
import sys
from sklearn.utils import shuffle
#reading command line arguments
parser = argparse.ArgumentParser(description = 'train on provided data')
#parser.add_argument('runfile',help='run data folder name e.g. run1')
... | null | training.py | training.py | py | 5,954 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 69,
"usage_type": "call"
},
{
"api_n... |
499581530 | from cmath import log
import uproot as up
import awkward as ak
import coffea
from coffea.nanoevents import NanoEventsFactory, NanoAODSchema, BaseSchema, TreeMakerSchema
from coffea import processor
from coffea.nanoevents.methods import candidate
from coffea import lookup_tools
from coffea.lookup_tools import extractor
... | null | coffea/pkutree/ssww_parquet.py | ssww_parquet.py | py | 29,054 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "awkward.behavior.update",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "awkward.behavior",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "coffea.nanoevents.methods.candidate.behavior",
"line_number": 13,
"usage_type": "attribute"... |
34948548 | from django.test import TestCase
from core.services.forms import FeedbackForm
class FeedbackFormTests(TestCase):
def test_form_valid(self):
form = FeedbackForm({'title': 'feed title',
'email': 'test@test.com',
'text': 'feed text'})
self.a... | null | core/services/tests/test_forms.py | test_forms.py | py | 529 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.test.TestCase",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "core.services.forms.FeedbackForm",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "core.services.forms.FeedbackForm",
"line_number": 15,
"usage_type": "call"
}
] |
39550594 | from business.models import PersonInfo
from django.shortcuts import render
def testqq(request):
if request.method == "GET":
#获取提交的数据
qq_num = request.GET.get('qq', '')
# 如果没获取到,默认空字符
print("页面输入的QQ号:%s" % qq_num)
# 根据QQ号去数据库查询数据
try:
infoObj = PersonInfo.... | null | MyDjango/business/demo.py | demo.py | py | 673 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "business.models.PersonInfo.objects.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "business.models.PersonInfo.objects",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "business.models.PersonInfo",
"line_number": 11,
"usage_typ... |
314870495 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# main.py
#
# Copyright 2015 Adrian Pauli <lycian@thuringiafurs.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of... | null | sendmessages.py | sendmessages.py | py | 1,310 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "telegram.Bot",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "telegram.ChatAction",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "telegram.Emoji",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "telegram.Pa... |
432532982 | import pandas as pd
import torch.utils.data as Data
import datapocess
import torch
import torch.nn as nn
from detection_nn import DetecNN
from torch.autograd import Variable
class Dataset(Data.Dataset):
def __init__(self, df):
self.__points, self.__originimage = self.__data_prepocess(df)
def __data_p... | null | task1.py | task1.py | py | 2,051 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.utils.data",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "torch.unsqueeze",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "datapo... |
441467089 | from flask import Flask, render_template,url_for,request
import pandas as pd
import pickle
from sklearn.feature_extraction.text import CountVectorizer
import tensorflow
from tensorflow import keras
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.externals import joblib
from sklearn.n... | null | app.py | app.py | py | 4,494 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.Flask",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "flask.render_... |
559318060 | import asyncio
import itertools
import discord
from discord.ext import commands
def perm_only_author(panel, user):
if user is None or user.id != panel.ctx.author.id:
return False
return True
def perm_any_user(panel, user):
if user is None or user.id == panel.ctx.bot.user.id:
return Fals... | null | utils/embed.py | embed.py | py | 16,429 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "asyncio.TimeoutError",
"line_number": 44,
"usage_type": "attribute"
},
{
"api_name": "discord.Embed",
"line_number": 86,
"usage_type": "call"
},
{
"api_name": "discord.Colour.blurple",
"line_number": 86,
"usage_type": "call"
},
{
"api_name": "discor... |
346619945 | from chorus.__init__ import *
from chorus.models import MusicHighlighter
from chorus.lib import *
import tensorflow as tf
import numpy as np
import os
import pandas as pd
from tqdm import tqdm
import chorus.get_segment_only_txt as get_segment_only_txt
import chorus.get_segment_audio_txt as get_segment_audio_txt
os.en... | null | chorus/get_chorus.py | get_chorus.py | py | 3,936 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.environ",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.Session",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "chorus.models.MusicHighlighter",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "ten... |
333889771 | """
Prospects_xml spider created on the top of XMLSpider
scrapy crawl prospects_xml -a mining_job_id=9999 -a iteration=1 -a extract=1 -a url="http://www.prospects.ac.uk/linkedIn/xmlFeed.xml"
Seed URL:
http://www.prospects.ac.uk/linkedIn/xmlFeed.xml
"""
from brightcorp.base.xmlspider import XMLSpider
from brightc... | null | brightcorp/brightcorp/spiders/prospects_xml.py | prospects_xml.py | py | 1,985 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "brightcorp.base.xmlspider.XMLSpider",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "scrapy.selector.Selector",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "brightcorp.items.BrightcorpItemLoader",
"line_number": 45,
"usage_type": "ca... |
137035190 | #!/usr/bin/env python3
import matplotlib.pyplot as plt
plt.switch_backend('agg')
import os
import sys
import csv
import numpy as np
from scipy import signal
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from arguments import get_arguments
arguments = get_arguments(... | null | rna_prediction/src/plotting/plot_quality_from_csv.py | plot_quality_from_csv.py | py | 2,249 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "matplotlib.pyplot.switch_backend",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "sys.path.append",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sys.... |
126157667 | '''\
TinkerPy
========
This Python 2 and 3 package (tested with CPython 2.7 and 3.3 as well as PyPy
2) provides:
* funtionality related to :ref:`Python 2 versus 3 <python2vs3>`
* special :ref:`mapping implementations <mappings>`
* some useful :ref:`decorators <decorators>`
* :ref:`SAX handlers <sax_handlers>... | null | venv/Lib/site-packages/tinkerpy/__init__.py | __init__.py | py | 41,249 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "sys.version_info",
"line_number": 92,
"usage_type": "attribute"
},
{
"api_name": "collections.Mapping",
"line_number": 216,
"usage_type": "attribute"
},
{
"api_name": "collections.MutableMapping",
"line_number": 249,
"usage_type": "attribute"
},
{
"... |
13477630 | import datetime
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.db.models import Avg
from django.contrib.contenttypes.models import ContentType
class TrendingManager(models.Manager):
def trending(self, model, days=30, kind="", offset=None, limit=None):
vie... | null | trending/managers.py | managers.py | py | 947 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.db.models.Manager",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.contrib.contenttypes.models.ContentType.objects.get_for_model",
"line_number": 14,
... |
361882645 | from keras.applications.inception_v3 import InceptionV3, preprocess_input
from keras.models import Model
from keras.layers import Dense, GlobalAveragePooling2D
from keras.optimizers import SGD
from keras.metrics import categorical_accuracy
from keras.callbacks import ModelCheckpoint
from sklearn.model_selection import... | null | inception_finetune.py | inception_finetune.py | py | 3,744 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numpy.expand_dims",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "keras.applications.inception_v3.preprocess_input",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 19,
"usage_type": "call"
},
{
"ap... |
105031175 | import json
from django.conf import settings
from django.shortcuts import reverse
from django_countries import countries
from django_prices_vatlayer.models import VAT
from tests.utils import get_graphql_content
from saleor.core.permissions import MODELS_PERMISSIONS
from saleor.graphql.core.utils import clean_seo_field... | null | tests/api/test_core.py | test_core.py | py | 6,216 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.shortcuts.reverse",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "tests.utils.get_graphql_content",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.reverse",
"line_number": 31,
"usage_type": "call"
},
{
... |
587655848 | # -*- coding: utf-8 -*-
'''
やるべきことリスト
- datasetの用意
- データを水増しする(random_crop, rotation, )
- complete => リサイズはいるのか
- ファイルパスの指定
- complete => iteraterにdatasetを渡す
- モデルの修正
- 関数train内部のmodel定義部分の損失関数をmean_squared_errorに変更する
- complete => 数値、および scalingの修正(論文だとpa... | null | mymodel_ver5.py | mymodel_ver5.py | py | 16,517 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "chainer.iterators.SerialIterator",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "chainer.iterators",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "chainer.iterators.SerialIterator",
"line_number": 45,
"usage_type": "call"
},
{
... |
634158253 | import logging
import click
from tabulate import tabulate
from yurt.exceptions import YurtException
from yurt import vm, lxc, config
CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
@click.group(context_settings=CONTEXT_SETTINGS)
@click.option("--debug", is_flag=True, help="Increase verbosity.")
@click.... | null | yurt/cli.py | cli.py | py | 8,095 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.StreamHandler",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "yurt.config.YURT_ENV",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "yurt.config",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "logging.D... |
462421493 | import cv2
import uuid
import os
import numpy as np
import math
def merge(wall, sticker, mask, result_name, sticker_place, rx, ry, alpha, path):
if not os.path.exists(wall) or not os.path.exists(sticker):
raise ValueError("Wall image of Sticker image not exists")
print (alpha)
result, mask = appl... | null | imgproc/imgproc.py | imgproc.py | py | 12,239 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.exists",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
466049626 | # -*- coding: utf-8 -*-
"""
module GUI.Window.MainWindow
Main Window Class
TO DO.
1. QThread 클래스를 사용하여, 각 스테이트 (__mode, __dir)에 따른 적합한 행동을 수행
(pyqt qthread 검색결과: https://goo.gl/t8xPwa)
2. pyplot 그래프가 뇌파 데이터와 연동하도록 수정
3. 각 레이아웃 구성 요소의 사이즈 조절
4. 레이아웃 구성 정보를 별도의 ... | null | Client/GUI/Window/MainWindow.py | MainWindow.py | py | 7,303 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "PyQt4.QtGui.QMainWindow",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "PyQt4.QtGui",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "PyQt4.QtGui.QMainWindow.__init__",
"line_number": 37,
"usage_type": "call"
},
{
"api_nam... |
524889594 |
from __future__ import print_function
import datetime
import sys
import yaml
import os
import tempfile
from tinydb import TinyDB, Query
rec = Query()
class IOUtil(object):
def __init__(self):
self._db = {}
self._record_base = tempfile.gettempdir()
self.day = datetime.datetime.now().strft... | null | objects/utils/ioutil.py | ioutil.py | py | 1,638 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "tinydb.Query",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tempfile.gettempdir",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datet... |
648404405 | # -*- coding=utf-8 -*-
import os
import re
import time
from hashlib import md5
import requests
from requests.exceptions import RequestException
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdrive... | null | meizitu/meizitu.py | meizitu.py | py | 3,125 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "requests.post",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "requests.exceptions.RequestException",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "re.compile",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "re.S",
... |
8934065 | from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
from django.core.validators import FileExtensionValidator
from apps.categories.models import Categories
from apps.products.validators import validate_sku
class Products(models.Model):
name = models.CharFiel... | null | apps/products/models.py | models.py | py | 1,204 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.db.models.Model",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 11,
"usage_type": "call"
},
{
"api_name"... |
348456393 | #!/usr/bin/env python
#
# orthopanel.py - The OrthoPanel class.
#
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
#
"""This module provides the :class:`OrthoPanel` class, which displays a 2D
view of 3D overlays.
A couple of other classes are provided for convenience:
.. autosummary::
:nosignatures:
OrthoFram... | null | fsleyes/views/orthopanel.py | orthopanel.py | py | 31,950 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "fsleyes.displaycontext.orthoopts.OrthoOpts",
"line_number": 138,
"usage_type": "call"
},
{
"api_name": "fsleyes.displaycontext.orthoopts",
"line_number": 138,
"usage_type": "name"... |
173525830 | from urllib.request import urlopen as uReq
from bs4 import BeautifulSoup as soup
my_url = 'https://www.newegg.ca/Video-Cards-Video-Devices/Category/ID-38?Tpk=graphics%20cards'
uClient = uReq(my_url)
page_html = uClient.read()
filename = "products.csv"
f = open(filename,"w")
headers = "brand, product_name, shipping_c... | null | WebScraping/.py | .py | py | 897 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 17,
"usage_type": "call"
}
] |
342533509 | # -*- coding: utf-8 -*-
from django.utils import timezone
import datetime
import time
import decimal
import csv
import unicodedata
import math
import os
import fnmatch
from django.db.models import Max
from django.core.exceptions import ObjectDoesNotExist
from django.utils.encoding import force_text, smart_text
from ... | null | gsb/utils.py | utils.py | py | 10,647 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.utils.encoding.smart_text",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "uuid.uuid4",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "time.strptime",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "math.isnan"... |
577710525 | # play button:
import pygame
import pygame.font
class Button(object):
def __init__(self,screen,msg):
self.msg=msg
self.screen=screen
self.screenrect=self.screen.get_rect()
self.buttoncolor=(145,40,59)
self.textcolor=(230,75,96)
self.font=pygame.font.SysFont(None,48)
... | null | button.py | button.py | py | 720 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "pygame.font.SysFont",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pygame.font",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pygame.Rect",
"line_number": 12,
"usage_type": "call"
}
] |
141380332 | import cv2
from datetime import datetime
def to_JSON_string(obj):
string = ""
if isinstance(obj, dict):
keys = obj.keys()
for i in xrange(len(keys)):
key = keys[i]
key_string = "{\""+str(key)+"\":"+to_JSON_string(obj[key])+"}"
if i == 0:
stri... | null | python/utility.py | utility.py | py | 1,753 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "cv2.imwrite",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "cv2.imwrite",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
... |
116536657 | """
Create a scrape_weather.py module with a WeatherScraper class inside.
• Use the Python HTMLParser class to scrape Winnipeg weather data (min,
max & mean temperatures) from the Environment Canada website, from
the current date, as far back in time as is available.
◦ http://climate.weather.gc.ca/climate_data/daily_da... | null | scrape_weather.py | scrape_weather.py | py | 5,486 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "html.parser.HTMLParser",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "html.parser.HTMLParser.__init__",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "html.parser.HTMLParser",
"line_number": 32,
"usage_type": "name"
},
{
"api... |
203447193 | from flask import abort, jsonify, redirect
from flask import current_app
from flask import g
from flask import request
from info import db
from info.models import Videos, Comment
from info.modules.videos import videos_blu
from flask import render_template
from info.utils.common import user_login_data
from info.utils.... | null | info/modules/videos/views.py | views.py | py | 5,352 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "flask.g.user",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "flask.g",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "flask.jsonify",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "info.utils.response_code.RET.... |
43338969 | """
Created on 3 Aug 2011
@author: Dave Wilson, David
"""
import wx
class HeaderPanel(wx.Panel):
"""Header Panel Class, with events and GUI creation"""
def __init__(self, *args, **kwargs):
""" Creates headered panel with Minimize/Maximize & Close buttons """
super(HeaderPanel, self).__init__... | null | pythonforumide/gui_lib/ide_headered_panel.py | ide_headered_panel.py | py | 8,636 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "wx.Panel",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "wx.BoxSizer",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "wx.HORIZONTAL",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "wx.Font",
"line_numbe... |
222888338 | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 21 18:10:53 2020
@author: sarah
"""
#Scrape speaches
from lxml import html
import lxml
import requests
import urllib.request
from bs4 import BeautifulSoup
import pandas as pd
import os
#Collecting all the websites needed to build a corpus of debates
website="https://... | null | Directory/notebooks/Debate_Scraper_2.py | Debate_Scraper_2.py | py | 3,825 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 23,
"usage_type": "name"
},
{
"api_nam... |
608026362 | ##########################Train fully convolutional net on the labpics Dataset######################################################################################################
#...............................Imports..................................................................
import os
import torch
import nu... | null | TRAIN.py | TRAIN.py | py | 10,040 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "os.path.exists",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "os.mkdir",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "Evaluator.Evaluator",
"line_... |
488604140 | # File for creating an acquire and prepping of files for regression exercises.
# importing libraries
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
from sklearn.preprocessing import MinMaxScaler, RobustScaler, StandardScaler
import os
# Turn off warnings
import warnings... | null | wrangle.py | wrangle.py | py | 21,115 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "env.user",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "env.host",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "env.password",
"line_nu... |
507614873 | __author__ = 'Administrator'
from django.http import HttpResponse
from proxies.models import Proxies
import datetime
from django.shortcuts import render_to_response
def homepage(request):
return HttpResponse('Welcome to this site!!!')
def get_proxy(request):
p = Proxies.objects.all()[0] #using cl... | null | distribute_proxies/views.py | views.py | py | 1,034 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "proxies.models.Proxies.objects.all",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "proxies.models.Proxies.objects",
"line_number": 11,
"usage_type": "attribute"
... |
363671956 | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'home_page.views.home_page', name='home_page'),
url(r'^blog/$', 'home_page.views.blog_page', name='blog_page'),
url(r'^blog/(\d+)/$', 'home_page.views.view_blog', name='view_blog'),
url(r'^ap... | null | saulgill/urls.py | urls.py | py | 987 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "djan... |
239745695 | from datetime import datetime
import logging
import requests
from turbasen import Sted, Liste
from rest_framework import permissions, views
from rest_framework.response import Response
from django.conf import settings
logger = logging.getLogger('sherpa')
class UserPermission(permissions.BasePermission):
def h... | null | apps/user/api/verdandi.py | verdandi.py | py | 5,054 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "rest_framework.permissions.BasePermission",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.permissions",
"line_number": 15,
"usage_type": "name"
}... |
129844797 | #!/usr/bin/env python
from __future__ import print_function
from timeit import default_timer as time
import cProfile
import pstats
import numpy as np
import numba as nb
import viscid
from viscid import readers
from viscid import field
from viscid.calculator import seed
# nb.float_ = nb.template("nb.float_")
@nb.ji... | null | scratch/fortran_trace/numbatest.py | numbatest.py | py | 7,810 | python | en | code | null | code-starcoder2 | 66 | [
{
"api_name": "numba.jit",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numba.int_",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numba.float_",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.