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
34912513925
#!/usr/bin/python # -*- coding:utf-8 -*- ###lib required:pdfminer3k,python_docx import sys,io,re,os from pdfminer.pdfinterp import PDFResourceManager, process_pdf from pdfminer.converter import TextConverter from pdfminer.layout import LAParams from io import StringIO from io import open from docx import Document from...
382982408/private_library
evernote/工具打包:_files/pdf2WordTxt.py
pdf2WordTxt.py
py
2,332
python
en
code
0
github-code
7
[ { "api_name": "sys.stdout", "line_number": 14, "usage_type": "attribute" }, { "api_name": "io.TextIOWrapper", "line_number": 14, "usage_type": "call" }, { "api_name": "io.open", "line_number": 17, "usage_type": "call" }, { "api_name": "pdfminer.pdfinterp.PDFResour...
42131709820
"""empty message Revision ID: 338df913cbf6 Revises: c23954660d11 Create Date: 2021-08-20 13:29:42.521603 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '338df913cbf6' down_revision = 'c23954660d11' branch_labels = None depends_on = None def upgrade(): # ...
kuyang95/1319_KakaoChatBot
migrations/versions/338df913cbf6_.py
338df913cbf6_.py
py
1,049
python
en
code
0
github-code
7
[ { "api_name": "alembic.op.batch_alter_table", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy....
11727732018
from typing import Optional, Any import argparse import logging import lsprotocol.types as lsp_types from pygls.server import LanguageServer import logging from . import commands, features from .colorful_log_handler import ColorfulHandler LOGGER = logging.getLogger(__name__) def init_language_server() -> LanguageSe...
ousttrue/tentiris
python/tentiris/__main__.py
__main__.py
py
3,750
python
en
code
0
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "pygls.server.LanguageServer", "line_number": 15, "usage_type": "call" }, { "api_name": "typing.Optional", "line_number": 18, "usage_type": "name" }, { "api_name": "typing....
36164598638
import sys import argparse from dotenv import load_dotenv import chromadb from chromadb.config import Settings from langchain.vectorstores import Chroma from langchain.embeddings import OpenAIEmbeddings from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain.llms import OpenAI from langcha...
noodnik2/InnovAIteLab
chroma/text-seer.py
text-seer.py
py
2,614
python
en
code
0
github-code
7
[ { "api_name": "argparse.ArgumentParser", "line_number": 19, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 20, "usage_type": "attribute" }, { "api_name": "dotenv.load_dotenv", "line_number": 42, "usage_type": "call" }, { "api_name": "chromadb.con...
30550662784
"""QGIS Unit tests for QgsFieldValidator. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __author__ = 'Alessandr...
qgis/QGIS
tests/src/python/test_qgsfieldvalidator.py
test_qgsfieldvalidator.py
py
6,178
python
en
code
8,946
github-code
7
[ { "api_name": "utilities.unitTestDataPath", "line_number": 25, "usage_type": "call" }, { "api_name": "qgis.testing.start_app", "line_number": 27, "usage_type": "call" }, { "api_name": "qgis.testing.QgisTestCase", "line_number": 30, "usage_type": "name" }, { "api_n...
1134563220
#!/usr/bin/python import xml.etree.ElementTree as ET import argparse import os import HTMLParser from pprint import pprint ns = '{http://checklists.nist.gov/xccdf/1.1}' dc = '{http://purl.org/dc/elements/1.1/}' h = HTMLParser.HTMLParser() objRef = {} # def show_root_info(self): # for item in self.root....
nullspace-dev/STIG_Nessus_auditbuild
stigToAudit.py
stigToAudit.py
py
3,814
python
en
code
1
github-code
7
[ { "api_name": "HTMLParser.HTMLParser", "line_number": 10, "usage_type": "call" }, { "api_name": "xml.etree.ElementTree.parse", "line_number": 47, "usage_type": "call" }, { "api_name": "xml.etree.ElementTree", "line_number": 47, "usage_type": "name" }, { "api_name"...
37955310118
import torch import torch.nn.functional as F def bl_matmul(mat_a, mat_b): return torch.einsum('mij,jk->mik', mat_a, mat_b) def compute_permu_matrix(s: torch.FloatTensor, tau=1): device = s.get_device() mat_as = s - s.permute(0, 2, 1) mat_as = torch.abs(mat_as) n = s.shape[1] one = torch.one...
jmnel/neuralsort
src/nsort.py
nsort.py
py
1,142
python
en
code
2
github-code
7
[ { "api_name": "torch.einsum", "line_number": 6, "usage_type": "call" }, { "api_name": "torch.FloatTensor", "line_number": 9, "usage_type": "attribute" }, { "api_name": "torch.abs", "line_number": 13, "usage_type": "call" }, { "api_name": "torch.ones", "line_nu...
34928586582
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Command line tool to merge possibly overlapping flux.dat files from hotstart runs """ import argparse import numpy as np def combine_flux(infiles,outfile,prefer_last=False): """ Merge possibly overlapping flux.dat files from hostart runs """ filedata = [] ...
CADWRDeltaModeling/schimpy
schimpy/combine_flux.py
combine_flux.py
py
3,260
python
en
code
5
github-code
7
[ { "api_name": "numpy.loadtxt", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.argsort", "line_numbe...
34602916448
import rtree class PathIndex: def __init__(self, path_graph): self.idx = rtree.index.Index() self.path_graph = path_graph for index, coordinate in path_graph.iter_starts_with_index(): self.idx.add(index, coordinate + coordinate) def get_nearest(self, coordinate): r...
NicholasARossi/generative_artforms
path_optimization/greedy_optimization.py
greedy_optimization.py
py
2,060
python
en
code
0
github-code
7
[ { "api_name": "rtree.index.Index", "line_number": 6, "usage_type": "call" }, { "api_name": "rtree.index", "line_number": 6, "usage_type": "attribute" }, { "api_name": "collections.Counter", "line_number": 40, "usage_type": "call" }, { "api_name": "collections.Coun...
42865856548
#!/usr/bin/python # -*- coding: latin-1 -*- import numpy as np import csv from os import sys import random import time from operator import itemgetter import math import pickle import numpy as np import matplotlib.pyplot as plt # These are dictionaries storing mean and variance for each movie,cluster -> mean[mov...
asiddhant/PLSA-Recommender
plsa_package.py
plsa_package.py
py
101,625
python
en
code
0
github-code
7
[ { "api_name": "time.time", "line_number": 38, "usage_type": "call" }, { "api_name": "csv.writer", "line_number": 124, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 133, "usage_type": "call" }, { "api_name": "pickle.dump", "line_number": 14...
27004602568
from django import template register = template.Library() @register.filter() def smooth_timedelta(timedeltaobj): """Convert a datetime.timedelta object into Days, Hours, Minutes, Seconds.""" secs = timedeltaobj.total_seconds() timetot = "" if secs > 86400: # 60sec * 60min * 24hrs days = secs /...
kashtanov1111/construction_project
accounts/templatetags/smooth_timedelta.py
smooth_timedelta.py
py
749
python
en
code
0
github-code
7
[ { "api_name": "django.template.Library", "line_number": 3, "usage_type": "call" }, { "api_name": "django.template", "line_number": 3, "usage_type": "name" } ]
31585675167
import pyttsx3 import PyPDF2 speaker = pyttsx3.init() voices = speaker.getProperty('voices') speaker.setProperty('voice', voices[1].id) #rate = speaker.getProperty('rate') speaker.setProperty("rate", 150) speaker.say('i am alive I dont want it to go really slow just slow enough to be easy for a non native speaker to u...
SourabhKarma/Python_Beginner_projects
pdf reader/pdfreader.py
pdfreader.py
py
377
python
en
code
0
github-code
7
[ { "api_name": "pyttsx3.init", "line_number": 4, "usage_type": "call" } ]
4121167903
import numpy as np import os import torch import torch.nn as nn from torchvision import transforms from torch.utils.data import Dataset, DataLoader import math from PIL import Image from torchsummary import summary from numpy import asarray image_dir = "/content/Images" SAVE_DIR = "/content/Results" piece_dir = {} bat...
Rjuhl/Chessposition-recognition
baseline.py
baseline.py
py
6,490
python
en
code
1
github-code
7
[ { "api_name": "os.listdir", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "line_number": 23, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": ...
11424913276
from setuptools import setup, find_packages version = "0.1.7" if __name__ == '__main__': setup( name="pygraph_utils", version=version, packages=find_packages(), python_requires='>=3.6', # include_package_data=True, # package_data={ # '': ['data/*.txt'] ...
microsoftgraph/dataconnect-solutions
solutions/projectstaffing/pygraph/azure_processing/pygraph_utils/setup.py
setup.py
py
407
python
en
code
38
github-code
7
[ { "api_name": "setuptools.setup", "line_number": 6, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 9, "usage_type": "call" } ]
10492443609
import torch from PIL import Image from torchvision import models, transforms from flask import Flask, request, jsonify import pydicom num_classes = 4 classes = ['COVID', 'Lung Opacity', 'Normal', 'Viral Pneumonia'] model = models.resnet18(pretrained=False) model.fc = torch.nn.Linear(model.fc.in_features, num_classes)...
Shagabudinov/x-ray-chest-classificator
clasifyImage.py
clasifyImage.py
py
1,590
python
en
code
1
github-code
7
[ { "api_name": "torchvision.models.resnet18", "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...
19010274869
"""Google Sign-In OAuth drop-in. Google Sign-In API docs: https://developers.google.com/identity/protocols/OAuth2WebServer Python API client docs: https://developers.google.com/api-client-library/python/ requests-oauthlib docs: * https://requests-oauthlib.readthedocs.io/ * https://requests-oauthlib.readthedocs.io/e...
snarfed/oauth-dropins
oauth_dropins/google_signin.py
google_signin.py
py
4,415
python
en
code
32
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 22, "usage_type": "call" }, { "api_name": "webutil.util.read", "line_number": 24, "usage_type": "call" }, { "api_name": "webutil.util", "line_number": 24, "usage_type": "name" }, { "api_name": "webutil.util.read", ...
21522291014
# -*- coding: utf-8 -*- """ Created on Mon Jan 18 21:17:44 2016 @author: zhicheng.qi gramophone官网的爬虫,暂时爬feature这个栏目,只爬第一页 第一版 """ import requests from bs4 import BeautifulSoup list_page = 'http://www.gramophone.co.uk/features/all' r = requests.get(list_page) soup = BeautifulSoup(r.text) news_list = soup.findAll("di...
LeoQuote/cross-world-spider
spider.py
spider.py
py
928
python
en
code
0
github-code
7
[ { "api_name": "requests.get", "line_number": 13, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 15, "usage_type": "call" } ]
17581096789
import json import socket import traceback from threading import Thread from network.protocolHandler import ProtocolHandler from tools import logger class Client: def __init__(self, ip: str, port: int): self.socket = socket.socket() self.connectState = False self.protocolHandle = Protoco...
TXMorningstar/GameJamProject
network/client.py
client.py
py
1,225
python
en
code
0
github-code
7
[ { "api_name": "socket.socket", "line_number": 13, "usage_type": "call" }, { "api_name": "network.protocolHandler.ProtocolHandler", "line_number": 15, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 18, "usage_type": "call" }, { "api_name":...
35065443023
import pytest from kubernetes.client import V2beta2CrossVersionObjectReference from kubernetes.client import V2beta2ExternalMetricSource from kubernetes.client import V2beta2ExternalMetricStatus from kubernetes.client import V2beta2MetricIdentifier from kubernetes.client import V2beta2MetricSpec from kubernetes.client ...
Yelp/paasta
tests/instance/test_hpa_metrics_parser.py
test_hpa_metrics_parser.py
py
6,251
python
en
code
1,652
github-code
7
[ { "api_name": "paasta_tools.instance.hpa_metrics_parser.HPAMetricsParser", "line_number": 24, "usage_type": "call" }, { "api_name": "pytest.fixture", "line_number": 22, "usage_type": "attribute" }, { "api_name": "kubernetes.client.V2beta2MetricSpec", "line_number": 28, "u...
9981155310
__author__ = 'nncsang' from magic import Magic import magic import sys import os import re import mimetypes def print_result(filename, real_ext, expected_ext): print("{:35s} \t {:10s} \t {:20s}".format(filename, real_ext, expected_ext)) # Default mime.types files magic_file = "/etc/mime.types" directory = None ...
nncsang/Forensics-Tools
TypeDetector.py
TypeDetector.py
py
2,345
python
en
code
1
github-code
7
[ { "api_name": "sys.argv", "line_number": 20, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 21, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 22, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number...
161345283
# You are given a scratchcard consists of a row of non-negative integers. # To win the scratch game, you need to scratch at least 2 numbers of the same value. # You can only scratch consecutive numbers from the card. Scratching each number costs 1 dollar. # Return the minimum cost to win the game, or -1 if winning i...
afieqhamieza/DataStructures
python/consecutive_same_val.py
consecutive_same_val.py
py
1,195
python
en
code
0
github-code
7
[ { "api_name": "typing.List", "line_number": 9, "usage_type": "name" } ]
2332987809
import json import numpy as np import os import time import torch from pathlib import Path from torch.utils.data import DataLoader from tqdm import tqdm import explaignn.heterogeneous_answering.graph_neural_network.dataset_gnn as dataset from explaignn.heterogeneous_answering.graph_neural_network.gnn_factory import GN...
saitouhao/srtp-gnn-explain
EXPLAIGNN-main/explaignn/heterogeneous_answering/graph_neural_network/graph_neural_network.py
graph_neural_network.py
py
11,943
python
en
code
1
github-code
7
[ { "api_name": "torch.autograd.set_detect_anomaly", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.autograd", "line_number": 15, "usage_type": "attribute" }, { "api_name": "time.strftime", "line_number": 17, "usage_type": "call" }, { "api_name": "t...
28679584722
import time import numpy as np import torch from metrics import MetricMeter, Writer from sklearn.metrics import average_precision_score, roc_auc_score from utils import get_eta, move_to, save_checkpoint, to_numpy def train_loops( args, train_epoch_fn, model, optimizer, scheduler, loader_test, ema_mod...
ytaek-oh/mlssl-simple
engine.py
engine.py
py
4,474
python
en
code
1
github-code
7
[ { "api_name": "metrics.Writer", "line_number": 14, "usage_type": "call" }, { "api_name": "time.time", "line_number": 17, "usage_type": "call" }, { "api_name": "utils.save_checkpoint", "line_number": 29, "usage_type": "call" }, { "api_name": "time.time", "line_...
276189509
# -*- coding: utf-8 -*- __auth__ = 'zone' __date__ = '2019/6/17 下午11:46' ''' 公众号:zone7 小程序:编程面试题库 ''' import os print(os.getcwd()) import logging from python.logging_model.code import sub_of_main logger = logging.getLogger("zone7Model") logger.setLevel(level=logging.INFO) handler = logging.FileHandler("log.txt") han...
zonezoen/blog
python/logging_model/code/main.py
main.py
py
737
python
en
code
21
github-code
7
[ { "api_name": "os.getcwd", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 15, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 16, "usage_type": "attribute" }, { "api_name": "logging.FileHandler", ...
74014799903
import sys from cx_Freeze import setup, Executable build_exe_options = { "include_files": ["data"], } base = None if sys.platform == "win32": base = "Win32GUI" setup( name="Two Button Berserker", options={"build_exe": build_exe_options}, executables=[Executable("main.py", base=base, targetName="...
joehowells/two-button-berserker
setup.py
setup.py
py
344
python
en
code
0
github-code
7
[ { "api_name": "sys.platform", "line_number": 10, "usage_type": "attribute" }, { "api_name": "cx_Freeze.setup", "line_number": 13, "usage_type": "call" }, { "api_name": "cx_Freeze.Executable", "line_number": 16, "usage_type": "call" } ]
74587938461
import pygame from scripts.button import Button class Action_Menu(): def __init__(self, hand, game, gameboard, x, y): self.hand = hand self.game = game self.gameboard = gameboard self.isInit = False self.x, self.y = x + 75, y - 100 #offset away from the hand center ...
xjphongx/Blackjack
scripts/action_menu.py
action_menu.py
py
5,692
python
en
code
2
github-code
7
[ { "api_name": "pygame.image.load", "line_number": 16, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 16, "usage_type": "attribute" }, { "api_name": "pygame.image.load", "line_number": 17, "usage_type": "call" }, { "api_name": "pygame.image", ...
72856899743
from dash import dash, dcc, html, Output, Input import dash_bootstrap_components as dbc import pandas as pd import geopandas as gpd import plotly.express as px from dash_bootstrap_templates import load_figure_template from pathlib import Path # Load files script_dir = Path(__file__).parent.absolute() df = pd.read_csv...
VerKoval/AirQualityModel
run_dash_app.py
run_dash_app.py
py
4,699
python
en
code
0
github-code
7
[ { "api_name": "pathlib.Path", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 12, "usage_type": "call" }, { "api_name": "geopandas.read_file", "line_number": 13, "usage_type": "call" }, { "api_name": "pandas.DataFrame", ...
20945396302
import copy import json import random import igraph as ig from itertools import chain from intervention import ( NetworkIntervention, IndividualIntervention, MockInterventionA, MockInterventionB, ) from agent import Agent class Simulation: def __init__(self, ticks, **kwargs): self.__dic...
iancero/nhiabm_v2
simulation/simulation.py
simulation.py
py
10,406
python
en
code
0
github-code
7
[ { "api_name": "igraph.Graph.Erdos_Renyi", "line_number": 35, "usage_type": "call" }, { "api_name": "igraph.Graph", "line_number": 35, "usage_type": "attribute" }, { "api_name": "agent.Agent", "line_number": 42, "usage_type": "call" }, { "api_name": "agent.name", ...
44495480069
from tkinter import * import tkinter.messagebox import sqlite3 import os.path import sys sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/' + '../..')) from HospitalManagementDBMS import settings settings.init() BASE_DIR = os.path.dirname(os.path.abspath(__file__)) db_path = os.path.join(BASE_...
OsmanDsilva/HospitalManagementDBMS
src/update.py
update.py
py
6,837
python
en
code
1
github-code
7
[ { "api_name": "sys.path.append", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.path.path.abspath", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path.path", "l...
7977557232
''' Several Models used for testing. ''' import numpy as np from scipy.sparse.csgraph import minimum_spanning_tree from .blocks import get_demo_circuit, get_demo_circuit_v2 from .dataset import gaussian_pdf, barstripe_pdf, barstripe_wf from .qcbm import QCBM from .cloneqcbm import CloneQCBM, CloneGAN from .mmd import...
RindJLU/Undergraduate-Thesis
Born_Machine/qcbm/testsuit.py
testsuit.py
py
2,942
python
en
code
0
github-code
7
[ { "api_name": "structure.nearest_neighbor", "line_number": 23, "usage_type": "call" }, { "api_name": "blocks.get_demo_circuit", "line_number": 24, "usage_type": "call" }, { "api_name": "dataset.gaussian_pdf", "line_number": 27, "usage_type": "call" }, { "api_name"...
39952140157
import math from itertools import zip_longest from typing import Type, Union, Set, List, Tuple import networkx as nx from networkx.classes.filters import no_filter from weaveio.hierarchy import Multiple, Hierarchy, OneOf, Graphable def normalise_relation(h): if not isinstance(h, Multiple): h = OneOf(h) ...
philastrophist/weave-io
weaveio/path_finding.py
path_finding.py
py
18,618
python
en
code
0
github-code
7
[ { "api_name": "weaveio.hierarchy.Multiple", "line_number": 11, "usage_type": "argument" }, { "api_name": "weaveio.hierarchy.OneOf", "line_number": 12, "usage_type": "call" }, { "api_name": "typing.Type", "line_number": 17, "usage_type": "name" }, { "api_name": "ty...
70607678303
from lxml import etree import json, data_getter, re #获取公司名称、详情链接、ID def companies_info(context): """ 输入GET https://angel.co/companies/startups 得到的json数据 输出该页面中的公司详情地址 """ context = context['html'] result = [] selector = etree.HTML(context) #读取出详情页面地址 companies_page = ...
cOderrEy/spider_angel
spider/data_selector.py
data_selector.py
py
8,373
python
en
code
0
github-code
7
[ { "api_name": "lxml.etree.HTML", "line_number": 13, "usage_type": "call" }, { "api_name": "lxml.etree", "line_number": 13, "usage_type": "name" }, { "api_name": "lxml.etree.HTML", "line_number": 33, "usage_type": "call" }, { "api_name": "lxml.etree", "line_num...
21484370085
"""Entry point.""" import sys import traceback from docknv.logger import Logger, LoggerError from docknv.wrapper import FailedCommandExecution, StoppedCommandExecution from .custom import MalformedCommand from .shell import Shell def docknv_entry_point(): """Entry point for docknv.""" shell = Shell() ...
sharingcloud/docknv
docknv/shell/main.py
main.py
py
837
python
en
code
0
github-code
7
[ { "api_name": "shell.Shell", "line_number": 15, "usage_type": "call" }, { "api_name": "shell.run", "line_number": 18, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 18, "usage_type": "attribute" }, { "api_name": "docknv.logger.LoggerError", "...
74391139103
from sqlalchemy.orm import Session from sqlalchemy import and_ from fastapi import Depends, HTTPException, status, APIRouter, Response from typing import Optional, List import random # from models.index import get_db, Student, Tutor #StudentCourse # from schemas.user import UserFull as User, UserUpdate # from schemas...
leyume/edutrack
backend/app/routes/students.py
students.py
py
4,028
python
en
code
0
github-code
7
[ { "api_name": "fastapi.APIRouter", "line_number": 20, "usage_type": "call" }, { "api_name": "sqlalchemy.orm.Session", "line_number": 24, "usage_type": "name" }, { "api_name": "fastapi.Depends", "line_number": 24, "usage_type": "call" }, { "api_name": "models.index...
6217842621
import json import os import re from dotenv import Dotenv from flask import Flask from flask import jsonify from flask import redirect from flask import render_template from flask import request from flask import send_from_directory from flask import session from functools import wraps import requests from auth0.v2.m...
Annyv2/auth0-exercise
server.py
server.py
py
2,900
python
en
code
0
github-code
7
[ { "api_name": "dotenv.Dotenv", "line_number": 23, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 25, "usage_type": "attribute" }, { "api_name": "flask.Flask", "line_number": 27, "usage_type": "call" }, { "api_name": "constants.PROFILE_KEY", ...
38828064381
"""user uploaded songs Revision ID: 84a79256c2e3 Revises: 69e6acb117e4 Create Date: 2022-04-28 18:00:43.142059 """ from alembic import op import sqlalchemy as sa import sqlalchemy_utils # revision identifiers, used by Alembic. revision = '84a79256c2e3' down_revision = '69e6acb117e4' branch_labels = None depends_on ...
NwaforAugustine321/ktizo-backend
alembic/versions/84a79256c2e3_user_uploaded_songs.py
84a79256c2e3_user_uploaded_songs.py
py
1,422
python
en
code
0
github-code
7
[ { "api_name": "alembic.op.create_table", "line_number": 22, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 22, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 23, "usage_type": "call" }, { "api_name": "sqlalchemy_utils...
33236248352
from django.shortcuts import render # Create your views here. def contact(request): return render(request,'./first_app/index.html',{'courses': [ { 'id':1,'course':'C','teacher': 'Rahim' }, { 'id':2,'course':'C++','teacher': 'Kahim' }, { 'i...
asadaladil/DJANGO
third_project/first_app/views.py
views.py
py
394
python
en
code
0
github-code
7
[ { "api_name": "django.shortcuts.render", "line_number": 5, "usage_type": "call" } ]
19003189493
import pandas as pd import pathlib from pathlib import Path # Берет нужные ссылки из cards.csv. # Take the necessary links data_csv = Path(pathlib.Path.home(), 'projects', 'learn-web', 'utils', 'data_csv', 'cards.csv') # Эта функция должна подставлять в запрос URL адресс в таком ввиде https://www.res...
AfrosamuraiNo1/RestorSaint
parsing/data_link.py
data_link.py
py
789
python
ru
code
0
github-code
7
[ { "api_name": "pathlib.Path", "line_number": 8, "usage_type": "call" }, { "api_name": "pathlib.Path.home", "line_number": 8, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 14, "usage_type": "call" } ]
36506957625
import pytesseract import cv2 import pyautogui import numpy import re import uuid pytesseract.pytesseract.tesseract_cmd = 'C:/Users/John Chen/AppData/Local/Programs/Tesseract-OCR/tesseract.exe' def Parser(NWCoordinate, boxSize): # Parses string from image and returns as array pyautogui.screenshot('temp.png', regi...
JChen46/NW_Market_Scraper
Parser.py
Parser.py
py
2,731
python
en
code
3
github-code
7
[ { "api_name": "pytesseract.pytesseract", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pyautogui.screenshot", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 12, "usage_type": "call" }, { "api_name": "cv2.cvtCo...
35134255854
import pyttsx3 engine = pyttsx3.init("sapi5") voice = engine.getProperty("voices") engine.setProperty('voice',voice[0].id) # voice[1] will give different voice. only index 1 and 2 is permitted def speak(msg): engine.say(msg) engine.runAndWait() name = input("Enter the name: ") speak(" Welcome ba...
janakiraam/fancy_Stuff_with_python
Voice.py
Voice.py
py
338
python
en
code
0
github-code
7
[ { "api_name": "pyttsx3.init", "line_number": 2, "usage_type": "call" } ]
9723103667
import sys import time from typing import cast from cryptography import x509 import requests from getssl.log import LoggerBase, DebugLogger, ConfigBase, Actor, StrDict from getssl.certManager import CertManager, CertManagerConfig, KeyType from getssl.dnspod import DNSPodClient, DNSPodConfig from getssl.acme import ACM...
gyf1214/getssl.py
getssl.py
getssl.py
py
4,579
python
en
code
0
github-code
7
[ { "api_name": "getssl.log.ConfigBase", "line_number": 13, "usage_type": "name" }, { "api_name": "getssl.certManager.CertManagerConfig", "line_number": 13, "usage_type": "name" }, { "api_name": "getssl.dnspod.DNSPodConfig", "line_number": 13, "usage_type": "name" }, { ...
25216718190
from typing import Any, List import pickle import numpy as np import networkx as nx TC_PAUSE = 3 FORWARD_DELAY = 2 class frameBPDUMST(): def __init__(self, root_bid: str, external_rpc: int, region_root_bid: str, internal_rpc: int, bid: str, send_port_id: int, ...
Artemmakanov/networks
mstp/utils.py
utils.py
py
21,707
python
en
code
0
github-code
7
[ { "api_name": "networkx.Graph", "line_number": 533, "usage_type": "call" }, { "api_name": "networkx.kamada_kawai_layout", "line_number": 536, "usage_type": "call" }, { "api_name": "networkx.draw_networkx_labels", "line_number": 562, "usage_type": "call" }, { "api_...
38361933111
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed May 9 01:15:09 2018 @author: zhangtiangu """ from bs4 import BeautifulSoup from selenium import webdriver import os from time import sleep def download_data(ticker,freq="1d"): if isinstance(ticker,str): ticker = [ticker] ...
manajit04/Portfolio-Management
get_data.py
get_data.py
py
2,386
python
en
code
0
github-code
7
[ { "api_name": "selenium.webdriver.ChromeOptions", "line_number": 18, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 18, "usage_type": "name" }, { "api_name": "os.getcwd", "line_number": 19, "usage_type": "call" }, { "api_name": "seleniu...
71894534303
from django.db import models from ford3.models.sub_field_of_study import SubFieldOfStudy from ford3.models.field_of_study import FieldOfStudy from ford3.models.provider import Provider from django.core.exceptions import ValidationError class SAQAQualification(models.Model): field_of_study = models.ForeignKey( ...
kartoza/ford3
django_project/ford3/models/saqa_qualification.py
saqa_qualification.py
py
4,081
python
en
code
0
github-code
7
[ { "api_name": "django.db.models.Model", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 8, "usage_type": "name" }, { "api_name": "django.db.models.ForeignKey", "line_number": 9, "usage_type": "call" }, { "api_name": ...
23519849988
from qubovert.sim import anneal_qubo from qubovert import boolean_var from src.anneals import Graph, HopBased, EdgeBased from ttopt import TTOpt import numpy as np import matplotlib.pyplot as plt import math def norm_noise(): res = np.random.normal() if res < 0: return max(-2, res) return min(2, r...
bicikar/anneal_ttopt
src/field.py
field.py
py
11,344
python
en
code
0
github-code
7
[ { "api_name": "numpy.random.normal", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 11, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 58, "usage_type": "call" }, { "api_name": "matp...
11508201210
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Andreas Buttenschoen import numpy as np import sympy as syp import datetime from sympy import symbols, simplify, cancel, Function, Integral, srepr from sympy.matrices import zeros, ones from sympy.solvers.deutils import ode_order from sympy import sympify, preorder_t...
adrs0049/funpy
funpy/colloc/source/compiler.py
compiler.py
py
26,379
python
en
code
1
github-code
7
[ { "api_name": "vectorspaces.Namespace", "line_number": 42, "usage_type": "call" }, { "api_name": "sympy.solvers.deutils.ode_order", "line_number": 128, "usage_type": "call" }, { "api_name": "NonlinearVectorFunctionSource.NonlinearVectorFunctionSource", "line_number": 176, ...
41054720044
import os from flask import Flask, send_file, request, render_template, redirect, url_for, send_from_directory from flask_restful import Resource, Api, reqparse import pandas as pd import ast from werkzeug.utils import secure_filename from datetime import datetime from mbk1 import process_excel ALLOWED_EXTE...
AnAnYa0806/MarketBasketAnalysis
app.py
app.py
py
1,723
python
en
code
0
github-code
7
[ { "api_name": "flask.Flask", "line_number": 17, "usage_type": "call" }, { "api_name": "flask_restful.Api", "line_number": 18, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 22, "usage_type": "attribute" }, { "api_name": "flask.request...
25639513643
from airflow import DAG from airflow.contrib.operators.emr_add_steps_operator import EmrAddStepsOperator from airflow.contrib.operators.emr_create_job_flow_operator import EmrCreateJobFlowOperator from airflow.contrib.sensors.emr_job_flow_sensor import EmrJobFlowSensor from airflow.contrib.sensors.emr_step_sensor impor...
oripwk/airflow-examples
emr_job_usage_example.py
emr_job_usage_example.py
py
1,067
python
en
code
0
github-code
7
[ { "api_name": "airflow.DAG", "line_number": 16, "usage_type": "call" }, { "api_name": "airflow.utils.dates.days_ago", "line_number": 20, "usage_type": "call" }, { "api_name": "emr_job_flow_with_sensor.EmrJobFlowWithSensor", "line_number": 24, "usage_type": "call" }, {...
14957945973
# Convert a geotiff (.tiff/.tif) into a vertical list of xyz coordinates # Can be used with the xyz2jpu.f90 to turn .geotiff into .jou for CUBIT use # # Rasterio module is easiest to access through Anaconda, or it can be installed # through pip # # utm module can can be accessed through anaconda or it can be ins...
homnath/MeshAssist
src/geotiff2xyz.py
geotiff2xyz.py
py
2,683
python
en
code
5
github-code
7
[ { "api_name": "math.pi", "line_number": 30, "usage_type": "attribute" }, { "api_name": "rasterio.open", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 36, "usage_type": "call" }, { "api_name": "numpy.fliplr", "line_numbe...
71443207583
from numba import jit,int64,float64 import numpy as np import time import sys class TailRecurseException(Exception): def __init__(self, args, kwargs): self.args = args self.kwargs = kwargs def tail_call_optimized(g): """ This function decorates a function with tail call optimization....
kasperlmc/learngit
job_all/factor_evaluation/numba_test_0.py
numba_test_0.py
py
2,678
python
en
code
4
github-code
7
[ { "api_name": "sys._getframe", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 47, "usage_type": "call" }, { "api_name": "numba.jit", "line_number": 45, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": ...
2879372448
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import logging from argparse import Namespace from pathlib import Path from typing import Optional import click import yaml logger = logging.getLogger(__name__) class Configuration(Namespace): def __init__(self): super(Configuration, self).__init__() ...
aliparlakci/bulk-downloader-for-reddit
bdfr/configuration.py
configuration.py
py
3,115
python
en
code
2,113
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "argparse.Namespace", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 20, "usage_type": "name" }, { "api_name": "typing.Optional"...
73246471263
import bs4 import re import requests from common import config from urllib.parse import urljoin class Page: def __init__(self, uuid_municipio) -> None: self._config = config()['municipios'][uuid_municipio] self._queries = self._config['queries'] self._url = self._config['url'] sel...
th3edger/download_mty_datasets
extract/page_object.py
page_object.py
py
2,858
python
en
code
0
github-code
7
[ { "api_name": "common.config", "line_number": 11, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 34, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 37, "usage_type": "call" }, { "api_name": "re.search", "line_nu...
37404839126
#!/usr/bin/env python # encoding: utf-8 # author: ryan_wu # email: imitator_wu@outlook.com import os import sys import json import pickle import numpy as np import pandas as pd import networkx as nx import multiprocessing import traceback from tqdm import tqdm from codes.utils.timedate_utils import TimeDateUtil fro...
Mospymh/GL_learn
code/price_embedding.py
price_embedding.py
py
3,261
python
en
code
0
github-code
7
[ { "api_name": "os.path.abspath", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path.dirname", "l...
3422357108
from rest_framework.views import APIView from rest_framework.response import Response from image_convert.serializers import ImageConvertSerializer from django.conf import settings from .models import Image import os import shutil class TextTransform(APIView): @staticmethod def post(request): data = ...
apheyhys/file_convert
image_convert/views.py
views.py
py
982
python
en
code
0
github-code
7
[ { "api_name": "rest_framework.views.APIView", "line_number": 10, "usage_type": "name" }, { "api_name": "models.Image.objects.all", "line_number": 22, "usage_type": "call" }, { "api_name": "models.Image.objects", "line_number": 22, "usage_type": "attribute" }, { "a...
40884980954
from tkinter import* # from PIL import Image,ImageTk from tkinter import ttk ,messagebox import sqlite3 # dk=Tk() class productClass: def __init__(self,dk): self.dk=dk self.dk.geometry("1100x500+220+130") self.dk.title("Inventory Management System | by dk") self.dk.config(...
DebabrataKarfa2022s/Inventory-Management-System-
product.py
product.py
py
13,968
python
en
code
0
github-code
7
[ { "api_name": "tkinter.ttk.Combobox", "line_number": 46, "usage_type": "call" }, { "api_name": "tkinter.ttk", "line_number": 46, "usage_type": "name" }, { "api_name": "tkinter.ttk.Combobox", "line_number": 50, "usage_type": "call" }, { "api_name": "tkinter.ttk", ...
1492750017
import numpy as np import torch import matplotlib.pyplot as plt from scipy import signal import numpy as np import time import csv coef = 6 width = 200*coef def bit_signal(t): return signal.square(t).astype('float64') np.random.seed(2) T = 2 L = 500 N = 10 #x = np.empty((N, L), 'int64') #x[:] = np.array(ra...
hiraikaen/ics_cnn_basic
generate_signals.py
generate_signals.py
py
9,145
python
en
code
0
github-code
7
[ { "api_name": "scipy.signal.square", "line_number": 13, "usage_type": "call" }, { "api_name": "scipy.signal", "line_number": 13, "usage_type": "name" }, { "api_name": "numpy.random.seed", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.random", ...
40393184490
import sys import re import json import subprocess import io import zipfile from traceback import print_exc from pathlib import Path from contextlib import contextmanager from threading import Thread, Event from http.server import HTTPServer, BaseHTTPRequestHandler from SCons.Errors import UserError Import("env") d...
touilleMan/godot-python-install-manager
tests/SConscript
SConscript
17,287
python
en
code
2
github-code
7
[ { "api_name": "io.BytesIO", "line_number": 20, "usage_type": "call" }, { "api_name": "zipfile.ZipFile", "line_number": 21, "usage_type": "call" }, { "api_name": "zipfile.ZIP_STORED", "line_number": 21, "usage_type": "attribute" }, { "api_name": "pathlib.Path", ...
38351807896
# vim:set et sts=4 sw=4: # # python -m testime.batch import unittest import sys import json from PySide2.QtCore import QObject, qDebug, QEventLoop from PySide2.QtWidgets import QApplication from testime.IBusDriver import IBusDriver from testime.FcitxDriver import FcitxDriver from testime.keyboard import KeycodeToKey...
seoyoungjin/testime
test/batch_test.py
batch_test.py
py
5,487
python
en
code
3
github-code
7
[ { "api_name": "PySide2.QtWidgets.QApplication.instance", "line_number": 21, "usage_type": "call" }, { "api_name": "PySide2.QtWidgets.QApplication", "line_number": 21, "usage_type": "name" }, { "api_name": "dbus.mainloop.glib.DBusGMainLoop", "line_number": 25, "usage_type"...
32867941764
import matplotlib.pyplot as plt import numpy as np import helper as hlp plt.xkcd() plt.grid(True) title1 = 'Example8. Nagy p.190' #==================== va = [1, 0, 4] #c=0 b = 1 IC0 = [0, 0] t0 = 0 tb = 10 N = 100 #==================== def y_ex(t): return 0.5*(hlp.heaviside(t-np.pi)-hlp.heaviside(t-2*np.pi))*np.si...
stdapproach/sciArticle
ODE_Delta/raw/example8.py
example8.py
py
506
python
en
code
0
github-code
7
[ { "api_name": "matplotlib.pyplot.xkcd", "line_number": 5, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 5, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.grid", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotl...
73364509343
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import flags import tensorflow as tf from tensorflow_examples.models.pix2pix import data_download from tensorflow_examples.models.pix2pix import pix2pix FLAGS = flags.FLAGS class Pix2PixTest(tf.t...
JC-78/practice-self_improvement
AnimeCycleGAN/src/pix2pix/pix2pix_test.py
pix2pix_test.py
py
2,266
python
en
code
0
github-code
7
[ { "api_name": "absl.flags.FLAGS", "line_number": 12, "usage_type": "attribute" }, { "api_name": "absl.flags", "line_number": 12, "usage_type": "name" }, { "api_name": "tensorflow.test", "line_number": 15, "usage_type": "attribute" }, { "api_name": "tensorflow.rand...
25257939834
import datetime from django.test import TestCase from django.utils import timezone from django.urls import reverse from .models import Question """ a separate TestClass for each model or view a separate test method for each set of conditions you want to test test method names that describe their function """ # to ...
lollinng/Django_demo
polls/tests.py
tests.py
py
5,563
python
en
code
0
github-code
7
[ { "api_name": "django.test.TestCase", "line_number": 16, "usage_type": "name" }, { "api_name": "django.utils.timezone.now", "line_number": 23, "usage_type": "call" }, { "api_name": "django.utils.timezone", "line_number": 23, "usage_type": "name" }, { "api_name": "...
34012098207
### ### <INCOMPLETE WORK> ### ### Iteration #2: attempt to separate ../face-req-v1/ logic into two parts and use threads ### - Face Recognition handled in ./img_processing.py ### - Communication with MQTT and WebSocket as in ../face-req-v1/ ### import logging import time import aiohttp from aiohttp import web imp...
nembrinj/protofablab
2022/projects/05_robotButlerThemedService/Pi/face-req-v2/teddyCtrlProcessing.py
teddyCtrlProcessing.py
py
5,566
python
en
code
3
github-code
7
[ { "api_name": "aiohttp.web.WebSocketResponse", "line_number": 79, "usage_type": "call" }, { "api_name": "aiohttp.web", "line_number": 79, "usage_type": "name" }, { "api_name": "aiohttp.WSMsgType", "line_number": 84, "usage_type": "attribute" }, { "api_name": "aioh...
23174862871
import pandas as pd import numpy as np from sklearn import datasets from sklearn.model_selection import train_test_split from keras.models import Sequential from keras.layers import Layer, Dropout, Input, Dense from sklearn.metrics import accuracy_score, confusion_matrix, ConfusionMatrixDisplay url = 'C:/Users/johnn...
Johnny-DF26/Deep_Learning
Classificação Binária/breast_cancer_simples.py
breast_cancer_simples.py
py
1,634
python
en
code
0
github-code
7
[ { "api_name": "sklearn.datasets.load_breast_cancer", "line_number": 12, "usage_type": "call" }, { "api_name": "sklearn.datasets", "line_number": 12, "usage_type": "name" }, { "api_name": "pandas.read_csv", "line_number": 13, "usage_type": "call" }, { "api_name": "...
25625041303
#!/usr/bin/python # -*- coding: utf-8 -*- """ Annotations for instance attributes, functions arguments, etc. """ import sys import operator import collections.abc import logging import typing logging.getLogger().addHandler(logging.NullHandler()) T = typing.TypeVar('T') # pylint: disable=invalid-name @typing.runt...
StanleySane/sane-finances
src/sane_finances/annotations.py
annotations.py
py
12,766
python
en
code
2
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.NullHandler", "line_number": 13, "usage_type": "call" }, { "api_name": "typing.TypeVar", "line_number": 15, "usage_type": "call" }, { "api_name": "typing.Protocol"...
19795684866
""" The web application which will interact with users and control the underlying hardware # https://towardsdatascience.com/python-webserver-with-flask-and-raspberry-pi-398423cc6f5d """ import datetime from flask import Flask, render_template from relay import Relay from tempsensor import TemperatureSensor flaskApp...
pvphan/jitters
src/jitterserver.py
jitterserver.py
py
1,872
python
en
code
0
github-code
7
[ { "api_name": "flask.Flask", "line_number": 13, "usage_type": "call" }, { "api_name": "tempsensor.TemperatureSensor", "line_number": 18, "usage_type": "name" }, { "api_name": "relay.Relay", "line_number": 19, "usage_type": "name" }, { "api_name": "relay.Relay", ...
7723548603
import os import argparse from PIL import Image from tqdm import tqdm import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset from torchvision.models import inception_v3 from torchvision import transforms from torch.utils.data import DataLoader class ImageDataset(Datas...
tf63/scfg-diffusion
tests/inception_score.py
inception_score.py
py
3,197
python
en
code
0
github-code
7
[ { "api_name": "torch.utils.data.Dataset", "line_number": 15, "usage_type": "name" }, { "api_name": "os.listdir", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path", "line_...
7501992129
import codecs from collections import Counter import os import glob from textblob import TextBlob as tb import math def tf(word, blob): return (float)(blob.words.count(word)) / (float)(len(blob.words)) def n_containing(word, bloblist): return sum(1 for blob in bloblist if word in blob.words) def idf(word, bloblist...
alchemist009/ML_musings
NaiveBayes/NaiveBayeswithtfidf.py
NaiveBayeswithtfidf.py
py
3,040
python
en
code
0
github-code
7
[ { "api_name": "math.log", "line_number": 15, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 39, "usage_type": "call" }, { "api_name": "codecs.open", "line_number": 40, "usage_type": "call" }, { "api_name": "textblob.TextBlob", "line_number":...
24559997817
"""Sagemaker InvokeEndpoint API.""" import io import json from abc import abstractmethod from typing import Any, Dict, Generic, Iterator, List, Mapping, Optional, TypeVar, Union from langchain_core.callbacks import CallbackManagerForLLMRun from langchain_core.language_models.llms import LLM from langchain_core.pydanti...
langchain-ai/langchain
libs/community/langchain_community/llms/sagemaker_endpoint.py
sagemaker_endpoint.py
py
13,193
python
en
code
68,990
github-code
7
[ { "api_name": "typing.TypeVar", "line_number": 13, "usage_type": "call" }, { "api_name": "typing.Union", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.TypeVar", "line_nu...
14493321108
from typing import List, Optional from fastapi import APIRouter, Depends from sqlalchemy.orm import Session from app.api.depends import get_db from app.schemas.appointments import Appointments, AppointmentsCreate, AppointmentsUpdate, AppointmentsRequest from app.service import appointments_service, medcard_service r...
nvlasikk/back-for-send
app/api/endpoints/appointments.py
appointments.py
py
1,719
python
en
code
0
github-code
7
[ { "api_name": "fastapi.APIRouter", "line_number": 10, "usage_type": "call" }, { "api_name": "sqlalchemy.orm.Session", "line_number": 14, "usage_type": "name" }, { "api_name": "fastapi.Depends", "line_number": 14, "usage_type": "call" }, { "api_name": "app.api.depe...
19905114066
# Emote Trainer Wrapper / Mass Analyzer # Command line interface for mass analysis for Emote, and to train Emote's classification system using TextBlob's API # Note: Training features have not yet been implemented yet # All that's really working is mass analyzing text files through the CLI #!/usr/bin/python # -*- codi...
RaunakDune/emoter
emoter/emote_trainer_wrapper.py
emote_trainer_wrapper.py
py
11,733
python
en
code
0
github-code
7
[ { "api_name": "os.getcwd", "line_number": 70, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 71, "usage_type": "call" }, { "api_name": "os.path", "line_number": 71, "usage_type": "attribute" }, { "api_name": "csv.reader", "line_number": 9...
33860123913
import pandas as pd import plotly.graph_objects as go import plotly.subplots as sp import webbrowser import os # Path to the dataset file_path_ufos = "/Users/maz/Desktop/UFOs/ufo_sighting_data.csv" # Read the dataset df = pd.read_csv(file_path_ufos, low_memory=False) # Convert the 'latitude' column to numeric df['la...
DocMaz/UAP_Data
map.py
map.py
py
1,812
python
en
code
0
github-code
7
[ { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.to_numeric", "line_number": 14, "usage_type": "call" }, { "api_name": "plotly.subplots.make_subplots", "line_number": 20, "usage_type": "call" }, { "api_name": "plotl...
41775938548
from django.shortcuts import render # Create your views here. from re import I from django.shortcuts import render # Create your views here. import json from os import stat from urllib import response from django.shortcuts import render import facilities # Create your views here. from .serializers import * from res...
mohamadch91/inventory
back-end/settings/views.py
views.py
py
4,090
python
en
code
0
github-code
7
[ { "api_name": "rest_framework.views.APIView", "line_number": 30, "usage_type": "name" }, { "api_name": "rest_framework.permissions.IsAuthenticated", "line_number": 31, "usage_type": "name" }, { "api_name": "rest_framework.response.Response", "line_number": 37, "usage_type...
13282882826
import json import os, signal import psutil import time from cilantro_ee.cli.utils import restart from cilantro_ee.cli.start import start_mongo def check_pid(pid): """ Check For the existence of a unix pid. """ try: #signal 0 just checks for pid status os.kill(pid, 0) except OSError: ...
Lamden/cilantro-enterprise
scripts/auto_restart.py
auto_restart.py
py
1,383
python
en
code
3
github-code
7
[ { "api_name": "os.kill", "line_number": 12, "usage_type": "call" }, { "api_name": "psutil.process_iter", "line_number": 22, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 41, "usage_type": "call" }, { "api_name": "os.kill", "line_number": 4...
70252022625
import numpy as np import torch import torch.nn as nn from copy import deepcopy from typing import Dict, Union, Tuple from offlinerlmoup.policy import BasePolicy from torch.nn import functional as F from offlinerlmoup.dynamics import BaseDynamics deta = 10000 class SACPolicy(BasePolicy): def __init__( se...
dcph/MOUP
build/lib/offlinerlmoup/policy/model_free/sac.py
sac.py
py
11,439
python
en
code
1
github-code
7
[ { "api_name": "offlinerlmoup.policy.BasePolicy", "line_number": 12, "usage_type": "name" }, { "api_name": "torch.nn.Module", "line_number": 16, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 16, "usage_type": "name" }, { "api_name": "torch.n...
27467209844
import json import paho.mqtt.client as mqtt from flask import Flask, request, render_template, jsonify import sqlite3 as sql #create the format for the table TableSchema=""" drop table if exists Wind_Turbine_Data ; create table Wind_Turbine_Data ( DayNumber integer primary key autoincrement, WindSpeed text, Ene...
biv147/3-Tier-IoT-Architecture
app.py
app.py
py
3,255
python
en
code
0
github-code
7
[ { "api_name": "sqlite3.connect", "line_number": 19, "usage_type": "call" }, { "api_name": "sqlite3.complete_statement", "line_number": 23, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 27, "usage_type": "call" }, { "api_name": "json.loads", ...
73074889822
from django.shortcuts import render from django.http import JsonResponse from .exceptions import UserDataException import logging from .services import (main_service, get_list_messages_service, get_one_message_service) logger = logging.getLogger(__name__) def main(reque...
DmitriiGrekov/temp_mail
temp_mail/core/views.py
views.py
py
1,288
python
en
code
0
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "services.main_service", "line_number": 15, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 16, "usage_type": "call" }, { "api_name": "servi...
71668282463
from django.urls import path from engine.tasks.views import * urlpatterns = [ path('create', TaskCreateView.as_view(), name='create-task'), path('delete/<int:pk>', TaskDeleteView.as_view(), name='delete-task'), path('update/<int:pk>', TaskUpdateView.as_view(), name='update-task'), path('read/<int:pk>...
amyard/Django-General
ToDo/engine/tasks/urls.py
urls.py
py
432
python
en
code
0
github-code
7
[ { "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", ...
6511741255
import serial import numpy as np import matplotlib.pyplot as plt import time as t import paho.mqtt.client as paho serdev = '/dev/ttyUSB0' s = serial.Serial(serdev, 9600) mqttc = paho.Client() host = "localhost" port = 1883 # MQTT Callbacks def on_connect(self, mosq, obj, rc): print("Connected rc: " + str(r...
Barry-Sung/exam03
velocity.py
velocity.py
py
2,427
python
en
code
0
github-code
7
[ { "api_name": "serial.Serial", "line_number": 9, "usage_type": "call" }, { "api_name": "paho.mqtt.client.Client", "line_number": 11, "usage_type": "call" }, { "api_name": "paho.mqtt.client", "line_number": 11, "usage_type": "name" }, { "api_name": "numpy.arange", ...
43404908338
import seaborn as sns import pandas as pd import matplotlib.pyplot as plt import requests import io import math from scipy import stats import numpy as np import researchpy as rp import statsmodels.api as sm import pprint # ----------------------------------------------------------------------------- # --...
CarlosCanut/PracticasCienciaDeDatos
practica_3.py
practica_3.py
py
28,775
python
es
code
0
github-code
7
[ { "api_name": "requests.get", "line_number": 16, "usage_type": "call" }, { "api_name": "io.StringIO", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 18, "usage_type": "call" }, { "api_name": "pprint.pprint", "line_nu...
39258959342
from __future__ import print_function import sys import re from csv import reader from operator import add from pyspark import SparkContext def replace_blank(row): for index in range(0, 24): if row[index] == '': row[index] = 'UNDEFINED' return row def dump_csv(row): line = "" for ...
shiyanch/DataInsights
scripts/cleaning/spark_replace_blank_columns.py
spark_replace_blank_columns.py
py
894
python
en
code
0
github-code
7
[ { "api_name": "sys.argv", "line_number": 27, "usage_type": "attribute" }, { "api_name": "sys.stderr", "line_number": 28, "usage_type": "attribute" }, { "api_name": "pyspark.SparkContext", "line_number": 30, "usage_type": "call" }, { "api_name": "sys.argv", "li...
71355465183
#!/usr/bin/env python # -*- coding: utf-8 -*- import configparser ''' #生成一个配置文件 config = configparser.ConfigParser() config["DEFAULT"] = {'ServerAliveInterval': '45', 'Compression': 'yes', 'CompressionLevel': '9'} config['bitbucket.org'] = {} config['bitbucket.org']['User'] ...
daniel-vv/ops
S12/day6/configparse_module.py
configparse_module.py
py
1,436
python
en
code
0
github-code
7
[ { "api_name": "configparser.ConfigParser", "line_number": 24, "usage_type": "call" } ]
871580602
from __future__ import annotations from logging import getLogger from typing import Any, Dict, List, Mapping, Optional, Sequence, Set, Union from buildarr.config import RemoteMapEntry from buildarr.types import NonEmptyStr from pydantic import Field, validator from typing_extensions import Annotated, Self from ...ap...
buildarr/buildarr-sonarr
buildarr_sonarr/config/profiles/quality.py
quality.py
py
16,007
python
en
code
1
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 15, "usage_type": "call" }, { "api_name": "types.SonarrConfigBase", "line_number": 18, "usage_type": "name" }, { "api_name": "buildarr.types.NonEmptyStr", "line_number": 25, "usage_type": "name" }, { "api_name": "t...
74275774622
import re from django import forms from mongoengine import * from mumblr.entrytypes import EntryType, Comment, markup class HtmlComment(Comment): """An HTML-based entry, which will be converted from the markup language specified in the settings. """ rendered_content = StringField(required=True) cl...
hmarr/django-mumblr
mumblr/entrytypes/core.py
core.py
py
4,681
python
en
code
255
github-code
7
[ { "api_name": "mumblr.entrytypes.Comment", "line_number": 9, "usage_type": "name" }, { "api_name": "mumblr.entrytypes.EntryType", "line_number": 16, "usage_type": "name" }, { "api_name": "mumblr.entrytypes.markup", "line_number": 28, "usage_type": "call" }, { "api...
38743480115
""" Imports from django, bouquet and category models. """ from django.contrib.admin import ModelAdmin from django.contrib import admin from .models import Bouquet, Category @admin.register(Bouquet) class BouquetAdmin(ModelAdmin): """ Bouquet model view on django admin. """ list_display = ( 'n...
JPatel87/blossoming-bouquets
bouquets/admin.py
admin.py
py
576
python
en
code
0
github-code
7
[ { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 8, "usage_type": "name" }, { "api_name": "django.contrib.admin.register", "line_number": 7, "usage_type": "call" }, { "api_name": "models.Bouquet", "line_number": 7, "usage_type": "argument" }, { "api...
17051042903
from lstore.table import Table, Record from lstore.index import Index from datetime import datetime from lstore.config import * class Query: """ # Creates a Query object that can perform different queries on the specified table Queries that fail must return False Queries that succeed should return the...
Ranxin2023/ECS-165A
lstore/query.py
query.py
py
11,121
python
en
code
0
github-code
7
[ { "api_name": "lstore.index.Index", "line_number": 15, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 44, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 44, "usage_type": "name" }, { "api_name": "lstore.tab...
24560032787
from __future__ import annotations from typing import Any, Dict, Iterator, List, Optional from langchain_core.callbacks import CallbackManagerForLLMRun from langchain_core.language_models.llms import LLM from langchain_core.outputs import GenerationChunk from langchain_core.pydantic_v1 import BaseModel, Field, root_v...
langchain-ai/langchain
libs/community/langchain_community/llms/volcengine_maas.py
volcengine_maas.py
py
6,314
python
en
code
68,990
github-code
7
[ { "api_name": "langchain_core.pydantic_v1.BaseModel", "line_number": 12, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 17, "usage_type": "name" }, { "api_name": "typin...
42451852095
""" Author: Daniel Fink Email: daniel-fink@outlook.com """ import enum import numpy as np from calculation.aggregator import AggregatorType, AggregatorFactory from calculation.attributeComparer import AttributeComparerType, AttributeComparerFactory from calculation.elementComparer import ElementComparerFactory, Elem...
IndikaKuma/quantum
qhana_openapi/dataPreparation/calculation/entityComparer.py
entityComparer.py
py
9,472
python
en
code
0
github-code
7
[ { "api_name": "enum.Enum", "line_number": 16, "usage_type": "attribute" }, { "api_name": "calculation.aggregator.AggregatorType.mean", "line_number": 32, "usage_type": "attribute" }, { "api_name": "calculation.aggregator.AggregatorType", "line_number": 32, "usage_type": "...
43191782475
import os import json import time from google.cloud import pubsub_v1 publisher = pubsub_v1.PublisherClient() GCP_PROJECT = os.environ.get('GCP_PROJECT') def stream_event(topic_name, event_type, event_context): """ Helper function for publishing an event. Parameters: topic_name (str): The name of...
GoogleCloudPlatform/serverless-store-demo
app/helpers/eventing/helpers.py
helpers.py
py
762
python
en
code
178
github-code
7
[ { "api_name": "google.cloud.pubsub_v1.PublisherClient", "line_number": 7, "usage_type": "call" }, { "api_name": "google.cloud.pubsub_v1", "line_number": 7, "usage_type": "name" }, { "api_name": "os.environ.get", "line_number": 9, "usage_type": "call" }, { "api_nam...
43515063836
from rest_framework import serializers from django.db.models import Sum import datetime from models import TaskDetail, TaskGroup, Task class TaskSerializer(serializers.ModelSerializer): task_group_name = serializers.SlugField(source='task_group.name', read_only=True) week_hours = serializers.SerializerMethod...
naviens/TaskTracker
web/src/task_tracker/serializers.py
serializers.py
py
1,877
python
en
code
0
github-code
7
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 8, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 8, "usage_type": "name" }, { "api_name": "rest_framework.serializers.SlugField", "line_number": 9, "usage_...
14174701370
import os import sys import yaml import time import shutil import torch import random import argparse import datetime import numpy as np import torch.nn as nn import torch.nn.functional as F import torchvision.models as models from torch.utils import data from tqdm import tqdm from ptsemseg.models import get_model fr...
MSiam/AdaptiveMaskedProxies
train.py
train.py
py
7,526
python
en
code
102
github-code
7
[ { "api_name": "torch.backends", "line_number": 30, "usage_type": "attribute" }, { "api_name": "torch.manual_seed", "line_number": 34, "usage_type": "call" }, { "api_name": "torch.cuda.manual_seed", "line_number": 35, "usage_type": "call" }, { "api_name": "torch.cu...
18469412794
# -*- coding:utf-8 -*- def solve(n, points, points_len): from collections import defaultdict nums_dict = defaultdict(list) for i in range(points_len): a, b = points[i] nums_dict[a].append(b) nums_dict[b].append(a) # print(nums_dict) ans = 0 for i in range(1, n + 1): ...
weizhixiaoyi/leetcode
nowcoder/company/0823-腾讯/04.py
04.py
py
798
python
en
code
0
github-code
7
[ { "api_name": "collections.defaultdict", "line_number": 5, "usage_type": "call" } ]
108863381
import numpy as np import cv2 face_cascade = cv2.CascadeClassifier('/home/shaxpy/Desktop/haarcascade_frontalface_default.xml') eye_cascade = cv2.CascadeClassifier('/home/shaxpy/Desktop/haarcascade_eye.xml') banana_cascade=cv2.CascadeClassifier('/home/shaxpy/Desktop/cascade.xml') font=cv2.FONT_HERSHEY_PLAIN cap = cv2....
Shaxpy/Computer-Vision
Banana Classifier/Detect a banana.py
Detect a banana.py
py
1,447
python
en
code
1
github-code
7
[ { "api_name": "cv2.CascadeClassifier", "line_number": 4, "usage_type": "call" }, { "api_name": "cv2.CascadeClassifier", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.CascadeClassifier", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.FO...
19424045380
# -*- coding:utf-8 -*- # !bin/python/even # author:pzq import requests from requests import RequestException import json from multiprocessing import Pool import csv class Moc: def __init__(self): # -------------------------------------------------------------------- 课程信息 ---------------------...
pzq7025/Spider
post_mooc.py
post_mooc.py
py
8,505
python
en
code
6
github-code
7
[ { "api_name": "requests.post", "line_number": 42, "usage_type": "call" }, { "api_name": "requests.RequestException", "line_number": 46, "usage_type": "name" }, { "api_name": "json.loads", "line_number": 50, "usage_type": "call" }, { "api_name": "requests.post", ...
32754921271
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from keras.layers import Input, Dense from keras.models import Model import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': # Some variables batch_size = 32 epochs = 20 loss = 'binary_crossentropy' optimizer = 'adam' valida...
KDercksen/hunter2_fashion
scripts/multilabel_nn.py
multilabel_nn.py
py
1,142
python
en
code
2
github-code
7
[ { "api_name": "numpy.random.random", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 19, "usage_type": "attribute" }, { "api_name": "keras.layers.Input", "line_number": 23, "usage_type": "call" }, { "api_name": "keras.layers...
38097447023
#!/usr/bin/python3 import asyncio import json import os import re import subprocess from abc import ABC from configparser import ConfigParser from ipaddress import IPv4Address from os import getpid from pathlib import Path from pprint import pp from tempfile import TemporaryDirectory from typing import ClassVar, Optio...
WH-2099/dst-server
entrypoint.py
entrypoint.py
py
13,901
python
en
code
0
github-code
7
[ { "api_name": "os.dup2", "line_number": 24, "usage_type": "call" }, { "api_name": "os.close", "line_number": 25, "usage_type": "call" }, { "api_name": "os.set_inheritable", "line_number": 26, "usage_type": "call" }, { "api_name": "os.pipe", "line_number": 34, ...
8607493507
from django.core.management import BaseCommand, CommandError from users.models import AuthUser from products.models import Products, Category, ProductCategories import os import json def get_category_list(): with open(os.path.join('data', 'categories.json')) as categories_file: category_list = json.load(c...
ciurezbogdan/Bogdans_shop
products/management/commands/import_data.py
import_data.py
py
2,493
python
en
code
0
github-code
7
[ { "api_name": "os.path.join", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 10, "usage_type": "call" }, { "api_name": "django.core.management.BaseCommand"...
37220988535
import pygame from engine.math.vector import Vector2 from engine.errors.invalid_argument_exception import InvalidArgumentException class SpriteSheet(object): def __init__(self, file_name: str, width: int = None, height: int = None): self.sprite_sheet = pygame.image.load(file_name).convert_alpha() ...
XCPika/Space-Game
engine/image/sprite_sheet.py
sprite_sheet.py
py
1,208
python
en
code
0
github-code
7
[ { "api_name": "pygame.image.load", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 8, "usage_type": "attribute" }, { "api_name": "engine.errors.invalid_argument_exception.InvalidArgumentException", "line_number": 10, "usage_type": "c...
5466165217
import os import glob import numpy as np import matplotlib.pyplot as plt import seaborn as sns # sns.set(style="darkgrid") #这是seaborn默认的风格 sns.set_palette("muted") #常用 # Plot 超参数 图 path = './serverdata/nms' hyparameter ='soft' hyp_files =glob.glob('{}/*{}*.txt'.format(path,hyparameter)) hyps =[];mAPs=[];aps0=[];aps...
Shengjie-bob/Face_Mask_Detection
code/MobileNetV2-SSD-lite/softnms.py
softnms.py
py
1,373
python
en
code
2
github-code
7
[ { "api_name": "seaborn.set_palette", "line_number": 7, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.float", "line_numb...
24337384026
from multiprocessing import Process from worker.base_worker import BaseWorker class MultiWorker(BaseWorker): def __init__( self, envs, policy_network, num_worker, buffer=None, value_network=None ): super().__init__(policy_network, buffer, value_network) self.envs = envs self.n...
isk03276/RLwithIL
worker/multi_worker.py
multi_worker.py
py
1,529
python
en
code
0
github-code
7
[ { "api_name": "worker.base_worker.BaseWorker", "line_number": 6, "usage_type": "name" }, { "api_name": "multiprocessing.Process", "line_number": 14, "usage_type": "call" } ]
30684331488
''' This program takes 1 argument = DataFile. It will parse file and present data in 2d Array DataParse['Make'] = [Year][Image] Duplicate Images are stored as seperate values ''' import re import linecache from collections import defaultdict class DataParse: def __init__(self, inputFile): self.fil...
themadvtak/Data-Mount
DataParser.py
DataParser.py
py
2,893
python
en
code
0
github-code
7
[ { "api_name": "re.findall", "line_number": 28, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 39, "usage_type": "call" }, { "api_name": "linecache.getline", "line_number": 49, "usage_type": "call" } ]