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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12209957723 | '''
Section 3
Concurrency, CPU Bound vs I/O Bound(3) - threading vs asyncio vs multiprocessing
Keyword - I/O Bound, requests, multiprocessing, asyncio
'''
import time
import asyncio
import aiohttp
# IO bound Asyncio 예제
# threading 보다 높은 코드 복잡도 -> async , await 적절하게 코딩
# 실행함수1(다운로드)
async def request_site(session, url... | crescentfull/selfStudy_code | TIL/language/python/inflearn/동시성_병렬성_문법/py_ad_3_5_4.py | py_ad_3_5_4.py | py | 1,520 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "aiohttp.ClientSession",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "asyncio.ensure_future",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "asyncio.gather",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "time.time"... |
25407823926 | import json
import requests
from easygui import choicebox, enterbox
from helper import project_api_id, access_token, base_url
title = "JamaScript"
display = ""
artifact_result = ""
main_components_result = ""
component_ids = []
test_management_ids = []
target_item_id = 0
user_choice = 0
main_selection = 0
main2_selec... | arthurosipyan/JamaScript | JamaScript/JamaScript.py | JamaScript.py | py | 14,424 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "helper.access_token",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "helper.base_url",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "helper.project_api_id",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "requests.re... |
32216961837 | # this is the hook for the trainer.
import typing as t
from contextlib import contextmanager
from loguru import logger
from torch import nn
# _Base = Trainer
# else:
# _Base = object
from contrastyou.hooks import TrainerHook
if t.TYPE_CHECKING:
from contrastyou.trainer.base import Trainer
_Base = Traine... | jizongFox/Contrast-You | contrastyou/trainer/_hooks.py | _hooks.py | py | 1,033 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "contrastyou.trainer.base.Trainer",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "torch.nn.ModuleList",
"line_number": 24,
"usage_type": "call"
},
{
"ap... |
8775131603 | from threading import Thread
from flask import current_app, render_template
from flask_mail import Message
from . import mail
# 在实际项目中如果哟啊发送大量电子邮件时 使用专门发送电子邮件的作业比给每份邮件创建一个线程合适
# 例如把直线send_async_email()函数的操作发给Celery(http://www.celeryproject.org/)任务队列
# 异步发送电子邮件
def send_async_email(app, msg):
with app.app_context... | jqcc/flask-blog | app/email.py | email.py | py | 1,461 | python | zh | code | 1 | github-code | 71 | [
{
"api_name": "flask.current_app._get_current_object",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.current_app",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "flask_mail.Message",
"line_number": 20,
"usage_type": "call"
},
{
"api_na... |
35279023629 | import random
import numpy as np
import scipy
class BaseCEE(object):
def __init__(self, params):
self.senders = []
self.receivers = []
self.agents = [] # case where single pool of agents
self.params = params
self.generation = 0
self.iteration = 0
self.initi... | gautierdag/cultural-evolution-engine | cee/BaseCEE.py | BaseCEE.py | py | 4,170 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "random.randrange",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "numpy.random.choice",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 55,
"usage_type": "attribute"
},
{
"api_name": "scipy.special.... |
12313587185 |
import os
import sys
import json
import logging
from datetime import datetime
from typing import Optional
from dataclasses import dataclass, field
from transformers import (
HfArgumentParser,
set_seed,
)
from chemdataextractor.doc import Paragraph
from seqlbtoolkit.io import set_logging, logging_args, save_j... | Yinghao-Li/SupervisedNER | data/data_processing.py | data_processing.py | py | 3,264 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "typing.Optional",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "dataclasses.field",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "typing.Optional",... |
3215469188 | import logging
from typing import Union, List, Optional, Dict, Tuple
from custom_types.openstack_query.aliases import OpenstackResourceObj, PropValue
from enums.cloud_domains import CloudDomains
from enums.query.props.prop_enum import PropEnum
from enums.query.sort_order import SortOrder
from enums.query.query_presets... | stfc/st2-cloud-pack | lib/openstack_query/api/query_api.py | query_api.py | py | 10,950 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "structs.query.query_components.QueryComponents",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "enums.query.props.prop_enum.PropEnum",
"line_number": 29,
"usage_type": ... |
2031414579 | from urllib.request import urlopen
from bs4 import BeautifulSoup
class StackoverflowScrapper:
def __init__(self, name):
main_url = "http://stackoverflow.com/tags/%s/info" %(name)
html = urlopen(main_url)
self.bsObj = BeautifulSoup(html, "lxml")
def check_wiki_extract_same_paragraph(se... | maritza05/NosqlEngine | nosql/libs/webcrawlers/stackoverflow_crawlers/stackoverflow_main.py | stackoverflow_main.py | py | 3,920 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.PhantomJS",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "s... |
30190081722 | import sys
_module = sys.modules[__name__]
del sys
models = _module
models = _module
snres_discriminator = _module
snres_generator = _module
src = _module
functions = _module
max_sv = _module
snlayers = _module
snconv2d = _module
snlinear = _module
test = _module
train = _module
from _paritybench_helpers import _mock_... | eladhoffer/pytorch-jit-paritybench | generated/test_godisboy_SN_GAN.py | test_godisboy_SN_GAN.py | py | 11,111 | python | en | code | null | github-code | 71 | [
{
"api_name": "sys.modules",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "_paritybench_helpers.patch_functional",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "unittest.mock.mock_open",
"line_number": 25,
"usage_type": "call"
},
{
"api... |
73821249508 | """Vehicles Routing Problem (VRP) by google.
https://developers.google.com/optimization/routing/vrp"""
from ortools.constraint_solver import routing_enums_pb2
from ortools.constraint_solver import pywrapcp
import flora
import network_operations as net_ops
import input_output_operations as io_ops
import pandas as pd
i... | cbabalis/osm_project | src/or_network_operations.py | or_network_operations.py | py | 5,793 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pandas.read_csv",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "input_output_operations.get_route_node_ids_from_textfile",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "pdb.set_trace",
"line_number": 47,
"usage_type": "call"
},
{... |
19929563520 | import database.db as db
from flask import jsonify
from bson.objectid import ObjectId
from domain.domain import FeedDomain
class FeedService:
def addNewContent(self,FeedDomain):
try:
response=db.Feeds().addPost(FeedDomain)
except Exception as e:
print("the value of error is"... | ankitanwar/DiscussionHUB | feed/services/services.py | services.py | py | 4,110 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "domain.domain.FeedDomain",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "database.db.Feeds",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "database.db",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "domain.domain... |
648130410 | import k5test
import pytest
import krb5
def test_parse_principal(realm: k5test.K5Realm) -> None:
name = f"role/abc\\/def\\@test@{realm.realm}"
ctx = krb5.init_context()
principal = krb5.parse_name_flags(ctx, name.encode())
assert isinstance(principal, krb5.Principal)
assert str(principal) == nam... | jborean93/pykrb5 | tests/test_principal.py | test_principal.py | py | 3,618 | python | en | code | 11 | github-code | 71 | [
{
"api_name": "k5test.K5Realm",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "krb5.init_context",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "krb5.parse_name_flags",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "krb5.Princi... |
73383234791 | from typing import Tuple
import math
import latlon
# from geographiclib.geodesic import Geodesic
# geod = Geodesic.WGS84
EARTH_RADIUS = 60.0 * 360 / (2 * math.pi) # nm
NAUTICAL_MILE_IN_KM = 1.852
def cfbinomiale(n: float, i: float) -> float:
return math.factorial(n)/(math.factorial(n-i)*math.factorial(i))
def orto... | dakk/libweatherrouting | weatherrouting/utils.py | utils.py | py | 4,029 | python | en | code | 17 | github-code | 71 | [
{
"api_name": "math.pi",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "math.factorial",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "math.radians",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "math.radians",
"line_numb... |
4146394891 |
from sklearn.datasets import load_iris
iris=load_iris()
'''
print (type(iris))
#print (iris.data)
print(iris.feature_names)
print(iris.target)
print(iris.target_names)
print(iris.data.shape)
print (iris.target.shape)
'''
X=iris.data
y=iris.target
#print(X.shape)
#print(y.shape)
##################... | vibwipro/Python-General-Coding | Common Python Code/Iris_Dataset_Classification.py | Iris_Dataset_Classification.py | py | 931 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "sklearn.datasets.load_iris",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sklearn.neighbors.KNeighborsClassifier",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 35,
"usage_typ... |
71870654950 | import findspark
from pyspark.sql import SparkSession
import sys
# The entry point into all functionality in Spark is the SparkSession class.
spark = (SparkSession
.builder
.appName("my awesome Spark SQL program")
.master("spark://172.31.93.203:7077")
.getOrCreate())
# You can read the... | domdecanio/AWS-Implementation-with-HDFS-Spark | Assets/assignment1/part 2/my_pyspark_app.py | my_pyspark_app.py | py | 677 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pyspark.sql.SparkSession.builder.appName",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.SparkSession.builder",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pyspark.sql.SparkSession",
"line_number": 6,
"usage_type": "... |
38984676350 | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import tqdm
from transformers import BartTokenizer, BartModel, BartForConditionalGeneration
from bart_evaluate import combine_into_words
import pickle
from data import tokenizer
import bart_evaluate
import random
device =... | UCSD-AI4H/Knowledge-Graph-Generation | path/src/finetune_ignore.py | finetune_ignore.py | py | 14,202 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "torch.device",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.nn.functional.log_softmax",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.nn.functional",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "torc... |
11488209018 | # Import the necessary libraries
import gym
import numpy as np
# Create the Frozen Lake environment using Gym
env = gym.make('FrozenLake-v0')
# Let's take a look at the Frozen Lake environment using the render function
env.render()
# FROM HERE WE WILL START COMPUTING THE OPTIMAL VALUE FUNCTION
# Define ... | popoola-0917/drl_popoola | basic_rl_algorithm/2. Solving the Frozen Lake problem with value iteration.py | 2. Solving the Frozen Lake problem with value iteration.py | py | 3,706 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "gym.make",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.copy",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 51,
... |
19287347625 | import numpy as np
from .._fiff.constants import FIFF
from .._fiff.pick import pick_info
from ..baseline import _log_rescale, rescale
from ..epochs import Epochs
from ..event import make_fixed_length_events
from ..evoked import EvokedArray
from ..fixes import _safe_svd
from ..label import BiHemiLabel, Label
from ..par... | mne-tools/mne-python | mne/minimum_norm/time_frequency.py | time_frequency.py | py | 38,070 | python | en | code | 2,405 | github-code | 71 | [
{
"api_name": "numpy.intersect1d",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "numpy.intersect1d",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "numpy.intersect1d",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "numpy.unique",
... |
4407674499 | from flask import Flask, jsonify, request
app = Flask(__name__)
pecas = [
{
'id': 1,
'peca' : 'bateria',
'descricao':'bateria moura'
},
{
'id': 2,
'peca' : 'bubina',
'descricao':'bubina generica'
},
{
'id': 3,
'peca' : 'filtro de ole... | SamSantos1jz/api-Python | app.py | app.py | py | 1,300 | python | es | code | 0 | github-code | 71 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "flask.request.get_json",
"... |
14267584357 | import pickle
from numpy import dot
from numpy.linalg import norm
from scipy.spatial import distance
with open('./anchor_embeddings.pkl', 'rb') as handler:
anchor_embeddings = pickle.load(handler)
with open('./positive_embeddings.pkl', 'rb') as handler:
positive_embeddings = pickle.load(handler)
with open('.... | TDPatcher/TDPatcher | model_train/3_compute_similarity.py | 3_compute_similarity.py | py | 1,373 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pickle.load",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.dot",
"line_number": 16,... |
1522800046 | #!/usr/bin/python3
# coding=utf-8
import sys
sys.path.append("../../")
import tensorflow as tf
import time
from input_data import Load_data
from model import QueryModel
from model import Decoder
from model import Hidden_init
from metric import *
from sklearn.model_selection import LeaveOneOut, KFold
impor... | KuoAiTe/BERT-Trip | baseline/selftrip/train.py | train.py | py | 9,209 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "sys.path.append",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number... |
38361053462 | # coding=utf-8
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
import os
import uuid
import json
from django.shortcuts import render, render_to_response
from django.http import HttpResponse
from cms.models import Picture, Classification
from django.views.decorators.csrf import csrf_exempt
from PIL import Image
... | ftconan/blog | cms/addPictureViews.py | addPictureViews.py | py | 1,974 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "sys.setdefaultencoding",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "cms.models.Classif... |
18092589505 | from django.shortcuts import render
from django.core.exceptions import ValidationError
from django.db.models import Q, ProtectedError
from rest_framework import status
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticated, AllowAny... | YuJinsoo/wanted-pre-onboarding-backend | recruit/views.py | views.py | py | 5,015 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "rest_framework.permissions.AllowAny",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "recruit.models.JobOpening.objects.get",
"line_number": 19,
"usage_type":... |
33370312698 | import cv2 as cv
import numpy as np
Part28 = "Face and eye detection"
# all the idea here that we are going to apply haar
# haar is basically a method which applies different things on the picture to detect something
# for eye detection, you won't get a wrong answer if you didn't crop the face, it will gave ... | a1h2med/OpenCv_Projects | Learning_Codes_and_Projects/Face and eye detection.py | Face and eye detection.py | py | 1,171 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "cv2.imread",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "cv2.CascadeClassifier... |
21191227321 | import numpy as np
import matplotlib.pyplot as plt
from scipy import optimize
# unfinished 18/02
def gaussian(height, center_x, center_y, width_x, width_y):
"""Returns a gaussian function with the given parameters"""
width_x = float(width_x)
width_y = float(width_y)
return lambda x, y: height*np.exp(
... | stanleyycheung/astronomicalImageProcessing | gaussian_fitting.py | gaussian_fitting.py | py | 2,855 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.exp",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.indices",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.abs",
"line_number": 24,... |
32983544592 | from __future__ import unicode_literals
import frappe, os, copy, json, re
from frappe import _
from frappe.modules import get_doc_path
from jinja2 import TemplateNotFound
from frappe.utils import cint, strip_html
from frappe.utils.pdf import get_pdf,cleanup
from PyPDF2 import PdfFileWriter, PdfFileReader
no_cache = ... | netchampfaris/frappe-deskv3 | frappe/utils/print_format.py | print_format.py | py | 4,459 | python | en | code | 5 | github-code | 71 | [
{
"api_name": "PyPDF2.PdfFileWriter",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "frappe.get_print",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "frappe.local",
"... |
30295449014 | __author__ = 'sameer'
from twisted.internet.defer import inlineCallbacks, returnValue
from twisted.internet import reactor
from twisted.python import log
from pprint import pprint
import treq
from decimal import Decimal
from bs4 import BeautifulSoup
from datetime import datetime, timedelta
import json
class Yahoo():
... | Mrkebubun/sputnik | clients/python/yahoo.py | yahoo.py | py | 3,558 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "treq.get",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "decimal.Decimal",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "decimal.Decimal",
"lin... |
25224067248 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import codecs
from collections import OrderedDict
import fnmatch
import json
import os
import sys
# error counter
counterr = 0
# Need the json path
if len(sys.argv) < 2:
dir = "json"
else:
dir = sys.argv[1]
# collect all the JSON files
json_files = [
os.path... | PolCPP/PSO2es-Translation | _tools/reset.py | reset.py | py | 1,552 | python | en | code | 13 | github-code | 71 | [
{
"api_name": "sys.argv",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number":... |
10960619502 | import matplotlib.pyplot as plt
import numpy as np
from math import sqrt
import sys
def fpga_plot(casename):
filename_arch = '../benchmarks/' + casename + '.arch'
filename_fp = '../outputs/' + casename + '.floorplan'
fa = open(filename_arch, 'r')
line = fa.readline()
line = line.split()
r, c, ... | WilsonHUNG-web/FPGA_Design_Automation | python/figure.py | figure.py | py | 1,694 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.Rectangle",
"line_number": 19,
"usage_type": "call"
},
{
"api_name":... |
13054948498 | import requests
import logging
import jq
from deckster.common.core import update_key_image, update_label_display
def main(deck, key, pressed):
logger = logging.getLogger("deckster")
args = key.args
url = args["url"]
if "json_data" in args:
json_data = args["json_data"]
else:
json_da... | Gabisonfire/deckster | deckster/plugins/builtins/web/get.py | get.py | py | 1,442 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "jq.compile",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "deckster.common.core.update_... |
36131315341 | import os
import pytest
from moto import mock_s3
import boto3
from graphql_relay import to_global_id
from django.conf import settings
from django.contrib.auth import get_user_model
from django.http.response import HttpResponse
from django.core.files import File
from django_s3_storage.storage import S3Storage
from cre... | kids-first/kf-api-study-creator | tests/ingest_runs/test_validation_result_downloads.py | test_validation_result_downloads.py | py | 4,918 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.http.response.HttpResponse",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "creator.studies.models.Membership",
"line_number": 48,
"usage_type":... |
36824907538 | from qm.executable import *
import os
import os.path
import qm
import StringIO
import re
import sys
if sys.platform != "win32":
import resource
########################################################################
# Classes
########################################################################
class Compil... | MentorEmbedded/qmtest | qm/test/classes/compiler.py | compiler.py | py | 19,542 | python | en | code | 7 | github-code | 71 | [
{
"api_name": "sys.platform",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "sys.platform",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "resource.setrlimit",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "resource.RLIMIT... |
24273071643 | import os
import six
import imageio
from PIL import Image
import numpy as np
from .images import ImagesDataset
from . import datasets_root
from . import util
from .utils import nputil
from .utils import imutil
try:
# Python 2
from itertools import izip
except ImportError:
# Python 3
izip = zip
from ... | bapoczos/ScalableML | tf_tutorials/Mastering-TensorFlow-1x/datasetslib/datasetslib/coco.py | coco.py | py | 5,326 | python | en | code | 50 | github-code | 71 | [
{
"api_name": "itertools.izip",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "images.ImagesDataset",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "images.ImagesDataset.__init__",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "ima... |
34749806572 | """Serializers for ecommerce"""
from rest_framework import serializers
from applications.models import BootcampApplication
from ecommerce.models import Order, Line, Receipt
from klasses.serializers import BootcampRunSerializer, InstallmentSerializer
class PaymentSerializer(serializers.Serializer):
"""
Serial... | mitodl/bootcamp-ecommerce | ecommerce/serializers.py | serializers.py | py | 4,013 | python | en | code | 5 | github-code | 71 | [
{
"api_name": "rest_framework.serializers.Serializer",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.DecimalField",
"line_number": 14,
"usage_t... |
38712571910 | import experiments
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import os
# lookups
default_split = {
'cub200': 2,
'cars196': 0,
'sop': 0,
}
dataset_label_lookup = {
'cub200': 'CUB200-2011',
'cars196': 'CARS196',
'sop': 'Online Products (SOP)'
}
# get wandb run data
nam... | timomilbich/dml_pl | experiments/eval_architecture_ooDML.py | eval_architecture_ooDML.py | py | 5,056 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "experiments.get_wandb_data",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 97,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 97,
"usage_type": "name"
},
{
"api_name"... |
71856759271 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fieldsight', '0002_auto_20161108_0034'),
('logger', '0005_remove_xform_site'),
]
operations = [
migrations.CreateMod... | awemulya/kobo-predict | onadata/apps/fsforms/migrations/0001_initial.py | 0001_initial.py | py | 3,171 | python | en | code | 45 | github-code | 71 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 15,
"usage_type": "call"
},
... |
73609371749 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import sys
import xml.etree.ElementTree as ElementTree
from pathlib import Path
FREE_MIND_NODE_TAG = 'node'
FREE_MIND_NODE_TEXT_ATTRIBUTE_TAG = 'TEXT'
time_re = re.compile(r'.+(\s+\(.*\))')
time_number_re = re.compile(r'.*\((\d+[.,]?\d?).*\)')
class NodeInfo:... | BooTheHamster/scripts | convert-mm-to-excel.py | convert-mm-to-excel.py | py | 7,261 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "re.compile",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 91,
"usage_type": "name"
},
{
"api_name": "xml.etree.ElementTree.parse",
... |
37768941427 | import pika
import sys
connection = pika.BlockingConnection(
pika.ConnectionParameters('localhost'))
channel = connection.channel()
# durable: 声明队列为持久化队列
channel.queue_declare(queue='task_queue', durable=True)
message = ' '.join(sys.argv[1:]) or "Hello World"
channel.basic_publish(
exchange='',
... | ahwi/PythonNote | code/utils/rabbitMQ/code/workQueues/new_task.py | new_task.py | py | 613 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pika.BlockingConnection",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pika.ConnectionParameters",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "pika.Ba... |
30095633129 | from urllib.request import urlopen
from bs4 import BeautifulSoup
import random
html = urlopen("https://dhlottery.co.kr/gameResult.do?method=statByNumber")
bsObject = BeautifulSoup(html, "html.parser")
theory_rate = 7/45 # 이론상 숫자가 나올 확률
current_round = int(bsObject.body.find("select",{"id":"edDrwNo"}).find("option",{"... | asurava/lottery | lottery.py | lottery.py | py | 1,127 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"line_number": 30,
"usage_type": "call"
}
] |
43539005062 | from django.db.models import fields
from rest_framework import serializers
from .models import Order, OrderRecipe, Recipe
from recipe.serializers import RecipeSerializer
class OrderRecipeSerializer(serializers.ModelSerializer):
class Meta:
model = OrderRecipe
fields = (
'id',
... | jacekchabielski/AppBar | backend/order/serializers.py | serializers.py | py | 841 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "models.OrderRecipe",
"line_number": 10,
"usage_type": "name"
}... |
72710812711 | import torch
from torch import nn
from models.sh import eval_sh
class Embedding(nn.Module):
def __init__(self, in_channels, N_freqs, logscale=True):
"""
Defines a function that embeds x to (x, sin(2^k x), cos(2^k x), ...)
in_channels: number of input channels (3 for both xyz and direction)
... | dvlab-research/EfficientNeRF | models/nerf.py | nerf.py | py | 4,267 | python | en | code | 146 | github-code | 71 | [
{
"api_name": "torch.nn.Module",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "torch.sin",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "torch.cos",
"line_numb... |
36009003691 | import numpy as np
from scipy.spatial.transform import Rotation
class SE3Control(object):
"""
"""
def __init__(self, quad_params):
"""
Parameters:
quad_params, dict with keys specified in rotorpy/vehicles
"""
# Quadrotor physical parameters.
# Inertial ... | spencerfolk/rotorpy | rotorpy/controllers/quadrotor_control.py | quadrotor_control.py | py | 10,649 | python | en | code | 34 | github-code | 70 | [
{
"api_name": "numpy.array",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "numpy.vstack",
"line_number":... |
41508622556 | import re
from ipykernel.ipkernel import IPythonKernel
from .shell import OverrideShell
class NowKernel(IPythonKernel):
def __init__(self, **kwargs):
super(NowKernel, self).__init__(**kwargs)
OverrideShell(self.shell)
def do_execute(self, code, silent, store_history=True,
... | gems-uff/noworkflow | capture/noworkflow/kernel/nowkernel.py | nowkernel.py | py | 578 | python | en | code | 112 | github-code | 71 | [
{
"api_name": "ipykernel.ipkernel.IPythonKernel",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "shell.OverrideShell",
"line_number": 10,
"usage_type": "call"
}
] |
16636812517 | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 28 08:19:12 2019
@author: rastf
"""
# -*- coding: utf-8 -*-
"""
Created on Mon Oct 21 07:26:54 2019
@author: rastf
"""
from astropy.io import fits
from astropy.wcs import WCS
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.gridspe... | rastfowl/University-Dust-Project | RawSpitzer.py | RawSpitzer.py | py | 3,006 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "astropy.wcs.WCS",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "astropy.io.fits.getheader",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "astropy.io.fits",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "astropy.wcs... |
3930261368 | import os
import logging
import discord
from discord.ext import commands
from dotenv import load_dotenv
import utils
load_dotenv()
logger = logging.getLogger('discord')
logger.setLevel(logging.INFO)
handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w')
handler.setFormatter(logging.Formatte... | daniloalima/ordo | app.py | app.py | py | 2,725 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "logging.FileHan... |
21008931398 | from typing import Tuple
import torch
from .base_trainer import BaseTrainer
from .utils import get_batch_tensors, get_dict
class StandardTrainer(BaseTrainer):
def __init__(self, model, optimizer, loss, metrics=None,
x_device=None, x_type=torch.float, y_device=None, y_type=torch.long):
... | jokingbear/DM | plasma/training/trainers/standard_trainer.py | standard_trainer.py | py | 2,927 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "base_trainer.BaseTrainer",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "torch.float",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.long",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "utils.get_ba... |
40866280060 |
# https://github.com/skyhehe123/VoxelNet-pytorch
# voxelnet
import torch.utils.data as data
import time
import torch.optim as optim
import torch.nn.init as init
import torch.backends.cudnn
from __future__ import division
import numpy as np
import math
import mayavi.mlab as mlab
import cv2
import cv2
from torch.a... | ClumsyProgrammer/audi_-_waymo | voxelnet_unit.py | voxelnet_unit.py | py | 47,875 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "torch.backends",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "torch.backends",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "math.ceil",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"li... |
3539840131 | import rsa, hashlib
class Chain:
def __init__(self):
self.validatedBlocks = [Block(self, 'Genisis Block')]
self.validatedBlocks[0].hash = hashlib.sha256('Genisis Block')
self.pendingBlocks = []
self.transactionBlock = Block(self, hashlib.sha256('Genisis Block'))
self.accounts = {}
self.validators... | JJBrindamour/Cryptocurrency | main.py | main.py | py | 2,397 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "hashlib.sha256",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "hashlib.sha256",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "hashlib.sha256",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "rsa.decrypt",
"line_nu... |
13331254597 | from unittest import skip
from django.http import HttpRequest
from django.test import TestCase, Client, RequestFactory
from django.urls import reverse
from store.models import Product, Category
from store.views import ProductDetailView
@skip("demonstrating skipping")
class TestSkip(TestCase):
def test_skip_ex... | pyaephyokyaw15/Django-Ecommerce | store/tests/test_views.py | test_views.py | py | 3,424 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "django.test.TestCase",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "unittest.skip",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.test.TestCase",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "django.test.C... |
39823778720 | from models.DataLoader import DataLoader
from models.DataSet import DataSet
from models.models import DeepFMatNet, DeepFMatAlex, DeepFMatVGG16, DeepFMatResNet18
from models.Regularizer import L2Regularizer, L1Regularizer
import torch.optim as optim
import torch.nn as nn
from torch.optim.lr_scheduler import StepLR
impor... | letatanu/DeepE_noCor_Pytorch | RunModel.py | RunModel.py | py | 16,068 | python | en | code | 6 | github-code | 71 | [
{
"api_name": "os.path.dirname",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_... |
11214754375 | import logging
import random
from chess.models.conf import DATA_TOURNAMENTS
from tinydb import Query
from chess.models.round import Round
class Tournament:
""" """
MAX_PLAYERS = 4
table = DATA_TOURNAMENTS
def __init__(
self,
name="",
place="",
start... | Al3xBrs/Chess_Tournament | chess/models/tournaments.py | tournaments.py | py | 9,712 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "chess.models.conf.DATA_TOURNAMENTS",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "tinydb.Query",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "tinydb.Query",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "tinydb.Q... |
39348256637 | from array import array
from ctypes import Array
from typing import Tuple
def binary_search(numbers: Array, value: int) -> Tuple[bool, int]:
p=0
k=len(numbers)-1
while(p<=k):
middle = int((p+k)/2)
if value==numbers[middle]:
return True,middle
elif value>numbers[middle]:... | AdrianAlbrecht/AiSD_20-21 | Lab_10/Lab_10.py | Lab_10.py | py | 474 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "ctypes.Array",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "array.array",
"line_number": 19,
"usage_type": "call"
}
] |
41008279868 | import torch
torch.manual_seed(1741)
import random
random.seed(1741)
import numpy as np
np.random.seed(1741)
from collections import defaultdict
import pickle
import os
import tqdm
from itertools import combinations
from data_loader.reader import mulerx_tsvx_reader, tbd_tml_reader, tdd_tml_reader, tml_reader, tsvx_read... | hieumdt/SCS-EERE | data_loader/loader.py | loader.py | py | 26,711 | python | en | code | 11 | github-code | 71 | [
{
"api_name": "torch.manual_seed",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "random.seed",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line... |
4109089856 | # -*- coding: utf-8 -*-
#Importing required libraries
from string import punctuation
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
from nltk.tokenize import sent_tokenize
import urllib.request
import bs4 as BeautifulSoup
import nltk
from nltk.cluster.util import cosine_distance
import nump... | simranrawat/GO-PRECISE | webpagesummary.py | webpagesummary.py | py | 2,343 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "nltk.tokenize.sent_tokenize",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "urllib.request.request.urlopen",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 29,
"usage_type": "attribute"
},
{... |
18235796942 | from django.shortcuts import render
from .models import Post, Contact, Social, WebElement, Soupiska
from .forms import NewUserForm
from django.contrib.auth import login
from django.contrib import messages
social = Social.objects
webelement = WebElement.objects
post = Post.objects.order_by("-pub_date")
# co ... | Tomas771cz/mat_prac | mat_prac/website/views.py | views.py | py | 2,204 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "models.Social.objects",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "models.Social",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "models.WebElement.objects",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "... |
29227427535 | from django.urls import path
from . import views
app_name = "shifter_files"
urlpatterns = [
path('', views.FileUploadView.as_view(), name='index'),
path('files', views.FileListView.as_view(), name='myfiles'),
path('files/<str:file_hex>', views.FileDetailView.as_view(),
name='file-detai... | TobySuch/Shifter | shifter/shifter_files/urls.py | urls.py | py | 650 | python | en | code | 11 | github-code | 70 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"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",
... |
13502736643 | from typing import Literal, Optional
from ._base import BaseWidget, TkWidget
from ._variables import Float
class ProgressBar(BaseWidget):
_tcl_class = "ttk::progressbar"
_keys = {
"focusable": (bool, "takefocus"),
"max": float,
"mode": str,
"orientation": (str, "orient"),
... | im-coder-lg/tukaan | tukaan/progressbar.py | progressbar.py | py | 1,834 | python | en | code | null | github-code | 70 | [
{
"api_name": "_base.BaseWidget",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "_variables.Float",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "_base.TkWidget",
... |
42531322952 | '''
Input: __init__(feature_size), eeg_features
Output: the noised data from gaussian layer
'''
import torch
from torch import nn
class MoGLayer(nn.Module):
def __init__(self, noise_dim: tuple):
super(MoGLayer, self).__init__()
pre_std = torch.zeros(noise_dim)
pre_std = torch.nn.init.un... | nopphonyel/EEG2Audio | main_code/model/layer/MoGLayer.py | MoGLayer.py | py | 745 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "torch.nn.Module",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "torch.zeros",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.nn.init.uniform_",
... |
38821269574 | import collections, math
def solution(fees, records):
cars_park_record, cars_park_time = collections.defaultdict(list), collections.defaultdict(int)
for record in records:
time, car_num, _ = record.split()
cars_park_record[car_num].append(time)
for car_num in cars_park_record:
t... | BoostcampAI2Study/Coding_Study | 220516_(카카오) 주차 요금 계산/주차 요금 계산_HW.py | 주차 요금 계산_HW.py | py | 1,120 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "collections.defaultdict",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 26,
"usage_type": "call"
}
] |
25053171692 | import time
import torch
def train_hebb(model, loader, device, measures=None, criterion=None):
"""
Train only the hebbian blocks
"""
t = time.time()
loss_acc = (not model.is_hebbian()) and (criterion is not None)
with torch.no_grad():
for inputs, target in loader:
# print(in... | OilProducts/brainer | train_soft_hebb.py | train_soft_hebb.py | py | 1,651 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "time.time",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.no_grad",
"line_number": 10,
"usage_type": "call"
}
] |
14224512062 | '''
PROBLEM:
Given a string, rearrange it so that any two adjacent characters are not the same.
If such a reorganization of the characters is possible, output any possible valid
arrangement. Otherwise, return an empty string.
------------------------
PATTERN: TOP K ELEMENTS
------------------------
'''
# import... | kelanax/leetcode_prac | Top K Elements/reorganize_string.py | reorganize_string.py | py | 1,308 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "collections.Counter",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "heapq.heapify",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "heapq.heappop",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
... |
25121131784 | #!/usr/bin/env python
"""
Tests covering the parsing functions that read in light characteristics.
"""
import pytest
from light_character import light_character
@pytest.mark.parametrize(
"test_input",
[
'F', 'Fl', 'LFl', 'Oc', 'Iso', 'Q'
]
)
def test_parse_pattern_simple(test_input):
"""
... | paul-butcher/light_character | tests/test_parsing.py | test_parsing.py | py | 2,171 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "light_character.light_character.parse_pattern",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "light_character.light_character",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 12,
"usage_type": ... |
40863902173 | import sys
from pyspark import SparkConf, SparkContext
from pyspark.sql import SQLContext
import pyspark.sql.functions as F
from users_datamart import distance
def main():
date = sys.argv[1]
events_base_path = sys.argv[2]
geo_base_path = sys.argv[3]
second_table_save = sys.argv[4]
conf = Spa... | Yussdan/datalake_pyspark | src/scripts/zones_datamart.py | zones_datamart.py | py | 4,118 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "sys.argv",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number... |
11299927842 | #!/usr/bin/env python
import os
import sys
import setuptools
if sys.argv[-1] == "publish":
os.system("python setup.py sdist upload")
sys.exit()
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="pyflowater",
version="0.5.2",
packages=["pyflowater"],
... | rsnodgrass/pyflowater | setup.py | setup.py | py | 907 | python | en | code | 16 | github-code | 70 | [
{
"api_name": "sys.argv",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.system",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": ... |
3593979074 | import errno
import logging
import os
import subprocess
import re
import shutil
import socket
import tempfile
from . import qmp
LOG = logging.getLogger(__name__)
# Mapping host architecture to any additional architectures it can
# support which often includes its 32 bit cousin.
ADDITIONAL_ARCHES = {
"x86_64" : ... | Cisco-Talos/pyrebox | qemu/python/qemu/__init__.py | __init__.py | py | 16,571 | python | en | code | 1,624 | github-code | 70 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.uname",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.access",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.R_OK",
"line_number": 27,... |
43534394362 | import numpy as np
from matplotlib import pyplot as plt
import os
from . import settings
plt.rcParams['font.sans-serif'] = ['Microsoft YaHei'] # 用来正常显示中文标签
plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号
plt.rcParams['figure.dpi'] = 300 # 分辨率
plt.rcParams['figure.figsize'] = (5.771, 5.771 * 0.618) # 图片大小,单位是... | panhaoyu/finite_difference_homework | core/plot.py | plot.py | py | 2,817 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 7,
"usage_type": "attribute"
},
{
"ap... |
20909525280 | import asyncio
import functools
import time
from colorama import Fore
from XAgentServer.exts.exception_ext import XAgentTimeoutError, XAgentCloseError
from inputimeout import inputimeout, TimeoutOccurred
from XAgentServer.application.global_val import redis
import math
def timer(func):
"""
Decorator function... | OpenBMB/XAgent | command_input.py | command_input.py | py | 5,210 | python | en | code | 5,504 | github-code | 70 | [
{
"api_name": "time.time",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "functools.wraps",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "colorama.Fore.RED",
"line_num... |
5305927265 | # -*- coding: utf-8 -*-
"""Loading a pre-trained model from disk.
Learn how to load a pre-trained model from disk. We will classify individual images from the
Animals dataset and then display the classified images to our screen.
Example:
$ python shallownet_load.py --dataset ../datasets/animals --model shallownet... | miroso/pis_code | starter_bundle/ch13-saving_loading/shallownet_load.py | shallownet_load.py | py | 2,694 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "imutils.paths.list_images",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "imutils... |
32534933197 | import sys
import time
import random
import os
import shutil
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
from_dir = "C:/Users/judit/Downloads"
class FileEventHandler(FileSystemEventHandler):
def on_created(self, event):
print(f"¡Oye, {even... | Judith2007/Proyecto-103 | file_system_events_tracker.py | file_system_events_tracker.py | py | 949 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "watchdog.events.FileSystemEventHandler",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "watchdog.observers.Observer",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 38,
"usage_type": "call"
}
] |
39590878498 | from django.contrib import admin
# Register your models here.
from .models import Exam, AttemptExam
# from .models import ExamQuestions
class ExamAdminConfig(admin.ModelAdmin):
list_display = ('name','number_of_questions','duration','course','teacher')
list_filter = ('name','duration','teacher')
search_fi... | firasaz/Exam-Management-System | src/exams/admin.py | admin.py | py | 1,344 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "django.contrib.admin.ModelAdmin",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.contrib.admin.site.register",
"line_number": 37,
"usage_type": "call"
},... |
13959130182 | import os
import sys
import traceback
import uuid
import time
import copy
from .requester import Requester
from .resources import Resources, Resource
from .writer import Writer
from .window import Window
from .asset import Asset
from .threads import Threader
from .pages import Pages, Page
from .stripper import Stripper... | bdunford/ripper | ripper/ripper.py | ripper.py | py | 7,676 | python | en | code | 2 | github-code | 70 | [
{
"api_name": "os.path.join",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "writer.Writer.write",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "writer.Writer",
"li... |
23900711135 | import os
import flask
from flask import Flask, render_template, request, redirect
from src.components.inference import Inference
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
impo... | AmineMekki01/tp_module_dl | app.py | app.py | py | 2,044 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "nltk.download",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "flask... |
5845686721 | import PyPDF2
from pathlib import Path
from gtts import gTTS
from googletrans import Translator
def define_language(text):
"""Defines language received text and return it"""
translator = Translator()
language = translator.detect(text).lang
return language
def pdf_to_mp3(pdf_file_path, output_dir_pat... | dzmitryboika1/PDF_to_MP3_FLASK_APP | converter.py | converter.py | py | 1,150 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "googletrans.Translator",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "PyPDF2.PdfFileReader",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "gtts.gTTS",
... |
4123997769 | import os
from collections import defaultdict
from django.apps import apps
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.db import models
class Command(BaseCommand):
help = "Prints a list of all files in MEDIA_ROOT that are not referenced in the da... | artem30801/anthrofractal-web | comic/management/commands/mediacleanup.py | mediacleanup.py | py | 1,898 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.conf.settings",
"line_number": 14,
"usage_type": "argument"
},
{
"api_name": "django.core.management.base.CommandError",
"line_number": 15,
"usage_typ... |
27028793700 | import json
import argparse
parser = argparse.ArgumentParser(description='main', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--dataset', default='MAGCS')
parser.add_argument('--model', default='ensemble')
args = parser.parse_args()
dataset = args.dataset
model_name = args.model
label2... | yuzhimanhua/FUTEX | self_train/postprocess.py | postprocess.py | py | 1,469 | python | en | code | 14 | github-code | 70 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentDefaultsHelpFormatter",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 25,
"usage_type": "call"
},
{
"api_... |
74599057190 | import os
from datetime import datetime, date
import django
# from django.contrib.auth.models import User
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'social_media.settings')
django.setup()
from core.attachement.models import AttachementModel
# AUTH_USER_MODEL = "core.UserModel"
attachement = AttachementModel(
... | nguyenanh2222/social_media | test/model/attchement.py | attchement.py | py | 559 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.environ.setdefault",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.setup",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "core.attachement.mode... |
15378255772 | # import python modules
import os
from docxtpl import DocxTemplate, InlineImage
# create a document object
# Документ -шаблон
doc = DocxTemplate("shablon_mnz.docx")
DATE = "25.01.2023"
###################################### ОБРАБОТКА катлога с файлами ############
##УКАзываем путь к директории с файлами
path = "c... | Dmitriy6655/diplom_Viligdanov-T | MNZ_itog.py | MNZ_itog.py | py | 4,028 | python | ru | code | 0 | github-code | 71 | [
{
"api_name": "docxtpl.DocxTemplate",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"l... |
18983555152 | # use Python 3.9
# python3.9 -m venv env
# source new3.9/bin/activate
# pip3.9 install -r requirements.txt
import random
import math
import matplotlib.pyplot as plt
from matplotlib.pyplot import figure
import scipy
from scipy.special import softmax
import numpy as np
# Typing
import typing
from typing import TypeVar... | abhi0220/popDescentExtra | pd_fm.py | pd_fm.py | py | 17,640 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "time.time",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.Sequential",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras",
"line_number": 70,
"usage_type": "attribute"
},
{
"api_name": "tensorflo... |
17188090437 | import gym
import numpy as np
import itertools
from urdfenvs.robots.generic_urdf import GenericUrdfReacher
from MotionPlanningEnv.dynamicSphereObstacle import DynamicSphereObstacle
'''
class steering():
def right(v,r):
def left(v,r):
def straight(v, dist):
'''
def initEnv(goal=Fal... | WillemMomma/Planning_and_decision_making | env/holonomic_robot_main 2.py | holonomic_robot_main 2.py | py | 4,411 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "urdfenvs.robots.generic_urdf.GenericUrdfReacher",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "urdfenvs.robots.generic_urdf.GenericUrdfReacher",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "urdfenvs.robots.generic_urdf.GenericUrdfReacher",... |
2019438789 | from core.social_auth.oauth import oauth
from core.social_auth.constants import GITHUB_USERINFO_URL, GITHUB_EMAIL_URL
from werkzeug.exceptions import Unauthorized, BadRequest, InternalServerError
from requests.exceptions import RequestException
from authlib.integrations.flask_client import OAuthError
from flask import ... | Azhar-inexture-1/flask_restful_practice | core/social_auth/github/services.py | services.py | py | 2,426 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "core.social_auth.oauth.oauth.create_client",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "core.social_auth.oauth.oauth",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "werkzeug.exceptions.BadRequest",
"line_number": 15,
"usage_type":... |
10320789463 | #!/usr/bin/env python
# -*- coding: utf-8 -*
"""Integration test for `cycle_calendar_generator` package."""
import unittest
import os
import sys
import shutil
import subprocess
from pathlib import Path
import datetime
from cycle_calendar_generator import cycle_calendar_generator
import ics
import arrow
CURRENT_WOR... | ROldford/cycle_calendar_generator | tests/test_integration.py | test_integration.py | py | 5,247 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.path.dirname",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"lin... |
27518010570 | from PySide2 import QtCore, QtGui
from countdata import CountData
class DrawingData:
def __init__(self, name: str, geom, pen: QtGui.QPen, countData=CountData()):
"""
Minimum objects required to re-create an item
drawn in a scene.
Need name of item (Rect, Ellipse, Line)
Ne... | nprezant/ImageWAO | src/main/python/drawingdata/drawingdata.py | drawingdata.py | py | 3,541 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "PySide2.QtGui.QPen",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "PySide2.QtGui",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "countdata.CountData",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PySide2.QtGui.... |
5947344328 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 21 18:43:37 2019
@author: zhanghuangzhao
"""
import numpy
import random
from mnist import MNIST
class dataset(object):
def __init__(self, x, y):
self.__x = numpy.asarray(x).reshape((-1, 28, 28, 1))
self.__y = numpy.asarray(y)... | GaomingOrion/dl_hw | dl_hw2/code/fmnist_dataset.py | fmnist_dataset.py | py | 2,868 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "numpy.asarray",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_n... |
27059233763 | import os
from unittest import mock
from absl import flags
from absl.testing import absltest, parameterized
try:
import tensorflow_model_analysis as tfma
from ml_metadata.proto import metadata_store_pb2
except ImportError:
pass
from model_card_toolkit import core, dependencies, model_card
try:
from model_ca... | tensorflow/model-card-toolkit | model_card_toolkit/core_tf_test.py | core_tf_test.py | py | 9,662 | python | en | code | 391 | github-code | 71 | [
{
"api_name": "model_card_toolkit.utils.tf_graphics",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "model_card_toolkit.utils.testdata.tfxtest.TfxTest",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "absl.testing.absltest.TestCase",
"line_number": 24,
... |
40822013416 |
import requests
import bs4
from bs4 import BeautifulSoup as BS
import re
URL = "https://www.google.com/search?q=chees"
def start_ref(q):
global data
data = {}
headers = {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
"User-Agent": "Mozilla/5.0 (X... | OlegYes/SerferGoogle | parser.py | parser.py | py | 1,029 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 18,
"usage_type": "call"
}
] |
28794404712 | import pygame # Importa a biblioteca pygame
from pygame.locals import * # Importa de pygame tudo do submódulo locals
from sys import exit # Importa a função exit do módulo sys que fecha a janela
# Inicializa todas as funções e variáveis da biblioteca pygame
pygame.init()
# Cria o objeto tela
largura = 640 # Medid... | Souza83/pygame | pygametela01.py | pygametela01.py | py | 852 | python | pt | code | 0 | github-code | 71 | [
{
"api_name": "pygame.init",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pygame.display... |
21247139153 | import pandas as pd
import numpy as np
from sklearn.linear_model import LogisticRegression
from sklearn.cross_validation import KFold, StratifiedKFold, cross_val_score
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import LabelEncoder, LabelBinarizer
import matplotlib.pyplot as plt
from sklearn_pand... | lchsk/kaggle | house-prices/house_prices/house2.py | house2.py | py | 1,054 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "sklearn_pandas.DataFrameMapper",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.LabelBinarizer",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sklearn.pipeline.Pipeline",
"line_number": 27,
"usage_type": "call"
... |
12652621246 | #coding=utf-8
import requests
import time
import pandas as pd
import numpy as np
def get_data():
data = pd.DataFrame()
for i in range(1,98):
url = f"http://www.lottery.gov.cn/historykj/history_{i}.jspx?_ltype=dlt"
res = requests.get(url,headers=header).text #获取网页内容
df = pd.read_html(r... | renmoji/Lottery_Analysis | get_lottery_data.py | get_lottery_data.py | py | 1,896 | python | zh | code | 0 | github-code | 71 | [
{
"api_name": "pandas.DataFrame",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.read_html",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_... |
14108163 |
import pandabear as pd
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
# KNN 알고리즘 사용을 위한 모듈
#1. 전처리 하기 전 데이터 확인
data = pd.read_csv ("sample_iris.csv")
print(data.head())
# 지도학습 데이터
X = data.values[:, :data.shape[1] - 1]
Y =... | Heyyounghan/AIstudy | molamola/200217_KNN.py | 200217_KNN.py | py | 1,696 | python | ko | code | 0 | github-code | 71 | [
{
"api_name": "pandabear.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sklearn.neighbors.KNeighborsClassifier",
"line_number": 27,
"usage_type": "ca... |
37267194741 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 28 16:22:45 2018
@author: thiru
"""
from nltk.corpus import stopwords
from apple.models import *
from nltk.stem.wordnet import WordNetLemmatizer
import string
import gensim
from gensim import corpora
import pandas as pd
import datetime
import re
im... | Waffleboy/Blackrock2018 | dashboard/scripts/lda_job.py | lda_job.py | py | 3,248 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "string.punctuation",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_nam... |
40154398549 | import numpy as np
import scipy.io as scio
def ReadData1(data_All1):
data_cup1_tmp = []
data_cup1_tmp0 = np.concatenate((data_All1[0],
np.zeros((2000 - data_All1[0].shape[0], 39))))
for i in range(1, 100):
data_cup1_tmp = np.concatenate((data_All1[i],
... | MrWang98/ChestLive | Fewshotchestmotion/Func_ReadPartData.py | Func_ReadPartData.py | py | 4,773 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "numpy.concatenate",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.concatenate",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_... |
10340638867 | """
Definition of Base Run Handler
"""
from abc import abstractmethod
from io import BytesIO
from os import environ as env_vars
from os.path import exists
from subprocess import check_call as run_shell_command
from zipfile import ZipFile
from mlflow.tracking import MlflowClient
from shared.logger.job_lifecycle_manage... | splicemachine/ml-workflow | bobby/src/handlers/run_handlers/base_deployment_handler.py | base_deployment_handler.py | py | 6,478 | python | en | code | 3 | github-code | 70 | [
{
"api_name": "os.environ",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "base_handler.BaseHandler",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "base_handler.BaseHandler.__init__",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": ... |
9054883617 | import pytest
import immoscrapy
@pytest.mark.parametrize(
"real_estate_type, return_type",
[
('HOUSE_BUY', immoscrapy.HOUSE_BUY),
('HOUSE_RENT', immoscrapy.HOUSE_RENT),
('APARTMENT_BUY', immoscrapy.APARTMENT_BUY),
('APARTMENT_RENT', immoscrapy.APARTMENT_RENT),
]
)
def tes... | venthur/immoscrapy | tests/test_immoscrapy.py | test_immoscrapy.py | py | 824 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "immoscrapy.query",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pytest.mark",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "immoscrapy.HO... |
33457799659 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is ... | TideSec/FuzzScanner | libs/dirsearch/dirsearch.py | dirsearch.py | py | 1,352 | python | en | code | 950 | github-code | 71 | [
{
"api_name": "sys.version_info",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "sys.stdout.write",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
... |
8854126122 | import logging
import queue
import re
from .mdlist import MangaDexList
from .errors import HTTPException, InvalidURL, MangaDexException, NotLoggedIn
from .network import Net, base_url
from .manga import ContentRating, Manga
from .fetcher import get_list
from .user import User
from .language import get_language
from .c... | tiberiusjos/pythonDownloader | mangadex_downloader/iterator.py | iterator.py | py | 18,220 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "queue.Queue",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "queue.Empty",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "errors.MangaDexExcepti... |
12380667626 | from aws_cdk import (
# Duration,
Stack, Fn,
aws_rds,
aws_iam,
aws_ec2,
aws_eks,
RemovalPolicy, SecretValue,
aws_lambda,
aws_apigateway as apigw
)
from constructs import Construct
cidr="10.10.0.0/16"
key_name = "my-key-pair"
class SaasSolutionCdkStack(Stack):
def __init__(self... | jbcodeforce/big-data-tenant-analytics | setup/saas-solution-cdk/saas_solution_cdk/saas_solution_cdk_stack.py | saas_solution_cdk_stack.py | py | 3,552 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "aws_cdk.Stack",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "constructs.Construct",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "aws_cdk.Fn.get_azs",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "aws_cdk.Fn",
... |
21046941099 | import json
from Products.ZenRRD.CommandParser import CommandParser
class table(CommandParser):
def processResults(self, cmd, result):
data = None
try:
data = json.loads(cmd.result.output)
except ValueError:
return
if 'databases' not in data:
re... | zenoss/ZenPacks.zenoss.PostgreSQL | ZenPacks/zenoss/PostgreSQL/parsers/table.py | table.py | py | 1,054 | python | en | code | 8 | github-code | 71 | [
{
"api_name": "Products.ZenRRD.CommandParser.CommandParser",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "json.loads",
"line_number": 9,
"usage_type": "call"
}
] |
42516605816 | # ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.14.5
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# name: python3
# ---
# %% [markdown]
# # Count peptides over ... | RasmussenLab/pimms | project/erda_02_mq_count_features.py | erda_02_mq_count_features.py | py | 11,614 | python | en | code | 8 | github-code | 71 | [
{
"api_name": "vaep.logging.setup_nb_logger",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "config.FOLDER_MQ_TXT_DATA",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "p... |
20438024628 | # (C) 2021 GoodData Corporation
""" Module containing a class that provides access to metadata and afm services.
"""
from __future__ import annotations
from typing import Optional
import gooddata_afm_client as afm_client
import gooddata_metadata_client as metadata_client
import gooddata_scan_client as scan_client
f... | lupko/gooddata-python-sdk | gooddata-sdk/gooddata_sdk/client.py | client.py | py | 3,352 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "gooddata_sdk.__version__",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "gooddata_met... |
11174232216 | from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.orm import relationship
from .db import db
class Mall(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(50))
account_id=db.Column(db.Integer, db.ForeignKey('account.id'))
unit = relationship("Unit", uselist=Fa... | benaissaa/update_test | app_api/Model/mall.py | mall.py | py | 438 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "db.db.Model",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "db.db",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "db.db.Column",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "db.db",
"line_number": 5,
"u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.