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
37751767465
r"""Inference components such as estimators, training losses and MCMC samplers.""" import torch import torch.nn as nn import torch.nn.functional as F from itertools import islice from torch import Tensor, BoolTensor, Size from typing import * from .distributions import Distribution, DiagNormal, AffineTransform from ...
ADelau/lampe
lampe/inference.py
inference.py
py
20,743
python
en
code
null
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 17, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 17, "usage_type": "name" }, { "api_name": "torch.Tensor", "line_number": 70, "usage_type": "name" }, { "api_name": "torch.nn.Module", "lin...
13142587611
import argparse from auxilliaries.settings_reader import SettingsReader from graph_indexing.graph_indexing_components.graph_name_handler import GraphNameHandler from graph_indexing.graph_indexing_components.graph_printer import GraphPrinter from graph_indexing.graph_indexing_components.graph_relation_counter import Gr...
MichSchli/QARehash
graph_indexing/index_graph.py
index_graph.py
py
2,658
python
en
code
1
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 20, "usage_type": "call" }, { "api_name": "auxilliaries.settings_reader.SettingsReader", "line_number": 25, "usage_type": "call" }, { "api_name": "graph_indexing.graph_indexing_components.graph_printer.GraphPrinter", "li...
24339594409
import scrapy class GoStdlibSpider(scrapy.Spider): """Spider for scraping the Go standard libraries.""" name = "go-stdlib-spider" def start_requests(self): """Start making requests.""" for url, kind in [ ("https://godoc.org/-/go", "core"), ("https://godoc.org/-/su...
src-d/ml-mining
sourced/ml/mining/spiders/go_stdlib.py
go_stdlib.py
py
861
python
en
code
8
github-code
36
[ { "api_name": "scrapy.Spider", "line_number": 4, "usage_type": "attribute" }, { "api_name": "scrapy.Request", "line_number": 15, "usage_type": "call" } ]
14722454202
import json as js, pandas, os, re from matplotlib import pyplot as plt dataset_completo_path = "C:/Users/Mark/Marco/Magistrale/Anno I/Secondo semestre/DS & ML/Progetto/Social-Mapper-Extended/social_mapper2/dataset/dataset_completo.json" cf_path = "C:/Users/Mark/Marco/Magistrale/Anno I/Secondo semestre/DS & ML/Prog...
gaelix98/progetto-fdsml
codici aggiunti/generate_cf.py
generate_cf.py
py
1,504
python
en
code
1
github-code
36
[ { "api_name": "json.load", "line_number": 8, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 45, "usage_type": "call" } ]
23472198434
import pygame from bullet import Bullet from settings import * life = 100 class Player(pygame.sprite.Sprite): def __init__(self, pos): global life super().__init__() ''' # size of player self.image = pygame.Surface((32, 64)) # color of player self.image.fi...
emilia-jura/summativeunit3
player.py
player.py
py
4,459
python
en
code
0
github-code
36
[ { "api_name": "pygame.sprite", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pygame.image.load", "line_number": 19, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 19, "usage_type": "attribute" }, { "api_name": "pygame.math.Vec...
72440795944
#!/usr/bin/env python from urllib.parse import urlparse, parse_qs import json import os import logging import re import bs4 import trackleaders_scraper.common as common def parse_riders_from_race_page(race_page_text): race_page = bs4.BeautifulSoup(race_page_text, "html.parser") rider_links = (...
garyvdm/trackleaders_scraper
trackleaders_scraper/getriders.py
getriders.py
py
1,355
python
en
code
0
github-code
36
[ { "api_name": "bs4.BeautifulSoup", "line_number": 14, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 17, "usage_type": "call" }, { "api_name": "urllib.parse.parse_qs", "line_number": 24, "usage_type": "call" }, { "api_name": "urllib.parse.urlpa...
3538900252
import os from celery import Celery from celery.schedules import crontab # Set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sendmails.settings') app = Celery('sendmails') app.config_from_object('django.conf:settings', namespace='CELERY') # Load task...
sama50/sendmails
sendmails/celery.py
celery.py
py
635
python
en
code
1
github-code
36
[ { "api_name": "os.environ.setdefault", "line_number": 7, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 7, "usage_type": "attribute" }, { "api_name": "celery.Celery", "line_number": 9, "usage_type": "call" } ]
27366167047
import torch from torch.utils.data import Dataset from gpt3.utils import add_special_tokens from data_utils import * tokenizer = add_special_tokens() class GPT21024Dataset(Dataset): def __init__(self, records, max_len=2048): self.data = records self.max_len = max_len self.to...
Paleontolog/summarizer_service
train_model/gpt3/dataset.py
dataset.py
py
1,569
python
en
code
0
github-code
36
[ { "api_name": "gpt3.utils.add_special_tokens", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.utils.data.Dataset", "line_number": 9, "usage_type": "name" }, { "api_name": "gpt3.utils.add_special_tokens", "line_number": 14, "usage_type": "call" }, { ...
10702184707
# Import the dependencies. import numpy as np import pandas as pd import datetime as dt import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func from flask import Flask, jsonify engine = create_engine("sqlite:///Resources/hawaii.sqli...
isabelleroet/sqlalchemy-challenge
app.py
app.py
py
4,486
python
en
code
0
github-code
36
[ { "api_name": "sqlalchemy.create_engine", "line_number": 10, "usage_type": "call" }, { "api_name": "sqlalchemy.ext.automap.automap_base", "line_number": 17, "usage_type": "call" }, { "api_name": "sqlalchemy.orm.Session", "line_number": 27, "usage_type": "call" }, { ...
14411049043
# coding: utf-8 import os import sys import logging #logging.basicConfig() from traceback import print_exc __location__ = os.path.realpath( os.path.join(os.getcwd(), os.path.dirname(__file__))) def getLogger(name): formatter = logging.Formatter( fmt='%(asctime)s %(filename)s:%(lineno)s: %(levelname)-8...
rhee/browser-websocket-tts-server
getlogger.py
getlogger.py
py
1,049
python
en
code
0
github-code
36
[ { "api_name": "os.path.realpath", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": ...
29296064672
from django.urls import path from . import views urlpatterns = [ path('healths/', views.HealthListView.as_view(), name='healths'), path('health/<int:pk>', views.HealthDetailView.as_view(), name='healths-detail'), path('fashions/', views.FashionListView.as_view(), name='fashions'), path('fashion/<in...
anowar143/django-news-frontend
src/lifestyle/urls.py
urls.py
py
534
python
en
code
1
github-code
36
[ { "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", "line_number": 11, "usage_type": "call" }, { "api_name": "django.urls.path", ...
21644919031
import glob import os import sys import platform import typer import shutil from .utils import runCommand, loadPedaUserConfig loadPedaUserConfig() app = typer.Typer() @app.command( context_settings={"allow_extra_args": True, "ignore_unknown_options": True} ) def genbuild(ctx: typer.Context, buildDir: str = './b...
abhishekmishra/peda
pypeda/peda/cmk.py
cmk.py
py
1,892
python
en
code
0
github-code
36
[ { "api_name": "utils.loadPedaUserConfig", "line_number": 10, "usage_type": "call" }, { "api_name": "typer.Typer", "line_number": 11, "usage_type": "call" }, { "api_name": "typer.Context", "line_number": 17, "usage_type": "attribute" }, { "api_name": "utils.runComm...
43489935655
import inspect import logging from logging.handlers import TimedRotatingFileHandler log_server = logging.getLogger('server') log_server.setLevel(logging.DEBUG) rotate_handler = TimedRotatingFileHandler("log\logs\server.log", when='m', interval=1, backupCount=5) rotate_handler.suffix = '%Y%m%d' formatter = logging.Form...
solovyova-1996/async_chat
chat/log/server_log_config.py
server_log_config.py
py
719
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 5, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 6, "usage_type": "attribute" }, { "api_name": "logging.handlers.TimedRotatingFileHandler", "line_number": 7, "usage_type": "call" }, { "api_n...
8555925095
import os import sys import time import jsbsim import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.data import DataLoader, Dataset from tqdm import tqdm torch.set_num_threads(8) sys.path.append(str(jsbsim.get_default_root_dir()) + '/pFCM/...
mrwangyou/IDSD
src/model/idsd.py
idsd.py
py
6,469
python
en
code
4
github-code
36
[ { "api_name": "torch.set_num_threads", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 16, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "jsbsim.get_defaul...
7667813533
import glob import pathlib import pandas as pd import xlsxwriter import ghgscenario as gs import lukeghg.crf.ghginventory as ghg uid_file_dict = dict() def uidmatrix_cell_count(uid_set:set): return len(uid_set) def possible_missing_uid(scenuid_set,uidmatrix_set): return scenuid_set.difference(uidmatrix_set) ...
jariperttunen/lukeghg
lukeghg/lukeghg/scen/missinguid.py
missinguid.py
py
2,888
python
en
code
0
github-code
36
[ { "api_name": "glob.glob", "line_number": 17, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 20, "usage_type": "call" }, { "api_name": "lukeghg.crf.ghginventory.ParseGHGInventoryFile", "line_number": 21, "usage_type": "call" }, { "api_name": ...
72640397223
import librosa import tensorflow as tf import numpy as np from copy import deepcopy from tensorflow.keras.layers import Dense, Activation, Dropout, Conv1D, MaxPooling1D, BatchNormalization from tensorflow.contrib.rnn import GRUCell, RNNCell from util.hparams import * def pre_net(input_data, training): x = Dense(2...
chldkato/Tacotron-Korean
models/modules.py
modules.py
py
2,717
python
en
code
3
github-code
36
[ { "api_name": "tensorflow.keras.layers.Dense", "line_number": 11, "usage_type": "call" }, { "api_name": "tensorflow.keras.layers.Activation", "line_number": 12, "usage_type": "call" }, { "api_name": "tensorflow.keras.layers.Dropout", "line_number": 13, "usage_type": "call...
21628491364
from django.db import models from django.conf import settings from django.db import models, transaction from django.core.mail import send_mail import secrets import string from translation.metadata import TRANSLATION_LANGUAGE_CHOICES from django.contrib.postgres.fields import ArrayField TRANSCRIPT_TYPE = ( ("ORIGI...
AI4Bharat/Chitralekha-Backend
backend/organization/models.py
models.py
py
6,964
python
en
code
18
github-code
36
[ { "api_name": "django.db.models.Model", "line_number": 37, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 37, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 42, "usage_type": "call" }, { "api_name"...
1938145805
import pathlib from typing import List import kclvm.config import kclvm.internal.util as util import kclvm.internal.gpyrpc.gpyrpc_pb2 as pb2 KCL_MOD_PATH_ENV = "${KCL_MOD}" def load_settings_files( work_dir: str, files: List[str] ) -> pb2.LoadSettingsFiles_Result: """Load KCL CLI config from the setting fi...
kcl-lang/kcl-py
kclvm/config/settings.py
settings.py
py
1,916
python
en
code
8
github-code
36
[ { "api_name": "typing.List", "line_number": 13, "usage_type": "name" }, { "api_name": "kclvm.internal.gpyrpc.gpyrpc_pb2.LoadSettingsFiles_Result", "line_number": 32, "usage_type": "call" }, { "api_name": "kclvm.internal.gpyrpc.gpyrpc_pb2", "line_number": 32, "usage_type":...
5313931877
import datetime from flask import Blueprint from core import Utils from exts import db, APIResponse from models import Interview, Person listing_resources = Blueprint('listing_resources', __name__) @listing_resources.route('/interview/<interview_id>', methods=['GET']) def get_interview(interview_id): interview =...
msiddhu/interview_portal
backend/controllers/ViewController.py
ViewController.py
py
1,172
python
en
code
1
github-code
36
[ { "api_name": "flask.Blueprint", "line_number": 8, "usage_type": "call" }, { "api_name": "exts.db.session.query", "line_number": 12, "usage_type": "call" }, { "api_name": "models.Interview", "line_number": 12, "usage_type": "argument" }, { "api_name": "exts.db.ses...
21503702095
# -*- coding: utf-8 -*- import os import telebot import time import random import threading from emoji import emojize from telebot import types from pymongo import MongoClient import game_classes import lobbys import cards from tools import medit import traceback games=lobbys.games from game_classes import codetoclass...
egor5q/Unknown-table-game-
bot.py
bot.py
py
8,507
python
ru
code
0
github-code
36
[ { "api_name": "lobbys.games", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 19, "usage_type": "attribute" }, { "api_name": "telebot.TeleBot", "line_number": 20, "usage_type": "call" }, { "api_name": "game_classes.Game",...
22782893938
# Graph Valid Tree # Description # Given n nodes labeled from 0 to n - 1 and a list of undirected edges # (each edge is a pair of nodes), write a function to check whether these # edges make up a valid tree. # You can assume that no duplicate edges will appear in edges. Since all # edges are undirected, [0, 1] is the...
Zhenye-Na/leetcode
python/261.graph-valid-tree.py
261.graph-valid-tree.py
py
2,485
python
en
code
17
github-code
36
[ { "api_name": "collections.defaultdict", "line_number": 34, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 42, "usage_type": "call" } ]
70474066663
import time import datetime from timeConvert import dayInSeconds from futureTides import HighTideKeeper, LowTideKeeper import json dayTimeTimeStamp = 1602907205 capeCharlesTimeStamp = 1592057307 #Low Tide morning of 6/13/2020 in Cape Charles Harbor jamesTimeStamp = capeCharlesTimeStamp + 27480 #Jmes River Locks 458 mi...
blutherRVA/TideWeatherWebsite
flaskr/TideJsonWrites.py
TideJsonWrites.py
py
1,135
python
en
code
0
github-code
36
[ { "api_name": "json.dump", "line_number": 23, "usage_type": "call" }, { "api_name": "futureTides.HighTideKeeper", "line_number": 23, "usage_type": "call" }, { "api_name": "futureTides.LowTideKeeper", "line_number": 23, "usage_type": "call" }, { "api_name": "json.d...
34024325932
import PySimpleGUI as sg import os from PIL import Image as I import datetime import time from COCO import Coco, Image, Anno import utilities def worm(dir_path: str, category: str, coco): """ recursive flow that adds image objects to the coco object :param dir_path: the dir of the folder with all the data...
OmriHerzfeld1/FinalProject
Classificator.py
Classificator.py
py
8,713
python
en
code
0
github-code
36
[ { "api_name": "os.listdir", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number...
12993263023
import json import time import sys import requests def try_get_json(url, timeout=20): t = time.time() try: with Timer("requests.get(%s)" % url): response = requests.get(url, timeout=timeout) except requests.exceptions.Timeout: log("GET %s timed out after %s." % (url, time.time(...
opentable/mesos_stats
mesos_stats/util.py
util.py
py
1,358
python
en
code
7
github-code
36
[ { "api_name": "time.time", "line_number": 8, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 11, "usage_type": "call" }, { "api_name": "requests.exceptions", "line_number": 12, "usage_type": "attribute" }, { "api_name": "time.time", "line_...
25978662424
from flask import url_for, redirect, request from flask_admin import BaseView, expose from app.controllers import interceptors_controller from app.models.models.http_method import HTTPMethod from app.utils.utils import toast, call class View(BaseView): def is_visible(self): return False @expose('/')...
sayler8182/MockServer
app/views/interceptors/interceptors_view.py
interceptors_view.py
py
3,836
python
en
code
2
github-code
36
[ { "api_name": "flask_admin.BaseView", "line_number": 9, "usage_type": "name" }, { "api_name": "flask_admin.expose", "line_number": 13, "usage_type": "call" }, { "api_name": "flask.redirect", "line_number": 19, "usage_type": "call" }, { "api_name": "flask.url_for",...
9237399008
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Feb 10 14:15:37 2022 @author: sunlin @实现声音震动的单通道模型准确率计算和混淆矩阵生成 """ from cProfile import label from utils.confusionMatrixGenerator import confusionMatrixGenerator,plot_confusion_matrix from utils.accCalculator import accCalculateFrame from sklearn.metr...
Seafood-SIMIT/Long-Term-Correlation-Feature-Network
utils/classificationPerformance.py
classificationPerformance.py
py
4,309
python
en
code
2
github-code
36
[ { "api_name": "torch.tensor", "line_number": 19, "usage_type": "call" }, { "api_name": "torch.float", "line_number": 19, "usage_type": "attribute" }, { "api_name": "torch.tensor", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.float", "line_nu...
2671700806
import numpy as np from const import PitchExtractorType from voice_changer.DiffusionSVC.pitchExtractor.PitchExtractor import PitchExtractor from voice_changer.RVC.deviceManager.DeviceManager import DeviceManager import onnxruntime class RMVPOnnxEPitchExtractor(PitchExtractor): def __init__(self, file: str, gpu: ...
w-okada/voice-changer
server/voice_changer/RVC/pitchExtractor/RMVPOnnxEPitchExtractor.py
RMVPOnnxEPitchExtractor.py
py
3,109
python
en
code
12,673
github-code
36
[ { "api_name": "voice_changer.DiffusionSVC.pitchExtractor.PitchExtractor.PitchExtractor", "line_number": 8, "usage_type": "name" }, { "api_name": "const.PitchExtractorType", "line_number": 13, "usage_type": "name" }, { "api_name": "numpy.log", "line_number": 16, "usage_typ...
1842661731
import os import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler symbol_dict = {'cell': 'Celltrion', 'hmotor': 'HyundaiMotor', 'naver': 'NAVER', 'kakao': 'Kakao', 'lgchem': 'LGChemical', 'lghnh': 'LGH&H', ...
jaewonlee-728/2020-lfd
LFD_Project4/src/DataGenerator.py
DataGenerator.py
py
7,789
python
en
code
0
github-code
36
[ { "api_name": "os.path.join", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path", "line_number": 21, "usage_type": "attribute" }, { "api_name": "pandas.date_range", "line_number": 25, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "l...
3558679885
from django.shortcuts import render from django.http import HttpResponse from .models import * from django.shortcuts import redirect import re from django.utils.html import escape def index(request, id=-1): if not request.user.is_authenticated: dir_tree = '' file_content = '' return render...
KacperSzczepanski/awww-webapp
webapp/utils/views.py
views.py
py
3,284
python
en
code
1
github-code
36
[ { "api_name": "django.shortcuts.render", "line_number": 13, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 17, "usage_type": "call" }, { "api_name": "django.shortcuts.redirect", "line_number": 38, "usage_type": "call" }, { "api_nam...
39207358817
# --- carolin schieferstein & jose c. garcia alanis # --- utf-8 # --- Python 3.7 / mne 0.20 # # --- eeg pre-processing for dpx-r40 # --- version: january 2020 # # --- detect and annotate artifact distorted segments in continuous data, # --- average reference # ==========================================================...
CarolinSchieferstein/Master-DPX-EEG
python_scripts/02_artefact_detection.py
02_artefact_detection.py
py
11,112
python
en
code
1
github-code
36
[ { "api_name": "os.path.isdir", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path", "line_number": 30, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 36, "usage_type": "call" }, { "api_name": "os.path", "line_number": 36, ...
2891422631
""" api.middleware ~~~~~~~~~~~~~~ blah blah blah """ import json from werkzeug.local import Local, release_local from werkzeug.wrappers import Request, Response from werkzeug.exceptions import BadRequest, NotAcceptable, HTTPException, abort class BeforeAfterMiddleware(object): """A simple middleware...
Queens-Hacks/qcumber-api
api/middleware.py
middleware.py
py
5,677
python
en
code
1
github-code
36
[ { "api_name": "werkzeug.local.Local", "line_number": 24, "usage_type": "call" }, { "api_name": "werkzeug.wrappers.Request", "line_number": 35, "usage_type": "call" }, { "api_name": "werkzeug.wrappers.Response.from_app", "line_number": 39, "usage_type": "call" }, { ...
73339046183
''' Created on Sep 19, 2012 @author: jluker ''' import logging from config import config from solrdoc import SolrDocument from flask import request as current_request, current_app as app from flask.ext.solrquery import SearchResponseMixin __all__ = ['SolrResponse'] class SolrResponse(SearchResponseMixin): ...
adsabs/adsabs
adsabs/core/solr/response.py
response.py
py
8,723
python
en
code
7
github-code
36
[ { "api_name": "flask.ext.solrquery.SearchResponseMixin", "line_number": 17, "usage_type": "name" }, { "api_name": "solrdoc.SolrDocument", "line_number": 80, "usage_type": "call" }, { "api_name": "solrdoc.SolrDocument", "line_number": 85, "usage_type": "call" }, { ...
33149860797
import argparse import time import io import zenoh import json from servo import * from pycdr2 import IdlStruct from pycdr2.types import int8, int32, uint32, float64 @dataclass class Vector3(IdlStruct, typename="Vector3"): x: float64 y: float64 z: float64 @dataclass class Twist(IdlStruct, typename="Twist"...
eclipse-zenoh/zenoh-demos
turtlebot3/zdrive-python/zdrive.py
zdrive.py
py
3,143
python
en
code
27
github-code
36
[ { "api_name": "pycdr2.IdlStruct", "line_number": 11, "usage_type": "name" }, { "api_name": "pycdr2.types.float64", "line_number": 12, "usage_type": "name" }, { "api_name": "pycdr2.types.float64", "line_number": 13, "usage_type": "name" }, { "api_name": "pycdr2.typ...
35674891165
""" *Prefix* A prefix. """ from abc import ABCMeta from typing import TypeVar __all__ = ["Prefix"] class Prefix: __metaclass__ = ABCMeta Meta = TypeVar("Meta") Control = TypeVar("Control") Shift = TypeVar("Shift") Hyper = TypeVar("Hyper") Super = TypeVar("Super") Alt = TypeVar...
jedhsu/text
text/_elisp/key/_prefix/_prefix.py
_prefix.py
py
328
python
en
code
0
github-code
36
[ { "api_name": "abc.ABCMeta", "line_number": 17, "usage_type": "name" }, { "api_name": "typing.TypeVar", "line_number": 19, "usage_type": "call" }, { "api_name": "typing.TypeVar", "line_number": 20, "usage_type": "call" }, { "api_name": "typing.TypeVar", "line_...
29432719201
""" 构造MeshSegNet数据集 """ import os import vtk from shutil import copyfile def convert(dataset: str, img_path: str, label_path: str): """ 提供原始数据路径和目标数据路径 """ reader = vtk.vtkPLYReader() writer = vtk.vtkPolyDataWriter() # 当前文件夹下的所有子文件夹 folders = [name for name in os.listdir(dat...
XiShuFan/MeshSegNet
step0_prepare.py
step0_prepare.py
py
2,615
python
en
code
0
github-code
36
[ { "api_name": "vtk.vtkPLYReader", "line_number": 13, "usage_type": "call" }, { "api_name": "vtk.vtkPolyDataWriter", "line_number": 14, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path.isdir", ...
37493947110
''' Elabore um programa em Python que gere uma matriz aleatória (9x9), com números entre 0 e 10, imprima-a. Após, peça o quadrante desejado e imprima os elementos desse quadrante. ''' from random import randint from termcolor import colored m = [0] * 9 for i in range(9): m[i] = [0] * 9 for j in range(9): ...
danibassetto/Python
pythonProjectListasExercicio/Lista7/L7_E15.py
L7_E15.py
py
2,579
python
en
code
0
github-code
36
[ { "api_name": "random.randint", "line_number": 12, "usage_type": "call" }, { "api_name": "termcolor.colored", "line_number": 14, "usage_type": "call" } ]
14076176482
from collections import Counter import numpy as np import pandas as pd from matplotlib import pyplot from backfit.BackfitUtils import init_objects from backfit.utils.utils import load_new_diffs, load_mcmc_diffs from utils.utils import extract_runs_w_timestamp if __name__ == '__main__': n_users = -1 cats, cat...
rjm49/isaacdata
student_profiling/StudentProfiling.py
StudentProfiling.py
py
1,235
python
en
code
0
github-code
36
[ { "api_name": "backfit.BackfitUtils.init_objects", "line_number": 13, "usage_type": "call" }, { "api_name": "backfit.utils.utils.load_new_diffs", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.unique", "line_number": 17, "usage_type": "call" }, { ...
74352481063
# -*- coding: utf-8 -*- """ ------------------------------------------------------------------------------- GUFY - Copyright (c) 2019, Fabian Balzer Distributed under the terms of the GNU General Public License v3.0. The full license is in the file LICENSE.txt, distributed with this software. ----------------...
Fabian-Balzer/GUFY
GUFY/simgui_modules/scriptWriter.py
scriptWriter.py
py
55,424
python
en
code
0
github-code
36
[ { "api_name": "PyQt5.QtWidgets.QDialog", "line_number": 39, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets", "line_number": 39, "usage_type": "name" }, { "api_name": "simgui_modules.additionalWidgets.GUILogger.info", "line_number": 50, "usage_type": "call" ...
11130591414
import azure.functions as func import logging import json from azure.data.tables import TableServiceClient # send to congratiulation message queue from azure.servicebus import ServiceBusClient, ServiceBusMessage CONNECTION_STR = "Endpoint=sb://testbus-sk11.servicebus.windows.net/;SharedAccessKeyName=RootManageShare...
IngNoN/UC_Kaffeemaschine
processCoffeeOrder/__init__.py
__init__.py
py
2,119
python
en
code
0
github-code
36
[ { "api_name": "azure.functions.ServiceBusMessage", "line_number": 15, "usage_type": "attribute" }, { "api_name": "azure.functions", "line_number": 15, "usage_type": "name" }, { "api_name": "logging.info", "line_number": 17, "usage_type": "call" }, { "api_name": "l...
26614306732
import operator import functools import logging import elasticsearch_dsl from elasticsearch import Elasticsearch from jam import settings from jam import exceptions from jam.backends import query as queries from jam.backends.base import Backend logging.getLogger('elasticsearch').setLevel(logging.WARNING) class Ela...
CenterForOpenScience/jamdb
jam/backends/elasticsearch.py
elasticsearch.py
py
4,968
python
en
code
3
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.WARNING", "line_number": 13, "usage_type": "attribute" }, { "api_name": "jam.backends.base.Backend", "line_number": 16, "usage_type": "name" }, { "api_name": "elas...
20214118948
from django.shortcuts import render from django import forms from django.core.files.storage import default_storage from django.http import HttpResponse from django.core.files.base import File, ContentFile from django.http import HttpResponse import markdown2 import random import copy from . import util class NewTitl...
ksondjaja/wiki
encyclopedia/views.py
views.py
py
5,050
python
en
code
0
github-code
36
[ { "api_name": "django.forms.Form", "line_number": 14, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 14, "usage_type": "name" }, { "api_name": "django.forms.CharField", "line_number": 15, "usage_type": "call" }, { "api_name": "django.for...
12292682173
#数据处理 import sys, pickle, os, random import numpy as np import gensim #add by wjn ## tags, BIO tag2label = {"O": 0, "B-KNOW": 1, "I-KNOW": 2, "B-PRIN": 3, "I-PRIN": 4, "B-OTHER": 5, "I-OTHER": 6 } #输入train_data文件的路径,读取训练集的语料,输出train_data def read_corpus(corpus_path...
wjn1996/Mathematical-Knowledge-Entity-Recognition
data.py
data.py
py
6,414
python
en
code
31
github-code
36
[ { "api_name": "pickle.dump", "line_number": 78, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 106, "usage_type": "call" }, { "api_name": "os.path", "line_number": 106, "usage_type": "attribute" }, { "api_name": "pickle.load", "line_numbe...
23070148342
# -*- coding: utf-8 -*- """ Created on Thu Dec 22 08:07:59 2016 @author: vijverbe """ from ecmwfapi import ECMWFDataServer server = ECMWFDataServer() grid = "1.125/1.125" #server.retrieve({ # 'dataset' : "era5_test", # 'stream' : "oper/enda", # 'oper' specifies the high resolution daily data, as...
ruudvdent/WAM2layersPython
dowload_scripts/download_lm.py
download_lm.py
py
2,494
python
en
code
23
github-code
36
[ { "api_name": "ecmwfapi.ECMWFDataServer", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.squeeze", "line_number": 49, "usage_type": "call" }, { "api_name": "netCDF4.Dataset", "line_number": 49, "usage_type": "call" }, { "api_name": "netCDF4.Datase...
28368810745
import json import os import time import logging import glob import csv import os import stat import psycopg2 import sqlite3 as sql delimiter='/' environment = '' bucket = '' models = {} def getDBString_PROD(): # Format DB connection information sslmode = "sslmode=verify-ca" # Format DB connection inf...
Diksha-cmd/Containerized-batch-pipeline-using-DockerHub-Pachyderm-Google-Cloud-Storage-Postgres-Cloud-Database
pipeline2/Pipeline_2.py
Pipeline_2.py
py
4,047
python
en
code
0
github-code
36
[ { "api_name": "os.environ.get", "line_number": 25, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 25, "usage_type": "attribute" }, { "api_name": "os.chmod", "line_number": 30, "usage_type": "call" }, { "api_name": "stat.S_IRUSR", "line_numb...
42779565833
import argparse import fastexcel def get_args() -> argparse.Namespace: parser = argparse.ArgumentParser() parser.add_argument("file") return parser.parse_args() def main(): args = get_args() excel_file = fastexcel.read_excel(args.file) for sheet_name in excel_file.sheet_names: excel...
ToucanToco/fastexcel
test.py
test.py
py
409
python
en
code
16
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 7, "usage_type": "call" }, { "api_name": "argparse.Namespace", "line_number": 6, "usage_type": "attribute" }, { "api_name": "fastexcel.read_excel", "line_number": 14, "usage_type": "call" } ]
24519178649
import urllib from urllib.request import urlopen import requests import cv2 import numpy as np from PIL import Image as im class CaptchaSolver: def __init__(self, captcha, captcha_key): self.captcha = captcha self.captcha_key = captcha_key def url_to_image(self): # get i...
claimclone/TikTokBot
captcha.py
captcha.py
py
2,698
python
en
code
null
github-code
36
[ { "api_name": "requests.get", "line_number": 34, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 35, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 47, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": ...
14761703992
''' Description: Author: caobin Date: 2021-06-22 Github: https://github.com/bcao19 LastEditors: caobin LastEditTime: 2021-06-28 23:20:20 ''' #!/home/ASIPP/caobin/anaconda3/bin/python # -*-coding: UTF-8 -*- """ this module get the rho from efit or efitrt type=1 rho from psi, type=2 rho from sqrt(rho), type=3 rho fro...
bcao19/my-python-code
east_mds/get_rho.py
get_rho.py
py
1,588
python
en
code
0
github-code
36
[ { "api_name": "east_mds.get_data.data1", "line_number": 24, "usage_type": "call" }, { "api_name": "east_mds.get_data", "line_number": 24, "usage_type": "name" }, { "api_name": "numpy.argmin", "line_number": 26, "usage_type": "call" }, { "api_name": "east_mds.get_d...
28890119301
#! /usr/bin/python """A script to push a new Pytype release to PyPI. This script assumes that you have twine installed. The easiest way to run this script is to run from inside of a virtualenv after "pip" installing "twine". Also, this virtualenv should not have pytype installed already. USAGE: $> python release.py ...
google/pytype
build_scripts/release.py
release.py
py
3,784
python
en
code
4,405
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 37, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 44, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 53, "usage_type": "call" }, { "api_name": "os.path.join", "line_nu...
25259786916
### Setup import pandas as pd from splinter import Browser from bs4 import BeautifulSoup as bsp from webdriver_manager.chrome import ChromeDriverManager import time # Setup splinter executable_path = {'executable_path': ChromeDriverManager().install()} browser = Browser('chrome', **executable_path, headless=False) ...
Robert-A-Norris/web-scraping-challenge
Mission_to_Mars/scrape_mars.py
scrape_mars.py
py
2,718
python
en
code
0
github-code
36
[ { "api_name": "webdriver_manager.chrome.ChromeDriverManager", "line_number": 12, "usage_type": "call" }, { "api_name": "splinter.Browser", "line_number": 13, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 24, "usage_type": "call" }, { "api_name...
29370556151
import discord from redbot.core import commands, Config, app_commands import asyncio import aiohttp from steam.steamid import SteamID from datetime import datetime class SteamAPI(commands.Cog): """Search for games and player profiles. Grab your Steam [API Key](https://steamcommunity.com/dev/apikey). Use t...
dkoz/kozejin-cogs
steamapp/steamapp.py
steamapp.py
py
8,621
python
en
code
0
github-code
36
[ { "api_name": "redbot.core.commands.Cog", "line_number": 8, "usage_type": "attribute" }, { "api_name": "redbot.core.commands", "line_number": 8, "usage_type": "name" }, { "api_name": "redbot.core.Config.get_conf", "line_number": 18, "usage_type": "call" }, { "api_...
4165802056
# ONLY EDIT FUNCTIONS MARKED CLEARLY FOR QUESTIONS 1 AND 2. DO NOT CHANGE ANY METHOD SIGNATURES OR THE RUNALL METHOD from flask import Flask, request, jsonify import json from time import clock app = Flask(__name__) # IMPORTANT: DO NOT CHANGE THIS FUNCTION UNDER ANY CIRCUMSTANCES @app.route('/runall', methods=['POS...
pythoncodingchallenge/skeleton-repo
vcc-skeleton.py
vcc-skeleton.py
py
887
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.request.data", "line_number": 13, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 13, "usage_type": "name" }, { "api_name": "json.loads", "li...
72215136745
# Utilities to parse alignment files from Schwartz Lab SOMA # *and* to write alignments in Schwartz lab SOMA format # # We use functions and classes defined here both to convert # from maligner to SOMA and from SOMA to maligner. # # This module could be better organized! # Perhaps separate modules for parsing and writi...
LeeMendelowitz/maligner
lib/malignpy/schwartz/parse_soma_alignments.py
parse_soma_alignments.py
py
22,652
python
en
code
6
github-code
36
[ { "api_name": "lxml.etree.Element", "line_number": 53, "usage_type": "call" }, { "api_name": "copy.deepcopy", "line_number": 253, "usage_type": "call" }, { "api_name": "copy.deepcopy", "line_number": 260, "usage_type": "call" }, { "api_name": "lxml.etree.parse", ...
5548747359
import os from pprint import pprint from tqdm import tqdm import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim import torch.utils.data import torch.nn.functional as F from torch.utils.tensorboard import SummaryWriter import numpy as np import utils from lt_data import t...
limengyang1992/lpl
lpl-longtail-other/train_lpl_cifar100.py
train_lpl_cifar100.py
py
10,563
python
en
code
4
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.nn.Module", "line_number": 66, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 66, "usage_type": "name" }, { "api_name": "torch.nn.CrossE...
8385911882
from django import template, forms from collections import OrderedDict from ..models import FormLabel register = template.Library() # get the form field corresponding to the given block @register.simple_tag def block_field(form, block): if block.name in form.fields: return form[block.name] return None # ge...
johncronan/formative
formative/templatetags/form_block.py
form_block.py
py
3,803
python
en
code
4
github-code
36
[ { "api_name": "django.template.Library", "line_number": 7, "usage_type": "call" }, { "api_name": "django.template", "line_number": 7, "usage_type": "name" }, { "api_name": "models.FormLabel.LabelStyle", "line_number": 78, "usage_type": "attribute" }, { "api_name":...
5657081633
#!/usr/bin/env python3 import os import json import requests import sys def TriggerPipeline(token, commit, ci_ref): url = "https://circleci.com/api/v2/project/github/mapbox/mobile-metrics/pipeline" headers = { "Content-Type": "application/json", "Accept": "application/json", } data =...
mapbox/mapbox-navigation-ios
scripts/trigger-metrics.py
trigger-metrics.py
py
1,361
python
en
code
821
github-code
36
[ { "api_name": "requests.post", "line_number": 27, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 33, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 35, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 39, ...
36445019270
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import TimeoutException from selenium.webdriver.support import expected_conditions as EC import sys def execute(): """ executes script, checks if l...
rayhanrandi/siakwar
driver.py
driver.py
py
6,467
python
en
code
0
github-code
36
[ { "api_name": "selenium.webdriver.common.by.By.NAME", "line_number": 25, "usage_type": "attribute" }, { "api_name": "selenium.webdriver.common.by.By", "line_number": 25, "usage_type": "name" }, { "api_name": "selenium.webdriver.common.by.By.NAME", "line_number": 29, "usag...
30188582457
#!/usr/bin/python2 # -*- coding: utf-8 -*- import copy import numpy as np import sys import time from control_msgs.msg import GripperCommandGoal, GripperCommandAction from geometry_msgs.msg import Quaternion, PoseStamped from grasping_msgs.msg import FindGraspableObjectsAction, FindGraspableObjectsGoal from moveit_co...
osuprg/fetch_mobile_manipulation
mobile_manipulation/src/grasping/grasping.py
grasping.py
py
7,066
python
en
code
5
github-code
36
[ { "api_name": "tf2_ros.Buffer", "line_number": 34, "usage_type": "call" }, { "api_name": "rospy.Duration", "line_number": 34, "usage_type": "call" }, { "api_name": "tf2_ros.TransformListener", "line_number": 36, "usage_type": "call" }, { "api_name": "moveit_comman...
37334494671
from importlib.resources import contents import logging import json from aiogram import Bot, Dispatcher, types from aiogram.types import Message from data.config import BOT_TOKEN from aiogram import types # from aiogram.dispatcher.filters.builtin import CommandStart from aiogram.types import InlineKeyboardMarkup, Inl...
DobbiKov/telegram-bot-web-app
bot/main.py
main.py
py
5,445
python
en
code
3
github-code
36
[ { "api_name": "data.config.BOT_TOKEN", "line_number": 40, "usage_type": "name" }, { "api_name": "aiogram.Bot", "line_number": 41, "usage_type": "call" }, { "api_name": "aiogram.Dispatcher", "line_number": 42, "usage_type": "call" }, { "api_name": "aiogram.dispatch...
23420929820
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('bar', '0300_auto_20161002_1441'), ('clientes', '0276_auto_20160827_2010'), ('personal', '0272_auto_20160827_2010'), (...
pmmrpy/SIGB
ventas/migrations/0051_auto_20161002_1441.py
0051_auto_20161002_1441.py
py
4,059
python
es
code
0
github-code
36
[ { "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": 18, "usage_type": "call" }, ...
39274547040
from fastapi import HTTPException, Request from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials from sentry_sdk import capture_message from ..auth.auth_handler import verify_jwt class JWTBearer(HTTPBearer): def __init__(self, auto_error: bool = True): # automatic error reportin su...
LosAltosHacks/api
app/auth/auth_bearer.py
auth_bearer.py
py
1,344
python
en
code
0
github-code
36
[ { "api_name": "fastapi.security.HTTPBearer", "line_number": 7, "usage_type": "name" }, { "api_name": "fastapi.Request", "line_number": 12, "usage_type": "name" }, { "api_name": "fastapi.security.HTTPAuthorizationCredentials", "line_number": 13, "usage_type": "name" }, ...
71894780585
from django.shortcuts import render, redirect from .models import Story, TagsModel from .forms import StoryForm, ProductFilter from django.http import HttpResponse from django.views.generic import DetailView, UpdateView, DeleteView def product_list(request): filter = ProductFilter(request.GET, queryset=Stor...
youngnastyas/appProject
classifier/main/views.py
views.py
py
3,724
python
en
code
0
github-code
36
[ { "api_name": "forms.ProductFilter", "line_number": 8, "usage_type": "call" }, { "api_name": "models.Story.objects.all", "line_number": 8, "usage_type": "call" }, { "api_name": "models.Story.objects", "line_number": 8, "usage_type": "attribute" }, { "api_name": "m...
2769385558
from discord.ext import commands from lib.mysqlwrapper import mysql from typing import Optional import discord import lib.embedder import logging class Checklist(commands.Cog): def __init__(self, client): self.client = client # Set up the logger self.logger = logging.getLogger(__name__) ...
guitaristtom/Cherubi
bot/cogs/checklist.py
checklist.py
py
12,761
python
en
code
1
github-code
36
[ { "api_name": "discord.ext.commands.Cog", "line_number": 9, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 9, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 14, "usage_type": "call" }, { "api_name": "lo...
5580225642
import logging import os import math import logging import sys import glob from natsort import natsorted import torchvision import numpy as np import cv2 from PIL import Image import torch from torch.utils.data import Dataset from torchvision import transforms from torch.nn import functional as F from PIL import Imag...
masa-k-21414/explainable_trajectory_prediction_model
scripts/model/data/trajectories.py
trajectories.py
py
31,981
python
en
code
4
github-code
36
[ { "api_name": "PIL.ImageFile.LOAD_TRUNCATED_IMAGES", "line_number": 19, "usage_type": "attribute" }, { "api_name": "PIL.ImageFile", "line_number": 19, "usage_type": "name" }, { "api_name": "logging.basicConfig", "line_number": 22, "usage_type": "call" }, { "api_na...
33445056109
from docutils import nodes from docutils.parsers.rst import Directive, directives import requests class Contributor: """Main class for the contributors atributes.""" def __init__(self, login, url, contributions=0): """Initialize atributes.""" self.contributions = contributions self.l...
Kubeinit/kubeinit
docs/src/_exts/ghcontributors.py
ghcontributors.py
py
2,820
python
en
code
208
github-code
36
[ { "api_name": "docutils.nodes.paragraph", "line_number": 19, "usage_type": "call" }, { "api_name": "docutils.nodes", "line_number": 19, "usage_type": "name" }, { "api_name": "docutils.nodes.reference", "line_number": 20, "usage_type": "call" }, { "api_name": "docu...
70356004905
# /home/jay/anaconda3/bin/python import numpy as np from sklearn.metrics import log_loss from scipy.special import expit # sig = lambda x: 1.0/(1.0+np.exp(-x)) sig = expit sig_d = lambda x: sig(x) * (1 - sig(x)) sig_to_d = lambda x: x * (1 - x) # log_loss = lambda y,yhat: np.sum(-(y*np.log(yhat) + (1 - y)*n...
jayswinney/mlp
mlp.py
mlp.py
py
7,754
python
en
code
0
github-code
36
[ { "api_name": "scipy.special.expit", "line_number": 8, "usage_type": "name" }, { "api_name": "numpy.random.randn", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 29, "usage_type": "attribute" }, { "api_name": "numpy.random....
33539146773
#!../python35/python.exe print ("Content-type: text/html\n") import cgi import cgitb; cgitb.enable() form = cgi.FieldStorage() import pymysql conn = pymysql.connect(host='localhost', port=3306, user='root', passwd='',db='soccer',autocommit=True) cur = conn.cursor() nombre = form.getfirst("nombre"); posicion = form.getf...
cecilianogranados96/Proyecto-Soccer
nuevo_jugador.py
nuevo_jugador.py
py
977
python
es
code
0
github-code
36
[ { "api_name": "cgitb.enable", "line_number": 4, "usage_type": "call" }, { "api_name": "cgi.FieldStorage", "line_number": 5, "usage_type": "call" }, { "api_name": "pymysql.connect", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.basename", "li...
26850908312
import nextcord from nextcord.ext import commands from nextcord import Interaction, SlashOption from config import settings class ExampleSlash(commands.Cog): def __init__(self, bot): self.bot = bot @nextcord.slash_command(guild_ids=[settings.GUILD_ID], description="Чистка текущего канала от сообщений"...
Maxim-2005/Kurushi-DiscordBot-
cogs/example_slash.py
example_slash.py
py
989
python
ru
code
0
github-code
36
[ { "api_name": "nextcord.ext.commands.Cog", "line_number": 6, "usage_type": "attribute" }, { "api_name": "nextcord.ext.commands", "line_number": 6, "usage_type": "name" }, { "api_name": "nextcord.Interaction", "line_number": 11, "usage_type": "name" }, { "api_name"...
23785755593
from django.urls import path, include from django.conf import settings from django.conf.urls.static import static from .views import index, PostDetail, news_all, ContactView, TeamDetail, TeamAll, club, CategoryNews, Galery, subscription, \ locations, SubscriptionView urlpatterns = [ path('', index, name='inde...
dimaProtas/Footballab
main/urls.py
urls.py
py
983
python
en
code
0
github-code
36
[ { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "views.index", "line_number": 9, "usage_type": "argument" }, { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "views.SubscriptionVie...
1353676121
import cv2 import os src_dir = 'H:\\document\\ocr\\src\\shixin2' dst_dir = 'H:\\document\\ocr\\dst-test' files = os.listdir(src_dir) for name in files: im = cv2.imread(os.path.join(src_dir, name)) im_gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) blurred = cv2.GaussianBlur(im_gray, (5, 5), 0) ret, thres...
magicnian/court
train/pic_func.py
pic_func.py
py
442
python
en
code
1
github-code
36
[ { "api_name": "os.listdir", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, ...
27005467704
import os import json import logging from slacker.logger import Logger from slacker.session import Session # Default REPL prompt template string. Override with "repl_prompt" field in # .slacker config file. # # Supported identifers: # ${ro} - display DEFAULT_READ_ONLY_STR when Slacker is running in read-only mode # $...
netromdk/slacker
slacker/environment/config.py
config.py
py
4,977
python
en
code
14
github-code
36
[ { "api_name": "slacker.logger.Logger", "line_number": 26, "usage_type": "call" }, { "api_name": "slacker.logger.Logger.levels", "line_number": 87, "usage_type": "call" }, { "api_name": "slacker.logger.Logger", "line_number": 87, "usage_type": "name" }, { "api_name...
42591857727
from dataclasses import dataclass, field from dataclasses_json import dataclass_json from typing import Tuple, List, Set, Optional, Dict, Iterable from math import sqrt, asin, sin, cos, pi from pathlib import Path Coordinate = Tuple[float, float] def distance(p1: Coordinate, p2: Coordinate): return sqrt((p1[0] - ...
bmboucher/rail_baron
python/src/pyrailbaron/map/datamodel.py
datamodel.py
py
4,986
python
en
code
0
github-code
36
[ { "api_name": "typing.Tuple", "line_number": 7, "usage_type": "name" }, { "api_name": "math.sqrt", "line_number": 10, "usage_type": "call" }, { "api_name": "math.pi", "line_number": 14, "usage_type": "name" }, { "api_name": "math.pi", "line_number": 15, "u...
17888105443
from django.shortcuts import render from django.shortcuts import Http404 from django.shortcuts import HttpResponse from crawler.tools import crawler,indexJson,search from django.views.decorators.csrf import csrf_protect from json import dumps,loads # Create your views here. @csrf_protect def indexPage(request): co...
roohy/search_engine_server
crawler/views.py
views.py
py
1,270
python
en
code
0
github-code
36
[ { "api_name": "django.shortcuts.render", "line_number": 12, "usage_type": "call" }, { "api_name": "django.views.decorators.csrf.csrf_protect", "line_number": 9, "usage_type": "name" }, { "api_name": "django.shortcuts.render", "line_number": 17, "usage_type": "call" }, ...
19247601785
""" Contains a pipeline for generating a data set for use with the LightTag platform see: https://www.lighttag.io/ """ import json from ucla_topic_analysis import get_file_list from ucla_topic_analysis.data import get_training_file_path from ucla_topic_analysis.data.coroutines import create_file from ucla_t...
swang666/applied-finance-project
UCLA-Topic-Analysis/ucla_topic_analysis/data/coroutines/light_tag.py
light_tag.py
py
2,695
python
en
code
1
github-code
36
[ { "api_name": "ucla_topic_analysis.data.pipeline.Pipeline", "line_number": 17, "usage_type": "name" }, { "api_name": "ucla_topic_analysis.data.coroutines.read.ReadFilePipeline.get_input_stream", "line_number": 42, "usage_type": "call" }, { "api_name": "ucla_topic_analysis.data.co...
1450744710
from dash import Dash, dcc, Output, Input # pip install dash import dash_bootstrap_components as dbc # pip install dash-bootstrap-components import plotly.express as px import pandas as pd # pip install pandas import geopandas as gpd df = pd.read_csv("rainfall.csv") print(df.head())...
Aakanksha-Geo/Average_rainfall_in_India_Dash_Plotly
dash_rainfall_India.py
dash_rainfall_India.py
py
2,336
python
en
code
0
github-code
36
[ { "api_name": "pandas.read_csv", "line_number": 8, "usage_type": "call" }, { "api_name": "geopandas.read_file", "line_number": 11, "usage_type": "call" }, { "api_name": "dash.Dash", "line_number": 16, "usage_type": "call" }, { "api_name": "dash_bootstrap_component...
28223166240
import pykka from site_storage.sсhema import RegularCheck, WatchStatus from site_storage.messages import UpdateSiteRequest from site_storage.messages import SiteDeleteResponse, SiteResponse, SubscribeOnSiteUpdates import os import urllib.request from urllib.parse import urldefrag import time import threading from datet...
map82top/site_watcher
site_downloader/actor.py
actor.py
py
4,456
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 16, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 23, "usage_type": "call" }, { "api_name": "datetim...
13092077642
import sympy as sy from itertools import permutations import dill import pickle import time total_start = time.time() # # #The Antimatter Reactor Diagram # # /---------- Q1 #P1---------/ # S (K1) #P2---------| # | (K2) #P3---------| # S (K3) #P4---------\ # \------...
Northerneye/antimatterReactor
antimatterReactor.py
antimatterReactor.py
py
10,272
python
en
code
0
github-code
36
[ { "api_name": "time.time", "line_number": 6, "usage_type": "call" }, { "api_name": "sympy.var", "line_number": 23, "usage_type": "call" }, { "api_name": "sympy.Matrix", "line_number": 26, "usage_type": "call" }, { "api_name": "sympy.Matrix", "line_number": 27,...
5185672583
import pymysql from .config import m_config from dbutils.persistent_db import PersistentDB class DBconnect: def __init__(self, db_config): self.config = db_config self.POOL = self.initPool() self.conn = self.createConnection() def initPool(self): POOL = PersistentDB( ...
FortyWinters/autoAnime
src/lib/connect.py
connect.py
py
1,572
python
en
code
1
github-code
36
[ { "api_name": "dbutils.persistent_db.PersistentDB", "line_number": 12, "usage_type": "call" }, { "api_name": "config.m_config.get", "line_number": 50, "usage_type": "call" }, { "api_name": "config.m_config", "line_number": 50, "usage_type": "name" } ]
71346257703
from flask import Flask from pickView import PickView, EventAdd, EventRetrieve app = Flask(__name__) app.add_url_rule('/', view_func=PickView.as_view('pick_view'), methods=['GET']) app.add_url_rule('/eventAdd', view_func=EventAdd.as_view('event_add'), methods=['POST']) app.add_url_rule('/eventRetrieve', view_...
hethune/impicky
picky.py
picky.py
py
437
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 4, "usage_type": "call" }, { "api_name": "pickView.PickView.as_view", "line_number": 6, "usage_type": "call" }, { "api_name": "pickView.PickView", "line_number": 6, "usage_type": "name" }, { "api_name": "pickView.EventAd...
6209537625
# -*- coding: utf-8 -*- """ Created on Tue Jan 31 12:39:09 2023 @author: Mouhamad Ali Elamine """ import argparse import json parser = argparse.ArgumentParser(description='A1T3') parser.add_argument('--input_file', type=str, default='./review.json', help='the input file') parser.add_argument('--output_fi...
elami018/CSCI_5523
HW1/task3_customized.py
task3_customized.py
py
1,815
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "call" }, { "api_name": "pyspark.SparkConf", "line_number": 21, "usage_type": "call" }, { "api_name": "pyspark.SparkContext.getOrCreate", "line_number": 28, "usage_type": "call" }, { "api_na...
41086969415
# Импортировал библиотеки from tkinter import * from tkinter import messagebox import pyperclip import pyshorteners # Создал окно с помощью: tkinter root = Tk() # Прописал название нашего окна root.title('Link_Converter') # Задал размер окна с помощью: geometry root.geometry('600x400') # Задал цвет фона, нашему окну r...
Maksim-Lukashyk-1996/Link_Converter
LinkConverter.py
LinkConverter.py
py
2,512
python
ru
code
0
github-code
36
[ { "api_name": "pyperclip.copy", "line_number": 39, "usage_type": "call" }, { "api_name": "pyshorteners.Shortener", "line_number": 44, "usage_type": "call" }, { "api_name": "tkinter.messagebox.showerror", "line_number": 48, "usage_type": "call" }, { "api_name": "tk...
11483729231
import re import glob import json import os def get_enode_info(): result = [] prefix = '/tmp/ansible-eth-node-info-' for file_name in glob.glob('{}*'.format(prefix)): node_id = file_name.replace(prefix, '') with open(file_name) as f: content = f.read().replace('\n', '') ...
mitnk/bcli
playbooks/ethereum/generate_node_list.py
generate_node_list.py
py
1,319
python
en
code
1
github-code
36
[ { "api_name": "glob.glob", "line_number": 10, "usage_type": "call" }, { "api_name": "re.search", "line_number": 14, "usage_type": "call" }, { "api_name": "os.remove", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path.expanduser", "line_number":...
74469041703
import requests import base45 import base64 from typing import Dict, Tuple, Optional from cose.keys import cosekey, ec2, keyops, curves from cryptojwt import utils as cjwt_utils import zlib from cose.messages import CoseMessage from pyasn1.codec.ber import decoder as asn1_decoder from cose.headers import Algorithm, KID...
mahadirz/MySejahtera-Private-API
api.py
api.py
py
4,743
python
en
code
4
github-code
36
[ { "api_name": "requests.post", "line_number": 34, "usage_type": "call" }, { "api_name": "requests.request", "line_number": 47, "usage_type": "call" }, { "api_name": "pyasn1.codec.ber.decoder.decode", "line_number": 56, "usage_type": "call" }, { "api_name": "pyasn1...
12149097983
import requests import json import os from dotenv import load_dotenv # Load environment variables from .env file load_dotenv() # Load token from .env file. Don't put the .env file in source control (git/devops) token = os.environ.get("PERSONAL_TOKEN") project_id = os.environ.get("PROJECT_ID") # API Documentation # (...
norwegian-geotechnical-institute/labmanager-api-demo
example.py
example.py
py
1,691
python
en
code
0
github-code
36
[ { "api_name": "dotenv.load_dotenv", "line_number": 7, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 10, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.environ.get", ...
74839486183
from lxml import etree import pandas def getdata(name , lb): # htmll = etree.parse(name, etree.HTMLParser()) f = open(name, encoding="utf-8") # 输出读取到的数据 text = f.read() f.close() # encode_type = chardet.detect(text) # text = text.decode(encode_type['encoding']) htmll = etree.HT...
chenqiuying1023/opensea-supergucci
getinfo2.py
getinfo2.py
py
3,143
python
en
code
1
github-code
36
[ { "api_name": "lxml.etree.HTML", "line_number": 21, "usage_type": "call" }, { "api_name": "lxml.etree", "line_number": 21, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 111, "usage_type": "call" } ]
12255944849
import streamlit as st import pandas as pd import numpy as np import base64 import matplotlib.pyplot as plt import pickle from PIL import Image from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor from xgboost import XGBRegressor fr...
SahilVora55/ROP_prediction_app
ML_app.py
ML_app.py
py
14,851
python
en
code
1
github-code
36
[ { "api_name": "streamlit.set_page_config", "line_number": 17, "usage_type": "call" }, { "api_name": "streamlit.title", "line_number": 18, "usage_type": "call" }, { "api_name": "streamlit.markdown", "line_number": 19, "usage_type": "call" }, { "api_name": "streamli...
32345698677
# this module will serve us to translate the json that is being # outputted from the GSC to a proper SQL query. import json class JsontoSQLConverter(): def __init__(self, data_file, table_name): self.data_file = data_file self.table_name = table_name def convert(self): # load the da...
IliassAymaz/SofterpawIntel
SofterPawInsights/querying/jsontosql.py
jsontosql.py
py
3,956
python
en
code
0
github-code
36
[ { "api_name": "json.load", "line_number": 15, "usage_type": "call" } ]
8460085849
#!/usr/bin/python3 # 提取目录下所有图片, 把RGB的图片修改为BGR图片保存 # from PIL import Image import os.path import sys, os import cv2 def convertjpg(inputdir, outdir): if not os.path.isdir(outdir): os.makedirs(outdir) files= os.listdir(inputdir) #得到文件夹下的所有文件名称 sorted_files = sorted(files) fo...
yywbxgl/onnx_tools
python_script/img_rgb_to_bgr.py
img_rgb_to_bgr.py
py
1,051
python
zh
code
2
github-code
36
[ { "api_name": "os.path.isdir", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number": 13, "usage_type": "call" }, { "api_name": "os.listdir", "line_number"...
19404942737
import os import json import fire import random import pickle import math from tqdm import tqdm import tensorflow as tf import numpy as np from tensorflow.keras import layers from gated_cnn import GatedCNN from adaptive_softmax import AdaptiveSoftmax from data_utils import load_and_process_data, batchify, get_tokenize...
vivekverma239/lm_pretraining
pretrain.py
pretrain.py
py
20,647
python
en
code
3
github-code
36
[ { "api_name": "numpy.sum", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.prod", "line_number": 20, "usage_type": "call" }, { "api_name": "tensorflow.trainable_variables", "line_number": 20, "usage_type": "call" }, { "api_name": "tensorflow.get_va...
73711972905
#!/usr/bin/python3 # -*- mode: python; Encoding: utf-8; coding: utf-8 -*- """ ---------------------------------------------------------------- clipweb Author: ayaya (ayatec) GitHub: https://github.com/ayatec/clipweb ---------------------------------------------------------------- """ # ---------------------------...
ayatec/clipweb
src/python/clipweb.py
clipweb.py
py
5,127
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 29, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 29, "usage_type": "attribute" }, { "api_name": "web.cgi.CGI", "line_number": 47, "usage_type": "call" }, { "api_name": "web.cgi", ...
19789115086
#create tokenized descriptions import nltk from nltk.tokenize import word_tokenize def tokenize(col): #creates list of lists, inside lists contains sentences tokenized by word list_of_lists = [] for sentence in col: tokens = nltk.word_tokenize(str(sentence)) list_of_lists.append(tokens) ret...
Valparaiso-Data-Science/general-course-relevance-discovery
tripodscode/analysis copy/tokenizer.py
tokenizer.py
py
338
python
en
code
1
github-code
36
[ { "api_name": "nltk.word_tokenize", "line_number": 9, "usage_type": "call" } ]
33201215587
from matplotlib import pyplot as plt import random plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签 plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号 y_3 = [random.randint(20, 35) for i in range(31)] y_10 = [random.randint(20, 35) for i in range(31)] x_3 = range(31) x_10 = range(40, 71) plt.figure(figsi...
LelouchCcCC/python-practice
python-practice/Matplotlib/案例/scatter.py
scatter.py
py
709
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.pyplot.rcParams", "line_number": 3, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 3, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 4, "usage_type": "attribute" }, { "ap...
10809168696
import os import shutil import random import urllib.request import zipfile script_dir = "script/" programs_dir = "programs/" def copy_programs(): add_implementation = { "python3": "pypy3", "lua": "luajit", "node": "js", "php": "hhvm" } dir_out = script_dir + "programs/" ...
gareins/dynamic_benchmarks
init.py
init.py
py
1,744
python
en
code
81
github-code
36
[ { "api_name": "os.path.isdir", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "shutil.rmtree", "line_number": 20, "usage_type": "call" }, { "api_name": "os.mkdir", "line_number"...
7208980234
#!/usr/bin/env python from os import system as s import json player = "mpv" with open("n_list.json") as l: ip_tv = json.load(l) jml_channel = (len(ip_tv["tv"])) channel = [] url = [] for i in range(0, len(ip_tv["tv"])): list_channel = ip_tv["tv"][i]["channel"] list_url = ip_tv["tv"][i]["url"] channel.a...
mnabila/n-tv
ntv.py
ntv.py
py
1,446
python
en
code
0
github-code
36
[ { "api_name": "json.load", "line_number": 7, "usage_type": "call" }, { "api_name": "os.system", "line_number": 19, "usage_type": "call" }, { "api_name": "os.system", "line_number": 41, "usage_type": "call" }, { "api_name": "os.system", "line_number": 43, "...
23565719069
# vim: set fileencoding=utf-8 : import pytest import pyvips from helpers import JPEG_FILE, assert_almost_equal_objects class TestGValue: def test_bool(self): gv = pyvips.GValue() gv.set_type(pyvips.GValue.gbool_type) gv.set(True) value = gv.get() assert value gv.s...
libvips/pyvips
tests/test_gvalue.py
test_gvalue.py
py
3,584
python
en
code
558
github-code
36
[ { "api_name": "pyvips.GValue", "line_number": 10, "usage_type": "call" }, { "api_name": "pyvips.GValue", "line_number": 11, "usage_type": "attribute" }, { "api_name": "pyvips.GValue", "line_number": 21, "usage_type": "call" }, { "api_name": "pyvips.GValue", "l...
14263365350
from django.shortcuts import render from django.http import HttpResponse from orders.models import * import csv from django.http import HttpResponse, JsonResponse # Create your views here. def exportOrders(request): response = HttpResponse(content_type='text/csv') writer = csv.writer(response) writer.write...
jeffjcb/southcartel-app
southcartel/reports/views.py
views.py
py
1,390
python
en
code
1
github-code
36
[ { "api_name": "django.http.HttpResponse", "line_number": 9, "usage_type": "call" }, { "api_name": "csv.writer", "line_number": 10, "usage_type": "call" }, { "api_name": "django.http.HttpResponse", "line_number": 22, "usage_type": "call" }, { "api_name": "csv.write...
3473807793
import os import math import itertools import micp.kernel as micp_kernel import micp.info as micp_info import micp.common as micp_common import micp.params as micp_params from micp.kernel import raise_parse_error DEFAULT_SCORE_TAG = 'Computation.Avg' class xgemm(micp_kernel.Kernel): def __init__(self): ...
antoinecarme/xeon-phi-data
intel_software/pkg_contents/micperf/CONTENTS/usr/share/micperf/micp/micp/kernels/_xgemm.py
_xgemm.py
py
8,876
python
en
code
1
github-code
36
[ { "api_name": "micp.kernel.Kernel", "line_number": 14, "usage_type": "attribute" }, { "api_name": "micp.kernel", "line_number": 14, "usage_type": "name" }, { "api_name": "micp.info.Info", "line_number": 16, "usage_type": "call" }, { "api_name": "micp.info", "l...
42871257105
import sys import json from typing import List import urllib.request import os import glob from rulekit.experiment import ExperimentRunner from rulekit import RuleKit dir_path = os.path.dirname(os.path.realpath(__file__)) def download_rulekit_jar(): release_version = 'latest' current_rulekit_ja...
cezary986/complex_conditions
src/utils/rulekit/__main__.py
__main__.py
py
2,384
python
en
code
0
github-code
36
[ { "api_name": "os.path.dirname", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 10, "usage_type": "call" }, { "api_name": "typing.List", "line...
74566852583
from typing import List class Solution: """ 日期:2023-08-04 作者:仲景 """ def longestCommonPrefix(self, strs: List[str]) -> str: res = strs[0] for i in range(1, len(strs)): res = twoStrLongestCommonPrefix(res, strs[i]) return res def twoStrLon...
ZhongJing0121/LeetCode
LeetCode_14/Solution_ZhongJing.py
Solution_ZhongJing.py
py
723
python
en
code
2
github-code
36
[ { "api_name": "typing.List", "line_number": 10, "usage_type": "name" } ]
9476101469
import os from random import randint from time import time import subprocess from datetime import datetime from shutil import rmtree from db.models import UserRegisteredContest,Contest,ContestProblem,Problem,Submission,Admin,User from bson.objectid import ObjectId from platform import system from flask import current_...
Harjacober/HackAlgo
coderunner/task.py
task.py
py
16,600
python
en
code
1
github-code
36
[ { "api_name": "os.getcwd", "line_number": 13, "usage_type": "call" }, { "api_name": "platform.system", "line_number": 16, "usage_type": "call" }, { "api_name": "subprocess.PIPE", "line_number": 43, "usage_type": "attribute" }, { "api_name": "subprocess.PIPE", ...
39612322172
import numpy as np import os.path import math import scipy.linalg as _la from math import factorial import itertools import time import os from scipy.sparse import csc_matrix #..................................counting number of one POPCOUNT_TABLE16 = [0] * 2**16 for index in range(len(POPCOUNT_TABLE16)): POPCOUNT_T...
JeanClaude87/J1_J2
code/f_function.py
f_function.py
py
10,651
python
en
code
0
github-code
36
[ { "api_name": "math.factorial", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.int64", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.int64", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.int64", "line_number...