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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2080694356 | import WMD.calWMD as WMD
import calculatePrecision
import os
import utils
rqPredictPath = utils.RelevancePath
WMDPath = utils.rootPath + r'\WMD.txt'
def getWMDPrecision(topK=5):
high_precision = 0.0
mid_precision = 0.0
low_precision = 0.0
sum_NDCG = 0.0
count = 0
for file in os.listdir(rqPr... | Ylizin/RWSim | ylSim/WMDResult.py | WMDResult.py | py | 2,324 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "utils.RelevancePath",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "utils.rootPath",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path.join",
... |
11591654822 | import logging
import sys
import time
from contextlib import contextmanager
from loguru import logger
@contextmanager
def log(desc):
logger.info(f"Function running: {desc}")
start = time.time()
try:
yield
except Exception as e:
logger.exception(f"Error encountered on: {desc}", e)
... | NicoLivesey/zemmourify | zemmourify/logs.py | logs.py | py | 2,135 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "loguru.logger.info",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "loguru.logger",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "time.time",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "loguru.logger.exception",
... |
28985800071 | import click
from aoc_2022_kws.cli import main
from aoc_2022_kws.config import config
from aocd import submit
snafu_chars = "=-012"
def snafu_val(value: str):
return snafu_chars.index(value) - 2
def snafu_to_base10(value: str):
return sum([snafu_val(c) * 5**i for i, c in enumerate(value[::-1])])
rsnafu_c... | SocialFinanceDigitalLabs/AdventOfCode | solutions/2022/kws/aoc_2022_kws/day_25.py | day_25.py | py | 1,557 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "aoc_2022_kws.config.config.SAMPLE_DIR",
"line_number": 62,
"usage_type": "attribute"
},
{
"api_name": "aoc_2022_kws.config.config",
"line_number": 62,
"usage_type": "name"
},
{
"api_name": "aoc_2022_kws.config.config.USER_DIR",
"line_number": 64,
"usage_typ... |
25628618035 | import matplotlib.pyplot as plt
def diagram(data, epsilon, beta):
plt.figure()
plt.fill_between(data.index, data - epsilon, data + epsilon, alpha = 0.3)
plt.plot(data.index, data, linewidth=0.5)
if beta is not None:
plt.plot([0, 199],[beta, beta], color = "r", linestyle = "--", linewidth = 0.5)... | tronyaginaa/math_statistics | lab4/diagram.py | diagram.py | py | 378 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.fill_between",
"line_number": 5,
"usage_type": "call"
},
{
"api_name":... |
14438215512 | import psycopg2
read_sql = "SELECT num, data FROM test"
conn = None
try:
# connect to the PostgreSQL database
conn = psycopg2.connect(
dbname='spacedys',
host='localhost',
user='spacedys',
password='password')
# create a new cursor
cur = conn.cursor()
# execute the S... | nicolacammillini/spacedys | docs/demos/db/read-pg.py | read-pg.py | py | 693 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "psycopg2.connect",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "psycopg2.DatabaseError",
"line_number": 26,
"usage_type": "attribute"
}
] |
8473942040 | #!/usr/bin/env python
# https://gist.github.com/tigercosmos/a5af5359b81b99669ef59e82839aed60
##
##
##
# coding: utf-8
import numpy as np
import cv2
import os
import math
from cyvlfeat.kmeans import kmeans
from scipy import ndimage
from scipy.spatial import distance
from tqdm import tqdm
import pickle
from cyvlfeat.k... | babywyrm/sysadmin | vectorize/sift_wordbag_svm_.py | sift_wordbag_svm_.py | py | 4,666 | python | en | code | 10 | github-code | 36 | [
{
"api_name": "os.listdir",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 41,
... |
21628424114 | """backend URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | AI4Bharat/Chitralekha-Backend | backend/backend/urls.py | urls.py | py | 2,939 | python | en | code | 18 | github-code | 36 | [
{
"api_name": "drf_yasg.generators.OpenAPISchemaGenerator",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "drf_yasg.generators.OpenAPISchemaGenerator",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 3... |
74979913065 | from django.urls import path, re_path
from . import views
urlpatterns= [
path("<int:id>", views.index, name="index"),
path("", views.home, name="home"),
path("upload/", views.upload, name="upload"),
re_path(
r'^delete-image/(?P<id>\d+)/(?P<loc>[a-zA-Z]+)/$',
views.delete_image,
... | kevqyzhu/imagerepo | main/urls.py | urls.py | py | 396 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.re_path",... |
35414698228 | from app.server_process import ServerProcess
from flask import Flask, request
import os
app = Flask(__name__)
def main():
port = int(os.environ.get("PORT", 5000))
app.run(host="0.0.0.0", port=port)
@app.route("/", methods=["POST"])
def process_move():
request_data = request.get_json()
return Serve... | bmraubo/TicTacToe | server.py | server.py | py | 398 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "app.server_process",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_nu... |
26376483834 | #!/usr/bin/env python
# coding: utf-8
# In[22]:
# Question 1 d)
# Author: Ilyas Sharif
# Importing required packages
import numpy as np
from scipy.interpolate import RegularGridInterpolator
import matplotlib.pyplot as plt
from random import random
from matplotlib import cm
# Loading in the land data
loaded = np.lo... | SpencerKi/Computational-Methods | Monte Carlo Methods/Lab10_Q1.py | Lab10_Q1.py | py | 2,147 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.load",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "numpy.pi",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "numpy.arccos",
"line_numbe... |
74049983784 | import math
import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
from torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence
import torch.nn.functional as F
from parlai.utils.torch import neginf
from parlai.core.torch_generator_agent import TorchGeneratorModel
def _transpose_hidd... | facebookresearch/ParlAI | parlai/agents/seq2seq/modules.py | modules.py | py | 24,551 | python | en | code | 10,365 | github-code | 36 | [
{
"api_name": "torch.is_tensor",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "parlai.core.torch_generator_agent.TorchGeneratorModel",
"line_number": 52,
"usage_type": "name"
},
{
"api_name": "torch.nn.RNN",
"line_number": 57,
"usage_type": "attribute"
},
... |
74065450024 | import discord
from discord.ext import commands
import os
import errno
import datetime as dt
import time
import sys
import traceback
BOT_CHANNELS = [803372255777914911, 803375064816287814, 803380541230940161]
class Events(commands.Cog):
def __init__(self, client):
self.client = client
@commands.Cog... | Abearican/Discord-Bot | cogs/events.py | events.py | py | 2,859 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "os.getenv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "discord.... |
13624054640 | import io
import os
import sys
from setuptools import setup
if sys.version_info < (3, 6):
sys.exit("Sorry, Python < 3.6.0 is not supported")
DESCRIPTION = "Simple Logger for MPI"
here = os.path.abspath(os.path.dirname(__file__))
try:
with io.open(os.path.join(here, "README.md"), encoding="utf-8") as f:
... | serihiro/mpi_logger | setup.py | setup.py | py | 886 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sys.version_info",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numb... |
22489393422 | import pymongo
from pymongo import MongoClient, TEXT
import json
def inputJsonName():
'''
Prompts the user for a Json File name
Return: Json File Input (Str)
'''
jsonName = input("Input the json file name you would like to insert. \n")
return jsonName
def inputPortNum():
'''
... | JFong5/Mini-Project2 | load-json.py | load-json.py | py | 2,393 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "pymongo.TEXT",
"line_number": 60,
"usage_type": "name"
}
] |
8615782978 | # reference code example from: https://github.com/martin-gorner/tensorflow-mnist-tutorial
from matplotlib import pyplot as plt
from matplotlib.animation import FuncAnimation
import matplotlib.animation as animation
import numpy as np
import datetime
class Visualization:
port = None
ispause = False
am = None
... | adminho/trading-stock-thailand | deep_q/animation.py | animation.py | py | 3,682 | python | en | code | 64 | github-code | 36 | [
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.gcf",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "ma... |
35535613818 | import os
import pickle
import pandas as pd
from flask import Flask, request
from flasgger import Swagger
app = Flask(__name__)
Swagger(app)
current_path = os.path.dirname(os.path.realpath(__file__))
pickle_in = open(f"{current_path}/model.pkl", "rb")
rf = pickle.load(pickle_in)
@app.route("/")
def index() -> str:... | calkikhunt/bank_note_authentication | app.py | app.py | py | 1,724 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flasgger.Swagger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
1437566397 | from collections import OrderedDict
# create dummy _ fct (so that gettext can parse dict)
# language options
langOption = OrderedDict(en="English", fr="Français", de="Deutsch")
# summary
summary_info = {'en': ['filename', '# users', 'file size'], 'fr': ['nom de fichier', 'nb utilisateurs', 'taille du fichier'], 'de'... | thilaire/PLADIF | pladif/naming.py | naming.py | py | 5,236 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "collections.OrderedDict",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 50,
"usage_type": "call"
}
] |
11469135915 | """
sample hyperparameters
sample maximum values by gumble, random features
all in python
optimization the criterion
1 hyperparameter
feed: Xsamples, ysamples, l, sigma, sigma0, initialxs
multiple hyperparameters
feed: Xsamples, ysamples, ls, sigmas, sigma0s, initialxs
return
train... | ZhaoxuanWu/Trusted-Maximizers-Entropy-Search-BO | optfunc.py | optfunc.py | py | 25,020 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "tensorflow.float32",
"line_number": 61,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.shape",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "tensorflow.tile",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "tensorflow.e... |
26707445232 | from sqlalchemy import (
Boolean,
Column,
ForeignKey,
Integer,
String,
Date,
DateTime,
UniqueConstraint,
)
from sqlalchemy.orm import relationship, backref
from sqlalchemy.sql import func
from app.db.base_class import Base
class Saving(Base):
id = Column(Integer, primary_key=True,... | boswellgathu/chama | backend/app/models/saving.py | saving.py | py | 1,033 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "app.db.base_class.Base",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer",
"line_number": 18,
"usage_type": "argument"
},
{
"api_name": "sqlal... |
22565786888 | import itertools
import json
import zipfile
from typing import BinaryIO, List, Tuple
import numpy as np
from PIL import Image
from shap_e.rendering.view_data import Camera, ProjectiveCamera, ViewData
class BlenderViewData(ViewData):
"""
Interact with a dataset zipfile exported by view_data.py.
"""
... | openai/shap-e | shap_e/rendering/blender/view_data.py | view_data.py | py | 3,109 | python | en | code | 10,619 | github-code | 36 | [
{
"api_name": "shap_e.rendering.view_data.ViewData",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "typing.BinaryIO",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "zipfile.ZipFile",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "j... |
38027952617 | from typing import Dict, List
from twin_runtime.twin_runtime_core import TwinRuntime
from twin_runtime.twin_runtime_core import LogLevel
class TwinBuilderSimulator():
def __init__(self, twin_model_file, state_variable_names: List,
action_variable_names: List,
number_of_warm_up_st... | microsoft/bonsai-twin-builder | TwinBuilderConnector/TwinBuilderSimulator.py | TwinBuilderSimulator.py | py | 3,207 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "typing.List",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "twin_runtime.twin_runtime_core.TwinR... |
22246405784 | import common.parse_util as cpu
from common.common_based import CommonBased
class AdaType(CommonBased):
RECORD_TYPE = "Record"
ENUM_TYPE = "Enum"
STR_TYPE = "String"
ARRAY_TYPE = "Array"
DERIVED_TYPE = "Derived"
SUBTYPE = "Subtype"
INT_TYPE = "Integer"
REAL_TYPE = "Real"
FIELD_TYP... | idealegg/AdaReader | common/ada_type.py | ada_type.py | py | 4,011 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "common.common_based.CommonBased",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "common.parse_util.solve_type",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "common.parse_util",
"line_number": 60,
"usage_type": "name"
},
{
"api... |
126083869 | from django.db import models
from django.contrib.auth.models import User
import json
import re
class FileType(models.Model):
name = models.CharField(max_length=64, primary_key=True)
def update_dict(base, changes):
for k, v in changes.items():
base[k] = v
if v is None:
del base[k]... | bromberglab/bio-node-webserver | django/app/models/node_image.py | node_image.py | py | 7,864 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "django.db.models.Model",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "... |
30835468279 | from youtube_dl import YoutubeDL
import sys
ydl_opts = {'format': 'bestaudio/best',
'postprocessors': [{'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}]}
if __name__ == "__main__":
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
filenames = sys.argvp[1:]
ydl.download... | jordankraude/Personal-Projects | Youtube Downloaders/youtube_to_mp3.py | youtube_to_mp3.py | py | 332 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "youtube_dl.YoutubeDL",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.argvp",
"line_number": 12,
"usage_type": "attribute"
}
] |
7659689792 | # Importing the OpenCV library.
import cv2
# Importing the numpy library.
import numpy as np
# Reading the image from the path and storing it in the variable img.
img = cv2.imread("../Resources/konferansebord.jpg")
# Setting the width and height of the output image.
width, height = 250, 350
# Creating a list of poi... | GurjotSinghAulakh/Python-openCV | 5. Wrap Perspective/chapter5.py | chapter5.py | py | 930 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "cv2.imread",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "cv2.getPerspectiveTransform",
... |
14994784583 | from django.urls import path
from . import views
from django.conf import settings
from django.contrib.staticfiles.urls import static
urlpatterns = [
path('',views.inicio, name='inicio'),
path('nosotros_copy',views.nosotros_copy, name='nosotros_copy'),
path('nosotros',views.nosotros, name='nosotros'),
p... | LsuiValle/Proyecto | sub_proyecto/urls.py | urls.py | py | 1,335 | python | es | code | 0 | github-code | 36 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"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",
... |
18830355953 | """File Type Utility Class."""
import logging
from pathlib import Path
from hdash.synapse.file_type import FileType
class FileTypeUtil:
"""File Type Utility Class."""
LEGACY_META_FILE_NAME = "synapse_storage_manifest.csv"
META_FILE_PREFIX = "synapse_storage_manifest_"
def __init__(self):
"""... | ncihtan/hdash_air | hdash/synapse/file_type_util.py | file_type_util.py | py | 2,700 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pathlib.Path",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "hdash.synapse.file_type.FileType.OTHER",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "hdash.synapse.file_type.FileType",
"line_number": 20,
"usage_type": "name"
},
... |
6270944947 | import os
import logging
import numpy as np
import pandas as pd
from sklearn.neighbors import KNeighborsClassifier
from .helpers import ROOT_DIR, DATA_DIR, RESULTS_DIR
from .helpers import GENRES, SUBSETS
from .helpers import start_experiment_log
from .helpers import relpath
from .classification import train_model
fro... | bacor/ISMIR2020 | src/profile_experiment.py | profile_experiment.py | py | 7,149 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "numpy.random.seed",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "helpers.SUBSETS",
"line_number": 53,
"usage_type": "name"
},
{
"api_name": "helpers.GENRES",
... |
40857313291 | #!/usr/bin/env python
from __future__ import division, print_function
import argparse
import glob
from array import array
import numpy as np
import scipy as sp
import fitsio
from picca import constants
from picca.data import delta
from picca.Pk1D import (compute_cor_reso, compute_Pk_noise, compute_Pk_raw,
... | vserret/picca | bin/picca_Pk1D.py | picca_Pk1D.py | py | 13,158 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "array.array",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "array.array",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "array.array",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "array.array",
"line_number": ... |
13963392850 | #!/usr/bin/python3
import cv2
import numpy as np
import imutils
import argparse
ap = argparse.ArgumentParser()
ap.add_argument("-v", "--video", help="path to the video file", default="video.mp4")
ap.add_argument("-t", "--template", help="template png file with the wanted output dimensions")
ap.add_argument("-o", "--o... | rickerp/video-page-scanner | main.py | main.py | py | 3,233 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "imutils.resize",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY... |
36085086671 | import numpy as np
import time
from pipython import GCSDevice, pitools
from core.module import Base, Connector
from core.configoption import ConfigOption
from interface.confocal_scanner_interface import ConfocalScannerInterface
class ConfocalScannerPI_E727(Base, ConfocalScannerInterface):
""" Confocal scanner fo... | chrberrig/qudi_from_lab | hardware/confocal_scanner_PI_E-727.py | confocal_scanner_PI_E-727.py | py | 12,609 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "core.module.Base",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "interface.confocal_scanner_interface.ConfocalScannerInterface",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "core.module.Connector",
"line_number": 18,
"usage_type": "ca... |
243273712 | import json
from flask import Flask, render_template, \
request, redirect, flash, \
url_for
def _initialize_clubs():
data = {'clubs': []}
with open('clubs.json' , 'w') as club_file:
json.dump(data, club_file, indent=4)
return []
def loadClubs():
with open(... | Arz4cordes/Projet11_OC | Python_Testing-master/server.py | server.py | py | 5,876 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "json.dump",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 36,
... |
36815278942 | from ckeditor_uploader.fields import RichTextUploadingField
from django.core.exceptions import ValidationError
from django.db import models
# Create your models here.
from django.utils.safestring import mark_safe
from extensions.utils import jalali_converter
class Setting(models.Model):
STATUS = (
('Tru... | amirmovafagh/ecommerce-project-django | home/models.py | models.py | py | 8,228 | python | fa | code | 0 | github-code | 36 | [
{
"api_name": "django.db.models.Model",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 16,
"usage_type": "call"
},
{
"api_name"... |
15733676375 | __author__ = "evas"
__docformat__ = "reStructuredText"
import logging
import numpy as np
# http://stackoverflow.com/questions/12459811/how-to-embed-matplotib-in-pyqt-for-dummies
# see also: http://matplotlib.org/users/navigation_toolbar.html
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureC... | ssec/sift | uwsift/view/probes.py | probes.py | py | 34,849 | python | en | code | 45 | github-code | 36 | [
{
"api_name": "matplotlib.backends.qt_editor.figureoptions",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "matplotlib.backends.backend_qt5agg.NavigationToolbar2QT",
"line_number": 32,
... |
19499646717 | # -*- coding: utf-8 -*-
import sys
from PyQt4 import QtCore, QtGui, uic
from PyQt4.QtGui import QApplication, QMainWindow, QWidget, QPushButton, QDialog, QMessageBox, QTableWidgetItem, QListWidgetItem
from PyQt4.QtCore import QString, QSettings
from config import user, password, host, db_name
import pymysql... | den4ik-kovalev/phone_book | phone_book/app.py | app.py | py | 21,771 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "PyQt4.QtGui.QApplication",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "PyQt4.QtGui",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "PyQt4.QtGui.QApplication.translate",
"line_number": 16,
"usage_type": "call"
},
{
"api_... |
21672257496 | import os
from pathlib import Path
import secrets
import uuid
from PIL import Image
from flask import Flask, render_template, redirect, url_for, flash, request,send_file,send_from_directory
from flask_bootstrap import Bootstrap
from flask_wtf import FlaskForm
from flask_wtf.file import FileAllowed,FileField
from wtform... | johnny1304/Team9 | app.py | app.py | py | 123,592 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "flask_bootstrap.Bootstrap",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "flask_login.LoginManager",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "flask_... |
34647062894 | import os
import socket
import threading
import time
import tkinter as tk
import tkinter.messagebox
from io import BytesIO
import customtkinter
import pafy
import pyperclip
import vlc
from PIL import ImageTk, Image
from pyngrok import ngrok
from pytube import Playlist
from pytube import YouTube
from requests import ge... | Salodo/Sallify.py | Sallify.py | Sallify.py | py | 15,965 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "customtkinter.set_appearance_mode",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "customtkinter.set_default_color_theme",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 29,
"usage_type": "call"
},
... |
8030433043 | import base64
import io
import os
from PIL import Image, ImageDraw, ImageFont
import requests
class WelcomeCard:
BASE_FONT = ImageFont.truetype(
os.path.abspath("ether/assets/fonts/Inter-Medium.ttf"), 16
)
WELCOME_FONT = ImageFont.truetype(
os.path.abspath("ether/assets/fonts/Inter-Bold.t... | Ether-DiscordBot/Ether-Bot | ether/cogs/event/welcomecard.py | welcomecard.py | py | 1,467 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "PIL.ImageFont.truetype",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PIL.ImageFont",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "os.path.abspath",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"l... |
7293405146 | import requests
import urllib.parse as urlparse
import json,sys
from pprint import pprint
isErrorbased = ['"', "'", '--']
isJson = []
CYELL = '\033[1;93m'
CENDYELL = '\033[0m'
CGRE = '\033[1;92m'
CYAN = '\033[1;36m'
RED = '\033[1;31m'
class SimpleSqlCheck():
def __init__(self, isUrl, isLocation):
se... | wahyuhadi/AutoSecurity-Check | Controllers/SqlInjection/sql.py | sql.py | py | 3,251 | python | en | code | 7 | github-code | 1 | [
{
"api_name": "sys.exit",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 53,
... |
73574411873 | from django.shortcuts import render,get_object_or_404
from django.http import HttpResponse
# Create your views here.
from .serializer import CustomerSerializer, ProductSerializer, SubscriptionSerializer
from .models import Customer, Product, Subscription
from rest_framework import status
from rest_framework.decorators ... | Shulabh-968026/myproject | myapp/views.py | views.py | py | 3,349 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "models.Subscription.objects.all",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "models.Subscription.objects",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "models.Subscription",
"line_number": 17,
"usage_type": "name"
},
{
... |
28154078176 | import os, os.path
import string
import cherrypy
import datetime
import requests
import lxml
import cssselect
import lxml.html
import json
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
#from email.MIMEBase import MIMEBase
from pprint import pprint
class Data(objec... | rudy-stephane/callfortender | webpython.py | webpython.py | py | 31,309 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "datetime.datetime.now",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 356,
"usage_type": "call"
},
{
"api_name": "lxml.html.... |
1287821530 | from matplotlib import pyplot as plt
def plot_forest_management(gamma_values, iterations, time_array, rewards, title):
plt.plot(gamma_values, rewards)
plt.ylabel('Rewards')
plt.xlabel('Discount')
plt.title('{} - Reward vs Discount'.format(title))
plt.grid()
plt.show()
plt.plot(gamma_value... | mishabuch/Assignment-4 | forest_plots.py | forest_plots.py | py | 694 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.ylabel",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplo... |
36938950956 | import os
import zipfile
from conftest import RESOURCES_DIR
def test_zip_file():
with zipfile.ZipFile(os.path.join(RESOURCES_DIR, 'file_hello.zip')) as zip_file:
zip_file.extract('file_hello.txt', path=RESOURCES_DIR)
name_list = zip_file.namelist()
print(name_list)
text = zip_file.... | BaykovAleksandr/qa_guru_7_files | tests/test_zip.py | test_zip.py | py | 583 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "zipfile.ZipFile",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "conftest.RESOURCES_DIR",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "os.path",
"l... |
4422298304 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Common fixtures and utils for io tests."""
import copy
import os
import pytest
from orion.core.evc import conflicts
@pytest.fixture()
def config_file():
"""Open config file with new config"""
file_path = os.path.join(
os.path.dirname(os.path.abspath... | lebrice/orion | tests/unittests/core/io/conftest.py | conftest.py | py | 1,819 | python | en | code | null | github-code | 1 | [
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number"... |
29180364279 | # DSC 510
# Week 11
# Programming Assignment Week 11
# Author: Reenie Christudass
# 05/23/2022
# Change#:1
# Change(s) Made: Cash register program
# Date of Change: 05/23/2022
# Author: Reenie Christudass
# Change Approved by: Michael Eller
# Date Moved to Production: 05/23/2022
import locale
from termcolor import co... | reeniecd/DSC510-T301 | Week 11 assignment.py | Week 11 assignment.py | py | 2,870 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "locale.setlocale",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "locale.LC_ALL",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "termcolor.colored",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "locale.currency... |
72646957153 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render
from django.http import HttpResponse, JsonResponse
from rest_framework.decorators import api_view
from django.shortcuts import get_object_or_404
from rest_framework import status
from rest_framework.views import APIView... | k-root/its_farm | app/views.py | views.py | py | 5,031 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "rest_framework.views.APIView",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "rest_framework.response.Response",
"line_number": 21,
"usage_type": "call"
},
{... |
897362652 | import os
from flask import Blueprint, jsonify
from ..decorators import required_login
from ..utilities import create_jwt
jwt_rest_bp = Blueprint('jwt_rest_bp', __name__)
@jwt_rest_bp.route('/api/v1/user', methods=['GET'])
@required_login
def jwt(user):
username = user.username
email = user.email
token... | CossackDex/ZPI_AuthServer | auth_server_application/rest_jwt/jwt_rest_routes.py | jwt_rest_routes.py | py | 556 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "flask.Blueprint",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "utilities.create_jwt",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "decorators.required... |
637784 | """ Module for tables of the Auto Typing paper
"""
# Imports
from __future__ import print_function, absolute_import, division, unicode_literals
import numpy as np
import glob, os, sys
import warnings
import pdb
from pkg_resources import resource_filename
from astropy import units as u
from astropy.table import Tabl... | pypeit/spit | papers/First/Tables/py/auto_type_tabs.py | auto_type_tabs.py | py | 6,524 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "os.getenv",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 61,... |
19990022228 | #!/usr/bin/python3
import arcade
screen_width = 600
screen_height = 600
arcade.open_window(screen_width, screen_width, "drawing example")
arcade.set_background_color(arcade.color.WHITE)
arcade.start_render()
# draw the face
x = 300
y = 300
radius = 200
arcade.draw_circle_filled(x, y, radius, arcade.color.YELLOW)
# d... | alvo254/tutorial | game.py | game.py | py | 769 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "arcade.open_window",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "arcade.set_background_color",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "arcade.color",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "arcade.... |
40325564295 | import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
student_data = pd.read_csv(
"data/HSLS_2016_v1_0_CSV_Datasets/hsls_16_student_v1_0.csv", na_values=[-9, -8, -5, -7, -4, -3])
student_data.head()
# -9 = No Unit Response
# -8 = Missing
# -5 = Supressed
# -7 = Skipped
# -4 ... | karthikvetrivel/HSLS-Predictive-Modellng | input_extract.py | input_extract.py | py | 1,327 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "seaborn.s... |
5112939663 | import argparse
import importlib
from collections import namedtuple
from typing import Dict
CommandInfo = namedtuple("CommandInfo", "module_path, class_name")
commands_dict: Dict[str, CommandInfo] = {
"download": CommandInfo("gtd.cli.download", "DownloadCommand"),
"export": CommandInfo("gtd.cli.export", "Expo... | muse-research-lab/cloud-traces-comparison | gtd/cli/commands.py | commands.py | py | 898 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "collections.namedtuple",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "typing.Dict",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "argparse.Namespace",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "importlib.im... |
2022008519 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Yijia Zheng
# @email : yj.zheng@siat.ac.cn
# @Time : 2019/11/29 11:20:37
import rdkit
import rdkit.Chem as Chem
import copy
import sys
import argparse
from multiprocessing import Pool
from util.chemutils import get_clique_mol, tree_decomp, get_mol, get_smiles,... | aI-area/T-S-polish | scripts/gen_vocab.py | gen_vocab.py | py | 1,284 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "rdkit.RDLogger.logger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "rdkit.RDLogger",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "rdkit.RDLogger",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "argpars... |
70983029473 | from flask import Flask, render_template, request
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import inspect
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///portfolio.db'
db = SQLAlchemy(app)
class Portfolio(db.Model):
id = db.Column(db.Integer, primary_key=True)
title =... | TubolovArtem/Laba-9-by-Tubolov-Artem | task/app.py | app.py | py | 1,581 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "flask.req... |
42524493858 | """Utilities for parsing isoformat strings into datetime types.
"""
from datetime import datetime, date, time
def datetimefromisoformat(s):
"""Parse an isoformat string into a datetime.datetime object.
"""
date, time = s.split()
year, month, day = _parsedate(date)
hour, minute, second, microsecond... | timparkin/timparkingallery | share/pollen/datetimeutil.py | datetimeutil.py | py | 2,671 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "datetime.date",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "datetime.time",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "datetime.date",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "datetime.time",
"line... |
32059293827 | import json
import urllib
from django.conf import settings
def evaluate_recaptcha(request, errors):
# Google Recaptcha validation
recaptcha_response = request.POST.get('g-recaptcha-response')
url = 'https://www.google.com/recaptcha/api/siteverify'
values = {
'secret': settings.GOOGLE_RECAPTCH... | DjangoMeetup/public-website | public_website/apps/formality/views.py | views.py | py | 687 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "django.conf.settings.GOOGLE_RECAPTCHA_PRIVATE_KEY",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "urllib.parse.urlencode",
"line_number": 15,
"usage_type": "ca... |
1023399821 | from aiogram import types, Dispatcher
from aiogram.dispatcher import FSMContext
from aiogram.dispatcher.filters import Text
from aiogram.dispatcher.filters.state import State, StatesGroup
from keyboards import admin_batton
from create_bot import bot, dp
from data_base import sqlite_db
from aiogram.types import InlineKe... | DmitriPrilucki/pizza-bot-this-python | handlers/admin.py | admin.py | py | 4,475 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "aiogram.dispatcher.filters.state.StatesGroup",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "aiogram.dispatcher.filters.state.State",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "aiogram.dispatcher.filters.state.State",
"line_number": 1... |
29585688181 | import typing as t
import os.path
import logging
import json
from yaml.error import Mark
from typing_extensions import TypedDict, Protocol, Literal
from schemalint.entity import ErrorEvent, Lookup, Context
from schemalint.errors import (
ParseError,
LintError,
ResolutionError,
ValidationError,
Mes... | podhmo/schemalint | schemalint/formatter.py | formatter.py | py | 7,496 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "typing_extensions.Literal",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "typing_extensions.TypedDict",
"line_number": 24,
"usage_type": "name"
},
{
"api_name"... |
23881066970 | #!/local/data/atorus1/dora/Compilers/epd-7.3-1-rh5-x86_64(1)/bin/python
##!/Library/Frameworks/Python.framework/Versions/Current/bin/python
##!/Users/dora/Library/Enthought/Canopy_32bit/User/bin/python
import scipy
from numpy import ndarray, zeros, array, size, sqrt, meshgrid, flipud, floor, where, amin, argmin,int
... | AntoXa1/T9 | transmission_properties2.py | transmission_properties2.py | py | 17,801 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.tan",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "numpy.dot",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 100,... |
2421836667 | import pytz
import logging
from datetime import datetime, timedelta
from odoo import fields, models, api, _
from odoo.exceptions import UserError, ValidationError
_logger = logging.getLogger(__name__)
class MrpDistributeTimesheetLine(models.TransientModel):
_name = 'mrp.distribute.timesheet.line'
_descripti... | decgroupe/odoo-addons-dec | mrp_timesheet_distribution/wizard/mrp_distribute_timesheet.py | mrp_distribute_timesheet.py | py | 8,775 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "odoo.models.TransientModel",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "odoo.fie... |
34309580961 | from odoo import models, fields, api, tools
from datetime import datetime, timedelta
import json
# ***************** CREAR CIUDADES **********************
class create_city(models.TransientModel):
_name = 'medievol.create_city'
def _default_player(self):
jugador = self.env['res.partner'].browse(self.... | Buffty/ProyectoDAM | modules/medievol/models/wizards.py | wizards.py | py | 10,467 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "odoo.models.TransientModel",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "odoo.fields.Many2one",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "odoo.f... |
2847074558 | # Import keras.
import keras as kr
import tensorflow as tf
from keras.models import Sequential
from keras.datasets import mnist
from keras.models import Sequential, load_model
from keras.layers.core import Dense, Dropout, Activation
from keras.utils import np_utils
from keras.models import load_model
import sklearn.pre... | KeithH4666/Jupyter-Notebooks-e.g-iris-classifier-script-Mnist-Dataset-script | Digit Recognition Script/Handwritten.py | Handwritten.py | py | 5,998 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "keras.models.Sequential",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "keras.models",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "keras.layers.core.Dense",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "ker... |
18323491914 | import logging
from typing import Dict, List
import torch
from torch import nn
from detectron2.config import configurable
from detectron2.utils.events import get_event_storage
from detectron2.modeling import META_ARCH_REGISTRY
from typing import Any
from .meta_one_stage_detector import MetaProposalNetwork
from sylph.... | facebookresearch/sylph-few-shot-detection | sylph/modeling/meta_arch/few_shot_rcnn.py | few_shot_rcnn.py | py | 13,777 | python | en | code | 54 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "meta_one_stage_detector.MetaProposalNetwork",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "detectron2.modeling.meta_arch.GeneralizedRCNN",
"line_number": 21,
"usage_t... |
1077528090 | import keras.models
import sys
import simplejson as json
model = keras.models.load_model('./modeli/prt10.43.hdf5')
#"vreme" , "temperatura", "vlaznost", "pritisak", "brzina", "oblacnost", "dan u nedelji" , "mesec"
args = sys.argv
path_json = args[1]
with open(path_json) as json_file:
data = json.load(json_fi... | mladjan-gadzic/matf-hackathon | ML/mreza.py | mreza.py | py | 892 | python | hr | code | 0 | github-code | 1 | [
{
"api_name": "keras.models.models.load_model",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "keras.models.models",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "keras.models",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "sys... |
15850335590 | import os
import requests
import time
from typing import Any
from .core.enums import Chain
from .core.base import Web3Connector
from . import log
__all__ = [
"Etherscan",
"Etherscanner",
]
class ResponseParser:
@staticmethod
def parse(response: requests.Response) -> Any:
content = response.... | idiotekk/unknownlib | lib/unknownlib/evm/etherscan.py | etherscan.py | py | 2,813 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.Response",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "typing.Any",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "core.enums.Chain.ETHEREUM",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "core... |
19842701690 | import json
from backend.util.mapper import to_dict
class Question:
def __init__(self, question: str, options: dict, answer: str, vote: str, dataset_id: int, analysis: str, id=None):
self.id = id
self.question = question
self.options = options
self.answer = answer
self.vot... | PengfeiMiao/smart-qa | backend/entity/question.py | question.py | py | 1,267 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "backend.util.mapper.to_dict",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 39,
"usage_type": "call"
}
] |
72348982114 | # pylint: disable=abstract-method
"""
Input schema for Kemux.
This is the schema that is used to validate incoming messages.
"""
import dataclasses
import types
import dateutil.parser
import faust
import faust.models.fields
import kemux.data.schema.base
# pylint: disable=protected-access
@dataclasses.dataclass
cl... | kamilrybacki/Kemux | kemux/data/schema/input.py | input.py | py | 3,496 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "kemux.data.schema.base.data",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "kemux.data.schema.base",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "faust.Record",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_nam... |
20593187659 | import pycurl
from urllib import parse
class LexofficeUpload:
"""
A class for uploading invoice documents
"""
def __init__(self, apiToken: str) -> None:
self.apiUrl = 'https://api.lexoffice.io/v1/files'
self.apiToken = apiToken
def fileUpload(self, tmpFile, fileName: str):
... | Maki-IT/lexoffice-invoice-upload | invoice/uploader/uploader.py | uploader.py | py | 1,243 | python | en | code | 9 | github-code | 1 | [
{
"api_name": "pycurl.Curl",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "urllib.parse.quote",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "urllib.parse",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "pycurl.HTTPHEADER",
"... |
25378068112 | # The data updating script
# Brings in query from the file social.sql
# Working from file means the SQL code can be developed and tested
# directly within the Postgres environment and psycopg2 creates access
# to that code from within Python
# Unclear what context would require this psycopg2 setup with no real
# Pytho... | gusmairs/sql-projects | dsi-pyth/daily_update.py | daily_update.py | py | 829 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "psycopg2.connect",
"line_number": 15,
"usage_type": "call"
}
] |
3176997772 | import os
import tweepy
api_handle = None
def get_authorization():
TWITTER_API_KEY = os.getenv('TWITTER_API_KEY', None)
TWITTER_API_SECRET = os.getenv('TWITTER_API_SECRET', None)
auth = tweepy.AppAuthHandler(TWITTER_API_KEY, TWITTER_API_SECRET)
return auth
def get_api():
global api_handle
... | amtsh/vdeos.me | app/models/twitter/auth.py | auth.py | py | 670 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.getenv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tweepy.AppAuthHandler",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "tweepy.API",
"line_number... |
32821607542 | from datetime import datetime
import os.path
import vcr
from csep.utils.comcat import search
HOST = 'webservices.rm.ingv.it'
def get_datadir():
root_dir = os.path.dirname(os.path.abspath(__file__))
data_dir = os.path.join(root_dir, 'artifacts', 'BSI')
return data_dir
def test_search():
datadir = ge... | SCECcode/pycsep | tests/test_bsi.py | test_bsi.py | py | 1,480 | python | en | code | 40 | github-code | 1 | [
{
"api_name": "os.path.path.dirname",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "os.path.path.abspath",... |
32156408206 | import pytest
import six
from pymarketstore import jsonrpc
from unittest.mock import patch
import importlib
importlib.reload(jsonrpc)
@patch.object(jsonrpc, 'requests')
def test_jsonrpc(requests):
requests.Session().post.return_value = 'dummy_data'
cli = jsonrpc.MsgpackRpcClient('http://localhost:5993/rcp'... | alpacahq/pymarketstore | tests/test_jsonrpc.py | test_jsonrpc.py | py | 768 | python | en | code | 101 | github-code | 1 | [
{
"api_name": "importlib.reload",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pymarketstore.jsonrpc",
"line_number": 8,
"usage_type": "argument"
},
{
"api_name": "pymarketstore.jsonrpc.MsgpackRpcClient",
"line_number": 15,
"usage_type": "call"
},
{
"a... |
19659631050 | import logging
import shutil
from datetime import datetime, timedelta
from itertools import chain
from pathlib import Path
from zipfile import ZipFile
logger = logging.getLogger(__name__)
MAX_STORAGE_DAYS = 90
FREE_SPACE_PERCENT = 10
def get_file_datetime(path):
year, month, day = path.parent.parts[-3:]
re... | Auranoz/test_storage | index.py | index.py | py | 2,253 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "shutil.disk_usage",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "datetime.datetim... |
25376970593 | import os
from pypcd import pypcd
from rich.progress import track
class Bin2Pcd:
def __init__(
self,
input,
input_dims,
output,
):
self.input = input
self.input_dims = input_dims
self.output = output
self.file_list = self.get_file_list()
... | windzu/apk | apk/format/bin2pcd/bin2pcd.py | bin2pcd.py | py | 1,398 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "os.path.exists",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_num... |
23090120889 | from pathlib import Path
import os
import subprocess
import time
from urllib.parse import unquote_plus
import httpx
from api.settings import API_TOKEN
# this assumes API server is running at :5000 and that worker is also running
DELAY = 1 # seconds
MAX_RETRIES = 240
API_URL = "http://localhost:5000"
# API_URL = ... | astutespruce/secas-ssa | tests/test_report_api.py | test_report_api.py | py | 3,742 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "httpx.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "api.settings.API_TOKEN",
"line... |
41728221583 | #!/usr/bin/env python
"""
This scrapes Streak for the Cash information from ESPN and writes it to an Excel spreadsheet.
It uses BeautifulSoup 4 and xlsxwriter.
In order to use this, you will need to download bs4, lxml, and xlsxwriter.
Prop array format: [Sport, League, Prop, Active Picks %, Winner, Winner %, Loser, ... | keveleigh/espn-sftc | props.py | props.py | py | 4,060 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "datetime.date",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "datetime.date",
"line_number": 29,
"usage_type": "argument"
},
{
"api_name": "urllib.request.request.urlopen",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "urllib... |
34806501971 | ''' Common pricing methods corresponding to Interest rate Instruments '''
import datetime as dt
#from collections import OrderedDict
import json
import os
import scipy as sci
import numpy as np
import pandas as pd
# import interest_rate_base as intbase
import interest_rate_dates as intdate
import interest_rate_discount... | slpenn13/pythoninterestrates | src/curve_constructor_lorimier.py | curve_constructor_lorimier.py | py | 9,174 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "curve_constructor.curve_builder",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "json... |
20522502354 | """
Test for import machinery
"""
import unittest
import sys
import textwrap
import subprocess
import os
from PyInstaller.lib.modulegraph import modulegraph
class TestNativeImport (unittest.TestCase):
# The tests check that Python's import statement
# works as these tests expect.
def importModule(self, na... | pyinstaller/pyinstaller | tests/unit/test_modulegraph/test_imports.py | test_imports.py | py | 20,640 | python | en | code | 10,769 | github-code | 1 | [
{
"api_name": "unittest.TestCase",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "textwrap.dedent",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "textwrap.dedent",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "subprocess.Pop... |
18061284249 | import gym
import math
import numpy as np
import cv2
import hashlib
import collections
from gym.envs.atari import AtariEnv
from . import utils
from gym.vector import VectorEnv
from typing import Union, Optional
class EpisodicDiscounting(gym.Wrapper):
"""
Applies discounting at the episode level
"""
... | maitchison/PPO | rl/wrappers.py | wrappers.py | py | 59,577 | python | en | code | 14 | github-code | 1 | [
{
"api_name": "gym.Wrapper",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "gym.Env",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "math.log",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "numpy.ndarray",
"line_numb... |
41547307 | from pathlib import Path
import subprocess
config_path = str((Path(__file__).parent/'sample_config').absolute())
src_path = str((Path(__file__).parent/'empty_article.tex').absolute())
def test_config_file_reading(tmpdir):
"""
Check that config file provided on command line are read.
This is a cli only te... | plastex/plastex | unittests/ConfigFileReading.py | ConfigFileReading.py | py | 729 | python | en | code | 240 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "subprocess.PIPE",
"line_nu... |
36028396719 | from django.urls import path, include
from .views import main, UserListView, CreateUserView, UserDetailsView, LoginView, RefreshTokenView
urlpatterns = [
path('', main),
path('user', UserListView.as_view()),
path('refresh-token', RefreshTokenView.as_view()),
path('user/<int:id>', UserDetailsView.as_vie... | gabrigomez/django-api | django_project/api/urls.py | urls.py | py | 421 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "views.main",
"line_number": 5,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "views.UserListView.as_v... |
30454792138 | from pathlib import Path
import os, sys
from dash import Dash, html, dcc, Input, Output, callback
import pandas as pd
import plotly.express as px
def read_data(src_file):
df = pd.read_csv(src_file)
return df
def create_time_series(data):
fig = px.scatter(data, x='Date', y='Open')
fig.show()
re... | ojudz08/Projects | api/polygon_rest_api/time_series.py | time_series.py | py | 629 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "plotly.express.scatter",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "plotly.express",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "os.path.join",
... |
17071084396 | from sklearn.linear_model import LogisticRegression
from MyLogisticRegGen import MyLogisticRegGen
from my_cross_val import my_cross_val
from datasets import prepare_digits
from utils import (
report,
wrapper_args
)
import sys
def q4(argv=None):
dataset, method_name, k, latex = wrapper_args(
a... | craigching/csci-5521 | csci-5521-hw3/q4.py | q4.py | py | 1,228 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "utils.wrapper_args",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datasets.prepare_digits",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "MyLogisticRegGen.MyLogisticRegGen",
"line_number": 27,
"usage_type": "call"
},
{
"api_... |
3884911703 |
from ast import Try
import requests
from controllers import buyStock,sortStocks, buyFor
if __name__ == '__main__':
stocks = ['AAPL','GOOGL','AMZN','TSLA','FB','TWTR','UBER','LYFT','SNAP','SHOP']
listPrices = []
for stock in stocks:
url = f'https://financialmodelingprep.com/api... | Franzcod/challenge_trii_backend | main.py | main.py | py | 1,379 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "controllers.buyStock",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "controllers.sortStocks",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "controllers.... |
11641058565 | import os
import pickle
import mediapipe as mp
import cv2
import matplotlib.pyplot as plt
mp_hands = mp.solutions.hands
mp_drawing = mp.solutions.drawing_utils
mp_drawing_styles = mp.solutions.drawing_styles
hands = mp_hands.Hands(static_image_mode=True, min_detection_confidence=0.3)
DATA_DIR = './rawdata'
data =... | Ajyarra98/SPN_team12 | preprocessing.py | preprocessing.py | py | 1,531 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "mediapipe.solutions",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "mediapipe.solutions",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "mediapipe.solutions",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_nam... |
12623753130 | from .models import Booking
from django import forms
class BookingForm(forms.ModelForm):
class Meta:
model = Booking
fields = (
'guests', 'date', 'time',
'first_name', 'last_name', 'email', 'requirements'
)
widgets = {
'date': forms.DateInput... | lucijahajdu/lucia-trattoria | booking/forms.py | forms.py | py | 699 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "models.Booking",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.forms.Dat... |
25299334409 | # coding=utf-8
from selenium import webdriver
import time
import requests
from yundama.dama import indetify
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
# 设置chrome浏览器无界面模式
# 浏览器不提供可视化页面. linux下如果系统不支持可视化不加这条会启动失败
# chrome_options.add_argument('--headless')
chrome_options.add_argum... | wzqq5517992/pythonReptileBasic | 04study/code/login_douban_wzq.py | login_douban_wzq.py | py | 1,763 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 17,
"usage_type": "name"
},
{
... |
38204007026 | from ..settings import LOGGING
from ..httpclient.client import Client
import logging.config
import urllib3, json, os
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
logging.config.dictConfig(LOGGING)
logger = logging.getLogger(__name__)
class Vnfd(object):
"""VNF Descriptor Class.
This c... | sonata-nfv/son-monitor | vnv_manager/app/api/management/commands/osm/nbiapi/vnfd.py | vnfd.py | py | 3,322 | python | en | code | 5 | github-code | 1 | [
{
"api_name": "urllib3.disable_warnings",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "urllib3.exceptions",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "logging.config.config.dictConfig",
"line_number": 7,
"usage_type": "call"
},
{
"ap... |
7422977067 | import numpy as np
from typing import Union, Optional, Any
from ..utils.vector import Vector
Position = Vector
Action = int
Cost = Union[int, float]
AdjList = dict[int, list[tuple[int, Cost]]]
AdjMatrix = np.ndarray
PosToIdx = dict[Position, int]
TextMaze = list[list[str]]
GameResult = dict[str, Optional[Any]]
Params... | ShkarupaDC/game_ai | src/consts/types.py | types.py | py | 338 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "utils.vector.Vector",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "numpy.ndarray",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "typing.Optional",
... |
29453264686 | #
from typing import Union
from torch_geometric.typing import Adj, PairTensor, OptTensor
import torch
from torch import Tensor
from torch_geometric.nn.conv import GraphConv
#
class SpatialGraphConv(GraphConv):
r"""
Extension to Pytorch Geometric GraphConv
which is implementing the operator of
`"Weisf... | jokofa/NRR | lib/model/networks/spatial_graph_conv.py | spatial_graph_conv.py | py | 2,077 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "torch_geometric.nn.conv.GraphConv",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "torch.Tensor",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "torch_geo... |
25859782549 | from dataclasses import dataclass
import time
import enum
import logging
from contextlib import contextmanager
import os
from typing import Optional, Any # This is support for type hints
from log_calls import log_calls # For logging errors and stuff
#from setting import SettingDescription
from . import nlp, audio, an... | Halcyox/XRAgents | xragents/scene.py | scene.py | py | 4,448 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "typing.Any",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 66,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_numb... |
1421544026 | from .data import DataSet, Options, enums
"""
Example usage.
"""
if __name__ == '__main__':
# load data:
data = DataSet.Dataset("/path/to/data")
#visualize with plt
data.subfolders[0].datapoints[0].visualize()
#save to location
data.subfolders[0].datapoints[0].save("/home/path/to/save/to", "f... | JustusDroege/grasp_dataset_convenience_pack | main.py | main.py | py | 931 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "data.DataSet.Dataset",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "data.DataSet",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "data.subfolders",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "data.subfolders"... |
13110433306 | import json
def txt_to_tar_dict(src):
'''
Convert text file with course info into dictionary
File line format: COURSE TITLE/PREREQ1,PREREQ2,.../COREQS/RESTRICTIONS
'''
out = {}
for course in src:
title, prereqs, coreqs, restricts = course.strip().split('/')
#Mark no courses li... | RolandRiachi/PrerequisitesGraph | courseData/coursePages/txt_to_var.py | txt_to_var.py | py | 2,089 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "json.dump",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 68,
"usage_type": "call"
}
] |
26743105833 | """
Audio beacon and code transmission of Module 2
"""
import time
import serial
import pyaudio
import numpy as np
import matplotlib.pyplot as plt
import serial.tools.list_ports
# # Sampling data
Fs = 48000
# Time_recording = S # in seconds
# N_mic = 5 # number of mics/channels
# N = Time_recording * Fs # number of... | dlacle/EPO-4 | epo4/Module2/Module2_mic_array/AudioBeacon.py | AudioBeacon.py | py | 6,133 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "serial.tools.list_ports.comports",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "serial.tools",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "serial.Serial",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "seri... |
21106157201 | #!/usr/bin/env python3
#
# submit_tX_tests.py
# Written: Nov 2018
# Last modified: 2019-11-09 RJH
#
# Python imports
from os import getenv
import sys
import json
import logging
import subprocess
# ======================================================================
# User settings
USE_LOCALCOMPOSE_URL... | unfoldingWord-dev/tools | tx/submit_tX_tests.py | submit_tX_tests.py | py | 5,841 | python | en | code | 8 | github-code | 1 | [
{
"api_name": "subprocess.Popen",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "subprocess.PIPE",
"line_number": 98,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 108,
"usage_type": "call"
}
] |
26799682088 | import streamlit as st
from PIL import Image
import pandas as pd
import matplotlib.pyplot as plt
add_selectbox = st.sidebar.selectbox(
"목차",
("체질량 계산기", "갭마인더", "마이페이지")
)
if add_selectbox == "체질량 계산기":
#체질량 치수 구하는 랩
#몸무게, 키입력받기
st.write('#체질량 치수 계산기')
height = st.number_input('키를 입력하시오.(cm)... | Dongkka912/smartMobility | home.py | home.py | py | 2,234 | python | ko | code | 0 | github-code | 1 | [
{
"api_name": "streamlit.sidebar.selectbox",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "streamlit.sidebar",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "streamlit.write",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "stre... |
32407624536 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import pandas as pd
import matplotlib.pyplot as plt
import math
import numpy as np
# initialize the graph
def initializeGraph():
x = data['x']
y = data['y']
plt.scatter(x, y)
plt.plot(plot1[0], plot1[1], 'go-', label='line 1', linewidth=2)
plt.plot(pl... | franklee809/3d-matplot | main.py | main.py | py | 7,130 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "matplotlib.pyplot.scatter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "ma... |
1538742126 | import numpy as np
import matplotlib.pylab as plt
from scipy.stats import norm
from src.MiniProjects.DeltaHedging.SingleVariableDeltaHedgingValuator import SingleVariableDeltaHedgingValuator
from src.SolverMC.SingleVariableSimulator import SingleVariableSimulator
__author__ = 'frank.ma'
class SingleVariableDeltaHed... | frankma/Finance | src/MiniProjects/DeltaHedging/SingleVariableDeltaHedging.py | SingleVariableDeltaHedging.py | py | 2,917 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "src.SolverMC.SingleVariableSimulator.SingleVariableSimulator",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "src.MiniProjects.DeltaHedging.SingleVariableDeltaHedgingValuator.SingleVariableDeltaHedgingValuator",
"line_number": 12,
"usage_type": "name"
},
{
... |
3168634647 | from collections import OrderedDict
from typing import Tuple, Union
from fvcore.common.registry import Registry
from omegaconf.listconfig import ListConfig
import copy
import threading
import numpy as np
import torch
import torch.nn.functional as F
from torch import nn
from timm.models.vision_transformer import _cfg
... | zhaoyanpeng/vipant | cvap/module/encoder/image_head.py | image_head.py | py | 2,844 | python | en | code | 19 | github-code | 1 | [
{
"api_name": "fvcore.common.registry.Registry",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "omegaco... |
12037898208 | from flask import jsonify
from sqlalchemy.exc import IntegrityError
from actor_libs.database.orm import db
from actor_libs.errors import ReferencedError
from actor_libs.utils import get_delete_ids
from app import auth
from app.models import Device, Group, GroupDevice, User, EndDevice, Gateway
from app.schemas import G... | actorcloud/ActorCloud | server/app/services/devices/views/groups.py | groups.py | py | 3,749 | python | en | code | 181 | github-code | 1 | [
{
"api_name": "app.models.Group",
"line_number": 22,
"usage_type": "argument"
},
{
"api_name": "app.models.Group",
"line_number": 19,
"usage_type": "argument"
},
{
"api_name": "app.models.Gateway",
"line_number": 18,
"usage_type": "argument"
},
{
"api_name": "app.... |
30217682087 | import requests
import json
import time
import re
import random
from user_agent_tool import *
class converse_post():
def __init__(self):
self._num = 1
self._user_agent_tool = user_agent_tool()
self._session = requests.session()
self._isEnoughStock_response = {
'returnUrl'... | mycodeset/Converse | Selenium下单工具/converse_post.py | converse_post.py | py | 9,396 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.session",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "requests.cookies.RequestsCookieJar",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "requests.cookies",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_nam... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.