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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
27762055369 | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from typing import Generator
from apitools.base.py import list_pager
from googlecloudsdk.api_lib.container.gkeonprem import client
from googlecloudsdk.api_lib.container.gkeonprem import update_mask
from goog... | twistedpair/google-cloud-sdk | google-cloud-sdk/lib/googlecloudsdk/api_lib/container/gkeonprem/vmware_node_pools.py | vmware_node_pools.py | py | 8,234 | python | en | code | 55 | github-code | 7 | [
{
"api_name": "googlecloudsdk.api_lib.container.gkeonprem.client.ClientBase",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "googlecloudsdk.api_lib.container.gkeonprem.client",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "googlecloudsdk.calliope.parse... |
32577338287 | import json
class MyClass:
def __init__(self, name, age):
self.name = name
self.age = age
def to_dict(self):
return {
"name": self.name,
"age": self.age,
"method": self.my_method.__name__
}
def my_method(self):
print("Hello, Wor... | ahmedfahad04/SPL-2 | TestCodes/JSON Practice/converter3.py | converter3.py | py | 910 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "json.JSONEncoder",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "json.JSONEncoder.default",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "json.JSONEncoder",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "... |
11331177543 | #!/usr/bin/env python
import os
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='sqlite3',
INSTALLED_APPS=[
'django.contrib.contenttypes',
'django.contrib.auth',
'django.contrib.admin',
'dja... | mklymyshyn/django-dtpanel-htmltidy | debug_toolbar_htmltidy/runtests.py | runtests.py | py | 1,400 | python | en | code | 46 | github-code | 7 | [
{
"api_name": "django.conf.settings.configured",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.conf.settings.configure",
"line_number": 8,
"usage_type": "call"
},
{
... |
26578358524 | from authlib.jose import jwt
header = {'alg': 'HS256'}
payload = {'iss': 'Authlib', 'sub': '123', 'name': 'bob'}
secret = '123abc.'
token = jwt.encode(header, payload, secret)
print(token.decode())
claims = jwt.decode(token, secret)
print(claims)
print(claims.header)
print(claims.validate_aud())
| gushiyu01/NLP | demo/authlibjwt.py | authlibjwt.py | py | 300 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "authlib.jose.jwt.encode",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "authlib.jose.jwt",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "authlib.jose.jwt.decode",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "authli... |
27761127319 | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import argparse
import os
from googlecloudsdk.core import log
from googlecloudsdk.core import yaml
import six
# Runtime ID to component mapping. python27-libs is a special token indicating
# that the real r... | twistedpair/google-cloud-sdk | google-cloud-sdk/lib/googlecloudsdk/api_lib/app/wrapper_util.py | wrapper_util.py | py | 4,949 | python | en | code | 55 | github-code | 7 | [
{
"api_name": "os.path.isfile",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 64,
"usage_type": "attribute"
},
{
"api_name": "os.path.splitext",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numb... |
34595653359 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division, print_function
import time
import numpy as np
import matplotlib.pyplot as pl
import emcee
from kplr import EXPOSURE_TIMES
import transit
texp = EXPOSURE_TIMES[1] / 86400.0
s = transit.System(transit.Central(dilution=0.05))
body = tran... | dfm/transit | demo.py | demo.py | py | 1,686 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "kplr.EXPOSURE_TIMES",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "transit.System",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "transit.Central",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "transit.Body",
... |
71918415264 | from flask import Flask, Blueprint, render_template, request, session, url_for, redirect, flash
from flask_sqlalchemy import SQLAlchemy
from flask_bootstrap import Bootstrap
from flask_login import LoginManager
from os import path
db = SQLAlchemy()
DB_NAME = 'database.db'
def create_app():
print(__name__)
app ... | Leommm-byte/tncbcagegeweb | website/__init__.py | __init__.py | py | 1,222 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "website.views.mainbp",
"line_number": 21,
"usage_type": "argument"
},
{
"api_name": "websi... |
18350049425 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0011_examplemodel'),
]
operations = [
migrations.AlterField(
model_name='examplemodel',
name... | Lavus/teste | blog/migrations/0012_auto_20170928_1853.py | 0012_auto_20170928_1853.py | py | 434 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AlterField",
"line_number": 14,
"usage_type": "call"
},
{... |
928985254 | from typing import Any, Callable, Optional, TypeVar
import reactivex
from reactivex import Observable, abc
from reactivex.disposable import (
CompositeDisposable,
SerialDisposable,
SingleAssignmentDisposable,
)
_T = TypeVar("_T")
def timeout_with_mapper_(
first_timeout: Optional[Observable[_T]] = No... | ReactiveX/RxPY | reactivex/operators/_timeoutwithmapper.py | _timeoutwithmapper.py | py | 4,408 | python | en | code | 4,581 | github-code | 7 | [
{
"api_name": "typing.TypeVar",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "typing.Optional",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "reactivex.Observable",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.Optional",... |
14716671712 | import requests
import bs4
import re
HEADERS = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Firefox/45.0'}
base_url = 'https://habr.com'
url = base_url + '/ru/all/page1/'
KEYWORDS = ['python', 'дизайн', 'фото', 'web']
if __name__ == '__main__':
response = requests.get(url,... | YrChek/Web_scrapping | main.py | main.py | py | 1,715 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "re.I",
"line_number": 27... |
13058916175 | ####################################################################################
# Scraping Functions
# by JW
#
# A helper script to initialize the DB and other things at first boot of the
# container cluster.
#
# helpers / scraping_functions.py
######################################################################... | J0nasW/tie_crawler | app/helpers/scraping_functions.py | scraping_functions.py | py | 874 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 19,
"usage_type": "call"
}
] |
36795287872 | from collections import Counter
def check_want_number(count, want, number) -> bool:
for i in range(len(want)):
if count[want[i]] != number[i]: return False
return True
def solution(want, number, discount):
answer = 0
for day in range(len(discount)):
count = Counter(discount[day:day +... | xiu0327/2023-coding-test-with-python | programmers/success/discount.py | discount.py | py | 613 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "collections.Counter",
"line_number": 13,
"usage_type": "call"
}
] |
71935623263 | import collections
import logging
import os
import queue
import random
from cros.factory.device import device_utils
from cros.factory.device import usb_c
from cros.factory.test.fixture import bft_fixture
from cros.factory.test.i18n import _
from cros.factory.test.pytests import audio
from cros.factory.test.utils impor... | arccode/factory | py/test/pytests/external_display.py | external_display.py | py | 16,564 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "collections.namedtuple",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "cros.factory.utils.schema.JSONSchemaDict",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "cros.factory.utils.schema",
"line_number": 28,
"usage_type": "name"
},
... |
42849318577 | import discord
import random
import datetime
from discord.ext import commands
from discord.ext import tasks
import asyncio
## configuration
TOKEN = "ENTER TOKEN HERE" # enter your bot token here
prefix = ">" # set prefix here
bot = commands.Bot(command_prefix=prefix)
color = 0xffffff # enter hex color of the color yo... | shinyPy/beginnerpy | run.py | run.py | py | 1,929 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "discord.ext.commands.Bot",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.utcnow",
"line_number": 14,
"usage_type": "call"
},
{
"api_name":... |
21323322474 | from typing import List
import collections
# Definition for a Node.
class Node:
def __init__(self, val=None, children=None):
self.val = val
self.children = children
class Solution:
def maxDepth(self, root: 'Node') -> int:
if not root:
return 0
max_level = 0
... | m318021/LeetCode-Solution | LeetCode/0559-Maximum-Depth-of-N-ary-Tree/0559.py | 0559.py | py | 804 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "collections.deque",
"line_number": 16,
"usage_type": "call"
}
] |
42510577633 | from radical import entk
import os
import argparse, sys, math
class ESMACS(object):
def __init__(self):
self.set_argparse()
self._set_rmq()
self.am = entk.AppManager(hostname=self.rmq_hostname, port=self.rmq_port)
self.p = entk.Pipeline()
self.s = entk.Stage()
def _set... | 2019-ncovgroup/DrugWorkflows | workflow-3/workflow-3.py | workflow-3.py | py | 8,116 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "radical.entk.AppManager",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "radical.entk",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "radical.entk.Pipeline",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "radical.en... |
72876850144 | # -*- coding: utf-8 -*-
import dash
import dash_core_components as dcc
import dash_bootstrap_components as dbc
import dash_html_components as html
from dash.dependencies import Input, Output
from dash.exceptions import PreventUpdate
import plotly.graph_objs as go
import os
import pandas as pd
import numpy as np
# ---... | OpenMRBenelux/openmr2021-dataviz-dash-app | app.py | app.py | py | 5,752 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.path.join",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "plotly.graph_objs.Figure",
... |
5197267440 | #!/usr/bin/env python3
import collections
import os
from flask import (
Flask,
render_template,
request,
session,
redirect,
url_for,
flash,
json,
)
from flask_bs4 import Bootstrap
from flask_moment import Moment
from datetime import datetime
from flask_wtf import FlaskForm
from wtforms ... | Plasny/zsl | 2022-2023/aplikacje-serwerowe/blitek/2022-10-13/project/app.py | app.py | py | 8,650 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "flask_bs4.Bootstrap",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "flask_moment.Moment",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "datetime.datetime... |
71309638622 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | openstack/openstacksdk | openstack/tests/unit/database/v1/test_instance.py | test_instance.py | py | 4,437 | python | en | code | 245 | github-code | 7 | [
{
"api_name": "openstack.tests.unit.base.TestCase",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "openstack.tests.unit.base",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "openstack.database.v1.instance.Instance",
"line_number": 36,
"usage_typ... |
34863173802 | """
pyshtools constants for the planet Mercury.
Each object is an astropy Constant that possesses the attributes name, value,
unit, uncertainty, and reference.
"""
import numpy as _np
from astropy.constants import Constant as _Constant
from astropy.constants import G as _G
gm = _Constant(
abbrev='gm_mercury',
... | SHTOOLS/SHTOOLS | pyshtools/constants/Mercury.py | Mercury.py | py | 4,001 | python | en | code | 314 | github-code | 7 | [
{
"api_name": "astropy.constants.Constant",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "astropy.constants.Constant",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "astropy.constants.G.value",
"line_number": 28,
"usage_type": "attribute"
},
{
... |
14368381366 | import praw
import pprint
from discord import Webhook, AsyncWebhookAdapter
import aiohttp
import asyncio
from datetime import datetime
import time
import os
## How to use token to access your reddit
## Please get a token using :
## python reddit.refresh.token.py
##
## Input * to the cmd line to define all scopes
##... | crotoc/IntergrationAppsToDiscord | reddit.py | reddit.py | py | 2,587 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "praw.Reddit",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "aiohttp.ClientSession",
... |
9138136268 | # Author: Bishal Sarang
"""
Main solver program that implements bfs, dfs and drawing utilities to draw graphs.
"""
import os
import emoji
import pydot
import random
from collections import deque
# Set it to bin folder of graphviz
os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38... | Bishalsarang/Missionaries-and-Cannibals-Problem | solve.py | solve.py | py | 13,563 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "os.environ",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.pathsep",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "pydot.Dot",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "pydot.Cluster",
"line_n... |
19182593575 |
import os
import argparse
from yolo import YOLO, detect_video
# 遍历文件夹
def walkFile(file):
for root, dirs, files in os.walk(file):
# root 表示当前正在访问的文件夹路径
# dirs 表示该文件夹下的子目录名list
# files 表示该文件夹下的文件list
# 遍历文件
for f in files:
print(os.path.join(root... | xingcongying/yolo-v3 | save_vedio.py | save_vedio.py | py | 922 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.walk",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 18... |
32900278254 | from dotenv import load_dotenv
from github_repo_qa_chain import GithubRepoQAChain
load_dotenv()
url = input("Enter the github repo url: ")
chain = GithubRepoQAChain(url)
while True:
result = chain.run(input("Enter your query: "))
print(result)
| SherifNeamatalla/github_repo_chatgpt | main.py | main.py | py | 256 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "github_repo_qa_chain.GithubRepoQAChain",
"line_number": 8,
"usage_type": "call"
}
] |
4986000212 | import logging
from assemblyline.lib.transcript import NO_STRAND
from assemblyline.lib.base import GTFAttr, FLOAT_PRECISION
def filter_transcripts(transcripts, min_length=250, guided=False):
"""
removes invalid transcripts
returns new list of transcripts
"""
# filter transcripts
new_transc... | bmpvieira-forks/assemblyline | assemblyline/assemblyline/lib/assemble/filter.py | filter.py | py | 2,079 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "assemblyline.lib.base.GTFAttr.REF",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "assemblyline.lib.base.GTFAttr",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "assemblyline.lib.transcript.NO_STRAND",
"line_number": 29,
"usage_ty... |
15348934692 | # from transformers import MT5ForConditionalGeneration, T5Tokenizer
# model = MT5ForConditionalGeneration.from_pretrained("google/mt5-small")
# tokenizer = T5Tokenizer.from_pretrained("google/mt5-small")
# article = "UN Offizier sagt, dass weiter verhandelt werden muss in Syrien."
# summary = "Weiter Verhandlung in Syr... | klogar/QAslovene | test.py | test.py | py | 1,925 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "transformers.T5Tokenizer.from_pretrained",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "transformers.T5Tokenizer",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "transformers.T5ForConditionalGeneration.from_pretrained",
"line_number": 19... |
2377246379 | import numpy as np
import os
from tflite_model_maker import model_spec
from tflite_model_maker import text_classifier
from tflite_model_maker.config import ExportFormat
from tflite_model_maker.text_classifier import AverageWordVecSpec
from tflite_model_maker.text_classifier import DataLoader
import tensorflow as tf
a... | trippletroubleteam/olivia | scrap/model3.py | model3.py | py | 2,381 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "tensorflow.__version__.startswith",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "tensorflow.__version__",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.get_logger",
"line_number": 12,
"usage_type": "call"
},
{
... |
14571172310 | import gspread
import pandas as pd
import streamlit as st
from streamlit_option_menu import option_menu
import plotly.express as px
from PIL import Image
import datetime
#declaring variables
sa = gspread.service_account()
sheet = sa.open('Expenses report')
worksheet = sheet.worksheet('Money Enero2')
cuentas = ['Obliga... | Rodrigueezj/Expenses-report | src/script.py | script.py | py | 2,665 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "gspread.service_account",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.today",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name":... |
41794273587 | """Unit test for Nested lists"""
import unittest
import mock
from nestedlists_hacker import Nestedlists
class TestNestedLists(unittest.TestCase):
"""Test case class"""
def setUp(self):
"""initiate the object"""
with mock.patch('__builtin__.raw_input',
return_value='5'):
... | yuyangd/python-gists | tests/unittest_nestedlists.py | unittest_nestedlists.py | py | 2,228 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "unittest.TestCase",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "mock.patch",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "nestedlists_hacker.Nestedlists",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "mock.... |
8472221332 | from flask import Flask, render_template, redirect
import scrape_mars
from flask_pymongo import PyMongo
app=Flask(__name__)
@app.route("/")
def index():
#setup mongo
app.config["MONGO_URI"] = "mongodb://localhost:27017/mars_db"
mongo=PyMongo(app)
# data=mongo.db.marsdict.find()
data = mongo.db.... | Paxony/WebScrappingNASAMars | Missions_to_Mars/app.py | app.py | py | 764 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask_pymongo.PyMongo",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask_pymongo.... |
4177125286 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import pandas as pd
import pdfplumber
from docx import Document
from pptx import Presentation
import win32com.client
# import textract
# text = textract.process(r'E:\tmp\zdump\test.pptx')
# print(text.decode('utf-8')) # 无法获取表格内容
def docx(filepath):
te... | beikejinmiao/secrawler | libs/office.py | office.py | py | 3,996 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "docx.Document",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pptx.Presentation",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pandas.read_excel",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "win32com.client.cli... |
19012746977 | import requests
import json
from bs4 import BeautifulSoup
import discord
from discord.ext import commands
client = commands.Bot(command_prefix="L!")
client.remove_command("help")
#BOT TOKEN GOES HERE
token = ''
headers = {
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/5... | CharlieAIO/LuckyAIO | lucky.py | lucky.py | py | 4,218 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "discord.ext.commands.Bot",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "requests.post",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "json.loads"... |
70115765982 | import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer
from sklearn.metrics import classification_report, confusion_matrix
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import MultinomialNB
f... | bbakiu/datascience-bootcamp | 24-nlp/nlp_exercise.py | nlp_exercise.py | py | 1,926 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "seaborn.FacetGrid",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "seaborn.histplot",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.py... |
36711521218 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('hermes', '0002_post_ip'),
]
operations = [
migrations.CreateModel(
name='Ban',
fields=[
... | mjdarby/Hermes | migrations/0003_ban.py | 0003_ban.py | py | 584 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 14,
"usage_type": "call"
},
... |
23681863455 | import urllib2
import json
from sysb import i18n
from sysb.config import core
from irc.request import whois
from irc.connection import servers as base
locale = i18n.turn(
'es',
core.obtconfig('package_translate', cache=True),
'translate')
_ = locale.turn_tr_str
lang = core.obtconfig('lang', cache=True)
l... | IsmaelRLG/UserBot | mods/translate/translate.py | translate.py | py | 4,411 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sysb.i18n.turn",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sysb.i18n",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "sysb.config.core.obtconfig",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sysb.config.core",
... |
39569656978 | """ Contains the `Graph` class as well its necessary component classes.
A `Graph` object is basically a combination of a list of `Node` and a list of
`Edge`. A `Node` object is constructed based on a list of `Attribute` objects
and contains a dictionary mapping attribute names to values. The preprocessing
of attriubte... | wangyiranamy/EntityResolution_Capstone | src/entity_resolver/core/graph.py | graph.py | py | 12,044 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "typing.Any",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "re.sub",
"line_number": 88,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 78,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 93,
... |
26403234092 | import torch
import torch.nn as nn
import torch.nn.functional as F
torch.backends.cudnn.benchmark = True
print("torch.backends.cudnn.benchmark =", torch.backends.cudnn.benchmark)
def get_network(params):
if params["network_type"] == "mlp":
return MLP()
elif params["network_type"] == "mlp2":
re... | hannesgriffith/ingenious-rl | learn/network.py | network.py | py | 6,073 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "torch.backends",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.backends",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Module",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",... |
24812631767 | import io
import logging
import os
import pytest
from ansible_galaxy import download
from ansible_galaxy import exceptions
log = logging.getLogger(__name__)
def test_fetch_url_404(tmpdir, requests_mock):
url = 'http://example.invalid/download/some_ns-some_name-1.2.3.tar.gz'
some_content = b'''<html><head>... | ansible/mazer | tests/ansible_galaxy/test_download.py | test_download.py | py | 1,365 | python | en | code | 113 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pytest.raises",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "ansible_galaxy.exceptions.GalaxyDownloadError",
"line_number": 23,
"usage_type": "attribute"
},
{
... |
35878490150 | from PIL import Image
import sys
def _main( ):
if len( sys.argv ) < 2:
print( 'Error, syntax is display.py <imagefile>' )
sys.exit(0)
try:
img = Image.open( sys.argv[1] )
img.show( )
except:
print( 'Error, could not open %s' % sys.argv[1] )
sys.exit( 0 )
| tanimislam/nprstuff | nprstuff/cli/display.py | display.py | py | 286 | python | en | code | 7 | github-code | 7 | [
{
"api_name": "sys.argv",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 9,
... |
29764599057 | """
Calculate CAPM using pandas
"""
import pandas as pd
from data.test import DF_DATA
def returns(prices: pd.DataFrame) -> pd.DataFrame:
"""
Calculates and returns a DataFrame containing the returns of a ticker
given the prices
"""
return pd.DataFrame(prices.pct_change().dropna(how="all"))
def ... | hugowangler/portfolio-theory-python | capm_return.py | capm_return.py | py | 1,419 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.DataFrame",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataFrame",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "pandas.Da... |
35991561553 | """
A module containing routines for integer factorization.
"""
import bisect
import functools
import itertools
import math
import random
import numpy as np
from ._math import prod, isqrt, iroot, ilog
from ._overrides import set_module
from ._prime import primes, is_prime
__all__ = [
"legendre_symbol", "jacobi_s... | xavi0007/CE7490_Raid6 | galois/_factor.py | _factor.py | py | 26,677 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.integer",
"line_number": 77,
"usage_type": "attribute"
},
{
"api_name": "numpy.integer",
"line_number": 79,
"usage_type": "attribute"
},
{
"api_name": "_prime.is_prime",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "_overrides.set_... |
42643364108 | from typing import Any, Dict, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="CodatDataIntegrityContractsSummaryMatchCountSummary")
@attr.s(auto_attribs=True)
class CodatDataIntegrityContractsSummaryMatchCountSummary:
"""
Attributes:
match_percentage (Union... | levrofin/levro-codat | codat_api_client/models/codat_data_integrity_contracts_summary_match_count_summary.py | codat_data_integrity_contracts_summary_match_count_summary.py | py | 1,832 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "typing.TypeVar",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "typing.Union",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "types.Unset",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "types.UNSET",
"line_number... |
7064229653 | from helper import display_task_name, display_example
'''
Darts
URL: https://exercism.org/tracks/python/exercises/darts
Instructions
Write a function that returns the earned points in a single toss of a Darts game.
Darts is a game where players throw darts at a target.
In our particular instance of the game, the ta... | vslayer34/Exercism-Python | 05_Comparisons/02_Darts.py | 02_Darts.py | py | 3,845 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "math.pow",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "math.pow",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "math.pow",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "math.pow",
"line_number": 36,
"usa... |
10694519160 | import math
from datetime import datetime, date
import numpy as np
from dateutil.relativedelta import relativedelta
import pandas as pd
from pandas import Series
from sklearn.preprocessing import StandardScaler
from statsmodels.tsa.stattools import adfuller
from portfolio_optimization.data_lake.mongodb import get_coll... | MandM-DataScience/portfolio-optimization | portfolio_optimization/helper.py | helper.py | py | 16,380 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "dateutil.relativedelta.relativedelta",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pandas.to_datetime",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pandas.to_datetime",
"line_number": 32,
"usage_type": "call"
},
{
"api_na... |
14448207118 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'mayosql/$', views.mayosql, name = 'mayosql'),
url(r'^mayo/', views.mayo, name='mayo'),
url(r'^insumo/$', views.insumo, name='insumo'),
url(r'^tablaprueba/$', views.tablaprueba, name='t... | JavierIGP/CC3201-BDD-App | prueba/templates/prueba/urls.py | urls.py | py | 858 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.conf.urls.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.co... |
35941516940 | from django.urls import path
import authapp.views as authapp
app_name = 'authapp'
urlpatterns = [
path('login/', authapp.login, name='login'),
path('logout/', authapp.logout, name='logout'),
path('user/register/', authapp.user_register, name='user_register'),
path('user/profile/', authapp.user_profil... | AlexeyDubrov/Django_geekshop | authapp/urls.py | urls.py | py | 456 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "authapp.views.login",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "authapp.views",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.urls.path... |
27265505522 | from django.shortcuts import render, get_object_or_404
from .forms import ContactForm
from django.conf import settings
from django.core.mail import send_mail
from profiles.models import UserProfile
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
def index(request)... | chris92vr/Fit-and-Lift | home/views.py | views.py | py | 1,250 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.shortcuts.render",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "forms.ContactForm",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.get_object_or_404",
"line_number": 19,
"usage_type": "call"
},
{
"api_... |
24245404911 | from fastapi import APIRouter, UploadFile, Depends, Body
from modern.xor_cipher import XorCipher
from modern.solver.xor import XorDetector, XorSolver
from models import ClassicalCipherInput, FrequencyInput
from classical.alphabet import Alphabet
from fastapi import File
router = APIRouter(
prefix="/modern",
t... | rucinpk/CryptoAPI | src/routers/modern.py | modern.py | py | 1,686 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "modern.xor_cipher.XorCipher.encrypt",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "modern.xor_cipher.XorCipher",
"line_number": 28,
"usage_type": "name"
},
{
"... |
24053995279 | import logging
import os
logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.DEBUG)
logging.disable(logging.DEBUG)
tests_enable = True
def get_sample_no(first_samples, sample_no):
# doesn't contain the last one
last_seen = {}
for idx, val in enumerate(first_samples[:-1]):
last_s... | opiechow/aoc2020 | 15/number_sayer.py | number_sayer.py | py | 1,835 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.basicConfig",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "logging.disable",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
... |
23495107430 | """Feature Learning.
Feature Learning with K-means clustering. Nearest Neighbours, and Bag of Words.
"""
import pickle
import gzip
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from sklearn.cluster import KMeans
from sklearn.neighbors import KNeighborsClassifier
# Import the train/test... | bqUAB/par_practices | c-unsupervised_learning/c0-bag_of_words.py | c0-bag_of_words.py | py | 8,214 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "gzip.open",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
... |
14196823925 | # from pudb import set_trace; set_trace()
from typing import List
from collections import Counter
import math
class Solution1:
def minDominoRotations(self, tops: List[int], bottoms: List[int]) -> int:
"""LeetCode 1007
We first use counter on tops and bottoms. Then we check tiles 1 to 6.
F... | FanchenBao/leetcode | 2022_03_challenge/03_20_2022.py | 03_20_2022.py | py | 3,161 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "typing.List",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "collections.Counter",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "math.inf",
"li... |
40376049190 | import zmq
import json
# Dummy data
user_manifest = {
'/': {'type': 'folder'},
'/foo': {'type': 'folder'},
'/foo/sub.txt': {'type': 'file', 'id': '001'},
'/bar.txt': {'type': 'file', 'id': '002'},
}
file_manifests = {
'001': {
'blocks': [
{'id': '001001'},
{'id': '... | touilleMan/parsec-zmq-poc | parsec/backend.py | backend.py | py | 2,578 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "zmq.Context",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "zmq.ROUTER",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number"... |
10074008727 | from fastapi.testclient import TestClient
from app.core.config import settings
def test_get_request(client: TestClient, user_token_headers: dict) -> None:
response = client.get(
f"{settings.API_V1_STR}/bpmanager/test_get",
headers=user_token_headers,
)
assert response.status_cod... | nmarusov/urania-backend | app/app/tests/api/api_v1/test_bpmanager.py | test_bpmanager.py | py | 815 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "fastapi.testclient.TestClient",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "app.core.config.settings.API_V1_STR",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "app.core.config.settings",
"line_number": 8,
"usage_type": "name"
... |
24568092027 | import importlib
import pkgutil
from langchain_core.load.mapping import SERIALIZABLE_MAPPING
def import_all_modules(package_name: str) -> dict:
package = importlib.import_module(package_name)
classes: dict = {}
for attribute_name in dir(package):
attribute = getattr(package, attribute_name)
... | langchain-ai/langchain | libs/langchain/tests/unit_tests/load/test_serializable.py | test_serializable.py | py | 2,208 | python | en | code | 68,990 | github-code | 7 | [
{
"api_name": "importlib.import_module",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pkgutil.walk_packages",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "importlib.import_module",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "... |
42054732838 | import sys
import os
import gc
import math
import numpy as np
import cv2
import glob
import imageio
from PIL import Image
from random import choice
from keras.utils import Sequence
import matplotlib.pyplot as plt
from keras import backend as K
from keras.layers import Lambda, Input
from keras.models import Model
impo... | jlfilho/VSRnet-Keras | libs/util.py | util.py | py | 34,684 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"... |
74936131744 | """
There are two versions of detection layer in darknet, one of them is named `region`.
This module contains this layer implemented.
"""
from keras import backend as K
from keras.engine.topology import Layer
import numpy as np
#from builtins import range
from keras.activations import softmax
class Region(Layer):
... | BrainGardenAI/keras-yolo | darknet/network/region.py | region.py | py | 2,762 | python | en | code | 25 | github-code | 7 | [
{
"api_name": "keras.engine.topology.Layer",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "numpy.prod",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "keras.backend.exp",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "keras.backen... |
42988439902 | import pandas as pd # manipulação de dados
import matplotlib.pyplot as plt # visualização de dados
import seaborn as sns # visualização de dados
from sklearn.feature_extraction.t... | brunsoares/Analise-dados | cap06/MiniProjeto01/Pergunta02.py | Pergunta02.py | py | 1,946 | python | pt | code | 1 | github-code | 7 | [
{
"api_name": "pandas.read_sql_query",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sklearn.feature_extraction.text.CountVectorizer",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 20,
"usage_type": "call"
},
{... |
28558381538 | '''
machine learning models for time series forecasting
'''
from sklearn.svm import SVR
from sklearn.ensemble import RandomForestRegressor
from sklearn.tree import DecisionTreeRegressor
from hmmlearn.hmm import GaussianHMM, GMMHMM
from sklearn.linear_model import LinearRegression
from src import eval
from src.util imp... | zhangxu0307/time_series_forecasting_pytorch | src/ML_forecasting.py | ML_forecasting.py | py | 5,363 | python | en | code | 326 | github-code | 7 | [
{
"api_name": "sklearn.preprocessing.MinMaxScaler",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "src.eval.calcMAE",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "src.eval",
"line_number": 81,
"usage_type": "name"
},
{
"api_name": "src.eval... |
16994738506 | import pandas as pd
import cv2 as cv
import numpy as np
# 将训练集的x和y拆分出来
def separate_xy():
path = 'initial_data\\train.csv'
df = pd.read_csv(path)
df_y = df[['label']]
df_x = df[['feature']]
df_y.to_csv('initial_data\\label.csv', index=False, header=False)
df_x.to_csv('initial_data\\data.csv', ... | zhangjundong1992/SentimentClassification | data_visualization.py | data_visualization.py | py | 727 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.read_csv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.reshape",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "cv2.imwrite",
"line_nu... |
32898371049 | import pyttsx3
import speech_recognition as sr
import datetime
import wikipedia
import webbrowser
import os
import random
import smtplib
from email.message import EmailMessage
contact = {'anchal': 'anchalgupta1203@gamil.com', 'aditi': 'aditigupta0852@gamil.com', 'isha': 'agen20cs304011@gmail.com'}
engine ... | Anchal012/ROSE-AI-Chatbot- | rose.py | rose.py | py | 4,018 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pyttsx3.init",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "speech_reco... |
33654946849 | """
Exercicios do dia 48
Vamos usar o Selenium para automatizar alguns processos na internet.
"""
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
CHROMIUM_DRIVER_PATH = r'/usr/lib/chromium/chromedriver'
driver = webdriver.Chrome(executable_path=CHROMIUM_DRIVER_PATH)
driver.maximize... | Sposigor/python_100_day_bootcamp | Nivel - Intermediario dia 15 a 58/dia 48/interação.py | interação.py | py | 537 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.keys.Keys.ENTER",
"line_number": 21,
"usage_type": "attribute"
}... |
10185167652 | """Structure classes."""
import numpy as np
import rmsd
import math
import warnings
from scipy.spatial.distance import cdist
from collections import Counter, OrderedDict, defaultdict
from .base import StructureClass, query, StructureSet
class AtomStructure:
"""A structure made of atoms. This contains various usef... | samirelanduk/atomium | atomium/structures.py | structures.py | py | 44,380 | python | en | code | 101 | github-code | 7 | [
{
"api_name": "collections.Counter",
"line_number": 86,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 97,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_numb... |
6565729705 | #!/usr/bin/python3
"""
query Reddit API recursively for list of hots
"""
import requests
def recurse(subreddit, hot_list=[], after="", count=0):
""" get recursively
Args:
subreddit(str): subreddit name
hot_list(list): [] list to hold hot topics
after(str): "" to hold the after paramet... | maradeben/alx-system_engineering-devops | 0x16-api_advanced/2-recurse.py | 2-recurse.py | py | 1,230 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 28,
"usage_type": "call"
}
] |
29039643910 | import json
lines = [l.strip() for l in open('08_input.txt')]
src_sum = sum(len(l) for l in lines)
s1_sum = sum(len(eval(l)) for l in lines)
s2_sum = sum(len(json.dumps(l)) for l in lines)
print('Star 1:', src_sum - s1_sum)
print('Star 2:', s2_sum - src_sum) | tkirill/adventofcode | 2015/python/08_Matchsticks.py | 08_Matchsticks.py | py | 262 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "json.dumps",
"line_number": 8,
"usage_type": "call"
}
] |
9356098896 | from setuptools import setup, find_namespace_packages
def _parse_requirements(file_path):
with open(file_path, 'r') as stream:
file = stream.readlines()
return file
setup(
name="exposurestats",
version="1.1.2",
description="Photo Statistics for Exposure Image Editor",
classifiers=[
... | luismavs/ExposureStats | setup.py | setup.py | py | 726 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "setuptools.setup",
"line_number": 8,
"usage_type": "call"
}
] |
74466552222 | #!/usr/bin/env python3
import argparse
import pysam
import csv
import random
import gzip
parser = argparse.ArgumentParser(description='foo')
parser.add_argument('-f','--fragments',action='store')
parser.add_argument('-b','--barcodes',action='store')
parser.add_argument('-o','--output',action='store')
args = parser.pa... | Castelo-Branco-lab/scCut-Tag_2020 | scripts/export_bam_per_replicate_and_cluster.py | export_bam_per_replicate_and_cluster.py | py | 1,160 | python | en | code | 8 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "gzip.open",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pysam.tabix_iterator",
... |
14895906412 | from collections import deque
n = int(input())
board = [list(map(int, input())) for _ in range(n)]
# deque 정의
d = deque()
# 결과값 리스트
res = []
# 방향벡터 정의
dx = [1,0,-1,0]
dy = [0,1,0,-1]
for i in range(n):
for j in range(n):
# 집이 있는 곳이라면 큐에 추가
if board[i][j] == 1:
board[i][j] = 0
... | JiyuChoi/Algorithm-Study | PS/DFS & BFS/단지 번호 붙이기.py | 단지 번호 붙이기.py | py | 1,410 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "collections.deque",
"line_number": 7,
"usage_type": "call"
}
] |
42269271188 | import argparse
from typing import List
from pathlib import Path
import geopandas as gpd
import pandas as pd
import glob
import os
from shapely.geometry import Polygon
"""
I've just made a few edits to the arg structure in consolidate_buildings.py
so that it is easier (for me) to run over all the region-specific s... | satejsoman/prclz | osm-etl/consolidate_buildings2.py | consolidate_buildings2.py | py | 3,310 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "shapely.geometry.Polygon",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "os.path.isfile",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "os.path",
"li... |
30043000520 | from utils import get_file_list_from_fileform, check_pattern_exist, copy_file, split_list
src_dir = '/data1/sap/interpark_data/train/extra_1210_mod/images/'
cam_num = [0, 1, 2]
#file_name = ['TunaCan_0_*[0-9].jpg', 'TunaCan_1_*[0-9].jpg', 'TunaCan_2_*[0-9].jpg']
file_name = ['Myzzo_0_*[0-9].jpg', 'Myzzo_1_*[0-9].jpg',... | solapark/script_da | mv_detection_list.py | mv_detection_list.py | py | 2,916 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "utils.copy_file",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "utils.copy_file",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "utils.get_file_list_from_fileform",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "uti... |
16246894447 | import pydantic
import networkx as nx
from enum import Enum
from sunshot.models import Account
from crimson.models import Contract
from crimson.game.cards import Card
from crimson.game import cards
# Starting Game Conditions
STARTING_DECK: list[Card] = ([]
+ [cards.REACTOR_CARD] * 3
+ [cards.THRUSTER_CARD] *... | goodCoderXD/moonraker-clone | prototype/crimson/game/main.py | main.py | py | 3,824 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "crimson.game.cards.Card",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "crimson.game.cards.REACTOR_CARD",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "crimson.game.cards",
"line_number": 13,
"usage_type": "name"
},
{
"a... |
25630668783 | import cv2
import numpy as np
import pickle
from tqdm import tqdm
DEBUG = False
image_size = 256
from utils.viz import save_image, get_image, get_normalized_image, normalize, get_heatmap
"""
# Computes the gradCAM heatmap for a given image
# :param gradCAM gradCAM object to call for computing results
# :... | yubryanj/DD2412-Advanced-Deep-Learning | src/experiments/experiment_4_1/experiment_4_1.py | experiment_4_1.py | py | 13,308 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "utils.viz.get_normalized_image",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "utils.viz.get_heatmap",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "cv2.threshold",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "cv... |
39560260870 | import requests
from bs4 import BeautifulSoup
import pandas as pd
import sys
url = 'https://www.sanfoundry.com/java-mcqs-integer-floating-data-types/'
flag = 1
count = 0
questions = []
answers = []
opt1 = []
opt2 = []
opt3 = []
opt4 = []
while flag:
try:
response = requests.get(url)
soup = Beauti... | TheFenrisLycaon/KamtechScripts | Sanfoundary Scrapper/main.py | main.py | py | 3,583 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 92,
"usage_type": "call"
}
] |
22324508193 | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 25 18:02:47 2020
@author: Nikitha
"""
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib import style
style.use('ggplot')
fig = plt.figure()
axis1 = fig.add_subplot(1,1,1)
def anima(i):
pull = open('twit... | Nikitha-nsu/Tweet-Sentiment-analysis | visuals.py | visuals.py | py | 914 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "matplotlib.style.use",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "matplotlib.style",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplo... |
3665931133 | import os
import csv
import sys
import requests
import bs4
mesta = []
href = []
def convert_to_href(root: str, xr: str, shift: int) -> str:
"""
Vrácí link na obce uzemního celku nebo detalní výsledky obce
:param root: obsahuje 1. část odkazu https:\\....
:param xr: obsahuje 2. část odka... | smichelf/Elections-scraper | volby_2017.py | volby_2017.py | py | 7,491 | python | cs | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"... |
35354472854 | import random
import requests
from bs4 import BeautifulSoup as bs
from pprint import pprint
def parser(url):
r = requests.get(URL)
soup = bs(r.text, 'html.parser')
anekdots = soup.find_all('div', class_='text')
return [i.text for i in anekdots]
def joke():
global joker
if not len(joker):
... | VKucherenkov/Telegram_Bot | services/parser_joke.py | parser_joke.py | py | 587 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pprint.pprint",
"line... |
40352293649 | from setuptools import find_packages, setup
exec(open("getml/version.py").read())
long_description = """
getML (https://getml.com) is a software for automated machine learning
(AutoML) with a special focus on feature learning for relational data
and time series.
This is the official python client for... | getml/getml-community | src/python-api/setup.py | setup.py | py | 2,016 | python | en | code | 46 | github-code | 7 | [
{
"api_name": "setuptools.setup",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 29,
"usage_type": "call"
}
] |
838275705 | from webbrowser import Chrome
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
import time
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get("https://www.yatra.com/fli... | karanv68/Selenium_Python | PythonSeleniumProject_1/18_Auto_Suggestion.py | 18_Auto_Suggestion.py | py | 920 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "webdriver_manager.chrome.ChromeDriverManager",
"line_number": 9,
"usage_type": "call"
},
{... |
43265985974 | import argparse
import datetime
import os
import re
import sys
from typing import Sequence
EXTENSIONS = [".py"]
COPYRIGHT_REGEX_STR = r"Copyright.*(?P<till>\d{4}) (?P<holder>.*)"
COPYRIGHT_REGEX = re.compile(COPYRIGHT_REGEX_STR)
THIS_YEAR = datetime.datetime.now().year
EXCLUDED_FILES = ["docs/conf.py"]
def check_fi... | kaposh/spsdk | tools/checker_copyright_year.py | checker_copyright_year.py | py | 1,559 | python | en | code | null | github-code | 7 | [
{
"api_name": "re.compile",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.isfil... |
72521572703 | import discord
import youtube_dl
from discord.ext import commands
from pip._internal.vcs import vcs
from youtube_dl import YoutubeDL
import bs4
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from discord.utils import get
from discord import FFmpegPCMAudio
import asyncio
import time... | PSG01/TSNE | bot.py | bot.py | py | 10,972 | python | ko | code | 0 | github-code | 7 | [
{
"api_name": "discord.Intents",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "discord.Client",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands.Bot",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "discord.ext.c... |
40582740570 | import xlrd #Module used to read data from excel
import sys
from pylab import plot,show,scatter,legend,ylabel,xlabel,subplot,tight_layout # Part of Lib Matplotlib used to plot graph
from scipy.optimize import curve_fit # Module used for curve fitting
from scipy.interpolate import interp1d
import numpy as np #For D... | parshantdeep/Regression-Grapher-and-Optimizer | check.py | check.py | py | 15,950 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "tkinter.filedialog.askopenfilename",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "tkinter.filedialog",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "xlrd.open_workbook",
"line_number": 40,
"usage_type": "call"
},
{
"api_name... |
40368818468 | import torch
import numpy as np
# import os
from tqdm import tqdm
# import pandas as pd
# from networks import load_net
# from datasets import load_ds_info
# from utils import get_features_logits_labels
# import torch
# import numpy as np
from sklearn.base import BaseEstimator, RegressorMixin
from sklearn.model_selec... | tiagosalvador/calibration-baselines | calibration_methods/ccac.py | ccac.py | py | 8,609 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "sklearn.model_selection.StratifiedKFold",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.GridSearchCV",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sklearn.metrics.make_scorer",
"line_number": 26,
"usage_type... |
32145235606 | #==================================================
#===== SUB FUNCTION - vavc
# main_v? anpr_v? datalogger_v? vavc_v?
#==================================================
#==================================================
#===== yolov5 reference
# https://github.com/ultralytics/yolov5
# Python>=3.6.0 is required with... | amieruddin/amieruddinzuki | MLFF/vavc_r2_engine.py | vavc_r2_engine.py | py | 16,891 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "scipy.ndimage.interpolation.rotate",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "scipy.ndimage.interpolation",
"line_number": 85,
"usage_type": "name"
},
{
"api_name": "numpy.sum",
"line_number": 86,
"usage_type": "call"
},
{
"api_name... |
72845057502 | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | Ascend/ModelZoo-PyTorch | ACL_PyTorch/contrib/cv/tracking/SiamFC/get_perf_data.py | get_perf_data.py | py | 1,906 | python | en | code | 31 | github-code | 7 | [
{
"api_name": "torch.randn",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_n... |
6058226088 | import requests
import csv
# importing flask
from flask import Flask, render_template
# importing pandas module
import pandas as pd
response = requests.get('https://api.github.com/search/repositories?q=fun+python&s=stars')
jsonout=response.json()
repo_id=jsonout["items"][0]["id"]
print(jsonout["items"][0]["id"])
... | registersvcman/PulliFromAPI | pull-public-api-v4.py | pull-public-api-v4.py | py | 663 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 27,
"usage_type": "call"
}
] |
27766305569 | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.command_lib.compute.routers.nats.rules import flags
from googlecloudsdk.core import exceptions as core_exceptions
import six
class ActiveIpsRequiredError(core_exceptions.Error):
"""Rai... | twistedpair/google-cloud-sdk | google-cloud-sdk/lib/googlecloudsdk/command_lib/compute/routers/nats/rules/rules_utils.py | rules_utils.py | py | 5,619 | python | en | code | 55 | github-code | 7 | [
{
"api_name": "googlecloudsdk.core.exceptions.Error",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "googlecloudsdk.core.exceptions",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "googlecloudsdk.core.exceptions.Error",
"line_number": 18,
"usage... |
40045337803 | import contextlib
import paddle
from .opcode_transform.transform import eval_frame_callback
from .opcode_transform import convert
from .symbolic_trace import SymbolicTraceContext
from .proxy_tensor import clear_runtime_proxytensor
def to_static(func, with_log=True):
convert.LOG_FLAG = with_log
def wrapped(*ar... | feifei-111/OpCodeTranslator | opcode_translator/to_static.py | to_static.py | py | 723 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "opcode_transform.convert.LOG_FLAG",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "opcode_transform.convert",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "opcode_transform.transform.eval_frame_callback",
"line_number": 12,
"usag... |
26676408967 | # Face Detection
import cv2
# ອ່ານຮູບພາບ
img = cv2.imread('images/boy-girl.jpg')
# ອ່ານ File ສຳຫຼັບ Classification
face_cascade = cv2.CascadeClassifier('detect/haarcascade_frontalface_default.xml')
gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
# ຈຳແນກໃບໜ້າ
scaleFactory = 1.1
minNeighber = 3
face_detect = face_ca... | Thitphavanh/Python-OpenCV-Image-Processing | ep20_fece_detection_image.py | ep20_fece_detection_image.py | py | 752 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv2.imread",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.CascadeClassifier",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
... |
30432413076 | import multiprocessing as mp
import numpy as np
import sys
import torch
import openai
import asyncio
import jsonlines
import random
import soundfile as sf
import os
from pathlib import Path
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from pypinyin import lazy_pinyin, Style
from listen_chats import liste... | Jarvis-zou/AiStreamer | src/streamer.py | streamer.py | py | 11,566 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "sys.path.append",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_num... |
2409528972 | import configparser
import json
import os
class Configure:
def __init__(self, config_path):
self.config_path = config_path
self.config = configparser.ConfigParser()
if not os.path.isfile(self.config_path):
self.config['General'] = {
'from': 'English',
'to': 'Russian',
'translator': 'Google',
... | Shoker2/TS2_ScreenTranslator | moduls/Configure.py | Configure.py | py | 1,409 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "json.dumps",
... |
33782197299 | from django.conf import settings
from django.db.models.signals import post_save
from django.utils.text import slugify
from django.contrib.auth.models import AbstractUser
from django.db import models
from django.db.models import Sum
from django.urls import reverse
from datetime import date
class User(AbstractUser):
... | KunJon-analytics/PiQuest2.0 | backend/users/models.py | models.py | py | 2,060 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.contrib.auth.models.AbstractUser",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.db.models.BooleanField",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.db.models",
"line_number": 11,
"usage_type": "name"
},
{... |
38828244611 | import schemas
from fastapi import APIRouter, Depends
from sqlalchemy.orm import Session
from db.database import get_db
from db import models
import uuid
app = APIRouter()
# To rate a user
@app.post('/user_review/', tags=["ratings"])
def create_user_review(user_review: schemas.user_rate, db: Session = Depends(get_db... | NwaforAugustine321/ktizo-backend | router/user_ratings.py | user_ratings.py | py | 1,606 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "schemas.user_rate",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "sqlalchemy.orm.Session",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "fastap... |
19785543717 | #!/usr/bin/env python
# coding: utf-8
# In[2]:
# Importing required libraries for this Project.
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
import matplotlib
plt.style.use('ggplot')
from matplotlib.pyplot import figure
get_ipython().r... | SaiDarshan2000/Movie-Python-Project | movie final1.py | movie final1.py | py | 3,627 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 16,
"usage_type": "name"
},
{
"api_na... |
74923079901 | import pint
import numpy as np
def belt_drive():
"""
Cálculo de transmisión a correa.
Ecuaciones y modelos tomados de
"""
units = pint.UnitRegistry()
# Cálculo de torque mínimo de motor
alpha = np.arctan(1.0/5.0) # Inclinación máxima de rampas (Ley 24.314)
Pmax = 8 * units.kgf # Pe... | hidmic/airi-hw | design/mechanical/calc/belt_drive.py | belt_drive.py | py | 2,088 | python | es | code | 0 | github-code | 7 | [
{
"api_name": "pint.UnitRegistry",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.arctan",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.sin",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number"... |
75013434143 | """
OpenGL Triangle
This is the base for 3D. It is made up of three Vertexes that
can contain up to four attributes each.
Position, required, a Vector3
Normal, calculated, a Vector3
TexCoord, optional, a Vector2
Color, optional, a Vector3
"""
import math
from .matrix import Matrix
from .vector import Vector3
clas... | GovernorGecko/MultiD | src/triangle.py | triangle.py | py | 8,954 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "vector.Vector3",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "vector.Vector3",
"line_number": 119,
"usage_type": "call"
},
{
"api_name": "math.radians",
"line_number": 185,
"usage_type": "call"
},
{
"api_name": "math.radians",
"line... |
32774956390 | from observation_insight.app.services.models_BERT import predict_scheme_BERT
from observation_insight.models.predict_model import predict_scheme, get_schemes_names, schemes_to_names
from observation_insight.features.build_features import build_features
from observation_insight.app.core.config import args, BOTTOM_PREDIC... | SystematicGroup/thisted_insight | observation_insight/app/services/models.py | models.py | py | 4,210 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "spacy.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "observation_insight.app.core.config.args",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "observation_insight.models.Models.load_encoder",
"line_number": 18,
"usage_type": "ca... |
4624300215 | from django.conf.urls.defaults import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.http import HttpResponse
from settings import MEDIA_ROOT
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^chart/', include('apps.chart... | strugglexiangyu/carpenter | urls.py | urls.py | py | 1,287 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.contrib.admin.autodiscover",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.conf.urls.defaults.patterns",
"line_number": 10,
"usage_type": "call"
},
... |
19269157868 | #!/usr/bin/env python3
from setuptools import setup, find_packages
import sys
from pathlib import Path
MODULE_NAME = 'bathroom_checker'
APP_NAME = 'bathroom-checker'
desktop_script = """
[Desktop Entry]
Name={APP_NAME}
Type=Application
Exec=/usr/local/bin/{APP_NAME}
StartupNotify=false
Terminal=false
""".format(**var... | mrmilu/bathroom-checker | setup.py | setup.py | py | 1,156 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "sys.platform",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "setuptools.setup",
"line_number": 25,
"usage_type": "call"
}
] |
72685275744 | from collections import Counter
from typing import List
class Solution:
def numPairsDivisibleBy60(self, time: List[int]) -> int:
counter = Counter()
answer = 0
for i in range(len(time)):
time[i] %= 60
if 60 - time[i] in counter:
answer += counter[60... | daviddwlee84/LeetCode | Python3/Array/PairsOfSongsWithTotalDurationsDivisibleBy60/PrefixSum1010.py | PrefixSum1010.py | py | 645 | python | en | code | 15 | github-code | 7 | [
{
"api_name": "typing.List",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "collections.Counter",
"line_number": 7,
"usage_type": "call"
}
] |
72900859742 | """
https://leetcode.com/problems/count-nice-pairs-in-an-array/
"""
from collections import Counter
class Solution:
def countNicePairs(self, nums: list[int]) -> int:
"""
nums[i] + revs[j] = nums[j] + revs[i] ==>
nums[i] - revs[i] = nums[j] - revs[j] ==>
Then we just need to find ... | eronekogin/leetcode | 2023/count_nice_pairs_in_an_array.py | count_nice_pairs_in_an_array.py | py | 624 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "collections.Counter",
"line_number": 17,
"usage_type": "call"
}
] |
27768444119 | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import base64
from googlecloudsdk.calliope import exceptions
from googlecloudsdk.core.util import files
import six
def GetDerCertificate(certificate_file):
"""Read certificate_file and return the certific... | twistedpair/google-cloud-sdk | google-cloud-sdk/lib/googlecloudsdk/command_lib/kms/certs.py | certs.py | py | 1,740 | python | en | code | 55 | github-code | 7 | [
{
"api_name": "googlecloudsdk.core.util.files.ReadBinaryFileContents",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "googlecloudsdk.core.util.files",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "googlecloudsdk.calliope.exceptions.BadArgumentException",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.