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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3521223720 | from PIL import Image , ImageDraw
from tqdm import tqdm
import numpy as np
import glob
import sys
import cv2
import psutil
from keras.models import model_from_json
print("Getting model")
json_file = open('model\car_detection.json', 'r')
loaded_model_json = json_file.read()
json_file.close()
model = model_... | marktilbrook/CarDetectionKeras | test.py | test.py | py | 5,081 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "keras.models.model_from_json",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "numpy.asarray",... |
5746832957 | import json
import os
import pytest
from click.testing import CliRunner
import brain.parsers
import brain.parsers.mq_agent.rabbitmq_agent
from brain.parsers import run_parser, invoke_parser
from brain.parsers.__main__ import cli
from brain.parsers.framework import Context
from brain.parsers.mq_agent import load_mq_ag... | ntalmon/brain | tests/test_parsers.py | test_parsers.py | py | 6,069 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "data_generators.gen_snapshot_for_parsers",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "utils.protobuf2dict",
"line_number": 31,
"usage_type": "call"
},
{
"... |
18855334859 | from controller import Controller
import asyncio
import json
import websockets
class WebInterface(Controller):
def __init__(self, key_interface={'Left': ('w', 's'), 'Right': ('o', 'l')}, start_key='r'):
super()
self.clients = {'Left': None, 'Right': None}
self.keys = {'Left': None, 'Right'... | TheFlippers/website | script/py/web_interface.py | web_interface.py | py | 2,601 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "controller.Controller",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "websockets.serve",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "asyncio.get_event_loop",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "asyncio.... |
75197765479 |
# coding: utf-8
# # Vanilla LSTM in Keras
# In this notebook, we use an LSTM to classify IMDB movie reviews by their sentiment.
# #### Load dependencies
# In[1]:
import keras
from keras.datasets import imdb
from keras.preprocessing.sequence import pad_sequences
from keras.models import Sequential
from keras.laye... | chsivateja/workspace_pyCharm | Machine Learning/Amit_Ex/vanilla_lstm_in_keras.py | vanilla_lstm_in_keras.py | py | 3,038 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "keras.datasets.imdb.load_data",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "keras.datasets.imdb",
"line_number": 59,
"usage_type": "name"
},
{
"api_name": "keras.datasets.imdb.get_word_index",
"line_number": 63,
"usage_type": "call"
},
{
... |
38994253723 | import os
# 必须在加载 加之前
os.environ['SDL_VIDEO_WINDOW_POS'] = "%d, %d" % (0, 30)
import random
import pygame
from pygame.locals import *
from math import pi, sin, cos
pygame.init()
# 获取显示器大小
screen_width, screen_height = pygame.display.get_desktop_sizes()[0]
ICON = "./icon.png"
TITLE = "见到你时我的心"
WIDTH ... | Agamemnon-Peng/heart | 心形图案.py | 心形图案.py | py | 14,929 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.environ",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "pygame.init",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pygame.display.get_desktop_sizes",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pygame.di... |
21104341644 | import numpy as np
import onnx
from onnx import AttributeProto, GraphProto, OperatorSetIdProto, TensorProto, helper, numpy_helper # noqa: F401
# Gelu formula: x * 0.5 * (1.0 + tanh((sqrt(2 / pi) * (x + 0.044715 * pow(x, 3)))))
X = helper.make_tensor_value_info("input", TensorProto.FLOAT, ["batch", "seqlen", 64])
Y =... | microsoft/onnxruntime | onnxruntime/test/testdata/transform/fusion/fast_gelu3_with_casts.py | fast_gelu3_with_casts.py | py | 3,466 | python | en | code | 9,700 | github-code | 18 | [
{
"api_name": "onnx.helper.make_tensor_value_info",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "onnx.helper",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "onnx.TensorProto.FLOAT",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name"... |
19522336504 | # coding=utf-8
import json
from django.contrib.auth.decorators import login_required
from django.forms.models import model_to_dict
from django.http.response import HttpResponse, HttpResponseBadRequest
from app.utils import require_in_GET, update_object, require_in_POST, update_post_object, get_post_object, json_encod... | SevenLines/django-tealeaf | students/views/labsview.py | labsview.py | py | 4,103 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "models.labs.StudentLab.objects.filter",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "models.labs.StudentLab.objects",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "models.labs.StudentLab",
"line_number": 25,
"usage_type": "name... |
10293481646 | import pandas as pd
import networkx as nx
from pyvis import network as net
from torch_geometric.utils import to_networkx, degree
from sklearn.manifold import TSNE
from sklearn.decomposition import PCA
import plotly.express as px
from rdkit import Chem
from rdkit.Chem import Descriptors
import mols2grid
import py3Dmol
... | ml6team/andrew-biograph | drug_repurposing/visualization.py | visualization.py | py | 7,638 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch_geometric.utils.to_networkx",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "networkx.single_source_shortest_path_length",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pyvis.network.Network",
"line_number": 75,
"usage_type": "c... |
22968121502 | from django.conf import settings
import requests
from rest_framework import viewsets, response, mixins, generics
from real_deal.offers.models import Offer
from .serializers import OfferSerializer
ENGLISH = 1
MONEY_OFF = 35
FREE_TRIAL = 74
class OffersViewSet(mixins.ListModelMixin,
viewsets.Ge... | silverlogic/real-deal-back | real_deal/api/views.py | views.py | py | 2,274 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "rest_framework.mixins.ListModelMixin",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.mixins",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "rest_framework.viewsets.GenericViewSet",
"line_number": 17,
"usage_type":... |
35284636120 | from setuptools import setup, find_packages
with open('README.md', 'r') as readmefile:
readme = readmefile.read()
setup(
name='glitch_this',
version='1.0.2',
author='TotallyNotChase',
author_email='totallynotchase42@gmail.com',
description='A package to glitch images and GIFs, with highly cust... | TotallyNotChase/glitch-this | setup.py | setup.py | py | 888 | python | en | code | 1,734 | github-code | 18 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 15,
"usage_type": "call"
}
] |
7158297403 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import sys
import os
import argparse
ROOT_DIR = os.path.abspath(os.path.join(__file__, "../.."))
sys.path.insert(0, ROOT_DIR)
from utils import logger
from engine import c... | shinke-li/Campus3D | engine/eval.py | eval.py | py | 4,594 | python | en | code | 38 | github-code | 18 | [
{
"api_name": "os.path.abspath",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.path.insert",
"line_nu... |
74934522279 | import collections as coll
import heapq
import re
def bin_to_int(x):
# Converts a string of bits to an integer.
if not x:
return 0
return int(x, 2)
def hex_to_bin(x):
# Converts a string of hexadecimal numbers to a string of bits (preserving leading zeros).
return bin(int(x, 16))[2:].zfi... | fredrik-rose/AdventOfCode2021 | adventofcode/algorithms/algorithms.py | algorithms.py | py | 1,146 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "re.findall",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "heapq.heappop",
... |
22613972164 | import logging
from flask import request, abort, jsonify, g
from flask_restplus import Resource
from api.problems.serializers import problem as api_problem
from api.problems.serializers import problem_table, problem_description, problem_edition, main_problem
from api.restplus import api
from models import db, Problem,... | CCLJ/wt_backend | api/problems/problems.py | problems.py | py | 17,033 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "api.restplus.api.namespace",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "api.restplus.api",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "flask_r... |
3172817611 | from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from .forms import VideoFileForm
from .models import Categories
from django.core.files.storage import FileSystemStorage
from django.contrib import messages
from django.conf import settings
import uuid
import io
from moviepy.ed... | IceyGirl424/Coders-Hive | web_testing/categories/views.py | views.py | py | 3,694 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "google.cloud.language_v1.LanguageServiceClient",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "google.cloud.language_v1",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "google.cloud.speech.SpeechClient",
"line_number": 19,
"usage_type... |
25948289198 | import datetime
import requests
import json
import time
import os
from functions import md5
from functions import file_name
from functions import return_to_menu
from functions import file_extension
#Define Global Variable
status_code = 0
def scan_directory(api_key, url, file_path, report_path, rname):
#Open f... | metalstormbass/CP-ThreatEmulation | scandirectory.py | scandirectory.py | py | 5,683 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "functions.md5",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "functions.file_name",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "json.loads",
"lin... |
23073063703 | #!/usr/bin/env python3
# Version 1.1
# Author Alexis Blanchet-Cohen
# Date: 09/06/2014
# Remove NAs from MATS_output
# for k in *; do echo $k; cd ${k}/MATS_output; for i in *; do j=$(basename $i .txt)_no_na.txt; echo $j; grep -v NA $i > $j; done; cd ../..; done
import argparse
from collections import OrderedDict
imp... | blancha/abcngspipelines | rnaseq/rmats2sashimiplots.py | rmats2sashimiplots.py | py | 6,349 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "util.cdMainScriptsDirectory",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "o... |
21984367070 | import torch
from torch.utils.data import Dataset
import numpy as np
import cv2
import copy
import os
class HighlightDataset(Dataset):
def __init__(self, len_sequence, highlight_dir, non_highlight_dir, transform=None):
self.simg_width = 16 * 14
self.len_sequence = len_sequence
self.highlig... | yongseongkim/highlight-generator | detector/dataset/highlight_dataset.py | highlight_dataset.py | py | 1,860 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"l... |
70688282601 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import math
from collections import namedtuple
import random
from tqdm import tqdm
from itertools import product
from mip import Model, xsum, minimize, OptimizationStatus, VarList, SearchEmphasis
import datetime
Point = namedtuple("Point", ['x', 'y'])
def length(po... | EnriquePinto/Coursera-DiscreteOptimization | week4/tsp/tsp_mip.py | tsp_mip.py | py | 4,776 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "collections.namedtuple",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "mip.Model",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
... |
33693813166 | import argparse
import hashlib
import json
import multiprocessing
import os
from datetime import datetime
from time import time
import numpy as np
from sklearn import utils
from sklearn.model_selection import ParameterGrid, RepeatedStratifiedKFold
import mlp
from mlp.activation_functions import Identity, Sigmoid, Sof... | AnthonyDickson/Neural-Networks | grid_search.py | grid_search.py | py | 11,260 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.ma.masked_invalid",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "numpy.ma",
"line_number": 53,
"usage_type": "attribute"
},
{
"api_name": "numpy.ma.masked_invalid",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "numpy.m... |
3855467054 | from libvirt import libvirtError
from libvirttestapi.src import sharedmod
from libvirttestapi.repos.storage import storage_common
from libvirttestapi.utils import process
required_params = ('poolname', 'sourcehost', 'sourcepath',)
optional_params = {'targetpath': '/tmp/netfs_test',
'xml': 'xmls/netf... | libvirt/libvirt-test-API | libvirttestapi/repos/storage/define_netfs_pool.py | define_netfs_pool.py | py | 1,935 | python | en | code | 12 | github-code | 18 | [
{
"api_name": "libvirttestapi.utils.process.run",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "libvirttestapi.utils.process",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "libvirttestapi.src.sharedmod.libvirtobj",
"line_number": 27,
"usage_type": ... |
17099639015 | # ImagePreprocess.py
# 因为从网上找的数据集中的图片大小不一致,不方便之后构建特征集,因此先对所有图片进行大小设置
from PIL import Image # 调入图片处理类
import os.path
import glob # 文件操作类
# 将图片的大小统一设置为28*28像素
def convertjpg(jpgfile, outdir, width=28, height=28):
img=Image.open(jpgfile)
try:
new_img = img.resize((width, height), Image.BILINEAR... | PeakofMountains/MechineLearning | ImagePreprocess.py | ImagePreprocess.py | py | 831 | python | zh | code | 0 | github-code | 18 | [
{
"api_name": "PIL.Image.open",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "PIL.Image.BILINEAR",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "PIL.Image",
"line_... |
74027465961 | from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from profiles.models import UserProfile
from shopping.models import Item
class CartManager(models.Manager):
"""A custom manager for the Cart model.
This manager provides a method for getting or creating a cart for a given use... | MaiMokhtar/SimpleE-CommerceApplication | shopping/models/cart.py | cart.py | py | 1,913 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.db.models.Manager",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "profiles.models.UserProfile",
"line_number": 14,
"usage_type": "name"
},
{
"api_name... |
3855539684 | import os
from libvirt import libvirtError
from libvirttestapi.src import sharedmod
required_params = ('poolname', 'volname',)
optional_params = {}
def pool_lookup_by_volume(params):
"""
test API for storagePoolLookupByVolume in class virStoragePool
"""
logger = params['logger']
poolname = pa... | libvirt/libvirt-test-API | libvirttestapi/repos/storage/pool_lookup_by_volume.py | pool_lookup_by_volume.py | py | 1,348 | python | en | code | 12 | github-code | 18 | [
{
"api_name": "libvirttestapi.src.sharedmod.libvirtobj",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "libvirttestapi.src.sharedmod",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "os.path.exists",
"line_number": 28,
"usage_type": "call"
},
... |
36317310982 | import torch
import torch.nn as nn
from torch import Tensor
import torchvision
from collections import OrderedDict
from unet import UNet
from EfficientNetV2 import efficientnetv2_s
def conv1x1(in_planes: int, out_planes: int, stride: int = 1) -> nn.Conv2d:
"""1x1 convolution"""
return nn.Conv2d(in_... | lizhuorong/CWN | CWN.py | CWN.py | py | 4,313 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.nn.Conv2d",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_nu... |
5862616031 | import xarray as xr
for year in range(1979,2023):
print(year)
ds = xr.open_dataset(f"data/{year:04d}_wind_capacity_factor_by_turbine.nc")
var = ds['Vestas_v110_2000MW']
var = var.astype('float32')
var_with_coords = xr.DataArray(var, coords=[ds['time'],ds['lat'],ds['lon']], dims=['time', 'lat', 'lon'])
v... | kieranmrhunt/india-renewable | capacity/make-wind-cf-ncs.py | make-wind-cf-ncs.py | py | 506 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "xarray.open_dataset",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "xarray.DataArray",
"line_number": 12,
"usage_type": "call"
}
] |
35021793702 | import h5py
import numpy as np
import os
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()
import time
def split_train_test(images, labels, train_percent, random_seed = 0):
np.random.seed(random_seed)
images_labels = np.hstack((images, labels.reshape(len(labels), 1)))
perm = np.random.permut... | dukeNashor/R2Us | SVM_Classifier_FashionMNIST/SVM_Classifier_FashionMNIST/preprocessor.py | preprocessor.py | py | 2,808 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "seaborn.set",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "numpy.hstack",
"line... |
12749400704 | #!/usr/bin/env python
import datetime
import os
import subprocess
import sys
import click
PRE_PART_2 = """
import utils
def get_data():
return utils.get_input(cast=int, delimiter=',', line_delimiter='\\n')
@utils.part
def part_1():
data = get_data()
"""
PART_2 = """
@utils.part
def part_2():
data = ... | alexander-yu/adventofcode | gen.py | gen.py | py | 1,718 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "os.path.exists",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "sys.platform",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "subprocess.call",
"... |
9670709151 | #!/usr/bin/env python
#from distutils import command
#from inspect import trace
import base64
import os
import json
#import pytz
import pprint
#import re
import traceback
import tornado.gen
import tornado.httpserver
import tornado.ioloop
import tornado.web
#from mongo_db_controller import UserDB
from settings import ... | wxsd-sales/webex-far-end-camera-control | server.py | server.py | py | 19,815 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "tornado.options.define",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pprint.PrettyPrinter",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "spark.Spark",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "settings.Sett... |
37440883804 | import pytest
import tensorflow as tf
from garage.np.baselines import LinearFeatureBaseline
from garage.sampler import singleton_pool
from garage.tf.algos import VPG
from garage.tf.envs import TfEnv
from garage.tf.experiment import LocalTFRunner
from garage.tf.plotter import Plotter
from garage.tf.policies import Cate... | mushi333/2021-FIT4003-SBSE-for-self-driving-cars | third_party/garage/tests/garage/tf/experiment/test_local_tf_runner.py | test_local_tf_runner.py | py | 3,496 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "tests.fixtures.TfGraphTestCase",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "garage.tf.experiment.LocalTFRunner",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "tests.fixtures.snapshot_config",
"line_number": 17,
"usage_type": "argu... |
16905614695 | import pymysql
class DeleteTableData():
def __init__(self, course_id):
self.course_id = str(course_id)
self.conn = pymysql.connect(host='127.0.0.1', user='root', password='123456',
port=3306, db='school_work', charset='utf8')
self.cursor = self.conn.cursor... | sincerely1/visio-system | 后端代码/zip_load/del_courese_info.py | del_courese_info.py | py | 1,877 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pymysql.connect",
"line_number": 5,
"usage_type": "call"
}
] |
20489617458 | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 13 09:18:44 2021
@author: Ruich
"""
import threading
from concurrent.futures import ThreadPoolExecutor,as_completed
from bs4 import BeautifulSoup
import requests
def craw(url):
r = requests.get(url)
return r.text
def parse(html):
# class "post-item-title"
... | RuichengGeng/MultiThread_Practice_Python | 4threadPool.py | 4threadPool.py | py | 1,143 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "concurrent.futures.ThreadPoolExecutor",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "... |
37506861434 | import sys
from PyQt5.QtWidgets import QMainWindow, QApplication
import mainwindow
import captor_thread
import time
class UserFilter:
def __init__(self, SrcIp = "", DstIp = "", SrcPort = "", DstPort = "", Protocol = 0):
###过滤条件
self.SrcIp = SrcIp
self.DstIp = DstIp
self.SrcPort =... | TomoyoSang/Sniffer | main.py | main.py | py | 3,080 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "captor_thread.start_thread",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 93,
"usage_type": "call"
},
{
"api_name": "captor_thread.GetDevices",
"line_number": 101,
"usage_type": "call"
},
{
"api_name": "PyQt5.... |
38802300773 | import requests
import json
import logging
import datetime
import time
from twilio.rest import Client
class Day:
def __init__(self, date, location, aqi, weighing):
self.date = date
self.location = location
self.aqi = aqi
self.weighing = weighing
def __repr__(self):
rep ... | MateoGitIt/Calidad-del-Aire-CSV | AQI SMS Sender.py | AQI SMS Sender.py | py | 2,594 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "requests.exceptions",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"... |
1361433654 | # config.py
import os
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'tu_clave_secreta'
SQLALCHEMY_DATABASE_URI = 'mysql://mi_usuario:mi_contraseña@localhost/mi_proyecto_db'
import requests
# URL base de la API de OpenWeatherMap
url_base = "http://api.openweathermap.org/data/2.5/weather?"
# C... | Enya-Mich/sistema-mya | config.py | config.py | py | 1,105 | python | es | code | 0 | github-code | 18 | [
{
"api_name": "os.environ.get",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 24,
"usage_type": "call"
}
] |
3668622443 | # -*- coding: utf8 -*-
import os
import hashlib
import pybossa_gravatar
from mock import patch, MagicMock
from factories import UserFactory
from default import Test, with_context
from helper import web
class TestEventListener(Test):
@with_context
@patch('pybossa_gravatar.event_listeners.gravatar.set', retur... | alexandermendes/pybossa-gravatar | tests/test_plugin.py | test_plugin.py | py | 3,949 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "default.Test",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "mock.MagicMock",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "mock.MagicMock",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pybossa_gravatar.event_lis... |
17172347120 | #!/usr/bin/env python
# coding: utf-8
import numpy as np
import pandas as pd
import matplotlib.pylab as plt
import matplotlib.pyplot as pyplt
from matplotlib import gridspec
import matplotlib
def get_ds_infos():
"""
Read the file includes data subject information.
Data Columns:
0: code [1-24]
... | Intelligent-Systems-Phystech/2020_Project8 | code/library.py | library.py | py | 12,347 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pandas.read_csv",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_n... |
30668528943 | import csv
# import json
from matplotlib import pyplot as plt
import numpy as np
import os
from sklearn.preprocessing import MinMaxScaler
import json
all = ["Cameroon", "Chad", "Congo", "Djibouti", "Eritrea", "Eswatini", "Ethiopia", "Lesotho", "Malawi", "Mali", "Mauritania",
"Namibia", "Niger", "Niger... | Animeshnbe/Project_LandOdyssey | temporal.py | temporal.py | py | 4,204 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "csv.reader",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.MinMaxScaler",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.corrc... |
28933409101 | from dataclasses import dataclass
from typing import Any, List, Tuple
import hypothesis.strategies as st
import pytest
from hypothesis import given
from omegaconf import DictConfig, ListConfig
from omegaconf.errors import ValidationError
from hydra_zen import (
DefaultBuilds,
builds,
hydrated_dataclass,
... | mit-ll-responsible-ai/hydra-zen | tests/test_hydra_behaviors.py | test_hydra_behaviors.py | py | 6,081 | python | en | code | 235 | github-code | 18 | [
{
"api_name": "hydra_zen.DefaultBuilds._get_obj_path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "hydra_zen.DefaultBuilds",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "hydra_zen.builds",
"line_number": 44,
"usage_type": "call"
},
{
... |
13243403060 | from django.db.models import Q
from django.http import HttpResponseRedirect
from django.shortcuts import render
from schedule_advisor.forms import ClassSearchForm, AdviseeChoiceForm
from schedule_advisor.models import Schedule, Class, User
from django.contrib import messages
def search_view(request):
res... | ralphsulioti/Schedule-Advisor | schedule_advisor/views.py | views.py | py | 11,844 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "schedule_advisor.forms.ClassSearchForm",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "schedule_advisor.forms.ClassSearchForm.get_results_from_database",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "schedule_advisor.forms.ClassSearchForm",
... |
33036912471 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Use iterative parsing to process the map file and
find out not only what tags are there, but also how many, to get the
feeling on how much of which data is expected within the map.
The output should be a dictionary with the tag name as the key
and number of times this ... | cminnich/OpenStreetMaps | PythonSource/mapparser.py | mapparser.py | py | 1,012 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "xml.etree.ElementTree.iterparse",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "pprint.pprint",
"line_number": 33,
"usage_type": "call"
}
] |
4820144022 | """
1027. Two City Scheduling
A company is planning to interview 2n people. Given the array costs where costs[i] = [aCost_i, bCost_i], the cost of flying the i-th person to city a is aCost_i, and the cost of flying the i-th person to city b is bCost_i.
Return the minimum cost to fly every person to a city such that ex... | tkwang0530/LeetCode | 1029.py | 1029.py | py | 2,323 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "typing.List",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "unittest.TestCase",
"line_number": 55,
"usage_type": "attribute"
},
{
"api_name": "unittest.main",
"line_number": 72,
"usage_type": "call"
}
] |
5764925995 | import os
import sys
import requests
import random
import string
from glob import glob
from time import perf_counter
from . import process_question_with_teprolin, \
remove_diacritics, frequent_verbs
_bing_search_url = 'https://api.bing.microsoft.com/v7.0/search?q=#QUERY#&cc=RO'
_bing_api_key = os.getenv('BING_SEA... | racai-ai/e4a-covid-qa | webquery/bing.py | bing.py | py | 6,654 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.getenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "string.ascii_lowercase",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "string.digits",
... |
3680568735 | from django.conf import settings
import django
from dota2Private.settings import DATABASES, INSTALLED_APPS
settings.configure(DATABASES=DATABASES, INSTALLED_APPS=INSTALLED_APPS)
django.setup()
import time
from schedule import Scheduler
import threading
from privateApp.database_fetcher import getGamesDota2Api, getm... | shaurya-gupta24/Dota2PrivateSearcher | dota2Private/parse.py | parse.py | py | 2,828 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.conf.settings.configure",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.conf.settings",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "dota2Private.settings.DATABASES",
"line_number": 5,
"usage_type": "name"
},
{
"... |
35024212013 | from django.conf.urls import url, include
from django.contrib import admin
from .views import Home, Base, Team, Landingpage
from videos.views import VideoListView
from videos.views import (
VideoDetailView ,
VideoCreateView ,
VideoUpdateView ,
VideoDeleteView ,
)
from .views import UsercreateView , Us... | jinbob2/jjjj | mysite/urls.py | urls.py | py | 1,259 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.conf.urls.url",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 16,
"usage_type": "name"
},
{
"api_name... |
10376368692 | from pyird.image.pattern_model import median_XY_profile
import numpy as np
import pkg_resources
from pyird.utils import irdstream
import pathlib
import matplotlib.pyplot as plt
from pyird.image.channel import image_to_channel_cube, channel_cube_to_image, eopixel_split, eopixel_combine
from pyird.image.bias import bias_... | prvjapan/pyird | examples/python/read_pattern_correction.py | read_pattern_correction.py | py | 2,843 | python | en | code | 6 | github-code | 18 | [
{
"api_name": "pathlib.Path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pyird.utils.irdstream.Stream2D",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pyird.utils.... |
29158739546 | # leetcode-字谜分组.py
# 给定一个字符串数组,将字母异位词组合在一起。字母异位词指字母相同,但排列不同的字符串。
# 示例:
# 输入: ["eat", "tea", "tan", "ate", "nat", "bat"],
# 输出:
# [
# ["ate","eat","tea"],
# ["nat","tan"],
# ["bat"]
# ]
# 说明:
# 所有输入均为小写字母。
# 不考虑答案输出的顺序。
"""
思路:
长度,~集合~,,count
en ..
想到了排序整个strs
但没有想到排序单个str呢...
看清关键再哪喽..
解答即参考...
"""
from c... | ZX1209/gl-algorithm-practise | leetcode-gl-python/leetcode-字谜分组.py | leetcode-字谜分组.py | py | 1,542 | python | zh | code | 0 | github-code | 18 | [
{
"api_name": "collections.defaultdict",
"line_number": 40,
"usage_type": "call"
}
] |
11214142285 | """
Spaces defined for the algorithms to user
It might be a good idea to experiment with some of the distributions here
"""
from math import log
from hyperopt import hp
from hyperopt.pyll.base import scope
LR_LOG_LOWER = log(0.0001)
LR_LOG_UPPER = log(0.1)
# NOTE: Do not use keyword arguments for hyperopt distributi... | ISG-Siegen/Auto-Surprise | auto_surprise/algorithms/spaces.py | spaces.py | py | 3,943 | python | en | code | 25 | github-code | 18 | [
{
"api_name": "math.log",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "math.log",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "hyperopt.pyll.base.scope.int",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "hyperopt.pyll.base.sco... |
43109278700 | import numpy as np
import matplotlib.pyplot as plt
def MetNaiva(f, a, b, n, x):
X = np.linspace(a, b, n+1)
Y = f(X)
A = np.vander(X)
C = np.linalg.solve(A, Y)
C = np.flip(C)
y = 0
for i in range(n+1):
y += C[i] * x ** i
return y
def f(x):
return np.exp(2*x)
#
a = - 1
b = 1
... | HoaraIonut/Analiza_Numerica_Si_Metode_NumericeI | Laborator 5/rezolvareLab5.py | rezolvareLab5.py | py | 1,697 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.linspace",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.vander",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.linalg.solve",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
"line_... |
35780462472 | # 실버 1
import sys
from collections import deque
input = sys.stdin.readline
m, n = map(int, input().split())
dx, dy = [-1, 1, 0, 0, -1, -1, 1, 1], [0, 0, -1, 1, -1, 1, -1, 1]
board = [input().split() for _ in range(m)]
result = 0
for i in range(m):
for j in range(n):
if board[i][j] == "1":
bo... | what-the-study/what-the-algorithm | youngjoo/BOJ/DFS_BFS/14716_현수막.py | 14716_현수막.py | py | 734 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "sys.stdin",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 17,
"usage_type": "call"
}
] |
37284621532 | import os
import subprocess
import collections
import re
# private
def d2nt(dictionary):
return collections.namedtuple('metadata', dictionary.keys())(**dictionary)
def export_env(key, value):
with open(os.getenv("GITHUB_ENV"), "a") as f:
f.write("%s=%s\n" % (key, value))
class Repo(object):
def ... | chiplicity/openlane | .github/scripts/gh.py | gh.py | py | 3,312 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "collections.namedtuple",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "subprocess.check_output",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "subprocess.ch... |
23989977105 | from scipy.misc import factorial as fac
from sys import argv
import time
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt
from pyrap.tables import table
import astropy.io.fits as fits
from astropy import wcs
from pyuvdata import UVBeam
import os
import sys
import glob
import... | Ntsikelelo-Charles/EoR-project | random_200_source_sky_model.py | random_200_source_sky_model.py | py | 7,651 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "copy.copy",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "copy.copy",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 32,
... |
2539314544 | """studentlife URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-b... | Akash9977/studentlife | career/urls.py | urls.py | py | 1,172 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.urls.path",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "career.views.index",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "career.views",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "django.urls.pat... |
75207918760 | #-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: alex
#
# Created: 29/08/2019
# Copyright: (c) alex 2019
# Licence: <your licence>
#-------------------------------------------------------------------------------
imp... | aporto/stopots_firefox | python/convert_csv_to_json.py | convert_csv_to_json.py | py | 1,932 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "csv.reader",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "unicodedata.normalize",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "unicodedata.normalize",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "unicodedata.no... |
3155612451 | import os
import sys
import tempfile
import logging
import fcntl
import errno
import signal
from signal import SIGABRT, SIGILL, SIGINT, SIGSEGV, SIGTERM, signal, SIGQUIT
import atexit
def signal_handler(signal, frame):
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGQUIT, signal_handler)... | gu321/single_process | single_process/__init__.py | __init__.py | py | 1,418 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "signal.signal.signal",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "signal.signal",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "signal.signal.SIGINT",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "signal.s... |
20830130942 | import DosePrediction.Train.config as config
from typing import Optional
from monai.inferers import sliding_window_inference
from monai.data import DataLoader, list_data_collate
import pytorch_lightning as pl
from pytorch_lightning.callbacks.model_checkpoint import ModelCheckpoint
from pytorch_lightning.callbacks imp... | GhTara/Dose_Prediction | DosePrediction/Train/train_light_exp_models.py | train_light_exp_models.py | py | 15,499 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "pytorch_lightning.callbacks.TQDMProgressBar",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "pytorch_lightning.LightningDataModule",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "typing.Optional",
"line_number": 38,
"usage_type":... |
5527272467 | import scrapy
### Year, rating, next pages to be done
class rogerSpider(scrapy.Spider):
name = 'roger'
start_urls = ['https://www.rogerebert.com/movies/A']
def parse(self, response):
SET_SELECTOR = '.details'
for object in response.css(SET_SELECTOR):
NAME_SELECT... | Skumar30/MovieRating | MovieRater/Scrapers/roger.py | roger.py | py | 456 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "scrapy.Spider",
"line_number": 5,
"usage_type": "attribute"
}
] |
6935247985 | from cryptography.fernet import Fernet
def encrypt_message(message, key):
fernet = Fernet(key)
encrypted_message = fernet.encrypt(message.encode())
return encrypted_message
def write_to_encrypted_file(file_path, content, key):
encrypted_content = encrypt_message(content, key)
try:
with ope... | Nimesh-bot/Eatery_Server | backend/api/utils.py | utils.py | py | 1,109 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "cryptography.fernet.Fernet",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cryptography.fernet.Fernet",
"line_number": 19,
"usage_type": "call"
}
] |
73744601001 | import manim
from typing import List
class GeneralPositionScene(manim.ThreeDScene):
def construct(self):
plane = manim.NumberPlane()
axis_config = {
"x_range": (-10, 10, 1),
"y_range": (-10, 10, 1),
"z_range": (-10, 10, 1),
}
axes = manim.Three... | thundergolfer/thundergolfer.github.io | tools/general_position_visualizations.py | general_position_visualizations.py | py | 1,465 | python | en | code | 29 | github-code | 18 | [
{
"api_name": "manim.ThreeDScene",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "manim.NumberPlane",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "manim.ThreeDAxes",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "manim.DEGREES... |
29729770057 | from pydantic import validator, AnyHttpUrl
from tracardi.service.plugin.domain.register import Plugin, Spec, MetaData, Documentation, PortDoc, Form, FormGroup, \
FormField, FormComponent
from tracardi.service.plugin.runner import ActionRunner
from tracardi.service.plugin.domain.result import Result
from tracardi.s... | Tracardi/tracardi | tracardi/process_engine/action/v1/ux/_snackbar/plugin.py | plugin.py | py | 6,240 | python | en | code | 430 | github-code | 18 | [
{
"api_name": "tracardi.service.plugin.domain.config.PluginConfig",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pydantic.AnyHttpUrl",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "pydantic.validator",
"line_number": 19,
"usage_type": "call"
},
... |
30861668256 | #!/usr/bin/python3.4
# -*- coding: utf-8 -*-
__author__ = 'Prostakov Alexey'
import os, glob
from pymongo import MongoClient
import sys
import configparser
import smev
import logging
import protokol
import datetime
"""
Описание
**********************
Входные данные
**********************
Выходные данные
***********... | ProstakovAlexey/socitTest | protokolGet.py | protokolGet.py | py | 6,684 | python | ru | code | 1 | github-code | 18 | [
{
"api_name": "logging.basicConfig",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "logging.error",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "logging.info",
... |
387449214 | from setuptools import setup
import setuptools
import os
from gnutools.utils import parent, listfiles
import numpy as np
from setuptools import Extension
def get_packages(root):
"""
Get the list of packages availables in a root
:param root: package root
:return list:
"""
root = os.path.realpath... | JeanMaximilienCadic/KenLM | setup.py | setup.py | py | 1,427 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "os.path.realpath",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "gnutools.utils.parent",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "gnutools.utils.li... |
25952297299 | import pixiv_auth
import json
from pixivpy3 import *
api = AppPixivAPI()
def tag_fixer(tag):
tags = []
translated_tags = []
for i in tag:
translated_tags.append(i.get("translated_name"))
tags.append(i.get("name"))
return tags, translated_tags
def pixiv_url_fixer(img):
pic_url = ... | Karlhsiao/pixivbot | pixiv_functions.py | pixiv_functions.py | py | 2,321 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pixiv_auth.refresh",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 61,
"usage_type": "call"
}
] |
26267664835 |
from .utils import create_transformer_masks
from .encoder import TransformerEncoder
from .decoder import TransformerDecoder
import torch
import torch.nn as nn
class Transformer(nn.Module):
def __init__(self,
num_layers,
d_model, num_head,
intermediate_dim,
... | pjlintw/integrated-gradients | models/transformer.py | transformer.py | py | 6,557 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.nn.Module",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "torch.nn.Embedding",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_n... |
42859409814 | #!/bin/python3
from exceptions import EdgeDoesNotExists, NoCompatibleConnectionFound
from itertools import combinations
import pprint
class Weight:
def __init__(self, w):
self.vector = w
def __add__(self, other):
sum = self.vector + other.vector
return Weight(sum)
def __... | pako-github/GKMpy | graph.py | graph.py | py | 9,463 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "exceptions.EdgeDoesNotExists",
"line_number": 86,
"usage_type": "call"
},
{
"api_name": "exceptions.EdgeDoesNotExists",
"line_number": 149,
"usage_type": "call"
},
{
"api_name": "itertools.combinations",
"line_number": 240,
"usage_type": "call"
},
{
... |
73305173159 | from django import forms
from .models import Profile
from .models import ProfileSettings
class ProfileForm(forms.ModelForm):
class Meta:
model=Profile
fields=(
'external_id',
'name',
)
widgets={
'name':forms.TextInput,
}
class ProfileSett... | zaxarhic2134/ManingBot2 | bot/tgadmin/bot/forms.py | forms.py | py | 758 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "models.Profile",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.forms.Tex... |
18274972648 | # Imports python modules
from time import time, sleep
import matplotlib.pyplot as plt
import seaborn as sns
from torchvision import datasets, transforms
import torch
import torchvision
import torchvision.transforms as transforms
import torch.optim as optim
#import time
import torch.nn.functional as F
import torch.nn... | wkh184/ImageClassifier | train.py | train.py | py | 10,666 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "torch.max",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "torch.max",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms.Compose",
"line_number": 112,
"usage_type": "call"
},
{
"api_name": "torchvision.trans... |
40417239681 | import json
from google.cloud import pubsub_v1
from constans import BUCKET_KEY_GCP
from core.format_converte import ExportMusic
from app import app
# from modelos import db
class PubSubConverter:
def __init__(self):
self.json_key = f'{BUCKET_KEY_GCP}/key.json'
def subscriber_message(self):
... | dhuertasm/BACKEND-SERVICIOS-CONVERSION-CLOUD | core/pubsub_converter.py | pubsub_converter.py | py | 1,292 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "constans.BUCKET_KEY_GCP",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "google.cloud.pubsub_v1.SubscriberClient.from_service_account_json",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "google.cloud.pubsub_v1.SubscriberClient",
"line_num... |
36380235538 | from __future__ import absolute_import, division, print_function
import decimal
from decimal import *
import logging
import typing
from builtins import *
import past.builtins
import xlrd
import xlwt
import canmatrix
import canmatrix.formats.xls_common
logger = logging.getLogger(__name__)
default_float_factory = dec... | Bunker-0/canmatrix | formats/xls.py | xls.py | py | 42,573 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "decimal.Decimal",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "xlwt.easyxf",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "xlwt.easyxf",
... |
9776673466 | # ========================== Third Party libs ========================
from typing import List
import torch
from transformers import LogitsProcessor
import scipy.stats
from math import sqrt
from itertools import chain, tee
import collections
# ============================ My packages ============================
from .... | Ehsan-Tavan/watermarking_summarization_model | src/utils/watermark_processor.py | watermark_processor.py | py | 17,551 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "typing.List",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "hash_functions.seeding_scheme_lookup",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "torch.LongTensor",
"line_number": 47,
"usage_type": "attribute"
},
{
"api_name":... |
13380514959 | import os
import time
import sys
import traceback
import cv2
import torch
import timm
import numpy as np
from models.build_model import build_model
from collections import OrderedDict
def normalize(img, mean, std, max_pixel_value=255.0):
mean = np.array(mean, dtype=np.float32)
mean *= max_pixe... | mxer/ImageClassificationTemplate | inference.py | inference.py | py | 3,540 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.array",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_... |
16230411342 | # -*- coding: utf-8 -*-
from maya import cmds
import os
import json
def maya_export():
selection = cmds.ls(sl=True)
long_names = cmds.ls(sl=True, l=True)
if selection:
cmds.inViewMessage( amg='<hl>Go Maya</hl> : Export Selected Objects', pos='midCenterTop', fade=True, ta=0.75, a=0.5)
temp =... | ShikouYamaue/SIWeightEditor | Contents/scripts/siweighteditor/go.py | go.py | py | 2,716 | python | en | code | 92 | github-code | 18 | [
{
"api_name": "maya.cmds.ls",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "maya.cmds",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "maya.cmds.ls",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "maya.cmds",
"line_number": 8,
... |
4887294567 | import numpy as np
import h5py
from tqdm.auto import trange
import torch
from torch_geometric.utils import dense_to_sparse
def load_data(dpath):
X, y = [],[]
with h5py.File(dpath, "r") as handle:
input = handle['input']
Hs = input["channel_to_noise_matched"]
Plin = 10**(np.asarray(inpu... | bl166/usca_power_control | dataset.py | dataset.py | py | 2,551 | python | en | code | 11 | github-code | 18 | [
{
"api_name": "h5py.File",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch_geometric.utils.dense_to_sparse",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.f... |
39521913362 | import pickle
import platform
import subprocess
from django.conf import settings
from django.core.files import File
def get_system_config():
sysconfig = {}
os = platform.system()
if os == "Linux":
command = "cat /proc/cpuinfo"
cpu_info = subprocess.check_output(command, shell=True).strip... | curioswati-zz/crypt-analyzer | cryptanalyzer/base/utils/utils.py | utils.py | py | 1,472 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "platform.system",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "subprocess.check_output",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "subprocess.check_output",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "platf... |
32287586240 | import json
from collections import defaultdict
import pandas as pd
from responsibly.dataset import COMPASDataset, GermanDataset
from sklearn.preprocessing import LabelEncoder
'''class DatasetType(Enum):
"""
Enumeration of the Datasets under consideration.
Values represent the sensitive attributes for eac... | kailashkarthik9/causal-fairness | datasets/dataset.py | dataset.py | py | 5,186 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "json.loads",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "responsibly.dataset.COMPASDataset",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "responsibly.dataset.GermanDataset",
"line_number": 26,
"usage_type": "call"
},
{
"ap... |
11201622949 | """
Definition of events that can be sent on the game
"""
import enum
__author__ = "Benjamin Schubert <ben.c.schubert@gmail.com>"
@enum.unique
class Event(enum.IntEnum):
"""
Enumeration of all events valid in the game
"""
ERROR = 0
TOKEN = 1
GAME_INFO = 2
STATE = 3
FOOD = 4
DEATH... | BenjaminSchubert/HEIG_2016_GEN_project | game_server/phagocyte_game_server/events.py | events.py | py | 613 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "enum.IntEnum",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "enum.unique",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "enum.IntEnum",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "enum.unique",
... |
73609399081 | import pygame
import imgui
from Framework.Vector import vec2
from GameObject import GameObject
from Tilemap import TileTypes
class PlayerTilemapFree(GameObject):
def __init__(self, tilePosition, sprite, animationFrames, tilemap):
super().__init__( vec2( 0, 0 ), sprite, animationFrames[0] )
self.an... | JimmyLord/PythonFramework | Source/PlayerTilemapFree.py | PlayerTilemapFree.py | py | 4,941 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "GameObject.GameObject",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "Framework.Vector.vec2",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pygame.KEYDOWN",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "pygame... |
25216872732 | # https://leetcode.com/problems/largest-plus-sign/
# tags: #array, #dp
#
# Great explanation at:
# https://leetcode.com/problems/largest-plus-sign/discuss/1453636/Intuitiveor-Explained-with-image-or-Short-and-Clean-or-C%2B%2B
#
# Another explanation:
# https://leetcode.com/problems/largest-plus-sign/discuss/113314/Java... | ronelzb/leetcode | dynamic_programming/0764_largest_plus_sign.py | 0764_largest_plus_sign.py | py | 2,301 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "typing.List",
"line_number": 26,
"usage_type": "name"
}
] |
5982269752 | from django.urls import path
from django.urls import re_path
from .views import (
OrderListView,
OrderDetailView,
VerifyOwnership
)
urlpatterns = [
path('', OrderListView.as_view(), name="list"),
path('endpoint/verify/ownership/', VerifyOwnership.as_view(), name="verify-ownership"),
re_path(r'^(?P<order_... | mustafadalga/e-commerce | orders/urls.py | urls.py | py | 388 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "django.urls.path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "views.OrderListView.as_view",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "views.OrderListView",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "djan... |
75266932199 | # -*- coding: utf-8 -*-
"""
Gives functions related to LaTeX generation.
Created on Fri Apr 16 18:43:50 2021
@author: Joachim Favre & Alberts Reisons
"""
from datetime import datetime
import os
MONTHS = ["January", "February", "March", "April", "May", "June", "July",
"August", "September", "Octob... | JoachimFavre/PyMaTex | latex_gestion.py | latex_gestion.py | py | 6,773 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "datetime.datetime.now",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "os.system",
"line_number": 187,
"usage_type": "call"
},
{
"api_name": "os.system",
"l... |
26890493808 | import pymysql
from datetime import datetime,timedelta,date
import requests
import json
import time
from threading import Thread
from flask import Flask, request, jsonify, json
from flask_api import status
from flask_cors import CORS, cross_origin
from flask import Blueprint
from flask_restplus import Api, Re... | sutandra-coder/myelsa | demo_onboarding.py | demo_onboarding.py | py | 10,738 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Flask",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.Blueprint",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flask_restplus.Api",
... |
24863062502 | import math
import os
import cv2
import numpy as np
import sympy as smpy
def compute(image):
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
image = cv2.rotate(image, cv2.ROTATE_90_COUNTERCLOCKWISE)
(minVal, maxVal, minLoc, (x, y)) = cv2.minMaxLoc(image)
return x, y, maxVal
class Point:
def _... | diademiemi/wled-scanner | scanner/calculator/point.py | point.py | py | 3,824 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "cv2.cvtColor",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "cv2.rotate",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.ROTATE_90_COUNTER... |
13354935744 | import glob
import os
import random
import shutil
import sys
from datetime import timedelta, date
import numpy as np
import tensorflow as tf
sys.path.append("../")
from utils import utils
from load_criteo import loaddualattention
FLAGS = tf.flags.FLAGS
tf.flags.DEFINE_integer("num_threads", 16, "Number of threads")
t... | Jinjiarui/HEROES | DARNN/DARNN_criteo.py | DARNN_criteo.py | py | 23,152 | python | en | code | 3 | github-code | 18 | [
{
"api_name": "sys.path.append",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.flags",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.flags.... |
72956699240 | import matplotlib.pyplot as plt
import argparse
import logging # 디버그할 때 로그찍어주는 모듈
import cv2 # opencv 모듈
import numpy as np
import imutils
import math
import time
import sys
from ImageProcessing_py import utils
from ImageProcessing_py.detection.Detection import Detection
if __name__ == '__main__': # 플러그
parser ... | LimLight94/5Light_ImageProcessing | ImageProcessing_py/main.py | main.py | py | 5,958 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "loggin... |
42510430805 | from collections import OrderedDict
def write_roman(n):
romanos = OrderedDict()
romanos[1000] = "M"
romanos[900] = "CM"
romanos[500] = "D"
romanos[400] = "CD"
romanos[100] = "C"
romanos[90] = "XC"
romanos[50] = "L"
romanos[40] = "XL"
romanos[10] = "X"
romanos[9] = "IX"
... | guimaraesalves/material-python | Python/Python inicial/CadernoExercicios02/RomanNumeralsEncoder.py | RomanNumeralsEncoder.py | py | 642 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "collections.OrderedDict",
"line_number": 5,
"usage_type": "call"
}
] |
25653817421 | import pytest
from source_shopify.source import Orders
from source_shopify.utils import EagerlyCachedStreamState as stream_state_cache
# Define the Stream class for the test
STREAM = Orders(config={"authenticator": "token"})
@pytest.mark.parametrize(
"stream, cur_stream_state, latest_record, state_object, expect... | datasphere-oss/datasphere-databyte | airbyte-integrations/connectors/source-shopify/unit_tests/test_cached_stream_state.py | test_cached_stream_state.py | py | 2,601 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "source_shopify.source.Orders",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "source_shopify.utils.EagerlyCachedStreamState.stream_state_to_tmp",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "source_shopify.utils.EagerlyCachedStreamState",
... |
38540125233 | import pygame
from chess import Chess
from time import sleep
import numpy as np
import random
import sys
sys.setrecursionlimit(100)
env = Chess(window_size=800)
env.render()
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# ... | mhyrzt/Simple-MADRL-Chess | envtest.py | envtest.py | py | 888 | python | en | code | 8 | github-code | 18 | [
{
"api_name": "sys.setrecursionlimit",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "chess.Chess",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pygame.event.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pygame.event",
"... |
20393350428 | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd.variable import Variable
from .resnet import *
from .vgg import *
from .densenet import *
from .funcs import *
from .Network import *
import sys
import numpy as np
dim_dict = {
'densenet169': [64, 128, 256, 640, 1664],
'vg... | tiruss/PMNet | Models/Progressive_Unet.py | Progressive_Unet.py | py | 5,869 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "torch.nn.Module",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
34212507029 | import io
import sys
_INPUT = """\
3
3 4 5
4
4 5 6 8
15
"""
sys.stdin = io.StringIO(_INPUT)
n = int(input())
a = list(map(int, input().split()))
m = int(input())
b = list(map(int, input().split()))
x = int(input())
dp = [False] * (x+1)
no = [True] * (x+1)
for i in b:
no[i] = False
dp[0] = True
for i in rang... | kkchart9/atcoder | Day_dir/0204.py | 0204.py | py | 480 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "sys.stdin",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "io.StringIO",
"line_number": 11,
"usage_type": "call"
}
] |
40332891944 | from spotipy.oauth2 import SpotifyOAuth
import os
import spotipy
def create_spotify_playlist(songs: list, date_to_use: str):
"""This function will create a Spotify playlist and add the songs in the songs list.
Required arguments: songs (list) and date_to_use (string in the format YYYY-MM-DD)."""
... | York13Pud/python-100-days-of-code | days-040-to-049/day-046-spotify-playlist/v2/create_spotify_playlist.py | create_spotify_playlist.py | py | 3,922 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "os.environ.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_... |
35874372963 | #!/usr/bin/env python3
import sys
import logging
import PIL.Image
import PIL.ImageDraw
import PIL.ImageTk
# GUI
import tkinter as tk
import tkinter.font as tkFont
# OSM
import smopy
# GPS
import pynmea2
class GPSMap(tk.Frame):
zoom = 13
font = None
spdLabel = None
mapLabel = None
lastGpsPosition ... | BikeAtor/WoMoAtor | src/main/python/gps/gpsmap.py | gpsmap.py | py | 8,047 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "tkinter.Frame",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "tkinter.Frame.__init__",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "tkinter.Frame",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "PIL.Imag... |
12558803344 | import os
import sys
sys.path.append(os.path.abspath(os.path.dirname(os.getcwd())))
from AFC.dataloader_afc import IceLoader
from torch.utils.data import Dataset, DataLoader
import argparse
from tqdm import tqdm
from tqdm.contrib import tzip
from model.audio_visual_model_incremental import IncreAudioVisualNet
import t... | weiguoPian/AV-CIL_ICCV2023 | AFC/train_incremental_afc.py | train_incremental_afc.py | py | 27,759 | python | en | code | 12 | github-code | 18 | [
{
"api_name": "sys.path.append",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
35056521431 | from contextlib import contextmanager
from pathlib import Path
from unittest.mock import patch
import tempfile
import pytest
from cohortextractor.cohortextractor import list_study_definitions
@contextmanager
def dummy_repo_folder(with_definition=True):
with tempfile.TemporaryDirectory() as tmpdir:
folde... | alexwalkerepi/cohort-extractor | tests/test_cohortextractor.py | test_cohortextractor.py | py | 1,115 | python | en | code | null | github-code | 18 | [
{
"api_name": "tempfile.TemporaryDirectory",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "contextlib.contextmanager",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "py... |
40884939224 | from torchvision.datasets.utils import list_dir
from torchvision.datasets.folder import make_dataset
from torchvision.datasets.video_utils import VideoClips
from torchvision.datasets import VisionDataset
import os
import torch
class Kinetics400(VisionDataset):
"""
`Kinetics-400 <https://deepmind.com/research/o... | tinapan-pt/VideoMoCo | dataset/kinetics.py | kinetics.py | py | 3,813 | python | en | code | 135 | github-code | 18 | [
{
"api_name": "torchvision.datasets.VisionDataset",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torchvision.datasets.utils.list_dir",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "torchvision.datasets.folder.make_dataset",
"line_number": 47,
"usag... |
21100360444 | import os
import sys
from dataclasses import dataclass
from itertools import product
import kernel_explorer as ke
import numpy as np
import pytest
from utils import get_gemm_basic_sizes, get_gemm_bert_sizes, get_gemm_bound, matmul, transab_to_suffix
max_batch_size = int(os.environ.get("KERNEL_EXPLORER_BATCHED_GEMM_MA... | microsoft/onnxruntime | onnxruntime/python/tools/kernel_explorer/kernels/strided_batched_gemm_test.py | strided_batched_gemm_test.py | py | 9,549 | python | en | code | 9,700 | github-code | 18 | [
{
"api_name": "os.environ.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.seed",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"... |
8938598755 | #!/usr/bin/python3
from subprocess import PIPE, CalledProcessError, Popen, TimeoutExpired
from subprocess import run as sub_run
import logging
import os
import shutil
import shlex
import signal
from concurrent.futures import ThreadPoolExecutor, wait
try:
import click
except ImportError as e:
if 'No module name... | abcnet/CS4750-coding1 | simulator-tool.py | simulator-tool.py | py | 7,523 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "subprocess.run",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
... |
72061202919 | import multiprocessing
import pandas as pd
import os
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
def get_de... | omercngoktas/glassdoor-job-scraper-multiprocessing | get_jobs.py | get_jobs.py | py | 8,551 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "selenium.webdriver.common.by.By.XPATH",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.common.by.By",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.support.ui.WebDriverWait",
"line_number": 13,
... |
14774362593 | from sqlalchemy import (
Table,
MetaData,
Column,
Integer,
String,
DateTime,
Boolean,
)
from sqlalchemy.engine import create_engine
from sqlalchemy.orm import mapper, relationship
from domain.model import Birthday, GroupConfig, GroupHour, Staff
import config
metadata = MetaD... | CleoStoat/birthdaysbot | adapters/orm.py | orm.py | py | 1,315 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "sqlalchemy.MetaData",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Table",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Int... |
72143124199 | import aiohttp
from userge import Config, Message, logging, pool, userge
NEKOBIN_URL = "https://nekobin.com/"
_LEVELS = {
"debug": logging.DEBUG,
"info": logging.INFO,
"warning": logging.WARNING,
"error": logging.ERROR,
"critical": logging.CRITICAL,
}
@userge.on_cmd(
"logs",
about={
... | code-rgb/USERGE-X | userge/plugins/tools/logs.py | logs.py | py | 3,254 | python | en | code | 130 | github-code | 18 | [
{
"api_name": "userge.logging.DEBUG",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "userge.logging",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "userge.logging.INFO",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "userge... |
3565840137 | from flask import request
from flask_socketio import emit
from app import db
from app.models.bro import Bro
from json import loads
from sqlalchemy import func
import random
from app.models.bro_bros import BroBros
from app.models.broup import Broup
from app.models.broup_message import BroupMessage
from datetime import ... | Grabot/BroCast-backend | app/sock/sock_add.py | sock_add.py | py | 10,587 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "app.models.bro.Bro.verify_auth_token",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "app.models.bro.Bro",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "app.models.bro.Bro.query.filter_by",
"line_number": 22,
"usage_type": "call"
},... |
4386882030 | from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need fine-tuning.
build_exe_options = {
"packages": ["os", "streamlit", "pyarrow"], # add other packages if needed
"excludes": [] # add packages you want to exclude if needed
}
base = None
setup(
name="Vouch... | Gene-Weaver/VoucherVisionEditor | setup.py | setup.py | py | 499 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "cx_Freeze.setup",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cx_Freeze.Executable",
"line_number": 16,
"usage_type": "call"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.