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
40034683838
from flask import Flask, jsonify, render_template, redirect, make_response, json, request import os from joblib import load import subprocess # Tools to remove stopwords from tweets import nltk from nltk.corpus import stopwords nltk.download('stopwords') from nltk.tokenize import word_tokenize nltk.download('punkt') f...
michaelpkuhn/mediabias
app/app.py
app.py
py
5,474
python
en
code
2
github-code
1
[ { "api_name": "nltk.download", "line_number": 8, "usage_type": "call" }, { "api_name": "nltk.download", "line_number": 10, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords.words", "line_number": 26, "usage_type": "call" }, { "api_name": "nltk.corpus.st...
11502386278
from datetime import datetime AUTHOR = "pshchelo" SITEURL = "" SITENAME = "Bits and Pieces" SITETITLE = "" SITESUBTITLE = "" SITEDESCRIPTION = "" SITELOGO = "/images/avatar.jpg" FAVICON = "/images/favicon.ico" ROBOTS = "index, follow" PATH = "content" TIMEZONE = "Europe/Kiev" DEFAULT_LANG = "en" # Feed generation i...
pshchelo/pshchelo.github.io
pelicanconf.py
pelicanconf.py
py
1,780
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime.now", "line_number": 70, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 70, "usage_type": "name" } ]
39381247788
import requests import json from fastapi import FastAPI, Response, APIRouter from fastapi_versioning import VersionedFastAPI, version from pydantic import BaseModel app = FastAPI() router = APIRouter() all_routes =[] def get_routes(): reserved_routes = ["/openapi.json", "/docs", "/docs/oauth2-red...
dhiraj-v/CineStream
movie_rent_management/rent_movie.py
rent_movie.py
py
2,798
python
en
code
0
github-code
1
[ { "api_name": "fastapi.FastAPI", "line_number": 8, "usage_type": "call" }, { "api_name": "fastapi.APIRouter", "line_number": 10, "usage_type": "call" }, { "api_name": "fastapi_versioning.version", "line_number": 19, "usage_type": "name" }, { "api_name": "fastapi_v...
30260001066
"""Tests for our BaseStore interface.""" import datetime import mock import pytest from rush import limit_data from rush import stores def _test_must_be_implemented(method, args, kwargs={}): with pytest.raises(NotImplementedError): method(*args, **kwargs) def test_get_must_be_implemented(): """Ver...
sigmavirus24/rush
test/unit/test_stores_base.py
test_stores_base.py
py
1,741
python
en
code
54
github-code
1
[ { "api_name": "pytest.raises", "line_number": 12, "usage_type": "call" }, { "api_name": "rush.stores.BaseStore", "line_number": 18, "usage_type": "call" }, { "api_name": "rush.stores", "line_number": 18, "usage_type": "name" }, { "api_name": "rush.stores.BaseStore...
72515250915
import os import yt_dlp # DEPRECATED # def download_youtube_video_audio(url, dl_path): # yt = YouTube(url) # print(f"Grabbing audio from youtube video {yt.title}") # audio_stream = yt.streams.get_audio_only() # dl_filename = audio_stream.default_filename # audio_stream.download(dl_path) #...
astrooom/video-transcripter
download.py
download.py
py
891
python
en
code
0
github-code
1
[ { "api_name": "yt_dlp.YoutubeDL", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path", "line_number": 25, "usage_type": "attribute" } ]
74132449952
# Manage status of system: # APP_AVAILABLE: True with system is not available. Normally, just means db is being updated, but # could be something more drastic. import os from datetime import datetime, timedelta from time import time import redis redis_url = os.environ.get("REDIS_URL") if redis_url is None: redi...
cvickery/transfer_app
system_status.py
system_status.py
py
4,072
python
en
code
1
github-code
1
[ { "api_name": "os.environ.get", "line_number": 10, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "redis.from_url", "line_number": 13, "usage_type": "call" }, { "api_name": "datetime.datetime.now",...
35636025251
import os import sys dir=os.getcwd() dir_list=dir.split("/") loc=[i for i in range(0, len(dir_list)) if dir_list[i]=="General_electrochemistry"] source_list=dir_list[:loc[0]+1] + ["src"] source_loc=("/").join(source_list) sys.path.append(source_loc) from pints import plot from harmonics_plotter import harmonics import ...
HOLL95/General_electrochemistry
Theory/Numerics/sf_MCMC.py
sf_MCMC.py
py
9,043
python
en
code
2
github-code
1
[ { "api_name": "os.getcwd", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "scipy.interpolate.splrep", "...
42215493732
import os,re from math import * import numpy as np import matplotlib.patches as patches from matplotlib.figure import Figure from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas def cc_diagram(u_all,g_all,z_all,u,g,z,item,indices): fig = Figure() canvas = FigureCanvas(fig) ax = fig.add_axes(...
LejayChen/astro-python-script
cc_diagram.py
cc_diagram.py
py
1,065
python
en
code
0
github-code
1
[ { "api_name": "matplotlib.figure.Figure", "line_number": 9, "usage_type": "call" }, { "api_name": "matplotlib.backends.backend_agg.FigureCanvasAgg", "line_number": 10, "usage_type": "call" }, { "api_name": "matplotlib.patches.Polygon", "line_number": 24, "usage_type": "ca...
44622543396
from flask import jsonify from model.reservation import ReservationDAO from model.members import MembersDAO from model.user_schedule import UserScheduleDAO from model.room_schedule import RoomScheduleDAO from model.time_slot import TimeSlotDAO from controller.time_slot import BaseTimeSlot from model.reservation_schedul...
bermed28/Booking-System
backend/controller/reservation.py
reservation.py
py
14,154
python
en
code
5
github-code
1
[ { "api_name": "model.reservation.ReservationDAO", "line_number": 45, "usage_type": "call" }, { "api_name": "model.reservation_schedule.ReservationScheduleDAO", "line_number": 50, "usage_type": "call" }, { "api_name": "flask.jsonify", "line_number": 57, "usage_type": "call...
73572581474
""" This Script, provides useful custom losses to train BioAE network. """ import torch from torch.nn import Module from torch import Tensor import torch.nn.functional as F LAMBDA1 = 10 LAMBDA2 = 0.5 class AESSLoss(Module): """ Auto Encoder loss + lambda1 * Steady State (Sv) Loss + lambda2 * Parsimony Loss ...
Alef125/TranscriptomicsAutoEncoder
BioAE_Loss.py
BioAE_Loss.py
py
5,361
python
en
code
1
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 14, "usage_type": "name" }, { "api_name": "torch.Tensor", "line_number": 31, "usage_type": "name" }, { "api_name": "torch.Tensor", "line_number": 32, "usage_type": "name" }, { "api_name": "torch.nn.functional.l1_loss...
8523638989
import numpy as np from datetime import datetime import pickle from pathlib import Path import logging # nm.logging_setup(Path.cwd(), date.today()) _logger = logging.getLogger('pathfinding_logger') # from geometry import GridCell, GridMaze from nicpy import nic_misc def reconstruct_path(current_node): path,...
niceholgate/pathfinding
py_pathfinding/a_star.py
a_star.py
py
4,080
python
en
code
0
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "pathlib.Path.cwd", "line_number": 30, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 30, "usage_type": "name" }, { "api_name": "datetime.datetime.now...
73948794915
import matplotlib.pylab as plt import numpy as np from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes from mpl_toolkits.axes_grid1.inset_locator import mark_inset x1,y1,erry1 = np.loadtxt("paw_Stpa.dat", usecols=(0,1,2), unpack=True) x2,y2,erry2 = np.loadtxt("paw_Stpp.dat", usecols=(0,1,2), unpack=Tr...
broilo/PD-projects
BSG/PRD/St_BSG20mod_w002s.py
St_BSG20mod_w002s.py
py
3,916
python
en
code
0
github-code
1
[ { "api_name": "numpy.loadtxt", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.loadtxt", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.loadtxt", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.loadtxt", "line_num...
1880178367
from django.shortcuts import render from django.http import HttpResponse from neo4j import GraphDatabase import subprocess from rest_framework.views import APIView from rest_framework.response import Response #Authentication: from rest_framework.permissions import IsAuthenticated from rest_framework.authtoken.models i...
lorisj/mnote-parser
server/notes/views.py
views.py
py
6,815
python
en
code
0
github-code
1
[ { "api_name": "os.path.expanduser", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path", "line_number": 21, "usage_type": "attribute" }, { "api_name": "django.contrib.auth.models.User.objects.create_user", "line_number": 28, "usage_type": "call" }, { ...
38556612147
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import argparse import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.autograd import Variable from torch.utils.data import TensorDataset, DataLoader from torch.optim.lr_scheduler import StepLR import torchvision...
Michael5467/PyTorch
test_examples.py
test_examples.py
py
8,562
python
en
code
0
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 21, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 21, "usage_type": "name" }, { "api_name": "torch.nn.Linear", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.nn", "line_nu...
73128774755
# from django.http import HttpResponse # def detail(request, gig_name): # return HttpResponse("You're looking at gig %s." % gig_name) import pymongo from django.http import HttpResponse from django.template import loader def index(request): template = loader.get_template('index.html') client = pymongo.Mo...
emmyamanda/shakiraTickets
pages/views.py
views.py
py
973
python
en
code
0
github-code
1
[ { "api_name": "django.template.loader.get_template", "line_number": 11, "usage_type": "call" }, { "api_name": "django.template.loader", "line_number": 11, "usage_type": "name" }, { "api_name": "pymongo.MongoClient", "line_number": 12, "usage_type": "call" }, { "ap...
71092381475
from django.urls import path from .views import ( CreateDocumentView, EditDocumentView, ViewDocumentView, DeleteDocumentView, CompareVersionsView, DocumentListView, ) app_name = 'documents' urlpatterns = [ path('create/', CreateDocumentView.as_view(), name='create_document'), path('edi...
DanilMirosh/test_task_nsign
documents/urls.py
urls.py
py
736
python
en
code
0
github-code
1
[ { "api_name": "django.urls.path", "line_number": 14, "usage_type": "call" }, { "api_name": "views.CreateDocumentView.as_view", "line_number": 14, "usage_type": "call" }, { "api_name": "views.CreateDocumentView", "line_number": 14, "usage_type": "name" }, { "api_na...
75076051232
from flask_app import app from flask import render_template, redirect, request, session from flask_app.models.dojos import Dojo @app.route('/') def display_dojos(): all_dojos = Dojo.get_all_dojos() #print(all_dojos) return render_template('home.html',all_dojos = all_dojos) #add backin (): all_dojos = ...
jrxdriguez/Dojos_and_Ninjas_CRUD
dn_crud/flask_app/controllers/dojos_controller.py
dojos_controller.py
py
844
python
en
code
0
github-code
1
[ { "api_name": "flask_app.models.dojos.Dojo.get_all_dojos", "line_number": 8, "usage_type": "call" }, { "api_name": "flask_app.models.dojos.Dojo", "line_number": 8, "usage_type": "name" }, { "api_name": "flask.render_template", "line_number": 10, "usage_type": "call" }, ...
28427535581
import cv2 as cv import numpy as np # img=cv.imread('Resources/Photos/cat.jpg') # cv.imshow('Cat',img) blank=np.zeros((500,500,3),dtype='uint8') # cv.imshow('blank',blank) # blank[200:300,400:500]=0,255,0 # cv.imshow('green',blank) # blank[:]=0,0,255 # cv.imshow('green',blank) cv.rectangle(blank,(0,0),(250,250),(0,25...
samirsharma-github/OpenCV-FCC
draw.py
draw.py
py
616
python
en
code
0
github-code
1
[ { "api_name": "numpy.zeros", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.rectangle", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.rectangle", "line_number": 14, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number"...
28926277645
from flask import current_app, Blueprint, request, jsonify from views.api.dingtalk.UserHandler import DdUser api_dingtalk_program_user_blueprint = Blueprint('api_dingtalk_program_user_blueprint', __name__) @api_dingtalk_program_user_blueprint.route('/authUser/<string:method>', methods=['POST']) def get_auth_user(met...
porcupineyhairs/Python
FlaskServer/urls/api/dingtalk/program/user.py
user.py
py
1,170
python
en
code
0
github-code
1
[ { "api_name": "flask.Blueprint", "line_number": 4, "usage_type": "call" }, { "api_name": "flask.request.get_json", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.request", "line_number": 9, "usage_type": "name" }, { "api_name": "views.api.dingtalk....
14379276893
import numpy as np from ..utils import check_features, check_target from .linear_regression import LinearRegression class RidgeRegression(LinearRegression): """Linear regression with l2 regularization. Attributes: learning_rate: Rate of update for gradient descent at each iteration....
js-aguiar/stanford-cs229
src/estimator/linear_model/ridge_regression.py
ridge_regression.py
py
3,303
python
en
code
0
github-code
1
[ { "api_name": "linear_regression.LinearRegression", "line_number": 6, "usage_type": "name" }, { "api_name": "utils.check_features", "line_number": 41, "usage_type": "call" }, { "api_name": "utils.check_target", "line_number": 42, "usage_type": "call" }, { "api_nam...
17818312692
import json import os from .utils import create_oasis_url, download_files, get_report_params # get location of oasis_endpoints.json file FILE_DIR = os.path.dirname(os.path.realpath(__file__)) OASIS_ENDPOINTS_JSON = FILE_DIR + "/oasis_endpoints.json" def generate_test_oasis_urls(start=None, end=None, report_name=No...
seanchon/pyoasis
pyoasis/bulk_query_oasis.py
bulk_query_oasis.py
py
3,334
python
en
code
0
github-code
1
[ { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 8, "usage_type": "call" }, { "api_name": "utils.get_report_params", ...
31855921676
import csv import pandas as pd import requests import json import numpy as np with open("book.csv", newline="") as f: df = pd.read_csv( f, names=[ "book_id", "ISBN", "name", "author", "author_original", "translator", ...
jeff-901/bookstore
data/upload.py
upload.py
py
2,211
python
en
code
0
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 8, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 28, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 39, "usage_type": "call" }, { "api_name": "json.dumps", "line_n...
72895035873
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
CiscoSystems/avos
openstack_dashboard/dashboards/project/data_processing/cluster_templates/tabs.py
tabs.py
py
2,666
python
en
code
47
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 27, "usage_type": "call" }, { "api_name": "horizon.tabs.Tab", "line_number": 30, "usage_type": "attribute" }, { "api_name": "horizon.tabs", "line_number": 30, "usage_type": "name" }, { "api_name": "django.utils.tra...
24844966683
# -*- coding: utf-8 -*- """ Created on Mon Apr 5 16:56:07 2021 @author: Oscar Ferrante oscfer88@gmail.com """ import argparse import P01_maxwell_filtering import P02_find_bad_eeg import P03_artifact_annotation import P04_extract_events import P05_run_ica import P06_apply_ica import P07_make_epochs ...
Cogitate-consortium/cogitate-msp1
coglib/meeg/preprocessing/P99_run_preproc.py
P99_run_preproc.py
py
4,675
python
en
code
0
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 24, "usage_type": "call" }, { "api_name": "P01_maxwell_filtering.run_maxwell_filter", "line_number": 60, "usage_type": "call" }, { "api_name": "P02_find_bad_eeg.find_bad_eeg", "line_number": 65, "usage_type": "call" ...
42745851265
#!/usr/bin/env python """setup.py for fabric8-analytics-utils.""" from setuptools import setup, find_packages def get_requirements(): """Parse dependencies from 'requirements.in' file.""" with open('requirements.in') as fd: lines = fd.read().splitlines() requires = [] for line in line...
fabric8-analytics/fabric8-analytics-utils
setup.py
setup.py
py
807
python
en
code
0
github-code
1
[ { "api_name": "setuptools.setup", "line_number": 19, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 28, "usage_type": "call" } ]
23720605692
import math import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as init import numbers from einops import rearrange, repeat import torch.utils.checkpoint as checkpoint from timm.models.layers import DropPath, to_2tuple, trunc_normal_ import torch.nn.functional as F import math # f...
m-hmy/NTIRE2023_Dn50_MegNR
models/team20_megnr.py
team20_megnr.py
py
71,675
python
en
code
1
github-code
1
[ { "api_name": "einops.rearrange", "line_number": 21, "usage_type": "call" }, { "api_name": "einops.rearrange", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.nn.Module", "line_number": 26, "usage_type": "attribute" }, { "api_name": "torch.nn", ...
72915555235
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Dec 29 12:57:07 2020 @author: ariels The flow: 1. reading img file 2. reading json anotation file 3. reading json image bounding box from the file 4. transofming the image 5. transforming the bounding box according to image transfor...
arielsolomon/obj_detection_related
changing_image_perspective.py
changing_image_perspective.py
py
2,880
python
en
code
1
github-code
1
[ { "api_name": "json.load", "line_number": 31, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplot", "line_number": 36, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 36, "usage_type": "name" }, { "api_name": "matplotlib.pypl...
5300895343
import random from datetime import datetime, date, timezone, timedelta import time import os import tensorflow as tf gpus = tf.config.experimental.list_physical_devices('GPU') for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True) from prep import shapes_gen, coco_gen, save_shapes_image, shape_embed...
KoyenaPal/CS1430-FinalProj
code/main.py
main.py
py
4,973
python
en
code
0
github-code
1
[ { "api_name": "tensorflow.config.experimental.list_physical_devices", "line_number": 7, "usage_type": "call" }, { "api_name": "tensorflow.config", "line_number": 7, "usage_type": "attribute" }, { "api_name": "tensorflow.config.experimental.set_memory_growth", "line_number": 9...
39712018252
import argparse import logging.config import os from src.download import run_download from src.clean import run_clean from src.filter import run_filter from src.featurize import run_featurize from src.split import run_split from src.train import run_train from src.score import run_score from src.evaluate import run_ev...
lirongm/NYC-Taxi-Price-Estimator
run.py
run.py
py
8,905
python
en
code
0
github-code
1
[ { "api_name": "logging.config.config.fileConfig", "line_number": 17, "usage_type": "call" }, { "api_name": "logging.config.config", "line_number": 17, "usage_type": "attribute" }, { "api_name": "logging.config", "line_number": 17, "usage_type": "name" }, { "api_na...
71775421154
import pygame from jcspygm.core.JCSPyGm_Camera import JCSPyGm_Camera from jcspygm.core.JCSPyGm_GameObject import JCSPyGm_GameObject from jcspygm.managers.JCSPyGm_CollisionManager import JCSPyGm_CollisionManager from jcspygm.managers.JCSPyGm_SceneManager import JCSPyGm_SceneManager from jcspygm.managers.JCSPyGm_SoundMa...
jcs090218/JCSPyGm_Lib
jcspygm/examples/Player.py
Player.py
py
6,362
python
en
code
0
github-code
1
[ { "api_name": "jcspygm.core.JCSPyGm_GameObject.JCSPyGm_GameObject", "line_number": 13, "usage_type": "name" }, { "api_name": "jcspygm.core.JCSPyGm_Camera.JCSPyGm_Camera.get_instance", "line_number": 38, "usage_type": "call" }, { "api_name": "jcspygm.core.JCSPyGm_Camera.JCSPyGm_Ca...
32089809104
from django.urls import path from . import views from .views import BlogDestroyApi, BlogDetailApi, BlogListApi, BlogUpdateApi, BlogCreateApi urlpatterns = [ path('add/', BlogCreateApi.as_view(), name = "uploadBlog"), path('bloglist/', BlogListApi.as_view(), name = "blog_list"), path('blogUpdate/<int:pk...
Oswald-OSEI/BLOGAPP
blogProject/blogProjectApp/urls.py
urls.py
py
539
python
en
code
0
github-code
1
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "views.BlogCreateApi.as_view", "line_number": 6, "usage_type": "call" }, { "api_name": "views.BlogCreateApi", "line_number": 6, "usage_type": "name" }, { "api_name": "django....
10186392640
from tela.tela import Tela from datetime import datetime import PySimpleGUI as sg class TelaRelatorio(Tela): def __init__(self): self.__window = None def menu(self): layout = [ [sg.Text('Tela Relatório', font=("Helvica", 25))], [sg.Text('Escolha sua opção', font=("Helv...
VictorDouglasFernandes/pizzaria
tela/tela_relatorio.py
tela_relatorio.py
py
2,145
python
pt
code
0
github-code
1
[ { "api_name": "tela.tela.Tela", "line_number": 6, "usage_type": "name" }, { "api_name": "PySimpleGUI.Text", "line_number": 12, "usage_type": "call" }, { "api_name": "PySimpleGUI.Text", "line_number": 13, "usage_type": "call" }, { "api_name": "PySimpleGUI.Radio", ...
8980866357
import torch import torchvision from torch.utils.data import DataLoader from torchvision import datasets, transforms from torchvision import models import torch.nn as nn from torch.autograd import Variable model = models.vgg16(pretrained=True) model.classifier[6] = nn.Linear(in_features=4096, out_features=10, bias=Tru...
FukeKazki/STL10
hait_hackthon_精度確認用.py
hait_hackthon_精度確認用.py
py
1,875
python
en
code
0
github-code
1
[ { "api_name": "torchvision.models.vgg16", "line_number": 9, "usage_type": "call" }, { "api_name": "torchvision.models", "line_number": 9, "usage_type": "name" }, { "api_name": "torch.nn.Linear", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.nn", ...
2312267586
""" Bing Zhai's step count implementation (https://github.com/bzhai/AFAR) of the Verisense Step Count algorithm (https://github.com/ShimmerEngineering/Verisense-Toolbox/tree/master/Verisense_step_algorithm) modifications by Dan Jackson. """ # --- HACK: Allow the test to run standalone as specified by a file in the re...
digitalinteraction/openmovement-python
src/test/test_steps.py
test_steps.py
py
11,038
python
en
code
4
github-code
1
[ { "api_name": "sys.path.append", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.normpath", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_numbe...
4489876562
import numpy as np # 1. 데이터 from sklearn.datasets import load_breast_cancer datasets = load_breast_cancer() x = datasets.data y = datasets.target print(x.shape) # (569, 30) print(y.shape) # (569,) from sklearn.model_selection import train_test_split x_train, x_test, y_train, y_test = train_test_split(x, y,...
Taerimmm/ML
keras/keras22_2_cancer3.py
keras22_2_cancer3.py
py
1,663
python
en
code
3
github-code
1
[ { "api_name": "sklearn.datasets.load_breast_cancer", "line_number": 5, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 13, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.MinMaxScaler", "line_number": 16, "usag...
39024559163
import logging import os.path import pytest from mock import Mock from pip._vendor import html5lib, requests from pip._vendor.packaging.specifiers import SpecifierSet from pip._internal.download import PipSession from pip._internal.index import ( CandidateEvaluator, CandidatePreferences, FormatControl, ...
epicfaace/pip
tests/unit/test_index.py
test_index.py
py
36,746
python
en
code
null
github-code
1
[ { "api_name": "pip._internal.index.Link", "line_number": 42, "usage_type": "call" }, { "api_name": "pip._internal.models.candidate.InstallationCandidate", "line_number": 43, "usage_type": "call" }, { "api_name": "pip._internal.index.Link", "line_number": 56, "usage_type":...
29142378878
import sys import time from PyQt5.QtWidgets import QApplication, QMainWindow from PyQt5 import QtWidgets from functools import partial from PyQt5.QtGui import QIcon, QPixmap from JailSpyder import Ui_MainWindow from BplusTree import Bptree, KeyValue import re import random import datetime movies = [] # 每一个movie被...
rfhits/Data-Structure-BUAA
3-BigProject/JailSpyder/main.py
main.py
py
14,506
python
en
code
5
github-code
1
[ { "api_name": "BplusTree.Bptree", "line_number": 17, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 136, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 136, "usage_type": "attribute" }, { "api_name": "PyQt5...
9925505587
try: from quandl_set import * except: import quandl import numpy as np import pandas as pd class SDP: def __init__(self,**args): assert 'scode' in args self.scode = args['scode'] self.rawdata = None self.rawdata_c = None def get_raw_data(self): """ downlo...
HLX-ResearchGroup/SDP
SDP/SDP.py
SDP.py
py
2,040
python
en
code
0
github-code
1
[ { "api_name": "quandl.get", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.log", "line_number": 22, "usage_type": "attribute" }, { "api_name": "pandas.DataFrame", "line_number": 24, "usage_type": "call" } ]
28022192855
from django.urls import path,include from rest_framework import routers from.import views router=routers.DefaultRouter() router.register(r'data',views.PlanViewSet), router.register(r'features',views.FeaturesViewSet), router.register(r'retailer-plan',views.RetailerPlanViewSet), urlpatterns=[ path('',include(rout...
aman0x/market-place
planApp/api/urls.py
urls.py
py
332
python
en
code
2
github-code
1
[ { "api_name": "rest_framework.routers.DefaultRouter", "line_number": 5, "usage_type": "call" }, { "api_name": "rest_framework.routers", "line_number": 5, "usage_type": "name" }, { "api_name": "django.urls.path", "line_number": 13, "usage_type": "call" }, { "api_na...
36864316913
# -*- coding: utf-8 -*- """ Class definition of YOLO_v3 style detection model on image and video """ import colorsys import os from timeit import default_timer as timer import numpy as np from keras import backend as K from keras.models import load_model from keras.layers import Input from PIL import Image, ImageFont...
1162620106/Pedestrian-warning-system
yolo.py
yolo.py
py
11,724
python
en
code
3
github-code
1
[ { "api_name": "keras.backend.get_session", "line_number": 55, "usage_type": "call" }, { "api_name": "keras.backend", "line_number": 55, "usage_type": "name" }, { "api_name": "os.path.expanduser", "line_number": 59, "usage_type": "call" }, { "api_name": "os.path", ...
22710785166
import pygame from comet import Comet # créer une classe pour la gestion de evenemet class CommetFallEvent: # au chargement on créer un compteur def __init__(self, game): self.percent = 0 self.percent_speed = 33 self.game = game self.fall_mode = False # definir un grou...
YvanMackowiak/SimpsonPython
comet_event.py
comet_event.py
py
1,745
python
fr
code
0
github-code
1
[ { "api_name": "pygame.sprite.Group", "line_number": 15, "usage_type": "call" }, { "api_name": "pygame.sprite", "line_number": 15, "usage_type": "attribute" }, { "api_name": "comet.Comet", "line_number": 30, "usage_type": "call" }, { "api_name": "pygame.draw.rect",...
2206106739
import os import numpy as np from sklearn.datasets import make_blobs from dnadapt.utils.data import random_split from dnadapt.utils.utils import folder_if_not_exist, pcts_to_sizes from dnadapt.globals import datadir def blob_data(size=1000, pcts=None, centers=None, std=1.0): if pcts is not None: size = pc...
mewehez/cancer_doadapt
src/dnadapt/data/toy.py
toy.py
py
2,386
python
en
code
0
github-code
1
[ { "api_name": "dnadapt.utils.utils.pcts_to_sizes", "line_number": 11, "usage_type": "call" }, { "api_name": "sklearn.datasets.make_blobs", "line_number": 12, "usage_type": "call" }, { "api_name": "dnadapt.utils.data.random_split", "line_number": 21, "usage_type": "call" ...
31386511196
from lingpy import * wl = Wordlist('O_shijing.tsv', col='shijing', row='stanza') # first make a link between a character in a section and its occurrence as # rhyme word chars = [] for k in wl: char = wl[k,'character'] poem = wl[k,'number'] stanza = wl[k,'stanza'] section = wl[k,'section_number'] ...
digling/shijing
C_make_browser.py
C_make_browser.py
py
1,695
python
en
code
2
github-code
1
[ { "api_name": "os.path.isdir", "line_number": 53, "usage_type": "call" }, { "api_name": "os.path", "line_number": 53, "usage_type": "attribute" }, { "api_name": "os.mkdir", "line_number": 54, "usage_type": "call" }, { "api_name": "shutil.copyfile", "line_numbe...
24958428117
import torch from fastff import FastFeedForward # Example Usage input_dim = 768 # Example input dimension output_dim = 768 # Output dimension depth = 11 # Depth of the FFF tree # Create the Fast Feedforward module fast_ff = FastFeedForward(input_dim=input_dim, output_dim=output_dim, depth=depth) # Exam...
kyegomez/FastFF
example.py
example.py
py
486
python
en
code
3
github-code
1
[ { "api_name": "fastff.FastFeedForward", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.randn", "line_number": 13, "usage_type": "call" } ]
15102394545
# -*- coding: utf-8 -*- import xbmc import xbmcgui from twitch.constants import Keys from constants import Images from utils import theArt, TitleBuilder, getMediaType class PlaylistConverter(object): @staticmethod def convertToXBMCPlaylist(InputPlaylist, title='', image=''): # Create playlist in Kodi,...
nalle/plugin.video.speedrunslive
resources/lib/converter.py
converter.py
py
12,096
python
en
code
0
github-code
1
[ { "api_name": "xbmc.PlayList", "line_number": 13, "usage_type": "call" }, { "api_name": "xbmc.PLAYLIST_VIDEO", "line_number": 13, "usage_type": "attribute" }, { "api_name": "xbmcgui.ListItem", "line_number": 20, "usage_type": "call" }, { "api_name": "utils.theArt"...
37964354921
import copy import os import numpy as np from PIL import Image from RootSeg.RootSeg import RootSeg if __name__ == "__main__": class_colors = [[0, 0, 0], [0, 255, 0]] # input image size HEIGHT = 512 WIDTH = 512 # background + root = 2 NCLASSES = 2 # example: logs/ep059-loss0.005-val_loss0.02...
Eric-1986/faCRSA
RootSeg/predict.py
predict.py
py
1,643
python
en
code
0
github-code
1
[ { "api_name": "RootSeg.RootSeg.RootSeg", "line_number": 19, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 22, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_number": 24, "usage_type": "call" }, { "api_name": "PIL.Image", "li...
20836438803
import json import logging import os import shutil import tempfile import urllib.parse from pathlib import Path from faf import db from faf.api.map_schema import MapSchema from faf.tools.fa.maps import generate_map_previews, parse_map_info, generate_zip from flask import request from werkzeug.utils import secure_filen...
FAForever/faf-python-api
api/maps.py
maps.py
py
13,373
python
en
code
3
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 19, "usage_type": "call" }, { "api_name": "flask.request.files.get", "line_number": 83, "usage_type": "call" }, { "api_name": "flask.request.files", "line_number": 83, "usage_type": "attribute" }, { "api_name": "fl...
72255780515
import sys import pandas as pd import joblib # Load the new data for prediction prediction_data = pd.DataFrame({ "Age": [int(sys.argv[1])], "EstimatedSalary": [int(sys.argv[2])] }) # Load the saved model from file clf = joblib.load('./../trained_model.pkl') # Perform predictions on the new data predictions =...
Ahmad44452/shad
site/server/predictor.py
predictor.py
py
393
python
en
code
1
github-code
1
[ { "api_name": "pandas.DataFrame", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 7, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "joblib.load", "line_num...
2174787068
from flask import Flask, jsonify, after_this_request from resources.series import series from flask_cors import CORS from dotenv import load_dotenv import os import models load_dotenv() DEBUG = True PORT=8000 app = Flask(__name__) CORS(series, origins=['http://localhost:3000', 'https://makima-reader.herokuapp....
wjuang/manga-reader-backend
app.py
app.py
py
1,509
python
en
code
0
github-code
1
[ { "api_name": "dotenv.load_dotenv", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 18, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 20, "usage_type": "call" }, { "api_name": "resources.series.serie...
32634547464
# -*- coding: utf-8 -*- ''' Created on 2017. 6. 24. @author: hwang-ingyu ''' from Crypto.Random.random import choice from _curses import version from boto import Version class hello(object): def __init__(self): self.name = "whang" ho = hello() print(ho.name) class hi(hello): def __init__(self): ...
IGIGIGIGIG/mypython
python_ver2.7/totest/hello.py
hello.py
py
1,453
python
en
code
1
github-code
1
[ { "api_name": "Crypto.Random.random.choice", "line_number": 41, "usage_type": "call" } ]
28414830634
#!/usr/bin/env python3 # # Check latest GitHub actions releases. # # Requirements # ============ # # - `Python <https://www.python.org/>`_ 3.8 or later # - `PyYAML <https://pypi.org/project/PyYAML/>`_ 5.3.1 or later # - `requests <https://pypi.org/project/requests/>`_ 2.24.0 or later # - `termcolor <https://pypi.org/pr...
10sr/junks
.github/workflows/check-latest-actions.py
check-latest-actions.py
py
5,919
python
en
code
0
github-code
1
[ { "api_name": "os.getenv", "line_number": 46, "usage_type": "call" }, { "api_name": "yaml.CSafeLoader", "line_number": 61, "usage_type": "attribute" }, { "api_name": "yaml.SafeLoader", "line_number": 63, "usage_type": "attribute" }, { "api_name": "typing.NamedTupl...
32616831123
# -*- coding: utf-8 -*- import os, sys from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read() setup( name='pyjf3', version='0.3', description = 'Japanese text functions for Python 3', long_description = read('...
atsuoishimoto/pyjf3
setup.py
setup.py
py
679
python
en
code
0
github-code
1
[ { "api_name": "os.path.join", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 6, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_n...
2193875486
#!/usr/bin/env python3 #-*- coding: utf-8 -*- """ Created on Sat Feb 17 13:47:49 2018 @author: code-room """ from django.shortcuts import render_to_response from django.http import HttpResponse from django import template def menu(request): food1 = {'name':'tomato-egg','price':60,'comment':'good!', 'i...
LUCASPYTHON/web
mysite/mysite/views.py
views.py
py
507
python
en
code
0
github-code
1
[ { "api_name": "django.shortcuts.render_to_response", "line_number": 17, "usage_type": "call" } ]
4275954237
import logging import socket import sys import threading from dev2lib import event from dev2lib.action import (ACTIONS, StartAction, AcceptStartAction) from dev2lib.net import server, connection log = logging.getLogger("dev2lib.net.session") log.setLevel(logging.DEBUG) # create console handler and set level to deb...
BackupTheBerlios/dev2-svn
trunk/dev2lib/net/session.py
session.py
py
3,859
python
fr
code
0
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 13, "usage_type": "attribute" }, { "api_name": "logging.StreamHandler", "line_number": 16, "usage_type": "call" }, { "api_name": "logging.DE...
33518591922
import os import sys from string import Template errorMessageTemplate = Template("""$reason RIDE depends on wx (wxPython). Known versions for Python3 are: 4.0.7.post2, 4.1.1 and 4.2.0.\ At the time of this release the current wxPython version is 4.2.0.\ You can install with 'pip install wxPython' on most operating sys...
robotframework/RIDE
src/robotide/__init__.py
__init__.py
py
4,018
python
en
code
910
github-code
1
[ { "api_name": "string.Template", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 17, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 20, "usage_type": "call" }, { "api_name": "sys.path", "line_number":...
5586775098
""" Tool to process NPS feedback """ import argparse import logging import time import asyncio from datetime import datetime, timedelta, timezone from concurrent.futures import ThreadPoolExecutor import pandas as pd from openaicli import OpenAICli # pylint: disable=import-error from prompt import PromptType # pylint:...
mazharm/feedback
feedback.py
feedback.py
py
19,676
python
en
code
0
github-code
1
[ { "api_name": "logging.basicConfig", "line_number": 60, "usage_type": "call" }, { "api_name": "logging.ERROR", "line_number": 60, "usage_type": "attribute" }, { "api_name": "openaicli.OpenAICli", "line_number": 62, "usage_type": "call" }, { "api_name": "pandas.Dat...
15622441394
from typing import Iterator, Union, Iterable, Any, Sequence from bitarray import frozenbitarray as fbarray from .abstract_ps import AbstractPS from tqdm.autonotebook import tqdm class CartesianPS(AbstractPS): PatternType = tuple[tuple, ...] max_pattern: tuple # Bottom pattern, more specific than any other o...
EgorDudyrev/paspailleur
paspailleur/pattern_structures/cartesian_ps.py
cartesian_ps.py
py
2,884
python
en
code
0
github-code
1
[ { "api_name": "abstract_ps.AbstractPS", "line_number": 8, "usage_type": "name" }, { "api_name": "abstract_ps.AbstractPS", "line_number": 11, "usage_type": "name" }, { "api_name": "abstract_ps.AbstractPS", "line_number": 13, "usage_type": "name" }, { "api_name": "t...
16022455244
from tt import add import pytest @pytest.mark.parametrize( ('input_n', 'input_m', 'expected'), ( (5, 10, 15), (10, 10, 20), ) ) def test_add(input_n, input_m, expected): assert add(input_n,input_m) == expected from tt import ll def test_ll(): assert ll() == (2, ...
rej23/RPS
T1/test_rps.py
test_rps.py
py
808
python
en
code
0
github-code
1
[ { "api_name": "tt.add", "line_number": 14, "usage_type": "call" }, { "api_name": "pytest.mark.parametrize", "line_number": 5, "usage_type": "call" }, { "api_name": "pytest.mark", "line_number": 5, "usage_type": "attribute" }, { "api_name": "tt.ll", "line_numbe...
31630163334
import requests class DataFormZephyrScale: def __init__(self, token): """ 初始化 DateFormZephyrScale 对象。 参数: token -- Zephyr Scale API 的认证 token """ self.bearer_token = token # 初始化时传入实际的 bearer_token self.base_url = "https://api.ze...
Adeguy/Test-items
Test_framework/Horizon_framework/data_formzephyrscale.py
data_formzephyrscale.py
py
1,991
python
en
code
0
github-code
1
[ { "api_name": "requests.get", "line_number": 30, "usage_type": "call" } ]
3539943242
from datetime import datetime from os import remove import glob import json from pathlib import Path from modules.constants import DATE_STR, DATETIME_TODAY # Logs dir path LOGS_PATH = Path().cwd() / "logs" class LogsMixin: """Class responsible for manipulating usernames and session logs/errors locally.""" ex...
vladimirpolak/inst-4
modules/logs_manager.py
logs_manager.py
py
4,529
python
en
code
0
github-code
1
[ { "api_name": "pathlib.Path", "line_number": 9, "usage_type": "call" }, { "api_name": "modules.constants.DATE_STR", "line_number": 24, "usage_type": "name" }, { "api_name": "pathlib.Path.cwd", "line_number": 36, "usage_type": "call" }, { "api_name": "pathlib.Path"...
8702112515
import streamlit as st import altair as alt import inspect from vega_datasets import data @st.experimental_memo def get_chart_37227(use_container_width: bool): import altair as alt from vega_datasets import data # Since these data are each more than 5,000 rows we'll import from the URLs airports =...
streamlit/release-demos
1.16.0/demo_app_altair/pages/108_Airport_Connections.py
108_Airport_Connections.py
py
2,526
python
en
code
78
github-code
1
[ { "api_name": "vega_datasets.data.airports", "line_number": 12, "usage_type": "attribute" }, { "api_name": "vega_datasets.data", "line_number": 12, "usage_type": "name" }, { "api_name": "vega_datasets.data.flights_airport", "line_number": 13, "usage_type": "attribute" }...
11339049482
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Script que implementa a magic formula de Joel Greenblatt para empresas na Bovespa. Dados baixados do site http://fundamentus.com.br """ import argparse import logging import pandas as pd import requests URL = "http://fundamentus.com.br/resultado.php" MAGIC_METHOD...
thobiast/magicformulabr
src/magicformulabr.py
magicformulabr.py
py
7,618
python
en
code
19
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 43, "usage_type": "call" }, { "api_name": "argparse.RawDescriptionHelpFormatter", "line_number": 45, "usage_type": "attribute" }, { "api_name": "logging.DEBUG", "line_number": 91, "usage_type": "attribute" }, { ...
145908544
import sys import getopt import logging import nibabel from spinalcordtoolbox.utils.sys import init_sct, sct_test_path, printv from spinalcordtoolbox.utils.fs import check_file_exist logger = logging.getLogger(__name__) # DEFAULT PARAMETERS class Param: # The constructor def __init__(self): self.d...
jem0101/BigSwag-SQA2022-AUBURN
TestOrchestrator4ML-main/resources/Data/supervised/GITHUB_REPOS/neuropoly@spinalcordtoolbox/scripts/isct_check_detection.py
isct_check_detection.py
py
3,353
python
en
code
2
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "spinalcordtoolbox.utils.sys.printv", "line_number": 31, "usage_type": "call" }, { "api_name": "spinalcordtoolbox.utils.sys.sct_test_path", "line_number": 33, "usage_type": "call" ...
2662096885
import json # Parses stored data and prints to screen def jsonPrintEntry(entry): print(entry["title"]) print(entry["company"]) print(entry["location"]) print(entry["time"]) print(entry["link"]) print(entry["source"]) print() def jsonPrintFile(file): for entry in file: jsonPrint...
Liya777/Future-Job
src/parser.py
parser.py
py
537
python
en
code
0
github-code
1
[ { "api_name": "json.load", "line_number": 19, "usage_type": "call" } ]
72403743715
from django.shortcuts import render from rest_framework.decorators import api_view from rest_framework.response import Response from .serializers import SubSerializer, AddSerializer def home(request): return render(request, 'home.html', {'name': 'name'}) @api_view(['GET', 'POST']) def add(request): if reque...
yesing/inflearn_django
calc/views.py
views.py
py
799
python
en
code
0
github-code
1
[ { "api_name": "django.shortcuts.render", "line_number": 8, "usage_type": "call" }, { "api_name": "serializers.AddSerializer", "line_number": 17, "usage_type": "call" }, { "api_name": "rest_framework.response.Response", "line_number": 18, "usage_type": "call" }, { ...
5118123376
import itertools floors = (0, 1, 2, 3, 4) for (H, K, L, P, R) in list(itertools.permutations(floors)): if K != 0 and \ L != 0 and L != 4 and \ P > K and \ abs(R - L) > 1 and \ abs(L - K) > 1 and \ H != 4: print('H', 'K', 'L', 'P', 'R') ...
wouterhoutsma/HanzeSE1AI-Exercises
w3e1.py
w3e1.py
py
363
python
en
code
0
github-code
1
[ { "api_name": "itertools.permutations", "line_number": 3, "usage_type": "call" } ]
8490947514
import pyposeidon.meteo as pmeteo import pyposeidon.model as pmodel import pytest import xarray as xr import os import shutil import numpy as np from . import DATA_DIR @pytest.mark.parametrize("input_name", ["erai.grib", "era5.grib", "uvp_2018100112.grib"]) def test_schism(tmpdir, input_name): filename = (DATA_D...
ec-jrc/pyPoseidon
tests/test_meteo_grib.py
test_meteo_grib.py
py
1,980
python
en
code
17
github-code
1
[ { "api_name": "pyposeidon.meteo.Meteo", "line_number": 16, "usage_type": "call" }, { "api_name": "pyposeidon.meteo", "line_number": 16, "usage_type": "name" }, { "api_name": "xarray.open_dataset", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.arr...
10289198967
from datetime import datetime from pprint import pprint as pp from paprika.data.data_type import DataType from paprika.data.data_channel import DataChannel from paprika.data.feed import Feed from paprika.data.feed_filter import TimeFreqFilter, Filtration from paprika.data.constants import TimePeriod from paprika.sign...
hraoyama/radish
paprika/signals/tests/test_pair_spread_signal.py
test_pair_spread_signal.py
py
3,650
python
en
code
1
github-code
1
[ { "api_name": "paprika.data.feed.Feed", "line_number": 17, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 17, "usage_type": "call" }, { "api_name": "paprika.data.data_type.DataType.TRADES", "line_number": 18, "usage_type": "attribute" }, { ...
23068073555
import pandas as pd from fuzzywuzzy import process from gensim.models import Word2Vec model = Word2Vec.load("models/word2vec.model") def res_imp(restaurant, search_term = ''): # read absa results result = pd.read_json('data/result.json') # confirm restaurant name if restaurant name doesn't ma...
hzchua/PLP-ISS
utils/res_imp.py
res_imp.py
py
3,367
python
en
code
0
github-code
1
[ { "api_name": "gensim.models.Word2Vec.load", "line_number": 4, "usage_type": "call" }, { "api_name": "gensim.models.Word2Vec", "line_number": 4, "usage_type": "name" }, { "api_name": "pandas.read_json", "line_number": 8, "usage_type": "call" }, { "api_name": "fuzz...
72582699235
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import struct import socket import fcntl import time import sys import os from threading import RLock, Thread from time import sleep from contextlib import contextmanager from collections import deque, defaultdict impor...
edward9210/wifi_perceive
route/rssiCapture.py
rssiCapture.py
py
7,780
python
en
code
0
github-code
1
[ { "api_name": "socket.socket", "line_number": 38, "usage_type": "call" }, { "api_name": "socket.AF_INET", "line_number": 38, "usage_type": "attribute" }, { "api_name": "socket.SOCK_DGRAM", "line_number": 38, "usage_type": "attribute" }, { "api_name": "fcntl.ioctl"...
25066695312
"""videos Revision ID: 2afea69b2340 Revises: 9e953d48a222 Create Date: 2022-09-28 17:52:20.256186 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2afea69b2340' down_revision = '9e953d48a222' branch_labels = None depends_on = None def upgrade() -> None: #...
regevti/Pogona_Pursuit
Arena/alembic/versions/2afea69b2340_videos.py
2afea69b2340_videos.py
py
692
python
en
code
0
github-code
1
[ { "api_name": "alembic.op.add_column", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 21, "usage_type": "call" }, { "api_name": "sqlalchemy.DateTim...
16432787754
from django.shortcuts import render # Create your views here. def index(request): import datetime today=datetime.datetime.now() context={ 'today':today } return render(request, 'index.html',context) def gallery(request): # 1. Access Key 붙여넣기 client_id = '4Yi9QTOdW2bvZtGa5CPRt-lEqQh...
ttppggnnss/django_practice
0330/mygallery/pages/views.py
views.py
py
960
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime.now", "line_number": 6, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.shortcuts.render", "line_number": 10, "usage_type": "call" }, { "api_name": "re...
17015732444
#!/usr/bin/python3 """ List cities """ if __name__ == "__main__": import sys import MySQLdb engine = MySQLdb.connect(user=sys.argv[1], passwd=sys.argv[2], host="localhost", db=sys.argv[3]) search = MySQLdb.escape_string(sys.argv[4]).decode() ...
student1043/holbertonschool-higher_level_programming
0x0F-python-object_relational_mapping/5-filter_cities.py
5-filter_cities.py
py
826
python
en
code
0
github-code
1
[ { "api_name": "MySQLdb.connect", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 7, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number"...
74290556192
import pytest from tenqpy.core import * import quaternion import numpy as np def test_real_imag(): q = quaternion.as_quat_array(np.random.randn(2, 3, 4)) req = real(q) imq = imag(q) assert np.allclose(q, req + imq) def test_real_imag2(): q = quaternion.as_quat_array(np.random....
jflamant/tenqpy
tests/test_core.py
test_core.py
py
829
python
en
code
0
github-code
1
[ { "api_name": "quaternion.as_quat_array", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.random.randn", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 9, "usage_type": "attribute" }, { "api_name": "numpy.allc...
12398640655
from setuptools import setup import os import sys if sys.version_info < (3, 5): sys.exit("Python < 3.5 is not supported.") def get_version(version_tuple): return ".".join(map(str, version_tuple)) init = os.path.join( os.path.dirname(__file__), ".", "", "__init__.py") version_line = list( ...
dvnll/ecpli
setup.py
setup.py
py
754
python
en
code
1
github-code
1
[ { "api_name": "sys.version_info", "line_number": 6, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number"...
18202883163
import sys import json from ..utilities.classification.compat import ( taxon_json_taxonomy_to_classification_engine) def main(taxonomy, *files_to_scan): with open(taxonomy, "rt") as fp: engine = taxon_json_taxonomy_to_classification_engine(json.load(fp)) for f in files_to_scan: print...
os2datascanner/os2datascanner
src/os2datascanner/engine2/commands/classify.py
classify.py
py
565
python
en
code
8
github-code
1
[ { "api_name": "utilities.classification.compat.taxon_json_taxonomy_to_classification_engine", "line_number": 10, "usage_type": "call" }, { "api_name": "json.load", "line_number": 10, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 20, "usage_type": "attri...
30859322306
from django.urls import path from . import views from .views import UpdateEvent, DeleteEvent, CreateEvent, AllDonations, UpdateDonation, PeopleList, \ AddPeople, UpdatePeople, DeletePeople, DetailPeople, DistributionList, distribute, DistributionDetail, detail_event urlpatterns = [ path('', views.events, name...
arafah-dhrubo/poor-donation-django
amraipari/events/urls.py
urls.py
py
1,785
python
en
code
0
github-code
1
[ { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "views.events", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "views.donation", ...
15302164703
from torch.utils.data import ConcatDataset # Local imports from data_loader.dataloader_registry import DATALOADER def create_dataset(cfg, split, split_name, length=0, transform=None): """ Create the complete dataloader for each of the splits. cfg = configuration information for the program split = l...
steff456/MLBase
utils/utils.py
utils.py
py
803
python
en
code
0
github-code
1
[ { "api_name": "data_loader.dataloader_registry.DATALOADER", "line_number": 17, "usage_type": "name" }, { "api_name": "torch.utils.data.ConcatDataset", "line_number": 23, "usage_type": "call" } ]
15143064739
#!/usr/bin/env python # coding: utf-8 # # COURSE: Master statistics and machine learning: Intuition, Math, code # ##### COURSE URL: udemy.com/course/statsml_x/?couponCode=202006 # ## SECTION: The t-test family # ### VIDEO: One-sample t-test # #### TEACHER: Mike X Cohen, sincxpress.com # In[ ]: # import libraries i...
mikexcohen/Statistics_course
Python/ttest/stats_ttest_oneSampleT.py
stats_ttest_oneSampleT.py
py
1,509
python
en
code
18
github-code
1
[ { "api_name": "numpy.random.randn", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 27, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 30, "usage_type": "call" }, { "api_name": "matplotli...
10840272466
from flask import Flask, request , jsonify from flask import Flask, render_template from werkzeug.utils import secure_filename import soundfile import os import io import librosa import pandas as pd from operator import add import numpy as np import pickle as pk from scipy.stats import skew from sklearn.decomposition ...
Kesavaram/Smart-Nutrition-Tracker-Web-app
backend.py
backend.py
py
9,682
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 30, "usage_type": "call" }, { "api_name": "flask.request.files.get", "line_number": 38, "usage_type": "call" }, { "api_name": "flask.request.files", "line_number": 38, "usage_type": "attribute" }, { "api_name": "flask.re...
70745182434
#!/usr/bin/env python import zmq context = zmq.Context() socket = context.socket(zmq.SUB) socket.setsockopt(zmq.SUBSCRIBE, "") socket.connect('tcp://localhost:5555') for i in range(10): print(socket.recv())
gregfreeman/zmq_rpi_demo
helloworld/sub2.py
sub2.py
py
214
python
en
code
3
github-code
1
[ { "api_name": "zmq.Context", "line_number": 5, "usage_type": "call" }, { "api_name": "zmq.SUB", "line_number": 6, "usage_type": "attribute" }, { "api_name": "zmq.SUBSCRIBE", "line_number": 7, "usage_type": "attribute" } ]
32521599736
from __future__ import absolute_import, division, unicode_literals import pickle import os import io import copy import logging import numpy as np from discoeval.tools.validation import SplitClassifier class RSTEval(object): def __init__(self, taskpath, seed=1111): logging.debug('***** Transfer task : R...
moqingxinai/DiscoEval
discoeval/rst.py
rst.py
py
4,218
python
en
code
null
github-code
1
[ { "api_name": "logging.debug", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_numb...
21733293041
"""Таблица токен.""" from sqlalchemy import Column, DateTime, ForeignKey, Integer, String from authorization.src.app.db.models.base import Base class Token(Base): """Таблица токен.""" __tablename__ = 'token' token_id = Column(Integer, primary_key=True) user_id = Column(Integer, ForeignKey('user.use...
YanaShurinova/shift_credit_card
authorization/src/app/db/models/token.py
token.py
py
417
python
en
code
0
github-code
1
[ { "api_name": "authorization.src.app.db.models.base.Base", "line_number": 7, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 12, "usage_type": "call" }, { "api_name": "sqlalchemy.Integer", "line_number": 12, "usage_type": "argument" }, { ...
5305546439
import numpy as np from scipy.optimize import minimize class SVM: def __init__(self, trainx: np.ndarray, trainy: np.ndarray, n_epoch: int = 100): self.trainx = trainx self.trainy = trainy self.n_sample, self.n_dim = trainx.shape self.n_epoch = n_epoch def kernel(self, X1, ...
bravo583771/CS5350-6350-in-University-of-Utah
SVM/SVM.py
SVM.py
py
4,897
python
en
code
0
github-code
1
[ { "api_name": "numpy.ndarray", "line_number": 5, "usage_type": "attribute" }, { "api_name": "numpy.exp", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.square", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.linalg.norm", "lin...
72721492514
import numpy as np import pandas import matplotlib.pyplot as plt with open("data\\5.6\\srvotst.csv") as f: servo_pd = pandas.read_csv(f) f.close() print(servo_pd.head()) plt.title("Y vs U for SG995 Left Hip") plt.scatter(servo_pd["Time"], servo_pd["Left_Hip"], color = "tab:red", label="Y_Left") plt...
AdamMOD/Bipedal-Bot
python/data_analysis_run_servo.py
data_analysis_run_servo.py
py
576
python
en
code
0
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.title", "line_number": 10, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 10, "usage_type": "name" }, { "api_name": "matplotlib.p...
2671495662
# pylint: disable=no-self-use,invalid-name import numpy import pytest from allennlp.common.checks import ConfigurationError from allennlp.common.testing import AllenNlpTestCase from allennlp.data.fields import MultiLabelField from allennlp.data.vocabulary import Vocabulary class TestMultiLabelField(AllenNlpTestCase)...
dki-lab/GrailQA
allennlp/tests/data/fields/multilabel_field_test.py
multilabel_field_test.py
py
4,034
python
en
code
89
github-code
1
[ { "api_name": "allennlp.common.testing.AllenNlpTestCase", "line_number": 11, "usage_type": "name" }, { "api_name": "allennlp.data.fields.MultiLabelField", "line_number": 13, "usage_type": "call" }, { "api_name": "allennlp.data.vocabulary.Vocabulary", "line_number": 19, "u...
7861352919
#!/usr/bin/env python # coding: utf-8 # # Author: Ayush Kakar # # # # # # Titanic - Machine Learning From Disaster - Dataset (World Happiness Report-2021) # In[23]: import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns # In[24]: data=pd.read_csv('world-happin...
Ayush28193/World-Happiness-Report
WORLD HAPPINESS REPORT.py
WORLD HAPPINESS REPORT.py
py
2,949
python
en
code
1
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 25, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 65, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 65, "usage_type": "name" }, { "api_name": "seaborn.ba...
37695510863
''' Trung Vo CSE 512 - HW2 problem 3.2 - toydata - Multiclass SVM ''' import numpy as np from cvxopt import matrix, solvers import scipy.io as sio import itertools from sklearn.metrics import confusion_matrix import matplotlib.pyplot as plt import math from utils import * data = sio.loadmat('./hw2data/q3_1_data.mat') ...
TrungTVo/multiclass-svm
multiclass_svm.py
multiclass_svm.py
py
1,860
python
en
code
0
github-code
1
[ { "api_name": "scipy.io.loadmat", "line_number": 15, "usage_type": "call" }, { "api_name": "scipy.io", "line_number": 15, "usage_type": "name" }, { "api_name": "numpy.shape", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.shape", "line_number"...
20850391833
import os import sys sys.path.append(os.getcwd()) import warnings warnings.simplefilter("ignore", ResourceWarning) import argparse # Important Imports import torch from torch.utils.tensorboard import SummaryWriter from torch.utils.data import DataLoader # Project Imports from nasrec.supernet.supernet import ( Super...
facebookresearch/NasRec
nasrec/train_supernet.py
train_supernet.py
py
12,774
python
en
code
24
github-code
1
[ { "api_name": "sys.path.append", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 3, "usage_type": "call" }, { "api_name": "warnings.simplefilter", "lin...
19676131682
# Simon Chu # Created on Sun Nov 1 18:32:24 EST 2020 # Modified on Wed 2021-01-06 09:30:08 # # lexer.py # lexer definition file # # reference: # https://rply.readthedocs.io/en/latest/ from rply import LexerGenerator import stl.tool as tool class Lexer: """lexical analyzer class Attributes: self...
sychoo/STL-API
stl/parsing/lexer.py
lexer.py
py
2,920
python
en
code
1
github-code
1
[ { "api_name": "rply.LexerGenerator", "line_number": 25, "usage_type": "call" }, { "api_name": "stl.tool.repl", "line_number": 92, "usage_type": "call" }, { "api_name": "stl.tool", "line_number": 92, "usage_type": "name" } ]
22066247710
from math import pi import torch import torch.nn as nn from pytorch_lightning.core.module import LightningModule from loc_ndf.models import loss from loc_ndf.utils import vis, utils import open3d as o3d from easydict import EasyDict import tqdm from loc_ndf.utils import pytimer ######################################...
PRBonn/LocNDF
src/loc_ndf/models/models.py
models.py
py
9,198
python
en
code
65
github-code
1
[ { "api_name": "pytorch_lightning.core.module.LightningModule", "line_number": 17, "usage_type": "name" }, { "api_name": "loc_ndf.models.loss.ProjectedDistanceLoss", "line_number": 25, "usage_type": "call" }, { "api_name": "loc_ndf.models.loss", "line_number": 25, "usage_t...
45175760641
import configparser import textwrap CONFIG_LOC = r"%LOCALAPPDATA%\GOG.com\Galaxy\Configuration\plugins\ps2\config.ini" class Config: def __init__(self): self.cfg = configparser.ConfigParser(allow_no_value=True) self.cfg.set("DEFAULT", "; Make sure to use / instead of \ in file paths.") sel...
AHCoder/galaxy-integration-ps2
src/config.py
config.py
py
3,047
python
en
code
37
github-code
1
[ { "api_name": "configparser.ConfigParser", "line_number": 8, "usage_type": "call" }, { "api_name": "textwrap.dedent", "line_number": 20, "usage_type": "call" }, { "api_name": "textwrap.dedent", "line_number": 36, "usage_type": "call" }, { "api_name": "textwrap.ded...
15583501123
from ast import parse, walk, FunctionDef, ClassDef, Name from re import findall from math import log, sqrt from pandas import DataFrame from nltk.stem import PorterStemmer from sklearn.metrics.pairwise import cosine_similarity from .Analyzer import Analyzer class SemanticAnalyzer(Analyzer): def __init__(self, ...
charlesgery/viseagull
viseagull/analysis/SemanticAnalyzer.py
SemanticAnalyzer.py
py
6,178
python
en
code
14
github-code
1
[ { "api_name": "Analyzer.Analyzer", "line_number": 12, "usage_type": "name" }, { "api_name": "pandas.DataFrame.from_dict", "line_number": 35, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 35, "usage_type": "name" }, { "api_name": "sklearn...
29182387246
import os import time import warnings warnings.filterwarnings("ignore") import json import torch from transformers import DebertaV2Tokenizer, RobertaTokenizer from util import form_dataset from model import RE_Model from eval import eval_re def adjust_learning_rate_exp(optimizer, epoch, num_ne_epochs, ne_lr, qg_lr, ...
AOZMH/Crake
src_main/RE/main.py
main.py
py
7,684
python
en
code
8
github-code
1
[ { "api_name": "warnings.filterwarnings", "line_number": 4, "usage_type": "call" }, { "api_name": "time.ctime", "line_number": 34, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 37, "usage_type": "attribute" }, { "api_name": "os.environ", "l...
18271865605
# -*- coding: utf-8 -*- """ @Time : 2022/3/1 4:37 下午 @Author : hcai @Email : hua.cai@unidt.com """ import os import sys import torch import logging from datetime import datetime from torch.utils.data import DataLoader sys.path.append(os.path.dirname(__file__)) from gutils.config import get_gpt_args from gmodels...
Hanscal/unlp
unlp/supervised/nlg/gpt_eval.py
gpt_eval.py
py
3,007
python
en
code
9
github-code
1
[ { "api_name": "sys.path.append", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_num...
28755992480
import itertools import time from pprint import pprint import numpy as np import ray, torch import torch.nn as nn from ray.util.placement_group import placement_group, PlacementGroupSchedulingStrategy, remove_placement_group from ray.util.queue import Queue from copy import deepcopy from architecture.mcts import MCTS...
Nimi42/AlphaZero
src/training/self_play.py
self_play.py
py
3,100
python
en
code
0
github-code
1
[ { "api_name": "ray.remote", "line_number": 21, "usage_type": "call" }, { "api_name": "ray.remote", "line_number": 22, "usage_type": "call" }, { "api_name": "ray.nodes", "line_number": 23, "usage_type": "call" }, { "api_name": "ray.util.placement_group.placement_gr...
23755548788
# # from validate_email import validate_email # # from tqdm import tqdm # # # DNS.defaults['server']=['8.8.8.8', '8.8.4.4'] # # if validate_email('varmaashik@gmail.com'): # # print("Email is Valid") # # else: # # print("Invalid Email") # # is_valid = validate_email('varmaashik@gmail.com',check_mx=True) ...
ashikvarma11/email-verifier
emailVal.py
emailVal.py
py
2,640
python
en
code
0
github-code
1
[ { "api_name": "dns.resolver.resolver.query", "line_number": 65, "usage_type": "call" }, { "api_name": "dns.resolver.resolver", "line_number": 65, "usage_type": "attribute" }, { "api_name": "dns.resolver", "line_number": 65, "usage_type": "name" }, { "api_name": "s...
10989328134
import os import tempfile import unittest import torch from torch import nn from towhee.trainer.optimization.adafactor import Adafactor from towhee.trainer.optimization.adamw import AdamW from towhee.trainer.scheduler import ( configure_constant_scheduler, configure_constant_scheduler_with_warmup, configur...
towhee-io/towhee
tests/unittests/trainer/test_scheduler.py
test_scheduler.py
py
5,456
python
en
code
2,843
github-code
1
[ { "api_name": "tempfile.TemporaryDirectory", "line_number": 33, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 34, "usage_type": "call" }, { "api_name": "os.path", "line_number": 34, "usage_type": "attribute" }, { "api_name": "torch.save", ...
8048305405
import requests import time import os from dotenv import load_dotenv from twilio.rest import Client def get_status(user_id): load_dotenv() token = os.getenv('token_vk') params = { 'user_ids' : user_id, 'access_token' : token, 'v':5.103, 'fields':'online', } url = '...
meat9/api_01_sms
homework.py
homework.py
py
1,253
python
en
code
0
github-code
1
[ { "api_name": "dotenv.load_dotenv", "line_number": 9, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 10, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 18, "usage_type": "call" }, { "api_name": "dotenv.load_dotenv", "l...
27750796145
from apistar import Include, Route, hooks, http, types from apistar.frameworks.wsgi import WSGIApp as App from apistar.handlers import docs_urls, static_urls import pymongo def AcceptOrigin(method: http.Method, response: types.ReturnValue): response.headers.append("Access-Control-Allow-Origin", "*") response....
SummerStoneS/apistar_mongodb
app.py
app.py
py
1,454
python
en
code
0
github-code
1
[ { "api_name": "apistar.http.Method", "line_number": 7, "usage_type": "attribute" }, { "api_name": "apistar.http", "line_number": 7, "usage_type": "name" }, { "api_name": "apistar.types.ReturnValue", "line_number": 7, "usage_type": "attribute" }, { "api_name": "api...