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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26023690910 | import matplotlib.pyplot as plt
import numpy as np
x=np.arange(-10,10,0.01)
y=1/(np.sin(x)+2)
z=1/(np.cos(x)+2)
plt.plot(x,y,x,z) #生成在一张图像上
fig2,(axs1,axs2)=plt.subplots(2,1) #分配两个坐标轴并且按照(2,1)的形状
axs1.plot(x,y)
axs2.plot(x,z) #在两个轴上单独生成一次
plt.show(... | suanhaitech/pythonstudy2023 | Wangwenbin/Matplotlib1.py | Matplotlib1.py | py | 388 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "numpy.arange",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "numpy.sin",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.cos",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_numb... |
29099471877 | from openpyxl import load_workbook, Workbook
from openpyxl.formatting.rule import ColorScaleRule
from openpyxl.styles import PatternFill, Font
def _cal_writer_final_report(barcode, ws_report, all_data, init_row, init_col, report_output):
row_counter = init_row
ws_report.cell(column=-1 + init_col, row=row_co... | ZexiDilling/structure_search | report_setup.py | report_setup.py | py | 12,580 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "openpyxl.styles.Font",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "openpyxl.styles.Font",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "openpyxl.styles.Font",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "openpy... |
28653090658 | ##### Native libraries
##### Python Libraries
import numpy as np
from IPython.core import debugger
breakpoint = debugger.set_trace
##### Local libraries
import Utils_Data
from Timer import Timer
##### NOTE: To download the full dataset (which will take about 30 hours on wifi maybe less on ethernet)
##### set the file... | BradleyAllanDavis/760-project | data_download/Example_DownloadDataset.py | Example_DownloadDataset.py | py | 2,412 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "IPython.core.debugger.set_trace",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "IPython.core.debugger",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "numpy.load",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "U... |
17430806092 | #!/usr/bin/python
# https://www.udemy.com/course/complete-python-developer-zero-to-mastery/
# 256. Building A Flask Server
# https://flask.palletsprojects.com/en/1.1.x/quickstart/
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types
# https://swapi.dev/ - Star Wars API server
# http://ww... | olexandrch/UdemyCompletePythonDeveloper | Sec.19 Web Development with Python/portfolio/server.py | server.py | py | 2,518 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "flask.render_... |
19250585752 | # Modules which need to be installed
import irc.bot
from dotenv import load_dotenv
load_dotenv()
# Setup / included imports
import os
import commands
import asyncio
prefix = os.getenv('COMMANDPREFIX')
# Make sure the Twitch credentials have been added to the .env file
if os.getenv('TWITCHUSERNAME') == "" or os.getenv... | R2D2VaderBeef/SectorsEdgeStreamControl | main.py | main.py | py | 1,555 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "irc.bot.bot",
"line_number"... |
42597128032 | import seaborn as sns
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import sklearn
df=pd.read_csv("insurance.csv")
tem=pd.get_dummies(df["region"])
df.drop("region",axis=1,inplace=True)
df=pd.concat([df,tem],axis=1)
print(df.head(10))
map={"yes":1,"no":0}
df["smoker"]=df["smo... | manav88/Medical-cost-prediction | med_cost.py | med_cost.py | py | 1,956 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.get_dummies",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figu... |
34905834189 | import shutil
import tempfile
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core.files.uploadedfile import SimpleUploadedFile
from django.test import Client, TestCase, override_settings
from django.urls import reverse
from ..forms import PostForm
from ..models import Post... | DianaKab/hw05_final_new | yatube/posts/tests/test_forms.py | test_forms.py | py | 4,715 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tempfile.mkdtemp",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.BASE_DIR",
"line_number": 14,
"usage_type": "attribute"
},
{... |
6453212033 | from django.conf.urls import url
from testuser import views
app_name = 'test'
urlpatterns = [
# url(r'^$',views.logout, name = 'logout'),
url(r'^$',views.loginIndex, name = 'loginIndex'),
url(r'^login/$',views.login, name = 'login'),
# url(r'^signUp/$',views.signup, name = 'signup'),
# url(r'^forg... | baivarn-tjr/SYOT-python | SYOT/testuser/urls.py | urls.py | py | 503 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "django.conf.urls.url",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "testuser.views.loginIndex",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "testuser.views",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "djang... |
45017345126 | #!/usr/bin/env python3
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# DESCRIPTION:
#
# CALL SAMPLE:
# ~/data/solarity/sit-raspi/modbus/direct_marketing_interface.py --host_ip '192.168.0.34' --host_mac '00:90:E8:7B:76:9C' -v -t
#
# REQUIRE
#
#... | phgachoud/sty-pub-raspi-modbus-drivers | sma/direct_marketing_interface.py | direct_marketing_interface.py | py | 8,844 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
17169060948 | from django.urls import path
from . import views
urlpatterns=[
path('sub/',views.SubjectVW,name='sub'),
path('trainer/',views.TrainerVW,name='trainer'),
path('profile/',views.TranierDisplay,name='profile'),
path('batchvw/',views.BatchVW,name='batchvw'),
path('bdisplay/',views.BatchDisplay,name='b... | mithun-gowda/PyInstitute | Batch/urls.py | urls.py | py | 444 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
24923354544 | from pytesseract import Output
import pytesseract
import argparse
import imutils
import cv2
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True, help="path to input image")
ap.add_argument("-o", "--output", required=False, help="path to output image. override if not given.")
ap.add_argument("... | uborzz/images-playground | tools/rotate_image.py | rotate_image.py | py | 887 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "imutils.rotate_bound",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "cv2.imwrite",
... |
40761579635 | """Module containing the Fetcher Class to get financial
data of given ticker using the yfinance package."""
from datetime import datetime, timedelta
import yfinance as yf
import pandas as pd
class Fetcher:
"""Class that fetches data about a given ticker
This class does a few things:
1. Checks for validi... | webclinic017/YSC4228-QuantFin | scrape_mkt_data/tools/fetcher.py | fetcher.py | py | 3,536 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 43,
"usage_type": "call"
},
{
"api_name"... |
29541301753 | from django.contrib import admin, messages
from .models import Poll, Question, Choice
class ChoiceInline(admin.StackedInline):
model = Choice
extra = 0
class QuestionInline(admin.StackedInline):
model = Question
readonly_fields = ['question_type']
extra = 0
class PollAdmin(admin.ModelAdmin):
... | RamilPowers/poll_app | api/admin.py | admin.py | py | 2,063 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.contrib.admin.StackedInline",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "models.Choice",
"line_number": 6,
"usage_type": "name"
},
{
"api_name"... |
17549816996 | from flask import Flask, render_template, request
from tensorflow.keras.layers import Dense, Embedding, Bidirectional, LSTM, Concatenate, Dropout
from tensorflow.keras.preprocessing.sequence import pad_sequences
from tensorflow.keras import Input, Model
import gensim
import numpy as np
import BahdanauAttention #모델.py 불... | rlagywns0213/korea_bad_comments_analysis | comment_confirm.py | comment_confirm.py | py | 3,906 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "BahdanauAttention.BahdanauAttention",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "gensim.models.Word2Vec.load",
"line_number": 17,
"usage_type": "call"
},
{
"api_n... |
42549531170 | ### This file has been adopted from
### https://github.com/openlawlibrary/pygls/blob/master/examples/json-extension/server/server.py
import asyncio
from bisect import bisect
from cromwell_tools import api as cromwell_api
from cromwell_tools.cromwell_auth import CromwellAuth
from cromwell_tools.utilities import downlo... | broadinstitute/wdl-ide | server/wdl_lsp/server.py | server.py | py | 17,170 | python | en | code | 38 | github-code | 6 | [
{
"api_name": "pygls.server.LanguageServer",
"line_number": 59,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 67,
"usage_type": "name"
},
{
"api_name": "typing.Set",
"line_number": 67,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
... |
33225318672 | import torch
import torch.nn as nn
from torch.utils.data import Dataset
import h5py
import numpy as np
import utils.io as io
from datasets.hico_constants import HicoConstants
from datasets import metadata
import sys
import random
class HicoDataset(Dataset):
'''
Args:
subset: ['train', 'val', 'train_... | birlrobotics/PMN | datasets/hico_dataset.py | hico_dataset.py | py | 9,279 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "datasets.hico_constants.HicoConstants",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "h5py.File",
"line_number": 30,
"usage_type": "call"
},
{
"api_name... |
3618688983 | import graphviz as gv
from graphvizual import *
class Edge:
def __init__(self,node_0,node_1,weight):
self.node_0 = node_0
self.node_1 = node_1
self.weight= weight
class Graph_0:
def __init__(self):
self.list_edges =[]
def add_edge(self,start,end,weight):
... | AnnaPiatek/Graph | Dijkstra.py | Dijkstra.py | py | 6,638 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "graphviz.Digraph",
"line_number": 137,
"usage_type": "call"
},
{
"api_name": "graphviz.Digraph",
"line_number": 151,
"usage_type": "call"
}
] |
38090331621 | from .base_page import BasePage
from .locators import ProductPageLocators
from selenium.common.exceptions import NoAlertPresentException
from selenium.webdriver.common.by import By
import math
import webbrowser
class ProductPage(BasePage):
def go_product_basket_add(self):
self.browser.find_element(*Produc... | Pavel-OG/project_selenium_course_final_block | pages/product_page.py | product_page.py | py | 1,916 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "base_page.BasePage",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "locators.ProductPageLocators.BTN_ADD_BASKET",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "locators.ProductPageLocators",
"line_number": 11,
"usage_type": "name"... |
40310342893 | import time
import random
import pandas as pd
import multiprocessing as mp
import numpy as np
import os
import torch
import torch.nn.functional as F
import copy
from .utils import strToListF
from .models import makeDataSet_Vec
from .utils import strToListF, colorizar, getSTime
# models
from .drlearning import Agent... | mjason98/haha21 | code/protos.py | protos.py | py | 20,732 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numb... |
35712406484 |
from global_variables import stop_event
from hatch_controller import hc
from beamer.mqtt import mqtt_client, fsmQueue, TRAPPE_TOPIC, HDMI_TOPIC
from beamer.hdmi import hdmi_relay
import logging
import time
MQTT_OPEN = b"OPEN"
MQTT_CLOSE = b"CLOSE"
MQTT_STOP = b"STOP"
class State():
def __init__(self):
se... | clementnuss/hatch_controller | beamer/beamer_state_machine.py | beamer_state_machine.py | py | 3,618 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "time.time",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "beamer.mqtt.mqtt_client.publish",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "beamer.mqtt.mq... |
10711597654 | from youtubesearchpython import VideosSearch
import os
import glob
# __ _ _
# / \ | | | |
# / \ | | /\ | | /\ _ _
# / /\ \ | |/ / | |/ / | | | |
# / ____ \ | |\ \ | |\ \ | |_| |
#/__/ \__\ |_| \_\ |_| \_\ \___/
#
# Copyright of Akash, 2021 ... | akkupy/Sara-Bot | Modules/Yt_music.py | Yt_music.py | py | 3,160 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "youtubesearchpython.VideosSearch",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "os.makedi... |
21325441820 | import os
from setuptools import setup
basedir = os.path.dirname(__file__)
def readme():
with open(os.path.join(basedir, "README.rst")) as f:
return f.read()
about = {}
with open(os.path.join(basedir, "pysyncgateway", "__about__.py")) as f:
exec(f.read(), about)
setup(
name=about["__name__"],... | constructpm/pysyncgateway | setup.py | setup.py | py | 1,004 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "os.path.dirname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9... |
28845108173 | from django.views.generic import View
from .forms import CorrectionSendingForm
from apps.article_review.models import Review
from django.contrib import messages
from django.shortcuts import redirect
# Create your views here.
from apps.correction_reception.models import ArticleCorrection
# * Importar los modelos
clas... | HetairoiElite/cienciatec | apps/correction_sending/views.py | views.py | py | 3,096 | python | es | code | 0 | github-code | 6 | [
{
"api_name": "django.views.generic.View",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "apps.article_review.models.Review.objects.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "apps.article_review.models.Review.objects",
"line_number": 17,
"u... |
42629975620 | from unittest import TestCase
import os
from yapic_io.connector import io_connector
import numpy as np
from numpy.testing import assert_array_almost_equal, assert_array_equal
from yapic_io import TiffConnector, Dataset, PredictionBatch
import pytest
from tifffile import memmap
base_path = os.path.dirname(__file__)
... | yapic/yapic_io | yapic_io/tests/test_prediction_batch.py | test_prediction_batch.py | py | 10,948 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "os.path.dirname",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "unittest.TestCase",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "pytest.fixture",
"... |
17609793311 | from django import http
import six
from django.db.models import ProtectedError
from rest_framework import views, exceptions, status
from rest_framework.exceptions import UnsupportedMediaType
from rest_framework.response import Response
from backpack.serializers_bcv1 import BadgeConnectErrorSerializer
from entity.seri... | reedu-reengineering-education/badgr-server | apps/entity/views.py | views.py | py | 4,487 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "rest_framework.exceptions.ParseError",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.exceptions",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "rest_framework.status.HTTP_400_BAD_REQUEST",
"line_number": 26,
"usag... |
75163509946 | from flask import Blueprint, render_template, redirect, url_for, flash
from flask_security import current_user
from flask_babel import gettext
from . import route
from dxc.app.models.job.forms import JobForm, JobReportForm
from dxc.services import api_job, api_report
bp = Blueprint('job', __name__, template_folder='t... | cash2one/Luyasi-Flask | dxc/app/frontend/job.py | job.py | py | 2,646 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Blueprint",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "dxc.app.models.job.forms.JobForm",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask_security.current_user.get_id",
"line_number": 16,
"usage_type": "call"
},
{
... |
69976456507 | import logging
from typing import Callable, List
from homeassistant.components.switch import SwitchEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.typing import HomeAssistantType
from homeassistant.helpers.update_coordinator import C... | 0xAlon/dolphin | custom_components/dolphin/switch.py | switch.py | py | 7,201 | python | en | code | 6 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "homeassistant.helpers.typing.HomeAssistantType",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "homeassistant.config_entries.ConfigEntry",
"line_number": 21,
"usage_typ... |
16478653737 | import mxnet as mx
import time
import gluoncv as gcv
from gluoncv.utils import try_import_cv2
cv2 = try_import_cv2()
net = gcv.model_zoo.get_model(
# good, fast
'ssd_512_mobilenet1.0_coco',
# 'ssd_512_mobilenet1.0_voc',
# 'ssd_512_mobilenet1.0_voc_int8',
#
# 'yolo3_mobilenet1.0_coco',
# '... | ODN418/progmates_works | glouncv/detect.py | detect.py | py | 1,506 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "gluoncv.utils.try_import_cv2",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "gluoncv.model_zoo.get_model",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "gluoncv.model_zoo",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_... |
10721085289 | '''
Collection of helper function for the EDA notebooks
'''
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import pycountry
''' Returns the pairs of variables sorted according to their correlation '''
def getCorrPairs(corr):
mask = np.zeros_like(corr, dtype=bool)
... | Miltos-90/EU_Electricity_Price_Forecasting | src/eda_utils.py | eda_utils.py | py | 5,183 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.zeros_like",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.triu_indices_from",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.nan",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "numpy.nan",
... |
7901768963 | from collections import Counter
import logging
def find(list, value):
try:
return list.index(value)
except ValueError:
return None
class DefaultSorter(object):
def __init__(self, langs='all', weight=1):
logging.info("Available languages: {}".format(langs))
self.lan... | luisguilherme/framboise | framboise/sorting.py | sorting.py | py | 1,318 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "logging.info",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "logging.info",
... |
17493539514 | #This file "drives" the car by calling all the required files
#outputs plots of the dynamic/vibration models
import Beeman, car_2014, chassis_2014, driver_sally, ff_2014_5, ff_2014_7, get_DM, get_FF, get_Jx, get_Jy, get_LR, get_MM, get_SD, get_SM, get_cg, motor_2014, speed_bump, suspension_front_2014, suspension_rear... | brandontran14/CarSimulation | driving.py | driving.py | py | 897 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "ff_2014_7.ff_data",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "get_FF.get_FF",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "get_SD.get_SD",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"... |
6166864226 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 6 13:11:44 2017
@author: Francesco
"""
import serial
import numpy as np
import time
PORT = "COM10"
BAUD = 115200
port = serial.Serial(PORT,BAUD,timeout=1)
START = 1
#BUNDLE SHAPE: |!|!|!|CH0_msb|CH0_lsb|ch1_msb|ch1_lsb|......|ch7_lsb|!|!|!|
NUM_CH... | FrancesoM/UnlimitedHand-Learning | python_side/read_bytes_over_serial.py | read_bytes_over_serial.py | py | 3,070 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "serial.Serial",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 82... |
3971463654 | from flask import Flask, request, jsonify, render_template, send_file
import os
import csv
import json
import base64
import pickle
import logging
from utils import (set_license_key_in_config, get_license_key_from_config,
get_dynamodb_table, license_key_is_valid)
# Configure the logging level
loggin... | TahirAlauddin/KonnectedReverseRaffle | mac_server/konnected-server.py | konnected-server.py | py | 9,148 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.FileH... |
42972033220 | from subprocess import Popen, PIPE
import sys
import tkinter as tk
from tkinter import ttk
from tkinter import filedialog
from config import config
from theme import theme
class PluginGui:
_route = None
_button = None
_target = None
def __init__(self, parent, route):
self._route = route
... | pwerken/EDMC_Waypoints | plugin_gui.py | plugin_gui.py | py | 2,681 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "tkinter.Frame",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "tkinter.NSEW",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "tkinter.ttk.Button",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "tkinter.ttk",
... |
21934463311 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Text Emotion Detection."""
from dataclasses import dataclass
from transformers import AutoTokenizer, AutoModelWithLMHead
from transformers import pipeline
__all__ = (
"Emotion",
"EmotionDetectorT5",
"EmotionDetectorRoberta",
)
@dataclass
class Emotion... | br8km/pynlp | core/emotion.py | emotion.py | py | 3,869 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "dataclasses.dataclass",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "transformers.AutoTokenizer.from_pretrained",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "transformers.AutoTokenizer",
"line_number": 73,
"usage_type": "name"
}... |
40128872754 | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
INF = 10 ** 9 + 1 # sys.maxsize # float("inf")
MOD = 10 ** 9 + 7
def debug(*x):
print(*x, file=sys.stderr)
def solve(N, AS):
sum = 0
sumSq = 0
for i in range(N):
sum += AS[i]
sum %= MOD
sumSq += AS[i] * AS[i]
... | nishio/atcoder | abc177/c.py | c.py | py | 1,341 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "sys.setrecursionlimit",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "doctest.testmod",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "doctest.run_docst... |
34197476486 | #!/bin/python3
import sys
import os
import mysql.connector
import datetime
from sys import argv
import requests
import json
from requests.exceptions import HTTPError
from slack import WebClient
from slack.errors import SlackApiError
import logging
logging.basicConfig(level=logging.DEBUG)
database_conf = "/var/lib/je... | vlad-solomai/viam_automation | automation_gambling/game_round_management/close_rounds_slack.py | close_rounds_slack.py | py | 6,354 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "sys.argv",
"line_... |
18917415762 | from typing import Any, Callable, TypeVar, cast
import pluggy
F = TypeVar("F", bound=Callable[..., Any])
hookimpl = cast(Callable[[F], F], pluggy.HookimplMarker("ape"))
hookspec = pluggy.HookspecMarker("ape")
plugin_manager = pluggy.PluginManager("ape")
"""A manager responsible for registering and accessing plugins ... | ApeWorX/ape | src/ape/plugins/pluggy_patch.py | pluggy_patch.py | py | 752 | python | en | code | 736 | github-code | 6 | [
{
"api_name": "typing.TypeVar",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "typing.Callable",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "typing.cast",
"line_number... |
26058478061 | from django.contrib.auth.views import LogoutView
from django.urls import path
from .views import *
urlpatterns = [
path('login/', CustomLoginView.as_view(), name='login'),
path('logout/', LogoutView.as_view(next_page='login'), name='logout'), # тут ми вказуємо через next_page, що якщо ми виходимо з акаунту то ... | ianvv/todo-app-django | todo_list/base/urls.py | urls.py | py | 812 | python | uk | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.views.LogoutView.as_view",
"line_number": 7,
"usage_type": "call"
},
{
"api_n... |
70732574587 | import os
from importlib.machinery import SourceFileLoader
from setuptools import find_packages, setup
from typing import List
module_name = 'juldate'
module = SourceFileLoader(
module_name,
os.path.join(module_name, '__init__.py'),
).load_module()
def parse_requirements(filename: str) -> List[str]:
re... | churilov-ns/juldate | setup.py | setup.py | py | 1,333 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "importlib.machinery.SourceFileLoader",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "typing.... |
30084867415 | from .models import AdminUser
from django.shortcuts import render
from django.http import JsonResponse
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
import json
from datetime import date, datetime
# Create your views here.
def jsons(data = None, e... | jeremyytann/BUAA-SE-LetStudy | Code/backend/admin_user/views.py | views.py | py | 2,482 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.http.JsonResponse",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "models.AdminUser.objects.get",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "mode... |
7798026425 | import os.path
import xml.dom.minidom
import xml.xpath
import logging
import edef
from edef.dev import Config
import fnmatch
from Tools import getModuleName
class Model:
def __init__(self):
self._logger = logging.getLogger("edef.dev")
self._base_path = Config().getBasePath()
self._module_l... | BackupTheBerlios/pplt-svn | trunk/edef/edef-dev/modeditor/ModelModule.py | ModelModule.py | py | 4,039 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "edef.dev.Config",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "edef.Importer",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "Tools.getModuleName",... |
38586042024 | from flask import Flask,render_template,json,flash,request,session,redirect
from flask_sqlalchemy import SQLAlchemy
from datetime import datetime
with open('config.json', 'r') as c:
parameter = json.load(c)["parameter"]
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = parameter['local_uri']
... | 199-cmd/FlaskDemo | FlaskDemo/main.py | main.py | py | 1,402 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.json.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.json",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
... |
696671101 |
import tkinter as tk
import atten
import face_recognition
import cv2
import numpy as np
import csv
import os
from datetime import datetime
# Create the root window
root = tk.Tk()
root.overrideredirect(True)
# Set the window size and position
width = 700
height = root.winfo_screenheight()-100 ... | khushiarora1793/attendancemanagement | temp.py | temp.py | py | 4,274 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "tkinter.Tk",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "face_recognition.load_image_file",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "face_rec... |
36007020776 | from bs4 import BeautifulSoup
import requests
import pandas as pd
# Downloading IMDB feature film and MyAnimeList popularity data
headers = {'Accept-Language': 'en-US,en;q=0.8'}
url1 = 'https://www.imdb.com/search/title/?title_type=feature&sort=num_votes,desc'
url2 = 'https://myanimelist.net/topanime.php?type=b... | ilovegaming42069/DataScienceExercise | datascience.py | datascience.py | py | 2,188 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"l... |
38650731253 | from ehrqc.standardise import Config
from ehrqc.standardise import Utils
import logging
log = logging.getLogger("EHR-QC")
def importPatients(con, sourceSchemaName, filePath, fileSeparator, overwrite=True):
if overwrite:
log.info("Creating table: " + sourceSchemaName + ".patients")
dropQuery = ... | ryashpal/EHR-QC-Standardise | ehrqc/standardise/Import.py | Import.py | py | 18,197 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "ehrqc.standardise.Config.patients",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name"... |
36258745480 | #!/usr/bin/env python
# _*_ coding:utf-8 _*_
# Author: JiaChen
import traceback
from src.plugins.base import BasePlugin
from lib.response import BaseResponse
from config import settings
class CpuPlugin(BasePlugin):
def run(self):
response = BaseResponse()
try:
response.data = {'cpu_mo... | jcdiy0601/EasyCmdbClient | src/plugins/snmp/dell/server/cpu.py | cpu.py | py | 1,514 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "src.plugins.base.BasePlugin",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "lib.response.BaseResponse",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "config.settings.community_name",
"line_number": 16,
"usage_type": "attribute"
},
... |
26922931124 | """
Calls the entos executable.
"""
import string
from typing import Any, Dict, List, Optional, Tuple
from qcelemental.models import Result
from qcelemental.util import parse_version, safe_version, which
from ..exceptions import UnknownError
from ..util import execute, popen
from .model import ProgramHarness
class... | ChemRacer/QCEngine | qcengine/programs/entos.py | entos.py | py | 8,943 | python | en | code | null | github-code | 6 | [
{
"api_name": "model.ProgramHarness",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "model.ProgramHarness.Config",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "mod... |
24673967273 | # Jumpy! - Platform game
# KidsCanCode - Game Development with python
# Art from Kenney.nl
import pygame as pg
import random
from settings import *
from sprites import *
from os import path
class Game:
def __init__(self):
# Initialize game window
pg.init()
pg.mixer.init()
self.scr... | guychaimy/jumpy | main.py | main.py | py | 9,548 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pygame.mixer.init",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pygame.mixer",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.set_mo... |
11121080147 | import typing as tp
from datetime import datetime, date
from uuid import uuid4
import pytest
from sqlalchemy import text
from librarius.domain.models import Publication
from librarius.service.uow.implementation import GenericUnitOfWork
if tp.TYPE_CHECKING:
from sqlalchemy.orm import Session
from sqlalchemy.sq... | adriangabura/vega | tests/integration/test_uow.py | test_uow.py | py | 3,023 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pytest.mark.usefixtures",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pytest.mark",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "da... |
34670410766 | #!/usr/bin/python3
import mysql.connector
from nltk.tokenize import sent_tokenize, word_tokenize
from nltk.stem import WordNetLemmatizer
from lib.constants import brand_name_list, device_type_list, cwe_to_exp_type
from vul_scanner import query_iot_cve_from_cvetable
from lib.query_mysql import write_to_vul_analysis_t... | pmlab-ucd/IOTA | python/vul_analyzer.py | vul_analyzer.py | py | 13,241 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "nltk.stem.WordNetLemmatizer",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "nltk.tokenize.sent_tokenize",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "nltk.tokenize.sent_tokenize",
"line_number": 25,
"usage_type": "call"
},
{
... |
18781100050 | from pathlib import Path
from environs import Env
env = Env()
env.read_env()
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
PROJECT_DIR = BASE_DIR / "project"
SECRET_KEY = env.str("SECRET_KEY", default="something-very-secret")
DEBUG = env.bool("D... | valberg/django_project_template | src/config/settings.py | settings.py | py | 3,358 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "environs.Env",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 10,
"usage_type": "call"
}
] |
42572778156 | from distutils.core import setup
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='django-view-extractor',
version='0.1.0',
packages=setuptools.find_packages(),
url='https://www.quickrelease.co.uk',
license='GNU GPLv3',
author='Nick Solly',
... | QuickRelease/django-view-extractor | setup.py | setup.py | py | 577 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "distutils.core.setup",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 10,
"usage_type": "call"
}
] |
71174596349 | from __future__ import unicode_literals
import re
import os
import io
import sys
PY3 = sys.version_info.major > 2
try:
from urllib.parse import quote # py3
from urllib.request import urlopen
from urllib.error import HTTPError, URLError
except ImportError: # py2
from urllib import quote
from urllib2... | jwdj/EasyABC | tune_elements.py | tune_elements.py | py | 58,593 | python | en | code | 67 | github-code | 6 | [
{
"api_name": "sys.version_info",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "wx.GetTranslation",
"line_number": 78,
"usage_type": "call"
},
{
"api_name": "wx.GetTranslation",
"line_number": 79,
"usage_type": "call"
},
{
"api_name": "wx.GetTransl... |
13109821356 | import spacy
nlp = spacy.load('en_core_web_sm')
example1 = nlp("Animals")
for token in example1:
print(token.lemma_)
print()
example2 = nlp("I am god")
for token in example2:
print(token.lemma_)
| 39xdgy/Interactive_chatbots | 03_lemmatization.py | 03_lemmatization.py | py | 207 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "spacy.load",
"line_number": 3,
"usage_type": "call"
}
] |
19606128436 | import json
from typing import Dict, Generic, TypeVar, cast
import attr
import yaml
from psqlgml.types import GmlData
__all__ = [
"load_resource",
"load_by_resource",
"ResourceFile",
]
T = TypeVar("T")
def load_by_resource(resource_dir: str, resource_name: str) -> Dict[str, GmlData]:
"""Loads all ... | kulgan/psqlgml | src/psqlgml/resources.py | resources.py | py | 2,372 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.TypeVar",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "typing.Dict",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "psqlgml.types.GmlData",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "psqlgml.types.GmlDat... |
4758294095 | from typing import Dict, Any
import click
from .root import cli
#: Modules to import in interactive shell.
SHELL_MODULES = dict(
metric='gambit.metric',
kmers='gambit.kmers',
)
@cli.group(
name='debug',
hidden=True,
)
def debug_group():
"""Tools for debugging and testing."""
pass
def make_shell_ns(ctx) ->... | jlumpe/gambit | gambit/cli/debug.py | debug.py | py | 1,417 | python | en | code | 16 | github-code | 6 | [
{
"api_name": "root.cli.group",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "root.cli",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "importlib.import_module",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "typing.Dict",
"li... |
10383640973 | import unittest
import torch
from executorch.backends.xnnpack.test.tester import Tester
class TestSub(unittest.TestCase):
class Sub(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, x, y):
z = x - y
return z
def test_fp32_sub(self... | pytorch/executorch | backends/xnnpack/test/ops/sub.py | sub.py | py | 926 | python | en | code | 479 | github-code | 6 | [
{
"api_name": "unittest.TestCase",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.randn",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "executorch.backends.xn... |
24618666253 | from django.core.mail import send_mail
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.db.models import Count
from django.shortcuts import render, get_object_or_404, redirect
from django.views.decorators.http import require_POST
from django.views.generic import ListView
from taggit.... | VEIIEV/djangoProject_Blog | blog/views.py | views.py | py | 8,614 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "django.views.generic.ListView",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "models.Post.published.all",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "models.Post.published",
"line_number": 24,
"usage_type": "attribute"
},
{
... |
13276332357 | from pathlib import Path
import os
import pandas as pd
from tensorboard.backend.event_processing.event_accumulator import EventAccumulator
# extract the data and save them in a CSV file
tb_path = Path("experiments") / "MPP" / "lohi" / "cdata" / "freesolv" / "lohi" / f"split_0" / "fold_0" / \
"model_0"
tb_fi... | kalininalab/DataSAIL | experiments/MPP/check.py | check.py | py | 891 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "tensorboard.backend.event_processing.event_accumulator.EventAccumulator",
"line_number": 14,
"usage_type": "call"
... |
23255212962 | from Config import Calculator
from Config import Condition
from Utils import Utils
import json
import insertUser
import os
# # file_path = os.path.join(BASE_DIR, 'Test_Data')
# elements = BASE_DIR.split("/")
# # elements.pop()
# path = "/".join(elements)
# print(path)
if __name__ == '__main__':
# BASE_DIR = os.p... | LJJ/py_parseExcel | ParseExcel.py | ParseExcel.py | py | 1,219 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "insertUser.verify",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "Utils.Utils.get_test_data",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "Utils.Utils",
... |
37683950634 | import math
#import numbertheory
from numbertheory import *
#import multiprocessing
from multiprocessing import Pool
import gc
#import numpy as np
#from numpy.polynomial import polynomial as poly
####### HELPER FUNCTIONS #######
# performs the extended euclidean algorithm
# returns info to help calculate inverses
def... | CSAlexWhite/Cryptography | crypto.py | crypto.py | py | 16,518 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "random.randint",
"line_number": 165,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Pool",
"line_number": 197,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Pool",
"line_number": 205,
"usage_type": "call"
},
{
"api_name": "gc.collec... |
70384673149 |
from collections import deque
from dataclasses import dataclass, field, replace
from typing import Type
import copy
import numpy as np
import pandas as pd
import re
# little helper class
class ldf_dict(dict):
def __init__(self):
self = dict()
def add(self, key, value):
self[key] = value
@da... | makreft/lin_ldf_parser | lin_ldf_parser/lin_ldf_parser.py | lin_ldf_parser.py | py | 16,228 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "dataclasses.field",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "datacla... |
37946580665 | from sklearn import tree
from sklearn.svm import SVC
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score
from sklearn.naive_bayes import GaussianNB
import numpy as np
# Data and labels
# [Height, Weight ,Shoe Size]
X = [[181, 80, 44], [177, 70, 43], [160, 60, 38], [154, 54, 37... | vjgpt/gender_classification | gender_classify.py | gender_classify.py | py | 1,542 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "sklearn.tree.DecisionTreeClassifier",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sklearn.tree",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "sklearn.svm.SVC",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "skle... |
13321449104 | from airflow.models import Variable
from airflow.hooks.postgres_hook import PostgresHook
from rock.utilities import safeget, get_delta_offset, find_supported_fields
import requests
class ContentItemCategory:
def __init__(self, kwargs):
self.kwargs = kwargs
self.headers = {
"Authorizat... | CrossingsCommunityChurch/apollos-shovel | dags/rock/rock_content_item_categories.py | rock_content_item_categories.py | py | 5,576 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "airflow.models.Variable.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "airflow.models.Variable",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "airflow.hooks.postgres_hook.PostgresHook",
"line_number": 15,
"usage_type": "call"
... |
36060705055 | from config.log import log
from central.servidor_central import servidor_central
if __name__ == "__main__":
log()
# print('Informe o caminho do arquivo de configuração da sala 01:')
# sala_01 = input()
# print('Informe o caminho do arquivo de configuração da sala 02:')
# sala_02 = input()
sala... | AntonioAldisio/FSE-2022-2-Trabalho-1 | src/app_servidor_central.py | app_servidor_central.py | py | 428 | python | pt | code | 0 | github-code | 6 | [
{
"api_name": "config.log.log",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "central.servidor_central.servidor_central",
"line_number": 13,
"usage_type": "call"
}
] |
7437698122 | """
Script that trains an NFC bounding interval annotator.
To use tensorboard during or after model training, open a terminal and say:
conda activate vesper-dev-tf2
tensorboard --logdir "/Users/Harold/Desktop/NFC/Data/Vesper ML/
NFC Bounding Interval Annotator 1.0/Logs/<training log dir path>"
... | HaroldMills/Vesper | vesper/mpg_ranch/nfc_bounding_interval_annotator_1_0/train_bounding_interval_annotator.py | train_bounding_interval_annotator.py | py | 16,756 | python | en | code | 47 | github-code | 6 | [
{
"api_name": "vesper.util.settings.Settings",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "vesper.mpg_ranch.nfc_bounding_interval_annotator_1_0.annotator_utils.create_training_name",
"line_number": 123,
"usage_type": "call"
},
{
"api_name": "vesper.mpg_ranch.nfc_bou... |
16205876862 | from typing import Any
from xdsl.dialects import scf
from xdsl.interpreter import (
Interpreter,
InterpreterFunctions,
PythonValues,
ReturnedValues,
impl,
impl_terminator,
register_impls,
)
@register_impls
class ScfFunctions(InterpreterFunctions):
@impl(scf.If)
def run_if(self, in... | xdslproject/xdsl | xdsl/interpreters/scf.py | scf.py | py | 1,102 | python | en | code | 133 | github-code | 6 | [
{
"api_name": "xdsl.interpreter.InterpreterFunctions",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "xdsl.interpreter.Interpreter",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "xdsl.dialects.scf.If",
"line_number": 18,
"usage_type": "attribute"
... |
19638669363 | import matplotlib.pylab as plt
#import cv2
import numpy as np
import scipy as sp
from scipy.fftpack import fft, fftfreq, ifft, fft2, ifft2, fftshift, ifftshift
arbol=plt.imread("arbol.png")
#plt.imshow(arbol)
#transformada
base,altura=np.shape(arbol)
trans = fft2(arbol)
shi=fftshift(trans)
grashi=np.abs(shi)
fgraf... | saquijano/quijanoSantiagoHW3 | Fourier2D.py | Fourier2D.py | py | 1,691 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.pylab.imread",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pylab",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "numpy.shape",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "scipy.fftpack.fft2... |
72078430587 | # %%
from datetime import date
import requests
from json import dump, load
# %%
class Search:
def __init__(self, keyword, url="http://localhost:8080/search", getResult=True):
self.keyword = keyword
self.url = url
self.resultMax = 2
self.infoBoxMax = 1
if getResult:
... | arromaljj/FinalProjectArromal | backend/backend_core/search.py | search.py | py | 2,723 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.post",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "datetime.date.today",
"... |
24680896779 | from fastapi import APIRouter, Depends, HTTPException, status, Request
from typing import Union
import requests
from db.models import ENV, Session, get_db
from db import schemas, crud
from dependencies import utils
import json
router = APIRouter(prefix="/auth")
@router.post("/login", response_model=schemas.TokenBase... | CosasU-Edipizarro/iic2173-2022-1 | backend/routers/auth.py | auth.py | py | 2,205 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "db.schemas.UserLogin",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "db.schemas",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "db.models.Sessi... |
71879426428 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 4 13:55:34 2020
@author: Kangqi Fu
"""
from numpy import loadtxt, reshape
from pylab import ioff
import matplotlib.pyplot as plt
from glob import glob
import os
ioff()
fileNames = glob("./output/Solution*.dat")
fileNames.sort()
for fileName in ... | KennyKangMPC/CS-759 | final_project/scalarAdvection2D/plotAdv.py | plotAdv.py | py | 1,290 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "pylab.ioff",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
... |
70283377149 | import streamlit as st
from collections import Counter
import nltk
from nltk.corpus import stopwords
import torch
from datasets import load_dataset
import time
import sys, os
import logging
from transformers import AutoTokenizer, AutoModel
#custom packages
sys.path.insert(1, os.getcwd())
from src import constant ... | geraldlab/semantic_search | Search.py | Search.py | py | 3,971 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.insert",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "streamlit.set_page_config",
... |
20331901079 | """
Assignment 2
Csoport: 524/2
Név: Velican László
Azonosító: vlim2099
Segéd függvények amelyek meghívódnak a szerverben/kliensben vagy máashol
"""
import sympy
import random
#Generál egy kártya paklit két jokerrel amik még egyáltalán nincsenek összekeverve
def generateDeck ():
deck = [];
for i in range(1,5... | Laccer01/Kriptografia | assign3/auxiliaryFunctions.py | auxiliaryFunctions.py | py | 1,590 | python | hu | code | 0 | github-code | 6 | [
{
"api_name": "random.randint",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sympy.nextprime",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "sympy.nextprime",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "random.randint",
"... |
39007586537 | import os
import shutil
from rich.prompt import Prompt
from rich.table import Table
from create_folder import create_folder
def delete_user(console):
path = "./user-docs"
user_to_del = str()
user_path = str()
while True:
os.system('clear')
console.print(f"[red]So you want to delete a... | mcsadri/automation | automation/delete_user.py | delete_user.py | py | 2,920 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.system",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "rich.prompt.Prompt.ask",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "rich.prompt.Prompt",
... |
26115632417 | import re
from collections import Counter
import configuration
def count_requests_with_server_error():
regex = re.compile(r'\d+\.\d+\.\d+\..+[A-Z]{3,4} .+HTTP.+" 5.. \d+.+$', re.MULTILINE)
with open(configuration.repo_root() + '/access.log', 'r') as file:
ip = [match.split()[0] for match in re.findal... | sh4rkizz/2022-1-QAPYTHON-VK-A-Mahonin | homework5/py_scripts/clients_with_most_server_based_errors.py | clients_with_most_server_based_errors.py | py | 993 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "re.compile",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "re.MULTILINE",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "configuration.repo_root",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "re.findall",
"l... |
70267230269 |
import os
import sys
import time
import config
import traceback
cur_dir = os.path.dirname(os.path.abspath(__file__))
#sys.path.append(os.path.join(cur_dir, "..", "epyk-ui"))
from epyk.core.js import Imports
from epyk.core.py import PyRest
PyRest.TMP_PATH = config.OUTPUT_TEMPS
Imports.STATIC_PATH = "./../../static... | epykure/epyk-templates | PacthRunner.py | PacthRunner.py | py | 5,254 | python | en | code | 17 | github-code | 6 | [
{
"api_name": "os.path.dirname",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "epyk.core.py.PyRest.TMP_PAT... |
15056144032 | """Production settings and globals."""
import yaml
from os import environ
from os.path import dirname, join
from common import *
########## JSON CONFIGURATION
SERVICE_NAME = 'djangoapp'
CONFIG_ROOT = environ.get('CONFIG_ROOT', dirname(SITE_ROOT))
with open(join(CONFIG_ROOT, SERVICE_NAME) + ".auth.yaml") as aut... | eduNEXT/django-example-app | app/settings/prod.py | prod.py | py | 4,929 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "os.environ.get",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_nu... |
34352982765 | import cv2
#load pre trained data
trained_face_data = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
#choose image to detect face in
#img = cv2.imread('52-05.jpg')
#img = cv2.imread('img2p.jpg')
webcam = cv2.VideoCapture(1) #detect face in video
#key = cv2.waitKey(1)
#iterate over frames
while True:
... | mirethy/cl-python-opencv-facedetect | face.py | face.py | py | 959 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cv2.CascadeClassifier",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY"... |
22656015465 | from model import common
import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
from torch.nn import functional as F
import numpy as np
def make_model(args, parent=False):
return RCGB(args)
class CGConv2d(nn.Conv2d):
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
... | akashpalrecha/superres-deformable | src/model/cgc_rcan.py | cgc_rcan.py | py | 8,589 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "torch.nn.Conv2d",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "torch.nn.AdaptiveAvgPool2d",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "torch.nn",
... |
17962113365 | import sqlite3 as sql
from datetime import date
from model.classes import User, Country, Tasting
def initCon() -> sql:
"""
Initialize connection
:return connection:
"""
return sql.connect('../coffeeDB.db')
def createCursor(con: sql.Connection) -> sql.Cursor:
"""
Creates cursor
:para... | jathavaan/CoffeeDB | model/DBMS.py | DBMS.py | py | 15,711 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sqlite3.Connection",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "sqlite3.Cursor",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "sqlite3.C... |
6187356527 | #!/usr/bin/env python3
"""
A function that uses the requests module to obtain the HTML content
of a particular URL and return it
"""
import redis
import requests
from functools import wraps
r = redis.Redis()
def url_access_count(method):
"""
A decorator for the get_page function.
"""
@wraps(method)... | Cyril-777/alx-backend-storage | 0x02-redis_basic/web.py | web.py | py | 1,141 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "redis.Redis",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "functools.wraps",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 44,
"usage_type": "call"
}
] |
70374444349 | import os
import shutil
import sys
import pytest
import torch
from ivory.core.client import create_client
@pytest.fixture(scope="module")
def runs():
sys.path.insert(0, os.path.abspath("examples"))
client = create_client(directory="examples")
runs = []
for name in ["tensorflow", "nnabla", "torch2"]:... | daizutabi/ivory | tests/libs/conftest.py | conftest.py | py | 1,061 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.insert",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_num... |
12791274360 | # -*- coding: utf-8 -*-
import requests
import time
import datetime
import sys
import boto3
from boto3.dynamodb.conditions import Key, Attr
from botocore.exceptions import ClientError
import json
import telegram
from PIL import Image
from io import BytesIO
import asyncio
import re
import os
import top_holding
bot_id... | EddieKuo723/ARK-Invest-Trading-Desk | ARK_Sticker_Set/lambda_function.py | lambda_function.py | py | 4,404 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "os.environ",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "telegram.Bot",
"l... |
26344548844 | from unittest import TestCase
import glob
from lxml import etree
class ValidationError(Exception):
pass
class TestSampleFileValidation(TestCase):
def test_ukrdc_sample_files(self):
# For each sample file
for sample_path in glob.glob("sample_files/ukrdc/*.xml"):
# Run as a subtes... | renalreg/resources | tests/test_sample_files.py | test_sample_files.py | py | 2,213 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "unittest.TestCase",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "glob.glob",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "lxml.etree.XMLSchema",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"li... |
71877606587 | from urllib.parse import quote_plus
from bs4 import BeautifulSoup
#selenium : web test에 사용되는 프레임워크, webdriver API를 통해 렌더링이 완료된 후의 DOM 결과물에 접근할 수 있음(브라우저 제어가 필요)
#pip install selenium
#직접 브라우저를 제어하기 때문에 header값 없이도 크롤링이 가능
#여기선 Chrome 사용 webdriver 설치 : https://chromedriver.chromium.org/downloads
from selenium import web... | BrokenMental/Python-Study | googleCrawl.py | googleCrawl.py | py | 1,197 | python | ko | code | 0 | github-code | 6 | [
{
"api_name": "urllib.parse.quote_plus",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "... |
27925991770 | """
-*- coding: utf-8 -*-
@author: socratio
@inspiration: drew original inspiration from cleartonic twitchtriviabot. Almost nothing left in this code from that project.
"""
import json
from twitchio import websocket
from twitchio.ext import commands
import yaml
import asyncio
import os
import random
class ChatBot(com... | Socratia/StrandedPandaTrivia | strandedpandatriviabot.py | strandedpandatriviabot.py | py | 21,771 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "twitchio.ext.commands.Bot",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "twitchio.ext.commands",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.... |
11093803614 | from django.conf.urls import url
from . import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
url(r'^$', views.first_view, name='first_view'),
url(r'^uimage/$', views.uimage, name='uimage'),
url(r'^dface/$', views.dface, name='dface'),
url(r'^crop/$',... | neemiasbsilva/django-api-computer-vision | pipeline/urls.py | urls.py | py | 753 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "django.conf.urls.url",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.c... |
34273049354 | from flask import Flask
from flask_cors import CORS
from flask_marshmallow import Marshmallow
from config import config
from .main import main as main_blueprint
'''
Application factory for application package. \
Delays creation of an app by moving it into a factory function that can be \
explicitly invoked from script... | daronphang/stock_app_backend | app/__init__.py | __init__.py | py | 997 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask_cors.CORS",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "main.main",
"line_number": 14,
"usage_type": "argument"
},
{
"api_name": "flask_marshmallow.Marshmallow",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.Fla... |
37300509850 | import sqlite3, sys
from pathlib import Path
from . import Notes
from tqdm import tqdm
db_path = "database/xhs_tesla_notes.db"
def fill(db_path=db_path):
blank_query = "SELECT COUNT(*) FROM notes WHERE content is ''"
try:
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
amount... | Lucascuibu/xis_topic_py | ai_category/fill_blank.py | fill_blank.py | py | 1,927 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_number": 26,
"usage_type": "call"
}
] |
33379210836 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('spurt', '0020_linkpost_scrape_token'),
]
operations = [
migrations.RenameField(
model_name='linkpost',
... | steezey/spurt | spurt/migrations/0021_auto_20150122_0128.py | 0021_auto_20150122_0128.py | py | 402 | python | en | code | 0 | github-code | 6 | [
{
"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.RenameField",
"line_number": 14,
"usage_type": "call"
},
... |
5519173983 | import sys
import logging
import click
import os
sys.path.append('.')
from src.classes import Dataset
logger = logging.getLogger(__name__)
@click.command()
@click.option(
'--n_images', default=10,
help="Number of images per tissue"
)
@click.option(
'--n_tissues', default=6,
help="Number of tissues wi... | willgdjones/HistoVAE | scripts/patches.py | patches.py | py | 825 | python | en | code | 10 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_... |
24013644968 | import warnings
from dataclasses import dataclass
from typing import List, Optional
import keopscore
import torch
from pykeops.torch import Genred
from falkon.mmv_ops.utils import _get_gpu_info, _start_wait_processes, create_output_mat
from falkon.options import BaseOptions, FalkonOptions
from falkon.utils import dec... | FalkonML/falkon | falkon/mmv_ops/keops.py | keops.py | py | 8,589 | python | en | code | 157 | github-code | 6 | [
{
"api_name": "torch.Tensor",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "torch.Tensor",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "torch.Tensor",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "typing.List",
... |
6834567910 | from typing import Optional, Tuple, Union
import torch.nn as nn
from diffusers.models import UNet2DConditionModel
from diffusers.models.unet_2d_blocks import UNetMidBlock2DCrossAttn
from diffusers.models.embeddings import Timesteps, TimestepEmbedding
from diffusers.configuration_utils import register_to_config
from b... | srpkdyy/VideoLDM | videoldm.py | videoldm.py | py | 16,886 | python | en | code | 76 | github-code | 6 | [
{
"api_name": "diffusers.models.UNet2DConditionModel",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "ty... |
37957130845 | from __future__ import print_function
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from googleapiclient.http import MediaFileUpload
import subprocess
import os
from os.path import join
... | vjgpt/twitter-pipeline | dags/daglibs/upload.py | upload.py | py | 2,218 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "os.getcwd",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "subprocess.call",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_num... |
4534932686 | #import mxnet.ndarray as nd
from mxnet import nd
from mxnet import autograd
# REF [site] >> https://gluon-crash-course.mxnet.io/ndarray.html
def ndarray_example():
a = nd.array(((1, 2, 3), (5, 6, 7)))
b = nd.full((2, 3), 2.0)
b.shape, b.size, b.dtype
# Operations.
x = nd.ones((2, 3))
y = nd.random.uniform(-1, 1... | sangwook236/SWDT | sw_dev/python/rnd/test/machine_learning/mxnet/mxnet_basic.py | mxnet_basic.py | py | 1,497 | python | en | code | 17 | github-code | 6 | [
{
"api_name": "mxnet.nd.array",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "mxnet.nd",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "mxnet.nd.full",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "mxnet.nd",
"line_number": 8,
... |
15418635020 | # -*- coding: utf-8 -*-
#!/usr/bin/env python3.5
from django.shortcuts import render
from django.http import HttpResponseRedirect
from .forms import RegPeopleForm, RegUserForm
def createuser(request):
if request.method == "POST":
uform = RegUserForm(data=request.POST)
pform = RegPeopleForm(data=r... | MyriamBel/testwork | Reg/views.py | views.py | py | 725 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "forms.RegUserForm",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "forms.RegPeopleForm",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.http.HttpResponseRedirect",
"line_number": 18,
"usage_type": "call"
},
{
"api_name":... |
32724214710 | from setuptools import find_packages, setup
VERSION = "0.1"
INSTALL_REQUIRES = [
"alembic==1.9.4",
"apischema==0.15.6",
"asyncio==3.4.3",
"configparser==5.3.0",
"fastapi[all]==0.92.0",
"psycopg2==2.9.1",
"python-binance==1.0.16",
"python-telegram-bot==20.0a2",
"SQLAlchemy==1.4.37",... | DanielDucuara2018/report_calculation | setup.py | setup.py | py | 1,329 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "setuptools.setup",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 21,
"usage_type": "call"
}
] |
21097762911 | """
Honk Settings.
"""
import environ
from pathlib import Path
from google.oauth2 import service_account
env = environ.Env(
# set casting, default value
DEBUG=(bool, False),
)
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR: Path = Path(__file__).resolve().parent.parent
# reading ... | rafamoreira/honk | honk-web/honk/settings.py | settings.py | py | 3,860 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "environ.Env",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "environ.Env.read_env",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "environ.Env",
"line... |
26528967131 | import collections
from oneview_redfish_toolkit.api.errors import \
OneViewRedfishException
from oneview_redfish_toolkit.api.errors import \
OneViewRedfishResourceNotFoundException
from oneview_redfish_toolkit.api.redfish_json_validator import \
RedfishJsonValidator
from oneview_redfish_toolkit import conf... | HewlettPackard/oneview-redfish-toolkit | oneview_redfish_toolkit/api/redfish_error.py | redfish_error.py | py | 3,585 | python | en | code | 16 | github-code | 6 | [
{
"api_name": "oneview_redfish_toolkit.api.redfish_json_validator.RedfishJsonValidator",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "collections.OrderedDict",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "oneview_redfish_toolkit.config.get_registry_dict"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.