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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
71312787428 | import requests
import json
import pyttsx3
import speech_recognition as sr
import re
import threading
import time
API_KEY = 'tA0_xgVpoaiH'
PROJECT_TOKEN = 'tKijAox01o6c'
RUN_TOKEN = 'tJ9Vk3gTO8kM'
class Data:
def __init__(self,api_key,project_token):
self.api_key = api_key
self.project_token = pr... | kf-rahman/NBA-Voice-Assistant | nbavc.py | nbavc.py | py | 2,662 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "requests.get",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number":... |
28469197259 |
# 文件读写
import shutil
txtpath = '/Users/fenggao/git/third/python_learn/Demo1/iotest.txt'
try:
f = open(txtpath, 'r') #
print(f.read())
finally:
f.close()
# 等同于上面的语句
with open(txtpath, 'r') as f:
print(f.read())
# 内存中读写数据
from io import StringIO, BytesIO
f = StringIO()
f.write('Hello ')
f.write('Wor... | maoinbupt/python_learn | Demo1/11IO.py | 11IO.py | py | 2,380 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "io.StringIO",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "io.StringIO",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "io.BytesIO",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "io.BytesIO",
"line_number": 36... |
2016576436 | # import time
from pathlib import Path
from typing import Tuple, List, Dict
import numpy as np
import torch
from transformers import AutoTokenizer
class Embedder(object):
"""Class for wrapping up the tokenizer of the BERT models.
"""
def __init__(self, model_path: str = 'xlm-roberta-base'):
"""C... | vincentwen1995/SemEval2021-MCL_WiC-AERGCN | AERGCN/word_embeddings/embedders.py | embedders.py | py | 7,193 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "transformers.AutoTokenizer.from_pretrained",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "transformers.AutoTokenizer",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 23,
"usage_type": "call"
},
{
... |
17073725014 | from CRM.Processors.Service.BWUsage import show_bw_usage
from CRM.Processors.Service.Dedicated import view_dedicated_service, add_new_dedicate_service, delete_dedicate_service, \
get_dedicated_service_detail
from CRM.Processors.Service.Disconnect import kill_user
from CRM.Processors.Service.FrmServiceSummery im... | sauditore/FCRM | CRM/URLS/service/urls.py | urls.py | py | 10,637 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "CRM.Processors.Service.ServiceManagement.show_all_service",
"line_number": 31,
"usage_type... |
70818871906 | import sys
import itertools
import random
import simplechains.tex.tex_fuzzer as tex_fuzzer
from stateless.status import *
from stateless.exceptions import *
from tokens import pick
import stateless.config as CONFIG
ALLOWED_BYTES = [i for i in CONFIG.ALL_BYTES if i not in CONFIG.DISALLOWED_BYTES]
MYSET_OF_BYTES = []
P... | bendrissou/tex-fuzzer | stateless/generate.py | generate.py | py | 4,823 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "stateless.config.ALL_BYTES",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "stateless.config",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "stateless.config.DISALLOWED_BYTES",
"line_number": 10,
"usage_type": "attribute"
},
... |
29566370307 | #!/usr/bin/env python
#
# This program is a Youtube Client that removes some videos from the Unprocessed playlist
import os
import sys
import optparse
import json
from io import open
import csv
import googleapiclient.errors
import auth
from auth import lib
# from thinkland import classes
from thinkland.classes impo... | jackwaashere/thinkland_video_mgmt | remove_errors.py | remove_errors.py | py | 8,812 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "os.path.expanduser",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numb... |
30013233034 | from datasets import load_dataset
from transformers import BartForConditionalGeneration, AutoTokenizer
import torch
import pandas as pd
# for possible versions, see: https://huggingface.co/datasets/cnn_dailymail
# use this dataset instead of the original: https://huggingface.co/datasets/ccdv/cnn_dailymail
# see this ... | coderpendent/research-sandbox | Summarization/aspect_based/cnn_sbert_eval_score.py | cnn_sbert_eval_score.py | py | 5,763 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "datasets.load_dataset",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "transformers.BartForConditionalGeneration.from_pretrained",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "transformers.BartForConditionalGeneration",
"line_number": 13... |
35603031427 | import numpy as np
import torch.utils.data as data
import torchvision.transforms as transforms
from PIL import Image
from torch.utils.data import Dataset
from torch.utils.data.sampler import BatchSampler
from datasets.sampling import UniformSampler
from utils import params
def get_filenames_and_labels(data_folder, t... | ne-bo/course-work | datasets/loaders/UKB.py | UKB.py | py | 8,771 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "numpy.array",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": ... |
37721199298 | import scrapy
class BlogsSpider(scrapy.Spider):
name = 'naverblogSpider'
start_urls=['https://d2.naver.com/home?page=0']
def parse(self, response):
print(response.css('h2 a'))
# for posts in response.css('a'):
# print(posts.css('a::text').get())
| Wonjuny0804/blog-crawler | blogsSpider/blogsSpider/spiders/naverblogSpider.py | naverblogSpider.py | py | 272 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "scrapy.Spider",
"line_number": 3,
"usage_type": "attribute"
}
] |
35517828521 | import jsonpickle
from tinydb import TinyDB
from tournament import Tournament
def tournaments_list():
print(
"Liste des tournois sauvegardés:\n"
"-------------------------------\n")
db = TinyDB("data/db.json")
tournaments_table = db.table("tournaments")
count = 0
for _ in tourname... | christaus/OC_P4 | tournaments_list.py | tournaments_list.py | py | 475 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "tinydb.TinyDB",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "tournament.Tournament",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "jsonpickle.decode",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tournament.name... |
70645441511 | from .util import get_data_file_path
import logging
from collections import OrderedDict, namedtuple
from operator import itemgetter
import re
import string
import traceback
from vt.object import Object
__all__ = ("SampleInfo",
"LabeledSample",
"AvLabels",)
SampleInfo = namedtuple('SampleInfo',
... | kfinny/avclass-lib | kfinny/avclass/avclass.py | avclass.py | py | 11,550 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "collections.namedtuple",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "util.get_data_file_path",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": ... |
73212316065 | #!/usr/bin/env python
from lxml.etree import XMLParser, fromstring, XMLSchema
schema_doc = open('schema.xsd').read()
inst_doc = open('inst.xml').read()
parser = XMLParser(resolve_entities=False)
elt = fromstring(inst_doc, parser)
schema = XMLSchema(fromstring(schema_doc))
schema.validate(elt)
| arskom/spyne | examples/xml/validation_error/validation_internal_error.py | validation_internal_error.py | py | 297 | python | en | code | 1,114 | github-code | 70 | [
{
"api_name": "lxml.etree.XMLParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "lxml.etree.fromstring",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "lxml.etree.XMLSchema",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "lxml.et... |
70979139426 | from django.shortcuts import render
from django.http import HttpResponseRedirect
from django import forms
# Create your views here.
def bmi(request):
if request.method == 'POST':
height = request.POST.get('height','')
h_unit = request.POST.get('unit_height', '')
weight = request.POST.get(... | raj2408/practise-examples | bmicalc/views.py | views.py | py | 488 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "django.shortcuts.render",
"line_number": 15,
"usage_type": "call"
}
] |
14836330960 | from typing import List
from collections import defaultdict
from heapq import heappush, heappop
class Solution:
def topKFrequent(self, nums: List[int], k: int) -> List[int]:
freq = defaultdict(int)
heap = []
for n in nums:
freq[n] += 1
for n in freq:
heappus... | jackiey99/AlgorithmCoding | leetcode/347_top_k_frequent_elements.py | 347_top_k_frequent_elements.py | py | 582 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "typing.List",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "collections.defaultdict",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "heapq.heappop",
... |
268081816 | from rest_framework import serializers
from .models import Poll, Question, Choice
class PollSerializer(serializers.ModelSerializer):
questions = serializers.StringRelatedField(many=True, required=False)
class Meta:
model = Poll
fields = ['pk', 'poll_name', 'start_date', 'end_date', 'descript... | GregYavis/API_test_task | poll/serializers.py | serializers.py | py | 2,803 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.StringRelatedField",
"line_number": 6,
... |
72810840865 | from flask import Flask, request, jsonify
from tablib import Dataset
from geopy.geocoders import Nominatim
import pandas as pd
app = Flask(__name__)
geolocator = Nominatim(user_agent="geoapiExercises")
app.config['JSON_AS_ASCII'] = False
@app.route("/python/", methods=['GET', 'POST'])
def upload_filee():
ret... | brkslmn/Lat-Long-Location- | app.py | app.py | py | 2,116 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "geopy.geocoders.Nominatim",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "flask.r... |
35553780296 | import pandas as pd
from sklearn.neighbors import KNeighborsClassifier
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
x_test = pd.read_csv("data_test.csv",sep=",")
y_test = pd.read_csv("target_test.csv",sep=",")
x_train = pd.read_csv("data_train.csv",sep=",")
y_train = pd.... | TianshuoMa/dmFinalWork | kNN.py | kNN.py | py | 970 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"l... |
666791015 | from services.connection import Connection
from helpers.parser_data import parse_dict_to_tuple, parser_null_values
from datetime import datetime
class Users(Connection):
def insert(self, data: dict) -> bool:
c = self.connection.cursor()
sql = 'INSERT INTO users values(null, %s, %s, %s, %s, %s, %s... | rodsilvavieira2/contacts-python-background | models/users.py | users.py | py | 2,978 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "services.connection.Connection",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.now",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": ... |
1782990288 | # Import necessary libraries
import os
import pickle
from skimage.io import imread
from skimage.transform import resize
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.model_selection import GridSearchCV
from sklearn.svm import SVC
from sklearn.metrics import accuracy_score
# Set ... | trueghost/Parking-Spot-Image-Classifier | mian.py | mian.py | py | 3,425 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "os.listdir",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number"... |
25159526258 | from unittest import TestCase
from src.Handler import Manager
import requests
import json
class TestRefresh(TestCase):
cases = ["Los Angeles", "Nassau", "New York City", "Montgomery", "Philadelphia"]
def fetch(self, loc):
"""
Simulate the front-end to send the request to the server and test t... | zhirongwang94/cs130 | backend/test/test_refresh.py | test_refresh.py | py | 1,762 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "unittest.TestCase",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "src.Handler.Manager.get_instance",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "src.Ha... |
13915213096 | #!/usr/bin/env python
# pylint: disable=invalid-name,line-too-long,missing-function-docstring
"""sigtoaddr: Convert a Bitcoin signature into an address eg Bitcoin Segwit or Altcoin
"""
import base64
import sys
import urllib.request
from base64 import b64decode
from binascii import hexlify
from collections import named... | timchurchard/opendime-utils | old_python/sigtoaddr.py | sigtoaddr.py | py | 19,480 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "collections.namedtuple",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "bitcoin.signmessage.BitcoinMessage",
"line_number": 71,
"usage_type": "name"
},
{
"... |
11927526514 | import time
from dns import exception, resolver, reversename
from main.helpers.file import file_read_helper
from main.helpers.ip_address_helper import IpAddressHelper
from main.helpers.string_helper import remove_spaces
class DnsHelper(object):
def __init__(self) -> None:
self.dns_resolver = resolver.Re... | anjo-hsr/Traffic-Analyzer | backend/bin/main/helpers/dns_helper.py | dns_helper.py | py | 2,617 | python | en | code | 5 | github-code | 70 | [
{
"api_name": "dns.resolver.Resolver",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "dns.resolver",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "dns.resolver.Resolver",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "dns.resolver... |
20498856374 | import tkinter as tk
from PIL import Image, ImageTk, ImageGrab
from copy import deepcopy
import imageio
import _thread
framesArray = []
currentFrame = -1
animationWidth = 500
animationHeight = 500
frameImages = []
class App(tk.Frame):
def __init__(self, parent, initialFrame):
tk.Frame.__init__(self, pare... | JonathanXSG/PAL-Project | src/pal.py | pal.py | py | 14,067 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "tkinter.Frame",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "tkinter.Frame.__init__",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tkinter.Frame",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "tkinter.... |
44573831727 | # -*- coding: utf-8 -*-
"""
Created on Sun Apr 30 15:58:37 2023
@author: robin
"""
import numpy as np
import os
import random
import torch
import torchaudio
import librosa
from pathlib import PureWindowsPath, PurePosixPath, Path
import posixpath
from tqdm import tqdm
from glob import glob
from torch.... | minyoungpark1/Speech-Enhancement | datasets/voicebank_dataset.py | voicebank_dataset.py | py | 4,384 | python | en | code | 7 | github-code | 70 | [
{
"api_name": "torch.utils",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "glob.glob",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "pathlib.PureWindowsPath",
"line_number": 37,
"usage_type": "argument"
},
{
"api_name": "pathlib.Path",... |
86284597593 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from astropy.io import fits
import numpy as np
import pytest
from sofia_redux.instruments.hawc.datafits import DataFits
from sofia_redux.instruments.hawc.steps.stepmerge import StepMerge
from sofia_redux.instruments.hawc.tests.resources \
import DRPT... | SOFIA-USRA/sofia_redux | sofia_redux/instruments/hawc/steps/tests/test_merge.py | test_merge.py | py | 11,162 | python | en | code | 9 | github-code | 71 | [
{
"api_name": "sofia_redux.instruments.hawc.tests.resources.DRPTestCase",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "sofia_redux.instruments.hawc.tests.resources.scan_smp_data",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sofia_redux.instruments.hawc.... |
10783910672 | import numpy as np
from matplotlib import pyplot as plt
from scipy import stats
import ionics_fits as fits
from . import common
def test_binomial(plot_failures):
"""Basic test of binomial fitting"""
num_trials = 1000
x = np.linspace(-3, 3, 200) * 2 * np.pi
model = fits.models.Sinusoid()
params = ... | OxIonics/ionics_fits | test/test_binomial.py | test_binomial.py | py | 3,888 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "numpy.linspace",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "ionics_fits.models.Sinusoid",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "ionics_fits.... |
71166136226 | # Companion Ship Fitting Calculator to the Ship Generator V3
# Ver 0.1.2
import csv, os
from sys import modules
from config.definintions import ROOT_DIR
#load from CSV. slightly modfied from the way that the generator handles it internally for readibility reasons
def load_from_csv():
global hull_types
hull_t... | Iridium64/ship_generator | Ship Calculator.py | Ship Calculator.py | py | 9,609 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "os.listdir",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "config.definintions.ROOT_DIR",
"line_number": 12,
"usage_type": "argument"
},
{
"api_name": "os.path",
... |
23945348937 | # -*- coding:utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
import copy
def rgb_to_ycbcr(im_rgb):
im_ycbcr = copy.deepcopy(im_rgb)
R = im_rgb[:, :, 0]
G = im_rgb[:, :, 1]
B = im_rgb[:, :, 2]
im_ycbcr[:, :, 0] = 0.299 * R + 0.587 * G + 0.114 * B
im_ycbcr[:, ... | cao19881125/rgb_to_yuv | rgb_to_yuv_and_extract.py | rgb_to_yuv_and_extract.py | py | 1,991 | python | en | code | 20 | github-code | 71 | [
{
"api_name": "copy.deepcopy",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.float",
"line_number... |
38674269143 | #This file creates the database and table that belongs in the database. The table will contain minerals' data and information. This code outputs a database called "minspec.db" that will appear in the local directory
#To run this file, make sure you are in the same directory as the file and type "python create_table.py"... | mchang255/Ocean_World_Spectra | create_table.py | create_table.py | py | 1,160 | python | en | code | 4 | github-code | 70 | [
{
"api_name": "sqlite3.connect",
"line_number": 8,
"usage_type": "call"
}
] |
38249152229 | import ipaddress
import socket
from contextlib import closing
def ip_to_int(ip):
# Convert an IP address to an integer for comparison.
return int(ipaddress.IPv4Address(ip))
def calculate_distance(ip1, ip2):
# Define subnet masks (adjust as needed).
subnet_mask_1 = 24 # /24 subnet mask
subnet_ma... | codeparameter/SalarCoin | dependencies/ntools.py | ntools.py | py | 1,242 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "ipaddress.IPv4Address",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "contextlib.closing",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET"... |
40830823353 | #!/bin/env python3.10
import argparse
import re
def get_args():
parser = argparse.ArgumentParser(description="A program to introduce yourself")
parser.add_argument("-f", "--file", help="File name")
parser.add_argument("-o", "--output", help="Ouput File")
return parser.parse_args()
args=get_args()
... | Tripfantasy/QAA | scripts/map.py | map.py | py | 1,364 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
}
] |
19936837367 | from collections import UserDict
from flask import current_app, url_for
from werkzeug.local import LocalProxy
from .provider import ProviderError, TouchLimitError
from .headhunter import HeadHunter
from .superjob import SuperJob
__all__ = ['Providers', 'ProviderError', 'TouchLimitError']
class Providers(UserDict)... | perewall/touchresume | touchresume/providers/__init__.py | __init__.py | py | 1,553 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "collections.UserDict",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "flask.url_for",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "headhunter.HeadHunter",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "superjob.Sup... |
36756522363 | from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from sklearn.neighbors import KNeighborsClassifier
import mglearn
iris_dataset = load_iris()
X_train, X_test, y_train, y_test = train_test_split(iris_datas... | Nofireash/- | 鸢尾花数据集.py | 鸢尾花数据集.py | py | 1,561 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "sklearn.datasets.load_iris",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 20,
"usage_type": "call"
},
{
... |
34868120815 | """
There is a useful reddit post describing the differences here:
https://www.reddit.com/r/archebards/comments/3bwgj7/howto_fix_archeagemml_desyncs/
"""
import sys
from collections import deque
def argmax(iterable):
return max(enumerate(iterable), key=lambda x: x[1])[0]
def argmin(iterable):
return min(en... | Telgor/mml2aa | mml_conv.py | mml_conv.py | py | 13,608 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "collections.deque",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "sys.maxsize",
"line_number": 76,
"usage_type": "attribute"
}
] |
14608689716 | from functools import wraps
from flask import Blueprint, redirect, url_for, render_template, flash, g, current_app, request, get_flashed_messages
from flask.helpers import get_flashed_messages
from backends.brickowl import BrickOwl
from db import Session
from routes.auth import auth_request
from models import Op as Sav... | loryruta/brick-scraper | src/routes/settings.py | settings.py | py | 4,595 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "flask.Blueprint",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "db.Session.begin",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "db.Session",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "models.User",
"line_n... |
31912975607 | import wx
class MyFrame(wx.Frame):
PANEL_ORIG_POINT = wx.Point(15, 15)
def __init__(self, title):
super(MyFrame, self).__init__(None, title=title, size=(500, 550))
self.Bind(wx.EVT_PAINT, self.on_paint)
self.Centre()
self.SetFocus()
self.Show()
def on... | Erica-Iris/wxpython | 2048.py | 2048.py | py | 1,174 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "wx.Frame",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "wx.Point",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "wx.EVT_PAINT",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "wx.ClientDC",
"line_number"... |
71433473191 | from .AstroDataset import Minibatch
import torch
from lhotse.dataset import OnTheFlyFeatures
from lhotse.dataset.input_strategies import BatchIO, PrecomputedFeatures
from lhotse import Fbank, FbankConfig
from lhotse import CutSet
from lhotse.workarounds import Hdf5MemoryIssueFix
from lhotse.dataset.speech_recognitio... | m-wiesner/astro | astro/datasets/Wav2Vec2Dataset.py | Wav2Vec2Dataset.py | py | 1,631 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "torch.utils",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "lhotse.workarounds.Hdf5MemoryIssueFix",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "lhotse.dataset.input_strategies.AudioSamples",
"line_number": 19,
"usage_type": "c... |
37282124241 | # -*- coding:utf-8 -*-
from typing import Optional
from copy import deepcopy
from ._fieldinfo import FieldInfo, _not_set, is_set
from .processors import Const
from ._packetbase import FieldBase
__all__ = ['Field']
class Field(FieldBase):
__instances_created = 0
@property
def info(self):
return ... | Q-Master/packets.py | packets/field.py | field.py | py | 3,934 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "_packetbase.FieldBase",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "_fieldinfo._not_set",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "_fieldinfo.FieldInfo",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "_field... |
5827437665 | from openpyxl import load_workbook
import xlsxwriter
setting = {
# 用于转换一些中文的字段名转换成英文,数据在输出前会修改字典返回的键名,默认转换是从第一个字段开始
'CHANGE_FIELD': ('sys_sku','mum_id',)
}
# 操作xlsx文档某一页的类
class XlsxSheet:
# 初始化
# @ workBookPath str 工作薄的地址,绝对位置或者相对位置
# @ sheet 第几个工作薄,以数字从0开始,
def __init__(self, load_workbook, ... | xiaoRuMiLi/Python-ticket | tickets/lib/XlsxSheet.py | XlsxSheet.py | py | 3,937 | python | zh | code | 1 | github-code | 71 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "openpyxl.load_workbook",
"line_number": 112,
"usage_type": "argument"
}
] |
28862087881 | import math
import torch.nn as nn
import slowfast.utils.weight_init_helper as init_helper
from slowfast.models.batchnorm_helper import get_norm
from slowfast.models.build import MODEL_REGISTRY
from slowfast.models import resnet_helper, stem_helper
from slowfast.models.video_model_builder import FuseFastToSlow, _POOL1,... | azat-d/nfl-impact-detection | video_model_builder.py | video_model_builder.py | py | 9,234 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "math.ceil",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "math.fabs",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number"... |
11764130391 | from constants import CMD_CHAT, CMD_END_CHAT, CMD_LIST_USERS, CMD_POSTBOX, CMD_QUIT, SERVER_NAME, SERVER_PORT
import socket
from message import Message
from datetime import datetime
import pickle
import threading
import sys
HOST = 'localhost' # maquina onde esta o par passivo
current_chat = None
postbox = []
username... | B-Trindade/Distributed-Chat | client.py | client.py | py | 5,838 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "threading.Lock",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "message.Message",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "message.timestamp",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "message.sender"... |
5779684878 | from dotenv import load_dotenv
import os
import openai
import src.utilities.helpers
load_dotenv()
openai.api_key = os.getenv("OPENAI_API_KEY")
DEBUG = 1
def ask_gpt(prompt, show_output=0):
response = openai.Completion.create(
model="text-davinci-003",
prompt=prompt,
temperature=0,
... | OneGraund/UCS_Support_Bot | src/openai_gpt/gpt.py | gpt.py | py | 5,044 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "openai.api_key",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.getenv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "openai.Completion.creat... |
29547475742 |
# import the necessary packages
from imutils.video import VideoStream
from imutils.video import FPS
import numpy as np
import argparse
import imutils
import time
import cv2
import os
__location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
def cascad_get_bounding_boxes(frame):
frame ... | Ebrahim1820/Object_DetectingAndTracking_YOLOv3_KalmanFilter | detect1.py | detect1.py | py | 8,027 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "os.path.realpath",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_numb... |
35086755968 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from matplotlib import rcParams
rcParams["figure.figsize"] = 16, 6
plt.style.use("seaborn-white")
import os
from subprocess import check_output
import tensorflow as tf
PATH = "../input/"
print(check_output(["ls"... | rhong3/MLcontest | Ref4.py | Ref4.py | py | 1,414 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "matplotlib.rcParams",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_nam... |
74143926946 | from typing import List
from random import random as rd
from time import time
if __name__ == '__main__':
SIZE: int = 10_000_000
l1: List[int] = [
int(rd() * 10) % 10
for _ in range(SIZE)
]
print(f"ORIGINAL: {l1[:20]}... ({SIZE})")
reference_list: List[int] = [3, 5, 7]
print(f"... | AndreiHondrari/software-engineering-exploration | data_structures_and_algorithms/02_arrays/04_04_count_multiple_values.py | 04_04_count_multiple_values.py | py | 609 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "typing.List",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "random.random",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "time.time",
"line_number": 17... |
35727952440 | import os
import time
import json
import subprocess
import pdb
import consts
from infra.app import AppFactory
asic = os.environ.get('ASIC', 'capri')
HNTAP_CMD = 'build/x86_64/iris/' + asic + '/bin/nic_infra_hntap'
CONTAINER_HNTAP_CMD = "naples/nic/tools/restart-hntap.sh"
def preexec(): # Don't forward signals.
o... | ccdxc/sw | nic/e2etests/infra/hntap.py | hntap.py | py | 3,290 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "os.environ.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.setpgrp",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "consts.hntap_log",
"lin... |
4705995501 | from transformers import T5Tokenizer, T5ForConditionalGeneration
from transformers.optimization import Adafactor
import torch
def get_outputs(input, prefix, model_paths):
# set parameters
learning_rate = 3e-4
tokenizer = T5Tokenizer.from_pretrained("t5-small")
model = T5ForConditionalGeneration.from_p... | clxxu/stepcheft5 | runmodel.py | runmodel.py | py | 1,507 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "transformers.T5Tokenizer.from_pretrained",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "transformers.T5Tokenizer",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "transformers.T5ForConditionalGeneration.from_pretrained",
"line_number": 10,
... |
21551926816 | import atexit
import logging
import sys
from datetime import datetime
from pathlib import Path
import bakta
import bakta.constants as bc
import bakta.config as cfg
import bakta.io.fasta as fasta
import bakta.io.json as json
import bakta.io.tsv as tsv
import bakta.io.gff as gff
import bakta.io.insdc as insdc
import ba... | oschwengers/bakta | bakta/main.py | main.py | py | 29,479 | python | en | code | 356 | github-code | 71 | [
{
"api_name": "bakta.utils.parse_arguments",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "bakta.utils",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "bakta.config.prefix",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "bakt... |
15140551283 | from sklearn.base import is_classifier, clone
from .base import BaseLearner
from ..base import RegressorMixin, ClassifierMixin
class XLearner(BaseLearner):
def __init__(self,
*,
estimator=None,
estimator_alpha_t=None,
estimator_alpha_c=None,
... | PashentsevW/uplift | uplift/meta/xlearner.py | xlearner.py | py | 5,032 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "base.BaseLearner",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "sklearn.base.clone",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "sklearn.base.clone",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "sklearn.base.cl... |
23595086820 | #if we want to find all accounts with balance greater than $4700
import pprint
import os
from dotenv import load_dotenv
from pymongo import MongoClient
#import ObjectId from bson package to enable querying by ObjectId
from bson.objectid import ObjectId
#more details here: https://api.mongodb.com/python/3.3... | Princesacorderosa/MongoDB_with_python | Unit 2 - MongoDB CRUD Operations with Python/find_multiple.py | find_multiple.py | py | 1,218 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "pymongo.MongoClient",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pprint.pprint"... |
28359601281 | from collections import defaultdict, Counter
from itertools import chain
from node import Node
from node import add,find,extract_prefix,ranking
from string import punctuation
from nltk import word_tokenize
from nltk.corpus import stopwords
from bs4 import BeautifulSoup
from scraper import clean_html
from tokenizer imp... | naadvar/Adv-Algorithm-Project | search-engine/trie.py | trie.py | py | 2,047 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "collections.defaultdict",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "scraper.clean_html",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "inverse_index... |
5241130560 | from PIL import Image
import matplotlib.pyplot as plt
import cv2
import numpy as np
image_path = 'landscape.jpg'
rgb_image = Image.open(image_path)
gray_image = cv2.cvtColor(np.array(rgb_image), cv2.COLOR_RGB2GRAY)
last_three_bits_image = gray_image & 0b111
differenced_image = gray_image - last_three_bits... | FahimNirob/DIP | DIP_2/Practice_2.py | Practice_2.py | py | 691 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "PIL.Image.open",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "cv2.cvtColor",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 9... |
15941514853 | import os
import jinja2
import webapp2
import urllib
import premade # my premade ingredients file
import models # my ndb.models
# TODO: work on code efficiency
from google.appengine.ext import ndb
Ing = models.Ing
User = models.User
Recipe = models.Recipe
JINJA_ENVIRONMENT = jinja2.Environment(
loader=jinja2.Fi... | rollerz/smoothiewiz | main.py | main.py | py | 24,608 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "models.Ing",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "models.User",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "models.Recipe",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "jinja2.Environmen... |
33470426520 | """
Python Scraper to scraper data
"""
import sys
import argparse
import requests
from bs4 import BeautifulSoup
import json
import re
class Scraper:
"""
Constructor
"""
def __init__(self) -> None:
self.headers = {
"Access-Control-Allow-Origin": "*",
"Access-Contro... | noachallis/SENG3011_minions | PHASE_1/scraper/src/scrapyer.py | scrapyer.py | py | 5,476 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "requests.get",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"li... |
26860679567 | """Dataset functions.
"""
import os
import pathlib
import re
import tempfile
from datetime import datetime
from zipfile import ZipFile
import tensorflow as tf
import numpy as np
from object_detection.protos import string_int_label_map_pb2
from google.protobuf import text_format
from cvat.apps.dataset_manager.task imp... | cmusatyalab/OpenTPOD | opentpod/object_detector/datasets.py | datasets.py | py | 8,202 | python | en | code | 117 | github-code | 71 | [
{
"api_name": "tensorflow.compat.v1.enable_eager_execution",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "tensorflow.compat",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 29,
"usage_type": "call"
},
{
"a... |
6634803413 | import numpy as np
import pandas as pd
import random
import math
import os
import datetime as dt
def load_data(dir):
"""Loads data to be augmented from csv file.
Args:
dir (str): Path to package root directory
Returns:
data (pd.DataFrame): Dataframe containing data loaded from csv
... | mpjohns9/MSR_Final_Project | maze_gen/src/generate/data_augmentation.py | data_augmentation.py | py | 5,446 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pandas.read_csv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line... |
25884564468 | import collections
from typing import *
import heapq
class Solution:
def leastInterval(self, tasks: List[str], n: int) -> int:
counts = collections.Counter(tasks)
heap = []
for task, count in counts.items():
heapq.heappush(heap, (-count, task))
time = 0
while ... | yankee624/Algorithm-practice | LeetCode/Greedy/task_scheduler.py | task_scheduler.py | py | 1,347 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "collections.Counter",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "heapq.heappop",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
... |
70983620389 | import math
from itertools import combinations, permutations
def is_prime(n):
for i in range(2, int(math.sqrt(n))+1):
if (n % i) == 0:
return False
return True
n = int(input())
while n > 0:
n -= 1
num = input()
output = 0
for i in range(1, len(num)+1):
numbers =... | EricLindesay/competitive-coding | kattis/medium/industrialspy/industrialspy.py | industrialspy.py | py | 515 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "math.sqrt",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "itertools.permutations",
"line_number": 20,
"usage_type": "call"
}
] |
18257976177 | import torch
from torch import nn, optim, Tensor
from torch.utils.data import Dataset, DataLoader, Sampler, RandomSampler
import cv2
import numpy
from pathlib import Path
from tqdm import tqdm
import functools
class PictureDataset(Dataset):
def __init__(self):
super(PictureDataset, self).__init__()
... | IceCapriccio/GooseReplay | auto_stop.py | auto_stop.py | py | 5,326 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "functools.cached_property",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "... |
18243616772 | import binascii
import traceback
import warnings
import sys
import argparse
import subprocess
import json
import re
import logging
import os
import threading
import logging.config
import datetime
from collections import defaultdict
try:
import requests, urllib3
from requests.adapters import HTTPAdapter
fr... | Appsurify/appsurifyci | appsurifyci/GitToAppsurifyDev.py | GitToAppsurifyDev.py | py | 36,680 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "warnings.warn",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "urllib3.disable_warnings",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "urllib3.exceptions",
... |
8331623324 | from typing import List, Any, Dict
import networkx as nx
import pytest
from debategpt.training.reward import compute_pagerank, compute_mixing, enrich_experiences, compute_arc_weights, compose_graphs, sanitize_scores
from debategpt.training.orchestrator import DebateOrchestrator
from trlx.utils import Clock
from trlx.d... | paulbricman/DebateGPT | tests/test_reward.py | test_reward.py | py | 6,071 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "networkx.DiGraph",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "pytest.fixture",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "trlx.data.co... |
9586333376 |
import pandas as pd
import numpy as np
from sklearn.preprocessing import OneHotEncoder, LabelEncoder
import sklearn
import matplotlib.pyplot as plt
import pickle
import shap
import random
from sklearn import metrics
import os
import diffprivlib
def readFile(trainPath, labelPath):
data = pd.read_csv(trainPath, he... | TonyaTonya-Nya/Data-Privacy-and-Security | DP/detector-checkpoint.py | detector-checkpoint.py | py | 1,973 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_n... |
30354456947 | """Custom param types for CLI"""
import click
import validators
class URLType(click.ParamType):
"""A valid URL"""
name = "URL"
def convert(self, value, param, ctx):
if validators.url(value):
return value
else:
self.fail(f"Invalid URL: '{value}'.")
| RhetTbull/macnotesapp | macnotesapp/cli/cli_param_types.py | cli_param_types.py | py | 305 | python | en | code | 86 | github-code | 71 | [
{
"api_name": "click.ParamType",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "validators.url",
"line_number": 13,
"usage_type": "call"
}
] |
45149634307 | import argparse
print("...Importing Libraries...")
import matplotlib.pyplot as plt
import numpy as np
import cv2
from skimage.feature import hog
from skimage import data, color, exposure
from sklearn.cluster import DBSCAN
from sklearn import metrics
import pandas as pd
import string
import os
print("...Parsing Ar... | seanreddy/scene-detection | keyframe_detection.py | keyframe_detection.py | py | 3,770 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "cv2.INTER_CUBIC",
"... |
6214474873 | #!/usr/bin/env python3
"""
Example application using the `client` module
=============================================
"""
__all__ = ['ExampleApp']
from gi.repository import GObject
from colorama import Fore, Style
from colorama import deinit as deinit_colorama
from colorama import init as init_colorama
from dbus im... | Roadmaster/checkbox | plainbox-client/demo.py | demo.py | py | 4,012 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "gi.repository.GObject.MainLoop",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "gi.repository.GObject",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "dbus.SessionBus",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "... |
2293226992 | import common
import logging
import os
import subprocess
import tempfile
import time
import uuid
_SSH_CONFIG_TEMPLATE = """
Host *
CheckHostIP no
StrictHostKeyChecking no
ForwardAgent no
ForwardX11 no
GSSAPIDelegateCredentials no
UserKnownHostsFile {known_hosts}
User fuchsia
IdentitiesOnly yes
Identi... | grf123/chromium | build/fuchsia/runner_v2/boot_data.py | boot_data.py | py | 3,652 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.path.join",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "common.SDK_ROOT",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "logging.debug",
"l... |
9962583586 | import cv2
import numpy as np
from utils.utils import PIXEL_CLASSIFIER_TEST_INPUT
def denoise_image(image):
denoised_image = cv2.fastNlMeansDenoisingColored(image, None, 10, 10, 7, 21)
cv2.imwrite(PIXEL_CLASSIFIER_TEST_INPUT + "denoised_image_.png", denoised_image)
return denoised_image
def sharpen_ima... | mohitreddy1996/Classification-of-Mycobaterial-tuberculosis | object_classifier/image_modifiers.py | image_modifiers.py | py | 1,711 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "cv2.fastNlMeansDenoisingColored",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.imwrite",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "utils.utils.PIXEL_CLASSIFIER_TEST_INPUT",
"line_number": 9,
"usage_type": "name"
},
{
"... |
36248838563 | import time
from data.images.funk import load_image
from sprites.base_animate_sprite import BaseAnimateSprite
from sprites.config import all_sprites, player_sprites, game_over_sprites
class GameOverTitle(BaseAnimateSprite):
def __init__(self, x, y):
super(GameOverTitle, self).__init__(game_over_sprites)
... | DeNeMiX83/Pygame_project | sprites/menu/game_over_title.py | game_over_title.py | py | 902 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "sprites.base_animate_sprite.BaseAnimateSprite",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "sprites.config.game_over_sprites",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "data.images.funk.load_image",
"line_number": 11,
"usage_... |
10677015310 | import numpy as np
import yfinance as yf
import pandas as pd
def calc_returns(tickers: list):
yft = yf.download(tickers=' '.join(tickers), period='1y', auto_adjust=True, group_by='ticker')
# Calculate returns per quarter: new price / original price
returns = []
for ticker in tickers:
lags = [t... | thisjustinh/ESGBoost | src/returns.py | returns.py | py | 1,628 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "yfinance.download",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "yfinance.download",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",... |
43160696910 | from quiz.models import(
Answer,
DomainQuestion,
Question,
SubDomain
)
from random import shuffle
from django.shortcuts import get_list_or_404, get_object_or_404
from rest_framework.permissions import AllowAny
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework.decorato... | HarshilShrivastava/SIH-Backend | Hackathon/quiz/api/views.py | views.py | py | 2,782 | python | en | code | 9 | github-code | 71 | [
{
"api_name": "rest_framework.viewsets.ReadOnlyModelViewSet",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.viewsets",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "quiz.models.Question.objects.all",
"line_number": 25,
"usage_ty... |
23369320314 | import numpy as np
import cv2
import pandas as pd
from tqdm.notebook import tqdm
from ensemble_boxes import weighted_boxes_fusion
def get_fused_boxes(image_id, records, conf_col_name=None, iou_thr = 0.2, skip_box_thr = 0, only_one=False):
all_rad_ids = records.groupby('image_id')['rad_id'].agg(lambda x: ' '.joi... | SyomaKiss/pmldl_cxr_object_detection | model/bbox_ensemble.py | bbox_ensemble.py | py | 3,094 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.unique",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "ensemble_boxes.weighted_boxes_fusion",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "en... |
23029525083 | """
Train a large number of models across a sliding window of n-gram presence curve
Record performance as function of n-gram presence delta
"""
from numpy.lib.npyio import load
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from tqdm import tqdm
from useful_functions import load_data, train
#... | zcapjdb/PHAS0077 | feature_extraction/window.py | window.py | py | 3,508 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.argsort",
"line... |
42353408897 | """
Plot a ratio that is supposed to tell us whether the exchange is
enabled by tides or limited by graviational circulation.
"""
from pathlib import Path
import sys
import matplotlib.pyplot as plt
import numpy as np
import pickle
import pandas as pd
from time import time
import xarray as xr
from datetime import datet... | parkermac/LPM | extract/tef/tide_or_gravity.py | tide_or_gravity.py | py | 3,206 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "lo_tools.Lfun.Lstart",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "lo_tools.Lfun",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "sys.path",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
... |
74844024229 | import argparse
from datetime import datetime, timedelta
from pathlib import Path
from formats.obj.model import Model
parser = argparse.ArgumentParser()
parser.add_argument('-i', '--input', help='input obj file', required=True)
args = parser.parse_args()
def main():
stamp_start = datetime.now()
input_file =... | alexmitroff/obj-converter | obj-converter.py | obj-converter.py | py | 679 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "pathli... |
36227375053 | from sqlalchemy.exc import IntegrityError
from app.core.shared.usecase import UseCase
from app.core.pool import entities
from app.core.pool import dto
from app.core.pool.protocols.dao import LikePoolWriteDao
from app.core.shared.protocols import Committer
class LikePoolUseCase(UseCase[dto.PoolLike, None]):
def __... | DeNeMiX83/pool_search_assistant | app/core/pool/usecases/like_pool.py | like_pool.py | py | 920 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "app.core.shared.usecase.UseCase",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "app.core.pool.dto.PoolLike",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "app.core.pool.dto",
"line_number": 9,
"usage_type": "name"
},
{
"ap... |
38512059399 | import asyncio
import datetime
import logging
import os
import dtoolcore
from gi.repository import Gio, GLib, Gtk
from dtool_lookup_api.core.config import Config
from dtool_lookup_api.core.LookupClient import authenticate
from ..models.settings import settings
from .authentication_dialog import AuthenticationDialog... | livMatS/dtool-lookup-gui | dtool_lookup_gui/views/settings_dialog.py | settings_dialog.py | py | 11,998 | python | en | code | 8 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "gi.repository.Gtk.Window",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "gi.repository.Gtk",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "gi.... |
4059983929 | from getNext10 import *
import webbrowser
import requests
import uuid
def startServer():
print("Poggin confirmed")
# data = makeRequest()
# processedData = makeReadable(data)
# url = "http://127.0.0.1:5500/webpage/index.html?data="
# webbrowser.open(url, new=0, autoraise=True)
def makeNot... | nwvbug/gcalDisplay | server/main.py | main.py | py | 1,032 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "uuid.uuid4",
"line_number": 15,
"usage_type": "call"
}
] |
24168320437 | import collections
from typing import List
def hammingWeight1(self, n: int) -> int:
count = 0
for i in range(32):
if (n >> i) & 1:
count += 1
return count
def hammingWeight2(self, n: int) -> int:
return collections.Counter(str(bin(n)))['1']
def hammingWeight3(self, n: int) -> i... | myf-algorithm/Leetcode | Leetcode/191.位1的个数.py | 191.位1的个数.py | py | 439 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "collections.Counter",
"line_number": 14,
"usage_type": "call"
}
] |
36141784781 | """Implementation of a linear time exact matching algorithm."""
import argparse
import sys
from ba import mailund_border_array
from parsers import parse_fasta, parse_fastq
from align import get_edits
from cigar import edits_to_cigar
def lin(x: str, p: str) -> list[int]:
out: list[int] = []
n = len(x)
m =... | birc-gsa-2022/project-1-python-team | src/lin.py | lin.py | py | 1,665 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "ba.mailund_border_array",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "argparse.FileType",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "arg... |
20726906416 | import datetime
tasks_by_user = {}
users = {}
def register():
username = input("Enter your desired username: ")
if username in users:
print("Username already exists. Please choose a different username.")
return
password = input("Enter your desired password: ")
tasks_by... | Bogalakalyani/AT_internship | daily_task_schedular.py | daily_task_schedular.py | py | 5,684 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "datetime.date.today",
"line_number": 101,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 101,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 119,
"usage_type": "call"
},
{
"api_name": "... |
72592708065 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2018/11/29 21:56
# @Author : zsj
# @File : ship.py
# @Description:
import pygame
from pygame.sprite import Sprite
class Ship(Sprite):
def __init__(self, settings, screen):
super().__init__()
self.screen = screen
self.setting... | zsjwish/shot_game | ship.py | ship.py | py | 2,034 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "pygame.sprite.Sprite",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "pygame.image.load",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 19,
"usage_type": "attribute"
}
] |
30609821234 | from databricks_cli.sdk import ApiClient
from dbx.api.adjuster.mixins.base import ApiClientMixin
from dbx.api.services.jobs import NamedJobsService
from dbx.api.services.permissions import PermissionsService
from dbx.api.services.pipelines import NamedPipelinesService
from dbx.models.deployment import AnyWorkflow, Wor... | databrickslabs/dbx | dbx/api/deployment.py | deployment.py | py | 1,500 | python | en | code | 409 | github-code | 70 | [
{
"api_name": "dbx.api.adjuster.mixins.base.ApiClientMixin",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "databricks_cli.sdk.ApiClient",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "dbx.models.deployment.WorkflowList",
"line_number": 13,
"usage_t... |
69872487266 | import numpy as np
import pydicom
import os
import matplotlib.pyplot as plt
import cv2
from keras.preprocessing.image import ImageDataGenerator
from HDF5DatasetWriter import HDF5DatasetWriter
from HDF5DatasetGenerator import HDF5DatasetGenerator
from utils import *
from tqdm import tqdm
import cv2
from skima... | Cooper111/3Dircadb_Use_Unet | test.py | test.py | py | 1,957 | python | en | code | 34 | github-code | 70 | [
{
"api_name": "HDF5DatasetGenerator.HDF5DatasetGenerator",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.save",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "o... |
38065088897 | """Models required to support all contact details for the address book."""
from __future__ import unicode_literals
from django.db import models
from contacts.lib.contact_grader import Grader
def contact_directory_path(instance, filename):
"""Return the appropriate folder to store an avatar in."""
# file wi... | RichardCochrane/python_tests | addressbook/contacts/models.py | models.py | py | 2,390 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "django.db.models.Model",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 20,
"usage_type": "call"
},
{
"api_name"... |
70223220709 | # -*- coding: utf-8 -*-
import cgi
import logging
from question import Question
from answer import Answer
from ResponseFormatJSON import ResponseFormatJSON
#from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ex... | asksaito/GAE_MahjongNanikiru | MahjongNanikiru2/src/main.py | main.py | py | 13,666 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "ResponseFormatJSON.ResponseFormatJSON",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "google.appengine.ext.webapp.RequestHandler",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "google.appengine.ext.webapp",
"line_number": 20,
"u... |
25117712867 | import numpy as np
from img_handling.droplets import DropletLabel, DropletSlice
from img_handling.labelme import load_labelme_image
from detector.circle_detector import find_peaks2d
import cv2
def get_droplet_slices_from_img(img: np.ndarray, droplet_labels: list) -> list:
"""Returns a list of droplet slices from ... | abecedoid/FJ_IPI | detector/fringe_count.py | fringe_count.py | py | 4,669 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "numpy.ndarray",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "img_handling.droplets.DropletLabel",
"line_number": 15,
"usage_type": "argument"
},
{
"api_name": "cv2.imread",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "n... |
37185988829 | import json
import urllib.request
import urllib.parse
headers = {
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36'
}
url = 'https://job.alibaba.com/zhaopin/socialPositionList/doList.json'
# 学历、部门、岗位要求、工作经验
datastr = ''
def get_j... | Lemigt/webSpider | day01/aliJob.py | aliJob.py | py | 1,602 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "urllib.request.parse.urlencode",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "urllib.request.parse",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 24,
"usage_type": "name"
},
{
"api_name"... |
9499688530 | import pytest
from selenium import webdriver
CHROME_URL = "http://0.0.0.0:4444/wd/hub"
@pytest.fixture(scope='session')
def browser(request):
chrome_options = webdriver.ChromeOptions()
driver = webdriver.Remote(
command_executor= CHROME_URL,
options=chrome_options
)
def tear_down():
... | AbellR3/ui | conftest.py | conftest.py | py | 395 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.Remote",
"line_number": 9,
"usage_type": "call"
},
{
"api_na... |
40733641628 | """Module with core functionality for a single pipeline stage """
import pathlib
import os
import sys
from textwrap import dedent
import shutil
import cProfile
import pdb
import datetime
from abc import abstractmethod
from . import errors
from .monitor import MemoryMonitor
from .config import StageParameter, StageCon... | LSSTDESC/ceci | ceci/stage.py | stage.py | py | 55,754 | python | en | code | 10 | github-code | 71 | [
{
"api_name": "config.StageConfig",
"line_number": 86,
"usage_type": "call"
},
{
"api_name": "abc.abstractmethod",
"line_number": 140,
"usage_type": "name"
},
{
"api_name": "mpi4py.MPI.MPI",
"line_number": 257,
"usage_type": "attribute"
},
{
"api_name": "mpi4py.MP... |
33424594109 | import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import os
import pandas as pd
from bs4 import BeautifulSoup
from bs4 import BeautifulSoup
from bs4.element import Comment
import numpy as np
import re
import string
# Disable displaying SSL verification warnings
requests.package... | VirajPatidar/wdace-backend | notebooks/lbl2vec/test_with_scraped_data/gen_test_csv.py | gen_test_csv.py | py | 2,831 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "requests.packages.urllib3.disable_warnings",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "requests.packages.urllib3.exceptions.InsecureRequestWarning",
"line_number": 15,
"usage_type": "argument"
},
{
"api_name": "requests.packages",
"line_number":... |
10491639433 | #PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
#export PATH
#%matplotlib inline
import glob, os,sys,timeit
import matplotlib
import numpy as np
from PyQSOFit_suv import QSOFit
from astropy.table import Table
from astropy.io import fits
import matplotlib.pyplot as plt
import warnings
from scipy.op... | aditi0009/Reverberation_mapping | test_suv.py | test_suv.py | py | 8,525 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "numpy.log",
"line_num... |
18241427298 | import torch
import torch.nn as nn
import torch.nn.functional as F
from model import resnet
import clip
# from group_modules import *
# from cbam import CBAM
from torchsummary import summary
from einops import rearrange
from decord import VideoReader, cpu
import numpy as np
from transformers import VideoMAEFeatureEx... | venom12138/State-Change-Reorder | model/modules.py | modules.py | py | 4,500 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.power",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.sin",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.cos",
"line_number": 26,
... |
74661130785 | import torch
import time
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import pdb
import fm_ops as SPD_ops
from torch_batch_svd import svd
import time
def weightNormalize(weights):
out = []
for row in weights.view(weights.shape[0],-1):
out.append(torch.clamp(row, min=0.001... | jsw7961/FFME_SPDManifoldNet | SPD.py | SPD.py | py | 4,581 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "torch.clamp",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.stack",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_num... |
11292328674 | # Third-party
import astropy.coordinates as coord
import astropy.units as u
import numpy as np
# This package
from ..jhelum import JhelumBonaca19
def test_simple():
c = coord.ICRS(coord.Angle(217.2141, u.degree), coord.Angle(-11.4351, u.degree))
c.transform_to(JhelumBonaca19())
c = coord.Galactic(coord.... | adrn/gala | gala/coordinates/tests/test_jhelum.py | test_jhelum.py | py | 977 | python | en | code | 112 | github-code | 70 | [
{
"api_name": "astropy.coordinates.ICRS",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "astropy.coordinates",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "astropy.coordinates.Angle",
"line_number": 11,
"usage_type": "call"
},
{
"api_name":... |
10156390086 | from flask import Blueprint, jsonify, request, make_response, abort, current_app, url_for, redirect
from models.engine.file_storage import Storage
from models.product import Product
from models.service import Service
from models.shop import Shop
from models.user import User
from usr_api import auth
from support.gps imp... | wacoo/cheapr-project | api.py | api.py | py | 12,589 | python | en | code | 2 | github-code | 70 | [
{
"api_name": "flask.Blueprint",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "models.engine.file_storage.Storage",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.make_response",
"line_number": 28,
"usage_type": "call"
},
{
"api_name":... |
571925474 | #DISCENTES - Ingryd Medeiros
def isolamentoraiz(f):
#Importação a biblioteca de gráficos do python
import matplotlib.pyplot as plt
#Importação a biblioteca de calculo do python
import numpy as np
#importação para numeros matematicos mais complexos
import math
print('')
print("... | devaneiosmrblue/Python | numerico/unidade1/odio_0_isolamento_raiz.py | odio_0_isolamento_raiz.py | py | 2,087 | python | pt | code | 1 | github-code | 70 | [
{
"api_name": "numpy.arange",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyp... |
35966243301 | # pylint: disable=missing-docstring
from collections import Counter
def sudoku_solver(grid):
"""Sudoku solver"""
# Check grid validity:
if (not isinstance(grid, list)
or any(not isinstance(row, list) for row in grid)
or len(grid) != 9
or any(len(row) != 9 for row in grid)
):
... | mayank-soni/data-optional-sudoku-solver | sudoku.py | sudoku.py | py | 2,923 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "collections.Counter",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 86,
"usage_type": "call"
}
] |
72067096228 | import requests
import re
import json
import os
import django
from county.models import State
def sync_data():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'coronavirus_county_stats.settings')
django.setup()
contents = requests.get('https://covidtracking.com/api/states')
list = json.... | jonathankao97/coronavirus_county | test_case_scraper.py | test_case_scraper.py | py | 3,364 | python | en | code | 2 | github-code | 70 | [
{
"api_name": "os.environ.setdefault",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.setup",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.get",
"... |
11354236326 | from setuptools import setup, find_packages
import os
VERSION = '1.1.5'
entry_points = {
'openprocurement.auctions.core.plugins': [
'auctions.swiftsure = openprocurement.auctions.swiftsure.includeme:includeme',
],
'openprocurement.api.migrations': [
'auctions.swiftsure = openprocurement.au... | Prozorro-Sale-UA/openprocurement.auctions.swiftsure | setup.py | setup.py | py | 1,583 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "setuptools.setup",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "setuptools.find_packages",... |
6209258961 | '''
.. codeauthor:: David Zwicker <david.zwicker@ds.mpg.de>
'''
import numpy as np
from scipy import ndimage
import pytest
from .. import ScalarField, VectorField, Tensor2Field, FieldCollection
from ..base import FieldBase
from ...grids import (UnitGrid, CartesianGrid, PolarGrid, SphericalGrid,
... | pretentious7/LTCURECA2020 | venv/lib/python3.6/site-packages/pde/fields/tests/test_generic.py | test_generic.py | py | 15,502 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "grids.UnitGrid",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "grids.UnitGrid",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "grids.CartesianGrid",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "grids.CylindricalGr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.