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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6781086482 | import lungc
import os.path
import cv2
import random
import numpy as np
nocanc=[]
nocanc_output =[]
for i in range(1,139):#without folder #run for full data
if not os.path.isfile('without/nocanc ('+str(i)+').jpg'):
continue
print(i)
img=cv2.imread('without/nocanc ('+str(i)+').jpg',0)
left_feature,ri... | vk125/LungCancerDETECTION_ | dataset_create.py | dataset_create.py | py | 1,042 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.path.isfile",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "cv2.imread",
"line_... |
39661316862 | from django import forms
from .models import Perro, Atencion, Tipo_atencion
from django.utils.encoding import force_str
#Unifico los forms edicion y registro porque eran iguales
class perro_form(forms.ModelForm):
class Meta:
model = Perro
fields = ['nombre', 'raza', 'tamanio', 'sexo', 'fecha_nac',... | JeremiasMartin/oh-my-dog | perros/forms.py | forms.py | py | 981 | python | es | code | 0 | github-code | 97 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "models.Perro",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.forms.Model... |
24564165346 | #
# Import the libraries we will need for analysis and plotting.
#
import rjmcmc
import matplotlib
import matplotlib.pyplot
from mpl_toolkits.mplot3d import axes3d, Axes3D
#
# Open our data file which consists of one (x, y) coordinater per line
# separated by whitespace
#
f = open('data.txt', 'r')
lines = f.readlines... | rcb547/RJMCMC-1.0.11 | python/tutorial/single/ch4-confidence.py | ch4-confidence.py | py | 1,908 | python | en | code | 8 | github-code | 97 | [
{
"api_name": "rjmcmc.dataset1d",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "rjmcmc.regression_single1d_sampled",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 74,
"usage_type": "call"
},
{
"api_... |
73697460479 | #!/usr/bin/python3
#################################################
# All functions that work on the git repository #
#################################################
import sqlite3
import os
from subprocess import check_output
import multiprocessing
import pandas as pd
from tqdm import tqdm
from tqdm.contrib.log... | gotec/git2net | git2net/extraction.py | extraction.py | py | 81,636 | python | en | code | 51 | github-code | 97 | [
{
"api_name": "multiprocessing.Lock",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
... |
21132093829 | #!/usr/bin/env python3
""" Runs class.
- Maintains a list of recipe runs in datastore.
Design: https://github.com/OpenAgricultureFoundation/notification-service/blob/master/docs/API.pdf
"""
import datetime as dt
import json, logging, pprint
from typing import Dict, List
from cloud_common.cc import utils
fr... | OpenAgricultureFoundation/cloud_common | cc/notifications/runs.py | runs.py | py | 3,941 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "cloud_common.cc.google.datastore.DS_runs_KEY",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "cloud_common.cc.google.datastore",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "pprint.PrettyPrinter",
"line_number": 50,
"usage_type"... |
29810041982 | from __future__ import annotations
from typing import Callable, List, Optional
from retentioneering.backend.tracker import (
collect_data_performance,
time_performance,
track,
)
from retentioneering.utils.doc_substitution import docstrings
from ..types import EventstreamType
class AddPositiveEventsHelp... | retentioneering/retentioneering-tools | retentioneering/eventstream/helpers/add_positive_events_helper.py | add_positive_events_helper.py | py | 2,233 | python | en | code | 713 | github-code | 97 | [
{
"api_name": "types.EventstreamType",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "typing.Callable",
... |
16821939187 | from multiprocessing import Pool
import subprocess
import time
import random
import string
import os
def run_md(lines):
"""MD."""
# Get the dataframe from the object store.
#print(object_id)
Chr = lines[0]
Chr_header = Chr.split('_')[0]
lines = lines[1]
p = subprocess.Popen(["java", "-Dj... | abs-tudelft/ArrowSAM | tools/MarkDuplicate/MarkDuplicate.py | MarkDuplicate.py | py | 1,642 | python | en | code | 19 | github-code | 97 | [
{
"api_name": "subprocess.Popen",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "subprocess.PIPE",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "time.time",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
... |
41440388753 | from django.http import HttpResponse
from sqlite3 import *
# 读url传递过来的参数
def home(request):
token = request.GET.get('token')
username = request.GET.get('username')
email = request.GET.get("email")
phone = request.GET.get('phone')
if token == 'SMvwlN1kjrtKzIfxCLHlejDedpVSTRvW':
return HttpRes... | je1lylee/passCET-backend | untitled/login.py | login.py | py | 459 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponse",
"line_number": 12,
"usage_type": "call"
}
] |
8359293337 | import os
import argparse
from datetime import datetime
import pandas as pd
import torch
from torch.utils.data import DataLoader
from tqdm import tqdm
from models.yolo_wrapper import YOLOWrapper
from dataset import YOLODataset
# make timestamp format as string date that can be used as file name
def timest... | hjk1996/pet_food_weight_estimator | miou_test.py | miou_test.py | py | 2,919 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.datetime.fromtimestamp",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 18,
"usage_type": "call"
},
{
"api_nam... |
4776888497 | from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
engine = None
SQLALCHEMY_DATABASE_URL = "sqlite:///./hakaton.db"
engine = create_engine(
# check_same_thread is only needed for SQLite
SQLALCHEMY_DATABASE_URL, connect... | Shrimp22/hakaton.github.io | backend/db/database.py | database.py | py | 464 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sqlalchemy.create_engine",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.orm.sessionmaker",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.ext.declarative.declarative_base",
"line_number": 17,
"usage_type": "call... |
21748076971 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^orders/settlement/$', views.OrdersShowView.as_view()),
url(r'^orders/$', views.OrderSaveView.as_view()),
url(r'^ordersList/$', views.OrderListView.as_view()),
url(r'^orders/(?P<order_id>\d+)/uncommentgoods/$', views.OrderCommen... | Zasling/meiduo_mall33 | meiduo_mall/meiduo_mall/apps/orders/urls.py | urls.py | py | 493 | python | en | code | 1 | github-code | 97 | [
{
"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": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.co... |
45458304514 | from django.shortcuts import render , get_object_or_404,redirect
from . models import Article , Category , Comment
from django.core.paginator import Paginator
from django.db.models import Q
from .forms import CommentForm ,CreateForm
def index(request):
cat = Category.objects.all()
breking = Article... | sabbir1021/Django-newsportal | newsapp/views.py | views.py | py | 7,877 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "models.Category.objects.all",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "models.Category.objects",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "models.Category",
"line_number": 10,
"usage_type": "name"
},
{
"api_name... |
8810199212 | # Python
import os, sys
from uuid import UUID
from sqlalchemy.orm import joinedload
# FastAPI
from fastapi import FastAPI, Depends, Body, Query, Path
from fastapi_pagination import Page, Params, paginate
from fastapi_sqlalchemy import DBSessionMiddleware, db
from .models import Property as ModelProperty
from .models ... | KielRodriguez/property_api | app/main.py | main.py | py | 1,855 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.dirname",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "dotenv.load_dotenv",
... |
24661720840 | import pygame
import random
class Button:
global mass
def __init__(self, path, text, x, y):
self.im = pygame.image.load(path)
self.path = path
self.text = text
self.x = x
self.y = y
ger1 = self.im.get_rect(
bottomright=(x, y))
screen.blit(self.... | Tendou-BakiBaki/ProektLife | 3.py | 3.py | py | 26,297 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pygame.image.load",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.load",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pygame.image",
... |
20612993852 | import os
import tempfile
import unittest
from time import sleep
import pytest
import yaml
from cowbird.handlers.handler_factory import HandlerFactory
from cowbird.monitoring.fsmonitor import FSMonitor
from cowbird.monitoring.monitoring import Monitoring
from tests.utils import clear_handlers_instances, get_test_app
... | Ouranosinc/cowbird | tests/test_monitoring.py | test_monitoring.py | py | 6,292 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "os.chmod",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.rename",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.remove",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "unittest.TestCase",
"line_number": 3... |
40421892841 | import pandas as pd
import re
import jieba
import gensim
import pickle
import numpy as np
def main():
training_set_path = "dataset/train.csv"
test_set_path = "dataset/test.csv"
training_set = dataset2vec(training_set_path, is_training_set=True)
test_set = dataset2vec(test_set_path, is_training_set=Fal... | Franktanshuai/nlp-news | preprocessing.py | preprocessing.py | py | 3,285 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pickle.dump",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pickle.dump",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number... |
3646493960 | #!/usr/bin/env python
import os
import sys
import numpy as np
import fitsio
import numpy_util
def make_im3shape_flags(config):
"""
code to make im3shape flags
People to bug if things are weird
=================================
Matthew Becker
im3shape team
Input Data
==========
... | rmjarvis/DESWL | sva1_final_release/make_im3shape_flags.py | make_im3shape_flags.py | py | 2,433 | python | en | code | 8 | github-code | 97 | [
{
"api_name": "fitsio.read",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "fitsio.read",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy_util.match",
"line_numb... |
7246830352 | from bot.utils.error import NoResultError
from discord.ext.commands.cooldowns import BucketType
from data.genshin.models import Artifact, DomainLevel
from discord.ext import commands
from sqlalchemy.sql import select
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.orm import selectinload
import discord
... | fsamiker/discord-monabot | bot/cogs/database/artifact.py | artifact.py | py | 2,952 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sqlalchemy.sql.select",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "data.genshin.models.Artifact",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "sqlalchemy.orm.selectinload",
"line_number": 11,
"usage_type": "call"
},
{
... |
24435486505 | from django.dispatch import receiver
from django.db.models.signals import post_save
# get_random_string 获取随机数的string
from django.utils.crypto import get_random_string
from .. import models
@receiver(post_save, sender=models.Survey)
def create_unique_code(**kwargs):
"""
http://127.0.0.1:8000/admin/web/surve... | leichan89/myDjango | web/signals/web.py | web.py | py | 1,224 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.utils.crypto.get_random_string",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "django.dispatch.receiver",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.db.models.signals.post_save",
"line_number": 11,
"usage_type": "arg... |
70872529918 | import numpy as np
import pytest
import pandas as pd
from pandas import Timedelta
import pandas._testing as tm
from pandas.core.arrays import TimedeltaArray
class TestTimedeltaArray:
@pytest.mark.parametrize("dtype", [int, np.int32, np.int64, "uint32", "uint64"])
def test_astype_int(self, dtype):
arr... | enjuichang/PracticalDataScience-ENCA | recommendation_app/venv/lib/python3.8/site-packages/pandas/tests/arrays/test_timedeltas.py | test_timedeltas.py | py | 3,587 | python | en | code | 82 | github-code | 97 | [
{
"api_name": "pandas.core.arrays.TimedeltaArray._from_sequence",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.core.arrays.TimedeltaArray",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "pandas.Timedelta",
"line_number": 13,
"usage_type": "c... |
75006246080 | import tkinter as tk
import requests as rq
import pandas as pd
import os
from tkinter import messagebox
# pyinstaller --onefile main.py
def iniciar_processo():
data_inicio = entry_data_inicio.get()
data_fim = entry_data_fim.get()
path_name = "ContratoScrap.csv"
BASE = "https://compras.dados.gov.br/c... | gustavodias24/ScrapContratoGov | main.py | main.py | py | 1,868 | python | pt | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_excel",
"lin... |
27170630120 | from src.game_constants import RobotType, Direction, Team, TileState
from src.game_state import GameState, GameInfo
from src.player import Player
from src.map import TileInfo, RobotInfo
from collections import deque, OrderedDict
import random
import time
def coord_distance(coord1, coord2):
return max(abs(coord1[0... | xumingkuan/awap-2023 | ElaineShiFanClub.py | ElaineShiFanClub.py | py | 53,124 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "src.player.Player",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "src.game_constants.Team",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "collections.deque",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "src.game_... |
3665044195 | from collections import deque
dx = [-1, 1, 0, 0]
dy = [0, 0, -1, 1]
M, N = map(int, input().split())
arr = [list(map(int, input())) for _ in range(N)]
dist = [[-1] * M for _ in range(N)] # 거리
queue = deque()
queue.append((0,0))
dist[0][0] = 0
while queue: # bfs로 최단거리를 찾는 방법과 거의 유사하다.
x,y = queue.pop... | terrykim96/TIL | Algorithm/백준/알고스팟_백준_1261.py | 알고스팟_백준_1261.py | py | 857 | python | ko | code | 0 | github-code | 97 | [
{
"api_name": "collections.deque",
"line_number": 10,
"usage_type": "call"
}
] |
21988065359 | import numpy as np
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
from sklearn.model_selection import train_test_split
from torchvision import transforms
import torch.optim as optim
from tqdm import tqdm
from torch.utils.data import DataLoader
#from google.colab import drive
#drive.mount('/content/... | neeravjain24/mathematical-symbol-classifier | train.py | train.py | py | 9,194 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.load",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "torch.... |
11701989477 | import requests
from bs4 import BeautifulSoup
import json
url = "https://www.melon.com/chart/index.htm"
headers = {
'Referer': 'https://www.melon.com/',
'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36'
}
html = requests.get(url,... | dohyekim/Study_blog | scraping_melon.py | scraping_melon.py | py | 1,867 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_nu... |
33731222613 | #!/user/bin/python3
# Script: Ops 401 Class 37 Code Challenge
# Joshua Phipps
# 6/7/2023
# Purpose: Cookie Capture Capades
import requests
import webbrowser
# targetsite = input("Enter target site:") # Uncomment this to accept user input target site
targetsite = "http://www.whatarecookies.com/cookietest.asp" # Comme... | joshp27/401_codes | code37.py | code37.py | py | 1,426 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "webbrowser.register",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "webbrowser.GenericBrows... |
35659124148 | import threading
import logging
import time
import json
from omegaconf import OmegaConf, DictConfig
from pydantic import BaseModel
from datetime import datetime
from typing import Any, Optional, List
import redis
from modules import shared
from modules.sd_models import checkpoints_list
from modules.sd_vae import vae_d... | yoebet/sd-node | node_pilot/runner.py | runner.py | py | 6,382 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pydantic.BaseModel",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "typing.List",
... |
19888948072 | from torch.autograd import Function
from torch import tensor
import torch
class ManipulateGradient(Function):
def forward(self, input):
self.mark_dirty(input)
print("forward Function")
return input
def backward(self, grad_out):
# manipulate gradient here
print("backwar... | adam-dziedzic/bandlimited-cnns | cnns/nnlib/pytorch_layers/manipulate_gradient.py | manipulate_gradient.py | py | 1,255 | python | en | code | 17 | github-code | 97 | [
{
"api_name": "torch.autograd.Function",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "torch.autograd.Function",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "torch.nn",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "torch.te... |
5817972296 | import click
from terminaltables import AsciiTable
from .autolib.models import database_proxy, CaptureNote, Service, Team, Flag
from flag_slurper.conf.project import Project
from . import utils
@click.group()
@click.pass_context
def notes(ctx):
"""
View and manage capture notes created by autopwn or manually... | mgerst/flag-slurper | flag_slurper/notes.py | notes.py | py | 2,327 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "flag_slurper.conf.project.Project.get_instance",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flag_slurper.conf.project.Project",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "click.group",
"line_number": 9,
"usage_type": "call"
}... |
13034744600 | from flask import Flask, request, jsonify
from twilio.twiml.messaging_response import MessagingResponse
from twilio.rest import Client
import createMessage
account_sid = '###REPLACE WITH YOUR TWILIO SID TOKEN###'
auth_token = '###REPLACE WITH YOUR TWILIO AUTH TOKEN###'
client = Client(account_sid, auth_token)
ap... | emanrodriguez/CarGurus-Git- | runFlaskApp.py | runFlaskApp.py | py | 1,155 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "twilio.rest.Client",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.request.values.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.request.v... |
28270597982 | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 09 20:49:04 2017
@author: sakurai
"""
import colorama
import chainer.functions as F
from sklearn.model_selection import ParameterSampler
from lib.functions.lifted_struct_loss import lifted_struct_loss
from lib.common.utils import LogUniformDistribution, load_params
fro... | ronekko/deep_metric_learning | main_lifted_struct_loss.py | main_lifted_struct_loss.py | py | 2,484 | python | en | code | 158 | github-code | 97 | [
{
"api_name": "colorama.init",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "chainer.functions.split_axis",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "chainer.functions",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "lib.func... |
3044477382 | #!/usr/bin/python3
# coding=utf-8
import MySQLdb
import argparse
import re
import base64
import collections
import statistics
import eth_util
def get_distance_of_min_max_versions(db, complete_compiler_list, complete_safemath_list):
batch_size = 10000
offset = 0
compiler_distances_of_contract_codes = []
... | hefeleal/A-Conceptual-Model-for-Ethereum-Blockchain-Analytics | contract_analysis/contract_analysis/calculate_significance_of_version_estimation.py | calculate_significance_of_version_estimation.py | py | 4,358 | python | en | code | 18 | github-code | 97 | [
{
"api_name": "statistics.mean",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "statistics.median",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "statistics.mean",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "statistics.median",... |
2789344368 | import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn import datasets
from sklearn import tree
import pylab
plt.style.use('seaborn-notebook')
params = {'legend.fontsize': 'x-large',
'figure.figsize': (15, 5),
'axes.labelsize'... | Toadoum/Time-series-forecasting-AR-ARIMA- | tim_serie.py | tim_serie.py | py | 9,586 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 9,
"usage_type": "name"
},
{
"api_name"... |
70105447678 | """
Assignment 5: K-Means. See the instructions to complete the methods below.
"""
from collections import Counter
from collections import defaultdict
import gzip
import math
import numpy as np
class KMeans(object):
def __init__(self, k=2):
""" Initialize a k-means clusterer. Should not have to change th... | deulgaonkaranup/WebSearchEngine-API | K-Means Cluster/cluster.py | cluster.py | py | 6,779 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "collections.defaultdict",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "m... |
73278127358 | from fastapi import FastAPI
import uvicorn
import json
import pandas as pd
app =FastAPI()
# load the files optimized for the functions requests
function1 = pd.read_parquet('function1.parquet')
function2 = pd.read_parquet('function2.parquet')
function3 = pd.read_parquet('function3.parquet')
function4 = pd.read_parquet... | Nko-okN/PI-MLOPS-STEAM | main.py | main.py | py | 5,441 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.read_parquet",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.read_parquet",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.read_par... |
19549453932 | # File: RandomWalker.py
# Author: Nawaf Abdullah
# Creation Date: 19/Mar/2018
# Description: Modeling of the random walker problem in 1D, 2D and 3D
# Reference: Computational Physics by Nichholas J. Giordano & Hisao Nakanishi (2nd Ed)
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
imp... | scriptpapi/Computational-Physics | RandomSystems/RandomWalker.py | RandomWalker.py | py | 3,274 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "random.randint",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.axes",... |
19233825391 | """
Setup.py for eScrapper, modules to do scrapping on version control portals,
providing some kind of "API"
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from setuptools import setup
from setuptools.command.test import test as TestCommand
import io
import os
import sys
import ... | Danish22/escrapper | setup.py | setup.py | py | 2,355 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.abspath",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "io.open",
"line_numb... |
13791963543 | #!/usr/bin/env python3
import os
import sys
import logging
import time
import argparse
import configparser
from itertools import chain
from distutils.util import strtobool
import numpy as np
import scipy.interpolate
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import pandas as pd
import ftpli... | manoukis/outbreak-reporter | bin/fetch_and_process_temperatures.py | fetch_and_process_temperatures.py | py | 21,549 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "matplotlib.use",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name"... |
24954653767 | #! /usr/bin/env python3
import os
import requests
os.chdir('/data')
dictionary = {"title": "", "name": "", "date": "", "feedback": ""}
for files in os.listdir():
with open(files,'r') as file:
data = file.read().split('\n')
dictionary["title"] = data[0];
dictionary["name"] = da... | yadav-aman/python-reference | python-web-requests/app.py | app.py | py | 663 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.chdir",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 16,
"usage_type": "call"
}
] |
19463349636 | import torch
import torch.nn as nn
from torch.autograd import Variable as V
import torch.nn.functional as F
import cv2
import numpy as np
from metrics import Evaluator
from loss import dice_bce_loss,edge_loss,DualTaskLoss
class MyFrame():
def __init__(self, net,lr=2e-4, evalmode = False,batchsize=1):
self.n... | MrGfor95/road-segmentation | framework.py | framework.py | py | 5,831 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "torch.nn.DataParallel",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.cuda.device_count",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.cud... |
29734447596 | # coding: utf-8
import logging
import pickle
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.decomposition import TruncatedSVD
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import Normalizer
from sklearn import metrics
from sklearn.cluster import KMeans
def doc_iter... | Losmli010/NLP | cluster/lsa_kmeans.py | lsa_kmeans.py | py | 2,689 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sklearn.feature_extraction.text.TfidfVectorizer",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sklearn.decomposition.TruncatedSVD",
"line_number": 35,
"usage_type": "... |
31902765056 | """
1. Создает 50 zip-архивов, в каждом 100 xml файлов со случайными данными следующей структуры:
<root>
<var name=’id’ value=’<случайное уникальное строковое значение>’/>
<var name=’level’ value=’<случайное число от 1 до 100>’/>
<objects><object name=’<случайное строковое значение>’/>
<object name=’<случайное строков... | EkaterinaEIvanova/archives_creator | task1.py | task1.py | py | 2,583 | python | ru | code | 0 | github-code | 97 | [
{
"api_name": "xml.etree.ElementTree.Element",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "xml.etree.ElementTree.Element",
"line_number": 26,
"usage_type": "call"
},
{
... |
42098664069 | # coding: utf-8
import time
from datetime import datetime
from functools import partial
from math import log10
class Ranking(object):
def rank(self, iterable):
return sorted(iterable, key=lambda obj: self.calculate_score(obj), reverse=True)
def calculate_score(self, obj):
raise NotImplement... | zhebrak/python-trending | trending/core.py | core.py | py | 4,182 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "math.log10",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "time.mktime",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
... |
20362057199 |
from shapely.geometry import Point, box
class Environment(object):
def __init__(self, width, height):
self.robots = []
self.obstacles = []
self.width = width
self.height = height
self.boundary = box(0, 0, width, height)
def addRobot(self, x, y):
poly = Point(... | ramonmelo/rrt | environment.py | environment.py | py | 1,001 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "shapely.geometry.box",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "shapely.geometry.Point",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "shapely.geometry.box",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "shap... |
21285854313 | import os
import pickle
import torch
import torch.nn as nn
import torch.nn.functional as F
import learn2learn as l2l
import numpy as np
from tqdm import tqdm
from argparser import parse_args
from activations import Sparsemax
from utils import fix_seed, get_cv_score, check_both_none_or_not_none
from metrics import clu... | mlbio-epfl/hume | hume.py | hume.py | py | 7,003 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "argparser.parse_args",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.device",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "utils.fix_seed",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
... |
22542880472 | import math
import torch
from torch.nn import ReplicationPad3d
import torchvision
from common.i3d_utils import inflator as inflate
bb_to_tv_function = {"res18": torchvision.models.resnet18,
"res34": torchvision.models.resnet34,
"res50": torchvision.models.resnet50,
... | Ayushk4/tsat | ac/modules/i3d.py | i3d.py | py | 5,321 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "torchvision.models",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "torchvision.models",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torchvision.models",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name":... |
11520683525 | import csv
import math
import json
import numpy as np
import random
import os
import argparse
from tqdm import tqdm
import torch
import torch.nn.functional as F
from transformers import AutoTokenizer, AutoModel
from torch.utils.data import Dataset, DataLoader, Sampler, default_collate
from torch.optim import AdamW, Ada... | Glaciohound/CLORE | experiments/clues.py | clues.py | py | 24,961 | python | en | code | 5 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "torch.manual_seed",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "torch.cuda.manual_seed_all",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "... |
19151129410 | from datetime import datetime, timedelta
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.db.models import F
from tasks.models import Task
class Command(BaseCommand):
CLAIMED_TIME_LIMIT = int(getattr(settings, "CLAIMED_TIME_LIMIT", 72))
DONE_... | dharmafly/tasket | server/tasks/management/commands/task_states.py | task_states.py | py | 1,273 | python | en | code | 26 | github-code | 97 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.conf.settings",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "django.conf.settings",
"line_number": 12,
"usage_type": "argument"
},
... |
74303538560 | # -*- coding: utf-8 -*-
__author__ = 'alansanders'
import ctypes as ct
import os
pvcam=PVCAM = ct.WinDLL(os.path.dirname(__file__) +"/DLL/Pvcam32.dll")
import nplab.instrument.ccd.pvcam_h as pv
import numpy as np
import time
from nplab.instrument.ccd import CCD
from nplab.instrument.camera import Camera
f... | nanophotonics/nplab | nplab/instrument/ccd/pixis.py | pixis.py | py | 15,453 | python | en | code | 35 | github-code | 97 | [
{
"api_name": "ctypes.WinDLL",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "ctypes.create_string_buffer",... |
26082535801 | print("\n\n/===================================================/")
print("\\===================================================\\")
print("/========= Tecplot 360 Video/GIF Creator =========/ ")
print("\\========= By: Oscar Alvarez =========\\")
print("/========= 2021 =====... | Sprinkles44/CNSM | Tecplot Video Create/TecplotVideoCreate.py | TecplotVideoCreate.py | py | 5,741 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.getcwd",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.path.splitext",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 31... |
34649120639 | from rest_framework.serializers import ModelSerializer
from people.models import User
class UserSerializer(ModelSerializer):
class Meta:
model = User
lookup_field = 'username'
exclude = (
'groups',
'is_staff',
'is_superuser',
'user_permissi... | Condocuments/backend | people/serializers.py | serializers.py | py | 607 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "people.models.User",
"line_number": 8,
"usage_type": "name"
}
] |
8741921553 |
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import time
PATH= "../crawldata-shopee/chromedriver.exe"
driver= webdriver.Chrome(PATH)
driver.get("https://shopee.vn/")
time.sleep(5)
search = driver.find_element(By.CLASS_NAME,"shopee-searc... | mcindapool/Tutorial | py/create.py | create.py | py | 1,501 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "selenium.webdri... |
36257455496 | from django.shortcuts import redirect, render, get_object_or_404
from .models import Movie
from django.http import JsonResponse
from django.contrib.auth import get_user_model
# Create your views here.
def index(request):
if request.user.is_authenticated:
movies = Movie.objects.all()
context = {
... | kjskjs356/project_SeeMovieReview | movies/views.py | views.py | py | 2,174 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "models.Movie.objects.all",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "models.Movie.objects",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "models.Movie",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "djang... |
9500345578 | import copy
import typing
def read_input(filename):
with open(filename) as f:
return f.read().splitlines()
def acc(accumulator, instructions_now, value):
accumulator += value
instructions_now += 1
return accumulator, instructions_now
def jmp(accumulator, instructions_now, value):
instr... | tellewsen/adventofcode | python/2020/8/8.py | 8.py | py | 2,069 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "typing.Union",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "copy.deepcopy",
"line_number": 63,
"usage_type": "call"
}
] |
72238158079 | #!/usr/bin/python3
import os
import telnetlib
import configparser
import textwrap
import time, datetime
import termios
import atexit
from select import select
import argparse
from pycrt import *
import base64
import ansimg
import re
import pdb
BBSLISTFILE = "https://www.telnetbbsguide.com/bbslist/bbslist.csv"
ZMODE... | xqtr/telnite | telnite.py | telnite.py | py | 29,622 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 77,
"usage_type": "attribute"
},
{
"api_name": "os.path.expanduser",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "os.sep",
"line_numbe... |
74356185917 | #!/usr/bin/env python
# coding: utf-8
import pandas as pd
import os
import copy
from functools import wraps,partial
base_dir = os.getcwd()
t = "HBOND,VDW,PICATION,IONIC,SSBOND,PIPISTACK"
l = "MC_MC,MC_SC,SC_MC,SC_SC"
item_key= []
item_key1=[]
dic_moudle = {"filename":""}
dic_moudle1 = {"filename":""}
for i in t.split("... | xudeling/pro | Tertiary.py | Tertiary.py | py | 1,744 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.getcwd",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "functools.partial",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number... |
41740108592 | import json
### 按需加载数据
def prepare(ab_flag):
if ab_flag == 'A':
variants = [
'llA',
'slA',
'ssA',
# 'ssB',
# 'slB',
# 'llB',
]
else:
variants = [
# 'ssA',
'ssB',
# 'slA',
... | HandHui/BERT_ESIM | dataHandle/dataPrepare.py | dataPrepare.py | py | 1,944 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "json.loads",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 60,
"usage_type": "call"
}
] |
72145198719 |
from django.urls import path,include
from rest_framework import routers
from api import views
router = routers.DefaultRouter()
router2 = routers.DefaultRouter()
router.register(r'', views.companyViewsets)
router2.register(r'', views.EmployeeViewSets)
urlpatterns = [
path('companies/', include(router.urls)),
... | Fahim-Khan-98/DRF | drf_project/api/urls.py | urls.py | py | 401 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "rest_framework.routers",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 7,
"usage_type": "call"
... |
8259351767 | import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
#Before clustering
df = pd.read_csv("new_mall_customers.csv")
df.plot(x="Annual Income (k$)", y="Spending Score (1-100)",kind="scatter")
plt.show()
#After clustering
df2 = pd.read_csv("output.csv")
sns.scatterplot(x=df2.x, y=df2.y,
... | ming94539/k-means-cluster-CUDA | plotting.py | plotting.py | py | 532 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.show",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pandas.read_csv... |
70062832960 | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="functionalstream", # Replace with your own username
version="0.1.8",
author="cjwcommuny",
author_email="cjwcommuny@outlook.com",
description="A functional interface for python iterator",
... | cjwcommuny/functionalstream | setup.py | setup.py | py | 707 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 12,
"usage_type": "call"
}
] |
19465490959 | import botlog
from Data import *
from bbot.Wishlist import Wishlist
def default_region_ratio(app, context):
r = Regions()
emergency = False
# take care of emergency situations
if app.metadata.low_cash:
r.desert.number = 1
emergency = True
if app.metadata.low_food:
r.agr... | AlwaysTraining/bbot | bbot/MetaData.py | MetaData.py | py | 1,071 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "bbot.Wishlist.Wishlist",
"line_number": 38,
"usage_type": "call"
}
] |
8593522320 | from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.messages.views import SuccessMessageMixin
from django.db.models import Q
from django.http import HttpResponse
from django.shortcuts import get_objec... | quijot/gea-package | gea/views.py | views.py | py | 21,399 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "django.contrib.messages.success",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "django.db.models.Q",
"line_number": 48,
"usage_type": "call"
},
{
"api_na... |
18789343284 | # facturation:login/urls.py
from django.urls import path
from . import views
app_name= 'facturation'
urlpatterns = [
#login paths
path('register/', views.register_user, name='register'),
path('login/', views.login_view, name='login'),
path('logout/', views.logout_view, name='logout'),
#homepage p... | Imy2003/factapp | facturation_project/facturation/urls.py | urls.py | py | 1,743 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
43850682585 | from app import create_app, db
from config import TestingConfig
from unittest import TestCase
class BaseTestCase(TestCase):
def setUp(self):
self.app = create_app(TestingConfig)
self.app_context = self.app.app_context()
self.app_context.push()
db.create_all()
def tearDown(sel... | marwanali1/sp-clone-backend | tests/base_test.py | base_test.py | py | 405 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "unittest.TestCase",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "app.create_app",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "config.TestingConfig",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "app.db.create_... |
39491720509 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import requests
from html.parser import HTMLParser
import http.client
import json
import os
import datetime
from datetime import datetime as dt
import threading
import queue
import time
import sys
import csv
brokers = []
IDs=[]
buffer2 = 0
class Worker(threading.Thread):
... | s9443112/crawler | new_crawler.py | new_crawler.py | py | 5,900 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "threading.Thread",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": ... |
73829246399 | """:mod:`asuka.service` --- Service interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import re
from .build import BaseBuild
from .instance import Instance
from .logger import LoggerProviderMixin
__all__ = 'DomainService', 'Service'
class Service(LoggerProviderMixin):
"""The inteface of services.
... | crosspop/asuka | asuka/service.py | service.py | py | 6,541 | python | en | code | 23 | github-code | 97 | [
{
"api_name": "logger.LoggerProviderMixin",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "re.compile",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "build.BaseBuild",
"line_number": 70,
"usage_type": "argument"
},
{
"api_name": "build.app",... |
32327325147 | import datetime
import uuid
from typing import List, Type
from config import (
POSTGRES_DB,
POSTGRES_HOST,
POSTGRES_PASSWORD,
POSTGRES_PORT,
POSTGRES_USER,
)
from sqlalchemy import UUID, Boolean, DateTime, ForeignKey, String, create_engine, func
from sqlalchemy.orm import (
DeclarativeBase,
... | tabelsky/todo_flask_netology | app/models.py | models.py | py | 2,903 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "sqlalchemy.create_engine",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "config.POSTGRES_USER",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "config.POSTGRES_PASSWORD",
"line_number": 22,
"usage_type": "name"
},
{
"api_name":... |
42627875842 | import json
import os
# Path to script confguration file
CONFIG_FILE_PATH = os.path.join(os.getcwd(), "config.json")
# Default script configuration
DEFAULT_CONFIGURATION = {
"templates": os.path.join(os.getcwd(), "templates"),
"default-author": "Alexandr <re-knownout> knownout@hotmail.com",
"author": "Ale... | knownout/init-project | utils/configuration.py | configuration.py | py | 2,124 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 9,... |
21682731531 | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from celery import Celery
celery = Celery(__name__, broker='redis://localhost:6379/0')
def create_app(config_name):
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://elusuario:12345@localhost:5432/conversordb'
app.co... | VinniK4m/proyecto_conversor | flaskr/__init__.py | __init__.py | py | 478 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "celery.Celery",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
}
] |
32426333286 | # import bs4 as bs
# import requests
# boo = requests.get('https://www.quora.com/topic/All-India-Anna-Dravida-Munnetra-Kazhagam-AIADMK-Indian-political-party')
# type(boo)
# soup = bs.BeautifulSoup(boo.text,'lxml')
# type(soup)
# messages = []
# for i in soup.select('.ui_qtext_rendered_qtext'):
# messa... | ekanboopathi/python-scrapying | css.py | css.py | py | 540 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 20,
"usage_type": "call"
}
] |
24635474552 | from django.db import models
from django.contrib.auth.models import User
class Post(models.Model):
title = models.CharField(max_length=100)
content = models.TextField()
author = models.ForeignKey(User, on_delete=models.CASCADE)
abstract = models.TextField(blank=True)
main_image = models.ImageField(... | cbrum11/brumstick | brumstick/blog/models.py | models.py | py | 607 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.db.models.Model",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "... |
26360208404 | """
FAST sensitivity indices
========================
"""
# %%
# This example will demonstrate how to quantify the correlation between the input
# variables and the output variable of a model using the FAST method,
# based upon the Fourier decomposition of the model response,
# which is a relevant alternative to the cl... | openturns/openturns | python/doc/examples/reliability_sensitivity/sensitivity_analysis/plot_sensitivity_fast.py | plot_sensitivity_fast.py | py | 2,324 | python | en | code | 198 | github-code | 97 | [
{
"api_name": "openturns.Log.Show",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "openturns.Log",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "openturns.usecases.ishigami_function.IshigamiModel",
"line_number": 35,
"usage_type": "call"
},
... |
4017611785 | import base64
import datetime
import os
import sys
from decimal import Decimal
import psycopg2
import pydicom
from cassandra.cluster import Cluster
from elasticsearch_dsl import Document, Text
from elasticsearch_dsl.connections import connections
from pydicom.multival import MultiValue
class DicomDoc(Document):
... | caioaraujo/PydicomCassandraElasticsearch | script.py | script.py | py | 15,787 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "elasticsearch_dsl.Document",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "elasticsearch_dsl.Text",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "elasticsearch_dsl.Text",
"line_number": 17,
"usage_type": "call"
},
{
"api_name... |
9918667513 | from __future__ import absolute_import, unicode_literals
from celery import shared_task
from celery.task import periodic_task
from celery.schedules import crontab
from django.db import connection
from time import sleep
from rooms.models import SensorData
@shared_task
def createEnviroReadingTask(roomID):
import js... | randy-jr-olive/gromari | rooms/tasks.py | tasks.py | py | 2,301 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "requests.exceptions",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "time.sleep",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "json.loads",
"li... |
74130719359 | import requests
import json
from datetime import date
# The basic class of an elasticsearch object.
# This will be the parent class for entries, sections and bids, as well as images
ELASTICSEARCH_URL = "http://localhost:9200/test_one_doris-"
VERSION_URL = "http://localhost:9200/version/"
class ElasticsearchObject(o... | DhileasHeywood/project_doris | doris/models/es_object.py | es_object.py | py | 2,960 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "json.dumps",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "requests.request",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "requests.request",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_n... |
19955869888 | from uuid import UUID
from typing import Optional
from django.http.request import HttpRequest, QueryDict
from rest_framework.authentication import BasicAuthentication, SessionAuthentication
from rest_framework.authentication import (
BaseAuthentication,
BasicAuthentication,
SessionAuthentication,
)
from r... | Reyzhehal/Fyiona | fyiona/umessages/views.py | views.py | py | 4,890 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.viewsets.ViewSet",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "serializers.MessageSerializer",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "rest_framework.authentication.BasicAuthentication",
"line_number": 40,
"usa... |
4025151855 | import json
import string
import nltk
import unidecode
from os import listdir
class DocSearch:
def __init__(self):
nltk.download('rslp')
nltk.download('stopwords')
def clear_pontuaction(self, str_content):
translator = str.maketrans('', '', string.punctuation)
clean_result =... | caioaraujo/DocSearch | main.py | main.py | py | 3,637 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "nltk.download",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "nltk.download",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "string.punctuation",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "nltk.corpus.stopw... |
74543529598 | import cv2
import numpy as np
from histogram import CourtFinder
from skimage.feature import hog
from sklearn.externals import joblib
import os
def subtract(original, deductible):
return np.uint8((original - np.int32(deductible)).clip(min = 0))
def er_filter(image):
kernel = np.ones((3,3), np.uint8)
image ... | tsoonjin/volleyup | volleyup/bgsub_stand_homo.py | bgsub_stand_homo.py | py | 12,464 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "numpy.uint8",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.int32",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number": 12,... |
20317508112 | import asyncio
import io
import json
from contextlib import closing
from bs4 import BeautifulSoup
from requests import get
from requests.exceptions import RequestException
import nrk_nav
def simple_get(url):
"""
Attempts to get the content at `url` by making an HTTP GET request.
If the content-type of r... | BredeYabo/NRK-Article-Scraper | app.py | app.py | py | 3,148 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "contextlib.closing",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "requests.exceptions.RequestException",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "... |
34914572452 | import json
import pytest
import flask
from linotp.lib import reply
from linotp.lib.context import request_context
from linotp.lib.error import ProgrammingError
from linotp.lib.reply import _get_httperror_from_params, sendResultIterator
@pytest.mark.usefixtures("app")
class TestReplyTestCase(object):
@pytest.m... | LinOTP/LinOTP | linotp/tests/unit/lib/test_reply.py | test_reply.py | py | 3,908 | python | en | code | 484 | github-code | 97 | [
{
"api_name": "linotp.lib.reply._get_httperror_from_params",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pytest.mark",
"line_number": 15,
"usage_type": "attribute"
},
{
... |
38649556749 | from collections import defaultdict, Counter
from time import time
class ProblemA():
#def setup(self):
# pass
#def transform(self, vals):
# pass
#def solveAll(self):
# pass
spawntimer = 7
newborntimer = 2
days = 80
def readFish(self, line):
# Performance on 1048576 days: defaultdict(int) = 3.2s, Counter... | YoToP/AoC | 2021/06/solutions/python/dg.py | dg.py | py | 1,111 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "collections.defaultdict",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "time.time",
... |
14084277769 | """list = ['A',' B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K']
sliced_list = list[3:8]
sliced_list2 = list[5:]
sliced_list3 = list[:]
sliced_list4 = list[:-6]# from [0] to -6 excluding -6
sliced_list5 = list[-6:-1]
sliced_list6 = list[::-1]
print(sliced_list)
print(sliced_list2)
print(sliced_list3)
print(sliced_lis... | KibetRonoh/Data-Structures-and-Algorithm | list.py | list.py | py | 2,137 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "functools.reduce",
"line_number": 75,
"usage_type": "call"
}
] |
5287883581 | #? 2-3. class 속성 활용
# 공통적인 특징을 갖는 태그들은 같은 class 속성값으로 묶어줄 수 있다.
# find, find_all 메소드 모두 동일하게 사용 가능
# 클래스 이름으로 요소를 찾을 때: 'class_' 파라미터를 사용
# 태그: soup.find_all('div', class_='top_menu')
# 태그 내용: soup.find_all('div', class_='top_menu')[0].text
# 태그 내용: soup.find_all('div', class_='top_menu')[1].text
import requests
from... | devgiants75/python-bt-230720 | python-bt0803-lsa/0810/f_bs4_class.py | f_bs4_class.py | py | 808 | python | ko | code | 1 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 15,
"usage_type": "call"
}
] |
12615564666 | #coding: utf8
import numpy as N
from traits.api import Range
from traitsui.api import View, VGroup, Item, EnumEditor
from TransformPlugin import TransformPlugin
class Rotator(TransformPlugin):
rotation_angle = Range(0, 3)
view = View(
VGroup(
Item('active'),
Item('rotation_an... | ptomato/Beams | beams/Rotator.py | Rotator.py | py | 634 | python | en | code | 19 | github-code | 97 | [
{
"api_name": "TransformPlugin.TransformPlugin",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "traits.api.Range",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "traitsui.api.View",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "tra... |
22985837386 | import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm, colors, patches, rcParams
from matplotlib.collections import PatchCollection
# Default parameters
levels = 20
fs_default = 'x-large'
fs_latex = 'xx-large'
fs_xlabel = fs_default
fs_ylabel = fs_default
fs_xticklabels = fs_default
fs_yticklab... | atantet/ATSuite | py/atplot.py | atplot.py | py | 6,608 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "matplotlib.cm.gist_stern",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.cm",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.insert"... |
72748848959 | #import modules
import json
import pandas as pd
from binance.client import Client
from envs import env
import time
import re
#import classes from ./ folder
import postgresdbAccess
#read fibonacci retracements from json
with open('fibLvl.json') as file:
fibLvl = json.load(file)
class liveAccess:
def __init__... | joengelh/binance-fibonaccibot | container-crawler/src/validationAccess.py | validationAccess.py | py | 4,078 | python | en | code | 8 | github-code | 97 | [
{
"api_name": "json.load",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "envs.env",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "envs.env",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "envs.env",
"line_number": 21,
"us... |
16948078666 | import json
from django.views import View
from django.http.response import JsonResponse
from django.db.models import Q
from django.shortcuts import render, HttpResponse, redirect
from .utils.reg_group import reg_group
from rbac.utils.reg_permission import register_permission
from cmdbapi import models as api_models
f... | ibwen-oo/cmdb | cmdbweb/views.py | views.py | py | 12,314 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.views.View",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.render",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "rbac.utils.reg_permission.register_permission",
"line_number": 35,
"usage_type": "call"
},
... |
1535295879 | import pandas as pd
import matplotlib.pyplot as plt
plt.rcParams['axes.xmargin'] = 0
import numpy as np
import cmath
import os
#-----------------------------------------------
iteration = []
obj = []
f =open('conv_history.txt', 'r')
header = f.readline()
for line in f:
line = line.strip()
columns = line.s... | yangpl/libEMMI | run_adjsrc_freq2time/plot_convergence.py | plot_convergence.py | py | 676 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.arr... |
24536990963 | from typing import List
def canPlaceFlowers(flowerBed: List[int], n: int) -> bool:
"""Return true iff 'n' new flowers can be added to the 'flowerBed'."""
length = len(flowerBed)
# Memoise results from 'maximumNewFlowers' function.
cache = {}
def maximumNewFlowers(index: int = 0):
"""Retu... | ansonmiu0214/dsa-worked-solutions | solutions/can_place_flowers/solution.py | solution.py | py | 1,215 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 3,
"usage_type": "name"
}
] |
44153078858 | import sys
import pygame
from game_func.settings import Settings
from entidades.nave import Nave
from game_func.pontos import Pontos
import game_func.game_functions as gf
from game_func.menu import Menu
def rodar_jogo():
"""Inicializa as estruturas de dados das entidades do jogo,
inicializa as funções do pyga... | breno-abreu/AlienInvasionPython | alien_invasion/alien_invasion.py | alien_invasion.py | py | 4,733 | python | pt | code | 0 | github-code | 97 | [
{
"api_name": "pygame.init",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "game_func.settings.Settings",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pygam... |
18237368767 | from fastapi import FastAPI
from .routes import router as NoteRouter
app = FastAPI()
@app.get("/", tags=["Root"])
async def read_root() -> dict:
return {
"message": "Welcome to my notes application, use the /docs route to proceed"
}
app.include_router(NoteRouter, prefix="/note") | Youngestdev/fastapi-notes-app | server/api.py | api.py | py | 298 | python | en | code | 14 | github-code | 97 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "routes.router",
"line_number": 12,
"usage_type": "argument"
}
] |
13416939846 | import folium
import pandas as pd
world_geo = r'C:/Users/Erdem/python kodları/Data_Visualization/world_countries.json' # geojson file
# create a plain world map
world_map = folium.Map(location=[0, 0], zoom_start=2, tiles='Mapbox Bright')
# Preparing the data.
covid_data = pd.read_csv("C:/Users/Erdem/pytho... | Tardiser/DataVisualization | choroplethMap/choroplethMap.py | choroplethMap.py | py | 2,200 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "folium.Map",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.set_option",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "folium.Choropleth",
"... |
18395973826 | from asyncore import read
from rest_framework import serializers
from .models import Fish
class FishSerializer(serializers.HyperlinkedModelSerializer):
fish_detail = serializers.ModelSerializer.serializer_url_field(
view_name='fish_detail'
)
class Meta:
model = Fish
fields = ('speci... | halflemonpie/fishing-backend | fishing_backend/serializers.py | serializers.py | py | 526 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.serializers.HyperlinkedModelSerializer",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.ModelSerializer.serializer_url_fie... |
185120399 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Date : 2020/8/19
# @Author : zhangranghan
import os,sys
import logging
from time import strftime
from logging.handlers import TimedRotatingFileHandler
class Logger(object):
def __init__(self, logger_name='log'):
self.logger = logging.getLogger(logger... | wenyan808/auto-test | logger.py | logger.py | py | 2,177 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.root.setLevel",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "logging.root",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "logging.NOT... |
4529954563 | """A Sphinx extension for linking to your project's issue tracker."""
import re
from typing import Callable, Optional, Tuple
from docutils import nodes, utils
from sphinx.config import Config
from sphinx.util.nodes import split_explicit_title
__version__ = "3.0.1"
__author__ = "Steven Loria"
__license__ = "MIT"
def... | sloria/sphinx-issues | sphinx_issues.py | sphinx_issues.py | py | 12,843 | python | en | code | 49 | github-code | 97 | [
{
"api_name": "sphinx.util.nodes.split_explicit_title",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "docutils.utils.unescape",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "docutils.utils",
"line_number": 26,
"usage_type": "name"
},
{
"api... |
29245604577 | import os
import cv2
import cv2 as cv
import numpy as np
import random as rng
def verticalLine(gray):
lineList = []
# 应用高斯模糊以减少噪音
blur = cv2.GaussianBlur(gray, (7, 7), 0)
blur = cv2.GaussianBlur(blur, (7, 7), 0)
cv2.imwrite(out_dir + "01blur.jpg", blur)
# 检测边缘
edges = cv2.Canny(blur, 30, 90... | LittleSheepy/MyMLStudy | ml00project/pj2LG/托盘定位.py | 托盘定位.py | py | 10,468 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "cv2.GaussianBlur",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.GaussianBlur",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.imwrite",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.Canny",
"line_n... |
40717050394 | """
Input Output Comment
o e a o e a i Word found: rose Start by taking the first volew "o" and the last consonant "r". They are found in words "rose", "lotus", and "daffodil".
p r s x r Vowels left: o e a i... | RadoslavBukov/SoftUni-Python | Python Programming Advanced/Ex_10_Exam Preparation/Ex_10_04 Flower Finder v2.py | Ex_10_04 Flower Finder v2.py | py | 1,704 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "collections.deque",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 17,
"usage_type": "call"
}
] |
74990785917 | import argparse
def get_team_name_and_score(team_name_score):
"""Parse team name and score from match score string"""
team_split = team_name_score.split(' ')
team_score = int(team_split[-1])
team_name = ' '.join(team_split[:-1]).strip()
return team_name, team_score
def get_points(team1_score, t... | KingsleyBell/soccer-league-ranker | ranker/main.py | main.py | py | 2,759 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 70,
"usage_type": "call"
}
] |
25466956198 | import datetime
import os
import pathlib
from urllib.parse import quote_plus
import scrapy
import slugify
from scrapy.spidermiddlewares.httperror import HttpError
from twisted.internet.error import DNSLookupError
from twisted.internet.error import TimeoutError, TCPTimedOutError
BASE_PATH = os.environ.get('BASE_PATH'... | matias-pizarro/freebsd-graphics | www_data/www_data/spiders/nvidia.py | nvidia.py | py | 7,949 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "os.environ.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_... |
41732251066 | #!/usr/bin/env python
# coding=utf-8
import torch
import torch.nn as nn
from torch.jit.annotations import Dict, List, Tuple, Optional
from torch import Tensor
from collections import OrderedDict
import warnings
class GeneralizedRCNN(nn.Module):
def __init__(self, transform, backbone, rpn, roi_heads):
su... | Chrisa142857/PolarNet-GCdet | Faster RCNN/utils/generalized_rcnn.py | generalized_rcnn.py | py | 2,462 | python | en | code | 9 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "torch.jit",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "torch.jit.annotate",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.