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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
30006879954 | import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('data.csv', encoding="cp936")
df = df.dropna()
plt.figure()
df.plot(x=df['date'])
plt.savefig('first.png')
plt.figure()
df1 = df[:]
df1['month'] = df['date'].map(lambda x: x[:x.rindex('-')])
df1 = df1.groupby(by='month', as_index=False).sum()
df1.p... | 1393467261/data_analysis | venv/Include/analize.py | analize.py | py | 782 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "matplotlib.py... |
30777261034 | """Test file to use pytest on Travis CI to test some plugin functions"""
from __future__ import print_function
import pytest
def GetVideoId(q, eventType, order, s_type):
from src.YouTubeApi import GetKey, YouTubeApi
youtube = YouTubeApi(
client_id=GetKey('823351347975-bn15et5mgugmu127cw_OizDn7h39v5siv55vbp51blrtc... | oe-mirrors/enigma2-plugin-youtube | test_plugin.py | test_plugin.py | py | 4,987 | python | en | code | null | github-code | 97 | [
{
"api_name": "src.YouTubeApi.YouTubeApi",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "src.YouTubeApi.GetKey",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "src.YouTubeApi.GetKey",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "s... |
18550880165 | # pyright: reportGeneralTypeIssues=false
from dataclasses import dataclass
from typing import Any
from litestar import (
Controller,
get, # pylint: disable=unused-import
)
from litestar.exceptions import NotFoundException
from litestar.params import Dependency
from livekit import AccessToken, RoomServiceClie... | Sprint-Log/sprintlog-backend | src/app/domain/room/controller.py | controller.py | py | 2,244 | python | en | code | 5 | github-code | 97 | [
{
"api_name": "typing.Any",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "litestar.params.Dependency",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "litestar.... |
73370042240 | import unittest
import flask_testing
import numpy as np
from flask import Flask
from src.muse_as_service import MUSEClient
from src.muse_as_service.app import app
class TestUsage(flask_testing.TestCase):
"""
Class for testing usage via requests library and built-in client.
"""
ip = "localhost"
... | dayyass/muse-as-service | tests/test_usage.py | test_usage.py | py | 2,660 | python | en | code | 52 | github-code | 97 | [
{
"api_name": "flask_testing.TestCase",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "src.muse_as_service.app.app.config",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "src.muse_as_service.app.app",
"line_number": 35,
"usage_type": "name"... |
21757976177 | from os import F_OK, access
import sys
# relax module imports.
from data_store import Relax_data_store; ds = Relax_data_store()
import dep_check
from info import Info_box
from lib.errors import RelaxError, RelaxFileError, RelaxFileOverwriteError, RelaxNoModuleInstallError, RelaxNoPipeError
from lib.io import get_file_... | nmr-relax/relax | pipe_control/bmrb.py | bmrb.py | py | 9,401 | python | en | code | 10 | github-code | 97 | [
{
"api_name": "data_store.Relax_data_store",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "status.Status",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "pipe_control... |
26313168374 | import math
from opentrons.types import Point
# metadata
metadata = {
'protocolName': 'Lexogen QuantSeq 3`mRNA FWD NGS Library Prep',
'author': 'Nick <protocols@opentrons.com>',
'source': 'Custom Protocol Request',
'apiLevel': '2.12'
}
def run(ctx):
[p20_single_mount, p300_multi_mount, magdeck_g... | Opentrons/Protocols | protocols/6030b7/ngs_library_prep.ot2.apiv2.py | ngs_library_prep.ot2.apiv2.py | py | 9,349 | python | en | code | 53 | github-code | 97 | [
{
"api_name": "math.ceil",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "opentrons.types.Point",
"line_number": 165,
"usage_type": "call"
},
{
"api_name": "opentrons.types.Point",
"line_number": 233,
"usage_type": "call"
},
{
"api_name": "opentrons.typ... |
74885269757 | from typing import List, Dict, Tuple
class StatisticsService:
"""
Class for statistics
Args:
car_instance_list (list): Car instance list
driver_instance_list (list): Dirver instance list
"""
def __init__(self, car_instance_list: list, driver_instance_list: list):
"""
... | davidp-ro/dpit-sdb-final | src/services/statistics.py | statistics.py | py | 4,670 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.Tuple",
"line_number": 48,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 66,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 81,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number"... |
17045731010 | # IMPORT
from langchain.chat_models import ChatOpenAI
from langchain.prompts import ChatPromptTemplate
def load_prompt():
with open("prompt.txt", "r") as text_file:
prompt = text_file.read()
return prompt
def ask_OpenAI(question, openai_api_key):
chat = ChatOpenAI(temperature=0.0, openai_api_key... | ylgatatooine/Kepler11b | tools/Euler-math-tutor/src/ai.py | ai.py | py | 574 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "langchain.chat_models.ChatOpenAI",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "langchain.prompts.ChatPromptTemplate.from_template",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "langchain.prompts.ChatPromptTemplate",
"line_number": 15,... |
3369663366 | # -*- coding: utf-8 -*-
"""
Created on Sun Aug 6 22:49:13 2017
@author: Yew
"""
"""
This is the main program.
"""
import sys
from PyQt5.QtWidgets import QApplication, QWidget, QToolTip, QPushButton
from PyQt5.QtGui import QFont
from PyQt5.QtCore import QCoreApplication
import dataspider
import trading... | Ghostsintheshell/exercise | main.py | main.py | py | 2,278 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.date.today",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "dataspider.dataspider",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "tradingrecord... |
7571026416 | import tensorflow as tf
import numpy as np
import math
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix, accuracy_score
import matplotlib.pyplot as plt
import seaborn as sns
import os
from get_csv_data import HandleData
from time import time
def corrupt(x, se... | anakings/anabel-810-tp555 | projeto_final/my_solution/main.py | main.py | py | 8,732 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tensorflow.add",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tensorflow.cast",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tensorflow.random_uniform",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tensorflow.s... |
15510927301 | # pylint: disable=line-too-long
"""
Will store all the functions related to modify and play with group layer of
Synfig/precomp layer of Lottie
"""
import sys
import settings
from common.misc import is_animated
from common.Vector import Vector
import common
sys.path.append("..")
def get_offset():
"""
Computes... | synfig/synfig | synfig-studio/plugins/lottie-exporter/synfig/group.py | group.py | py | 2,980 | python | en | code | 1,601 | github-code | 97 | [
{
"api_name": "sys.path.append",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "settings.ADDITIONAL_PRECOMP_WIDTH",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "... |
28080683940 | from typing import Dict
from torch import nn
from .registry import register_body
from ..vision.encoder import build_encoder
from ..interface import build_decoder
from ..utils import configurable
class XdecoderHead(nn.Module):
@configurable
def __init__(
self,
num_classes: int,
pixel... | ByungKwanLee/Interactable-Unified-Vision-Language | modeling/body/xdecoder_head.py | xdecoder_head.py | py | 1,820 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "torch.nn.Module",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"li... |
69957137919 | import pygame, random, sys, os
from pygame.locals import*
pygame.mixer.pre_init(44100, -16, 2, 2048)
pygame.init()
#set main directory and load sounds from 'sounds folder'
main_dir = os.path.dirname(os.path.abspath("__file__"))
bump1 = pygame.mixer.Sound(os.path.join(main_dir, "bump.wav"))
hit1 = pygame.mixer.Sound(os.... | colourOfLooseMetal/pong | PongLegacy.py | PongLegacy.py | py | 13,419 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pygame.mixer.pre_init",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "pygame.mixer",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "pygame.init",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
... |
26905043694 | from hitchbuildpg.server import PostgresServer
from commandlib import Command
from path import Path
import hitchbuild
class PostgresDatafiles(hitchbuild.HitchBuild):
def __init__(self, build_path, postgresapp, databuild):
self.buildpath = Path(build_path).abspath()
self._databuild = databuild
... | hitchdev/hitchbuildpg | hitchbuildpg/datafiles.py | datafiles.py | py | 1,980 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "hitchbuild.HitchBuild",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "path.Path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "hitchbuildpg.server.PostgresServer",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": ... |
10312806271 | import json
from flask import jsonify, request, current_app
from flask.views import MethodView
from . import books
from .models import Publisher
from .serializers import pub_schema, pubs_schema
from books.app import db
# crud
##########
# Publishers
##########
# list
@books.route('/api/publishers', methods=['GET'... | ganzaro/flask_books | books/blueprints/books/api/z-controllers.py | z-controllers.py | py | 1,933 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "models.Publisher.query.all",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "models.Publisher.query",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "models.Publisher",
"line_number": 21,
"usage_type": "name"
},
{
"api_name"... |
40424876044 | import logging
from abc import ABC, abstractmethod
import aioftp
import aiohttp
import aiosnmp
from jinja2 import Template
from scrapli.driver.core import AsyncIOSXEDriver
from ..remote_apis.snmp import DeviceSNMP
from .snmp import get_port_vlans, bytes_to_portlist, portlist_to_bytes
from ..db.models.ztp import Model,... | nekonekun/ztp2 | ztp2/utils/ztp.py | ztp.py | py | 9,957 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "abc.ABC",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "abc.abstractmethod",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "abc.abstractmethod",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "abc.abstractmethod",
... |
23007734071 | import os
import readline
# CAT
def cat(file):
try:
with open(file, "r") as f:
read = f.read()
print(read)
except FileNotFoundError:
print(f"ERROR: File '{file}' not found.")
except Exception as e:
print(e)
# LS
def ls(path="."):
try:
file... | rV4nxZ/PCLFC | commands.py | commands.py | py | 8,443 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.listdir",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number": 44,... |
44181256654 | import pandas as pd
import random
from sklearn import metrics
# --------------
from transformers import BertTokenizer
from transformers.configuration_albert import AlbertConfig
from transformers.modeling_albert import AlbertForMaskedLM
from transformers.modeling_albert import load_tf_weights_in_albert
# --------------
... | BeatriceCai/defense | code/utils_DRD.py | utils_DRD.py | py | 8,202 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.DataFrame",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "data_tool_box_DRD.load_j... |
71597361919 | import json
import logging
import os
import time
from datalad.interface.base import Interface
from datalad.interface.base import build_doc
from datalad.interface.results import get_status_dict
from datalad.support.exceptions import (
CapturedException,
InvalidGitRepositoryError,
MissingExternalDependency,
... | datalad/datalad | datalad/local/check_dates.py | check_dates.py | py | 6,960 | python | en | code | 464 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.walk",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "datalad.support.exceptions.MissingExternalDependency",
"line_number": 34,
"usage_type": "call"
},
{
"ap... |
3236406230 | import time
from concurrent.futures import thread
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.action_chains import ActionChains
from sele... | Jostafarr/ai-demonstrator | GWebSRC_scraper/src/arbeitsagentur.py | arbeitsagentur.py | py | 5,403 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 36,
"usage_type": "name"
},
{... |
72795094080 | import snscrape.modules.twitter as sntwitter
import pandas as pd
import text2emotion as te
import threading
def get_tweets(user):
print("User: " + user)
query = f"(from:{user}) since:2018-7-1 until:2022-11-30"
# Creating list to append tweet data to
tweets_list = []
print("grabbing tweets")
i ... | eduardperreca/data-visualization | Visualizzazione Scientifica/scripts/twitterScraper.py | twitterScraper.py | py | 1,120 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "snscrape.modules.twitter.TwitterSearchScraper",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "snscrape.modules.twitter",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "pandas.DataFrame",
"line_number": 22,
"usage_type": "call"
},
... |
40362285130 | # MOVE INTO src/video_embedder DIR TO TEST
from vid_embed import VideoEmbedder
import cv2
import numpy as np
if __name__ == '__main__':
cap = cv2.VideoCapture(0) # camera
model = cv2.imread('model.png') # model image
carousel = [cv2.VideoCapture('video... | 180D-FW-2020/Team8 | test/test_vid_embed.py | test_vid_embed.py | py | 518 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "vid_embed.VideoEmbedder",
... |
22176739192 |
import logging
import pandas as pd
import json
import pickle
import sklearn
LOGGER = logging.getLogger(__name__)
def execute(data: dict):
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
logger.info('event parameter: {}'.format(data))
# print("Received event: " + json.dumps(event, indent... | home365Dev/data-applicant-scoring | src/data_applicant_scoring/app.py | app.py | py | 1,702 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "json.dumps",
... |
26336859204 | """Parser for virtual-machine sub-command."""
import argparse
from emulation_system.commands import EmulationSystemCommand
from .abstract_parser import AbstractParser
from .parser_utils import get_formatter
class EmulationSystemParser(AbstractParser):
"""Parser for virtual-machine sub-command."""
@classmet... | Opentrons/opentrons-emulation | emulation_system/emulation_system/parsers/emulation_system_parser.py | emulation_system_parser.py | py | 1,513 | python | en | code | 12 | github-code | 97 | [
{
"api_name": "abstract_parser.AbstractParser",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "parser_utils.get_formatter",
"line_number": 19,
"usage_type": "call"
},
{... |
9056205086 | # The Nature of Code
# Daniel Shiffman
# http://natureofcode.com
import pygame
import random as rnd
width = 640
height = 360
window = pygame.display.set_mode((width,height))
def setup():
global width
global height
def draw():
global width
global height
global window
# Get a gaussian rand... | brainyandnerdy/TheNatureOfCode | 00.Introduction/I.4.Gaussian.py | I.4.Gaussian.py | py | 895 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pygame.display.set_mode",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "random.gauss",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pygame.draw.... |
10780460082 | from tkinter import EXCEPTION
from django.shortcuts import render
import requests
from .models import City
from .forms import CityForm
import os
apiId = os.environ['weatherapp_api_key']
def index(request):
url = 'http://api.openweathermap.org/data/2.5/weather?q={}&units=imperial&appid=%s' %apiId
cities = Ci... | sushmita56/WeatherApp | weather/weatherapp/views.py | views.py | py | 2,422 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.environ",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "models.City.objects.all",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "models.City.objects",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "model... |
9329030231 | import os
import shutil
from typing import List
from ini import Server, SERVERS
def sync_macros(servers: List[Server]):
local_path = "C:\\Users\\Gregg\\AppData\\Local\\VeryVanilla\\Emu\\Release\\Macros"
for file in os.listdir(local_path):
if file.endswith(".mac") or file.endswith(".inc"):
... | pronym-inc/eq-config-generator | sync_macros.py | sync_macros.py | py | 1,108 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "ini.Server",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "os.listdir",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 13,... |
72788911358 | import random
from flask import Flask, render_template, request, redirect, url_for
app = Flask(__name__)
# Define the grid size
GRID_SIZE = 20
# Initialize the Snake game
class SnakeGame:
def __init__(self):
self.snake = [(GRID_SIZE // 2, GRID_SIZE // 2)]
self.food = self.generate_food()
... | ashubambal/Fundamental-Python | snake_game_project/app.py | app.py | py | 1,747 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "flask.redirect",
... |
33458811744 | # Defines some classes to be used to store the results of parsing
import networkx as nx
import tempfile as tf
import copy
from collections import defaultdict
import hashlib
from loguru import logger
import claripy
import semantics.mappings as maps
from semantics.typing import Typing, BitVec, Bool
class Instruction... | FPSG-UIUC/synthCT | semantics/containers.py | containers.py | py | 21,323 | python | en | code | 8 | github-code | 97 | [
{
"api_name": "copy.deepcopy",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "hashlib.md5",
"line_number": 108,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 115,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_n... |
37649823673 | import math
import torch
from torch import nn as nn
import torch.nn.functional as F
MAX_VAL = 1e4
class PointWiseFeedForward(nn.Module):
def __init__(self, hidden_units, dropout_rate):
super(PointWiseFeedForward, self).__init__()
self.conv1 = nn.Conv1d(hidden_units, hidden_units, kernel_size=1)
... | JiachengLi1995/CAFE | src/models/local_sasrec.py | local_sasrec.py | py | 7,012 | python | en | code | 18 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv1d",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
4654436955 |
# pytest -v --driver Chrome --driver-path C:\\chromedrivers\\chromedriver.exe\\chromedriver tests/test_selenium_simple.py
from selenium import webdriver
import time
from selenium.webdriver.common.by import By
import pytest
def test_search_example():
""" Search some phrase in google and make a screenshot of the ... | OlShar/Modul_24 | tests/test_selenium_simple.py | test_selenium_simple.py | py | 1,197 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "selenium.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "time.sleep"... |
71138832638 | import json
import logging
import os
import uuid
import mz2geohash
import requests
from django.conf import settings
from django.template.loader import render_to_string
from xhtml2pdf import pisa
from gis_app.exceptions import ExternalServiceError
from gis_app.models import (UserPosition, UserPositionExport, Vehicle,
... | ivan-nab/gis_project | gis_project/gis_app/services.py | services.py | py | 3,353 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.conf.settings.OPENROUTESERVICE_API_KEY",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 24,
"usage_type": "call"
},
{
... |
41709108989 | import requests
from aip import AipSpeech
import speech_recognition as sr
# pip install azure-cognitiveservices-speech
import azure.cognitiveservices.speech as speechsdk
class BaiduASR:
def __init__(self, APP_ID, API_KEY, SECRET_KEY):
self.APP_ID = APP_ID
self.API_KEY = API_KEY
self.SECRET... | MedalCollector/Orator | speechmodules/speech2text.py | speech2text.py | py | 6,603 | python | en | code | 148 | github-code | 97 | [
{
"api_name": "aip.AipSpeech",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "speech_recognition.Recognizer",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "speech_recognition.Microphone",
"line_number": 18,
"usage_type": "call"
},
{
"api_nam... |
22700944953 | import numpy as np
from matplotlib import pyplot as plt
num_epocs = 30
#file='./results/multilayer_perceptron/multilayer_perceptron_' + repr(num_epocs) + 'e.txt'
file='./results/multilayer_perceptron/training/tanh/multilayer_perceptron_128n_30e_f_tanh.txt'
epocas = np.loadtxt(file, delimiter='\t', skiprows=0,usecol... | jmv74211/Redes_neuronales | src/plot_result.py | plot_result.py | py | 1,132 | python | en | code | 10 | github-code | 97 | [
{
"api_name": "numpy.loadtxt",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
... |
1142711894 | from typing import Optional
import sys
from os.path import dirname, abspath
dir = dirname(dirname(abspath(__file__)))
sys.path.append(dir)
from utils.tree import TreeNode
class BinaryTreeLevelOrder:
def __init__(self) -> None:
pass
#
# 3
# / \
# 9 20
# ... | CEmocca/leetcode-practice-python | medium/102_binary_level_order.py | 102_binary_level_order.py | py | 1,035 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.dirname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_num... |
71438438398 | import pickle
import time
from unittest import SkipTest
import sys
import os
import numpy as np
import pytest
import randomstate.entropy as entropy
from randomstate.prng.mlfg_1279_861 import mlfg_1279_861
from randomstate.prng.mrg32k3a import mrg32k3a
from randomstate.prng.mt19937 import mt19937
from randomstate.prng... | bashtage/ng-numpy-randomstate | randomstate/tests/test_smoke.py | test_smoke.py | py | 33,452 | python | en | code | 43 | github-code | 97 | [
{
"api_name": "pytest.fixture",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.bool",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "numpy.int8",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "numpy.int16",
"lin... |
43338861665 | from sklearn import datasets
import numpy as np
iris=datasets.load_iris()
X=iris.data[:,:2]
Y=(iris.target!=0)*1
class LogisticRegression(object):
def __init__(self,lr=0.01,itr_count=10000):
self.lr=lr
self.itr_count=itr_count
self._intercept=None
self._coef=None
def ad... | KoushikMuthakana/MachineLearning | Logistic Regression/logistic_regression.py | logistic_regression.py | py | 1,663 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sklearn.datasets.load_iris",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sklearn.datasets",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "numpy.ones",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.concatenat... |
30083604222 | # project : baekjoon python algorithm practice
# user : marble
# date : 20. 3. 9.
# time : 오전 12:20
# problem : https://www.acmicpc.net/problem/1103
# problem type : DP, BFS
# 다들 dfs로 풀었다는데 bfs로도 충분히 가능한 문제
from collections import deque
import sys
sys.setrecursionlimit(1000000)
n, m = map(int, sys.stdin.readline().sp... | marble25/AlgorithmPractice | 1103.py | 1103.py | py | 1,660 | python | ko | code | 0 | github-code | 97 | [
{
"api_name": "sys.setrecursionlimit",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.stdin.readline",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "sys.stdin.rea... |
39653069316 | import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
len = np.array([8, 10, 12, 18, 22, 24, 27])
masa = np.array([0.51, 0.82, 1.16, 2.64, 3.98, 4.69, 6.17])
diam = np.array([1.3, 1.6, 1.8, 2.6, 3.1, 3.3, 3.5])
plt.scatter(masa, len, label="Mediciones")
plt.xlabel('Masa (gr)', fontsi... | BCastagninoRossi/TP1_Fisica1 | ej2.py | ej2.py | py | 2,218 | python | es | code | 0 | github-code | 97 | [
{
"api_name": "numpy.array",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.scatter",
"lin... |
3341512516 | __author__ = 'NM242826'
import matplotlib.pyplot as plt
import numpy as np
plt.ion()
n = 100
x = range(n)
y = [np.sin(i) for i in x]
fig, ax = plt.subplots()
ax.set_xlim((0,n))
for k in range(n):
plt.plot(x[0:k], y[0:k], 'g-', linewidth=1.5, markersize=4)
ax.set_xlim((0, k))
plt.pause(0.... | Rastafouille/Mecanum_robot | Python/Old/test_plot_03.py | test_plot_03.py | py | 349 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "matplotlib.pyplot.ion",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "numpy.sin",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subp... |
26333198114 | import asyncio
from pathlib import Path
import secrets
from typing import Callable, Dict, IO, List
import pytest
from tests.integration.dev_server import DevServer
from tests.integration.robot_client import RobotClient
from tests.integration.protocol_files import get_py_protocol, get_json_protocol
@pytest.mark.para... | Opentrons/opentrons | robot-server/tests/integration/http_api/protocols/test_persistence.py | test_persistence.py | py | 7,647 | python | en | code | 363 | github-code | 97 | [
{
"api_name": "typing.Callable",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.IO",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "tests.integration.robot_client.RobotClient.make",
"line_number": 23,
"usage_type": "call"
},
{
"api_nam... |
75020460797 | import uvicorn
from fastapi import FastAPI, Form
from standarting_phone import unify_phone
from fastapi.responses import Response
app = FastAPI()
@app.post("/unify_phone_from_form")
def return_the_phone(phone: str = Form(...)):
# content_type = .headers.get('Content-Type')
# if content_type is None:
... | Reystlin010/req_form | server.py | server.py | py | 826 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "fastapi.Form",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "standarting_phone.unify_phone",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "fastapi.res... |
2488263349 | import sys
import os
import subprocess
import argparse
description = 'A quick and dirty way to create a living youtube playlist downloader'
def main():
parser = argparse.ArgumentParser(description=description)
parser.add_argument('-p','--path of Playlist.txt',
help='Path of Playlist.txt file and folde... | shayekharjan/Playlist.py | Playlist.py | Playlist.py | py | 600 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "subprocess.call",... |
38349296300 | import pandas as pd
import time
from utils.query_processing import get_wordnet_pos, process_query, expand_query
from basic_bm25 import bm25_basic, get_result
from utils.query_processing import get_wordnet_pos, process_query, expand_query
from bm25_with_pseudo_relevance import bm25_pseudo_relevance_back
tf_relevance_fe... | jeroee/SUTD_Elective_Recommendation_System | scripts/retrieval_speed.py | retrieval_speed.py | py | 2,472 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_n... |
12288885693 | import torch
config = {
'PongNoFrameskip-v4' : ('models/pong.pth' , 10 ** 5),
'FreewayNoFrameskip-v4' : ('models/freeway.pth' , 10 ** 5),
'KrullNoFrameskip-v4' : ('models/krull.pth' , 4 * 10 ** 5),
'AtlantisNoFrameskip-v4' : ('models/atlantis.pth' , 4 * 10 ** 5),
'TutankhamNoFra... | cla7aye15I4nd/CloseAI | src/agent.py | agent.py | py | 1,416 | python | en | code | 6 | github-code | 97 | [
{
"api_name": "torch.cat",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.tensor",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.zeros",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.uint8",
"line_number": 1... |
14896940139 | import gradio as gr
from dotenv import load_dotenv
from components.reader.reader import reader
from components.adapter.adapter import adapter
from components.embedder.embedder import embedder
from components.vector_database.vector_database import vector_database
from components.llm.llm import llm
import pandas as pd
im... | Alok-Joshi/GenAIDemos | query_flow_gradio.py | query_flow_gradio.py | py | 5,074 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "components.llm.llm.llm",
"... |
23735981628 | import openai
import streamlit as st
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from models import QAEmbeddingsDemo
openai.api_key = st.secrets["OPENAI_API_KEY"]
openai_embeddings_model = st.secrets["OPENAI_EMBEDDINGS_MODEL"]
db_url = st.secrets["POSTGRES_DATABASE_URL"]
st.set_page_c... | JordanSpencerWu/learn-ai-python | pages/10_Storing_QA_Embeddings_Demo.py | 10_Storing_QA_Embeddings_Demo.py | py | 1,719 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "openai.api_key",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "streamlit.secrets",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "streamlit.secrets",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "stream... |
32585476296 | import datetime
from os import path
from .filenameParser import FilenameParser
from .fops import getFileList, moveFile
from .subtitle import Subtitle
class Movie():
file = None
estimatedTitle = None
estimatedTitleFrags = None
databaseTitle = None
databaseId ... | saschiwy/MovieSort | MovieSortCore/movie.py | movie.py | py | 4,072 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "filenameParser.FilenameParser",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_na... |
18820859328 | # @Time : 2018/9/11 下午5:08
# @Author : SuanCaiYu
# @File : setup
# @Software: PyCharm
from pkgutil import walk_packages
from setuptools import setup
def find_packages(path):
# This method returns packages and subpackages as well.
return [name for _, name, is_pkg in walk_packages([path]) if is_pkg]
se... | SuanCaiYu0413/scrapy_utils | setup.py | setup.py | py | 684 | python | en | code | 7 | github-code | 97 | [
{
"api_name": "pkgutil.walk_packages",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": 14,
"usage_type": "call"
}
] |
43048185614 | from __future__ import print_function, division
import pickle
from pdb import set_trace
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
import time
from random import shuffle
from ABCD import ABCD
from funcs import *
import lda
from demos import cmd
class Cross_exp(object):
def __... | ai-se/Val_LDA_hpc | src/val_lda.py | val_lda.py | py | 7,001 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.array",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "ABCD.ABCD",
"line_number":... |
22826409200 | from datetime import datetime
import requests
'''
fetches partners
'''
def get_partners():
URL = "https://candidate.hubteam.com/candidateTest/v3/problem/dataset"
user_key = "28241e17a346c06a15c2c8657f5c"
PARAMS = {'userKey': user_key}
r = requests.get(url=URL, params=PARAMS)
data = r.json()
... | dhumindesai/Problem-Solving | hubspot/problem.py | problem.py | py | 3,472 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "datetime.dateti... |
36755791363 | import requests
import time
def getidlist(lens,kwd,header):
i = 0
idlist = []
while i < lens:
print(i)
url = 'https://xueshu.baidu.com/s?wd=' + kwd + '&pn=' + str(i) + '&tn=SE_baiduxueshu_c1gjeupa&ie=utf-8&filter=sc_type%3D%7B1%7D&sc_f_para=sc_tasktype%3D%7BrecommendKeyword%7D&bcp=2&sc_hit=1'
html = requests... | buaa-system-analysis/Python | getPaper.py | getPaper.py | py | 580 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
}
] |
69894678719 | import requests
import json
import urllib.parse
from wiki_core import *
class Wikifier():
def api(self, text, key='almmyawmnxyoytgnlkmnjasnrgnjcv'):
url = 'http://www.wikifier.org/annotate-article?lang=en&text=' + urllib.parse.quote(text, safe='')
url += '&wikiDataClasses=false&... | hoangthangta/Wikidata2Text | entity_linking/wikifier.py | wikifier.py | py | 1,155 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "urllib.parse.parse.quote",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "urllib.parse.parse",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "urllib.parse",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "request... |
17980374240 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
【基础题】:学习 wordcloud 基本用法,然后生成一张词云图
"""
from wordcloud import WordCloud
import matplotlib.pyplot as plt
def get_text(file_path):
return open(file_path).read()
def get_word_cloud(text):
cloud_generator = WordCloud(background_color='white')
# 生成词云
wo... | standbyside/crossin-weekly-practice | solutions/生成词云.py | 生成词云.py | py | 675 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "wordcloud.WordCloud",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.imshow",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "matplo... |
73661102080 | import uvicorn
from fastapi import FastAPI, WebSocket,WebSocketDisconnect
from starlette.middleware.cors import CORSMiddleware
from api.endpoints import cookApi, waiterApi, noticeApi, profilesApi, loginApi, adminApi
from fastapi.responses import HTMLResponse
from settings import html
from ConnectionManager import... | Deng-King/RestaurantProjectAPI | backend/main.py | main.py | py | 1,417 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "starlette.middleware.cors.CORSMiddleware",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "api.endpoints.loginApi.router",
"line_number": 17,
"usage_type": "attribute"
... |
35844179958 | import connect_db as conn
import time
import os
import send_email as se
import pandas as pd
import numpy as np
import json
import re
from openpyxl.utils import get_column_letter, column_index_from_string
from openpyxl import load_workbook
from xlrd import open_workbook
from itertools import groupby
upload_task = {}
o... | tangweicpp/cmp_py | handle.py | handle.py | py | 27,344 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "os.environ",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "connect_db.MssConn.query",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "connect_db.MssConn",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "conn... |
5958796440 | #!/usr/bin/python3
import unittest
from console import HBNBCommand
from models import storage
from io import StringIO
from unittest.mock import patch
class TestDoCreate(unittest.TestCase):
"""Test the do_create function"""
def setUp(self):
"""Set up for the tests"""
self.console = HBNBCommand... | Herman100/AirBnB_clone_v2 | tests/test_console/test_console.py | test_console.py | py | 1,369 | python | en | code | null | github-code | 97 | [
{
"api_name": "unittest.TestCase",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "console.HBNBCommand",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "unittest.mock.patch",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "io.Stri... |
20480083603 | import datetime
from MFramework.database.alchemy.mixins import Cooldown, Snowflake
from mlib.database import Base, Default
from sqlalchemy import (
TIMESTAMP,
Column,
Enum,
Float,
ForeignKey,
Integer,
String,
UnicodeText,
)
from sqlalchemy.orm import relationship
from . import types
fr... | Mmesek/MBot.py | bot/database/items.py | items.py | py | 3,344 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "mlib.database.Default",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "MFramework.database.alchemy.mixins.Cooldown",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "mlib.database.Base",
"line_number": 24,
"usage_type": "name"
},
{
... |
33306732598 | from utils import read_file, timer
from itertools import chain
from math import sqrt
from itertools import count
def divisors(n):
return set(chain.from_iterable((i,n//i) for i in range(1,int(sqrt(n))+1) if n%i == 0))
def count_presents(n):
div = list(divisors(n))
tot = 0
for d in div:
tot += d... | FilippoSimonazzi/Python_Projects | AdventOfCode_2015/2015_20_p1.py | 2015_20_p1.py | py | 536 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "itertools.chain.from_iterable",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "itertools.chain",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "math.sqrt",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "utils.read_file"... |
14459212628 | """
Usage: python seam_carving.py <rs> <r/c> <scale> <image_in> <image_out> <energy_map_type> <y/n>
Or:python seam_carving.py <rm> <image_in> <image_out> <image_mask>
<rm/rs> rm represents remove rs represents resize
<r/c> 删除列还是删除行
<scale> 缩小为原来的多少(0,1)之间的浮点数
<energy_map_type> c:calc_energy b:backward_energy f:forward_... | yiffffffff/task01 | seam_carving.py | seam_carving.py | py | 12,548 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.array",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "numpy.rot90",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_numbe... |
37251348594 | """
Demo showing how km_dict and insegtannotator may be used together for
interactive segmentation.
@author: vand and abda
"""
import sys
import insegtprobannotator
import skimage.io
import skimage.data
import km_dict
import feat_seg
import numpy as np
import glob
#%% EXAMPLE: nerve fibres
# /Users/abda/Documents/P... | vedranaa/InSegt | pycode/insegt_batch_script.py | insegt_batch_script.py | py | 4,829 | python | en | code | 9 | github-code | 97 | [
{
"api_name": "glob.glob",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "skimage.io.io.imread",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "skimage.io.io",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "skimage.io",
"l... |
36578009347 | # Databricks notebook source
# MAGIC %run ./imports_variables
# COMMAND ----------
dbutils.widgets.text('count', '')
count = int(dbutils.widgets.get('count'))
# COMMAND ----------
import csv
import uuid
from random import *
import time
from pathlib import Path
from datetime import datetime
# count = 0
Path(event_s... | gary918/AzureDatabricks | notebooks/02_generate_event_data.py | 02_generate_event_data.py | py | 1,208 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pathlib.Path",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "datetime.datetim... |
16445293377 | from flask import Flask, render_template, url_for, redirect, request
from datetime import datetime
from auth import *
from vk_api import VkApi
from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType
app = Flask(__name__)
vk_session = VkApi(token=TOKEN)
@app.route('/vk_stat/<int:group_id>')
def vk_stat(group_id)... | handwriter/task-vk-nine | main.py | main.py | py | 1,245 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "vk_api.VkApi",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 32,
"usage_type": "call"
}
] |
2603858026 | import re,random
from modules.images import FilenameGenerator
from PIL import Image
from modules import processing,shared,generation_parameters_copypaste
from modules.shared import opts,state
from modules.sd_samplers import samplers,samplers_for_img2img
import logging
def wh_chg_n(p):
return
def wh_chg_w(p):
i... | lilly1987/AI-WEBUI-scripts-Random | my.py | my.py | py | 2,347 | python | en | code | 10 | github-code | 97 | [
{
"api_name": "random.random",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "modules.shared.opts.CLIP_stop_at_last_layers",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "modules.shared.opts",
"line_number": 25,
"usage_type": "name"
},
{
... |
74129753279 | import json
import requests
import botogram
from datetime import datetime
TOKEN = "enter your bot token here.. "
# get the token ...
bot = botogram.create( TOKEN )
type_of_loads = {
"SEA": "Seats Available",
"SDA": "Standing Available",
"LSD":"Limited Standing"
}
type_of_bus = {
"SD" : "SD.png",
... | DhilipBinny/TelegramBot-Sg-Bus-Timing-BOTOGRAM | app.py | app.py | py | 5,874 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "botogram.create",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "botogram.Buttons",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "botogram.Buttons",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "botogram.Buttons",
... |
74648706877 | import tensorflow as tf
from sklearn.metrics import confusion_matrix
import numpy as np
from sklearn.decomposition import PCA
from sklearn.cross_validation import train_test_split
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score
from skimage.feature import hog
import json
i... | asalzmann/LSDA21 | mihai/knn.py | knn.py | py | 4,456 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "skimage.feature.hog",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "skimage.feature.hog",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.array",
... |
21722492336 | #!/usr/bin/env python
import pickle
import os
import numpy as np
from keras.backend.tensorflow_backend import set_session
import tensorflow as tf
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
set_session(tf.Session(config=config))
from keras.preprocessing.sequence import pad_sequences
from keras.cal... | r06725028/ML2018SPRING | final/src/main.py | main.py | py | 1,907 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tensorflow.ConfigProto",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "keras.backend.tensorflow_backend.set_session",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tensorflow.Session",
"line_number": 10,
"usage_type": "call"
},
{
... |
18781647229 | __author__ = 'achmed'
import zmq
from zmq.devices import Device
from ...config.configwrapper import ConfigWrapper
import logging
logger = logging.getLogger(__name__)
class ZMQSampleBroker(object):
def __init__(self, cfg):
self.cfg = ConfigWrapper(other=cfg.get('zmq'))
self.pulladdr = cfg.get('... | xandercrews/griffinmcelroy | python/griffinmcelroy/services/broker/__init__.py | __init__.py | py | 978 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "config.configwrapper.ConfigWrapper",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "zmq.devices.Device",
"line_number": 22,
"usage_type": "call"
},
{
"api_name"... |
2590669005 | from os import getenv
from dotenv import load_dotenv
load_dotenv()
API_ID = int(getenv("API_ID"))
API_HASH = getenv("API_HASH")
TOKEN = getenv("TOKEN")
MONGO_DB_URL = getenv("MONGO_DB_URL", None)
OWNER_ID = int(getenv("OWNER_ID", 5938660179))
SUPPORT_CHAT = getenv("SUPPORT_CHAT", "https://t.me/FallenAssociation")... | Abishnoi69/VoteBot | config.py | config.py | py | 437 | python | en | code | 16 | github-code | 97 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 11... |
21547559033 | import os
import time
from tqdm import tqdm
import torch
import pickle
import numpy as np
from torch import nn
import torch.nn.functional as F
import matplotlib.pyplot as plt
from torch.utils.data import TensorDataset,DataLoader
print(torch.__version__) # This code has been updated for PyTorch 1.0.0
# trainFeats, tra... | GuilhermeSenna/Testes-TCC | teste_classificacao.py | teste_classificacao.py | py | 7,602 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "torch.__version__",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "pickle.load",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"lin... |
73963831677 | # -*- coding: utf-8 -*-
import pytest
import collections
import itertools
import sys
from lxml import etree
import numpy as np
import xmlserdes as X
import xmlserdes.utils as XU
from xmlserdes.errors import XMLSerDesError, XMLSerDesWrongChildrenError
import re
make_TD = X.TypeDescriptor.from_terse
def list_prod... | bennorth/python-xml-serdes | tests/test_type_descriptors.py | test_type_descriptors.py | py | 22,975 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "xmlserdes.TypeDescriptor",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "itertools.product",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "xmls... |
22992982028 | from pyspark.sql import SparkSession
import pandas
import sys
user_declared_state = sys.argv[1]
print(user_declared_state, 'state:::::::::::::')
df_mapping = pandas.read_csv('/home/raja/Desktop/Ek_Step/Up text book/State_district.csv')
df_mapping = df_mapping.loc[df_mapping['state'] == user_declared_state]
city_list... | DIKSHA-NCTE/data-products | scheduled-jobs/python-scripts/src/main/python/services/manual/Unmapped_QR.py | Unmapped_QR.py | py | 942 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.argv",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.SparkSession.builder.appName",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "... |
33219824024 | from django.test import TestCase
from django.core.urlresolvers import reverse
from .models import Category
# Create your tests here.
class CategoryTest(TestCase):
def create_category(self, category_id = "113", resource_uri = "https://www.eventbriteapi.com/v3/categories",
name = "Arts", name_localized = "Arts"... | istanfield09/eventful | eventful_app/tests.py | tests.py | py | 948 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.test.TestCase",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "models.Category.objects.create",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "models.Category.objects",
"line_number": 12,
"usage_type": "attribute"
},
{
"a... |
25925394070 | #! python3
# mcb.pyw - Saves and loads pieces of text to the clipboard.
# Usage: py mcb.pyw save <keyword> - Saves clipboard to keyword.
# py mcb.pyw <keyword> - Loads keyword to clipboard.
# py mcb.pyw list - Loads all keywords to clipboard.
# py mcb.pyw del <saved keyword> - Delete saved keyword.... | qqlzfmn/AutomateTheBoringStuffWithPython | Files/mcb.pyw | mcb.pyw | pyw | 2,465 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "shelve.open",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "pyperclip.paste",
"line_n... |
19273072536 | import sys
import time
import random
import os
import shutil
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
from_dir = "G:/NATHAN"
class FileMovementHandler(FileSystemEventHandler):
def on_created(self, event):
print("{event.src_path} has just been cre... | nathandsouza911/p103 | p103/p103.py | p103.py | py | 901 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "watchdog.events.FileSystemEventHandler",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "watchdog.observers.Observer",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 28,
"usage_type": "call"
}
] |
40116026469 | # -*- coding: big5 -*-
import clr # 汇入 clr
clr.AddReference("System") # 加入参考 System
from System.Net import * # 汇入 System.Net
from System.Text import * # 汇入 System.Text
import cStringIO # 汇入 cStringIO
def gethtmldata(ur... | cyrixhero/programming_example_code | ironpython_example_code/Part5/gethtml.py | gethtml.py | py | 1,007 | python | zh | code | 0 | github-code | 97 | [
{
"api_name": "clr.AddReference",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "cStringIO.StringIO",
"line_number": 16,
"usage_type": "call"
}
] |
30493501008 | # -*- coding: utf-8 -*-
### CONFIGURATOR
# Clase que se encarga de salvar y cargar las configuraciones de valores de los PID y BIAS y demás parámetros.
# Útil si se quieren cambiar valores de PID para diferentes lógicas de control.
#
# Muestra, refresca y mantiene los sliders de tuneo de PID, BIAS y altura/orientaci... | uborzz/dron_v2.0 | rady_configurator.py | rady_configurator.py | py | 11,797 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "cv2.namedWindow",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "cv2.resizeWindow",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "cv2.moveWindow",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "cv2.createTrackbar",
... |
23980524152 | import sys
import os
import time
import json
from numpy import random
import speech_recognition as sr
from gtts import gTTS
from playsound import playsound
import special_commands
def load_json(file):
with open(file, encoding='utf-8') as f:
return json.loads(f.read())
def findResponse(commands, command):... | kadiryumlu/virtual-assistant-py | main.py | main.py | py | 2,169 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "json.loads",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "speech_recognition.Recognizer",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "speech_recognition.Microphone",
"line_number": 25,
"usage_type": "call"
},
{
"api_name":... |
2179066724 | #!/usr/bin/env python3
#
#--------------------------------------------------------
# Project Manager GUI.
#
# This is a Python tkinter script that handles local
# project management. Much of this involves the
# running of ng-spice for characterization, allowing
# the user to determine where a circuit is failing
# char... | RTimothyEdwards/open_pdks | runtime/cace.py | cace.py | py | 75,988 | python | en | code | 211 | github-code | 97 | [
{
"api_name": "os.path.realpath",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 53,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "tksimpledialog.Dialog",... |
71854625918 | """General Utility Functions to be used throughout the package"""
from typing import Union
from requests.structures import CaseInsensitiveDict
def clean_headers(headers: Union[dict, CaseInsensitiveDict]):
"""Cleans the headers to hide sensitive information in logs.
Originally defined in canvasapi/util.py:
... | utexas-engr-tiw/fabman-api | fabman/util.py | util.py | py | 766 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "typing.Union",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "requests.structures.CaseInsensitiveDict",
"line_number": 8,
"usage_type": "name"
}
] |
25212815840 | import unittest
from server.logic.database.edge_database import EdgeDatabase
from pymongo import MongoClient
from server.config import DATABASE_CONNECTION
from server.config import DATABASE_SCHEME_EDGE_RATING
class DatabaseTestCase(unittest.TestCase):
def setUp(self):
"""
Set up database class and... | embarcfitness/runamic_server | djangoserver/server/logic/database/tests.py | tests.py | py | 6,081 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "unittest.TestCase",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "server.logic.database.edge_database.EdgeDatabase",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pymongo.MongoClient",
"line_number": 20,
"usage_type": "call"
},... |
20467475610 |
import streamlit as st
import altair as alt
import pandas as pd
life = pd.read_csv("https://raw.githubusercontent.com/rezpe/datos_viz/master/lifecountries.csv")
chart_life = alt.Chart(life).mark_circle().encode(
x='Country GDP',
y='Life Expectancy',
size='size',
color='Continent',
to... | pipe11/KSMaster_Data_Science | 18. Tableau & Advanced Visualizatios/hello.py | hello.py | py | 548 | python | es | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "altair.Chart",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "streamlit.title",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "streamlit.markdown",
"... |
44775219364 | #!/usr/bin/env python
# coding: utf-8
from flask import request, jsonify, Blueprint
import numpy as np
from lib.function import get_data, cos_sim
from lib.nlp_function import text_to_vector
api = Blueprint("api", __name__)
#取得文章をベクトルに変換
data_path = "data/text.txt"
text_list = get_data(data_path)
text_vector_list = ... | Re14m/training | 2022-0314_recipie333/api/get_texts.py | get_texts.py | py | 1,081 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Blueprint",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "lib.function.get_data",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "lib.nlp_function.text_to_vector",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": ... |
3532814604 | """fireroad URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.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-base... | venkatesh-sivaraman/fireroad-server | fireroad/urls.py | urls.py | py | 2,454 | python | en | code | 13 | github-code | 97 | [
{
"api_name": "django.conf.urls.url",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.include",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "dj... |
26318518784 | from __future__ import annotations
import logging
import re
from typing import TYPE_CHECKING, List, Optional, Union
from glob import glob
from opentrons.config import IS_ROBOT, IS_LINUX
from opentrons.drivers.rpi_drivers import types, interfaces, usb, usb_simulator
from opentrons.hardware_control.emulation.module_serv... | Opentrons/opentrons | api/src/opentrons/hardware_control/module_control.py | module_control.py | py | 8,912 | python | en | code | 363 | github-code | 97 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "re.I",
"line_nu... |
30793145516 | import lib.img_drawLabel as draw
import lib.img_segment as seg
import lib.web_catchElementInfo as catch
import lib.web_crawl as crawl
import lib.file_utils as file
import pandas as pd
import os
import time
from func_timeout import func_set_timeout, FunctionTimedOut
is_crawl_link = False
is_read_existed_links = not is... | MulongXie/UI2CODE | Data/Data-collection/Data-collection-v1/main.py | main.py | py | 2,645 | python | en | code | 31 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 2... |
9281072870 | from plone.app.portlets.portlets import base
from plone.portlets.interfaces import IPortletDataProvider
from Products.CMFCore.utils import getToolByName
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from zope.i18n import translate
from zope.interface import implements
from intranett.policy im... | intranett/intranett | src/intranett.policy/intranett/policy/browser/portlets/projectroominfo.py | projectroominfo.py | py | 2,201 | python | en | code | 11 | github-code | 97 | [
{
"api_name": "plone.portlets.interfaces.IPortletDataProvider",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "plone.app.portlets.portlets.base.Assignment",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "plone.app.portlets.portlets.base",
"line_numb... |
26339990364 | #!/usr/bin/env python2
import argparse
import boto3
import datetime
import urllib
import math
import os
import logging
import gzip
import datetime
import calendar
import logging
import StringIO
import multiprocessing
import Queue
import random
import functools
logger = logging.getLogger('make_speeds')
logger.setLevel... | opentraffic/datastore | scripts/speed-tile-work.py | speed-tile-work.py | py | 10,561 | python | en | code | 27 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "logging.StreamHandler",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "logging.For... |
22932704506 | import argparse
import numpy as np
import os
parser = argparse.ArgumentParser()
parser.add_argument("--min_sigma_mag", type=float, default=-5)
parser.add_argument("--max_sigma_mag", type=float, default=2)
parser.add_argument("--n_sigma", type=int, default=60)
parser.add_argument("--p", type=int, default=2)
parser.add_... | npbaskerville/loss-surfaces-of-gans | scripts/make_rmt_vary_sigma_script.py | make_rmt_vary_sigma_script.py | py | 1,353 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.logspace",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_number": 40,
"usage_type": "call"
}
] |
12050226168 | """Interactive plots for statistics over trajectories.
"""
import warnings
import panel as pn
from ad_sensitivity_analysis.interactive import create_widgets
from ad_sensitivity_analysis.plot import stats_per_traj_static
warnings.simplefilter(action="ignore", category=RuntimeWarning)
def plot_kde_histogram_interac... | wavestoweather/AD_Sensitivity_Analysis | ad_sensitivity_analysis/interactive/stats_per_traj.py | stats_per_traj.py | py | 2,528 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "warnings.simplefilter",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "ad_sensitivity_analysis.interactive.create_widgets.create_out_params_select",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "ad_sensitivity_analysis.interactive.create_widg... |
22851181415 | import os
import re
import sys
from setuptools import setup, find_packages
with open("README.md", "r") as f:
long_description = f.read()
package = 'contentstack_management'
def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
init_py = open(os.path.joi... | contentstack/contentstack-management-python | setup.py | setup.py | py | 1,957 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "re.search",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "re.MULTILINE",
"line_number":... |
28776420154 | from atom import Potential, RotatePoints, EnergyLevel, ElectronStates
class Atom:
def __init__(self):
self.xU = Potential()
self.e = EnergyLevel()
self.N = ElectronStates()
self.__RP = RotatePoints()
def setV(self, V):
self.xU.setV(V)
self.e.setV(V)
self.N.setV(V)
self.__RP.setV(V)
def set... | dya4kov/average-atom-toolkit | python/pyaatk/TF/Atom.py | Atom.py | py | 772 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "atom.Potential",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "atom.EnergyLevel",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "atom.ElectronStates",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "atom.RotatePoints",
... |
40119119887 | import os
import pysam
import argparse
############################################
############################################
## PARSE ARGUMENTS
############################################
############################################
Description = 'Remove singleton reads from paired-end BAM file i.e if read1 is p... | snakemake-workflows/chipseq | workflow/scripts/rm_orphan_pe_bam.py | rm_orphan_pe_bam.py | py | 5,823 | python | en | code | 23 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "os.path",
"li... |
36012622460 | from Pessoa import *
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import smtplib
from selenium import webdriver
import time
class Professor(Pessoa):
def __init__(self,nome,rg,cpf,phone,email,nasc,idade ,sexo ,salario, materia,tempo,carga,exp,desc,plus,novo,atual):
... | Renan023/Python_POO | Professor.py | Professor.py | py | 3,810 | python | pt | code | 0 | github-code | 97 | [
{
"api_name": "email.mime.multipart",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "email.mime.multipart.MIMEMultipart",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "email.mime.text.MIMEText",
"line_number": 72,
"usage_type": "call"
},
{
... |
20459131152 | from string import ascii_letters
from dataclasses import dataclass
from typing import Sequence, Union
from tucker_riemopt import backend as back
from tucker_riemopt import Tucker
@dataclass()
class TuckerMatrix(Tucker):
"""Tucker representation for operators.
:param core: The core tensor of the decompositio... | Medowbee/RiemannOpt | tucker_riemopt/tucker/matrix.py | matrix.py | py | 3,343 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tucker_riemopt.Tucker",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "typing.Sequence",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "typing.Union",
... |
37659582946 | import base64
import os
import logging
from krita import *
from krita_stable_diffusion.interface.interfaces.vertical_interface import VerticalInterface
from krita_stable_diffusion.settings import APPLICATION_ID
from krita_stable_diffusion.settings import DEFAULT_MODEL
class Base:
"""
Extend this class to crea... | w4ffl35/krita_stable_diffusion | krita_stable_diffusion/interface/tabs/base.py | base.py | py | 17,353 | python | en | code | 125 | github-code | 97 | [
{
"api_name": "logging.info",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "base64.b64encode",
"line_number": 192,
"usage_type": "call"
},
{
"api_name": "base64.b64encode",
"line_number": 193,
"usage_type": "call"
},
{
"api_name": "base64.b64encode",
... |
74996492479 | from datetime import date
from fastapi import Depends, HTTPException, status
from fastapi_pagination import Params
from code.exceptions import NewsNotFound, UnsupportedSymbol
from code.services import CompanyNewsListService, NewsDetailsService, NewsListService
async def get_news(params: Params = Depends()):
ret... | quqanai/zimran-test | backend/stock_market/code/handlers.py | handlers.py | py | 923 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "fastapi_pagination.Params",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "fastapi.Depends",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "code.services.NewsListService",
"line_number": 11,
"usage_type": "call"
},
{
"api_name"... |
9559267285 | from airflow import DAG
from datetime import datetime, timedelta
from airflow.operators.dummy import DummyOperator
from Delta_Ops.Delta_Ops import credits_organizer,movies_organizer
from airflow.operators.python import PythonOperator
start_date = datetime(2022, 11, 5)
current_ts = datetime.now().strftime('%Y%m%d_%H%M... | mcomak/Delta_ETL_Object_Storage | dag/orchestra_dag.py | orchestra_dag.py | py | 923 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "datetime.datetime",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "datetime.timed... |
31077970709 | import time
from contextlib import contextmanager
import pytest
from helpers.cluster import ClickHouseCluster
from helpers.network import PartitionManager
from helpers.test_tools import TSV
from helpers.client import CommandRequest
cluster = ClickHouseCluster(__file__)
node1 = cluster.add_instance('node1', config_... | hnakamur/ClickHouse-deb | dbms/tests/integration/test_extreme_deduplication/test.py | test.py | py | 3,179 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "helpers.cluster.ClickHouseCluster",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "helpers.t... |
39097425604 | import random
import time
import cv2
import numpy as np
from ultralytics import YOLO
def checkimage(image):
my_file = open("coco.txt", "r")
# reading the file
data = my_file.read()
# replacing end splitting the text | when newline ('\n') is seen.
class_list = data.split("\n")
my_file.close()
... | Amirdhesh/waste2value | backend/model.py | model.py | py | 1,161 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "random.randint",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "ultralytics.YOLO",
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.