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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
43058439173 | # -*- coding: utf-8 -*-
# @Time : 2019/7/10 10:14
# @Author : Youpeng Li
# @Site :
# @File : 0127_ladderLength.py
# @Software: PyCharm
'''
127. Word Ladder
Given two words (beginWord and endWord), and a dictionary's word list,
find the length of shortest transformation sequence from beginWord to... | YoupengLi/leetcode-sorting | Solutions/0127_ladderLength.py | 0127_ladderLength.py | py | 5,618 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "collections.defaultdict",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 106,
"usage_type": "call"
}
] |
31680675209 | # M. P. Hayes UCECE
import numpy as np
from ipywidgets import interact
from .lib.signal_plot import signal_plot, create_axes
from .lib.flickernoise import FlickerNoise
from IPython.display import Audio
colours = ['red', 'pink', 'white', 'blue', 'violet']
betas = {'red': 2, 'pink': 1, 'white': 0, 'blue': -1, 'violet':... | mph-/dsp-notebooks | intro/demos/noise_colour_audio_demo1.py | noise_colour_audio_demo1.py | py | 1,406 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "numpy.random.seed",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "numpy.arange",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "lib.flickernoise.Fli... |
74192425822 | from multiprocessing.connection import wait
import discord
from pathlib import Path
import os
from discord import FFmpegPCMAudio
import asyncio
from bot_token import token
list_of_taunts = os.listdir(Path('./taunt_files'))
def find_taunt(taunt_number):
taunt = list_of_taunts[taunt_number-1]
return taunt
inten... | HenryCrosswell/AOETauntBot | main.py | main.py | py | 2,597 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.listdir",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "discord.Intents.default",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "discord.Intents",
"... |
38989806011 | """
Handles database maintainance tasks for this application.
"""
import sqlite3
import json
from io import TextIOBase
from contextlib import closing
from .calc import prediction
RECOMMENDER_SQL_LOCATION = 'data/recommender.sql'
def db_connection(db_location: str) -> sqlite3.Connection:
""" Return a configured... | jcarrete5/suitable-solution | recommender/database.py | database.py | py | 2,562 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sqlite3.connect",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sqlite3.Row",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "calc.prediction",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sqlite3.Connection",... |
14881348223 | from typing import Any
def get_modified_fields(old_values, new_values):
"""
Return all fields that have been modified from original fields
"""
field_changes = {}
for key, value in new_values.items():
try:
original_value = old_values[key]
except KeyError:
"... | polowis/virtComp | app/core/db/model_mixin.py | model_mixin.py | py | 4,319 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "typing.Any",
"line_number": 82,
"usage_type": "name"
}
] |
74587720221 | import logging
from time import sleep
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.views.generic import ListView
from attendees.persons... | xjlin0/attendees32 | attendees/persons/views/page/directory_report_list_view.py | directory_report_list_view.py | py | 2,489 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "attendees.users.authorization.RouteGuard",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "django.views.generic.ListView",
"line_number": 18,
"usage_type": "name"
},
... |
14772534887 | # this tool pre-process raw data to train-able data
# usage: python3 prepage_data.py <input.gz> <output.gz>
# input:
# input.gz: each line contains <label> <url>;
# label = 'true' if the url was removed by mcf; else it's 'false'
#
# output
# output.gz: each line contains:
# <label> <url> <host> <host_hash> ... | llkhacquan/url-remove-prediction | prepare_data.py | prepare_data.py | py | 2,049 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.basicConfig",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "re.split",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "re.split",
"line_... |
24830891487 | import torch.nn as nn
import torch.nn.functional as F
import raf
from raf.model import Linear
from .common import check, randn_torch, t2m_param, one_hot_torch
from .utils import get_param, set_param
class TorchMlp(nn.Module): # pylint: disable=abstract-method
def __init__(self, num_inputs, num_outputs, num_hidd... | awslabs/raf | python/raf/testing/mlp.py | mlp.py | py | 3,289 | python | en | code | 133 | github-code | 7 | [
{
"api_name": "torch.nn.Module",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
24507661175 | import logging
import math
import os
from tempfile import NamedTemporaryFile
import pandas as pd
import pendulum
from airflow import DAG
from airflow.hooks.base import BaseHook
from airflow.operators.bash import BashOperator
from airflow.operators.python import PythonOperator
from airflow.providers.http.hooks.http imp... | mrn-aglic/examples | airflow-new-features/dags/feat23/dags/dynamic_task_mapping_simple_dag.py | dynamic_task_mapping_simple_dag.py | py | 3,578 | python | en | code | 6 | github-code | 7 | [
{
"api_name": "os.environ",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
... |
71040224223 | import copy
import json
import logging
import os
import sys
import traceback
from typing import List
from golem.task.taskbase import Task
from tests.apps.blender.task.test_blenderintegration import \
TestBlenderIntegration
from tests.golem.verifier.test_utils.helpers import \
find_crop_files_in_path, \
are... | golemfactory/clay | tests/golem/verifier/blenderverifier_ext_test_script.py | blenderverifier_ext_test_script.py | py | 11,716 | python | en | code | 2,915 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "logging.disable",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.CRITICAL",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "typing.List",... |
20569345160 | import pandas as pd
import json
import os
#----- Time -----
from datetime import datetime
#----- Start Time -----
def startTime():
return datetime.now()
beginTime = startTime()
#----- End Time -----
def endTime(beginTime):
global diffMinSecTime
endTime = datetime.now()
diffTime = endTime-beginTime
... | mcrayssac/SAE-S4 | Python/concatDataframes.py | concatDataframes.py | py | 8,772 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "datetime.datetime.now",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.now",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetim... |
25267516143 | from pydantic import BaseModel
from typing import List
import argparse
import json
import random
import os
import shutil
parser = argparse.ArgumentParser(description='Figure our game subs')
parser.add_argument('positions_file', type=str, help='File to store positions in')
parser.add_argument('-g', '--goalie', default=... | ammurdoch/shooting-stars | soccer_subs.py | soccer_subs.py | py | 7,245 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pydantic.BaseModel",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "typing.List",
... |
28042121965 | """
Retrieval-Augmented Generation with T5
reference: https://lilianweng.github.io/posts/2020-10-29-odqa/#open-book-qa-retriever-generator
"""
# from transformers import pipeline
# from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
from transformers import AutoTokenizer, T5ForConditionalGeneration
# checkp... | yingshuangfan/ESG_chatbot | utils/generator.py | generator.py | py | 993 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "transformers.AutoTokenizer.from_pretrained",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "transformers.AutoTokenizer",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "transformers.T5ForConditionalGeneration.from_pretrained",
"line_number"... |
37328174181 | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 18 15:38:43 2020
@author: HP
"""
import numpy as np
from numba import jit
import math
import cv2
import matplotlib.pyplot as plt
#from scipy import integrate
def black_hole_simulation(img, L1 = 1, L2 = 1, M = 1, D = 1):
# L1 = 5e21
# L2 = 5e21
# M = 1e19
... | jingxuxie/Gravitational-Lens-Simulation | curve.py | curve.py | py | 14,005 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.sqrt",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.arccos",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "numpy.cos",
"line_number": 39,... |
10477277536 | '''
Attention !
************
For stochastic model, e.g. ESN, DESN,..., etc.
They are trained only once that are solving their output-weight in a close form manner. Thus the schedulers based Tuner cannot be implemented into tuning these models, that the tuner will sample the hypers from the config (tuning.dict) only on... | Analytics-for-Forecasting/OpenForecasting | task/TaskTuner.py | TaskTuner.py | py | 9,665 | python | en | code | 7 | github-code | 7 | [
{
"api_name": "sys.path.append",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
42252862185 | from django.db.models.signals import post_save
from finance.models import Payment, Service
def createPaymentID(sender, instance, created, **kwargs):
if created:
if not instance.payment_id:
instance.payment_id = "LAK-FIN/PAY-{0:04d}".format(instance.id)
instance.save()
... | 9akashnp8/mini-ERP | finance/signals.py | signals.py | py | 650 | python | en | code | 9 | github-code | 7 | [
{
"api_name": "django.db.models.signals.post_save.connect",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.db.models.signals.post_save",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "finance.models.Payment",
"line_number": 11,
"usage_type": "... |
24356297471 | import tempfile
import unittest
from transformers import is_tf_available
from transformers.testing_utils import require_tf, slow
if is_tf_available():
import tensorflow as tf
from transformers import AutoTokenizer, TFAutoModelForCausalLM, TFAutoModelForSeq2SeqLM, tf_top_k_top_p_filtering
@require_tf
class... | FMInference/FlexGen | benchmark/third_party/transformers/tests/generation/test_generation_tf_utils.py | test_generation_tf_utils.py | py | 6,738 | python | en | code | 8,687 | github-code | 7 | [
{
"api_name": "transformers.is_tf_available",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "unittest.TestCase",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.convert_to_tensor",
"line_number": 19,
"usage_type": "call"
},
{
"a... |
38937477447 | import dataclasses
from enum import Enum
from typing import Any, Dict
from digital_twins.Devices.utils import target_from_json
from local.things_api.helpers import ServiceId, TargetId
from stochastic_service_composition.services import Service, build_service_from_transitions
from stochastic_service_composition.target ... | luusi/digital-twins-composition-in-smart-manufacturing-via-markov-decision-processes | local/things_api/data.py | data.py | py | 4,368 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "enum.Enum",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "local.things_api.helpers.ServiceId",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "stochastic_service_composition.services.Service",
"line_number": 20,
"usage_type": "name"
... |
7876378312 | import setuptools
import os
thelibFolder = os.path.dirname(os.path.realpath(__file__))
requirementPath = thelibFolder + '/requirements.txt'
install_requires = []
if os.path.isfile(requirementPath):
with open(requirementPath) as f:
install_requires = f.read().splitlines()
with open("README.md", "r") as fh:
... | numb95/is_wordpress | setup.py | setup.py | py | 1,206 | python | en | code | 17 | github-code | 7 | [
{
"api_name": "os.path.dirname",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line... |
28634651109 | import requests
from bs4 import BeautifulSoup
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials, SpotifyOAuth
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
billboard_year = input("what year you would like to travel to in YYYY-MM-DD format:")
URL = f"https... | Hazannovich/scraps-billboard-top-songs | main.py | main.py | py | 1,277 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "spotipy.Spotify",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "spotipy.oauth2.Spotify... |
2798059128 | import argparse
import cv2
# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument('-i', '--image', required=True, help='Path to the image')
args = vars(ap.parse_args())
# load the image and convert it to greysclae
image = cv2.imread(args['image'])
gray = cv2.cvtColor(im... | Ali-Parandeh/Data_Science_Playground | pyimagesearch gurus/Module 1/lesson_1_6/morphological.py | morphological.py | py | 3,184 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
... |
23641586083 | import tensorflow as tf
from tensorflow.contrib import rnn
import numpy as np
import math
from collections import deque
import time
event_len = 40
pitch_num = 120
tick_num = 12
data_size = pitch_num * 2 + tick_num
hidden_size = 300
epochs = 20000
num_layers = 2
batch_size = 16
start = time.time()
print("Making Graph"... | forthacks/music-generation | music_lstm.py | music_lstm.py | py | 3,571 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "time.time",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tensorflow.placeholder",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "tensorflow.placeholder",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "tensorflow.co... |
33692270603 | import pyodbc
import json
import collections
import pyqrcode
import png
strsql =" select distinct code from thaiplantdict where code <>'' "
print(strsql);
connstr = 'DRIVER={SQL Server};SERVER=(local)\sql2008;UID=usr;PWD=usr;DATABASE=mplant;'
conn = pyodbc.connect(connstr)
cursor = conn.cursor()
cursor.execute(s... | tanawootc/genqrcode_app_botany | genqr.py | genqr.py | py | 690 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pyodbc.connect",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pyqrcode.create",
"line_number": 29,
"usage_type": "call"
}
] |
73377275422 | from sqlalchemy import Column, Integer, String, ForeignKey
from app.db.base_class import Base
class Fee(Base):
id = Column(Integer, primary_key=True, index=True)
name = Column(String(100), nullable=False)
tax_rate = Column(String(10), nullable=False)
quantity = Column(Integer, nullable=False)
am... | delitamakanda/hapy-checkout-system-api | app/models/fee.py | fee.py | py | 437 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "app.db.base_class.Base",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer",
"line_number": 8,
"usage_type": "argument"
},
{
"api_name": "sqlalche... |
22960507530 | import time
import curses
import curses.textpad
import logging
import star_wars
import game_two
import game_three
# Utility to clear the screen regardless of OS
def clear_screen(window):
window.clear()
window.refresh()
# Utility center a string
def center_text(window, text, row):
x = int((window.getmaxyx... | joshuacodes/laghjory | main_menu.py | main_menu.py | py | 7,917 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.debug",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "logging.debug",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "logging.debug",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "logging.debug",
"line_n... |
41846607479 | """Data schemes used by Landroid Cloud integration."""
from __future__ import annotations
import voluptuous as vol
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD, CONF_TYPE
from homeassistant.helpers import config_validation as cv
from .const import (
ATTR_FRIDAY_BOUNDARY,
ATTR_FRIDAY_END,
ATTR... | MTrab/landroid_cloud | custom_components/landroid_cloud/scheme.py | scheme.py | py | 3,046 | python | en | code | 215 | github-code | 7 | [
{
"api_name": "voluptuous.Schema",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "voluptuous.Required",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "homeassistant.const.CONF_EMAIL",
"line_number": 41,
"usage_type": "argument"
},
{
"api_name... |
36015400479 | import spacy
# * To add features to output message
GREEN = '\033[92m'
RED = '\033[91m'
WHITE = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
nlp = spacy.load("en_core_web_lg") # Given that the description of the films is very detailed,
# I opted for the large vers... | cipobt/HyperionDev | watch_next.py | watch_next.py | py | 2,812 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "spacy.load",
"line_number": 12,
"usage_type": "call"
}
] |
74254311904 | # standard python library
from abc import ABCMeta, abstractmethod, ABC
import itertools
import warnings
# numeric package
import numpy as np
# helps speed up performance
from numba import jit
# optimization packages
from ortools.linear_solver import pywraplp
from lap import lapjv
__doc__ = """
This matching method... | ed-turner/look-a-like | lal/core/nn.py | nn.py | py | 13,305 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "abc.ABCMeta",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "abc.abstractmethod",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "numpy.abs",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number... |
24560748327 | """Util that calls Google Scholar Search."""
from typing import Dict, Optional
from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator
from langchain_core.utils import get_from_dict_or_env
class GoogleScholarAPIWrapper(BaseModel):
"""Wrapper for Google Scholar API
You can create serpapi key ... | langchain-ai/langchain | libs/community/langchain_community/utilities/google_scholar.py | google_scholar.py | py | 5,171 | python | en | code | 68,990 | github-code | 7 | [
{
"api_name": "langchain_core.pydantic_v1.BaseModel",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "langchain_core.pydantic_v1.Extra.forbid",
"line_number": 51,
"usage_type": "attribute... |
46859269147 | # import the necessary packages
from keras.models import load_model
import keras.preprocessing.image as kerasImage
import argparse
from os import path
import numpy
# gpus = tf.config.experimental.list_physical_devices('GPU')
# if gpus:
# try:
# # Currently, memory growth needs to be the same ac... | Muzta/gameRecognition | resnetMiPropioDataset/modelTest.py | modelTest.py | py | 2,657 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 50,
"usage_type": "name"
},
{
"api_name": "keras.preprocessing.imag... |
33336359536 | import os
import sys
from datetime import datetime
import joblib
import pandas as pd
from ryu.controller import ofp_event
from ryu.controller.handler import MAIN_DISPATCHER, DEAD_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.lib import hub
from sklearn.metrics import accuracy_score
from sklearn.met... | Batmanly/DDOS-Detection-with-Machine-Learning-Algorithms | controller/KNN_controller.py | KNN_controller.py | py | 9,939 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "os.getenv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "switch.SimpleSwitch13",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "ryu.lib.hub.spawn",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "ryu.lib.hub",
... |
71668006945 | # -*- coding: utf-8 -*-
from utilities import return_df, vectors_as_dict, euclidean_distances, cosine_similarity
import pandas as pd
import unidecode
class DiscreteTask:
def __init__(self, file, stimulus, response, condition):
data = pd.read_csv(file)
self.df = pd.DataFrame(data, column... | Bori65/ComparingWordVectors | DiscreteTask.py | DiscreteTask.py | py | 3,194 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "unidecode.unidecode",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "utilities.vector... |
19994712586 | from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware
from db.database import database
from apps.routes import routes
app = FastAPI(
title='Todo App',
description='Author Dastan Alymbek uulu',
version='1.0'
)
@app.on_event("startup")
async def startup():
await database.co... | AlymbekovvDastan/todo_async | main.py | main.py | py | 586 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "db.database.database.connect",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "db.database.database",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "db.d... |
75019411423 | # import torch.backends.cudnn as cudnn
import time
from options.train_options import TrainOptions
from data.data_loader import CreateDataLoader
from models.models import create_model
from util.visualizer import Visualizer
opt = TrainOptions().parse() # set CUDA_VISIBLE_DEVICES before import torch
data_loader = Create... | Cuiyirui/TextureGAN | train.py | train.py | py | 3,533 | python | en | code | 18 | github-code | 7 | [
{
"api_name": "options.train_options.TrainOptions",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "data.data_loader.CreateDataLoader",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "models.models.create_model",
"line_number": 13,
"usage_type": "call"
... |
10116693652 | from django.core.management.base import BaseCommand
from django.contrib.auth.models import User, Group
from django.contrib.auth.hashers import make_password
from django.utils.timezone import make_aware
import datetime
from dateutil.relativedelta import relativedelta
from app.models import Teacher, Order, School, Regi... | malaonline/Server | server/teacher/management/commands/create_fake_order.py | create_fake_order.py | py | 6,233 | python | en | code | 9 | github-code | 7 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "app.models.School.objects.get",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "app.models.School.objects",
"line_number": 23,
"usage_type": "attri... |
29001984057 | import scrapy
from zheng800.items import Zheng800Item
class zheng800Spider(scrapy.Spider):
name = 'zheng800_spider'
domain = ['www.zheng800.com']
start_url = 'http://www.zheng800.com/plus/list.php?tid=5&PageNo='
offset = 1
start_urls = [start_url+str(offset)]
# 默认的解析数据
def parse(self,respo... | SuperKenVery/tieba_spider | zhen800/zheng800/spiders/zheng800_spider.py | zheng800_spider.py | py | 1,370 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "scrapy.Spider",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "zheng800.items.Zheng800Item",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "scrapy.Request",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "scrapy.R... |
32069479827 | import os
import pandas
import pdfplumber
import utils
class entradas:
_dir = None
DENSITY = 3
def __init__(self, dir):
self._dir = os.getcwd() + dir
def ler(self):
util = utils.utils()
arquivos = util.recursiveReadDir(self._dir)
novosregistros = []
for arquiv... | devopsadmins/entradaesaidas | entradas.py | entradas.py | py | 4,753 | python | pt | code | 0 | github-code | 7 | [
{
"api_name": "os.getcwd",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "utils.utils",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pdfplumber.open",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pandas.ExcelWriter",
"line_... |
36040936497 | from typing import Callable, Optional, Tuple
import haiku as hk
import jax
import jax.numpy as jnp
import jraph
from haiku.initializers import UniformScaling
from egnn_jax import EGNN, EGNNLayer
from egnn_jax.utils import LinearXav
class EGNNLayer_vel(EGNNLayer):
def __init__(
self,
hidden_size:... | gerkone/egnn-jax | egnn_jax/variants.py | variants.py | py | 2,215 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "egnn_jax.EGNNLayer",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.Callable",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "jax.nn",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "egnn_jax.utils.LinearX... |
25965385476 | from tweepy.errors import Unauthorized
from core.log import log
import api.twitter_api as twitter_api
def format_content_post(quotes_ptax):
"""
We take the dictionary that contains the ptax quotes and transform it into text. This is the text ready
for posting on twitter.
"""
log('console').info('... | ceconelo/ptax_quotes | ptax/core/post_tweet.py | post_tweet.py | py | 1,313 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "core.log.log",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "core.log.log",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "api.twitter_api.tweet_to_publish",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "api.twitte... |
41324338747 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 19 16:54:54 2019
@author: similarities
"""
import matplotlib.pyplot as plt
import numpy as np
import random
import math
from lmfit.models import GaussianModel
class FWHM_Gaussian_Fit_Processing:
def __init__(self, filename... | Similarities/HighHarmonicGaussianFit | divergence_single_gaussian_fit.py | divergence_single_gaussian_fit.py | py | 5,712 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.empty",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.empty",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number":... |
2371215245 | from django.conf import settings
from django.contrib import admin
from django.urls import include, path, re_path
from django.utils.translation import gettext_lazy as _
admin.site.site_header = _("Панель управления")
admin.site.index_title = _("Панель управления")
admin.site.site_title = _("Администрирование")
urlpatt... | ghettoDdOS/tk-quiz-bot | config/urls.py | urls.py | py | 732 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.contrib.admin.site",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.utils.translation.gettext_lazy",
"line_number": 6,
"usage_type": "call"
},
{... |
8654931513 | #!{{ python_path }}
import time
import json
import xmltodict
import sys
import re
import os
sys.path.append({{ repr(buildout_directory_path) }})
from ncclient_common import LopcommNetconfClient
if __name__ == '__main__':
nc = LopcommNetconfClient(
log_file="{{ log_file }}",
supervision_reply_json_l... | SlapOS/slapos | software/ors-amarisoft/ru/lopcomm/supervision.jinja2.py | supervision.jinja2.py | py | 2,852 | python | en | code | 37 | github-code | 7 | [
{
"api_name": "sys.path.append",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "ncclient_common.LopcommNetconfClient",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.p... |
7037421207 | """Distance Wrapper concrete implementation"""
import warnings
import os
import sys
import json
import datetime
import numpy as np
from algorithm_wrapper import AbstractAlgorithmWrapper
class DistanceWrapper(AbstractAlgorithmWrapper):
"""Distance Wrapper concrete class"""
@classmethod
def get_input_param... | oncoscape/oncoscape_algorithm_wrapper | distance_wrapper.py | distance_wrapper.py | py | 3,405 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "algorithm_wrapper.AbstractAlgorithmWrapper",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "warnings.showwarning",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "warnings.showwarning",
"line_number": 39,
"usage_type": "attribute"
... |
10492631910 | from django.shortcuts import render
from .forms import *
from .models import *
from django.http import HttpResponse
# Create your views here.
def model_form_upload(request):
if request.method == 'POST':
form = DocumentForm(request.POST, request.FILES)
if form.is_valid():
form.save()
file = open('media/doc... | supriyasuru92/texttobinary | filetobinary/myapp/views.py | views.py | py | 769 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.http.HttpResponse",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 30,
"usage_type": "call"
}
] |
21888203733 | from os import truncate
from tkinter.ttk import Style
import progressbar
import time
import pyfiglet
from rich.console import Console
from rich.table import Column, Table
from rich.markdown import Markdown
from os import walk
import requests
import subprocess
import sys
import webbrowser
from bs4 import ... | Tha7an-5TarK/StreamLabs-v1.0 | StreamLabs(v1.O).py | StreamLabs(v1.O).py | py | 3,496 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "progressbar.AnimatedMarker",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "progressbar.ProgressBar",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "rich.ta... |
981746913 | import requests
import json
class Nest(object):
"""
Class that abstracts communication with the Nest Learning Thermostat
unofficial API. Initialize with username and password, and you will get
an object with methods that allow you to check states and issue commands.
"""
def __init__(self, use... | maxvitek/nest | nest.py | nest.py | py | 5,927 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "requests.post",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number":... |
40372509001 | import pandas as pd
import numpy as np
import datetime as dt
import talib
from .data_generator import roical,winfactor
def main(df, count, acmroi, winrate, winvar):
dayToCount=5
close = np.array(df['Close'],dtype=float)
SMA=talib.SMA(close,dayToCount)
WMA=talib.WMA(close,dayToCount)
df['SMA']=SM... | eiahb3838ya/Robo_adviser_prototype | robo_adviser/adviser/indicators_factory/test/SMAWMA.py | SMAWMA.py | py | 1,995 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.array",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "talib.SMA",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "talib.WMA",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 22,
... |
25740902286 | #sidebar.py
import streamlit as st
import os
def set_openai_api_key(api_key: str):
st.session_state["OPENAI_API_KEY"] = api_key
st.session_state["api_key_configured"] = True
os.environ['OPENAI_API_KEY'] = api_key
def set_folder_path_state(folder):
if 'FOLDER_PATH' not in st.session_state:
st.... | timonmat/ChatObsidian | components/sidebar.py | sidebar.py | py | 1,409 | python | en | code | 16 | github-code | 7 | [
{
"api_name": "streamlit.session_state",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "streamlit.session_state",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name":... |
27498766176 | #!/usr/bin/env python3
from telegram.ext import MessageHandler
from ._prototype import _TelegramBotService
class TelegramBotMessageService(_TelegramBotService):
def __init__(self, server, filters):
_TelegramBotService.__init__(
self,
server,
lambda func: MessageHan... | neoatlantis/OrbuculumCaeli | telegramBotServer/services/message.py | message.py | py | 350 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "_prototype._TelegramBotService",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "_prototype._TelegramBotService.__init__",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "_prototype._TelegramBotService",
"line_number": 9,
"usage_type": "na... |
14197111606 | from http import HTTPStatus
from django.test import Client, TestCase
from django.urls import reverse
from posts.models import Group, Post, User
class URLTestCase(TestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.user = User.objects.create_user(username='dev')
cl... | devzera/bear_blog | yatube/posts/tests/test_urls.py | test_urls.py | py | 2,700 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.test.TestCase",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "posts.models.User.objects.create_user",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "posts.models.User.objects",
"line_number": 14,
"usage_type": "attribute"
},
... |
7552927431 | import gtk
import os
#
# Class for giving feedback while loading a display.
#
class LoadingFeedback(gtk.Window):
def __init__(self):
gtk.Window.__init__(self, gtk.WINDOW_POPUP)
self.set_position(gtk.WIN_POS_CENTER)
frm = gtk.Frame()
frm.set_shadow_type(gtk.SHADOW_OUT)
fr... | RaumZeit/gdesklets-core | main/LoadingFeedback.py | LoadingFeedback.py | py | 2,101 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "gtk.Window",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "gtk.Window.__init__",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "gtk.Window",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "gtk.WINDOW_POPUP",... |
18267272599 | import datetime
from apps.finance.models import Persona
from apps.sales import filters, forms, inlines, models, tables
from core import views
from core.utils import link_callback
from django.conf import settings
from django.db import transaction
from django.http import HttpResponse, HttpResponseRedirect
from django.te... | toviaferna/turbo-potato | apps/sales/views.py | views.py | py | 12,638 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "core.views.ListView",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "core.views",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "apps.sales.models.AperturaCaja",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name"... |
9113560371 | import socket
from celestialnavigator import NetworkInterfacePacket, EasyDref, EasyCommand, UTC
from datetime import datetime
from XPLMDefs import *
from XPLMProcessing import *
from XPLMDataAccess import *
from XPLMUtilities import *
from XPLMPlanes import *
from XPLMPlugin import *
from XPLMMenus import *
from XPWidg... | kellpossible/CelestialNavigator | x-plane/PI_CelestialNavigator.py | PI_CelestialNavigator.py | py | 12,471 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "celestialnavigator.EasyDref",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sys.version_info",
"line_number": 143,
"usage_type": "name"
},
{
"api_name": "webbrowser.open_new",
"line_number": 166,
"usage_type": "call"
},
{
"api_name": "da... |
25549005815 | from bs4 import BeautifulSoup
import keyword
def extractText(text):
"""
Removes all code from the input text.
Returns text without html tags.
"""
soup = BeautifulSoup(text, 'html.parser')
for code in soup.find_all('code'):
code.decompose()
return soup.get_text()
def extractCode(text):
"""Finds al... | sanjayms01/StackReQA | master/helper_functions/parse.py | parse.py | py | 1,630 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "keyword.iskeywor... |
15735568341 | from django.urls import path
from . import views
urlpatterns = [
path('', views.home_page, name='home'),
path('project/<str:pk>', views.project_page, name='project'),
path('add-project', views.add_project, name='add-project'),
path('edit-project/<str:pk>', views.edit_project, name='edit-project'),
... | lulian666/my-portfolio-django | base/urls.py | urls.py | py | 678 | python | en | code | 0 | github-code | 7 | [
{
"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.path",
... |
72864320222 | import copy as cp
from abc import ABCMeta
import numpy as np
from torch.utils.data import Dataset
from mmpose.datasets.builder import DATASETS
from mmpose.datasets.pipelines import Compose
@DATASETS.register_module()
class MoshDataset(Dataset, metaclass=ABCMeta):
"""Mosh Dataset for the adversarial training in ... | Ascend/ModelZoo-PyTorch | PyTorch/contrib/cv/pose_estimation/Hourglass_for_PyTorch/mmpose-master/mmpose/datasets/datasets/mesh/mosh_dataset.py | mosh_dataset.py | py | 1,973 | python | en | code | 31 | github-code | 7 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "abc.ABCMeta",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "mmpose.datasets.pipelines.Compose",
"line_number": 32,
"usage_type": "call"
},
{
"api_name":... |
17702738496 | """ Implements the command for serving a trained policy """
import time
import os
from blaze.config.config import get_config
from blaze.config.serve import ServeConfig
from blaze.evaluator.analyzer import get_num_rewards
from blaze.logger import logger as log
from . import command
@command.argument("location", help... | nkansal96/alohamora | blaze/command/serve.py | serve.py | py | 2,470 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "blaze.logger.logger.info",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "blaze.logger.logger",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "os.path.exists",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "os.path",... |
39487114324 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import random
import numpy as np
from six.moves import xrange # pylint: disable=redefined-builtin
import tensorflow as tf
from tensorflow.models.rnn.translate import data_utils
from tensorflow.models.rnn imp... | tscheepers/hred-attention-tensorflow | src/gefoefel/seq2seq/seq2seq.py | seq2seq.py | py | 4,829 | python | en | code | 70 | github-code | 7 | [
{
"api_name": "tensorflow.float32",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.Variable",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "tensorflow.Variable",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "tenso... |
72858661984 | import pygame
from ui.menu.gamemenu import GameMenu
class StartUp:
def __init__(self):
display = pygame.display
(width, height) = (1000, 1000)
self.screen = display.set_mode((width, height))
display.set_caption('Shining Force 2')
self.gameMenu = GameMenu(self)
self.... | JakobHartman/sf2remake | main/startup.py | startup.py | py | 627 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pygame.display",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "ui.menu.gamemenu.GameMenu",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pygame.time.Clock",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pygame... |
75008534623 | #!/usr/bin/env python3
import argparse
import io
import sys
def doit(input_file, output_file, ignore_first_line, target_column, ndigits):
from quoted_line import parse as parse_line
target_index = target_column - 1 if target_column >= 0 else target_column
fmt= "%%.%dg" % ndigits
if ignore_first_line:
next... | Tenchumaru/home | bin/csvtosvm.py | csvtosvm.py | py | 2,327 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "quoted_line.parse",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "argparse.Fi... |
14652418466 | import cv2
import numpy as np
from PIL import Image
from skimage import restoration, exposure
# import scipy.ndimage
from scipy import misc, ndimage
from matplotlib import pyplot as plt
import os
from app import app
import urllib.request
from flask import Flask, flash, request, redirect, url_for, render_template
from ... | aldybw/python-flask-upload-display-image | main.py | main.py | py | 3,188 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.render_template",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "app.app.route",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "app.app",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "flask.request.files",
... |
24564673037 | """Question answering with sources over documents."""
from __future__ import annotations
import inspect
import re
from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional, Tuple
from langchain_core.documents import Document
from langchain_core.language_models import BaseLanguageModel
from lan... | langchain-ai/langchain | libs/langchain/langchain/chains/qa_with_sources/base.py | base.py | py | 7,979 | python | en | code | 68,990 | github-code | 7 | [
{
"api_name": "langchain.chains.base.Chain",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "abc.ABC",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "langchain.chains.combine_documents.base.BaseCombineDocumentsChain",
"line_number": 36,
"usage_type": ... |
23059682593 | """gcodes
Revision ID: a9be8456df5c
Revises: 1eaec2e10b3b
Create Date: 2023-09-18 09:55:14.782180
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a9be8456df5c'
down_revision = '1eaec2e10b3b'
branch_labels = None
depends_on = None
def upgrade() -> None:
#... | xodiumx/parser | src/migrations/versions/a9be8456df5c_gcodes.py | a9be8456df5c_gcodes.py | py | 1,288 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "alembic.op.add_column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.String"... |
74856477021 | import json
def get_control_llm_system_message(cmmc_catalog_filepath):
sys_msg = ""
with open(cmmc_catalog_filepath, 'r') as f:
catalog = json.load(f)
for group in catalog['groups']:
sys_msg += f"Group: {group['title']}\n"
for control in group['controls']:
... | kdn5436/CMMC-Compliance-Project | src/oscalScripts/parse_cmmc_catalog.py | parse_cmmc_catalog.py | py | 748 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "json.load",
"line_number": 6,
"usage_type": "call"
}
] |
38990699190 | import cv2
def getedges(img):
##converts image to greyscale
grey=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
grey=cv2.medianBlur(grey,1)
##grey=cv2.GaussianBlur(grey,(3,3),5,5)
edges = cv2.adaptiveThreshold(grey, 255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY, 9, 9)
##edges=cv2.bitwise_not(edges)
... | ankitydv31/cartoonify123 | Cartoonify-master/Source Code/functions/AddLines.py | AddLines.py | py | 497 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "cv2.cvtColor",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "cv2.medianBlur",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.adaptiveThreshol... |
34952376948 | import asyncio
import itertools
from typing import List, Optional, Tuple, Union
import pandas as pd
import util
from const import HoleDirection, IHSPath, ProdStatRange
__all__ = [
"prodstat_option_matrix",
"status_assignment_detail",
"PRODSTAT_DEFAULT_OPTIONS",
"PRODSTAT_DEFAULT_RATIO_OPTIONS",
]
d... | la-mar/prodstats | src/prodstats/calc/util.py | util.py | py | 3,298 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "typing.Union",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "const.ProdStatRange",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"l... |
42137369581 | import sys
sys.path.append('gen-py')
import datetime
from task_gateway import TaskGateway
from thrift.transport import TSocket, TTransport
from thrift.protocol import TBinaryProtocol
from thrift.server import TServer
class TaskGatewayHandler(TaskGateway.Iface):
def create_task(self, task):
print("Task... | frol/rpc-frameworks-comparison | thrift-task-gateway/task_gateway_server.py | task_gateway_server.py | py | 1,102 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "sys.path.append",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "task_gateway.TaskGateway.Iface",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "task_... |
27194121041 | # -*- coding: utf-8 -*-
"""Additional profile for OnTaskUsers."""
from django.contrib.auth import get_user_model
from django.db import models
class OnTaskUser(models.Model):
"""Extend the existing authtools.User with additional fields."""
# OneToOne relationship with the authentication model
user = mode... | cliffnyendwe/ontask_b | ontask/models/user.py | user.py | py | 1,032 | python | en | code | null | github-code | 7 | [
{
"api_name": "django.db.models.Model",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.models.OneToOneField",
"line_number": 12,
"usage_type": "call"
},
{
"api_nam... |
33819321990 | #cluster mode
# spark-submit --master yarn --deploy-mode cluster binomial_logistic_regression.py
#local mode
# spark-submit binomial_logistic_regression.py
from pyspark.ml.classification import LogisticRegression
from pyspark.sql import SparkSession
from datetime import datetime
start_time = datetime.now... | CanadaAbhi/AbhiCoding | binomial_logistic_regression.py | binomial_logistic_regression.py | py | 1,555 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "datetime.datetime.now",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "pyspark.ml.classification.LogisticRegression",
"line_number": 21,
"usage_type": "call"
},
{
... |
33292665870 | import sys
from PyQt5 import QtWidgets as qw
from qt_material import apply_stylesheet
from miniPoly.core.minion import TimerMinion
class AbstractGUIAPP(TimerMinion):
def __init__(self, name, compiler, refresh_interval=10, **kwargs):
super(AbstractGUIAPP, self).__init__(name, refresh_interval)
se... | nash-yzhang/miniPoly | miniPoly/processor/GUI.py | GUI.py | py | 1,352 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "miniPoly.core.minion.TimerMinion",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QApplication",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 16,
"usage_type": "name"
},
{
"api_... |
18469141104 | # -*- coding:utf-8 -*-
from typing import List
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def pathSum(self, root: TreeNode, sum_value: int) -> List[List[int]]:
if root is None: re... | weizhixiaoyi/leetcode | lcof/1/34.二叉树中和为某一值的路径.py | 34.二叉树中和为某一值的路径.py | py | 1,448 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "copy.deepcopy",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "{'deepcopy': 'copy.deepcopy'}",
"line_number": 62,
"usage_type": "call"
}
] |
12155581840 | import logging
class Module:
"""Base class used for modules in a pipeline.
"""
def __init__(self):
"""Module initialization
"""
self.logger = logging.getLogger()
self.features = []
self.feature_begins_with = []
self.ignore_features = []
def set_logger(... | AlexKoutsman/popmon | popmon/base/module.py | module.py | py | 2,717 | python | en | code | null | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
}
] |
42272020365 | from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name='home'),
path('register/', views.register, name='register'),
path('registration-edit/<int:id>', views.regEdit, name='regEdit'),
path('verify/<str:id>', views.regVerification, name='regVerification'),
path('th... | 9akashnp8/lourde-alumni-portal | main/urls.py | urls.py | py | 496 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"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",
... |
10452408339 | from django.urls import path
from . import views
urlpatterns = [
# path('',views.read, name="home"),
path('new/',views.create, name="new"),
path('update/<int:pk>',views.update, name="update"),
path('delete/<int:pk>',views.delete, name="delete"),
path('detail/<int:pk>',views.detail, name="detail"),
... | hyeonukdev/prography_5th_django | board/urls.py | urls.py | py | 510 | python | en | code | 0 | github-code | 7 | [
{
"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.path",
... |
2086586346 | from fastapi import FastAPI, APIRouter, Request, Response
# importamos los archivos de la carpeta router
from backend.routers import users, audio, reproducir, copyright, count, artista, canciones, facturacion_pagos, personas
from fastapi.responses import FileResponse
# Nos permite exponer archivos estaticos como archiv... | DanielBanariba/soundclound | main.py | main.py | py | 1,809 | python | es | code | 0 | github-code | 7 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "fastapi.APIRouter",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "backend.routers.artista.router",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "... |
32976961998 | #! /usr/bin/env python
import boto
import re
CACHE_CONTROL_VALUE = "max-age=" + str(60*60*24*30) #one month
BUCKET_NAME = 'highlandadventures'
print(CACHE_CONTROL_VALUE)
print(BUCKET_NAME)
s3 = boto.connect_s3()
bucket = s3.get_bucket(BUCKET_NAME)
rs = bucket.list()
def update_img_metadata(key):
if key.name.lo... | tklenke/python-aws | s3updatemetadata.py | s3updatemetadata.py | py | 1,126 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "boto.connect_s3",
"line_number": 11,
"usage_type": "call"
}
] |
26621933781 | #!/usr/bin/env python
# coding: utf-8
import numpy as np
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "3"
import scanpy as sc
import pandas as pd
import torch
import scipy
import time
from STEM.model import *
from STEM.utils import *
scdata = pd.read_csv('./data/mousedata_2020/E1z2/simu_sc_counts.csv',index_col=0)
... | WhirlFirst/STEM | test.py | test.py | py | 2,904 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "os.environ",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
... |
36864638761 | import argparse
import os
import json
import logging
import torch
from seq_simul.statistics.seq_statistics import get_indelsub_statitstics
from seq_simul.utils.align import align_list, mean_editdistance, remove_pads
from seq_simul.utils.convert import convert_onehot_to_read
def get_default_args(parser):
# DO NOT... | gyfbianhuanyun/DNA_storage_simulator_GAN | seq_simul/train/args.py | args.py | py | 11,822 | python | en | code | 4 | github-code | 7 | [
{
"api_name": "json.dump",
"line_number": 117,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 122,
"usage_type": "call"
},
{
"api_name": "argparse.Namespace",
"line_number": 133,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_numbe... |
72951818143 | from functools import cached_property
from typing import Tuple
import numpy as np
from zonda import excepciones
from zonda.cirsoc import geometria
from zonda.enums import (
TipoPresionCubiertaAislada,
ExtremoPresion,
ZonaPresionCubiertaAislada,
PosicionBloqueoCubierta,
TipoCubierta,
)
from zonda.t... | efdiloreto/ZondaPro | zonda/cirsoc/cp/aisladas.py | aisladas.py | py | 14,802 | python | es | code | 9 | github-code | 7 | [
{
"api_name": "zonda.enums.TipoCubierta",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "zonda.enums.PosicionBloqueoCubierta",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "zonda.enums.TipoCubierta.DOS_AGUAS",
"line_number": 45,
"usage_type": "attri... |
17702838026 | """ This module defines the model for training and instantiating A3C agents """
from collections import deque
from statistics import stdev
from blaze.config.config import Config
from blaze.config.train import TrainConfig
from blaze.environment import Environment
from blaze.logger import logger
from .model import Sav... | nkansal96/alohamora | blaze/model/a3c.py | a3c.py | py | 3,807 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "blaze.logger.logger.with_namespace",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "blaze.logger.logger",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "collections.deque",
"line_number": 29,
"usage_type": "call"
},
{
"api_name... |
36436689448 | # SteelEye
# API Developer Assessment
from fastapi import FastAPI, Query, HTTPException
from pydantic import BaseModel, Field, HttpUrl
from typing import Optional, List, Set
import datetime as dt
from datetime import datetime
import random as rd
# from elasticsearch import Elasticsearch
#/////////////////////////////... | CsboyAnand/Akashay-Anand_Backend | backend_API.py | backend_API.py | py | 6,753 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pydantic.BaseModel",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "pydantic.Field",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pydantic.Field",
... |
1292840034 | import re
import time
import warnings
import argparse
import wordcloud
from tqdm import tqdm
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from bs4 import BeautifulSoup
import pandas as pd
warnings.filterwarnings('ignore')
def get_parser():
parser = argparse.ArgumentParse... | tfwang08/github_spider | github.py | github.py | py | 3,996 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "re.... |
24603610699 | from keras.callbacks import EarlyStopping, ModelCheckpoint, TensorBoard
from keras.preprocessing import image
from keras.applications import imagenet_utils
from keras.preprocessing.image import ImageDataGenerator
from keras.layers import Input
from keras.optimizers import Adam
import numpy as np
from sklearn.externals ... | hequn/keras-transfer-learning | models/base_model.py | base_model.py | py | 11,413 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "keras.optimizers.Adam",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "keras.utils.plot_model",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "config.get_fine_tuned_weights_path",
"line_number": 47,
"usage_type": "call"
},
{
"a... |
71345916382 | import re
import nltk
from nltk.corpus import stopwords
import spacy
import textacy
import contractions
punctuations = '''~!@#$%^&*()"_+-=`;':,./<>?'''
text = '''
Dear PayPal User,
We regret to inform you that your PayPal account has been compromised and we have noticed some unauthorized activities. To protect your ... | jag-prabhakaran/PhishNet | backend/preprocessing.py | preprocessing.py | py | 1,354 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "contractions.fix",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "nltk.download",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "nltk.download",
"line_numbe... |
23500619177 | """
"""
from django.conf.urls import patterns, url
from rest_framework.routers import SimpleRouter
from myapp import views
router = SimpleRouter()
router.register(r'projects', views.ProjectViewSet)
router.register(r'tasks', views.TaskViewSet)
router.register(r'users', views.UserViewSet)
urlpatterns = patterns('',
... | agnihotri7/j-api | myapp/urls.py | urls.py | py | 400 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "rest_framework.routers.SimpleRouter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "myapp.views.ProjectViewSet",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "myapp.views",
"line_number": 10,
"usage_type": "name"
},
{
"ap... |
10084760714 | #!/usr/bin/env python
import numpy as np
from . import coreaudio
import threading
import queue
import sys
defBuf = 2048
class StreamArray:
def __init__(self, dtype=np.float32, inBufSize=defBuf, outBufSize=defBuf):
self.dtype = dtype
self.inBufSize = inBufSize
self.outBufSize = outBufSize
... | piannucci/audio | audio/stream.py | stream.py | py | 12,011 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.float32",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "sys.maxsize",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "queue.Queue",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "queue.Queue",
"li... |
2497712651 | from django.core.mail import send_mail
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.shortcuts import render_to_response
def contact(request):
errors = []
if request.method == 'POST':
if not request.POST.get('subject', ''):
errors.append('Enter... | kblauer/hourly | contact/views.py | views.py | py | 1,041 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.core.mail.send_mail",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponseRedirect",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 23,
"usage_type": "call"
},
{
... |
32808568083 | # (c) AlenPaulVarghese
# -*- coding: utf-8 -*-
from pathlib import Path
from typing import List
from pikepdf import Pdf
from tools.scaffold import AbstractTask
class RotatePdf(AbstractTask):
def __init__(self, chat_id: int, message_id: int):
super().__init__(chat_id, message_id)
self.input_file... | alenpaulvarghese/pdf_bot | pdf_bot/tools/rotate.py | rotate.py | py | 817 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "tools.scaffold.AbstractTask",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
... |
22867231923 | import tkinter
from tkinter import *
from PIL import Image, ImageTk
import os
import time
import random
class PageOne():
def __init__(self):
root.geometry("720x576")
root.configure(bg='white')
self.getImg()
self.getBut()
self.placeObj()
def getImg(self):
... | BallThanapat/pscpProjectGame | Hilo[Finish].py | Hilo[Finish].py | py | 27,703 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "PIL.Image.open",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "PIL.ImageTk.PhotoImage",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "PIL.ImageTk",
"li... |
1148502651 | import os
import numpy as np
import matplotlib.pyplot as plt
import win32com.client as win32
import time
aspen = win32.Dispatch('Apwn.Document')
print("--- loading aspen .bkp file ---")
aspen.InitFromArchive2(os.path.abspath('simulation/PBR.bkp'))
print("--- .bkp file loaded---")
def run_simulation(temperature, file... | kadriand/aspen-optimization-nsga2 | samples/pbr_simulation.py | pbr_simulation.py | py | 1,599 | python | en | code | 7 | github-code | 7 | [
{
"api_name": "win32com.client.Dispatch",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "win32com.client",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "os.path.abspath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"... |
70264710943 | # from itertools import combinations
# str, n=input().split()
# strings=sorted(str)
# for i in range(len(strings)):
# print(strings[i], end="\n")
# combi=list(combinations(sorted(str),int(n)))
# for i in range(len(combi)):
# print("".join(combi[i]))
from itertools import combinations
str, n = input().split()
... | MubtasimFuad10/Hackerrank-Python | Itertools/itertools_combinations.py | itertools_combinations.py | py | 435 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "itertools.combinations",
"line_number": 14,
"usage_type": "call"
}
] |
8310073513 | import sqlite3
class DBHelper:
def __init__(self, dbname="todo.sqlite"):
self.dbname = dbname
self.conn = sqlite3.connect(dbname)
def setup(self):
stmt = "CREATE TABLE IF NOT EXISTS items (owner text, description text)"
itemidx = "CREATE INDEX IF NOT EXISTS itemIndex ON items ... | leosartaj/todo_bot | dbhelper.py | dbhelper.py | py | 1,158 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "sqlite3.connect",
"line_number": 7,
"usage_type": "call"
}
] |
26372207682 | import pygame
def main():
pygame.init()
pygame.mixer.init()
pantalla = pygame.display.set_mode([800, 800])
pygame.display.set_caption("Laberinto mamadisimo")
salir = False
reloj1 = pygame.time.Clock()
blanco=(255,255,255)
fuente1=pygame.font.SysFont("calibri",16,True,False)
fuente2... | federico-procs/laberintoTerror | plantilla-pantalla.py | plantilla-pantalla.py | py | 850 | python | es | code | 0 | github-code | 7 | [
{
"api_name": "pygame.init",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pygame.mixer.init",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pygame.mixer",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.set_mode"... |
40852700954 | from flask import render_template, request, url_for, flash, redirect, Blueprint
from werkzeug.exceptions import abort
from models import Posts
from start import db
posts = Blueprint('posts', __name__)
@posts.route('/')
def home():
posts = Posts.query.all()
return render_template('index.html', posts=posts)
... | vadim-romanyuk/Flask_web_blog | views/posts_orm.py | posts_orm.py | py | 1,988 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Blueprint",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "models.Posts.query.all",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "models.Posts.query",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "models.... |
42883887620 | from collections import defaultdict
import sys
sys.setrecursionlimit(10 ** 5)
v, e = map(int, input().split())
graph = defaultdict(list)
count = [0 for _ in range(v+1)]
visited = [0 for _ in range(v+1)]
for _ in range(e):
a, b = map(int, input().split())
count[a] += 1
count[b] += 1
graph[a].append(b)
... | hyeonjun/AlgorithmTest | BaekJoon/AlgorithmType/DFS/DFS_16168.py | DFS_16168.py | py | 821 | python | ko | code | 1 | github-code | 7 | [
{
"api_name": "sys.setrecursionlimit",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 5,
"usage_type": "call"
}
] |
24559978987 | import logging
from typing import Any, Dict, List, Mapping, Optional
from langchain_core.callbacks import CallbackManagerForLLMRun
from langchain_core.language_models.llms import LLM
from langchain_core.pydantic_v1 import Extra, Field, root_validator
from langchain_core.utils import get_from_dict_or_env
from langchai... | langchain-ai/langchain | libs/community/langchain_community/llms/petals.py | petals.py | py | 5,320 | python | en | code | 68,990 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "langchain_core.language_models.llms.LLM",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "... |
42034377699 | import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import matplotlib.gridspec as gridspec
import math
sscf_dark_data = [
[1, 1.892824E7],
[2, 1.4671248E7],
[3, 1.432372E7],
[4, 1.3928736E7],
[4.25, 1.392728E7],
[4.5, 1.3926672E7],
[4.75... | chentianba/coflowgym | gail/expert/expert_analyse.py | expert_analyse.py | py | 4,908 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "math.log10",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "seaborn.set_style",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line... |
9245876240 | import flask
import json
import base64
import flask_cors
app=flask.Flask(__name__)
flask_cors.CORS(app, resources={r"/api/*": {"origins": "*"}})
_RETURN_INVALID_REQUEST_PARAMETER = json.dumps({
'Error': {
'Code': 'NotParameterGet',
'Message': 'Invalid request parameter got, check paramete... | HenryZhuHR/vue-flask | app.py | app.py | py | 1,488 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.request",
"line_number... |
16231459082 | import xml.etree.ElementTree as ET
import os.path
import sys
import random
from classes.Station import Station
from classes.Node import Node
from classes.Link import Link
from classes.Network import Network
from classes.Port import Port
from classes.Flow import Flow
from classes.Target import Target
from classes.Swit... | Yacine-Benbelkacem/wopanets-external-engine | parsing_manager.py | parsing_manager.py | py | 8,684 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "classes.Station.Station",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "classes.Switch.Switch",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "classes.Port.Port",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "class... |
9238338767 | # vim: ft=python expandtab
from xml.etree.ElementTree import SubElement
from uuid import uuid4
from site_init import *
Import('env run_target dev_target')
'''
-I$(top_srcdir) \
-I$(top_srcdir)/libdocument \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \
-DEVINCE_COMPILATION \
$(BACKEND_CFLAGS) \
$... | zsx/evince | shell/SConscript | SConscript | 5,022 | python | en | code | 4 | github-code | 7 | [
{
"api_name": "xml.etree.ElementTree.SubElement",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree.SubElement",
"line_number": 82,
"usage_type": "call"
},
{
"api_name": "uuid.uuid4",
"line_number": 82,
"usage_type": "call"
},
{
"api_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.