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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
32240616198 | """Run Cumulus."""
import asyncio
import concurrent
import logging
import os
import signal
import subprocess
import traceback
import inspect
from typing import Any, Coroutine, TypeVar, Callable
from .config import CumulusConfig
from .messaging import MessagingService
from .tunnel import TunnelService
from .utils impor... | TeepCo/ha-addons | cumulus/rootfs/opt/cumulus/core.py | core.py | py | 3,654 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "typing.TypeVar",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "config.CumulusConfig",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "asyncio.Abstrac... |
6855312206 | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 1 14:57:31 2020
@author: ABHIJIT SHOW
"""
from flask_cors import CORS, cross_origin
from flask import Flask, render_template, json, jsonify
app = Flask(__name__)
cors = CORS(app, resources={r"/*": {"origins": "*"}})
@app.route('/')
@cross_origin()
def... | abhijitshow07/COVID-19-Motion-Highcharts | app.py | app.py | py | 672 | python | en | code | 0 | github-code | 27 | [
{
"api_name": "flask.Flask",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "flask_cors.cross_or... |
37703740117 | import collections
from functools import reduce
import json
import threading
from raythena.utils.config import Config
from raythena.utils.eventservice import PandaJobQueue, EventRange, PandaJob, EventRangeUpdate, EventRangeDef, JobDef, PilotEventRangeUpdateDef
from raythena.utils.exception import ExThread
from raythena... | PanDAWMS/ray | src/raythena/utils/bookkeeper.py | bookkeeper.py | py | 41,058 | python | en | code | 3 | github-code | 27 | [
{
"api_name": "raythena.utils.eventservice.PandaJob",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "raythena.utils.config.Config",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "raythena.utils.logging.make_logger",
"line_number": 44,
"usage_type": "... |
1083954822 | import requests
from typing import Optional
from fastapi import APIRouter
from bs4 import BeautifulSoup
from unidecode import unidecode
from starlette.responses import JSONResponse
from utils import enumeration
from constants import errorMessages
schedule = APIRouter(
prefix="/schedule"
)
@schedule.get("/")
async ... | fga-eps-mds/2023.2-UnB-TV-VideoService | src/controller/scheduleController.py | scheduleController.py | py | 1,761 | python | en | code | 1 | github-code | 22 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "typing.Optional",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "unidecode.unidecode",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "utils.enumerati... |
29135457658 | # -*- coding: utf-8 -*-
import logging
import os
import shutil
from pathlib import Path
from gstomd.gdoc import Gdoc
from gstomd.node import Node
from gstomd.utils import mime_to_filetype
logger = logging.getLogger(__name__)
class Gfolder(Node):
"""Folder instance.
Inherits Node.
"""
def __init__... | aurora-5r/GsuiteToMd | gstomd/gfolder.py | gfolder.py | py | 5,783 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "gstomd.node.Node",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "gstomd.utils.mime_to_filetype",
"line_number": 134,
"usage_type": "call"
},
{
"api_name": "gst... |
710991676 | """empty message
Revision ID: cbf3cfdfded3
Revises: be371e0ba082
Create Date: 2016-05-10 07:04:10.141522
"""
# revision identifiers, used by Alembic.
revision = 'cbf3cfdfded3'
down_revision = 'be371e0ba082'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade():
... | cruzeMc/capstone2 | migrations/versions/cbf3cfdfded3_.py | cbf3cfdfded3_.py | py | 1,022 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "alembic.op.drop_table",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "alembic.op.create_table",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "alembic.op",... |
13735729432 |
#-*- coding: utf-8 -*-
from odoo import models, fields, api,_
from odoo.exceptions import UserError
from datetime import datetime
import calendar
#cuando son pago o salida de dinera hay quecambiar el tipo de fectura
#que en ves de que creen unfactura de cliente denbe crearuna factruade proveeodor
class Balance_ecomon... | mooosamir/Equitopia | addons/custom_property/models/balance_ecomimico.py | balance_ecomimico.py | py | 7,478 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "odoo.models.Model",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "odoo.fields.One2many",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "odoo.fields",... |
12816271378 | import csv
import time
import json
from service_alta_tnved import ServiceAltaTNVED
from requests import Session, Response, exceptions
class ServiceApiTNVED(ServiceAltaTNVED):
def __init__(self, goods_name: str, attempts: int):
super().__init__(goods_name, attempts)
self.website: str = "https://api... | agladsoft/service_tnved | service_api_tnved.py | service_api_tnved.py | py | 2,768 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "service_alta_tnved.ServiceAltaTNVED",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "requests.Session",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "reques... |
6368822886 | from django.shortcuts import render
from django.http import HttpResponse
from .models import Sa
from .forms import SaForm, RawSaForm
# Create your views here.
def saquery(request):
return render(request, 'sapositionpoc/saquery.html')
def saresult(request):
if request.method == 'POST':
search_id = re... | cdiep808/positionpoc | sapositionpoc/views.py | views.py | py | 2,638 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "django.shortcuts.render",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "models.Sa.objects.get",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "models.Sa.objects",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "... |
10083863525 | import csv
import re
import aiohttp
import asyncio
import time
start_time = time.time()
def get_links():
links = []
with open('links.csv') as f:
reader = csv.reader(f)
for row in reader:
links.append(row[0])
return links
async def get_response(session, url):
async with ... | coderecode-com/async-await-demo | 9_async_scraper.py | 9_async_scraper.py | py | 845 | python | en | code | 1 | github-code | 22 | [
{
"api_name": "time.time",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "aiohttp.ClientSession",
"line_numbe... |
23710410805 | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 2 16:33:14 2020
@author: Wenshuo Wang
"""
import pandas as pd
import math
import numpy as np
from numpy import random
from scipy.stats import norm, multivariate_normal, uniform, chi2
from hilbertcurve.hilbertcurve import HilbertCurve
from joblib import Parall... | JunLiuLab/SMG | high_dimensional.py | high_dimensional.py | py | 8,809 | python | en | code | 3 | github-code | 2 | [
{
"api_name": "numpy.zeros",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.power",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number": 5... |
2034791723 | import bpy
from bpy.types import Operator, AddonPreferences
from bpy_extras.io_utils import ImportHelper, ExportHelper
from bpy.props import (
StringProperty,
BoolProperty,
EnumProperty,
IntProperty,
FloatProperty,
)
from io_mesh_atomic.pdb_import import import_pdb
from ... | Bforartists/Bforartists | scripts/addons/io_mesh_atomic/pdb_gui.py | pdb_gui.py | py | 10,028 | python | en | code | 492 | github-code | 22 | [
{
"api_name": "bpy.types.Operator",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "bpy_extras.io_utils.ImportHelper",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "bpy.props.StringProperty",
"line_number": 25,
"usage_type": "call"
},
{
"api_... |
30044459678 | from django import forms
from online_library.library.models import Profile, Book
class CreateProfileForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.label_suffix = ""
class Meta:
model = Profile
fields = ('first_name', 'last_n... | Unconsciousness13/Python-Web-Basics | PythoWeb_Basics_Retake_Exam_11_August_2021/online_library/online_library/library/forms.py | forms.py | py | 4,098 | python | en | code | 2 | github-code | 22 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "online_library.library.models.Profile",
"line_number": 12,
"usage_type": "name"
},
{
"api_... |
29206411875 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import os
import threading
import hashlib
import logging
class ImgSync:
"""
"""
def __init__(self, pool, database, toPath, detailshow=None, syncExt=[]):
self.toPath = toPath
self.syncExt = syncExt
self.detailShow = detailshow
self... | xyq162089/drivesync | imgsync.py | imgsync.py | py | 3,535 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "logging.info",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 39... |
23803503743 | import datetime
import re
from django.core.exceptions import ValidationError
def validate_year(value):
if not re.match('\d\d\d\d', str(value)):
raise ValidationError("Year must be in the format YYYY.")
year = int(value)
if year <= 1900:
raise ValidationError("Please provide a year after 1... | myvoice-nigeria/myvoice | myvoice/core/validators.py | validators.py | py | 449 | python | en | code | 3 | github-code | 22 | [
{
"api_name": "re.match",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.core.exceptions.ValidationError",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.core.exceptions.ValidationError",
"line_number": 12,
"usage_type": "call"
},
{
... |
34943517271 | #-----------------------------------------------------------------------------
# Title : Top Level Navigation Budget Sheet
#-----------------------------------------------------------------------------
# This file is part of the TID ID Smartsheets software platform. It is subject to
# the license terms in the LICE... | slaclab/tid-id-smartsheets | tid_ss_lib/navigate.py | navigate.py | py | 10,531 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "smartsheet.models.Sheet",
"line_number": 127,
"usage_type": "call"
},
{
"api_name": "smartsheet.models",
"line_number": 127,
"usage_type": "attribute"
},
{
"api_name": "datetime.date",
"line_number": 194,
"usage_type": "call"
},
{
"api_name": "datet... |
72765828215 | from google.appengine.ext import db
from models import User, Post
from decorators import post_exists, logged_in, user_post
from main import BlogHandler
def blog_key(name = 'default'):
return db.Key.from_path('blogs', name)
class NewPostHandler(BlogHandler):
@logged_in
def get(self):
self.render("n... | caseyr003/blog | handlers/post.py | post.py | py | 2,119 | python | en | code | 1 | github-code | 22 | [
{
"api_name": "google.appengine.ext.db.Key.from_path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "google.appengine.ext.db.Key",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "google.appengine.ext.db",
"line_number": 7,
"usage_type": "name"
}... |
72886707895 | import unittest
from mock import MagicMock
from mock import Mock
from globomap_loader.loader.globomap import GloboMapException
from globomap_loader.loader.loader import DriverWorker
from tests.util import open_json
class TestDriverWorker(unittest.TestCase):
def test_sync_updates(self):
update = open_js... | globocom/globomap-loader | tests/driver_worker_test.py | driver_worker_test.py | py | 1,780 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "unittest.TestCase",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "tests.util.open_json",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "mock.MagicMock",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "globomap_l... |
10472493290 | from flask import render_template
from flask import Response
from flask import request
from app.digWrapper import RunDig
from app import app
@app.route('/')
@app.route('/index')
def index():
query = request.args.get("q","")
queryOutput = ""
if len(query) > 0 :
queryOutput = "> dig {0} \n".format(q... | nielsd/dig-web | app/routes.py | routes.py | py | 924 | python | en | code | 2 | github-code | 22 | [
{
"api_name": "flask.request.args.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "app.digW... |
73631098937 | from pathlib import Path
from typing import Optional, Union
def get_run_name(
track_name: str,
camera_gaussian_range_noise: bool,
known_association: bool,
camera_range_noise: float,
slam_range_var: float,
run_num: float,
) -> str:
return f"{track_name}_{'gaus' if camera_gaussian_range_noi... | QUT-Motorsport/QUTMS_Driverless | src/navigation/slam/experiment_helpers.py | experiment_helpers.py | py | 2,794 | python | en | code | 28 | github-code | 22 | [
{
"api_name": "typing.Optional",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line... |
43138898318 |
import boto3
from scrapy.extensions.feedexport import BlockingFeedStorage
AWS_PROFILE = 'koodivelho'
BUCKET_NAME = 'testaus-bucket'
KEY_NAME = 'hy_courses.json'
class CourseS3FeedStorage(BlockingFeedStorage):
def __init__(self, uri):
session = boto3.Session(profile_name=AWS_PROFILE)
self.s3_clie... | varjo-oodi/kurssim.me-backend | hy_scraper/feedexport.py | feedexport.py | py | 599 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "scrapy.extensions.feedexport.BlockingFeedStorage",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "boto3.Session",
"line_number": 12,
"usage_type": "call"
}
] |
21148132114 | import time
from typing import List
from fastapi import Depends, FastAPI, HTTPException
from . import crud, database, models, schemas
from .database import db_state_default
database.db.connect()
database.db.create_tables([models.User, models.Item])
database.db.close()
app = FastAPI()
sleep_time = 10
async def re... | srujanprophet/Learn-FastAPI | examples/advanced-user-guide/sql_app_peewee/main.py | main.py | py | 7,113 | python | en | code | 1 | github-code | 22 | [
{
"api_name": "database.db.connect",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "database.db",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "database.db.create_tables",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "database... |
71076870457 | from flask import Blueprint, Flask
from flask_cors import CORS
api_views = Blueprint('api', __name__, url_prefix="/api/v1/")
@api_views.route('/status')
def status():
return 'OK'
if __name__ == "__main__":
app = Flask(__name__)
CORS(app, resources={r"/api/v1/*": {"origins": "*"}})
app.register_bluep... | robssonpeter/AirBnB_clone_v4 | api/v1/app.py | app.py | py | 374 | python | en | code | 1 | github-code | 22 | [
{
"api_name": "flask.Blueprint",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 13,
"usage_type": "call"
}
] |
32871555528 | # TODO : Decorate all print thing
import os
import time
import datetime
import mysql.connector
# Modularized parts
import fileIO
import config
import compileScript
import gradingScript
import abb
import cmdMode
import importlib
import sys
from kbhit import KBHit
from colorama import Style, Fore, init # Terminal de... | pannxe/ogogi | src/ogogi.py | ogogi.py | py | 6,950 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "abb.bold",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "colorama.Fore.YELLOW",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "colorama.Fore",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "colorama.Style.... |
12483472728 | from django.shortcuts import render
from zhugeleida import models
from publicFunc import Response
from publicFunc import account
from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt, csrf_protect
from zhugeleida.forms.qiyeweixin.tag_list_verify import TagListAddForm, TagListUpdateFo... | itcastpeng/zhugeApi | zhugeleida/views_dir/qiyeweixin/tag_list.py | tag_list.py | py | 4,852 | python | en | code | 1 | github-code | 22 | [
{
"api_name": "publicFunc.Response.ResponseObj",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "publicFunc.Response",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "publicFunc.condition_com.conditionCom",
"line_number": 25,
"usage_type": "call"
},
... |
1593755552 | # Resimdeki ana hatların ortaya çıkarılması sağlanır.
import cv2
import matplotlib.pyplot as plt
# Resmi içeri aktarma
img = cv2.imread("image1.jpg")
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) #GrayScale convert
# Thresh ile maxval arasındaki değerler beyaz olur.
# cv2.THRESH_BINARY_INV uygulanırsa tam tersi olur. ... | ilkayergul/Python | Open Cv/010-Görüntü Eşikleme.py | 010-Görüntü Eşikleme.py | py | 875 | python | tr | code | 0 | github-code | 22 | [
{
"api_name": "cv2.imread",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "cv2.threshold",
"lin... |
3700076573 | import datetime
# Store the next available id for all new notes
last_id = 0
class Note:
'''
Represents a note in the notebook. Match against a string in searches and
store tags for each note.
'''
def __init__(self, memo, tags=''):
'''
Initialise a note with memo and optional space... | dpitic/python-3-object-oriented-programming | ch02/notebook/notebook.py | notebook.py | py | 2,741 | python | en | code | 1 | github-code | 22 | [
{
"api_name": "datetime.date.today",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 19,
"usage_type": "attribute"
}
] |
9375581234 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
class Bigbird():
def __init__(self, kwargs):
tokenizer = AutoTokenizer.from_pretrained("google/bigbird-roberta-base")
model = AutoModelForSequenceClassification.from_pretrained("google/bigbird-roberta-base")
self.k... | davidmrau/rankers | models/bigbird.py | bigbird.py | py | 650 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "transformers.AutoTokenizer.from_pretrained",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "transformers.AutoTokenizer",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "transformers.AutoModelForSequenceClassification.from_pretrained",
"line_n... |
32694295263 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 16 22:21:56 2019
@author: mark
"""
import urllib.request
from bs4 import BeautifulSoup
import pandas as pd
"""
Variables:
MAKE - the make of car
"""
MAKE = 'SUZUKI'
filter_values = ['Enhanced Search Image Link', 'Go to advert and open liv... | markbreen95/motor-data-scraping | scraping.py | scraping.py | py | 3,310 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 32,
"usage_type": "name"
},
{
"api_nam... |
37687516505 | """
Define CLI interface using argparse.
"""
import logging
from argparse import ArgumentParser
import imars_etl
from imars_etl.util.ConstMapAction import ConstMapAction
from imars_etl.drivers_metadata.get_metadata_driver_from_key \
import DRIVER_MAP_DICT as METADATA_DRIVER_KEYS
from imars_etl.util.config_logger ... | USF-IMARS/imars-etl | imars_etl/cli.py | cli.py | py | 10,231 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "logging.getLogger",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "imars_etl.__version__",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "imars_etl.util.config_logger.config_logger",
"line_number": 42,
"usage_type": "call"
},
... |
12676614647 | import os
from glob import glob
from glob import glob
import cv2
import numpy as np
class DataLoader:
def __init__(self):
self.n_batches = None
bald_folder = '/mnt/ssd2/Datasets/bald_for_GAN/'
self.hair_folder = '/mnt/ssd2/Datasets/hair_for_GAN/'
self.hair_mask_folder = '/mnt/ssd2... | david-svitov/baldgan | data_loader_alpha_sintes.py | data_loader_alpha_sintes.py | py | 2,964 | python | en | code | 21 | github-code | 22 | [
{
"api_name": "glob.glob",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "glob.glob",
"line_number": 17... |
39191403836 | # -*- coding: utf-8 -*-
from model.group import Group
import random
import pytest
# def test_edit_some_group(app, db, check_ui):
# if app.group.count() == 0:
# app.group.create(Group(name="gdfgsdgdfg", header="gsdsgfsgf", footer="footer"))
# old_groups = db.get_group_list()
# group = random.choice(... | ibrilliantov/python_training | test/test_edit_group.py | test_edit_group.py | py | 2,046 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "model.group.Group",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pytest.allure.step",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pytest.allure",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "pytest.allure... |
35695711208 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 28 20:40:58 2018
@author: zhong
"""
import tensorflow as tf
import tools
class myConfig(object):
"""RNN配置参数"""
# 模型参数
num_classes = 6 # 类别数
# timestep_size = 1 # 时序持续长度为120,即每做一次预测,需要输入120行
# input_size = 128 # 每个时... | lhzhong/TFCode | CNN-LSTM/cnn_lstm_model.py | cnn_lstm_model.py | py | 4,875 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "tensorflow.placeholder",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "tensorflow.float32",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.placeholder",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": ... |
7662398067 | from PyQt5.QtWidgets import QWidget, QListWidget,QGridLayout
from PyQt5.QtWidgets import QApplication
import System
from MyDatabase import DBModel
from ui import item_detail
class recommend_result(QWidget):
def __init__(self,table):
super().__init__()
self.db = DBModel()
self.table = tabl... | voyage1984/woodwhale | ui/recommend_pages/recomment_result.py | recomment_result.py | py | 2,418 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "MyDatabase.DBModel",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QListWidget",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": ... |
74992226936 | from kivy.uix.boxlayout import BoxLayout
from kivy.uix.video import Video
from kivy.uix.button import Button
from kivy.graphics import Color, RoundedRectangle
from kivy.uix.popup import Popup
from kivy.animation import Animation
from kivy.uix.label import Label
from kivy.app import App
from kivy.clock import Cl... | usamahassan965/projects | Kivy_app.py | Kivy_app.py | py | 8,885 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "kivy.core.window.Window.clearcolor",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "kivy.core.window.Window",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "kivy.uix.label.Label",
"line_number": 33,
"usage_type": "call"
},
{
... |
13204906525 | from django.conf.urls import url, include
from django.contrib.auth.views import login as login, logout as logout, logout_then_login as logout_login
from . import views
urlpatterns = [
url(r'^$', views.product_list, name='product_list'),
# url(r'^login/$', login, name='login'),
url(r'^login/$', views.user_... | sergssd/ser | shop/urls.py | urls.py | py | 633 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.c... |
72956242295 | #!/usr/bin/env python
# coding: utf-8
get_ipython().system('pip install -q git+https://github.com/tensorflow/examples.git')
# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For exampl... | aorursy/lost-nb | bineeshsps_plant-pathology-mobilenet-fine-tunning.py | bineeshsps_plant-pathology-mobilenet-fine-tunning.py | py | 10,822 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "tensorflow_datasets.disable_progress_bar",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "tensorflow.data",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.rcParams",
"line_number": 40,
"usage_type": "attribute"
},
{... |
7446700502 | import time, pickle, matplotlib.pyplot as plt
from sklearn.linear_model import Perceptron
from sklearn.linear_model import SGDClassifier
from sklearn.linear_model import PassiveAggressiveClassifier
from sklearn.externals import joblib
start_all = time.time()
def get_seconds(start):
end = time.time()
elapsed =... | dhasilva/pgc-comprec | 07-training.py | 07-training.py | py | 6,677 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "time.time",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.Perceptron",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_mod... |
23144488711 | import time
import urllib
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from contacts import Contact
from message import Message
contacts = Contact
message = Message
browser = webdriver.Chrome()
browser.get('https://web.whatsapp.com/')
while len(browser.find_elements_by_id("side")) <... | rodrigordgfs/WA-Sender | app.py | app.py | py | 1,071 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "contacts.Contact",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "message.Message",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "selenium.web... |
12029403338 | from fileinput import filename
from fastapi import APIRouter, HTTPException, Request, File, UploadFile, Depends
from loguru import logger
import pandas as pd
from models.health import HealthResponse
from models.invoice_file import FileOptions
from services.invoice_handler import InvoiceHandler as inv
router = APIRout... | rajaraman61/invoice-generator | src/api/routes/invoice_generator.py | invoice_generator.py | py | 1,094 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "models.invoice_file.FileOptions",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "fastapi.UploadFile",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "f... |
31316224603 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import re
import urllib
class HtmlParser(object): # 创建html解析类,实现对html的解析
def parse(self, new_url, html_cont):
if new_url is None or html_cont is None:
return
soup = BeautifulSoup(html_cont, "html.parser")
... | OhMyGod111/proxy_crawler | html_parser.py | html_parser.py | py | 1,763 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "urllib.parse.urljoin",
"l... |
42009552949 | from collections import OrderedDict
from TexSoup import TexSoup
from .LaTeX import newCommand,extractMath
from .utils import getValFromCell,checkFloat
from TexSoup import TexNode,TexEnv
from enum import IntEnum,auto,unique,IntFlag
from .formats import getFormatHandlers
import re
import os
import numpy as np
import json... | mveril/QUESTDB_website | tools/lib/data.py | data.py | py | 11,923 | python | en | code | 3 | github-code | 22 | [
{
"api_name": "re.match",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "enum.IntEnum",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "enum.auto",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "enum.auto",
"line_number": 41,
... |
74439062775 | from hare.transitions.provision import cancel_provision
from delt.messages.postman.provide.provide_transition import ProvideState
from hare.transitions.reservation import (
cancel_reservation,
crititcal_reservation_by_reference,
pause_reservation,
)
from facade.subscriptions.provision import MyProvisionsEve... | jhnnsrs/rekuest-server | snippets/hares/reserver copy.py | reserver copy.py | py | 20,313 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "logging.getLogger",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "facade.models.Reservation.objects.get",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "facade.models.Reservation.objects",
"line_number": 77,
"usage_type": "attribute"
... |
75287242295 | from pymongo import MongoClient #работа с pymongo
import pymongo
from pprint import pprint
from flask import jsonify
def writeDB(quotesData):
client = MongoClient("mongodb://user:zx655poiQ@ds123381.mlab.com:23381/appsy")
db = client.appsy #коннект к database (содержит коллекшены->документы)
quotes = db.quo... | zalhonan/ml | flask_apis/flasktest/writetodb.py | writetodb.py | py | 2,111 | python | ru | code | 0 | github-code | 22 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pymongo.DESCENDING",
"line_number": 10,
"usage_type": "attribute"
}
] |
26350390360 | import sqlite3
import csv
def practice_list_reader(file):
conn = sqlite3.connect("db\sberbot.db")
cursor = conn.cursor()
reader = csv.DictReader(file, delimiter=';')
lines_to_add = []
for line in reader:
name_list = line['ФИО стажера'].split()
last_name, first_name, middle... | rugratko/sberbot_helper | bot_db_loadFromFile.py | bot_db_loadFromFile.py | py | 2,406 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "sqlite3.connect",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "csv.DictReader",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "csv.DictReader",
"li... |
4557008355 | import requests
from dateutil.relativedelta import relativedelta
from datetime import date, datetime
class apiFIPE():
def getCodigoMarca(self, anoModelo, modeloCodigoExterno):
response = requests.post(
'https://veiculos.fipe.org.br/api/veiculos//ConsultarValorComTodosParametros',
... | rpsjr/apifipecons | src/apifipecons/__init__.py | __init__.py | py | 1,442 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "requests.post",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "datetime.date.today",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"l... |
23309759543 | import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score
Iris = pd.read_csv("Iris.csv")
X = Iris.drop(col... | mosigaaa/Prediction-Iris-species-dataset-on-KNN-prediction | KNN.py | KNN.py | py | 1,100 | python | en | code | 1 | github-code | 22 | [
{
"api_name": "pandas.read_csv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "seaborn.pairplot",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.show",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyp... |
1333218200 | #!/usr/bin/env python3
""" This is a Python program that uses the blessed library to launch a quiz that uses
multiple choice questions on the terminal"""
import json
import random
import interface
class Quiz:
""" Class that holds the game state and the io object,
which has the capabilities to print things t... | mairandomness/term_quiz | quiz.py | quiz.py | py | 5,323 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "interface.InputOutput",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 95,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"l... |
13950111754 | from collections import deque
class BinaryTreeNode:
def __init__(self, id):
self.id = id
self.parent = -1
self.sibling = -1
self.degree = 0
self.depth = 0
self.height = 0
self.type = "leaf"
self.children = []
class BinaryTree:
def __init__(self... | tuvsheezz/bug-free-lamp | 2.ALDS1/Topic7/2.ALDS1_7_B.py | 2.ALDS1_7_B.py | py | 2,191 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "collections.deque",
"line_number": 34,
"usage_type": "call"
}
] |
31460029114 | """#!/usr/bin/python3.10
from JokerAPI import JokerMethod, Number
# Joker Initiatior
JokerInstance = JokerMethod()
# Set API Key
JokerInstance.api_key = "mA91SG0XdS6ZUX2SEivdhD107AopdAfZ"
# Dial '+111111111' from '+111111111'.
sid: str | None = JokerInstance.dial(dial_to = Number("+19402773253"), dial_from = Number(... | Abdullah-hanini/hm_bot | app1.py | app1.py | py | 3,523 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "aiogram.Bot",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "aiogram.Dispatcher",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "aiogram.types.Message",
"line_number": 46,
"usage_type": "attribute"
},
{
"api_name": "aiogram.typ... |
74680907896 | import argparse
import asyncio
import os
import shutil
import sys
from datetime import datetime, timedelta
from pathlib import Path
from .core.storage import DiskStorage
class CliController:
def __init__(self, storage: DiskStorage) -> None:
self._storage = storage
async def process_args(self, args):... | enchant97/hasty-paste | paste_bin/cli.py | cli.py | py | 5,667 | python | en | code | 146 | github-code | 22 | [
{
"api_name": "core.storage.DiskStorage",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "shutil.rmtree",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcnow",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "datet... |
38808813206 | """
Created on Nov 11, 2014
@author: Mike Latham
"""
from inspect import getargspec
from scipy import pi
from chemex.parsing import parse_assignment
from chemex.experiments.base_data_point import BaseDataPoint
from chemex.constants import xi_ratio
from chemex.experiments.cpmg.co_ap.back_calculation import make_calc_... | marcuscangussu/chemex_bouvignies | chemex/experiments/cpmg/co_ap/data_point.py | data_point.py | py | 4,143 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "scipy.pi",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "chemex.constants.xi_ratio",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "chemex.experiments.base_data_point.BaseDataPoint",
"line_number": 38,
"usage_type": "name"
},
{
... |
71928428536 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
# https://www.kaggle.com/code/sadmanaraf/wheat-detection-using-faster-rcnn-train/notebook
import pandas as pd
import numpy as np
import cv2
import os
import re
import random
import albumentations as A
from albumentations.pytorch.transforms import ToTensorV2
import tor... | Shinekaze/faster-rcnn | test.py | test.py | py | 7,885 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "sys.path.append",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "utils.annotate_dataset",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "utils.create_ann... |
23763221056 | import copy
import os
import re
import math
import time
import logging
print('get logger: {}'.format('decompiler.'+__name__))
logger = logging.getLogger('decompiler.'+__name__)
# from e9patch_tools import all_inst_trace_2, all_inst_trace_1
import explain
# /* =========================================================... | monkbai/DNN-decompiler | se_engine.py | se_engine.py | py | 58,685 | python | en | code | 174 | github-code | 2 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 162,
"usage_type": "call"
},
{
"api_name": "time.asctime",
"line_number": 171,
"usage_type": "call"
},
{
"api_name": "time.localtime",
"l... |
17862536584 | import random
import sqlite3 as sl
def check_player(name):
con = sl.connect('data.db')
c = con.cursor()
c.execute("SELECT user.name FROM user WHERE user.name=?", [name])
found = c.fetchone()
con.commit()
con.close()
return bool(found)
# Kolommen kunnen wijzigen dus er wordt niet geïteree... | Auk-A/larpland | db.py | db.py | py | 3,032 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "sqlite3.connect",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
... |
24677178151 | import os
import sys
import math
import operator
import re
from collections import deque, defaultdict, namedtuple, Counter
from functools import total_ordering, reduce
from itertools import permutations, zip_longest, count
from os.path import exists
import bisect
import requests
import networkx as nx
import numpy as n... | spossner/adventofcode-2022 | 08.py | 08.py | py | 4,419 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "aoc.Rect",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "aoc.Point",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "aoc.DIRECT_ADJACENTS",
"lin... |
27157236917 | """Inference functionality for the metaphor & novelty project."""
import os
import logging
import argparse
import csv
import torch
from torch.utils.data import DataLoader, SequentialSampler
from data import CustomDataset
from evaluate import evaluate
from models import MetaphorModel
os.environ["HDF5_USE_FILE_LOCKIN... | vernadankers/metaphor_novelty | inference.py | inference.py | py | 1,784 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "os.environ",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "logging.basicConf... |
30683229771 | from django.test import TestCase, tag
from django.contrib.auth.models import User
from basket_app.models import Basket
from django.db import IntegrityError
from product_app.models import Product
class TestBasketModel(TestCase):
def setUp(self):
self.owner = User.objects.create(username='ac_dc',
... | AleksMD/Shop-API | shop_api/basket_app/tests_model.py | tests_model.py | py | 2,500 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "django.test.TestCase",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.contrib.auth.models.User.objects.create",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.User.objects",
"line_number": 11,
"usage_ty... |
16607691848 | import numpy as np
import tensorflow as tf
import math
import sys
import matplotlib.pyplot as plt
sys.path.append("..")
"""
def gd(eta):
x = 10
results = [x]
for i in range(10):
x -= eta * 2 * x # f(x) = x ** 2 导数
results.append(x)
print("epoch 10, x:", x)
return results
def sh... | Zhou-wy/DeepLearningWithTensorFlow | 9.OptimAlgori/GradGown.py | GradGown.py | py | 1,543 | python | en | code | 2 | github-code | 2 | [
{
"api_name": "sys.path.append",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot"... |
30363117226 | from django.shortcuts import render
from .models import Result
from .forms import result_form
from django.http import *
from django.contrib import messages
from django.db.models import Q
# Create your views here.
def resultform(request):
if request.method=='POST':
form = result_form(request.POST)
... | daderwalji/Django_College_Site | results/views.py | views.py | py | 1,019 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "forms.result_form",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "forms.result_form",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "models.Re... |
17468322376 | import re
import sys
import argparse
import math
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--test", action="store_true")
parser.add_argument("-r", "--repeat_test", action="store_true")
args = parser.parse_args()
if args.test:
raw = sys.stdin.read().strip()
with open('24-test.txt', 'w') as... | sColin16/AoC | 2020/24.py | 24.py | py | 3,015 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.stdin.read",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 12,
"usage_type": "attribute"
}
] |
20621900837 | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from mpl_toolkits.axes_grid1 import make_axes_locatable
from ..Tools.mode import mode
def SpectrogramPlotter(*args,**kwargs):
fig = kwargs.get('fig',None)
maps = kwargs.get('maps',[1,1,0,0])
scale = kwargs.get('scale',None)
zlog... | mattkjames7/wavespec | wavespec/Spectrogram/SpectrogramPlotter.py | SpectrogramPlotter.py | py | 2,311 | python | en | code | 3 | github-code | 2 | [
{
"api_name": "Tools.mode.mode",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.append",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "Tools.mode.mode",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.append",
"line... |
6889493791 | from .functions import *
import numpy as np
import matplotlib.pyplot as plt
import math
import csv
import sys
def extractFun(x_v, y_v, funID=0):
slope = slope_v(x_v, y_v)
slope_pre = slope[0:-1]
slope_post = slope[1:]
slope_change = np.multiply(slope_pre, slope_post)
frequency = len(np.where(slop... | RiverBuilder/RiverBuilder | riverbuilder/core/harmonicParser.py | harmonicParser.py | py | 2,372 | python | en | code | 13 | github-code | 2 | [
{
"api_name": "numpy.multiply",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.amin",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.amax",
"line_number":... |
73603201966 | """Configuration for running PETS halfcheetah experiments."""
import base_config
import jax
import jax.numpy as jnp
def get_config():
config = base_config.get_base_config()
config.task_horizon = 1000
config.hidden_sizes = (200, 200, 200, 200)
config.population_size = 350
config.activation = jax.nn... | ethanluoyc/magi | examples/pets/configs/halfcheetah.py | halfcheetah.py | py | 1,999 | python | en | code | 103 | github-code | 2 | [
{
"api_name": "base_config.get_base_config",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "jax.nn",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "jax.numpy.ndarray",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "jax.num... |
10335488704 | import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
driver = webdriver.Chrome()
driver.maximize_window()
driver.get("https://the-internet.herokuapp.com/javascript_alerts")
#les différents localisateurs:
#(//button)[1]
#//button[@o... | Riwa/Selenium-Python-Project | Jour7/GestionAlerte.py | GestionAlerte.py | py | 936 | python | fr | code | 0 | github-code | 2 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.XPATH",
"line_number": 15,
"usage_type": "attribute"
},
{
... |
30600036197 | import matplotlib.pyplot as plt
import numpy as np
def mri_plot(img, points, vcol=1, figsize=(9, 8)):
"""Graphs an points. pt_cols is used to set the cols to iterate
over (different views)
"""
ax = []
fig = plt.figure(figsize=figsize)
columns = 3
rows = 2
for i in range(points.shape[... | 3DLables/3DLabeler | ThreeDLabeler/plotting.py | plotting.py | py | 875 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "numpy.round",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyp... |
22555911216 | from ..models import SpUser, UserPricePayment, UserTemplateContent, PricePlan, PricePayment
from ..exceptions import UserNotFoundError
from datetime import datetime
from dateutil.relativedelta import relativedelta
class PaymentInfo(object):
"""
Representation of a payment record with plan information
"""
... | WorkEric/spweb | src/chatbot/controller/profile_handler.py | profile_handler.py | py | 4,631 | python | en | code | 3 | github-code | 2 | [
{
"api_name": "models.SpUser.objects.get",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "models.SpUser.objects",
"line_number": 46,
"usage_type": "attribute"
},
{
"api_name": "models.SpUser",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "mo... |
7234002271 | import requests
import logging
import csv
import datetime
import urllib.request
import time
from bs4 import BeautifulSoup
currencySign = "€"
rootUrl = 'https://www.transfermarkt.com'
queryKey = "plus/?saison_id="
currentSeason = 2019
firstPossibleSeason = 1888
def buildUrl(basePath, year):
return f"{basePath}{qu... | ggladko97/transfermarkt_parser | overview_parser.py | overview_parser.py | py | 3,722 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "csv.writer",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_numb... |
71049978926 | #
#
from typing import List
from collections import defaultdict
from collections import deque
from math import inf
import bisect
import heapq
'''
@File : 2146.py
@Time : 2022/01/27 14:21:41
@Author : YuMin Zhang
@State : Indepeedent | Half-Depedent | Depedent
@Thinking :
@Tag : Easy | Medium | Hard
'''
class Solution:... | elfisworking/PY_Leet | leetcode_python/2146.py | 2146.py | py | 1,463 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "typing.List",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "collections.deque",
"line_number": 19,
"usage_type": "call"
}
] |
33887686861 | import numpy as np
import torch
from torch.nn import functional as F
from ..constants import AMINO_ACID_INDICES, AMINO_ACIDS, START_TOKEN
class Tokenizer:
def __init__(
self,
max_seq_len: int,
one_hot=True,
prepend_start_token=False,
):
self.max_seq_len = max_seq_len
... | aryopg/vaxformer | src/dataset/tokenizer.py | tokenizer.py | py | 1,685 | python | en | code | 4 | github-code | 2 | [
{
"api_name": "constants.START_TOKEN",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "constants.AMINO_ACIDS",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "constants.AMINO_ACID_INDICES.items",
"line_number": 23,
"usage_type": "call"
},
{
"ap... |
13153037744 | import bookhelper
import bookhelper.session
from bookhelper.session import SessionFields, Session
import bookhelper.config
from bookhelper import *
import subprocess
import psutil
import json
import http.client as request
import time
import traceback
host = 'localhost'
def check_error(data):
if not data:
... | bstephgit/bookhelper | bookhelper/apiway.py | apiway.py | py | 9,352 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "json.loads",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "bookhelper.session.SessionFields.VALUE",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "bookhelper.session.SessionFields",
"line_number": 29,
"usage_type": "name"
},
... |
3708334844 | from appium import webdriver
from appium.webdriver.common.mobileby import MobileBy
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
import os
desired_caps = {
"deviceName": "Galaxy S20",
"platformName": "Android",
"platform... | Private1647/New-AndProv-python | android.py | android.py | py | 3,499 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "os.environ.get",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_... |
38686574344 | import numpy as np
#from nltk.wsd import lesk
import itertools
import multiprocessing as mp
from keras.layers.advanced_activations import LeakyReLU,ELU
from sklearn.preprocessing import OneHotEncoder
import pickle
from collections import Counter
from keras.preprocessing import sequence
from keras.models import Sequenti... | EMBEDDIA/srna | models.py | models.py | py | 20,481 | python | en | code | 0 | github-code | 22 | [
{
"api_name": "pickle.dump",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "pickle.HIGHEST_PROTOCOL",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "pickle.load",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "sklearn.model_se... |
19230579039 | from models import CityModel, db
from get_api_data import get_coords_yandex
from flask import abort
coords = {}
cities = []
def check_valid_data(city_name):
tmp_list = []
data_db = CityModel.query.all()
for city in data_db:
tmp_list.append(city.name_place)
if city_name in tmp_list:
re... | alexandrabondar/alchemyapi | prepare_data.py | prepare_data.py | py | 1,518 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "models.CityModel.query.all",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "models.CityModel.query",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "models.CityModel",
"line_number": 11,
"usage_type": "name"
},
{
"api_name"... |
74607681645 | import requests
import os.path
from whoosh.index import create_in
from whoosh.analysis import StemmingAnalyzer
from whoosh.fields import *
from pygbif import occurrences as occ
from pygbif import registry
from dwca.read import DwCAReader
from dwca.darwincore.utils import qualname as qn
def get_index(indexDir = 'i... | zedomel/tdwg-species-interaction | python/build-gbif-interaction-index.py | build-gbif-interaction-index.py | py | 4,420 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "whoosh.analysis.StemmingAnalyzer",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "whoosh.index.create_in",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pygbif.occurrences.search",
"line_number": 57,
"usage_type": "call"
},
{
... |
39750060347 | __author__ = "\n".join(["James Clough (james.clough91@gmail.com)"])
import networkx as nx
import numpy as np
import dagology as dag
__all__ = ['minkowski_embed']
def minkowski_embed(G, D, node_list=None):
""" Embed a DAG in Minkowski spacetime
We are using naive matrix methods currently but could upgrade i... | JamesClough/dagology | dagology/algorithms/embed.py | embed.py | py | 595 | python | en | code | 5 | github-code | 2 | [
{
"api_name": "networkx.adjacency_matrix",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "dagology.longest_path_matrix",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "dagology.naive_spacelike_matrix",
"line_number": 21,
"usage_type": "call"
},
{... |
26244509156 | #!/usr/bin/env python3
'''Exploiting data from http://www.football-data.co.uk/data.php'''
import datetime
import csv
import pandas as pd
import numpy as np
EARLIEST_DATE="01/01/00"
def today_str():
return datetime.date.today().strftime("%d/%m/%y")
def strptime_specific(str):
try:
return datetime.da... | katie-hofschen/DecisionMakingClass | assignment1/readcsv.py | readcsv.py | py | 4,743 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "datetime.date.today",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "dat... |
36537293906 | import sys #Skorzystamy, gdy wystąpi konieczność zakończenia gry na żądanie gracza.
import pygame #Zawiera funkcjonalność niezbędną do przygotowania gry.
from settings import Settings #Wszystkie ustawienia w jednym miejscu.
from ship import Ship
class AlienInvasion:
"""Ogólna klasa przeznaczona do zarządzania zas... | Jvlia17/Alien-Invasion | alien_invasion.py | alien_invasion.py | py | 3,419 | python | pl | code | 0 | github-code | 2 | [
{
"api_name": "pygame.init",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "settings.Settings",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pygame.display"... |
31677082518 | from flask_sqlalchemy import SQLAlchemy
from datetime import datetime
# Initialize an instance of SQLAlchemy
db = SQLAlchemy()
# Define the Course model representing a course in the database
class Course(db.Model):
__tablename__ = 'courses' # Name of the table in the database
id = db.Column(db.String, primar... | Castro19/ccc-sep-public | models.py | models.py | py | 5,087 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcnow",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime",
"line_number": 30,
"usage_type": "name"
}
] |
18199824749 | import numpy as np
from . import _semanticF as s
from sympy.utilities.iterables import multiset_permutations
def unit_vector(vec):
"""
Returns unit vector
"""
return vec / np.linalg.norm(vec)
def cos_sim(v1, v2):
"""
Returns cosine of the angle between two vectors
"""
v1_u = unit_vect... | PimpMyGit/DS_Utils | _weat.py | _weat.py | py | 9,916 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "numpy.linalg.norm",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "numpy.clip",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.tensordot",
"l... |
72673303725 | import logging
import os
import azure.functions as func
from azure.iot.hub import IoTHubRegistryManager
def main(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Lights trigger received message:' + str(req.get_body()))
valueDel = "</at>"
registry_manager = IoTHubRegistryManager(os.e... | jasallen/iothub_lights | AzureFunction/ChangeLightsHTTP/__init__.py | __init__.py | py | 1,864 | python | en | code | 2 | github-code | 2 | [
{
"api_name": "azure.functions.HttpRequest",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "azure.functions",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "logging.info",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "azure.iot.... |
72907735087 | from django.urls import path
from . import views
from django.contrib.auth import views as auth_views
from .views import *
urlpatterns = [
path('', views.landingpage, name='landingpage'),
path('gallery/', views.gallery, name="gallery"),
path('feeds/', views.follow_gallery, name='follow-gallery'),
path('video... | calebjusth/Django-Social-Media-Web-app | youthtok/urls.py | urls.py | py | 1,869 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "views.landingpage",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.gallery",... |
14515148831 | from datetime import datetime
from definition_tooling.converter import CamelCaseModel, DataProductDefinition
from pydantic import Field
class ForwardersCargoReceiptResponse(CamelCaseModel):
carrier_name: str = Field(..., title="Carrier name")
exporter_name: str = Field(..., title="Exporter name")
final_d... | ioxio-dataspace/sandbox-definitions | src/test/Shipment/ForwardersCargoReceipt.py | ForwardersCargoReceipt.py | py | 1,857 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "definition_tooling.converter.CamelCaseModel",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "pydantic.Field",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pydantic.Field",
"line_number": 9,
"usage_type": "call"
},
{
"api_name":... |
2609620575 | #!/usr/bin/python
# makeStatic.py: make a running install of transit data dashboard static
from os import system, chdir, mkdir
import json
host = 'localhost:9000'
# This gets all the static files
system('wget -r http://' + host)
chdir(host + '/api/ntdagencies')
system('wget http://' + host + '/api/ntdagencies/agenc... | conveyal/transit-data-dashboard | utils/makeStatic.py | makeStatic.py | py | 541 | python | en | code | 19 | github-code | 2 | [
{
"api_name": "os.system",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 16,
"... |
26577773435 | from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import OneHotEncoder, StandardScaler
import pandas as pd
import numpy as np
def read_data(file_name):
df = pd.read_csv(file_name)
# drop currency, ver columns
del df['currency']
del df['ver']
return df
def extract_XY(df, targ... | MahmoudAshraf123/Predict-Mobile-App-Success | Preprocessing.py | Preprocessing.py | py | 1,813 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sklearn.compose.ColumnTransformer",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.OneHotEncoder",
"line_number": 21,
"usage_type": "call"
},
{
... |
10707268397 | import torch
import torch.nn as nn
import torch.nn.functional as F
class Discriminator(nn.Module):
def __init__(self, GANType, numClasses=10):
super(Discriminator, self).__init__()
self.GANType = GANType
if self.GANType == "CGAN":
self.conv1 = nn.Conv2d(1, 32, 4, 2, 1, bias=Fa... | andgitisaac/MNIST_GAN | networks/discriminator.py | discriminator.py | py | 1,526 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "torch.nn.Module",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
7873901978 | import keras #For loading model
import matplotlib.pyplot as plt #for plotting
import matplotlib.dates as mdates
import pandas as pd
import numpy as np
import time
import pdb #for debugging, and exiting to interactive shell
from os import mkdir, path
##Parameters
input_... | shmeevn/Solar_Power_Prediction_S22-10-DASH | Fall/HTML with Keras/website.py | website.py | py | 5,393 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "pandas.read_csv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "keras.models.load_model",
... |
73104530287 | import matplotlib.pyplot as plt
import os
import numpy as np
import torch
import argparse
import sys
import random
import cv2
import pandas as pd
from models.downsampler import Downsampler
from models.network_unet import UNetRes as net
from utils import sr_utils2
from utils import common_utils
from utils import... | rita442/PnP-ReG | SR_regularizer.py | SR_regularizer.py | py | 9,763 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "torch.cuda.is_available",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "torch.cuda.manual_seed_all",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "to... |
769318946 | import discord
from discord.ext import commands
from core.classes import Cog_Extension
import json
import random
with open('setting.json','r', encoding='utf8') as jfile:
jdata = json.load(jfile)
with open('eat.json','r', encoding='utf8') as efile:
edata = json.load(efile)
class React(Cog_Extension):
def... | eswork54/CuteAimi_Bot | cmds/react.py | react.py | py | 1,186 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "json.load",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "core.classes.Cog_Extension",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "random.shuffle",
"l... |
4794040371 | from flask_login import current_user
from flask_restful import Resource, reqparse, fields, marshal_with
from flask_security import auth_required
from werkzeug.exceptions import (
NotFound, Conflict, BadRequest)
from ..models.task import Task as task_model, db
from sqlalchemy.exc import IntegrityError
from fl... | narendraiitm/task_api | application/resources/task.py | task.py | py | 4,960 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "flask_restful.reqparse.RequestParser",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask_restful.reqparse",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "flask_restful.fields.Integer",
"line_number": 16,
"usage_type": "attribute"
... |
15321398494 | # data-read-memory
# -data-evaluate-expression
# parse_and_eval
import subprocess
import argparse
from pygdbmi.gdbcontroller import GdbController
import tempfile
import pprint
COMMAND_TIMEOUT_SEC = 0.1
def main():
"""
Main function
"""
args = parse_args()
compile_code(args.files)
debug_cod... | csesoc/structs-prototypes | pygdbmi/ll_iterator/scrap/list_iterator.py | list_iterator.py | py | 5,083 | python | en | code | 6 | github-code | 2 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "pygdbmi.gdbcontroller.GdbController",
"line_number": 49,
"usage_type": "call"
},
{
"api_na... |
21401941569 | import cv2
import module_image as image
import matplotlib.pyplot as plt
count = 0
couple = [0] * 2
cap = cv2.VideoCapture(0, cv2.CAP_DSHOW)
# Параметры сжатия m,n
m = 20
n = 20
# параметр кол-ва кадров в усреднении len_static_set, и массив кадров для усреднения static_set + средний кадр
len_static = 40
static_set = ... | maryprot/Telegram-bot | MotionTest.py | MotionTest.py | py | 5,437 | python | ru | code | 0 | github-code | 2 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_DSHOW",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "module_image.rgb",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "module_image.delta... |
72758907887 | import torch
from torch import nn
from torch.autograd import Variable
import torch.nn.functional as F
class Attn(nn.Module):
def __init__(self, method, hidden_size, cuda=True):
super(Attn, self).__init__()
self.method = method
self.hidden_size = hidden_size
self.cuda = cuda
... | shulmaneyal/semi-supervised-semantic-parsing | parser/decoder.py | decoder.py | py | 3,210 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "torch.nn.Module",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
19905497437 | # Takes HDF5 data files, extracts order set usage, and formats the data's response variable to be whether each order set was used 1 day after a given item
import pandas as pd
import numpy as np
import os
import gc
import sys, getopt
import multiprocessing
def make_order_set_data(f):
data_s = pd.read_hdf(data_dir + "... | HealthRex/CDSS | scripts/Archive/ClinicNet/data_processing/make_order_set_responses.py | make_order_set_responses.py | py | 6,186 | python | en | code | 84 | github-code | 2 | [
{
"api_name": "pandas.read_hdf",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.read_hdf",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "gc.collect",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "getopt.getopt",
"line_... |
15390749389 | #!/usr/bin/env python3
"""Tests of the mlflow image using API calls."""
import os
import time
import random as rnd
import importlib
import requests
from requests.exceptions import ConnectionError
import docker
import pytest
PORT = 5001 # MLFlow port
HOST = "0.0.0.0"
TIMEOUT_CALL = 5 # the timeout in seconds of the ... | ScilifelabDataCentre/serve-images | serve-mlflow/tests/test_server.py | test_server.py | py | 3,554 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "docker.from_env",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "time.sleep",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_n... |
72280114608 | #!/usr/bin/python3
import requests
import os
import json
import datetime
import math
import time
import conf
class GithubSearch:
"""Class to search Github's API for a given keyword(s)."""
def __init__(self, query, username, password, directory, proxy):
"""Initialize class and set variables."""
... | stlewandowski/GitMAD | github_search.py | github_search.py | py | 2,746 | python | en | code | 104 | github-code | 2 | [
{
"api_name": "conf.Configure",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number... |
74531351405 | import pandas as pd
from prophet import Prophet
from taipy import Config
def clean_data(initial_dataset: pd.DataFrame):
print("Cleaning Data")
initial_dataset = initial_dataset.rename(columns={"Date": "ds", "Close": "y"})
initial_dataset['ds'] = pd.to_datetime(initial_dataset['ds']).dt.tz_localize(None)
... | cornelliusyudhawijaya/Taipy_Project | create_mod_core.py | create_mod_core.py | py | 3,667 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "pandas.DataFrame",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "pandas.to_datetime",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "prophet.... |
40843949025 | from setuptools import setup, find_packages
desc = """Bisect on changesets and call remote builder for Mozilla Firefox / moz-central repository"""
summ = """Interactive regression finder on moz-central for Firefox"""
setup(name="mozremotebuilder",
version="0.1.2",
description=desc,
long_description=... | retornam/mozremotebuilder | setup.py | setup.py | py | 1,235 | python | en | code | 1 | github-code | 2 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 14,
"usage_type": "call"
}
] |
26013258105 | """Utilities for using Tensorflow models.
"""
import numpy as np
import tensorflow as tf
import grpc
from tensorflow_serving.apis import predict_pb2, prediction_service_pb2_grpc
class TFServingPredictor(object):
"""An agent that makes request to a TF serving server to get object detection results.
This agent... | cmusatyalab/OpenWorkflow | gabrieltool/statemachine/callable_zoo/processor_zoo/tfutils.py | tfutils.py | py | 3,871 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "grpc.insecure_channel",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "tensorflow_serving.apis.prediction_service_pb2_grpc.PredictionServiceStub",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "tensorflow_serving.apis.prediction_service_pb2_gr... |
40490523285 | from flask_app import app
from flask_bcrypt import Bcrypt
bcrypt = Bcrypt(app) # Set bcrypt function as a variable and invoke the function
from flask import render_template, redirect, request, session
from flask_app.models import user, recipe
# Route to display add a new recipe page
@app.route("/recipes/new")
def di... | katoltmans/Python_Stack | Flask_mySQL/Belt Review/Recipes/flask_app/controllers/recipes.py | recipes.py | py | 3,054 | python | en | code | 0 | github-code | 2 | [
{
"api_name": "flask_bcrypt.Bcrypt",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "flask_app.app",
"line_number": 3,
"usage_type": "argument"
},
{
"api_name": "flask.session",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "flask.redirect",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.