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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28924212361 | from typing import List
"""
method 1 : iterative call without for loop
"""
class Solution:
def subsets(self, nums: List[int]) -> List[List[int]]:
results = []
length = len(nums)
def make_dfs_subset(subset, cur_idx):
if cur_idx == length :
print("list:", subset... | GuSangmo/BOJ_practice | Leetcode/78.subsets.py | 78.subsets.py | py | 766 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "typing.List",
"line_number": 9,
"usage_type": "name"
}
] |
21723031249 | from simbolo import Simbolo, TOKENS, ZONA_DE_CODIGO, TIPO_DATO
from error import Error
import json
palabras_reservadas = [
'bool',
'call',
'char',
'do',
'else',
'float',
'for',
'function',
'if',
'int',
'main',
'read',
'return',
'string',
'then',
'to',
'void',
'while',
'write',
'... | AbrahamupSky/Compilador | lexico/lexico.py | lexico.py | py | 12,471 | python | es | code | 1 | github-code | 36 | [
{
"api_name": "simbolo.ZONA_DE_CODIGO",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "error.Error",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "simbolo.Simbolo",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "simbolo.TOKENS",
... |
21407967690 | import requests
'''
r = requests.get("http://www.google.com")
r.encoding = 'utf-8'
s = r.text
print(s)
'''
def getText(url):
try:
r = requests.get(url, timeout = 500)
r.raise_for_status()
r.encoding = r.apparent_encoding
return r.text
except:
return "Erroroccur!"
if _... | zIDAedgen/crawlerAirbnb | venv/include/spider.py | spider.py | py | 402 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
}
] |
72743077225 | # ---
# jupyter:
# jupytext:
# cell_metadata_filter: -all
# comment_magics: true
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.13.7
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# n... | nestauk/afs_neighbourhood_analysis | afs_neighbourhood_analysis/analysis/cluster_eda.py | cluster_eda.py | py | 14,185 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "toolz.pipe",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 57,
"usage_type": "attribute"
},
{
"api_name": "toolz.pipe",
"line_... |
36955296199 | import wiredtiger, wttest, string, random, time
from wtbound import *
from enum import Enum
from wtscenario import make_scenarios
class operations(Enum):
UPSERT = 1
REMOVE = 2
TRUNCATE = 3
class key_states(Enum):
UPSERTED = 1
DELETED = 2
NONE = 3
class bound_scenarios(Enum):
NEXT = 1
... | mongodb/mongo | src/third_party/wiredtiger/test/suite/test_cursor_bound_fuzz.py | test_cursor_bound_fuzz.py | py | 27,014 | python | en | code | 24,670 | github-code | 36 | [
{
"api_name": "enum.Enum",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 22,
"... |
25293683614 | from django.shortcuts import render, redirect, reverse
from . import forms, models
from django.db.models import Sum
from django.contrib.auth.models import Group
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required, user_passes_test
from django.conf import settings
from ... | LiborSehnal/RichInsure | customer/views.py | views.py | py | 5,259 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.http.HttpResponseRedirect",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.Group.objects.get_or_create",
"line_number": 34,
"usa... |
7625551099 | from bs4 import BeautifulSoup as bs
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
driver = webdriver.Edge(executable_path = r'Path of msedgedriver here')
url = "YOUTUBE URL HERE"
driver.get(url)
elem = driver.find_element_by_tag_name('html')
elem.send_keys(Keys.E... | Hiperultimate/Youtube-Playlist-Save-Title | youtubeListMaker.py | youtubeListMaker.py | py | 824 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "selenium.webdriver.Edge",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.keys.Keys.END",
"line_number": 11,
"usage_type": "attribute"
},
{
... |
3147265908 | """
Common Flitter initialisation
"""
import logging
import sys
from loguru import logger
try:
import pyximport
pyximport.install()
except ImportError:
pass
LOGGING_LEVEL = "SUCCESS"
LOGGING_FORMAT = "{time:HH:mm:ss.SSS} {process}:{extra[shortname]:16s} | <level>{level}: {message}</level>"
class Logu... | jonathanhogg/flitter | src/flitter/__init__.py | __init__.py | py | 1,653 | python | en | code | 8 | github-code | 36 | [
{
"api_name": "pyximport.install",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "logging.Handler",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "logging.basicConfig",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "logging.ge... |
34399989971 | from typing import List
from entity.MountAnimal import MountAnimal
class Camel(MountAnimal):
bent_quantity: int
def __init__(self, id: str, name: str, date_of_birth: str, commands: List[str], bent_quantity: int):
super().__init__(id, name, date_of_birth, commands)
self.bent_quantity ... | G0ncharovAA/GB_FINAL_TEST | app/entity/Camel.py | Camel.py | py | 1,030 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "entity.MountAnimal.MountAnimal",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 8,
"usage_type": "name"
}
] |
36208541438 | from django.urls import path
from proyecto.views import index_proyecto, ProyectoCreate, ProyectoList, ProyectoUpdate, ProyectoDelete, proyecto_list_total
app_name = 'proyecto'
urlpatterns = [
path("", index_proyecto, name="index_proyecto"),
path("registrar/", ProyectoCreate.as_view(), name="registrar_proyecto... | joseiba/GestionSoftware | ProyectoIS2/Proyecto/proyecto/urls.py | urls.py | py | 636 | python | es | code | 0 | github-code | 36 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "proyecto.views.index_proyecto",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "proy... |
6123602959 | import pandas as pd
from textslack.textslack import TextSlack
from gensim.models import doc2vec
# Architecture of the NLP Model
class NLPModel:
# The constructor instantiates all the variables that would be used throughout the class
def __init__(self, sp, conn, max_epochs=100, vec_size=50, alpha=0.025):
... | CUTR-at-USF/muser-data-analysis | AI/models.py | models.py | py | 2,575 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "textslack.textslack.TextSlack",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.read_sql_table",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "gensim.models.doc2vec.TaggedDocument",
"line_number": 22,
"usage_type": "call"
},
... |
789669298 | import argparse
from experiment import Experiment
import Limited_GP
parser = argparse.ArgumentParser()
parser.add_argument('--number-of-batches', type=int, default=1)
parser.add_argument('--current-batch', type=int, default=1)
parser.add_argument('--budget', type=int, default=10000)
parser.add_argument('--suite-name',... | pfnet-research/limited-gp | solver/run.py | run.py | py | 564 | python | en | code | 5 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "experiment.Experiment",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "Limited_GP.solve",
"line_number": 12,
"usage_type": "attribute"
}
] |
13712488384 | import os
from os.path import join
from os.path import dirname
import shutil
import sys
from threading import Thread
import time
import zmq
import yaml
def get_pyneal_scanner_test_paths():
""" Return a dictionary with relevant paths for the pyneal_scanner_tests
within the `tests` dir
"""
# set up dir... | jeffmacinnes/pyneal | tests/pyneal_scanner_tests/pynealScanner_helper_tools.py | pynealScanner_helper_tools.py | py | 5,196 | python | en | code | 30 | github-code | 36 | [
{
"api_name": "os.path.dirname",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"l... |
4153153837 | import datetime
import difflib
import os
from inspect import isabstract
from typing import Any, List, Mapping, Optional, Set, Tuple, Type
import ee # type: ignore
from requests.structures import CaseInsensitiveDict
config_path = os.path.expanduser("~/.config/taskee.ini")
def initialize_earthengine() -> None:
"... | aazuspan/taskee | taskee/utils.py | utils.py | py | 3,865 | python | en | code | 10 | github-code | 36 | [
{
"api_name": "os.path.expanduser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "ee.Initialize",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "ee.EEException",
"l... |
10746701513 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time : 2020/10/15 10:19 PM
# @Author: Zechen Li
# @File : aug.py.py
from glue.tasks import get_task
import pandas as pd
import numpy as np
import os
from augment.eda import *
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--alpha', default=0.... | UCSD-AI4H/SSReg | SSL-Reg-SATP/aug.py | aug.py | py | 2,685 | python | en | code | 8 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "glue.tasks.get_task... |
19352159399 | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
def read_file(file_name):
with open(file_name, "r") as f:
return f.read()
setuptools.setup(
name="influx-line-protocol",
description="Implementation of influxdata line protocol format in python",
long_desc... | SebastianCzoch/influx-line-protocol | setup.py | setup.py | py | 879 | python | en | code | 20 | github-code | 36 | [
{
"api_name": "setuptools.setup",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 29,
"usage_type": "call"
}
] |
5199805944 | from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from widgets.mixins import TextColorMixin
from utils.encoders import EncodeMethod, create_encoder
from strings import _
class EncodePage(QWidget, TextColorMixin):
def __init__(self, parent=None):
super(EncodePage, self).__init__(parent)
sel... | shuhari/DevToolbox | src/pages/py/encode_page.py | encode_page.py | py | 3,455 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "widgets.mixins.TextColorMixin",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "utils.encoders.EncodeMethod.base64",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "utils.encoders.EncodeMethod",
"line_number": 15,
"usage_type": "name... |
14432332319 | #from ast import If
#from pprint import pp
#from typing import final
from genericpath import exists
from multiprocessing.reduction import duplicate
import re
import string
from unittest import result
from tokens import tokens
from tkinter import *
from tkinter import messagebox as MessageBox
from tkinter import message... | AngelHernandez20/Mantenimiento | analizadorlexico.py | analizadorlexico.py | py | 2,210 | python | pt | code | 0 | github-code | 36 | [
{
"api_name": "tokens.tokens",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "tokens.tokens.reservadas",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "tokens.tokens",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "tokens.toke... |
6798954451 | import re
import datetime
from datetime import timedelta
from django.utils import timezone
from django.conf import settings
from django.contrib.auth.models import Permission
from django.shortcuts import get_object_or_404
from exo_role.models import ExORole
from auth_uuid.jwt_helpers import _build_jwt
from auth_uuid.t... | tomasgarzon/exo-services | service-exo-opportunities/opportunities/tests/test_mixin.py | test_mixin.py | py | 5,626 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "utils.faker_factory.faker.text",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "utils.faker_factory.faker",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "utils.faker_factory.faker.text",
"line_number": 27,
"usage_type": "call"
},
... |
73819292265 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import enum
import logging
from logging import StreamHandler
handler = StreamHandler()
logger = logging.getLogger(__name__)
class Level(enum.Enum):
FATAL = logging.FATAL
ERROR = logging.ERROR
WARN = logging.WARN
INFO = logging.INFO
DEBUG = logging.D... | ujiro99/auto_logger | logger/log.py | log.py | py | 2,655 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "logging.StreamHandler",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "enum.Enum",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "logging.FATAL",
... |
10140994218 | from django.urls import reverse
def reverse_querystring(view, urlconf=None, args=None, kwargs=None, current_app=None, query_kwargs=None):
"""Custom reverse to handle query strings.
Usage:
reverse_querystring('app.views.my_view', kwargs={'pk': 123}, query_kwargs={'search': 'Bob'})
for multival... | chiemerieezechukwu/django-api | core/utils/reverse_with_query_string.py | reverse_with_query_string.py | py | 930 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.urls.reverse",
"line_number": 12,
"usage_type": "call"
}
] |
13933428778 | import pytest
from uceasy.ioutils import load_csv, dump_config_file
@pytest.fixture
def config_example():
config = {
"adapters": {
"i7": "AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC*ATCTCGTATGCCGTCTTCTGCTTG",
"i5": "AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT",
}
... | uceasy/uceasy | tests/test_ioutils.py | test_ioutils.py | py | 1,048 | python | en | code | 8 | github-code | 36 | [
{
"api_name": "pytest.fixture",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pytest.fixture",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "uceasy.ioutils.load_csv",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "uceasy... |
38514393390 | """
This module contains functions to check whether a schedule is:
1. view-serializable
2. conflict-serializable
3. recoverable
4. avoids cascading aborts
5. strict
It also contains some nice functions to tabularize schedules into tex and draw
a conflict graph using matplotlib.
"""
from action im... | mwhittaker/serial | serial.py | serial.py | py | 13,575 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "collections.defaultdict",
"line_number": 138,
"usage_type": "call"
},
{
"api_name": "networkx.DiGraph",
"line_number": 178,
"usage_type": "call"
},
{
"api_name": "itertools.permutations",
"line_number": 265,
"usage_type": "call"
},
{
"api_name": "ne... |
37059041423 | """Function which calculates how positive a website's content is. Scores usually range between -10 and +10"""
import requests
from bs4 import BeautifulSoup as bs
from afinn import Afinn
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
def sentiment_analyze(url):
"""calculates a website's posit... | mihailthebuilder/news-sentiment | sentiment.py | sentiment.py | py | 4,072 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.session",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "afinn.Afinn",
"li... |
323629396 | """Added paid to order model
Revision ID: eb502f9a5410
Revises: 82df20a186ef
Create Date: 2020-04-19 17:05:05.312230
"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
# revision identifiers, used by Alembic.
revision = 'eb502f9a5410'
down_revision = '82df20a186ef'
branch_labels = None
depen... | Dsthdragon/kizito_bookstore | migrations/versions/eb502f9a5410_added_paid_to_order_model.py | eb502f9a5410_added_paid_to_order_model.py | py | 682 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "alembic.op.add_column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Boolean... |
15476854005 | from __future__ import division, print_function, absolute_import
import os
import pytest
import hypothesis
from hypothesis.errors import InvalidArgument
from hypothesis.database import ExampleDatabase
from hypothesis._settings import settings, Verbosity
def test_has_docstrings():
assert settings.verbosity.__do... | LyleH/hypothesis-python_1 | tests/cover/test_settings.py | test_settings.py | py | 4,182 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "hypothesis._settings.settings.verbosity",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "hypothesis._settings.settings",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "hypothesis._settings.settings.get_profile",
"line_number": 17,
... |
71683730983 | import argparse
import datetime
import os
import socket
import sys
from time import sleep
# espa-processing imports
import config
import parameters
import processor
import settings
import sensor
import utilities
from api_interface import APIServer
from logging_tools import (EspaLogging, get_base_logger, get_stdout_h... | djzelenak/espa-worker | processing/main.py | main.py | py | 8,666 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "logging_tools.get_base_logger",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "socket.gethostname",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "parameters.test_for_parameter",
"line_number": 44,
"usage_type": "call"
},
{
"ap... |
28180715346 | from pathlib import Path
from .CUBEparser import parse_files
# yapf: disable
SHORTHAND_FUNCTIONALS = [
'svwn3',
'svwn5',
'pbe',
'pbe0',
'bpw91',
'bp86',
'b3p86',
'b3p86-g',
'blyp',
'b3lyp',
'b3lyp-g',
'olyp',
'kt1',
'kt2',
'kt3'
]
# yapf: enable
"""List of r... | MRChemSoft/mrchem | python/mrchem/helpers.py | helpers.py | py | 18,587 | python | en | code | 22 | github-code | 36 | [
{
"api_name": "pathlib.Path",
"line_number": 118,
"usage_type": "call"
},
{
"api_name": "CUBEparser.parse_files",
"line_number": 146,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 292,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
... |
74928715303 | # Derived from https://github.com/greenelab/deep-review/blob/75f2dd8c61099a17235a4b8de0567b2364901e4d/build/randomize-authors.py
# by Daniel Himmelstein under the CC0 1.0 license
# https://github.com/greenelab/deep-review#license
import argparse
import pathlib
import sys
import yaml
from manubot.util import read_seri... | greenelab/covid19-review | build/update-author-metadata.py | update-author-metadata.py | py | 5,812 | python | en | code | 117 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "sys.stderr.write",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
... |
72166330345 | # Importing necessary libraries
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
# from sklearn.metrics import mean_squared_error, r2_score
# Sample dataset of house prices and areas (replace this with your own dataset)
mona =... | preyar/RealEstatePricePrediction | Prediction.py | Prediction.py | py | 1,385 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.read_excel",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LinearRegression",
"line_number": 22,
"usage_type": "call... |
12631299379 | import cv2
import os
# 비디오 파일 경로 설정
video_path = "차체 영상 1차.mp4"
# 저장할 이미지 파일을 저장할 폴더 경로 설정
output_folder = "video"
if not os.path.exists(output_folder):
os.makedirs(output_folder)
# 비디오 캡쳐 객체 생성
cap = cv2.VideoCapture(video_path)
# 캡쳐가 올바르게 열렸는지 확인
if not cap.isOpened():
print("Error: Could not open video."... | TAEM1N2/kudos12_2023 | data_setting/python_practice/video_cap.py | video_cap.py | py | 971 | python | ko | code | 1 | github-code | 36 | [
{
"api_name": "os.path.exists",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_nu... |
19795245501 | import json
import sys
from django.conf import settings
from django.utils import translation
from adapter.utils import build_auth_args
# from adapter.utils.local import get_request
from blueapps.utils import get_request
def _clean_auth_info_uin(auth_info):
if "uin" in auth_info:
# 混合云uin去掉第一位
if... | robert871126/bk-chatbot | adapter/api/modules/utils.py | utils.py | py | 3,445 | python | en | code | null | github-code | 36 | [
{
"api_name": "django.conf.settings.FEATURE_TOGGLE.get",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.FEATURE_TOGGLE",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 24,
"usage_type": ... |
4799644228 | from cadastro import Cadastro, Login
from email_senha import EmailSenha
import json, random, string
login = False
cadastro = False
opcao = input("1. login\n2. cadastrar ")
if opcao == "1":
login = Login().autenticacao()
tentativas = 0
while login == "senha incorreta":
print("senha incorreta")
... | Bonbeck/Cadastro | main.py | main.py | py | 2,800 | python | pt | code | 0 | github-code | 36 | [
{
"api_name": "cadastro.Login",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cadastro.Login",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "random.choices",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "string.ascii_uppercase",... |
35910502981 | import os, discord, random, asyncio, json, time
from discord.ext import commands
class games(commands.Cog):
def __init__(self,bot):
self.coin_toss=0
self.bot=bot
self.counter = 0
@commands.command(name="FLIP",aliases=['FLIP`'])
async def coin_toss(self,ctx,choice):
#choice ... | yassir56069/TSOE | cogs/games.py | games.py | py | 4,574 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "random.randint",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "disco... |
20227289100 | #!/usr/bin/python
import sys, os
import sets
from Bio import SeqIO
def make_location_set(l):
return sets.Set([n for n in xrange(l.nofuzzy_start, l.nofuzzy_end)])
for rec in SeqIO.parse(sys.stdin, "genbank"):
new_features = []
for feature in rec.features:
add = 1
if feature.type == 'CDS':
... | nickloman/xbase | annotation/remove_overlaps_with_frameshifts.py | remove_overlaps_with_frameshifts.py | py | 843 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "sets.Set",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "Bio.SeqIO.parse",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "Bio.SeqIO",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "sys.stdin",
"line_number": 10,
... |
23410005730 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('bar', '0238_auto_20160817_1352'),
]
operations = [
migrations.AddField(
model_name='caja',
... | pmmrpy/SIGB | bar/migrations/0239_auto_20160817_1408.py | 0239_auto_20160817_1408.py | py | 1,747 | python | es | code | 0 | github-code | 36 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AddField",
"line_number": 15,
"usage_type": "call"
},
{
... |
14570907737 | #importar librerias
from ast import parse
from wsgiref import headers
import requests #peticion al servidor
import lxml.html as html
import pandas as pd
from tqdm.auto import tqdm #barras de progreso
from lxml.etree import ParseError
from lxml.etree import ParserError
import csv
from fake_useragent import UserAgent
ua... | joseorozco84/scraper | genres.py | genres.py | py | 1,910 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "fake_useragent.UserAgent",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.Session",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "lxml.html.fromstring",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "lxml.h... |
73445915623 | import IPython
from IPython.utils.path import get_ipython_dir
from IPython.html.utils import url_path_join as ujoin
from IPython.html.base.handlers import IPythonHandler, json_errors
from tornado import web
import json
# Handler for the /new page. Will render page using the
# wizard.html page
class New_PageHandler(IP... | Feldman-Michael/masterthesis | home/ipython/.local/share/jupyter/nbextensions/ma/server/services/ipy_html_distproject.py | ipy_html_distproject.py | py | 996 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "IPython.html.base.handlers.IPythonHandler",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "tornado.web.authenticated",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "tornado.web",
"line_number": 13,
"usage_type": "name"
},
{
... |
74957373542 | from __future__ import print_function, division
import os
import torch
import torchtext
import itertools
from loss.loss import NLLLoss
class Evaluator(object):
def __init__(self, loss=NLLLoss(), batch_size=64):
self.loss = loss
self.batch_size = batch_size
def evaluate(self, model, data):
... | hopemini/activity-clustering-multimodal-ml | autoencoder/seq2seq/evaluator/evaluator.py | evaluator.py | py | 4,024 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "loss.loss.NLLLoss",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "loss.loss",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "loss.loss",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "loss.loss.reset",
"line_num... |
138291184 | #!/usr/bin/env python3
from collections import deque
class BinaryTreeNode:
def __init__(self, value):
self.value = value
self.left = None
self.right = None
def create_tree():
root = BinaryTreeNode(1)
root.left = BinaryTreeNode(2)
root.right = BinaryTreeNode(3)
root.... | banginji/algorithms | misc/treebalance.py | treebalance.py | py | 1,635 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "collections.deque",
"line_number": 59,
"usage_type": "call"
}
] |
406588995 | # Run by typing python3 main.py
# Import basics
import re
import os
import pickle
# Import stuff for our web server
from flask import Flask, flash, request, redirect, url_for, render_template
from flask import send_from_directory
from flask import jsonify
from utils import get_base_url, allowed_file, and_syntax
# Im... | aashishyadavally/pick-up-line-generator | app/main.py | main.py | py | 4,425 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "nltk.download",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "aitextgen.aitextgen",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "gensim.models.Word2Vec.... |
23243623755 | import cv2
import numpy as np
import tkinter as tk
from tkinter import filedialog
def load_correspondences(file_name):
try:
f = open(file_name, "r")
lines = f.readlines()
lines = [l.rstrip() for l in lines]
f.close()
points1 = []
points2 = []
for line in li... | marwansalem/image-stitching | correspondences.py | correspondences.py | py | 3,583 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.array",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_... |
26297648004 | from itertools import product
def create_dice(sides):
dice = []
for i in range(sides):
dice.append( i+1 )
return dice
number_of_dices = int(input("Mata in antalet tärningar:\n"))
number_of_sides = int(input("Mata in antalet sidor för tärningarna:\n"))
highest_sum = number_of_sides * number_of... | hadi-ansari/TDP002 | gamla_tentor_tdp002/2018/uppgift2.py | uppgift2.py | py | 730 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "itertools.product",
"line_number": 25,
"usage_type": "call"
}
] |
24193842042 | import pandas as pd
from pathlib import Path
from enum import Enum
pd.options.mode.chained_assignment = None # default='warn'
class Location(Enum):
home = 1
visiting = 2
#not used atm
def get_last_occurrence(team_id, location):
data_folder = Path("../")
all_game_file = data_folder / "_mlb_remerged_... | timucini/MLB-DeepLearning-Project | Verworfen/TeamIdMerge2.py | TeamIdMerge2.py | py | 2,468 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "pandas.options",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "enum.Enum",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_... |
30974355669 | import importlib
import shutil
import uuid
from typing import Dict, List, Tuple, Union
from torch import Tensor, nn
from torchdistill.common import module_util
from pathlib import Path
import torch
import time
import gc
import os
from logging import FileHandler, Formatter
from torchdistill.common.file_util import che... | rezafuru/FrankenSplit | misc/util.py | util.py | py | 20,533 | python | en | code | 9 | github-code | 36 | [
{
"api_name": "torchdistill.common.constant.def_logger.getChild",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "torchdistill.common.constant.def_logger",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 29,
"usage_type": ... |
30461364600 | # village_id, name, x, y, idx, pts, b
import pdb
import utils
import numpy as np
if __name__ == "__main__":
files = utils.getLastFiles()
villages = utils.read_villages(files["villages"])
coords = villages['coords']
pts = villages["points"]
v_barb = (villages['player'] == 0)
v_playe... | felipecadar/tw-scripts | plot_world.py | plot_world.py | py | 1,374 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "utils.getLastFiles",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "utils.read_villages",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
... |
5216604834 | from dataclasses import dataclass
from struct import Struct
from .bytes import Bytes
KEY_HASH = Struct("<HH")
ENCRYPTED_MESSAGE = Struct("<BIIII16s16s")
@dataclass
class SignedMessage:
"""The cryptographic message portion of Session Offer."""
flags: int
key_slot: int
key_mask: int
challenge: by... | vbe0201/wizproxy | wizproxy/proto/handshake.py | handshake.py | py | 2,130 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "struct.Struct",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "struct.Struct",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "bytes.Bytes",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "bytes.Bytes",
"line_number"... |
39893499902 | from django.urls import path
from . import views
# app_name = ''
urlpatterns = [
#GET: 전체글조회, POST: 게시글 생성
path('', views.review_list),
#GET: 단일 게시글 조회, DELETE: 해당 게시글 삭제, PUT: 해당 게시글 수정
path('<int:review_pk>/', views.review_update_delete),
#GET: 댓글 전체를 조회
path('<int:review_pk>/comments/... | chomyoenggeun/linkedmovie | server/community/urls.py | urls.py | py | 707 | python | ko | code | 0 | github-code | 36 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
35512006282 | import trimesh
import numpy as np
from sklearn.neighbors import KDTree
from trimesh.proximity import ProximityQuery
def transform_mesh(mesh, trans_name, trans_params):
if trans_name == 'preprocess':
mesh = preprocess_mesh(mesh, **trans_params)
elif trans_name == 'refine':
mesh = refine_mesh(me... | amaleki2/graph_sdf | src/data_utils.py | data_utils.py | py | 4,749 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "numpy.max",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "trimesh.transformations.random_rotation_matrix",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "trimesh.transformations",
"line_number": 67,
"usage_type": "attribute"
},
{
... |
25452837300 | """Test whether the app increased LDs
by comparing a 7-session total against a baseline week.
"""
import os
import numpy as np
import pandas as pd
import pingouin as pg
from scipy.stats import sem
import utils
#### Choose export paths.
basename = "app_effect"
export_dir = os.path.join(utils.Config.data_directory,... | remrama/lucidapp | analyze-app_effect.py | analyze-app_effect.py | py | 3,437 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.join",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "utils.Config",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_... |
2952639119 | import visa
import time
from time import sleep
rm = visa.ResourceManager()
print('Connected VISA resources:')
print(rm.list_resources())
dmm = rm.open_resource('USB0::0x1AB1::0x09C4::DM3R192701216::INSTR')
print('Instrument ID (IDN:) = ', dmm.query('*IDN?'))
#print("Volts DC = ", dmm.query(":MEASure:VOLTage:DC?"))
... | JohnRucker/Rigol-DM3058E | test.py | test.py | py | 1,135 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "visa.ResourceManager",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 34,
"usage_type": "call"
}
] |
12133536334 | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 2 14:51:00 2017
@author: trevario
Automatically plot TCSPC data using matplotlib.pyplot
"""
import glob, os
import numpy as np
import matplotlib.pyplot as plt
import csv
#%matplotlib inline
print("what directory are the files in?")
name = input()
os.chdir('/home/tre... | trevhull/dataplot | tcspc.py | tcspc.py | py | 2,065 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.chdir",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.genfromtxt",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"l... |
31479728563 | import pygame
from constants import WHITE, SIZE_WALL, YELLOW, MARGIN
class Food:
def __init__(self, row, col, width, height, color):
self.image = pygame.Surface([width, height])
self.image.fill(WHITE)
self.image.set_colorkey(WHITE)
pygame.draw.ellipse(self.image, color, ... | nxhawk/PacMan_AI | Source/Object/Food.py | Food.py | py | 860 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pygame.Surface",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "constants.WHITE",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "constants.WHITE",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "pygame.draw.elli... |
30526669570 | # augmentations for 2D and 2.5D
import random
import numpy as np
import SimpleITK as sitk
from src.utils.itk_tools import rotate_translate_scale2d
# Now only support list or tuple
class Compose(object):
def __init__(self, augmentations):
self._augmentations = augmentations
def __call__(self, nda, nd... | eugeneyuan/test_rep | src/data/aug2d.py | aug2d.py | py | 3,312 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "random.random",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "numpy.copy",
"line_num... |
16586177664 | # -*- coding: UTF-8 -*-
from flask import render_template, flash, redirect
from sqlalchemy.orm import *
from sqlalchemy import *
from flask.ext.sqlalchemy import SQLAlchemy
from flask import Flask
from flask import *
from forms import lyb
#from flask.ext.bootstrap import Bootstrap
app = Flask(__name__)
app.config.f... | wjh1234/python-scripts | flasker/app/views.py | views.py | py | 2,095 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.ext.sqlalchemy.SQLAlchemy",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "forms.lyb",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "flask.flash",
... |
13098646528 |
from io import BytesIO
from pathlib import Path
import random
from flask import Blueprint, Flask
from flask.wrappers import Response
from loft.config import Config, DebugConfig
from loft.util.id_map import IdMap
from loft.web.blueprints.api import api
rand = random.Random()
rand.seed(24242424)
def client(config:... | ucsb-cs148-s21/t7-local-network-file-transfer | test/web/blueprints/test_api.py | test_api.py | py | 4,074 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "random.Random",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "loft.config.Config",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "flask.Blueprint",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "flask.Flask",
"l... |
1479958272 | from datetime import date
import numpy as np
import pandas as pd
from pandas.tseries.holiday import USFederalHolidayCalendar as calendar
from app.features_extractors.numerical import make_harmonic_features
def number_of_days_until_true(boolean_values: pd.Series, today: date) -> pd.Series:
return (boolean_values[... | ahmediqtakehomes/TakeHomes | reformated_takehomes_old/doordash_1/example_submission/app/features_extractors/calendar.py | calendar.py | py | 2,283 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "pandas.Series",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "datetime.date",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "numpy.NaN",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pandas.Series",
"li... |
34058973132 | from sklearn.preprocessing import Normalizer
import numpy as np
from utils import extract_face_roi_single
from Database import addNewStudent
import pickle
import os
from bson.binary import Binary
import tensorflow as tf
os.environ['CUDA_VISIBLE_DEVICES']='-1'
Normaliser = Normalizer(norm='l2')
global graph
frozen_gr... | VikasOjha666/Attendance_API_optimized | prepare_embeddings.py | prepare_embeddings.py | py | 2,065 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.environ",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "sklearn.preprocessing.Normalizer",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "tensorflow.gfile.GFile",
"line_number": 16,
"usage_type": "call"
},
{
"api_name"... |
29178775126 | from django.http import HttpResponse
from django.core.paginator import Paginator
from django.shortcuts import render
from .operations_c import Company_O, Publication
from django.http import QueryDict
from home.operation_home import Home_O
def Add_Publication(request):
if request.method == 'POST':
mutable_post_data ... | cdavid58/empleo | company/views.py | views.py | py | 1,810 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "operations_c.Publication",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "operations_c.Company_O",
"line_number": 16,
"usage_type": "call"
},
{
"api_name"... |
17872592313 | #
# author: Paul Galatic
#
# This program is JUST for drawing a rounded rectangle.
#
import pdb
from PIL import Image, ImageDraw
from extern import *
def sub_rectangle(draw, xy, corner_radius=25, fill=(255, 255, 255)):
'''
Source: https://stackoverflow.com/questions/7787375/python-imaging-library-pil-drawin... | pgalatic/zeitgeist | rectround.py | rectround.py | py | 2,033 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "PIL.Image.new",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 57,
"usage_type": "name"
}
] |
9587970567 | from plugin import plugin
from colorama import Fore
@plugin("hex")
def binary(jarvis, s):
"""
Converts an integer into a hexadecimal number
"""
if s == "":
s = jarvis.input("What's your number? ")
try:
n = int(s)
except ValueError:
jarvis.say("That's not a number!", Fo... | sukeesh/Jarvis | jarviscli/plugins/hex.py | hex.py | py | 503 | python | en | code | 2,765 | github-code | 36 | [
{
"api_name": "colorama.Fore.RED",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "colorama.Fore",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "colorama.Fore.YELLOW",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "colora... |
30490661295 | #!/usr/bin/env python3
import os
import sys
import logging
import json
import requests
import datetime
import pyteamcity
import http.server
import validators
from urllib.parse import urlparse
config = {}
tc = None
logger = None
def initializeLogger():
logger = logging.getLogger('teamcity_connector')
logger.setL... | mrlov/hygieia_teamcity_collector | main.py | main.py | py | 6,631 | python | en | code | 1 | github-code | 36 | [
{
"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.INF... |
40858069336 | import matplotlib.pyplot as plt
# 模拟导航路径数据
path = [(0, 0), (1, 1), (2, 3), (3, 4), (4, 2)]
# 初始化绘图
fig, ax = plt.subplots()
ax.set_xlim(-1, 5)
ax.set_ylim(-1, 5)
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_title('Navigation Path')
# 绘制导航路径
x = [point[0] for point in path]
y = [point[1] for point in path]
ax.plot(x,... | haiboCode233/KivyPlusAR | testcode.py | testcode.py | py | 897 | python | zh | code | 0 | github-code | 36 | [
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.draw",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "mat... |
29014504899 | import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from penn_treebank_reader import *
from dataset import DatasetReader
from dataset import make_batch_iterator
def get_offset_cache(length):
offset_cache = {}
ncells = int(length * (1 + length) / 2)
for lvl in range(length):... | mrdrozdov/chart-parser | train.py | train.py | py | 7,733 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "torch.nn.Module",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "torch.nn.Module",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"li... |
72244550505 | import json
# Load the mapping from inscriptions.json
with open("inscriptions.json", "r") as json_file:
data = json.load(json_file)
# Create a mapping from "Goosinals #" to "id"
mapping = {}
for entry in data:
number = int(entry["meta"]["name"].split("#")[1].strip())
mapping[number] = entry["id"]
# Proce... | jokie88/goosinal_mosaic | map_goosinalnumber_to_hash.py | map_goosinalnumber_to_hash.py | py | 617 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "json.load",
"line_number": 5,
"usage_type": "call"
}
] |
14203206189 | import math
from flask import render_template, request, redirect, url_for, session, jsonify
from saleapp import app, login
import utils
import cloudinary.uploader
from flask_login import login_user, logout_user, login_required
from saleapp.admin import *
from saleapp.models import UserRole
@app.route("/")
def index(... | duonghuuthanh/K19SaleApp | mysaleappv3/saleapp/index.py | index.py | py | 5,712 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.request.args.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "flask.re... |
11263851417 | import sqlite3
from flask import g
from app.app import app
from .model import Objective, User
DATABASE = "data.db"
def create_tables():
with app.app_context():
db = get_db()
cursor = db.cursor()
cursor.execute('''CREATE TABLE IF NOT EXISTS users (
us... | brunotsantos1997/robson-api | app/data/database.py | database.py | py | 4,413 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "app.app.app.app_context",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "app.app.app",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "model.Objective",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "app.app.app.app_c... |
25743825361 | __all__ = [
"Quantizer"
]
from multiprocessing import Pool
import numpy as np
from ..base import Pipe
from ..config import read_config
from ..funcs import parse_marker
config = read_config()
D = config.get("jpeg2000", "D")
QCD = config.get("jpeg2000", "QCD")
delta_vb = config.get("jpeg2000", "delta_vb")
reserve_b... | yetiansh/fpeg | fpeg/utils/quantify.py | quantify.py | py | 6,831 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "config.read_config",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "config.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "config.get",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "config.get",
"line_numbe... |
368888743 | from datetime import datetime
import re
import string
import pandas as pd
import time
from sympy import li
class Model_Trace_Analysis:
def __init__(self):
timestr = time.strftime("%Y%m%d_%H%M%S")
self.txt_path = './analysis/klm_bei_record/typing_log_'+str(timestr)+'.txt'
self.result_path =... | TuringFallAsleep/Tinkerable-AAC-Keyboard | develop/model_trace_analysis.py | model_trace_analysis.py | py | 25,662 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "time.strftime",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "re.search",
... |
22204331425 | from ..service.client_service import ClientService
from flask_restx import Resource, Namespace, fields
from flask import jsonify, request
client_service = ClientService()
api = Namespace('Cliente', 'Operações relacionadas aos clientes da loja')
clients_fields = api.model('Cliente', {
'name': fields.String,
'... | anaplb3/loja-api | app/main/controller/client_controller.py | client_controller.py | py | 2,076 | python | pt | code | 0 | github-code | 36 | [
{
"api_name": "service.client_service.ClientService",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask_restx.Namespace",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask_restx.fields.String",
"line_number": 10,
"usage_type": "attribute"
},
... |
21546325152 | #This python script reads a CSV formatted table of methylation sites
#and attaches, depending on the coordinate, 1.5 kb flanking regions
#numbers listed
import csv # module to read CSV files
import re # module to search for regular expressions in files; not in use now but will set up for sophisticated search ... | lanl/DNA_methylation_analysis | meth_site_flanking_seq.py | meth_site_flanking_seq.py | py | 2,848 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "re.match",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 36,
"usage_type": "call"
}
] |
40243581716 | from django.conf import settings
from django.db import models
import logging
import requests
log = logging.getLogger('genoome.twentythree.models')
class Token23(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL, unique=True)
access_token = models.TextField()
refresh_token = models.TextField... | jiivan/genoomy | genoome/twentythree/models.py | models.py | py | 4,655 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"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... |
23109102237 | import requests
from datetime import datetime
from bs4 import BeautifulSoup
url = 'https://www.naver.com/'
html = requests.get(url).text
soup = BeautifulSoup(html, 'html.parser')
#실시간 검색어 긁어온거 그대로
#한두개 코드 긁어서 전체적으로 긁어오려면 어떻게 써야할지 고민
# → li 태그 전체를 뽑아오게끔 손질해보자( li:nth-child(1) → li )
names = soup.select('#PM_ID_ct > d... | drhee0919/TIL | Chatbot/05_naver_rank.py | 05_naver_rank.py | py | 992 | python | ko | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetime"... |
26089552298 | import numpy as np
import math
import scipy.signal as juan
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['KaiTi']#黑体:SimHei 宋体:SimSun 楷体KaiTi 微软雅黑体:Microsoft YaHei
plt.rcParams['axes.unicode_minus'] = False#这两用于写汉字
n1 = np.arange(0,32,1)
dom = [True if (i>=8 and i<=23) else False for i... | Mr-Da-Yang/Python_learning | 2019vacational_project/matplotlib/xinhaojiance_02.py | xinhaojiance_02.py | py | 1,391 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 6,
"usage_type": "attribute"
},
{
"ap... |
993256569 | import asyncio
import serial_asyncio
import threading
from functools import partial
class AsyncSerialConnection(object):
def __init__(self, loop, device, port='/dev/ttyUSB0'):
coro = serial_asyncio.create_serial_connection(loop, ZiGateProtocol, port, baudrate=115200)
futur = asyncio.run_coroutine... | elric91/ZiGate | examples/async_serial.py | async_serial.py | py | 1,929 | python | en | code | 18 | github-code | 36 | [
{
"api_name": "serial_asyncio.create_serial_connection",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "asyncio.run_coroutine_threadsafe",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "functools.partial",
"line_number": 12,
"usage_type": "call"
},... |
28890243109 | import torch
import math
from torch import nn
from torch.nn import functional as F
from data import utils as du
from model import ipa_pytorch
from model import frame_gemnet
from openfold.np import residue_constants
import functools as fn
Tensor = torch.Tensor
def get_index_embedding(indices, embed_size, max_len=2056... | blt2114/twisted_diffusion_sampler | protein_exp/model/reverse_se3_diffusion.py | reverse_se3_diffusion.py | py | 10,866 | python | en | code | 11 | github-code | 36 | [
{
"api_name": "torch.Tensor",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "torch.arange",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "torch.sin",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "math.pi",
"line_number":... |
72225854504 | #!/usr/bin/python3
"""
Main 'BaseModel' class that defines all common
attributes/methods for other classes
"""
import uuid
import models
from datetime import datetime
class BaseModel:
""" Base class constructor method """
def __init__(self, *args, **kwargs):
""" Base class initializes the objects ""... | DevPacho/holbertonschool-AirBnB_clone | models/base_model.py | base_model.py | py | 1,607 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "uuid.uuid4",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "datetime.date... |
9815950754 | import discord
import asyncio
import time
import sys
import os
import random
import aiohttp
useproxies = sys.argv[4]
if useproxies == 'True':
proxy_list = open("proxies.txt").read().splitlines()
proxy = random.choice(proxy_list)
con = aiohttp.ProxyConnector(proxy="http://"+proxy)
client = ... | X-Nozi/NoziandNiggarr24Toolbox | spammer/cleanup.py | cleanup.py | py | 1,446 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sys.argv",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "random.choice",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "aiohttp.ProxyConnector",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "discord.Client",
... |
1119124359 | from typing import Iterable, Callable
import SearchSpace
from BenchmarkProblems.CombinatorialProblem import CombinatorialProblem
from Version_E.Feature import Feature
from Version_E.InterestingAlgorithms.Miner import FeatureSelector
from Version_E.MeasurableCriterion.CriterionUtilities import Balance, Extreme, All
fro... | Giancarlo-Catalano/Featurer | Version_E/Sampling/RegurgitationSampler.py | RegurgitationSampler.py | py | 3,398 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "BenchmarkProblems.CombinatorialProblem.CombinatorialProblem",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "typing.Callable",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "Version_E.PrecomputedPopulationInformation.PrecomputedPopulationInfor... |
43906527977 | """
Process command line arguments and/or load configuration file
mostly used by the test scripts
"""
import argparse
import sys
import os.path
from typing import Union
import yaml
def do_args():
"""
@brief { function_description }
@return { description_of_the_return_value }
"""
# Parse ... | Aethylred/pyspectrumscale | pyspectrumscale/configuration/__init__.py | __init__.py | py | 6,045 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "typing.Union",
"line_number": 162,
"usage_type": "name"
},
{
"api_name": "os.path.path.isfile",
"line_number": 204,
"usage_type": "call"
},
{
"api_name": "os.path.pa... |
14997087223 | import typing
from typing import Any, Callable, List, Tuple, Union
import IPython.display as display
import cv2
import numpy as np
import os, sys
from PIL import Image
from .abc_interpreter import Interpreter
from ..data_processor.readers import preprocess_image, read_image, restore_image, preprocess_inputs
from ..da... | LoganCome/FedMedical | utils/InterpretDL/interpretdl/interpreter/score_cam.py | score_cam.py | py | 7,112 | python | en | code | 44 | github-code | 36 | [
{
"api_name": "abc_interpreter.Interpreter",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "abc_interpreter.Interpreter.__init__",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "abc_interpreter.Interpreter",
"line_number": 41,
"usage_type": "name"
... |
2214688634 | import argparse
from alarm import __version__
from alarm.constants import ALLOWED_EXTENSIONS, ON_WINDOWS
def parse_args(args):
"""Passing in args makes this easier to test:
https://stackoverflow.com/a/18161115
"""
parser = argparse.ArgumentParser(
description="Play an alarm after N minutes",
... | hobojoe1848/pybites-alarm | alarm/cli.py | cli.py | py | 2,095 | python | en | code | null | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentDefaultsHelpFormatter",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "alarm.constants.ON_WINDOWS",
"line_number": 25,
"usage_type": "name"
... |
37325991579 | import numpy as np
from zipline.pipeline import CustomFactor
from zipline.pipeline.data import USEquityPricing
class CCI(CustomFactor):
"""
Commodity Channel Index
Momentum indicator
**Default Inputs:** USEquityPricing.close, USEquityPricing.high, USEquityPricing.low
**Default Wi... | ahmad-emanuel/quant_trading_system | Indicators/CCI_self.py | CCI_self.py | py | 1,542 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "zipline.pipeline.CustomFactor",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "zipline.pipeline.data.USEquityPricing.high",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "zipline.pipeline.data.USEquityPricing",
"line_number": 17,
"... |
3119120370 | '''
参考资料:https://blog.csdn.net/weixin_45971950/article/details/122331273
'''
import cv2
def is_inside(o, i):
ox, oy, ow, oh = o
ix, iy, iw, ih = i
return ox > ix and oy > iy and ox+ow < ix+iw and oy+oh < iy+ih
def draw_person(image, person):
x, y, w, h = person
cv2.rectangle(image, (x, y), (x+w, ... | ryan6liu/demo | facedetect/demo/demo_movedetect_hog_svm.py | demo_movedetect_hog_svm.py | py | 1,477 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "cv2.rectangle",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_PROP_FPS",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "cv2.CAP_PROP_FRA... |
24019764012 | import numpy as np
import random
from matplotlib import pyplot as plt
from matplotlib.patches import Circle
from matplotlib.patches import Rectangle
# ========================== CONSTANTS ============================
L = 7
SHAPES = ['CUBE', 'SPHERE', 'EMPTY']
COLORS = ['R', 'G', 'B']
def get_shape_pattern(i_start, i_... | evanthebouncy/program_synthesis_pragmatics | version_space/grid.py | grid.py | py | 3,191 | python | en | code | 7 | github-code | 36 | [
{
"api_name": "random.choice",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_n... |
34986315817 | from flask import Flask, render_template, request, url_for, flash, redirect
import sqlite3
from werkzeug.exceptions import abort
from flask_socketio import SocketIO
from engineio.payload import Payload
Payload.max_decode_packets = 50
def get_db_connection():
conn = sqlite3.connect('database.db')
conn.row_fact... | JeroenMX/LearningPython | main.py | main.py | py | 3,952 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "engineio.payload.Payload.max_decode_packets",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "engineio.payload.Payload",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "sqlite3.connect",
"line_number": 10,
"usage_type": "call"
},
... |
40243457981 | import torch.nn as nn
import torch
import torchvision
import cv2
import time
import numpy as np
import os
YOEO_CLASSES = (
"shark",
"coral",
"fish",
"turtle",
"manta ray",
)
def preproc(img, input_size, swap=(2, 0, 1)):
if len(img.shape) == 3:
padded_img = np.ones((input_size[0], inpu... | teyang-lau/you-only-edit-once | src/utils/yolox_process.py | yolox_process.py | py | 13,535 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "numpy.ones",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "numpy.ones",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number... |
36956278049 | from suite_subprocess import suite_subprocess
from contextlib import contextmanager
from wtscenario import make_scenarios
import json, re, wiredtiger, wttest
# Shared base class used by verbose tests.
class test_verbose_base(wttest.WiredTigerTestCase, suite_subprocess):
# The maximum number of lines we will read f... | mongodb/mongo | src/third_party/wiredtiger/test/suite/test_verbose01.py | test_verbose01.py | py | 10,688 | python | en | code | 24,670 | github-code | 36 | [
{
"api_name": "wttest.WiredTigerTestCase",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "suite_subprocess.suite_subprocess",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "re.compile",
"line_number": 97,
"usage_type": "call"
},
{
"api_nam... |
12782770518 | from estimate_explosion_time.shared import get_custom_logger, main_logger_name, pickle_dir
import logging
logger = get_custom_logger(main_logger_name)
logger.setLevel(logging.INFO)
logger.debug('logging level is DEBUG')
from estimate_explosion_time.analyses.rappid_simulations import rappidDH
from estimate_explosion_t... | JannisNe/ztf_SN-LCs-explosion_time_estimation | estimate_explosion_time/analyses/rappid_simulations/complete_analyses.py | complete_analyses.py | py | 2,150 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "estimate_explosion_time.shared.get_custom_logger",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "estimate_explosion_time.shared.main_logger_name",
"line_number": 4,
"usage_type": "argument"
},
{
"api_name": "logging.INFO",
"line_number": 5,
"usag... |
74205781223 | from typing import Iterable, Iterator
from PIL import Image # type: ignore
def resize_image_to_height(image: Image.Image, height: int) -> Image.Image:
return image.resize(size=(int(image.width * (height / image.height)), height))
def concat_paired_images(
left_image: Image.Image, right_image: Image.Image,... | yskuniv/python-simple-web-counter | simple_web_counter/utils/image/image.py | image.py | py | 1,340 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "PIL.Image.Image",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "PIL.Image",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "PIL.Image.Image",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "PIL.Image",
"li... |
6753606270 | from flask import Flask
# create Flask app object and init all modules
def create_app(config_object):
from .main import create_module as main_create_module
from app.api.v1 import create_module as api_v1_create_module
# Init APP
app = Flask(__name__)
app.config.from_object(config_object)
# In... | artem-shestakov/PIN_and_Hash | app/__init__.py | __init__.py | py | 545 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "app.api.v1",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "app.api.v1.config.from_object",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "app.api.v1.confi... |
40892450132 | import io
from pathlib import Path
import magic
from django.conf import settings
from smb.smb_structs import OperationFailure
from smb.SMBConnection import SMBConnection
def factory():
config = settings.SAMBA
connection = SMBConnection(
config["user"],
config["password"],
"abcd",
... | pierrotlemekcho/exaged | sifapi/planning/samba.py | samba.py | py | 1,707 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.conf.settings.SAMBA",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "smb.SMBConnection.SMBConnection",
"line_number": 12,
"usage_type": "call"
},
{
... |
8975839640 | import cv2
from keras.models import load_model
import numpy as np
video_capture = cv2.VideoCapture(0)
font = cv2.FONT_HERSHEY_SIMPLEX
# 读取人脸haar模型
face_detection = cv2.CascadeClassifier('model/face_detection/haarcascade_frontalface_default.xml')
# 读取性别判断模型
gender_classifier = load_model('model/gender/simp... | HadXu/machine-learning | face_detection_and_emotion/video_test.py | video_test.py | py | 2,250 | python | en | code | 287 | github-code | 36 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.FONT_HERSHEY_SIMPLEX",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "cv2.CascadeClassifier",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "ker... |
42600269199 | # Script to mess around with User authenticated spotify API
# For some reason, cannot authenticate with Google Chrome, so instead use Firefox
# http://spotipy.readthedocs.io/en/latest/
from pathlib import Path
from spotipy.oauth2 import SpotifyClientCredentials
import json
import spotipy
import time
import sys
import ... | tkajikawa/spotify_api | spotify_test.py | spotify_test.py | py | 2,133 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pathlib.Path",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "spotipy.util.prompt_for_user_token",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "spotipy.util",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "spotipy.... |
10350771272 | import pandas as pd
from astroquery.simbad import Simbad
import astropy.units as u
from astropy.coordinates import SkyCoord
from astroquery.gaia import Gaia
import numpy as np
import argparse
import sys
from time import sleep
parser = argparse.ArgumentParser(description='SIXTH: get information from Simbad and GAIA TAP... | HajimeKawahara/LookAtThis | database/python/siwiyn_parallax.py | siwiyn_parallax.py | py | 3,494 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "time.sleep",
... |
42119246092 | import pygame
from settings import Settings
from pygame.sprite import Sprite
class Ship(Sprite):
def __init__(self, ai_game):
"""initialize the ship and set its starting position"""
super().__init__()
self.screen = ai_game.screen
self.settings = ai_game.settings
self.screen_rect = ai_game.screen.get_rect()... | SylvainAroma/Alien-Invasion | ship.py | ship.py | py | 1,202 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pygame.sprite.Sprite",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "pygame.image.load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 16,
"usage_type": "attribute"
}
] |
16173542417 | # pylint: disable=missing-docstring
"""This is a script to test the RecurrentEncoder module."""
import pickle
import pytest
import torch
import torch.nn as nn
from metarl.torch.embeddings import RecurrentEncoder
class TestRecurrentEncoder:
"""Test for RecurrentEncoder."""
# yapf: disable
@pytest.mark.p... | icml2020submission6857/metarl | tests/metarl/torch/embeddings/test_recurrent_encoder.py | test_recurrent_encoder.py | py | 2,849 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "torch.ones",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "torch.float32",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "metarl.torch.embeddings.RecurrentEncoder",
"line_number": 32,
"usage_type": "call"
},
{
"api_name":... |
12482854412 | #!/usr/bin/env python
# coding: utf-8
# !rm -r inference
# !pip install -r requirements.txt
import json
import sys, os
import requests
import datetime
import numpy as np
import pickle
import time
import random
import zstandard as zstd
import tarfile
import pandas as pd
import boto3
import botocore
from bo... | drivendataorg/nasa-airathon | no2/1st Place/RunFeatures.py | RunFeatures.py | py | 25,953 | python | en | code | 12 | github-code | 36 | [
{
"api_name": "pandas.read_csv",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"... |
33571337998 | #!/usr/bin/env python3
from subprocess import Popen, PIPE, STDOUT
from threading import Thread
from time import sleep
import logging
import os
import sys
# Very simple tee logic implementation. You can specify shell command, output
# logfile and env variables. After TeePopen is created you can only wait until
# it f... | ByConity/ByConity | tests/ci/tee_popen.py | tee_popen.py | py | 2,012 | python | en | code | 1,352 | github-code | 36 | [
{
"api_name": "os.environ.copy",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "time.sleep",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "logging.warning",
"lin... |
34076302112 | from sklearn.base import BaseEstimator, TransformerMixin
import numpy as np
import sys
'''
The key concept in CSP is to find a set of spatial filters (components) that optimally discriminate
between the two classes. These filters are represented by the eigenvectors obtained in the 'fit' method.
When you apply the CS... | artainmo/total_perspective_vortex | processing_EEGs_lib/dimensionality_reduction_algorithm.py | dimensionality_reduction_algorithm.py | py | 4,957 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sklearn.base.BaseEstimator",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "sklearn.base.TransformerMixin",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.