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
1398613154
""" Outlines the classes for submission. """ from django.db import models # The choices of every room as a constant building_choices = (('ALEXANDER', 'Alexander'), ('AMORY', 'Amory'), ('BUSINESSSCHOOLBUILDINGONE', 'Business School Building:One'), ('BYRNEHOUSE...
jjandrew/GroupEngineeringProjectGroup4
technical-documents/source-code/submission/models.py
models.py
py
5,016
python
en
code
0
github-code
6
[ { "api_name": "django.db.models.Model", "line_number": 71, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 71, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 80, "usage_type": "call" }, { "api_name"...
4554015495
#!/usr/local/bin/python3 import os import torch import torch.utils.data import torchvision.transforms as transforms import torch.optim as optim from torch.autograd import Variable import torch.nn as nn from utils import Data, pil_loader import numpy as np from models.resnet import resnet50 from PIL import Image def g...
soosiey/image-ranking
val_precision.py
val_precision.py
py
1,620
python
en
code
1
github-code
6
[ { "api_name": "utils.pil_loader", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.reshape", "line_number": 19, "usage_type": "call" }, { "api_name": "torchvision.transforms.Resize", "line_number": 23, "usage_type": "call" }, { "api_name": "torchvis...
5894114248
import torch from torch import nn from torch.nn import Conv2d, MaxPool2d, Flatten, Linear, Sequential from torch.utils.tensorboard import SummaryWriter class Tudui(nn.Module): def __init__(self): super(Tudui, self).__init__() self.model1 = Sequential( Conv2d(in_channels=3, out_channels...
TristanAlkaid/project
model/nn_seq.py
nn_seq.py
py
1,072
python
en
code
0
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 7, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.nn.Conv2d", ...
23987500861
import tensorflow as tf import numpy as np import pandas as pd import os from PIL import Image from tqdm import tqdm from keras.preprocessing.image import ImageDataGenerator from keras.utils import np_utils from keras.layers import Conv2D, MaxPool2D, Dense, BatchNormalization, Activation, GlobalAveragePooling2D fr...
sylarchen1389/Simple-cnn-node-for-barrel-colour-classification
scripts/CauctusNet.py
CauctusNet.py
py
4,261
python
en
code
1
github-code
6
[ { "api_name": "numpy.load", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path", "line_number": 27, "usage_type": "attribute" }, { "api_name": "numpy.load", "line_number": ...
24151617806
#!/usr/bin/env python3 import setuptools with open("README.md", "r") as f: long_description = f.read() setuptools.setup( name="animator", # Replace with your own username version="0.0.1", author="Ali Shannon", author_email="alishanoon@hotmail.com", description="An animation tool for python.", ...
techshot25/animator
setup.py
setup.py
py
781
python
en
code
1
github-code
6
[ { "api_name": "setuptools.setup", "line_number": 7, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 16, "usage_type": "call" } ]
70396780667
"""Mixins for evaluation and exploration. Author: Toshinori Kitamura Affiliation: NAIST & OSX """ from __future__ import annotations from typing import Dict, Tuple import distrax import gym import jax from chex import Array, PRNGKey import shinrl as srl from shinrl import Sample, collect_samples OBS, ACT, LOG_PROB ...
omron-sinicx/ShinRL
shinrl/solvers/base/base_mixin.py
base_mixin.py
py
5,931
python
en
code
42
github-code
6
[ { "api_name": "chex.Array", "line_number": 17, "usage_type": "name" }, { "api_name": "gym.Env", "line_number": 23, "usage_type": "attribute" }, { "api_name": "gym.wrappers", "line_number": 31, "usage_type": "attribute" }, { "api_name": "chex.PRNGKey", "line_nu...
32636735870
import logging import re import six from azure.graphrbac import GraphRbacManagementClient from c7n_azure.actions.base import AzureBaseAction from c7n_azure.provider import Azure from c7n_azure.provider import resources from c7n_azure.query import QueryResourceManager, DescribeSource from c7n_azure.session import Sessi...
LRuttenCN/cloud-custodian
tools/c7n_azure/c7n_azure/resources/access_control.py
access_control.py
py
7,401
python
en
code
1
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 21, "usage_type": "call" }, { "api_name": "c7n_azure.query.QueryResourceManager", "line_number": 25, "usage_type": "name" }, { "api_name": "c7n_azure.session.Session", "line_number": 44, "usage_type": "call" }, { "...
29833817666
import os import re import shutil import sys import zipfile def normalize(name): translit_dict = { 'а': 'a', 'б': 'b', 'в': 'v', 'г': 'h', 'ґ': 'g', 'д': 'd', 'е': 'e', 'є': 'ye', 'ж': 'zh', 'з': 'z', 'и': 'y', 'і': 'i', 'ї': 'i', 'й': 'i', 'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n', 'о...
DenK0-UA/GoIT_HW06
sort.py
sort.py
py
6,147
python
en
code
0
github-code
6
[ { "api_name": "re.sub", "line_number": 27, "usage_type": "call" }, { "api_name": "os.walk", "line_number": 33, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 35, "usage_type": "call" }, { "api_name": "os.path", "line_number": 35, "usa...
19450318250
""" Implementation specific for Single Frame CAN packets. This module contains implementation specific for :ref:`Single Frame <knowledge-base-can-single-frame>` packets - that includes :ref:`Single Frame Data Length (SF_DL) <knowledge-base-can-single-frame-data-length>` parameter. """ __all__ = ["CanSingleFrameHandle...
mdabrowski1990/uds
uds/can/single_frame.py
single_frame.py
py
24,420
python
en
code
62
github-code
6
[ { "api_name": "addressing_format.CanAddressingFormat", "line_number": 36, "usage_type": "name" }, { "api_name": "uds.utilities.RawBytesAlias", "line_number": 37, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 38, "usage_type": "name" }, { ...
31601537718
from library.views.bookDetail import BookDetailView from library.views.category import CategoryListView from django.urls import path,include from library.views import homepage,myBooks,contact,ContactFormView,extend_demand, borrow_demand, UpdateBookUpdateView,DeleteBookDeleteView, give_or_return_book,AddBookCreateView,...
yusuf-teker/django-library-management
library/urls.py
urls.py
py
1,334
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "library.views.homepage", "line_number": 8, "usage_type": "argument" }, { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "library.vie...
14575188165
""" from skimage.color import rgb2gray import numpy as np import cv2 import matplotlib.pyplot as plt from scipy import ndimage image = plt.imread('D:\careers\python-my-projects\django\project-code\django_project\server2\django_project\servAgri\output\msavi-image.png') image.shape plt.imshow(image) plt.show() gray = ...
AhmedB1a/satt-imagery
django_project/servAgri/imagesementation.py
imagesementation.py
py
3,946
python
en
code
1
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 73, "usage_type": "call" }, { "api_name": "osgeo.gdal.UseExceptions", "line_number": 80, "usage_type": "call" }, { "api_name": "osgeo.gdal", "line_number": 80, "usage_type": "name" }, { "api_name": "osgeo.gda...
25185419774
import logging import os.path import pandas as pd import numpy as np import gspread from gspread_dataframe import get_as_dataframe from itertools import product from tqdm import tqdm import seaborn as sns from io import StringIO class RarityTable: def __init__(self, raw_data: pd.DataFrame): self.__raw_data = raw_d...
thomaswinged/generative-notch
generative_notch/_deprecated/rarity_table.py
rarity_table.py
py
9,962
python
en
code
0
github-code
6
[ { "api_name": "pandas.DataFrame", "line_number": 14, "usage_type": "attribute" }, { "api_name": "pandas.DataFrame", "line_number": 19, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 20, "usage_type": "call" }, { "api_name": "pandas.DataFr...
12224577399
import seaborn as sns import matplotlib.pyplot as plt # Example FHIR records fhir_records = [ { "resourceType": "Observation", "code": { "coding": [ { "system": "http://loinc.org", "code": "72166-2", "display": ...
alpotapov/2023-fvm-dataverse
packages/bacalhau_job/analysis.py
analysis.py
py
2,060
python
en
code
0
github-code
6
[ { "api_name": "seaborn.scatterplot", "line_number": 79, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.xlabel", "line_number": 80, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 80, "usage_type": "name" }, { "api_name": "matplo...
27414399458
import gmpy2 import libnum import binascii from Cryptodome.Util.number import long_to_bytes def encrypt_Rsa(p, q, n, e, m): m = libnum.s2n(m) c = libnum.n2s(pow(m, e, n)) c = binascii.hexlify(c) return c def decrypt_Rsa(p, q, n, e, c): phi = (p - 1) * (q - 1) d = gmpy2.invert(...
iRurl/Ciphey
RSA/Rsa_npq.py
Rsa_npq.py
py
444
python
en
code
1
github-code
6
[ { "api_name": "libnum.s2n", "line_number": 8, "usage_type": "call" }, { "api_name": "libnum.n2s", "line_number": 9, "usage_type": "call" }, { "api_name": "binascii.hexlify", "line_number": 10, "usage_type": "call" }, { "api_name": "gmpy2.invert", "line_number"...
27009831458
import numpy as np import run as r ''' [id] 128 [name] orthogonal_mp [input] x_train 训练集 训练集标签数据集 二维数组 必须 定数 y_train 测试集 测试集数据集 二维数组 必须 定数 x_test 训练集标签 训练集标签标签 一维数组 必须 定数 y_test 测试集标签 测试集标签 一维数组 必须 定数 n_nonzero_coefs 非零条目数 默认为None,解决方案中所需的非零条目数。如果为None(默认),...
lisunshine1234/mlp-algorithm-python
machine_learning/regression/linear_models/orthogonal_mp/main.py
main.py
py
3,793
python
zh
code
0
github-code
6
[ { "api_name": "run.run", "line_number": 58, "usage_type": "call" }, { "api_name": "numpy.loadtxt", "line_number": 71, "usage_type": "call" }, { "api_name": "numpy.delete", "line_number": 75, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 83...
31068810234
from functools import total_ordering from util import Normalize from config import config import re import copy def rel_delta(a: float, theory: float): return (a-theory) / theory def CalMass(elements: dict[str, float], charge=0): mass = 0.000000 if len(elements) == 0: return mass for e in el...
RaoboXu/Lipidwizard
molecule.py
molecule.py
py
13,227
python
en
code
0
github-code
6
[ { "api_name": "config.config.ElementTable", "line_number": 17, "usage_type": "attribute" }, { "api_name": "config.config", "line_number": 17, "usage_type": "name" }, { "api_name": "config.config.E_MASS", "line_number": 18, "usage_type": "attribute" }, { "api_name"...
43124930130
""" Test API This module contains test cases for the calculator endpoint of the API. It utilizes the pytest framework and the FastAPI test client. """ import pytest from fastapi.testclient import TestClient from my_api import app client = TestClient(app) @pytest.mark.parametrize("value1, value2, operation, expecte...
JGattringer/fast_API
test_api.py
test_api.py
py
2,344
python
en
code
1
github-code
6
[ { "api_name": "fastapi.testclient.TestClient", "line_number": 12, "usage_type": "call" }, { "api_name": "my_api.app", "line_number": 12, "usage_type": "argument" }, { "api_name": "pytest.mark.parametrize", "line_number": 15, "usage_type": "call" }, { "api_name": "...
31481773542
from classNodo import Nodo from zope.interface import Interface from zope.interface import implementer from InterfaceLista import ILista from classNuevo import VehiculoNuevo from classUsado import VehiculoUsado from classVehiculo import Vehiculo @implementer(ILista) class Lista: __comienzo=None __act...
gercaballero/U3-EJERCICIO-6
classColeccion.py
classColeccion.py
py
5,683
python
es
code
0
github-code
6
[ { "api_name": "classNodo.Nodo", "line_number": 38, "usage_type": "call" }, { "api_name": "classNodo.Nodo", "line_number": 60, "usage_type": "call" }, { "api_name": "classUsado.VehiculoUsado", "line_number": 84, "usage_type": "argument" }, { "api_name": "classNuevo...
39830169774
import sys from collections import deque N, L, R = map(int, sys.stdin.readline().rstrip().split()) graph = [] moves = [[0, 1], [1, 0], [0, -1], [-1, 0]] for i in range(N): graph.append(list(map(int, sys.stdin.readline().rstrip().split()))) def bfs(i, j): queue = deque([[i, j]]) temp = [[i, j]] visit...
omg7152/CodingTestPractice
GraphTraversal/MovePopulation_16234.py
MovePopulation_16234.py
py
1,250
python
en
code
0
github-code
6
[ { "api_name": "sys.stdin.readline", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 4, "usage_type": "attribute" }, { "api_name": "sys.stdin.readline", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.stdin", "li...
70746936508
import OpenGL.GL as GL import numpy as np from tremor.graphics import shaders from tremor.graphics.shaders import MeshProgram from tremor.graphics.surfaces import Material from tremor.loader.texture_loading import TEXTURE_TABLE from tremor.math.transform import Transform class Mesh: def __init__(self): s...
a-bainbridge/tremor
tremor/graphics/mesh.py
mesh.py
py
3,337
python
en
code
0
github-code
6
[ { "api_name": "OpenGL.GL.glGenVertexArrays", "line_number": 13, "usage_type": "call" }, { "api_name": "OpenGL.GL", "line_number": 13, "usage_type": "name" }, { "api_name": "tremor.graphics.shaders.MeshProgram", "line_number": 14, "usage_type": "name" }, { "api_nam...
30685525471
import unittest from unittest.mock import Mock from aiologger.filters import StdoutFilter, Filter, Filterer from aiologger.levels import LogLevel from tests.utils import make_log_record class FilterTests(unittest.TestCase): def test_filter_allows_records_with_name_equal_to_filter_name(self): filter = Fil...
async-worker/aiologger
tests/test_filters.py
test_filters.py
py
4,616
python
en
code
114
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 9, "usage_type": "attribute" }, { "api_name": "aiologger.filters.Filter", "line_number": 11, "usage_type": "call" }, { "api_name": "tests.utils.make_log_record", "line_number": 12, "usage_type": "call" }, { "api_na...
18918096332
import sys from .utils import skip_projects_except BAD_COMMAND = "not-a-name" @skip_projects_except("script") def test_run_unknown_script(ape_cli, runner, project): result = runner.invoke(ape_cli, ["run", BAD_COMMAND]) assert result.exit_code == 2 assert f"No such command '{BAD_COMMAND}'." in result.out...
ApeWorX/ape
tests/integration/cli/test_run.py
test_run.py
py
5,925
python
en
code
736
github-code
6
[ { "api_name": "utils.skip_projects_except", "line_number": 8, "usage_type": "call" }, { "api_name": "utils.skip_projects_except", "line_number": 15, "usage_type": "call" }, { "api_name": "utils.skip_projects_except", "line_number": 36, "usage_type": "call" }, { "a...
3477184290
import argparse import json import logging import os from funcy import first from dvc.cli import completion from dvc.cli.command import CmdBase from dvc.cli.utils import append_doc_link, fix_subparsers from dvc.exceptions import DvcException from dvc.ui import ui from dvc.utils import format_link logger = logging.ge...
gshanko125298/Prompt-Engineering-In-context-learning-with-GPT-3-and-LLMs
myenve/Lib/site-packages/dvc/commands/plots.py
plots.py
py
13,885
python
en
code
3
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 15, "usage_type": "call" }, { "api_name": "dvc.render.convert.to_json", "line_number": 22, "usage_type": "call" }, { "api_name": "dvc.ui.ui.write_json", "line_number": 24, "usage_type": "call" }, { "api_name": "dvc...
35322012226
import time import torch import random import numpy as np import torch.nn.functional as F import torch.optim as optim from models.mgat import MGAT from models.mgcn import MGCN from utils.util import accuracy, fmeasure, rlap, prediction, \ expand_index from utils.input_data import load_data, encode_onehot from train...
lorenzozangari/ML_GNN
training/train.py
train.py
py
9,262
python
en
code
0
github-code
6
[ { "api_name": "models.mgat.MGAT", "line_number": 22, "usage_type": "call" }, { "api_name": "torch.nn.functional.elu", "line_number": 23, "usage_type": "attribute" }, { "api_name": "torch.nn.functional", "line_number": 23, "usage_type": "name" }, { "api_name": "mod...
7789716967
from model import MNISTClassifier from aermanager import LiveDv import torch from sinabs.from_torch import from_model IMG_SIZE = 64 live = LiveDv(qlen=64, two_channel_mode=False, host='192.168.11.72') model_analog = MNISTClassifier() model_analog.load_state_dict(torch.load('models/l1-fanout-qtrain_1662224.4079924966.p...
fgr1986/synoploss
mnist_dvs/live.py
live.py
py
1,015
python
en
code
0
github-code
6
[ { "api_name": "aermanager.LiveDv", "line_number": 7, "usage_type": "call" }, { "api_name": "model.MNISTClassifier", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.load", "line_number": 9, "usage_type": "call" }, { "api_name": "sinabs.from_torch.fro...
11859272636
import logging from time import time from typing import Any from pandas import DataFrame from freqtrade.freqai.data_kitchen import FreqaiDataKitchen from freqtrade.freqai.freqai_interface import IFreqaiModel logger = logging.getLogger(__name__) class BaseTensorFlowModel(IFreqaiModel): """ Base class for T...
robcaulk/freqai
freqtrade/freqai/base_models/BaseTensorFlowModel.py
BaseTensorFlowModel.py
py
2,572
python
en
code
42
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "freqtrade.freqai.freqai_interface.IFreqaiModel", "line_number": 14, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 21, "usage_type": "name" }, { ...
17585499964
from django.http import HttpResponse from user_login.views import authentication from django.http import JsonResponse, HttpResponse from django.db.models import Q from .models import Images def index(request): return HttpResponse("Hello, world. You're at the manage image index.") # 添加新的镜像 def create_image(reque...
hjq133/daishuju
mysite/manage_image/views.py
views.py
py
2,117
python
en
code
0
github-code
6
[ { "api_name": "django.http.HttpResponse", "line_number": 9, "usage_type": "call" }, { "api_name": "user_login.views.authentication", "line_number": 15, "usage_type": "call" }, { "api_name": "django.http.HttpResponse", "line_number": 17, "usage_type": "call" }, { "...
11592010452
import os import sys import time import colorama from os import system from time import sleep from colorama import * from colorama import Back, Fore, Style import threading , tls_client , requests from twocaptcha import TwoCaptcha solver = TwoCaptcha('ENTER YOUR 2CAPTCHA DEVELOPER API KEY') w = Fore.WHITE b = Fore.BL...
RojanGamingYT/Discord-Username-Sniper
Old Versions/v2/discord.py
discord.py
py
7,247
python
en
code
78
github-code
6
[ { "api_name": "twocaptcha.TwoCaptcha", "line_number": 12, "usage_type": "call" }, { "api_name": "colorama.Fore.WHITE", "line_number": 14, "usage_type": "attribute" }, { "api_name": "colorama.Fore", "line_number": 14, "usage_type": "name" }, { "api_name": "colorama...
39732278033
# from mainapp.models import Deal, Stage # from api_v1.serializers import DealSerializer import logging import datetime from . import bitrix24 from ..models import Task, TaskTitle from . import params logger_success = logging.getLogger('success') logger_success.setLevel(logging.INFO) fh_success = logging.handlers.T...
Oleg-Sl/007_bx24_task_event_handler
changingtasks/api_v2/services/service_func.py
service_func.py
py
15,843
python
ru
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 13, "usage_type": "attribute" }, { "api_name": "logging.handlers.TimedRotatingFileHandler", "line_number": 14, "usage_type": "call" }, { "api...
23225092989
#!/usr/bin/python3 import sys, selectors, socket, time, random, serial sys.path.append("../core") from message import Message ser = serial.Serial("/dev/ttyACM0", 57600) #purge buffer while ser.in_waiting > 0: ser.read() sel = selectors.DefaultSelector() sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s...
kholland4/hab
nodes-iface/iface-serial.py
iface-serial.py
py
1,084
python
en
code
0
github-code
6
[ { "api_name": "sys.path.append", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "serial.Serial", "line_number": 6, "usage_type": "call" }, { "api_name": "selectors.DefaultSelector", ...
74173613628
from cloud import upload_blob, delete_blob, delete_bucket_content, delete_bucket, check_bucket_exist, create_bucket, bucket_name import os import json import pathlib #import voice import os import re def sorted_alphanumeric(data): convert = lambda text: int(text) if text.isdigit() else text.lower() alphanum_k...
yann-furrer/Tiktok_video_generator
script/import_bucket.py
import_bucket.py
py
1,523
python
en
code
0
github-code
6
[ { "api_name": "re.split", "line_number": 10, "usage_type": "call" }, { "api_name": "os.getcwd", "line_number": 14, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 24,...
19880739659
import cv2 import sys import os nRows = 8 # Number of columns mCols = 8 # Reading image img = cv2.imread('/home/shobhik/Mini_proj_chess/images/chess.jpg') #print img #cv2.imshow('image',img) # Dimensions of the image sizeX = img.shape[1] sizeY = img.shape[0] for i in range(0,nRows): for j in range(0, mCol...
s-bray/Chess-Board-Split-up
slice_2.py
slice_2.py
py
1,050
python
en
code
1
github-code
6
[ { "api_name": "cv2.imread", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.imwrite", "line_number": 30, "usage_type": "call" }, { "api_name": "cv2.imwrite", "line_number": 32, "usage_type": "call" }, { "api_name": "cv2.imwrite", "line_number": 3...
26372008360
import os import torch from torch.utils.data import Dataset import gensim import numpy as np from transformers import BertTokenizer,BertTokenizerFast def build_vocab(config): ''' get the vocab from train, val ,test return the word2id(python dict), id2word(python list), word_cnt ''' word2id = {'PAD'...
hour01/NLP-Beginner
Named Entity Recognition/code/preprocess.py
preprocess.py
py
11,386
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "gensim.models.KeyedVectors.load_word2vec_format", "line_number": 34, "usage_type": "call" }, { "api_nam...
33487674331
import PyPDF2 import nltk from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from nltk.stem import PorterStemmer import functools ##### ------------ Pre-Processing -----------------------##### ## configure stemmer ps = PorterStemmer() ## configure stop words for programs stop_word...
deepak140596/ExtractKeywords
keywordExtract.py
keywordExtract.py
py
1,614
python
en
code
0
github-code
6
[ { "api_name": "nltk.stem.PorterStemmer", "line_number": 11, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords.words", "line_number": 14, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords", "line_number": 14, "usage_type": "name" }, { "api_nam...
2422884448
""" Recipe Admin Registration """ from django.contrib import admin from .models import Recipe # Register your models here. class RecipeAdmin(admin.ModelAdmin): """ Fixing a custom admin panel """ list_display = ( 'name', 'category', 'price', ) admin.site.register(Recipe, ...
SaintHuddini/Pizza-house
orders/admin.py
admin.py
py
333
python
en
code
0
github-code
6
[ { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 9, "usage_type": "name" }, { "api_name": "django.contrib.admin.site.register", "line_number": 20, "usage_type": "call" },...
5340401958
import pyrebase from pyfcm import FCMNotification import os # load in API keys with open('API_keys/db_key.key', 'r') as key_file: db_key = key_file.read().replace('\n', '') with open('API_keys/fcm_key.key', 'r') as key_file: fcm_key = key_file.read().replace('\n', '') config = { "apiKey": db_key, "authDo...
SimonIlic/project-psychic-waffle
server-client/client.py
client.py
py
1,984
python
en
code
0
github-code
6
[ { "api_name": "pyrebase.initialize_app", "line_number": 20, "usage_type": "call" }, { "api_name": "pyfcm.FCMNotification", "line_number": 21, "usage_type": "call" } ]
10587631629
import requests from tkinter import * api_key = "3a60b2730b06fee2b625c0fc91997344" url = "http://data.fixer.io/api/latest?access_key=" + api_key def show_entry_fields(): # print("First Currency: %s\nSecond Currency: %s" % (e1.get(), e2.get())) first_currency = e1.get() second_currency = e2.get(...
xramm57/my-first-Python-converter
currency2.py
currency2.py
py
1,714
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 47, "usage_type": "call" } ]
72117326588
# -*- coding: utf-8 -*- """ Created on Mon Jan 31 13:51:25 2022 @author: Thoma """ import pandas as pd from twilio.rest import Client ACCOUNT_SID = 'x' AUTH_TOKEN = 'x' TWILIO_NUMBER = 'x' FILE_NAME = 'users.csv' def retrieve_entry(file_name: str) -> list: ''' Returns top row of csv and mov...
ThomasWarford/py_rota
py_rota.py
py_rota.py
py
1,230
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 29, "usage_type": "call" }, { "api_name": "twilio.rest.Client", "line_number": 40, "usage_type": "call" } ]
15404138500
import sys from torchtext import data from torch import save TEXT = data.Field(lower=True,init_token="<start>",eos_token="<end>") LABELS = data.Field() train, val, test = data.TabularDataset.splits( path='kdata', train='_train.tsv', validation='_dev.tsv', test='_test.tsv', format='tsv', fields=[('text', T...
rikkarikka/nn_math_solver
k_data/preprocess.py
preprocess.py
py
579
python
en
code
0
github-code
6
[ { "api_name": "torchtext.data.Field", "line_number": 5, "usage_type": "call" }, { "api_name": "torchtext.data", "line_number": 5, "usage_type": "name" }, { "api_name": "torchtext.data.Field", "line_number": 6, "usage_type": "call" }, { "api_name": "torchtext.data"...
20989049247
import praw import time def handle_rate_limit(exc: praw.exceptions.RedditAPIException) -> None: error_words = str(exc).lower().split() if 'minutes' in error_words: sleepy_time = error_words[error_words.index('minutes')-1] print("Sleeping for " + str(sleepy_time) + " minutes") ...
nilavenkat/BernieBot
make_posts.py
make_posts.py
py
2,652
python
en
code
0
github-code
6
[ { "api_name": "praw.exceptions", "line_number": 5, "usage_type": "attribute" }, { "api_name": "time.sleep", "line_number": 10, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 14, "usage_type": "call" }, { "api_name": "praw.Reddit", "line_num...
32585956781
import hou import os import shutil from PySide2 import QtGui, QtWidgets, QtCore,QtUiTools from PySide2.QtWidgets import QApplication, QMainWindow, QWidget, QGridLayout, QPushButton from PySide2.QtGui import QIcon, QPixmap uifile = "E:/Work/python_dev/QT_project_launcher/qt_ui_files/hou_tools_ui/cache_collector.ui" ...
karanfx/Glacier_Pipeline_Tools
tools/houdini/collect_caches.py
collect_caches.py
py
7,159
python
en
code
1
github-code
6
[ { "api_name": "PySide2.QtWidgets.QWidget", "line_number": 12, "usage_type": "attribute" }, { "api_name": "PySide2.QtWidgets", "line_number": 12, "usage_type": "name" }, { "api_name": "PySide2.QtUiTools.QUiLoader", "line_number": 15, "usage_type": "call" }, { "api_...
26776960920
"""Unit tests for the Pyflakes plugin.""" import argparse import os import subprocess import mock from yapsy.PluginManager import PluginManager import statick_tool from statick_tool.config import Config from statick_tool.package import Package from statick_tool.plugin_context import PluginContext from statick_tool.pl...
sscpac/statick
tests/plugins/tool/pyflakes_tool_plugin/test_pyflakes_tool_plugin.py
test_pyflakes_tool_plugin.py
py
5,734
python
en
code
66
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 20, "usage_type": "call" }, { "api_name": "statick_tool.resources.Resources", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 23, "usage_type": "call" }, { "api_name": ...
35001108609
import torch.nn as nn import torch.nn.functional as F from src.extractors import EXTRCT_REGISTRY from . import MODEL_REGISTRY from .abstract import ClsBase from src.utils.losses import FocalLoss class ClassifyBlock(nn.Module): def __init__(self, inp_dim, num_cls, embed_dim=1024) -> None: super().__init__...
nhtlongcs/AIC2022-VER
src/models/srl.py
srl.py
py
2,588
python
en
code
10
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 10, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 10, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_number": 13, "usage_type": "call" }, { "api_name": "torch.nn", "lin...
28969830133
""" Dataitem module. """ from __future__ import annotations import typing from typing import Self from sdk.entities.base.entity import Entity from sdk.entities.dataitem.metadata import build_metadata from sdk.entities.dataitem.spec import build_spec from sdk.entities.utils.utils import get_uiid from sdk.utils.api imp...
trubbio83/core
sdk/sdk/entities/dataitem/entity.py
entity.py
py
10,113
python
en
code
0
github-code
6
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 19, "usage_type": "attribute" }, { "api_name": "sdk.entities.base.entity.Entity", "line_number": 26, "usage_type": "name" }, { "api_name": "sdk.entities.dataitem.metadata.DataitemMetadata", "line_number": 36, "usage_typ...
17560794893
from django.db import IntegrityError from scrapy.exceptions import DropItem from app.models import Product, ProductVendorDetails class ProductManager: @staticmethod def update_with_item(product, item): product.name = item.get('name') product.reference = item.get('reference') product.im...
adhess/offer-tn-backend
ecommerce_scraper/ecommerce_scraper/entity_managers.py
entity_managers.py
py
3,009
python
en
code
2
github-code
6
[ { "api_name": "app.models.Product.objects.filter", "line_number": 17, "usage_type": "call" }, { "api_name": "app.models.Product.objects", "line_number": 17, "usage_type": "attribute" }, { "api_name": "app.models.Product", "line_number": 17, "usage_type": "name" }, { ...
20655631888
""" @author Zack Meyer """ import os import pybel import openbabel import addH import LigandChargeFinder import ChangeCharge class MethylSub: def __init__(self, mol, bond_iter, num_atom): self.mol = mol self.bond_iter = bond_iter self.num_atom = num_atom self.metal_ind = 0 ...
DanielEss-lab/PolyjuicePotion
MethylSub.py
MethylSub.py
py
7,615
python
en
code
2
github-code
6
[ { "api_name": "openbabel.OBAtomBondIter", "line_number": 32, "usage_type": "call" }, { "api_name": "LigandChargeFinder.LigandChargeFinder", "line_number": 35, "usage_type": "call" }, { "api_name": "openbabel.OBAtomBondIter", "line_number": 74, "usage_type": "call" }, ...
2839363771
from flask import Flask, render_template from mysqlconnection import MySQLConnection app = Flask(__name__) @app.route('/') def home(): conn = MySQLConnection('taskdb') conn.log_requests() result = conn.query_db() conn.close() return render_template('index.html', data=result) if __name__=="__main__": app.run() ...
ranriy/python_task
server.py
server.py
py
321
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 4, "usage_type": "call" }, { "api_name": "mysqlconnection.MySQLConnection", "line_number": 8, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 12, "usage_type": "call" } ]
35412560360
from sklearn.decomposition import NMF import pandas as pd def feature_vectors(corpus, kwargs=None): """Multinomial and TF-IDF representations Paramaters ---------- corpus : array-like A collection of documents kwargs : dict, default None Keyword arguments of variable length ...
policyglot/topic_models_dating
nmf_utils.py
nmf_utils.py
py
2,298
python
en
code
2
github-code
6
[ { "api_name": "pandas.Series", "line_number": 27, "usage_type": "attribute" }, { "api_name": "sklearn.decomposition.NMF", "line_number": 50, "usage_type": "call" }, { "api_name": "sklearn.decomposition.NMF", "line_number": 80, "usage_type": "call" } ]
33658223064
from django.urls import path, include from dictionary_app.accounts.views import LoginView, RegisterView, SignOutView, UserEditView, UserDeleteView urlpatterns = ( path('', LoginView.as_view(redirect_authenticated_user=True), name='login'), path('register/', RegisterView.as_view(), name='register'), path('...
Taner940706/dictionary-app
dictionary_app/dictionary_app/accounts/urls.py
urls.py
py
555
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "dictionary_app.accounts.views.LoginView.as_view", "line_number": 6, "usage_type": "call" }, { "api_name": "dictionary_app.accounts.views.LoginView", "line_number": 6, "usage_type": ...
38452055882
from itertools import combinations import sys input = sys.stdin.readline n,k = map(int,input().split()) words = [set(list(input().rstrip())) for _ in range(n)] N = [chr(i+97) for i in range(26)] always = ["a","n","t","i","c"] for i in always: N.remove(i) comb = combinations(N,k-5) maxWord = 0 print(words) for c...
LightPotato99/baekjoon
bitmask/teaching.py
teaching.py
py
482
python
en
code
0
github-code
6
[ { "api_name": "sys.stdin", "line_number": 3, "usage_type": "attribute" }, { "api_name": "itertools.combinations", "line_number": 12, "usage_type": "call" } ]
12114459605
"""Activity set definitions for OpenPack dataset. """ from dataclasses import dataclass from logging import getLogger from typing import Tuple, Union import numpy as np logger = getLogger(__name__) @dataclass class ActClass(): """dataclass that represent a single activity class. """ id: int name: st...
open-pack/openpack-toolkit
openpack_toolkit/activity/__init__.py
__init__.py
py
5,338
python
en
code
6
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "dataclasses.dataclass", "line_number": 12, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 27, "usage_type": "name" }, { "api_name": "typing.Union", ...
10698672256
#! /usr/bin/env python3 ''' The Flex Transpiler. Usage: flex_transpiler <source> -l <lang> [-o <output>] flex_transpiler -h Arguments: <source> Path to the input Flex source file. Options: -l <lang>, --target-language <lang> The target language to transpile to. -o <output>, --output <output> ...
Flex-lang/transpiler
transpiler/flex_transpiler.py
flex_transpiler.py
py
3,199
python
en
code
25
github-code
6
[ { "api_name": "re.compile", "line_number": 30, "usage_type": "call" }, { "api_name": "docopt.docopt", "line_number": 60, "usage_type": "call" }, { "api_name": "rasa_nlu.model.Interpreter.load", "line_number": 74, "usage_type": "call" }, { "api_name": "rasa_nlu.mod...
23552960883
######################################################################### # File Name: getCommonRepeat.py # Author: yanbo # mail: liyanbotop@163.com # Created Time: Tue 18 Jun 2019 09:49:33 AEST ######################################################################### #!/bin/bash import collections from Bio import Seq...
yanboANU/VariationCalling
libprism/evaluate/getCommonRepeat.py
getCommonRepeat.py
py
2,019
python
en
code
1
github-code
6
[ { "api_name": "sys.argv", "line_number": 22, "usage_type": "attribute" }, { "api_name": "Bio.SeqIO.read", "line_number": 24, "usage_type": "call" }, { "api_name": "Bio.SeqIO", "line_number": 24, "usage_type": "name" }, { "api_name": "sys.argv", "line_number": ...
2975999557
import pandas as pd from openpyxl import load_workbook import dateAndTimeGenerator import os # TODO: appending seasons and holiday happens here. write the code and # change the file name into addPoliceAndHolidayData.py later """ to use this code first you need to have both traffic and police data in same folder just...
BlueSoheil99/myRoadSafetyCodes
addPoliceData.py
addPoliceData.py
py
4,588
python
en
code
0
github-code
6
[ { "api_name": "os.listdir", "line_number": 22, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 29, "usage_type": "call" }, { "api_name": "pandas.read_excel", "line_number": 38, "usage_type": "call" }, { "api_name": "dateAndTimeGenerator.get_full...
33688437095
import dash import dash_table import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import pandas as pd import plotly.graph_objs as go import dropbox # Step 1. Launch the application app = dash.Dash() server=app.server # Step 2. Import the dataset ...
yogeshkumarmangal/Dashboard
apps.py
apps.py
py
3,465
python
en
code
0
github-code
6
[ { "api_name": "dash.Dash", "line_number": 10, "usage_type": "call" }, { "api_name": "dropbox.Dropbox", "line_number": 13, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 26, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line...
19329109543
import pygame pygame.init() WIDTH = 900 HEIGHT = 600 screen = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption("마지막 프로젝트 Python Pong") font20 = pygame.Font(None, 20) clock = pygame.Clock() class Paddle: def __init__(self, x, y, width, height, speed, color): self.x = x self.y = ...
narilee2006/pong
main.py
main.py
py
3,899
python
en
code
0
github-code
6
[ { "api_name": "pygame.init", "line_number": 3, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 6, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 6, "usage_type": "attribute" }, { "api_name": "pygame.display.s...
72324819069
import os import sys import shutil import subprocess import webbrowser import zipfile from PIL import Image from utils.androidImageSize import androidIslemListesi from utils.iOSImageSize import iOSIslemListesi, klasorPath from utils.toZip import zipdir imagePath = '/Users/avdisx/PycharmProjects/iconGenerator/iconImag...
avdisx/Android-iOS-IconGenerator
main.py
main.py
py
1,842
python
tr
code
0
github-code
6
[ { "api_name": "PIL.Image.open", "line_number": 14, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 14, "usage_type": "name" }, { "api_name": "utils.androidImageSize.androidIslemListesi", "line_number": 17, "usage_type": "name" }, { "api_name": "o...
28565087310
import os import os.path import json import subprocess import time from datetime import datetime import pytz import re import warnings # Read json data file into dictionary if it exists, return filled or empty dictionary def read_existing(filepath): dataObj = {} if not os.path.isfile(filepath): print("No existing...
uccross/uccross.github.io
explore/scripts/helpers.py
helpers.py
py
7,152
python
en
code
15
github-code
6
[ { "api_name": "os.path.isfile", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "json.loads", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_num...
6401773739
''' T3 COMP9331 YUAN GAO z5239220 ''' import socket import threading import json import sys import os import time import FTclient import FTserver class Client: """ Client """ def __init__(self, addr, port_num): """ init: :param addr: IP address :param port_num: Po...
YuanG1944/COMP9331-Computer-Networks-and-Applications
9331 Ass/Client.py
Client.py
py
12,497
python
en
code
4
github-code
6
[ { "api_name": "socket.socket", "line_number": 29, "usage_type": "call" }, { "api_name": "socket.AF_INET", "line_number": 29, "usage_type": "attribute" }, { "api_name": "socket.SOCK_STREAM", "line_number": 29, "usage_type": "attribute" }, { "api_name": "json.loads"...
43622219786
import asyncio from datetime import date, datetime from fastapi import APIRouter, Query from fastapi_cache.decorator import cache from starlette import status from app.exceptions import BookingLimitExceededException, DateBookingException from app.hotels.dao import HotelDAO from app.hotels.rooms.dao import RoomDAO fro...
SeleznevIlya/FastAPI_booking
app/hotels/router.py
router.py
py
1,826
python
en
code
0
github-code
6
[ { "api_name": "fastapi.APIRouter", "line_number": 14, "usage_type": "call" }, { "api_name": "app.hotels.dao.HotelDAO.find_all", "line_number": 22, "usage_type": "call" }, { "api_name": "app.hotels.dao.HotelDAO", "line_number": 22, "usage_type": "name" }, { "api_na...
19932616378
import errno import getpass import json import logging import subprocess import tempfile from .base import ClusterJob, JobStatus, Scheduler logger = logging.getLogger(__name__) def _parse_status(s): if s in ["PEND", "WAIT"]: return JobStatus.queued elif s == "RUN": return JobStatus.active ...
shandave/signac-flow
flow/scheduling/lsf.py
lsf.py
py
4,269
python
en
code
null
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "base.JobStatus.queued", "line_number": 15, "usage_type": "attribute" }, { "api_name": "base.JobStatus", "line_number": 15, "usage_type": "name" }, { "api_name": "base.JobS...
29840819855
import glob from os.path import basename import pandas as pd from tensorflow import keras from tools import keras_tools # The different targest and their number of classes output_classes = {'dominant_cover' : 6, 'crop_type' : 8, 'crop_status' : 7} results_file = './data/v...
sdtaylor/PhenocamCNN2
apply_keras_model.py
apply_keras_model.py
py
2,156
python
en
code
0
github-code
6
[ { "api_name": "tensorflow.keras.models.load_model", "line_number": 16, "usage_type": "call" }, { "api_name": "tensorflow.keras.models", "line_number": 16, "usage_type": "attribute" }, { "api_name": "tensorflow.keras", "line_number": 16, "usage_type": "name" }, { "...
72112923069
import numpy as np import matplotlib.pyplot as plt import torch torch.manual_seed(0) import torch.nn.functional as F import torch.nn as nn # import snntorch import pandas as pd import tqdm import argparse from . import step_func class P_SNU(nn.Module): def __init__(self,input_neuron,output_neuron,l_tau,soft = Fals...
GTAKAGI/PSNN
snn_model/p_snu_layer.py
p_snu_layer.py
py
3,128
python
en
code
0
github-code
6
[ { "api_name": "torch.manual_seed", "line_number": 4, "usage_type": "call" }, { "api_name": "torch.nn.Module", "line_number": 13, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 13, "usage_type": "name" }, { "api_name": "torch.float", "lin...
18844484413
import time import datetime import calendar import xml.dom.minidom import cherrypy from openerp import rpc from openerp import tools from openerp.utils import TinyDict from openerp.widgets import JSLink, CSSLink from openerp.widgets.interface import TinyWidget from base import ICalendar from base import TinyCalenda...
xrg/openerp-client-web
openerp/widgets/tinycalendar/widgets.py
widgets.py
py
12,930
python
en
code
3
github-code
6
[ { "api_name": "openerp.widgets.interface.TinyWidget", "line_number": 23, "usage_type": "name" }, { "api_name": "utils.Month", "line_number": 36, "usage_type": "call" }, { "api_name": "openerp.widgets.interface.TinyWidget", "line_number": 41, "usage_type": "name" }, { ...
72530772029
import numpy as np from gym import spaces def get_size_space(space): """ Get the total dimension of a space Args: space: Instance of gym.Spaces """ if isinstance(space, spaces.Tuple): num = 1 for sub_space in space.spaces: num *= sub_space.n return num ...
emiliojorge/ATRLDM
Project/simulation.py
simulation.py
py
3,122
python
en
code
0
github-code
6
[ { "api_name": "gym.spaces.Tuple", "line_number": 12, "usage_type": "attribute" }, { "api_name": "gym.spaces", "line_number": 12, "usage_type": "name" }, { "api_name": "gym.spaces.Discrete", "line_number": 18, "usage_type": "attribute" }, { "api_name": "gym.spaces"...
27674468700
from yolact import Yolact from utils.augmentations import FastBaseTransform from utils import timer from utils.functions import SavePath from layers.output_utils import postprocess, undo_image_transformation from data import cfg, set_cfg import numpy as np import torch import torch.backends.cudnn as cudnn import argp...
COMEDU-AI/Aloha
eval_image.py
eval_image.py
py
6,481
python
en
code
1
github-code
6
[ { "api_name": "transformer.TransformerNetwork", "line_number": 31, "usage_type": "call" }, { "api_name": "torch.load", "line_number": 32, "usage_type": "call" }, { "api_name": "style_utils.itot", "line_number": 35, "usage_type": "call" }, { "api_name": "style_util...
42936140546
import sqlite3 import xlrd db = sqlite3.connect('clients.db') cur = db.cursor() try: cur.execute("DROP TABLE client;") except: print("client table does not exist") cur.execute("""CREATE TABLE client( code INTEGER NOT NULL, name TEXT NOT NULL, primary key ...
Centari2013/PublicCoversheetGeneratorTest
cc_db_setup.py
cc_db_setup.py
py
741
python
en
code
0
github-code
6
[ { "api_name": "sqlite3.connect", "line_number": 4, "usage_type": "call" }, { "api_name": "xlrd.open_workbook", "line_number": 18, "usage_type": "call" } ]
28757481423
import csv import os import re from concurrent import futures from pathlib import Path import boto3 import botocore from tqdm import tqdm from .. import utils from .classes import load_openimages_classes def download_and_convert_OpenImages(dir="datasets/OpenImages", reset=False): """Download and convert the Ope...
Motivation-and-Behaviour/SquareEyes
src/data/openimages.py
openimages.py
py
5,211
python
en
code
0
github-code
6
[ { "api_name": "pathlib.Path", "line_number": 25, "usage_type": "call" }, { "api_name": "classes.load_openimages_classes", "line_number": 26, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path.isf...
39747309704
from pprint import pprint from typing import Dict, Tuple, Union import numpy as np import tensorflow as tf import tensorflow_addons as tfa from .default import Default class Simple(Default): def __init__( self, constraints: Dict[str, Union[float, int]], random_generator: Union[tf.random.Generato...
lucasdavid/tf-experiment
src/core/datasets/augment/simple.py
simple.py
py
1,851
python
en
code
0
github-code
6
[ { "api_name": "default.Default", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.Union", "line_num...
36561841302
""" handler.py This file contains the class for the handler logic of the transaction processor for the blocked family in Hyperledger Sawtooth. """ import logging import cbor from sawtooth_sdk.processor.exceptions import InvalidTransaction from sawtooth_sdk.processor.handler import TransactionHandler from addressing ...
caramelomartins/Blocked
processor/handler.py
handler.py
py
4,933
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 15, "usage_type": "call" }, { "api_name": "sawtooth_sdk.processor.handler.TransactionHandler", "line_number": 18, "usage_type": "name" }, { "api_name": "addressing.addresser.FAMILY_NAME", "line_number": 22, "usage_type": "...
26318318535
from sklearn.metrics import precision_score from sklearn.metrics import recall_score from sklearn.metrics import f1_score from sklearn.metrics import confusion_matrix import tensorflow as tf import numpy as np import random import re import collections from nltk.tokenize import WordPunctTokenizer tokenizer = WordPunct...
rahulpatchigolla/EventDetection
Other_Arguement/Argument.py
Argument.py
py
7,095
python
en
code
0
github-code
6
[ { "api_name": "nltk.tokenize.WordPunctTokenizer", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.env...
14702793699
import torch as tor import torch.nn as nn import matplotlib.pyplot as plt import numpy as np nperClust = 100 blur = 1.25 C = [5, 5] A = [0, 5] B = [2, 1] clsA = [ A[0] + np.random.randn(nperClust) * blur, A[1] + np.random.randn(nperClust) * blur, ] clsB = [ B[0] + np.random.randn(nperClust) * blur, B[1...
faheempa/Deep_learning
ANN/multiClassification.py
multiClassification.py
py
2,870
python
en
code
0
github-code
6
[ { "api_name": "numpy.random.randn", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 12, "usage_type": "attribute" }, { "api_name": "numpy.random.randn", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.random"...
21514952391
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name = "syllo", version = "0.0.1", author = "Kevin DeMarco", author_email = "kevin.demarco@gmail.com", description = ("Random python modules"), license = "MIT",...
SyllogismRXS/python-syllo
setup.py
setup.py
py
699
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 5, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_n...
5068254777
#崩壊型ギブスサンプリング import numpy as np import matplotlib.pyplot as plt from scipy.stats import nbinom import math np.random.seed(1103) def logsumexp(X): # \log(\sum_{i=1}^{N}\exp(x_i)) max_x = np.max(X, axis=1).reshape(-1, 1) return np.log(np.sum(np.exp(X - max_x), axis=1).reshape(-1, 1)) + max_x def cmb(n, ...
imoken1122/Bayesian-inference
Bayesian_Poisson_Mixture_Model/collapsed_gibbs_sampling.py
collapsed_gibbs_sampling.py
py
2,206
python
en
code
0
github-code
6
[ { "api_name": "numpy.random.seed", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 8, "usage_type": "attribute" }, { "api_name": "numpy.max", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.log", "line_num...
42202612521
import argparse import pathlib import shutil import os class VerifierTool: def __init__(self, toolpath: str, file: pathlib.Path, args): self.toolpath = toolpath self.args = args self.file = file def call_str(self): return "{0} {1} {2}".format(self.toolpath, ' '.join(self.args)...
ftsrg/gazer
scripts/testreduce.py
testreduce.py
py
7,739
python
en
code
19
github-code
6
[ { "api_name": "pathlib.Path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_number": 73, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_number": 149, "usage_type": "call" }, { "api_name": "pathlib.Path", "...
11406825396
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Mar 31 17:42:28 2023 @author: matthewmcmurry """ import pandas as pd import datetime from datetime import datetime as dt import numpy as np path = '/path/to/folder' df = pd.read_csv('/path/to/file.csv') import datetime import calendar def generate_t...
mcm711/Reddit-NLP-Project
Scripts/Reddit CSV Segmentation.py
Reddit CSV Segmentation.py
py
1,384
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 15, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 22, "usage_type": "name" }, { "api_name": "calendar.timegm", "line_number": 23, "usage_type": "call" }, { "api_name": "datetime.datetime.u...
11566686718
# Servidor import socket import pickle from utils.tp5 import dataCallsSched, dataDirLayout, dataPidLayout from utils.tp6 import tp6Data from utils.tp7 import tp7Data from utils.geral import dataGeral from utils.rede1 import dataRede1 from utils.disco import dataDisco from utils.memoria import dataMemoria from utils.CP...
yurigaldino/SysInfo-INFNET
Servidor.py
Servidor.py
py
3,164
python
pt
code
0
github-code
6
[ { "api_name": "socket.socket", "line_number": 15, "usage_type": "call" }, { "api_name": "socket.AF_INET", "line_number": 15, "usage_type": "attribute" }, { "api_name": "socket.SOCK_STREAM", "line_number": 15, "usage_type": "attribute" }, { "api_name": "socket.geth...
29186929162
from skimage.transform import resize from skimage.io import imread import pickle from tqdm import tqdm import numpy as np import torch import os from glob import glob from ..utils import rotation_converter class Dataset(torch.utils.data.Dataset): def __init__(self, path, subject, image_size=512, white_bg=False, ...
yfeng95/DELTA
lib/dataset/body_video.py
body_video.py
py
10,017
python
en
code
175
github-code
6
[ { "api_name": "torch.utils", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path", "line_number": 29, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line...
5033709797
import requests import json from datetime import datetime group_name = "Sarkozy" now = datetime.now() dt_formated = now.strftime("%Y-%m-%dT%H:%M:%S") status = "open" url = 'http://127.0.0.1:8000/event/list/' data = { "date_event": dt_formated, "group_name": group_name, "status": status} headers = { '...
davidbarat/P13
raspberry/send_signal.py
send_signal.py
py
499
python
en
code
0
github-code
6
[ { "api_name": "datetime.datetime.now", "line_number": 7, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 7, "usage_type": "name" }, { "api_name": "requests.post", "line_number": 20, "usage_type": "call" }, { "api_name": "json.dumps", ...
71168447547
# Documentation at https://github.com/thunlp/OpenPrompt # Install the following required packages as needed # import openprompt import torch # import numpy # import scipy # import scikit-learn # import spacy from openprompt.data_utils import InputExample from openprompt.plms import load_plm from openprompt.prompts im...
MaxColeman1415/NLP_fall2023
main.py
main.py
py
2,204
python
en
code
0
github-code
6
[ { "api_name": "openprompt.data_utils.InputExample", "line_number": 23, "usage_type": "call" }, { "api_name": "openprompt.data_utils.InputExample", "line_number": 26, "usage_type": "call" }, { "api_name": "openprompt.plms.load_plm", "line_number": 36, "usage_type": "call" ...
17417331812
# /** # * @author shaowinw & GPT # * @email shaowinw@geophyai.com # * @create date 2023-04-29 17:34:55 # * @modify date 2023-04-29 17:34:55 # * @desc [Autoencoder for denoising <supervised>] # */ import torch import torch.nn as nn class ConvAutoencoder(nn.Module): def __init__(self): super(ConvAutoe...
GeophyAI/gptandme
autoencoder.py
autoencoder.py
py
3,239
python
en
code
0
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 12, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.nn", "lin...
72532284349
# pylint: disable=no-value-for-parameter # pylint: disable=redefined-outer-name # pylint: disable=unused-argument # pylint: disable=unused-variable import json import logging import os from copy import deepcopy from pathlib import Path from typing import Any, AsyncIterable, Iterable from unittest.mock import AsyncMock...
ITISFoundation/osparc-simcore
services/director-v2/tests/conftest.py
conftest.py
py
8,738
python
en
code
35
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 50, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 57, "usage_type": "name" }, { "api_name": "pytest.fixture", "line_number": 56, "usage_type": "call" }, { "api_name": "pathlib.Path", "lin...
4701319944
import sqlite3 conn = sqlite3.connect('test.db') curs = conn.cursor() # curs.execute( """CREATE TABLE accounts( id INTEGER PRIMARY KEY AUTOINCREMENT, username STRING UNIQUE NOT NULL, password STRING NOT NULL)""" ) curs.close() conn.close()
tsubamon55/logintest
dbsetup.py
dbsetup.py
py
250
python
en
code
0
github-code
6
[ { "api_name": "sqlite3.connect", "line_number": 3, "usage_type": "call" } ]
21308161376
import os import sys import shutil import tqdm sys.path.append(os.path.join(os.path.dirname(__file__), "../..")) from src.utils.preprocessing import preprocess_folder from src.utils.augmentation import create_folds, create_folds_, augment_folds, randomcrop_folds, get_spectrum_for_cnn from src.utils.modify_folders imp...
nkdnnlr/TEMDefectClassification
src/utils/run_preprocessing.py
run_preprocessing.py
py
3,819
python
en
code
1
github-code
6
[ { "api_name": "sys.path.append", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number": ...
72143860348
# Recuerden que solo pedimos implementar bubble sort o insertion sort. # si el ejercicio no acalara que pueden utilizar las funciones de sort propias de Python # por default deben asumir que no pueden utilizarlas y deben implementar sus propias formas de sort. from typing import List def sort_list(a_list: List) -> ...
levensworth/udesa-pc-tutorial
2022-a/2-sequences/solutions/warmup/ejercicio_8.py
ejercicio_8.py
py
594
python
es
code
2
github-code
6
[ { "api_name": "typing.List", "line_number": 9, "usage_type": "name" } ]
10174447744
# import logging import click import twitter from dynaconf import settings from utils import write_tweets_to_csv api = twitter.Api( consumer_key=settings.CONSUMER_KEY, consumer_secret=settings.CONSUMER_SECRET, access_token_key=settings.ACCESS_TOKEN_KEY, access_token_secret=settings.ACCESS_TOKEN_SECRE...
vbarboza/aybabtu
src/fetch.py
fetch.py
py
1,573
python
en
code
0
github-code
6
[ { "api_name": "twitter.Api", "line_number": 9, "usage_type": "call" }, { "api_name": "dynaconf.settings.CONSUMER_KEY", "line_number": 10, "usage_type": "attribute" }, { "api_name": "dynaconf.settings", "line_number": 10, "usage_type": "name" }, { "api_name": "dyna...
18860309680
# źródło danych [https://www.kaggle.com/c/titanic/](https://www.kaggle.com/c/titanic) import streamlit as st import pickle from datetime import datetime startTime = datetime.now() # import znanych nam bibliotek app_title = "Titanic App" filename = "model.sv" model = pickle.load(open(filename,'rb')) # otwieramy wcześn...
mykyta-vyshniakov/pum-lab05
app1.py
app1.py
py
2,073
python
en
code
0
github-code
6
[ { "api_name": "datetime.datetime.now", "line_number": 6, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 6, "usage_type": "name" }, { "api_name": "pickle.load", "line_number": 11, "usage_type": "call" }, { "api_name": "streamlit.set_page_...
10839671178
# #animated_color_wheel_1.py # # >>>>>>>>>>>>>>>>>>>>>>> # from Tkinter import * # root = Tk() # root.title("Animated Color Wheel") # cw = 300 # canvas width # ch = 300 # canvas height # canvas_1 = Canvas(root, width=cw, height=ch, background="b...
tlprotzman/dorm-automation
GraphicClient/colorwheel.py
colorwheel.py
py
1,754
python
en
code
0
github-code
6
[ { "api_name": "numpy.sqrt", "line_number": 52, "usage_type": "call" }, { "api_name": "numpy.arctan2", "line_number": 55, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 55, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number...
8434639132
import requests import json from langchain.llms import OpenAI from langchain.chains.llm_symbolic_math.base import LLMSymbolicMathChain from langchain import PromptTemplate from fastapi import FastAPI from langchain import LLMMathChain from fastapi import FastAPI app = FastAPI() llm = OpenAI(temperature=0.2, openai_ap...
anash08/python_endpoint
test.py
test.py
py
1,255
python
en
code
0
github-code
6
[ { "api_name": "fastapi.FastAPI", "line_number": 10, "usage_type": "call" }, { "api_name": "langchain.llms.OpenAI", "line_number": 12, "usage_type": "call" }, { "api_name": "langchain.LLMMathChain.from_llm", "line_number": 13, "usage_type": "call" }, { "api_name": ...
2018663598
from numpy.core.multiarray import ndarray from pymongo import MongoClient import numpy as np import matplotlib.pyplot as plt import sklearn import time import datetime as dt import pandas as pd import seaborn as sns pd.set_option('display.max_columns', None) import warnings warnings.filterwarnings("ignore") # functio...
lcb42/Third_Year_Project
preprocessing.py
preprocessing.py
py
22,864
python
en
code
0
github-code
6
[ { "api_name": "pandas.set_option", "line_number": 10, "usage_type": "call" }, { "api_name": "warnings.filterwarnings", "line_number": 12, "usage_type": "call" }, { "api_name": "pymongo.MongoClient", "line_number": 151, "usage_type": "call" }, { "api_name": "numpy....
24473478883
import pygame from pygame.mixer import Sound, get_init, pre_init from ImpossibleArcade.Games.Pong.pong import Pong from ImpossibleArcade.Games.note import Note from ImpossibleArcade.Games.note_generator import Note_Generator pong = Pong() game_intensity = 1 note_gen = Note_Generator() pre_init(44100, -16, 1, 1024) p...
SamuelSchmidgall/ImpossibleArcade
ImpossibleArcade/Games/Pong/test_pong_music.py
test_pong_music.py
py
1,828
python
en
code
2
github-code
6
[ { "api_name": "ImpossibleArcade.Games.Pong.pong.Pong", "line_number": 8, "usage_type": "call" }, { "api_name": "ImpossibleArcade.Games.note_generator.Note_Generator", "line_number": 11, "usage_type": "call" }, { "api_name": "pygame.mixer.pre_init", "line_number": 12, "usa...
19157347549
import requests from src.user_class import * from uuid import uuid1 class ExerciseClass: def __init__(self, now, user_class): self.user_profile = user_class self.time = now self.return_results = [] self.query_results = {} self.user = self.user_profile.get_user_id() ...
bearhudson/Tracker1
src/exercise_digester.py
exercise_digester.py
py
3,722
python
en
code
0
github-code
6
[ { "api_name": "requests.post", "line_number": 35, "usage_type": "call" }, { "api_name": "requests.exceptions", "line_number": 36, "usage_type": "attribute" }, { "api_name": "uuid.uuid1", "line_number": 61, "usage_type": "call" } ]
16565064559
from ansible.inventory.data import InventoryData from ansible.inventory.manager import InventoryManager from ansible.module_utils.six import string_types, iteritems from web.models import HostModel, InvGroup from ansible.inventory.host import Host from ansible.inventory.group import Group import json from django.core....
penghu2/web-ansible
web/service/ansible_service/OdinInventory.py
OdinInventory.py
py
3,373
python
en
code
0
github-code
6
[ { "api_name": "ansible.inventory.data.InventoryData", "line_number": 12, "usage_type": "name" }, { "api_name": "ansible.inventory.host.Host", "line_number": 19, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 24, "usage_type": "call" }, { "api_n...
24794231903
from django import template from django.db.models import Count from django.urls import reverse_lazy from django.shortcuts import redirect from django.views.generic import TemplateView from django.views.generic.edit import FormView, CreateView, DeleteView from django.views.generic.list import ListView from django...
EFZR/Django_Authentication_UserManagement
website/views.py
views.py
py
6,645
python
en
code
0
github-code
6
[ { "api_name": "django.contrib.auth.mixins.UserPassesTestMixin", "line_number": 18, "usage_type": "name" }, { "api_name": "django.views.generic.TemplateView", "line_number": 18, "usage_type": "name" }, { "api_name": "website.models.Post.objects.all", "line_number": 24, "us...
360418410
from django.http import JsonResponse import re class ApiOrder(): @staticmethod def validate_order(order_dict, fields): errors = [] fields_dict = {} for field in fields: if field.name not in order_dict and field.is_required: errors.append(_no_field_error(fie...
kell18/metaorder
apps/api/models.py
models.py
py
1,562
python
en
code
0
github-code
6
[ { "api_name": "re.compile", "line_number": 16, "usage_type": "call" }, { "api_name": "django.http.JsonResponse", "line_number": 42, "usage_type": "call" }, { "api_name": "django.http.JsonResponse", "line_number": 46, "usage_type": "call" }, { "api_name": "django.h...
19671059611
import pandas as pd import tensorflow as tf import keras import os import numpy as np from keras import models, layers from keras import Input from keras.models import Model, load_model from keras.preprocessing.image import ImageDataGenerator from keras import optimizers, initializers, regularizers, metrics from keras...
gusals6804/plant_classification
resnet.py
resnet.py
py
8,816
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path", "line_number": 18, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 1...
72702714747
# https://zhuanlan.zhihu.com/p/642043155 import numpy as np import torch from torch import nn def torch_compare_fc(infeature, outfeature, bias, inputs, params, bias_params): network = nn.Linear(infeature, outfeature, bias).requires_grad_(True) cnt = 0 for i in network.parameters(): if cnt==0: ...
ZouJiu1/numpy_transformer
net/fullconnect.py
fullconnect.py
py
7,937
python
en
code
4
github-code
6
[ { "api_name": "torch.nn.Linear", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.from_numpy", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.from_numpy", "line_...
2916814250
# -*- coding: utf-8 -*- """ Created on Thu Dec 19 22:34:39 2019 @author: thisisbex """ import plotly.express as px from app import app, df, dbc, np, dcc, html, Input, Output stats_facilities_list = df['facility'].drop_duplicates().tolist() color_list = ['#56cc9d', '#6cc3d5', '#ffcf67', '#f3969a', '#78c2ad', '#ff7851...
becca-mayers/maternal-health-dashboard
pages/statistics.py
statistics.py
py
8,888
python
en
code
0
github-code
6
[ { "api_name": "app.df", "line_number": 11, "usage_type": "name" }, { "api_name": "app.df", "line_number": 13, "usage_type": "name" }, { "api_name": "app.html.Div", "line_number": 16, "usage_type": "call" }, { "api_name": "app.html", "line_number": 16, "usa...
39998905342
""" Example 2. Optimizing vertices. """ import argparse import glob import os import subprocess import chainer import chainer.functions as cf import numpy as np import scipy.misc import torch import tqdm from neurender.get_points_from_angles import get_points_from_angles_th from neurender.renderer_th import Renderer ...
hassony2/neural_renderer_pytorch
examples/example_2_th.py
example_2_th.py
py
4,234
python
en
code
0
github-code
6
[ { "api_name": "torch.nn", "line_number": 21, "usage_type": "attribute" }, { "api_name": "neurender.load_obj.load_obj", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.ones", "line_number": 31, "usage_type": "call" }, { "api_name": "torch.Tensor", ...
25182065234
import numpy as np from amical.tools import mas2rad def shiftFourier(Utable, Vtable, wl, C_in, x0, y0): """Shift the image (apply a phasor in Fourier space.""" u = Utable / wl v = Vtable / wl C_out = C_in * np.exp(-2j * np.pi * (u * x0 + v * y0)) return C_out def visUniformDisk(Utable, Vtable, ...
SAIL-Labs/AMICAL
amical/analysis/models.py
models.py
py
7,002
python
en
code
9
github-code
6
[ { "api_name": "numpy.exp", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 10, "usage_type": "attribute" }, { "api_name": "amical.tools.mas2rad", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_n...