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
73021062754
from tkinter import * from PIL import ImageTk, Image root = Tk() root.title('leer coderen bij Codemy.com') root.iconbitmap('c:/gui/ ') my_img1 = ImageTk.PhotoImage(Image.open("IMG_1136.png")) my_img2 = ImageTk.PhotoImage(Image.open("IMG_2004.png")) #image_list = [my_img1, my_img2] #my_label = Label(image=my_img1) ...
herucara/python-2021
kijken.py
kijken.py
py
743
python
en
code
0
github-code
1
[ { "api_name": "PIL.ImageTk.PhotoImage", "line_number": 9, "usage_type": "call" }, { "api_name": "PIL.ImageTk", "line_number": 9, "usage_type": "name" }, { "api_name": "PIL.Image.open", "line_number": 9, "usage_type": "call" }, { "api_name": "PIL.Image", "line_...
959238114
import argparse import os import torch import torchvision as tv from at_learner_core.utils import transforms from at_learner_core.configs import dict_to_namespace from at_learner_core.utils import transforms as transforms from at_learner_core.utils import joint_transforms as j_transforms from at_learner_core.utils imp...
AlexanderParkin/CASIA-SURF_CeFA
rgb_track/configs_final_exp.py
configs_final_exp.py
py
7,365
python
en
code
149
github-code
1
[ { "api_name": "torchvision.transforms.Compose", "line_number": 18, "usage_type": "call" }, { "api_name": "torchvision.transforms", "line_number": 18, "usage_type": "attribute" }, { "api_name": "at_learner_core.utils.sequence_transforms.LinspaceTransform", "line_number": 19, ...
25515683214
"""Convert prediction of Network to .tei file and correct the _predict.txt file""" from lxml import etree import lxml.etree as ET import time import argparse #file_network_input = open("/home/svogel/projects/textimaging/rnng-master/Franz_Kafka_Das_Urteil_graminput.txt", "r") #Thomas_Mann_Der_Tod_in_Venedig_Neu_gramin...
Psarpei/Recognition-of-logical-document-structures
RNNG/scripts/prediction_to_XML.py
prediction_to_XML.py
py
8,612
python
en
code
5
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "call" }, { "api_name": "lxml.etree.Element", "line_number": 99, "usage_type": "call" }, { "api_name": "lxml.etree", "line_number": 99, "usage_type": "name" }, { "api_name": "lxml.etree.SubE...
29980155080
import csv import logging import multiprocessing import os import pickle import sys import traceback import cv2 import imutils import imutils.contours import numpy as np from imutils.perspective import four_point_transform import register_image base_template = None base_tables = None DESIRED_HEIGHT = 779 DESIRED_WID...
tauseefahmed600/bubble-sheet-reader
app/bubble_sheet_reader.py
bubble_sheet_reader.py
py
17,872
python
en
code
2
github-code
1
[ { "api_name": "cv2.imread", "line_number": 43, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 44, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 44, "usage_type": "attribute" }, { "api_name": "cv2.resize", "lin...
16711232336
from helium import * from bs4 import BeautifulSoup import pandas as pd from sqlalchemy import create_engine import time links = [] data = [] start = time.time() def lin(): url = 'https://www.amarstock.com/latest-share-price' browser = start_firefox(url, headless=True) s = BeautifulSoup(brow...
Nadimul2/Stock-prices
stock.py
stock.py
py
3,099
python
en
code
0
github-code
1
[ { "api_name": "time.time", "line_number": 10, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 15, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 39, "usage_type": "call" }, { "api_name": "time.sleep", "line_...
36974547726
"""add auto-votes Revision ID: 4c8b06ae0ef5 Revises: c3d959bce883 Create Date: 2023-05-20 18:22:06.916821 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '4c8b06ae0ef5' down_revision = 'c3d959bce883' branch_labels = Non...
jperrino/example_fastapi
alembic/versions/4c8b06ae0ef5_add_auto_votes.py
4c8b06ae0ef5_add_auto_votes.py
py
2,697
python
en
code
0
github-code
1
[ { "api_name": "alembic.op.drop_table", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "alembic.op.drop_table", "line_number": 22, "usage_type": "call" }, { "api_name": "alembic.op", ...
35773688788
from protobuf.message import Message from protobuf.property import Property from protobuf.typed import TYPES, WIRE_TYPES from protobuf.ProtobufSyntaxError import ProtobufSyntaxError PRIORITIES = { 'required', 'optional', 'repeated' } def _read_file(filename): with open(filename) as f: code = ...
vtarasovaaa/protobuf
protobuf/pb_parser.py
pb_parser.py
py
4,316
python
en
code
0
github-code
1
[ { "api_name": "protobuf.ProtobufSyntaxError.ProtobufSyntaxError", "line_number": 33, "usage_type": "call" }, { "api_name": "protobuf.message.Message", "line_number": 36, "usage_type": "call" }, { "api_name": "protobuf.message.Message", "line_number": 38, "usage_type": "ca...
32816595902
from account.models import Account, EmailAddress from mozilla_django_oidc.auth import OIDCAuthenticationBackend, default_username_algo class PinaxOIDCAuthenticationBackend(OIDCAuthenticationBackend): def create_user(self, claims): """ Create a user account for the given claims. This meth...
deep-philology/DeepVocabulary
deep_vocabulary/auth.py
auth.py
py
2,668
python
en
code
3
github-code
1
[ { "api_name": "mozilla_django_oidc.auth.OIDCAuthenticationBackend", "line_number": 5, "usage_type": "name" }, { "api_name": "mozilla_django_oidc.auth.default_username_algo", "line_number": 14, "usage_type": "call" }, { "api_name": "account.models.Account.create", "line_number...
19953368465
import streamlit as st from streamlit_extras.switch_page_button import switch_page def add_eyewitness(): st.header("Add an eyewitness") name = st.text_input("Enter the name of the eyewitness", key='name') desc = st.text_input("Enter a description of the witness", key = 'desc') pic = st.file_upload...
mopasha1/interrogAIte
functions.py
functions.py
py
2,674
python
en
code
0
github-code
1
[ { "api_name": "streamlit.header", "line_number": 4, "usage_type": "call" }, { "api_name": "streamlit.text_input", "line_number": 5, "usage_type": "call" }, { "api_name": "streamlit.text_input", "line_number": 6, "usage_type": "call" }, { "api_name": "streamlit.fil...
5606702695
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from future.utils import with_metaclass import copy import types import wizzat.decorators from wizzat.pghelper import * from wizzat.util import set_defaults __all__ = [ 'DBTable', 'DBTableError', 'D...
wizzat/wizzat.py
wizzat/dbtable.py
dbtable.py
py
13,346
python
en
code
6
github-code
1
[ { "api_name": "wizzat.decorators.decorators.create_cache_obj", "line_number": 54, "usage_type": "call" }, { "api_name": "wizzat.decorators.decorators", "line_number": 54, "usage_type": "attribute" }, { "api_name": "wizzat.decorators", "line_number": 54, "usage_type": "nam...
28538901581
from django.http.response import HttpResponseRedirect from django.shortcuts import render from django.http import HttpResponse from .forms import AddOfferForm from .models import Offer from main.models import Dog import pyrebase from pyrebase.pyrebase import Database config = { "apiKey": "AIzaSyAgaZYQDBNyfMNI3A7o...
zmazk123/GoDoggo
addOffer/views.py
views.py
py
1,416
python
en
code
0
github-code
1
[ { "api_name": "pyrebase.initialize_app", "line_number": 21, "usage_type": "call" }, { "api_name": "forms.AddOfferForm", "line_number": 27, "usage_type": "call" }, { "api_name": "models.Offer", "line_number": 33, "usage_type": "call" }, { "api_name": "django.http.r...
8702203975
import streamlit as st import altair as alt import inspect from vega_datasets import data @st.experimental_memo def get_chart_67593(use_container_width: bool): import altair as alt import pandas as pd data = pd.DataFrame([dict(id=i) for i in range(1, 101)]) person = ( "M1.7 -1.7h-0.8c...
streamlit/release-demos
1.16.0/demo_app_altair/pages/143_Isotype_Grid.py
143_Isotype_Grid.py
py
1,562
python
en
code
78
github-code
1
[ { "api_name": "vega_datasets.data", "line_number": 11, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 11, "usage_type": "call" }, { "api_name": "altair.Chart", "line_number": 23, "usage_type": "call" }, { "api_name": "vega_datasets.data",...
13698381326
"""djangoProject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
jvallee/EmailTemplate
djangoProject/djangoProject/urls.py
urls.py
py
2,252
python
en
code
1
github-code
1
[ { "api_name": "drf_yasg.openapi.Info", "line_number": 32, "usage_type": "call" }, { "api_name": "drf_yasg.openapi", "line_number": 32, "usage_type": "name" }, { "api_name": "drf_yasg.openapi.Contact", "line_number": 37, "usage_type": "call" }, { "api_name": "drf_y...
30329408627
import sqlite3 from flask import Flask, render_template, jsonify, request, json from flask_socketio import SocketIO, send, emit, join_room import paho.mqtt.publish as publish import time import datetime import pygal from random import random # import json # import eventlet # eventlet.monkey_patch() app = Flask(__name_...
Niraj-Kamdar/IoT-Dashboard
myapp.py
myapp.py
py
8,315
python
en
code
2
github-code
1
[ { "api_name": "flask.Flask", "line_number": 13, "usage_type": "call" }, { "api_name": "flask_socketio.SocketIO", "line_number": 18, "usage_type": "call" }, { "api_name": "flask.request.sid", "line_number": 28, "usage_type": "attribute" }, { "api_name": "flask.requ...
10989914554
from typing import Tuple, Optional import torch from torch import nn from towhee.models.max_vit.max_vit_block import MaxViTStage from towhee.models.max_vit.configs import get_configs from towhee.models.utils import create_model as towhee_model class MaxViT(nn.Module): """ Implementation of the MaxViT propose...
towhee-io/towhee
towhee/models/max_vit/max_vit.py
max_vit.py
py
7,262
python
en
code
2,843
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 10, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 10, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 51, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_n...
40068698885
from django.shortcuts import render, redirect from .forms import ContatoForm, ProdutoModelForm, ClienteModelForm from django.contrib import messages from .models import Cliente, Produto # Create your views here. def index(request): prod = Produto.objects.all() context ={ 'prod': prod } retur...
P4J3/django2
core/views.py
views.py
py
2,205
python
pt
code
0
github-code
1
[ { "api_name": "models.Produto.objects.all", "line_number": 10, "usage_type": "call" }, { "api_name": "models.Produto.objects", "line_number": 10, "usage_type": "attribute" }, { "api_name": "models.Produto", "line_number": 10, "usage_type": "name" }, { "api_name": ...
10924482819
from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.support.ui import WebDriverWait import time def no_delay_output(): """ ...
logonmy/spider-mz
utils/selenium_utils.py
selenium_utils.py
py
2,840
python
en
code
0
github-code
1
[ { "api_name": "selenium.webdriver.common.desired_capabilities.DesiredCapabilities.CHROME", "line_number": 19, "usage_type": "attribute" }, { "api_name": "selenium.webdriver.common.desired_capabilities.DesiredCapabilities", "line_number": 19, "usage_type": "name" }, { "api_name": ...
5130368081
# !/usr/bin/env python. # -*- coding: utf-8 -*- import os import glob import fiona import matplotlib import pandas as pd import numpy as np import wradlib as wrl import matplotlib.pyplot as plt from matplotlib import path from osgeo import osr from pathlib import Path from matplotlib.colors impor...
AbbasElHachem/extremes
_57_plot_radar_events_BW_.py
_57_plot_radar_events_BW_.py
py
5,414
python
en
code
0
github-code
1
[ { "api_name": "glob.glob", "line_number": 27, "usage_type": "call" }, { "api_name": "fiona.open", "line_number": 42, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_number": 70, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.get_cmap", ...
72558407395
import uuid from abc import ABC, abstractmethod from decimal import Decimal from typing import List, Optional, Dict from pydantic import BaseModel, Field, computed_field from cache.store import get_provider_html from models.models import ProviderVehiclesRequest, ProviderStoreItem class Calculator(ABC, BaseModel): ...
martijnboers/WelkeDeelauto
backend/models/interface.py
interface.py
py
1,563
python
en
code
0
github-code
1
[ { "api_name": "abc.ABC", "line_number": 12, "usage_type": "name" }, { "api_name": "pydantic.BaseModel", "line_number": 12, "usage_type": "name" }, { "api_name": "models.models.ProviderVehiclesRequest", "line_number": 13, "usage_type": "name" }, { "api_name": "typi...
70673994913
import os import shutil import argparse import subprocess import random import pandas as pd import numpy as np import pickle as pkl import scipy as sp import networkx as nx import scipy.stats as stats import scipy.sparse as sparse from torch import nn from torch import optim from torch.nn import functional as F from ...
KennthShang/PhaBOX
main.py
main.py
py
55,258
python
en
code
16
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 40, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 66, "usage_type": "call" }, { "api_name": "os.path", "line_number": 66, "usage_type": "attribute" }, { "api_name": "os.path.join", ...
17087609247
""" Author: Bradley Fernando Purpose: Uses Netmiko to connect to devices directly instead of using the plugin. Cisco devices also establish connections via SSH keys. Usage: python exercise3.py Output: cisco4# cisco3# nxos2# arista2# arista3# pyclass@srx1> arista1# arista4...
bfernando1/nornir-automation
week7/exercise3/exercise3.py
exercise3.py
py
716
python
en
code
1
github-code
1
[ { "api_name": "nornir.InitNornir", "line_number": 33, "usage_type": "call" } ]
17422403783
import json from glob import glob from pathlib import Path from typing import Any, Dict, List, Optional, Sequence, Union import numpy as np import torch import yaml from PIL import Image from sklearn.model_selection import train_test_split from termcolor import colored from torch.utils.data import Dataset from torchvi...
GerasimovIV/kvasir-seg
src/data_utils/dataset.py
dataset.py
py
8,726
python
en
code
0
github-code
1
[ { "api_name": "termcolor.colored", "line_number": 21, "usage_type": "call" }, { "api_name": "termcolor.colored", "line_number": 25, "usage_type": "call" }, { "api_name": "torch.utils.data.Dataset", "line_number": 28, "usage_type": "name" }, { "api_name": "typing.U...
27166856149
import logging from typing import List import requests from config import settings from models.media import Media class YouTubeService: API_URL = 'https://www.googleapis.com/youtube/v3/' def search_video(self, query: str) -> List[Media]: search_url = self.API_URL + 'search' search_params ...
pythrick/playlist-bot
src/services/youtube.py
youtube.py
py
1,252
python
en
code
4
github-code
1
[ { "api_name": "config.settings.YOUTUBE_API_KEY", "line_number": 18, "usage_type": "attribute" }, { "api_name": "config.settings", "line_number": 18, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 25, "usage_type": "call" }, { "api_name": "log...
12446665048
import math import pandas as pd import numpy as np from sklearn.preprocessing import MinMaxScaler from sklearn.linear_model import LinearRegression from sklearn.metrics import r2_score df = pd.read_csv('S&P500.csv') #Select date variable data = df.filter(['Adj Close']) data = data.values #Get the number of rows t...
Susannnn/Stock-Price-Prediction
LR.py
LR.py
py
1,369
python
en
code
0
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "math.ceil", "line_number": 18, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.MinMaxScaler", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.ar...
42426994810
""" ░░░░░░░░░░░██╗░░░░░░░██╗██╗░░░██╗██████╗░██████╗░███████╗░░░░░░██████╗░░█████╗░██████╗░██████╗░░░░░░░░░░░░ ░░░░░░░░░░░██║░░██╗░░██║██║░░░██║██╔══██╗██╔══██╗╚════██║░░░░░░██╔══██╗██╔══██╗██╔══██╗██╔══██╗░░░░░░░░░░░ ░░░░░░░░░░░╚██╗████╗██╔╝██║░░░██║██║░░██║██║░░██║░░███╔═╝█████╗██║░░██║███████║██████╔╝██████╔╝░░░░░░░...
wuddz-devs/wuddz-dapp
wuddz_dapp/dapp.py
dapp.py
py
42,733
python
en
code
0
github-code
1
[ { "api_name": "warnings.simplefilter", "line_number": 55, "usage_type": "call" }, { "api_name": "os.system", "line_number": 56, "usage_type": "call" }, { "api_name": "platform.system", "line_number": 66, "usage_type": "call" }, { "api_name": "pycoingecko.CoinGecko...
38722585148
import os import pandas as pd from tqdm import tqdm from geopy.geocoders import Nominatim loc_app = Nominatim(user_agent="tutorial") data_load_path = os.path.join('..', '..', 'data', 'train.csv') data_dump_path = os.path.join('..', '..', 'data', 'df_for_plot_on_map.csv') def recognize_location(location: str): ...
tedey-01/TweetsAnalyzer
utility_scripts/UI/plot_tools.py
plot_tools.py
py
1,294
python
en
code
0
github-code
1
[ { "api_name": "geopy.geocoders.Nominatim", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.join", "...
33179678645
# Importing Module from pygame import mixer import customtkinter, tkinter from PIL import Image import eyed3 import os mixer.init() # Variables sList = [] musicFolder = "/home/bir/Music/" current = '' start = False fname = "assets/notfound.jpg" # Functions def changeThumb(): global fname, playImg, mImg audio...
birgrewal/Music-Player-Python
main.py
main.py
py
3,821
python
en
code
1
github-code
1
[ { "api_name": "pygame.mixer.init", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.mixer", "line_number": 8, "usage_type": "name" }, { "api_name": "eyed3.load", "line_number": 20, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_nu...
234780590
import json import pickle import time from hashlib import sha256 # Block class # Block is a class that contains the data and the hash of the previous block # The hash of the previous block is used to link the blocks together # The hash of the block is used to verify the integrity of the chain # We plan to use the block...
huangjien/datachain
blockchain.py
blockchain.py
py
4,690
python
en
code
0
github-code
1
[ { "api_name": "json.dumps", "line_number": 31, "usage_type": "call" }, { "api_name": "hashlib.sha256", "line_number": 32, "usage_type": "call" }, { "api_name": "decouple.config", "line_number": 38, "usage_type": "call" }, { "api_name": "os.path.exists", "line_...
43758227481
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import os.path as osp from os.path import join as pjoin import numpy as np # from distutils import spawn # run: pip install easydict from easydict import EasyDict as edict __C = edict() # get config ...
InnerPeace-Wu/imaterialist_challenge-furniture
lib/config.py
config.py
py
3,576
python
en
code
2
github-code
1
[ { "api_name": "easydict.EasyDict", "line_number": 13, "usage_type": "call" }, { "api_name": "easydict.EasyDict", "line_number": 22, "usage_type": "call" }, { "api_name": "easydict.EasyDict", "line_number": 66, "usage_type": "call" }, { "api_name": "numpy.array", ...
18884483513
import argparse import glob import os import numpy as np from scipy import ndimage from PIL import Image from tqdm import tqdm def main(args): image_paths = glob.glob(os.path.join(args.annotation_train_dir, "*.png")) image_paths.extend(glob.glob(os.path.join(args.annotation_valid_dir, "*.png"))) invalid_i...
hmchuong/Detectron
test_invalid_image.py
test_invalid_image.py
py
2,358
python
en
code
0
github-code
1
[ { "api_name": "glob.glob", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "glob.glob", "line_number": 12...
43472856046
from django import forms from datetime import * from .models import Transaccion from ..cliente.models import Cliente from ..user.models import User class TransaccionForm(forms.ModelForm): # constructor def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) for field in self.Me...
chrisstianandres/pagos
apps/transaccion/forms.py
forms.py
py
2,002
python
en
code
0
github-code
1
[ { "api_name": "django.forms.ModelForm", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 9, "usage_type": "name" }, { "api_name": "user.models.User.objects.none", "line_number": 24, "usage_type": "call" }, { "api_name": "...
37774857793
import argparse import sys from os.path import dirname, realpath sys.path.append(dirname(dirname(realpath(__file__)))) import project.data.dataset_utils as data_utils import project.models.model_utils as model_utils import project.training.train_utils as train_utils import torch.nn as N import os import torch import da...
Sanger2000/Predicting-Lung-Cancer-Disease-Progression-from-CT-reports
scripts/main.py
main.py
py
5,433
python
en
code
0
github-code
1
[ { "api_name": "sys.path.append", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 4, "usage_type": "call" }, { "api_name": "os.path.realpath", "li...
41035595174
""" Debug ORMAdapter calls within ORM runs. Demos:: python tools/trace_orm_adapter.py -m pytest \ test/orm/inheritance/test_polymorphic_rel.py::PolymorphicAliasedJoinsTest::test_primary_eager_aliasing_joinedload python tools/trace_orm_adapter.py -m pytest \ test/orm/test_eager_relations.py::L...
sqlalchemy/sqlalchemy
tools/trace_orm_adapter.py
trace_orm_adapter.py
py
6,124
python
en
code
8,024
github-code
1
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 40, "usage_type": "name" }, { "api_name": "sqlalchemy.sql.elements.ColumnElement", "line_number": 50, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 50, "usage_type": "name" }, { "api_name": ...
7531610125
import torch from torch.nn.utils.rnn import pad_sequence from transformers4ime.data.logits_processor import ConstrainedLogitsProcessor class PinyinGPTConcatLogitsProcessor(ConstrainedLogitsProcessor): def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, constraint_id) -> torch.FloatTensor:...
VisualJoyce/Transformers4IME
src/transformers4ime/data/logits_processor/pinyingpt_concat.py
pinyingpt_concat.py
py
976
python
en
code
17
github-code
1
[ { "api_name": "transformers4ime.data.logits_processor.ConstrainedLogitsProcessor", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.LongTensor", "line_number": 9, "usage_type": "attribute" }, { "api_name": "torch.FloatTensor", "line_number": 9, "usage_type":...
1117221641
import os import re import gspread from oauth2client.service_account import ServiceAccountCredentials import convertapi import cv2 import pytesseract from pdfminer.high_level import extract_text from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from django.shortcuts import render from .forms imp...
samarth-ty/pdf_parser
app/views.py
views.py
py
5,994
python
en
code
0
github-code
1
[ { "api_name": "re.compile", "line_number": 15, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 16, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 17, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 20, ...
5230043340
import tempfile import pdfkit from django.contrib import messages from django.http import FileResponse from django.shortcuts import render from django.template.loader import get_template from rest_framework import generics from rest_framework.permissions import ( SAFE_METHODS, BasePermission, IsAuthenti...
mumoj/Music-Festival-Scheduling
performances/views.py
views.py
py
3,203
python
en
code
0
github-code
1
[ { "api_name": "rest_framework.permissions.BasePermission", "line_number": 25, "usage_type": "name" }, { "api_name": "rest_framework.permissions.SAFE_METHODS", "line_number": 31, "usage_type": "name" }, { "api_name": "rest_framework.generics.RetrieveUpdateAPIView", "line_numbe...
12565261862
# -*- coding: utf-8 -*- import itertools from Text_terms import * from Symmetrical_summ import * from Templates import * # пересчет весов для предложений def countFinalWeights(tf_weights, stemmed_text, stemmed_pnn): weighted_terms = dict(tf_weights.items()) total_sents_in_text = stemmed_text.len ...
Svetych/aspect_ats_system
Auto_text_summ.py
Auto_text_summ.py
py
12,128
python
ru
code
1
github-code
1
[ { "api_name": "itertools.chain.from_iterable", "line_number": 15, "usage_type": "call" }, { "api_name": "itertools.chain", "line_number": 15, "usage_type": "attribute" }, { "api_name": "itertools.chain.from_iterable", "line_number": 21, "usage_type": "call" }, { "...
42152249060
""" Define commonly used dialogs. """ import ceGUI import cx_Exceptions import cx_Logging import os import wx __all__ = [ "AboutDialog", "PreferencesDialog", "SelectionListDialog", "SelectionCheckListDialog", "SelectionTreeDialog" ] class AboutDialog(ceGUI.Dialog): baseSettingsName = "w_About" c...
anthony-tuininga/cx_PyGenLib
ceGUI/CommonDialogs.py
CommonDialogs.py
py
10,197
python
en
code
3
github-code
1
[ { "api_name": "ceGUI.Dialog", "line_number": 15, "usage_type": "attribute" }, { "api_name": "wx.CAPTION", "line_number": 21, "usage_type": "attribute" }, { "api_name": "wx.GetApp", "line_number": 24, "usage_type": "call" }, { "api_name": "ceGUI.Panel", "line_n...
3237033272
# -*- coding: utf-8 -*- # Traffic Data Process Automatically # Xin Meng # 2015.11.02 # This script is used for process the traffic txt file. # 1. Set the configure # 2. Run this script and get the result. import csv import os import logging import re import utils.network __author__ = 'xin' # configuration variable #...
xinmeng1/MobileBotnetAnalysisLab
old/TrafficDataProcessAuto.py
TrafficDataProcessAuto.py
py
37,434
python
en
code
3
github-code
1
[ { "api_name": "os.path.split", "line_number": 41, "usage_type": "call" }, { "api_name": "os.path", "line_number": 41, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 41, "usage_type": "call" }, { "api_name": "os.path.split", "line...
2845928618
import cv2 import os import time from time import sleep import numpy as np import pytesseract import threading from actions import doAction import nxbt import copy import torch from predictor import divide, predict #pytesseract.pytesseract.tesseract_cmd = r'C:/Program Files/Tesseract-OCR/tesseract.exe' r...
yannik603/Smash-Ultimate-Bot
env.py
env.py
py
5,142
python
en
code
3
github-code
1
[ { "api_name": "numpy.array", "line_number": 19, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 20, "usage_type": "call" }, { "api_name": "cv2.COLOR_RGB2BGR", "line_number": 20, "usage_type": "attribute" }, { "api_name": "cv2.cvtColor", "l...
20731047468
from bs4 import BeautifulSoup as BSHTML import os import re html_directory = "data/patent_htmls/" fp_citations_dir = 'data/fp_citations_from_html' if not os.path.exists(fp_citations_dir): os.makedirs(fp_citations_dir) citations_per_patent = dict() # key is patent_number; value is array of citation texts ref_lo...
tmleiden/citation-extraction-with-flair
get_fp_citations_from_html.py
get_fp_citations_from_html.py
py
1,861
python
en
code
5
github-code
1
[ { "api_name": "os.path.exists", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number": 9, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": ...
10002081821
import ipv6_utils import log from static import OF_TABLE_NUM from static import WLAN_IFACE from static import GW_IFACE from switch import OFRule from switch import Switch from switch import Link from switch import AccessPointConf from switch import GatewayConf from event import * # End import from iJOIN solution fil...
ODMM/openflow-dmm
nmm/nmm.py
nmm.py
py
12,501
python
en
code
3
github-code
1
[ { "api_name": "ryu.base.app_manager.RyuApp", "line_number": 36, "usage_type": "attribute" }, { "api_name": "ryu.base.app_manager", "line_number": 36, "usage_type": "name" }, { "api_name": "ryu.ofproto.ofproto_v1_3.OFP_VERSION", "line_number": 45, "usage_type": "attribute"...
10453439788
import torch.utils.data as data import PIL.Image as Image import os import numpy as np import torch from torch.utils.data import DataLoader from torch import autograd, optim from torchvision.transforms import transforms from networks.cenet import CE_Net_ import cv2 import nibabel as nib import time x_transforms = tra...
18792676595/U-Net-for-liver-tumor-segmentation
nii_to_endnii.py
nii_to_endnii.py
py
4,742
python
en
code
2
github-code
1
[ { "api_name": "torchvision.transforms.transforms.Compose", "line_number": 14, "usage_type": "call" }, { "api_name": "torchvision.transforms.transforms", "line_number": 14, "usage_type": "name" }, { "api_name": "torchvision.transforms.transforms.ToTensor", "line_number": 15, ...
13649089846
import json from rest_framework import status from api.constans import AutoNotificationConstants, TaskStageConstants, \ CopyFieldConstants from api.models import * from api.tests import GigaTurnipTestHelper, to_json class CategoryTest(GigaTurnipTestHelper): def test_list_categories(self): products_...
KloopMedia/GigaTurnip
api/tests/test_category.py
test_category.py
py
2,712
python
en
code
2
github-code
1
[ { "api_name": "api.tests.GigaTurnipTestHelper", "line_number": 11, "usage_type": "name" }, { "api_name": "rest_framework.status.HTTP_200_OK", "line_number": 80, "usage_type": "attribute" }, { "api_name": "rest_framework.status", "line_number": 80, "usage_type": "name" }...
16284337583
from os import environ as env from setuptools import find_packages, setup from setuptools.command.install import install import sys VERSION = "0.1.0" with open("README.md", "r", encoding="utf-8") as rdm: long_description = rdm.read() class VerifyVersionCommand(install): """Custom command to verify that the ...
BentoBox-Project/clipenv
setup.py
setup.py
py
1,715
python
en
code
2
github-code
1
[ { "api_name": "setuptools.command.install.install", "line_number": 12, "usage_type": "name" }, { "api_name": "os.environ.get", "line_number": 17, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 17, "usage_type": "name" }, { "api_name": "sys.exit...
12632788840
# -*- coding: utf-8 -*- #http://labs.eecs.tottori-u.ac.jp/sd/Member/oyamada/OpenCV/html/py_tutorials/py_imgproc/py_morphological_ops/py_morphological_ops.html #ROSとOpenCVの競合を避ける import sys try: py_path = sys.path ros_CVpath = '/opt/ros/kinetic/lib/python2.7/dist-packages' if py_path[3] == ros_CVpath: ...
TANUKIpro/color_tracker
hsv_supporter.py
hsv_supporter.py
py
6,909
python
en
code
0
github-code
1
[ { "api_name": "sys.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sys.path.remove", "line_number": 12, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_numbe...
5737721660
import click from screeps_loan import app import screepsapi.screepsapi as screepsapi from screeps_loan.models.db import get_conn from screeps_loan.screeps_client import get_client from screeps_loan.models import db from screeps_loan.services.cache import cache import screeps_loan.models.alliances as alliances import s...
LeagueOfAutomatedNations/Screeps-LoAN
screeps_loan/cli/import_rankings.py
import_rankings.py
py
9,032
python
en
code
13
github-code
1
[ { "api_name": "math.pow", "line_number": 26, "usage_type": "call" }, { "api_name": "screeps_loan.services.cache.cache.cache", "line_number": 37, "usage_type": "call" }, { "api_name": "screeps_loan.services.cache.cache", "line_number": 37, "usage_type": "name" }, { ...
41096561337
# imports import datetime as dt import os import os.path as osp import time import numpy as np from .global_imports.smmpl_opcodes import * from .quickscanpat_calc import quickscanpat_calc from .sop import sigmampl_boot # params _nodoubleinit_l = [ 'suncone' ] # main func def main(quickscantype=None, **quicksc...
citypilgrim/smmpl_opcodes
quickscan_main.py
quickscan_main.py
py
2,652
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime.now", "line_number": 33, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 33, "usage_type": "attribute" }, { "api_name": "datetime.datetime.combine", "line_number": 38, "usage_type": "call" }, { "api_name":...
36905506190
import os import torch import numpy as np import matplotlib.pyplot as plt from sklearn.manifold import TSNE from torchvision import transforms from PIL import Image from typing import List from tqdm import tqdm from two_tower_model.tower import TwoTowerModel from two_tower_model.selectivesearch import selective_search,...
RickyDoge/WFGN
dataset/data_prepare.py
data_prepare.py
py
4,068
python
en
code
0
github-code
1
[ { "api_name": "typing.List", "line_number": 14, "usage_type": "name" }, { "api_name": "torch.Tensor", "line_number": 14, "usage_type": "attribute" }, { "api_name": "typing.List", "line_number": 27, "usage_type": "name" }, { "api_name": "torchvision.transforms.Comp...
927501499
from __future__ import print_function import argparse import random import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision.transforms as transforms import torchvision.util...
coimbra574/Projeto_IA376
src/data/generate_samples_WGAN.py
generate_samples_WGAN.py
py
2,902
python
en
code
1
github-code
1
[ { "api_name": "random.seed", "line_number": 25, "usage_type": "call" }, { "api_name": "torch.manual_seed", "line_number": 26, "usage_type": "call" }, { "api_name": "torch.cuda.manual_seed", "line_number": 27, "usage_type": "call" }, { "api_name": "torch.cuda", ...
1918061715
#!/usr/bin/env python # coding=utf-8 """ TBW """ from __future__ import absolute_import from __future__ import print_function from collections import MutableSequence import io import os import random from ipapy.compatibility import to_str from ipapy.compatibility import to_unicode_string __author__ = "Alberto Petta...
pettarin/wiktts
wiktts/lexicon.py
lexicon.py
py
5,575
python
en
code
5
github-code
1
[ { "api_name": "collections.MutableSequence", "line_number": 48, "usage_type": "name" }, { "api_name": "ipapy.compatibility.to_str", "line_number": 83, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 139, "usage_type": "call" }, { "api_name":...
26025847015
from inspect import getcomments from pickle import FALSE, TRUE import ee import geemap import datetime import pandas as pd import shapely.wkt import multiprocessing ee.Initialize() visParamsTrue = {'bands': ['B4', 'B3', 'B2'], min: 0, max: 2000} CLOUD_FILTER = 50 CLD_PRB_THRESH = 50 NIR_DRK_THRESH = 0.15 CLD_PRJ_DIST ...
aakashthapa22/Parcel-Level-Flood-and-Drought-Detection-using-AI
NDVI and NDWI on Sentinel-2A images/NDVINDWI.py
NDVINDWI.py
py
11,646
python
en
code
1
github-code
1
[ { "api_name": "ee.Initialize", "line_number": 9, "usage_type": "call" }, { "api_name": "shapely.wkt.wkt.loads", "line_number": 20, "usage_type": "call" }, { "api_name": "shapely.wkt.wkt", "line_number": 20, "usage_type": "attribute" }, { "api_name": "shapely.wkt",...
10121361892
import socket import numpy as np from gym import spaces import pickle #import paramiko import copy import os class DCS_env: def __init__(self, host_ip='192.168.3.37', host_port=30000, size=1024): # 参数调整 self.state_dim = 12 self.action_dim = 7 self.observation_space = spaces.Box(low=...
BillChan226/RL_Plane_Strategy
rl_algorithms/algos/ppo/DCS_environment.py
DCS_environment.py
py
4,736
python
en
code
4
github-code
1
[ { "api_name": "gym.spaces.Box", "line_number": 14, "usage_type": "call" }, { "api_name": "gym.spaces", "line_number": 14, "usage_type": "name" }, { "api_name": "numpy.inf", "line_number": 14, "usage_type": "attribute" }, { "api_name": "numpy.float32", "line_nu...
19802050508
import os import argparse import joblib import pandas as pd from sklearn import metrics from sklearn import tree import config import model_dispatcher def run(fold, model): #read the training data with folds df = pd.read_csv(config.TRAINING_FILE) #to replace by feature engineering df = df.drop(['Nam...
vitormnsousa/ml-template
src/train.py
train.py
py
1,731
python
en
code
0
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 14, "usage_type": "call" }, { "api_name": "config.TRAINING_FILE", "line_number": 14, "usage_type": "attribute" }, { "api_name": "model_dispatcher.models", "line_number": 35, "usage_type": "attribute" }, { "api_name":...
29614390408
import librosa, librosa.display import os import pandas as pd import numpy as np def normalize_volume(file_path): y, sr = librosa.load(file_path) y_norm = librosa.util.normalize(y, axis=0) return y_norm, sr def extract_features(y_norm, sr): features = [] # Tempo and beats tempo, beats = libr...
rsmassey/mcats
mcats/wav_extraction/feature_extraction.py
feature_extraction.py
py
1,454
python
en
code
0
github-code
1
[ { "api_name": "librosa.load", "line_number": 7, "usage_type": "call" }, { "api_name": "librosa.util.normalize", "line_number": 8, "usage_type": "call" }, { "api_name": "librosa.util", "line_number": 8, "usage_type": "attribute" }, { "api_name": "librosa.beat.beat_...
11324625878
from __future__ import annotations from typing import Any, List, Literal, Optional, TYPE_CHECKING, Tuple, Type, TypeVar, Callable, Union, Dict, overload from contextvars import ContextVar import inspect import os from .item import Item, ItemCallbackType from ..enums import ChannelType, ComponentType from ..partial_emo...
Rapptz/discord.py
discord/ui/select.py
select.py
py
32,941
python
en
code
13,719
github-code
1
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 27, "usage_type": "name" }, { "api_name": "typing_extensions.TypeAlias", "line_number": 39, "usage_type": "name" }, { "api_name": "typing.Literal", "line_number": 39, "usage_type": "name" }, { "api_name": "enums...
19235227239
from IAF.flows.iaf import IAF_mod from torch import nn import torch class IAF_flow(nn.Module): def __init__(self, dim, n_flows,tanh_flag,C=100): super().__init__() self.flow = nn.ModuleList([ IAF_mod(dim,dim,dim) for _ in range(n_flows) ]) self.C = C self.tanh_fla...
MrHuff/DIF-NLDL
IAF/IAF.py
IAF.py
py
621
python
en
code
0
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 4, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 4, "usage_type": "name" }, { "api_name": "torch.nn.ModuleList", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.nn", "line_n...
21087590741
import argparse import matplotlib.pyplot as plt import numpy as np import h5py import gusto_dataset global_vars = dict(num_files=0, file_index=0) def plot_faces(filename, args): dset = gusto_dataset.GustoDataset(filename) segments = dset.get_face_segments() for seg in segments: plt.plot(seg[:,0]...
jzrake/gusto
plot.py
plot.py
py
3,290
python
en
code
0
github-code
1
[ { "api_name": "gusto_dataset.GustoDataset", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 15, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 15, "usage_type": "name" }, { "api_name": "m...
8558487936
from gensim.models.doc2vec import TaggedDocument from utils import ExecutionTime def tagging(cleaned_text: list): print('Tagging started...') t = ExecutionTime() t.start() idx = [str(i) for i in range(len(cleaned_text))] tagged_text = [] for i in range(len(cleaned_text)): tagged_text.a...
Cashaqu/wine_advisor
tagging.py
tagging.py
py
467
python
en
code
0
github-code
1
[ { "api_name": "utils.ExecutionTime", "line_number": 7, "usage_type": "call" }, { "api_name": "gensim.models.doc2vec.TaggedDocument", "line_number": 12, "usage_type": "call" } ]
12922555819
# De Django from django.urls import path # Propios from . import views urlpatterns = [ path('',views.home,name='home'), path('manual',views.manual,name='manual'), path('login',views.login_page,name='login-page'), path('register',views.register,name='register'), path('logout',views.logout_staff,name...
Haziel-Soria-Trejo/GymAdmin
base/urls.py
urls.py
py
544
python
en
code
0
github-code
1
[ { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "django.urls.path", ...
14152913313
# -*- coding: utf-8 -*- import re from flask import redirect, url_for id_check = re.compile('([0-9a-f]+)') genre_check = re.compile('([0-9a-z_]+)') zip_check = re.compile('([0-9a-zA-Z_.-]+.zip)') fb2_check = re.compile('([ 0-9a-zA-ZА-Яа-я_,.:!-]+.fb2)') def unurl(s: str): tr = { '%22': '"', '%27...
stanislavvv/fb2_srv_pseudostatic
app/validate.py
validate.py
py
1,643
python
en
code
0
github-code
1
[ { "api_name": "re.compile", "line_number": 6, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 7, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 8, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 9, ...
24253712581
import maze from PIL import Image, ImageDraw import time from sys import argv def print_maze(side, mymaze): print("|-" * side + "|") for i, slot in enumerate(mymaze): print(slot, end=' ') if slot is not None else print('X', end=' ') if (i + 1) % (side) == 0: print("") print("|-"...
Araggar/INE5417-MazeRunner
greyscale.py
greyscale.py
py
2,073
python
en
code
1
github-code
1
[ { "api_name": "time.time", "line_number": 26, "usage_type": "call" }, { "api_name": "PIL.Image.new", "line_number": 27, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 27, "usage_type": "name" }, { "api_name": "PIL.ImageDraw.Draw", "line_numb...
35627619001
from pytube import YouTube def checkVideoResolution(tmp): videoResolution = ["2160p","1440p","1080p","720p","480p","360p","240p", "144p"] array = [] url = YouTube(tmp) for i in range(len(videoResolution)): if(len(url.streams.filter(adaptive=True, file_extension='mp4', res=videoResolution[i]))>0)...
RamkaTheRacist/python-RTR
PY_les10_s/HW/ytdl/dloadlogic/resolutions.py
resolutions.py
py
699
python
en
code
0
github-code
1
[ { "api_name": "pytube.YouTube", "line_number": 5, "usage_type": "call" }, { "api_name": "pytube.YouTube", "line_number": 14, "usage_type": "call" } ]
36112486215
import sys import getopt import numpy as np import scipy from scipy import ndimage from os import listdir import matplotlib.pyplot as plt def Read_CSV(fname): f = open(fname, "r") Y = np.empty((1, 0)) X = np.empty((64*64*3,0)) i=0 for line in f: data = line.split(',') with urllib.re...
palafrank/simpleNN
classifier.py
classifier.py
py
12,102
python
en
code
0
github-code
1
[ { "api_name": "numpy.empty", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.empty", "line_number": 12, "usage_type": "call" }, { "api_name": "scipy.ndimage.imread", "line_number": 18, "usage_type": "call" }, { "api_name": "scipy.ndimage", "lin...
12288030546
#!/usr/bin/env python2.7 import numpy as np import cv2 import glob import json from copy import copy import os class Configure(): def __init__(self): self.objpoints = [] self.imgpoints = [] self.height = 480 self.width = 640 def getCalibrationParameters(self): dim = (8,...
pbsinclair42/SDP-2016
vision/scripts/get_camera_configuration.py
get_camera_configuration.py
py
2,294
python
en
code
2
github-code
1
[ { "api_name": "numpy.zeros", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.float32", "line_number": 18, "usage_type": "attribute" }, { "api_name": "numpy.mgrid", "line_number": 19, "usage_type": "attribute" }, { "api_name": "glob.glob", "line...
72337035875
from bs4 import BeautifulSoup import requests import json import time import random headers = { 'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36' } # GetAllLinksAndNamesFromPolitics res = requests.get(f'https://www....
Artemxxx2/ParserGermanParliament
ParliamentParser.py
ParliamentParser.py
py
3,214
python
en
code
0
github-code
1
[ { "api_name": "requests.get", "line_number": 11, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 16, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 21, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_nu...
39560557801
import streamlit as st import numpy as np import pandas as pd import plotly.express as px from wordcloud import WordCloud, STOPWORDS import matplotlib.pyplot as plt from datetime import datetime import db st.title("Product Review Analysis") st.sidebar.title("Select Your Choices") st.set_option('deprecation.showPyplotG...
AnythingIsFineLambton/Product_Review
Home.py
Home.py
py
3,036
python
en
code
0
github-code
1
[ { "api_name": "streamlit.title", "line_number": 10, "usage_type": "call" }, { "api_name": "streamlit.sidebar.title", "line_number": 11, "usage_type": "call" }, { "api_name": "streamlit.sidebar", "line_number": 11, "usage_type": "attribute" }, { "api_name": "stream...
39601964882
import datetime import json import requests from django.conf import settings from django.db import models class Bill(models.Model): created_at = models.DateTimeField(auto_now_add=True) comment = models.CharField(max_length=45, default='') amount = models.FloatField(default=1.00) status = models.Char...
AlexFire-Dev/Billing
apps/bills/models.py
models.py
py
2,918
python
en
code
0
github-code
1
[ { "api_name": "django.db.models.Model", "line_number": 10, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 10, "usage_type": "name" }, { "api_name": "django.db.models.DateTimeField", "line_number": 11, "usage_type": "call" }, { "api_n...
43819454476
from sqlalchemy import and_ from sqlalchemy import delete from sqlalchemy import desc from sqlalchemy import select from sqlalchemy.orm import Session from danswer.db.models import ConnectorCredentialPair from danswer.db.models import DeletionAttempt from danswer.db.models import DeletionStatus from danswer.db.models ...
wuzhiping/danswer
backend/danswer/db/deletion_attempt.py
deletion_attempt.py
py
2,567
python
en
code
0
github-code
1
[ { "api_name": "danswer.db.models.ConnectorCredentialPair", "line_number": 14, "usage_type": "name" }, { "api_name": "danswer.db.models.IndexingStatus.IN_PROGRESS", "line_number": 24, "usage_type": "attribute" }, { "api_name": "danswer.db.models.IndexingStatus", "line_number":...
15072056728
from os import path from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.test import TestCase, override_settings from django.test.client import RequestFactory from django.urls import reverse from ..errors import ( AttachmentTooLargeError, AuthenticationError, ) from...
yunojuno-archive/django-inbound-email
inbound_email/tests/test_views.py
test_views.py
py
8,035
python
en
code
67
github-code
1
[ { "api_name": "django.test.TestCase", "line_number": 31, "usage_type": "name" }, { "api_name": "django.test.client.RequestFactory", "line_number": 42, "usage_type": "call" }, { "api_name": "django.urls.reverse", "line_number": 43, "usage_type": "call" }, { "api_na...
25108675279
#!/usr/bin/env python # xml parsing help from https://www.geeksforgeeks.org/reading-and-writing-xml-files-in-python/?ref=lbp # to run you need to do # `pip3 install beautifulsoup4` # `pip3 install lxml` import argparse import datetime from bs4 import BeautifulSoup class Card(object): """ a ca...
brooks42/pkto
scripts/set_editor_script.py
set_editor_script.py
py
9,191
python
en
code
5
github-code
1
[ { "api_name": "datetime.datetime.now", "line_number": 42, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 42, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 189, "usage_type": "call" }, { "api_name": ...
26721674595
import json from flask import Flask, render_template, jsonify, request, make_response, current_app from random import * from flask_cors import CORS from itsdangerous import TimedJSONWebSignatureSerializer as Serializer import logging from logging.handlers import RotatingFileHandler from flask_httpauth import HTTPToken...
Ciscol/license_backend
run.py
run.py
py
6,038
python
en
code
0
github-code
1
[ { "api_name": "logging.basicConfig", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 13, "usage_type": "attribute" }, { "api_name": "logging.handlers.RotatingFileHandler", "line_number": 14, "usage_type": "call" }, { "api_n...
43184453169
import cv2 import numpy as np import os # from .myEdgeDetector import myCanny from myHoughLines import Handwrite_HoughLines from myHoughTransform import Handwrite_HoughTransform # parameters sigma = 2 threshold = 0.03 rhostep = 2 thetastep = np.pi / 90 num_lines = 15 # end of parameters img0 = cv2.imread(...
TaikiShuttle/ECE4880J
hw3/houghScript.py
houghScript.py
py
1,668
python
en
code
1
github-code
1
[ { "api_name": "numpy.pi", "line_number": 13, "usage_type": "attribute" }, { "api_name": "cv2.imread", "line_number": 17, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 20, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_...
15359754817
import os import cv2 import matplotlib.pyplot as plt import numpy as np import yaml class Map: ''' Wraps ros2 map into a class ''' def __init__(self): self.yaml_path = '' self.image_path = '' self.image = None self.resolution = None self.origin = [0.0,...
JChunX/libf1tenth
libf1tenth/planning/map.py
map.py
py
5,213
python
en
code
0
github-code
1
[ { "api_name": "yaml.load", "line_number": 36, "usage_type": "call" }, { "api_name": "yaml.FullLoader", "line_number": 36, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 39, "usage_type": "call" }, { "api_name": "os.path", "line_numbe...
487845027
from PIL import Image import colorsys import numpy as np nx, ny = 128, 128 def createHSVimage(hue, sat, val, alpha): rgba = [] # convert hsv -> rgb for h, s, v, a in zip(hue.tolist(), sat.tolist(), val.tolist(), alpha.tolist()): r, g, b = colorsys.hsv_to_rgb(h, s, v) rgba.append( (int(255*r...
will-henney/phabc2-post
mhdcuts-Bkey.py
mhdcuts-Bkey.py
py
2,188
python
en
code
1
github-code
1
[ { "api_name": "colorsys.hsv_to_rgb", "line_number": 10, "usage_type": "call" }, { "api_name": "PIL.Image.new", "line_number": 13, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 13, "usage_type": "name" }, { "api_name": "PIL.Image.FLIP_TOP_BOTTOM...
29123925476
import glob import os import shutil import subprocess from conftest import aws_credentials_required # External modules import pytest def pyinstaller_exists(): return shutil.which('pyinstaller') is not None # PyTest doesn't let you place skipif markers on fixures. Otherwise, # we'd ideally be able to do that a...
nchammas/flintrock
tests/test_pyinstaller_packaging.py
test_pyinstaller_packaging.py
py
1,977
python
en
code
629
github-code
1
[ { "api_name": "shutil.which", "line_number": 13, "usage_type": "call" }, { "api_name": "subprocess.run", "line_number": 22, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_numb...
25810988721
import json from matplotlib import pyplot as plt import numpy as np import pandas as pd from drawing import draw_pitch def import_xtvalues(): with open('input_data/open_xt_12x8_v1.json', 'r') as f: xTvalues = np.array(json.load(f)) return xTvalues def offset_df(df, dx, dy): df = df.copy() df.x =...
omarkorim98/Football-Data-Analysis-master
data_statistics/threat_Potential/threat_values.py
threat_values.py
py
1,704
python
en
code
1
github-code
1
[ { "api_name": "numpy.array", "line_number": 9, "usage_type": "call" }, { "api_name": "json.load", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 25, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": ...
69895816035
"""empty message Revision ID: 7a0cb1100d0a Revises: 3c79ca63799e Create Date: 2022-06-19 23:56:15.292951 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '7a0cb1100d0a' down_revision = '3c79ca63799e' branch_labels = None depe...
luvyingying/IntelligentFaultHandlingSystem
migrations/versions/7a0cb1100d0a_.py
7a0cb1100d0a_.py
py
969
python
en
code
1
github-code
1
[ { "api_name": "alembic.op.drop_column", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "alembic.op.add_column", "line_number": 22, "usage_type": "call" }, { "api_name": "alembic.op", ...
25793358290
import numpy as np from scipy.sparse import csr_matrix, vstack, isspmatrix_csr from tqdm import tqdm def tfidf_with_dates_to_weekly_term_counts(term_value_array, uspto_week_dates): number_of_rows, number_of_terms = term_value_array.shape week_counts_csr = None if not isspmatrix_csr(term_value_array): ...
Haydn8/pyGrams
scripts/utils/datesToPeriods.py
datesToPeriods.py
py
2,011
python
en
code
null
github-code
1
[ { "api_name": "scipy.sparse.isspmatrix_csr", "line_number": 10, "usage_type": "call" }, { "api_name": "scipy.sparse.csr_matrix", "line_number": 11, "usage_type": "call" }, { "api_name": "scipy.sparse.csr_matrix", "line_number": 14, "usage_type": "call" }, { "api_n...
74525946592
from collections import namedtuple import dgl from dgl.data.tree import SSTDataset SSTBatch = namedtuple('SSTBatch', ['graph', 'mask', 'wordid', 'label']) trainset = SSTDataset(mode='tiny') tiny_sst = trainset.trees num_vocabs = trainset.num_vocabs num_classes = trainset.num_classes vocab = trainset.voc...
acproject/GNNs
GNN/Model/TreeLSTM.py
TreeLSTM.py
py
9,765
python
en
code
1
github-code
1
[ { "api_name": "collections.namedtuple", "line_number": 6, "usage_type": "call" }, { "api_name": "dgl.data.tree.SSTDataset", "line_number": 8, "usage_type": "call" }, { "api_name": "dgl.batch", "line_number": 31, "usage_type": "call" }, { "api_name": "networkx.nx_a...
16780787848
import datetime class exception(): """ exception(name: str, starttime: datetime, stoptime: datetime, value: bool) exceptions used when schemes should be overriden Methods: check if starttime and stoptime is now, if true return value """ def __init__(self, name: str, ...
gurkslask/tiddur
app/time_cmd/exception.py
exception.py
py
738
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime", "line_number": 16, "usage_type": "attribute" }, { "api_name": "datetime.datetime", "line_number": 17, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 25, "usage_type": "call" }, { "api_name": "d...
39594408669
# editor: Wang Zhixiong from typing import TypeVar, Generic, List, Iterator from typing import Any from typing import Union from typing import Generator from typing import Callable from typing import Optional K = Union[str, int, float] D = Union[None, str, int, float] class TreeNode: def __init__(se...
Zhixiong-Wang/CPO-Dreams-of-billion-girs_lab2_varliant6
immutable.py
immutable.py
py
6,679
python
en
code
0
github-code
1
[ { "api_name": "typing.Union", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 10, "usage_type": "name" }, { "api_name": "typing.Iterator", "line_number": 22, "usage_type": "name" }, { "api_name": "typing.Any", "line_numbe...
39998519394
import unittest import os import shutil import copy import config as cfg from analyzer import Analyzer class ConfigTestCase(unittest.TestCase): def test_analyzer(self): ana1 = cfg.Analyzer( Analyzer, toto = '1', tata = 'a' ) # checking that the ana...
cbernet/heppy
heppy/framework/test_config.py
test_config.py
py
2,810
python
en
code
9
github-code
1
[ { "api_name": "unittest.TestCase", "line_number": 9, "usage_type": "attribute" }, { "api_name": "config.Analyzer", "line_number": 12, "usage_type": "call" }, { "api_name": "analyzer.Analyzer", "line_number": 13, "usage_type": "argument" }, { "api_name": "config.MC...
25646551717
# -*- coding: utf-8 -*- # @Time : 2021/3/2 11:25 # @Author : Zoey # @File : add_member_page.py # @describe: from selenium.webdriver.common.by import By from seleniumPO.pyse.pyselenium import PySelenium class AddMemberPage: def __init__(self, driver): self.driver = driver self.element = PyS...
ZhangYi8326/Selenium_Zoey
seleniumPO/page/add_member_page.py
add_member_page.py
py
1,338
python
en
code
0
github-code
1
[ { "api_name": "seleniumPO.pyse.pyselenium.PySelenium", "line_number": 14, "usage_type": "call" }, { "api_name": "selenium.webdriver.common.by.By.ID", "line_number": 22, "usage_type": "attribute" }, { "api_name": "selenium.webdriver.common.by.By", "line_number": 22, "usage...
42548147202
from django.core.paginator import Paginator from django.http import Http404 from django.shortcuts import render from .converters import DateConverter from books.models import Book def books_view(request): template = 'books/books_list.html' context = {'books': Book.objects.all()} return render(request, te...
graticule/django-homeworks
2.1-databases/models_list_displaying/books/views.py
views.py
py
1,375
python
en
code
0
github-code
1
[ { "api_name": "books.models.Book.objects.all", "line_number": 11, "usage_type": "call" }, { "api_name": "books.models.Book.objects", "line_number": 11, "usage_type": "attribute" }, { "api_name": "books.models.Book", "line_number": 11, "usage_type": "name" }, { "ap...
21168992917
""" Question: 3. Create a python script that parses jmeter log files in CSV format, and in the case if there are any non-successful endpoint responses recorded in the log, prints out the label, response code, response message, failure message, and the time of non-200 response in human-readable format in PST timezone (e...
ujwalnitha/qa-python-exercises
exercise3/filter_responses.py
filter_responses.py
py
2,635
python
en
code
0
github-code
1
[ { "api_name": "pandas.options", "line_number": 27, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_number": 35, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 50, "usage_type": "call" }, { "api_name": "datetime.timez...
28548701178
#!/usr/bin/python # Python import logging from datetime import datetime from time import mktime # Libraries import feedparser # Local import lifestream logger = logging.getLogger('Atom') lifestream.arguments.add_argument('type') lifestream.arguments.add_argument('url') args = lifestream.arguments.parse_args() Lif...
aquarion/Lifestream
imports/atom.py
atom.py
py
884
python
en
code
7
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "lifestream.arguments.add_argument", "line_number": 15, "usage_type": "call" }, { "api_name": "lifestream.arguments", "line_number": 15, "usage_type": "attribute" }, { "api...
28557952081
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('docs', '0002_drop_doccomments'), ] operations = [ migrations.CreateModel( name='DocPageAlias', field...
postgres/pgweb
pgweb/docs/migrations/0003_docs_alias.py
0003_docs_alias.py
py
880
python
en
code
66
github-code
1
[ { "api_name": "django.db.migrations.Migration", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.migrations.CreateModel", "line_number": 14, "usage_type": "call" }, ...
29476078580
from itertools import count from numpy import poly1d import streamlit as st from streamlit_option_menu import option_menu import pandas as pd import re # Data Viz Pkgs import plotly import plotly.express as px import plotly.graph_objs as go from db_fxns import add_data, create_table, view_all_data, get_name, view_uni...
kinteog/sam-diseaseprediction
database_page.py
database_page.py
py
19,402
python
en
code
0
github-code
1
[ { "api_name": "streamlit.title", "line_number": 18, "usage_type": "call" }, { "api_name": "streamlit.info", "line_number": 20, "usage_type": "call" }, { "api_name": "streamlit.sidebar", "line_number": 21, "usage_type": "attribute" }, { "api_name": "streamlit_optio...
38543312863
import tensorflow as tf from tensorflow import keras import numpy as np import matplotlib.pyplot as plt from keras.models import load_model import time total_starttime = time.time() generator = load_model(r'C:\Licenta\GAN_IMAGES\model_16_batch\generator_model_99.h5') damaged_directory = r"C:\Licenta\GAN_I...
acuiram/DCGAN-with-U-Net
load_model.py
load_model.py
py
1,410
python
en
code
1
github-code
1
[ { "api_name": "time.time", "line_number": 8, "usage_type": "call" }, { "api_name": "keras.models.load_model", "line_number": 10, "usage_type": "call" }, { "api_name": "tensorflow.keras.utils.image_dataset_from_directory", "line_number": 13, "usage_type": "call" }, { ...
22611037359
# coding: utf-8 import time from admin.models import PaymentAccountInfo from common.models import SalesManUser from common.serializers import CommonNoticeSerializer from coupon.models import UserCoupon from rest_framework.response import Response from rest_framework.views import APIView from authentication.models impo...
liaochenghao/StuSystem
StuSystem/common/views.py
views.py
py
4,855
python
en
code
0
github-code
1
[ { "api_name": "rest_framework.views.APIView", "line_number": 17, "usage_type": "name" }, { "api_name": "utils.functions.get_key_verbose_data", "line_number": 20, "usage_type": "call" }, { "api_name": "admin.models.PaymentAccountInfo.PAYMENT", "line_number": 20, "usage_typ...
74543466592
import unittest from pathlib import Path import lindenmayer_system as ls from PIL import Image, ImageDraw class TurtleInterpreterTestCase(unittest.TestCase): def setUp(self): self.image = Image.new("RGB", (1280, 1280), "white") self.draw = ImageDraw.Draw(self.image) self.pos = (1280 / 2, 1...
lucas-escobar/botany-lab
tests/test_turtle_interpreter.py
test_turtle_interpreter.py
py
3,503
python
en
code
0
github-code
1
[ { "api_name": "unittest.TestCase", "line_number": 7, "usage_type": "attribute" }, { "api_name": "PIL.Image.new", "line_number": 9, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 9, "usage_type": "name" }, { "api_name": "PIL.ImageDraw.Draw", ...
20383117487
from django import forms from .models import Post from urllib import request from django.core.files.base import ContentFile from django.utils.text import slugify class PostCreateForm(forms.ModelForm): def save(self, force_insert=False, force_update=False, commit=True): posts = super().save(commit=False) ...
OtuokereTobechukwu/trill
activity/forms.py
forms.py
py
619
python
en
code
0
github-code
1
[ { "api_name": "django.forms.ModelForm", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 7, "usage_type": "name" }, { "api_name": "django.utils.text.slugify", "line_number": 11, "usage_type": "call" }, { "api_name": "mode...
30915139901
import pytest as pytest from selenium import webdriver driver = None @pytest.fixture() def setup_and_teardown(request): global driver driver = webdriver.Chrome() driver.maximize_window() request.cls.driver = driver yield driver.quit()
VardhiniMohan/SeleniumPythonHybridFramework2
tests/conftest.py
conftest.py
py
262
python
en
code
0
github-code
1
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 10, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 10, "usage_type": "name" }, { "api_name": "pytest.fixture", "line_number": 7, "usage_type": "call" } ]
7217036142
import pendulum from airflow import models from airflow.operators.bash_operator import BashOperator from datetime import datetime, timedelta KST = pendulum.timezone("Asia/Seoul") default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': datetime(2021, 8, 9, tzinfo=KST), 'email': ['...
J-TKim/airflow_tutorial
main.py
main.py
py
1,065
python
en
code
1
github-code
1
[ { "api_name": "pendulum.timezone", "line_number": 7, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 12, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 17, "usage_type": "call" }, { "api_name": "airflow.models....
10808815511
import requests import sys from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry MAX_RETRY_NUM = 5 BACKOFF_FACTOR = 1 STATUS_FORCELIST = [502, 503, 504] def get_request(url): """ Attempts to get the HTML content with the given URL by making an HTTP GET request. It ...
vonniewu/nga-artists
nga_artists/html_request.py
html_request.py
py
1,651
python
en
code
1
github-code
1
[ { "api_name": "requests.Session", "line_number": 20, "usage_type": "call" }, { "api_name": "requests.packages.urllib3.util.retry.Retry", "line_number": 21, "usage_type": "call" }, { "api_name": "requests.adapters.HTTPAdapter", "line_number": 22, "usage_type": "call" }, ...
25516931292
import numpy as np import numpy.typing as npt import pandas as pd from scipy import special from typing import Any from linearlab.lik.base import Likelihood from linearlab.link import Link, LogitLink, logit class _BinomialBase(Likelihood[npt.NDArray[np.int_]]): def params(self) -> list[str]: return ["p"] ...
dschulman/linearlab
linearlab/lik/_binomial.py
_binomial.py
py
2,597
python
en
code
0
github-code
1
[ { "api_name": "linearlab.lik.base.Likelihood", "line_number": 10, "usage_type": "name" }, { "api_name": "numpy.typing.NDArray", "line_number": 10, "usage_type": "attribute" }, { "api_name": "numpy.typing", "line_number": 10, "usage_type": "name" }, { "api_name": "...
18810182845
""" Orthogonal Distance Regression using Monte Carlo to estimate errors i.e. 1 fit using ODR with 10000 MC samples Isaac Cheng - January 2021 """ import sys from pathlib import Path import sqlite3 from contextlib import closing import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D impo...
tvwenger/coop2021
rot_curve/odr_MC_errors.py
odr_MC_errors.py
py
7,351
python
en
code
0
github-code
1
[ { "api_name": "pathlib.Path.cwd", "line_number": 19, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 19, "usage_type": "name" }, { "api_name": "sys.path.append", "line_number": 21, "usage_type": "call" }, { "api_name": "sys.path", "line_nu...
161448674
import os import pytest from path import Path from . import initialize_git_repo_and_commit, prepare_project DIST_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '../dist')) # Test if package can be imported to allow testing on # conda-forge where ``pytest-virtualenv`` is not available. try: impor...
jem0101/BigSwag-SQA2022-AUBURN
TestOrchestrator4ML-main/resources/Data/supervised/GITHUB_REPOS/scikit-build@scikit-build/tests/test_distribution.py
test_distribution.py
py
1,736
python
en
code
2
github-code
1
[ { "api_name": "os.path.abspath", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_nu...
25463104297
import argparse import os import os.path import pandas def main(): parser = argparse.ArgumentParser(description='Quick helper for getting model accuracies', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('inputs', nargs = '+', help='input CSVs') parser.add_argument('--nrows', ...
CSSLab/maia-individual
3-analysis/get_accuracy.py
get_accuracy.py
py
727
python
en
code
18
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "call" }, { "api_name": "argparse.ArgumentDefaultsHelpFormatter", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_number": 15, "usage_type": "call" }, { ...