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
41211430907
""" What can we measure with just the tokenizer? * total token counts from MIMIC III * TODO: add specific biomedical entities """ import multiprocessing import os from pathlib import Path from typing import Optional from datasets import load_dataset import pandas as pd from rich import print import typer from eval_...
galtay/eval_bio_lms
eval_bio_lms/tokenization_measures.py
tokenization_measures.py
py
2,966
python
en
code
0
github-code
6
[ { "api_name": "pathlib.Path", "line_number": 28, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 35, "usage_type": "name" }, { "api_name": "typer.Argument", "line_number": 28, "usage_type": "call" }, { "api_name": "typer.Option", "line_...
26038418656
from __future__ import annotations import logging import re from dataclasses import dataclass from typing import Mapping from pants.backend.adhoc.target_types import ( SystemBinaryExtraSearchPathsField, SystemBinaryFingerprintArgsField, SystemBinaryFingerprintDependenciesField, SystemBinaryFingerprint...
pantsbuild/pants
src/python/pants/backend/adhoc/run_system_binary.py
run_system_binary.py
py
4,799
python
en
code
2,896
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 34, "usage_type": "call" }, { "api_name": "pants.core.goals.run.RunFieldSet", "line_number": 38, "usage_type": "name" }, { "api_name": "pants.core.goals.run.RunInSandboxBehavior.RUN_REQUEST_HERMETIC", "line_number": 39, "u...
32491209491
__author__ = "happyin3" #coding: utf-8 import pymongo from thesis import ThesisHandler from codeclass import CodeClass from patent import PatentHandler def main_thesis(db): thesis = ThesisHandler(db) thesis.main() def main_code(db): code = CodeClass(db) code.main() def main_patent(db): patent...
happyin3/captchaimgs
windows/main.py
main.py
py
530
python
en
code
0
github-code
6
[ { "api_name": "thesis.ThesisHandler", "line_number": 12, "usage_type": "call" }, { "api_name": "thesis.main", "line_number": 13, "usage_type": "call" }, { "api_name": "codeclass.CodeClass", "line_number": 17, "usage_type": "call" }, { "api_name": "patent.PatentHan...
28670815115
import os,sys import argparse import numpy as np from datetime import datetime from numpy import core import torch import torch.nn as nn import torch.optim as optim from tensorboardX import SummaryWriter cur_path = os.path.abspath(os.path.dirname(__file__)) root_path = os.path.split(cur_path)[0] sys.path.append(root...
HaoweiGis/EarthLearning
tools/train_cnn.py
train_cnn.py
py
7,066
python
en
code
3
github-code
6
[ { "api_name": "os.path.abspath", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.split", "lin...
21027914436
from django.urls import path # from django.http import HttpResponse # from django.utils.html import escape from . import views urlpatterns = [ path('', views.home, name="home"), # trigger the functions path('products/', views.products, name="products"), # trigger the functions path('customer_orders/<int:id...
manuelhayashi/djangocrm
mywebsite_project2/base/urls.py
urls.py
py
1,360
python
en
code
0
github-code
6
[ { "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", ...
25812310714
from flask import Blueprint, request, current_app from flask_restx import Api, Resource, fields from .helpers import has_access_to_org bp = Blueprint("instances", __name__, url_prefix="/api/apps/v1/instances") authorizations = { 'apikey': { 'type': 'apiKey', 'in': 'header', 'name': 'X-User-...
exphost/controller-appsService
app/appsservice/instances.py
instances.py
py
1,512
python
en
code
0
github-code
6
[ { "api_name": "flask.Blueprint", "line_number": 5, "usage_type": "call" }, { "api_name": "flask_restx.Api", "line_number": 13, "usage_type": "call" }, { "api_name": "flask_restx.fields.String", "line_number": 16, "usage_type": "call" }, { "api_name": "flask_restx....
23614015874
import string import numpy as np from nltk.tokenize import TreebankWordTokenizer from nltk.stem.porter import PorterStemmer from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity from collections import Counter #Example documents docs = [ '''Noona Noodles...
leejason2025/search-engine
engine.py
engine.py
py
7,263
python
en
code
0
github-code
6
[ { "api_name": "string.punctuation", "line_number": 23, "usage_type": "attribute" }, { "api_name": "nltk.tokenize.TreebankWordTokenizer", "line_number": 26, "usage_type": "call" }, { "api_name": "nltk.stem.porter.PorterStemmer", "line_number": 29, "usage_type": "call" },...
72591736507
import asyncio import sys import time import itertools class Signal: go = True async def spinner(msg): flush, write = sys.stdout.flush, sys.stdout.write for ch in itertools.cycle('/-|\\|'): status = ch + ' ' + msg write(status) flush() write('\x08'*len(status)) try: ...
Dmitri00/python_specialization
intro/week5/spinner_async.py
spinner_async.py
py
846
python
en
code
0
github-code
6
[ { "api_name": "sys.stdout", "line_number": 9, "usage_type": "attribute" }, { "api_name": "itertools.cycle", "line_number": 10, "usage_type": "call" }, { "api_name": "asyncio.sleep", "line_number": 16, "usage_type": "call" }, { "api_name": "asyncio.CancelledError",...
41332217285
from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from django.views.generic import TemplateView from django.http import JsonResponse """" Affichage de la page 'Profil' qui recense toutes les informations utilisateur """ @login_required def profil(request): ret...
aurellandry/django-project
app/users/views.py
views.py
py
806
python
en
code
0
github-code
6
[ { "api_name": "django.shortcuts.render", "line_number": 13, "usage_type": "call" }, { "api_name": "django.contrib.auth.decorators.login_required", "line_number": 11, "usage_type": "name" }, { "api_name": "django.http.JsonResponse", "line_number": 25, "usage_type": "call" ...
26129606970
from django.shortcuts import render,redirect,get_object_or_404 from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, Http404, HttpResponseNotFound,QueryDict from django.core.urlresolvers import reverse, reverse_lazy from django.template.loader import render_to_string from django.db.models...
kinsney/sport
bike/views.py
views.py
py
14,512
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 20, "usage_type": "call" }, { "api_name": "bike.models.Bike.objects.filter", "line_number": 23, "usage_type": "call" }, { "api_name": "bike.models.Bike.objects", "line_number": 23, "usage_type": "attribute" }, { "a...
25970243416
# -*- coding: utf-8 -*- from apps.pages.models import Page from django import template register = template.Library() @register.inclusion_tag("pages/block_page_summary.html") def block_page_summary(alias): try: page = Page.objects.get(url = alias) return {'page': page} except Page.DoesNotExist:...
wd5/letoestate
apps/pages/templatetags/pages_extras.py
pages_extras.py
py
1,551
python
en
code
0
github-code
6
[ { "api_name": "django.template.Library", "line_number": 5, "usage_type": "call" }, { "api_name": "django.template", "line_number": 5, "usage_type": "name" }, { "api_name": "apps.pages.models.Page.objects.get", "line_number": 10, "usage_type": "call" }, { "api_name...
70926690748
import json from video_indexer.video_indexer_api import VideoIndexerAPI with open('config.json', 'r') as f: config = json.loads(f.read()) vi = VideoIndexerAPI( vi_subscription_key=config['primary_key'], vi_location='trial', vi_account_id=config['account_id']) def upload_to_indexer(videoname, vi_api=v...
jetnew/carelytics
video_indexer/youtube_indexer.py
youtube_indexer.py
py
2,282
python
en
code
3
github-code
6
[ { "api_name": "json.loads", "line_number": 5, "usage_type": "call" }, { "api_name": "video_indexer.video_indexer_api.VideoIndexerAPI", "line_number": 7, "usage_type": "call" } ]
24756265125
import argparse import sys import time_series_utils import dill import pickle import numpy as np import os def query_nonlabeled_sample(paths_file_path, n): with open(paths_file_path) as f: num_lines = sum(1 for line in f) sample_indices = np.sort(np.random.choice(num_lines, n, replace=False)) poin...
luvalenz/time-series-variability-tree
4.queries_sampling.py
4.queries_sampling.py
py
3,684
python
en
code
2
github-code
6
[ { "api_name": "numpy.sort", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.random.choice", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 13, "usage_type": "attribute" }, { "api_name": "numpy.random.choice"...
31474470302
""" Programmierbeleg zum Modul MF-MRS_14 Digitale Bildverarbeitung, WS 18/19: Unter anderem Darstellung eines Szintigramms, anhand dessen verschiedene Bildmodifikatiotionen durchgefuehrt wird. @author: Mieke Möller """ import numpy as np import matplotlib.pyplot as plt from prettytable import PrettyTa...
Miiiluuu/DigitaleBildVerarbeitung
Beleg_DigitaleBildVerarbeitung_Mieke_Moeller.py
Beleg_DigitaleBildVerarbeitung_Mieke_Moeller.py
py
76,548
python
de
code
0
github-code
6
[ { "api_name": "numpy.min", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.min", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.max", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.int_", "line_number": 36, ...
11891770602
import sympy class Solver: def __init__(self, general_sol, homogeneous, nonhomogeneous, symbols_dict, initials_dict): self._general_solution = general_sol self._homogeneous = homogeneous self._non_homogeneous = nonhomogeneous self._symbols_dict = symbols_dict self._initial...
heleensev/strukkers
DS_RecurrenceRelations/RecurrenceSolver/solver.py
solver.py
py
4,184
python
en
code
1
github-code
6
[ { "api_name": "sympy.sympify", "line_number": 44, "usage_type": "call" }, { "api_name": "sympy.srepr", "line_number": 49, "usage_type": "call" }, { "api_name": "sympy.sympify", "line_number": 51, "usage_type": "call" }, { "api_name": "sympy.linsolve", "line_nu...
73129415867
import logging import os from firebase_admin import firestore from google.cloud import firestore FORMAT = "%(levelname)s %(asctime)s %(funcName)s() %(lineno)i %(message)s" formatter = logging.Formatter(FORMAT) stream_handler = logging.StreamHandler() stream_handler.setFormatter(formatter) logger = logging.getLogger(__...
JSoftwareLabs/firebaseutils
cloudstore/cloud_store_utils.py
cloud_store_utils.py
py
2,201
python
en
code
0
github-code
6
[ { "api_name": "logging.Formatter", "line_number": 7, "usage_type": "call" }, { "api_name": "logging.StreamHandler", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.INFO"...
12211487791
# import pygame import pygame from pygame.locals import * # import OpenGL from OpenGL.GL import * from OpenGL.GLU import * # define verticies of cube verticies = ( (1, -1, -1), (1, 1, -1), (-1, 1, -1), (-1, -1, -1), (1, -1, 1), (1, 1, 1), (-1, -1, 1), (-1, 1, 1) ) # define edges o...
zero80517/opengl-examples
python/rotating-colored-cube/main.py
main.py
py
1,796
python
en
code
0
github-code
6
[ { "api_name": "pygame.init", "line_number": 73, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 75, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 75, "usage_type": "attribute" }, { "api_name": "pygame.event....
18155336002
import pyttsx3 # voice module for speaking import speech_recognition as sr # for speech recognition import datetime # for getting date and time import os #os module for controling operation system applications import webbrowser as wb #for controlling the webbrowsers import wikipedia #wikipedia search import customtki...
Nandy1002/python-speechRecongition-desktop-AI-project
nabendu/init.py
init.py
py
3,034
python
en
code
0
github-code
6
[ { "api_name": "pyttsx3.init", "line_number": 12, "usage_type": "call" }, { "api_name": "os.system", "line_number": 25, "usage_type": "call" }, { "api_name": "speech_recognition.Recognizer", "line_number": 31, "usage_type": "call" }, { "api_name": "speech_recogniti...
38767926367
import matplotlib.pyplot as plt def plot_degree_dist(G): degrees = [G.degree(n) for n in G.nodes()] degrees = sorted(degrees, reverse=True) degrees_len = len(degrees) prob = [degrees.count(x) / degrees_len for x in degrees] x1 = degrees x2 = prob ax = plt.gca() ax.scatter(x1, x2...
LukasDCode/Companionship-Network
src/utils/net_analysis.py
net_analysis.py
py
489
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.pyplot.gca", "line_number": 14, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 14, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.show", "line_number": 23, "usage_type": "call" }, { "api_name": "matplo...
72531756349
""" Models used in storage API: Specifically services/storage/src/simcore_service_storage/api/v0/openapi.yaml#/components/schemas IMPORTANT: DO NOT COUPLE these schemas until storage is refactored """ import re from datetime import datetime from enum import Enum from re import Pattern from typing import ...
ITISFoundation/osparc-simcore
packages/models-library/src/models_library/api_schemas_storage.py
api_schemas_storage.py
py
10,908
python
en
code
35
github-code
6
[ { "api_name": "pydantic.ConstrainedStr", "line_number": 42, "usage_type": "name" }, { "api_name": "re.Pattern", "line_number": 43, "usage_type": "name" }, { "api_name": "re.compile", "line_number": 43, "usage_type": "call" }, { "api_name": "basic_regex.S3_BUCKET_N...
35303071939
import requests import json from config import Config from apis.config_apis import BASE_URL, HEADERS from apis.get_client_id.get_client_id_config import GetClientIDConfig class GetClientIdAPI: def __init__(self): self.base_url = BASE_URL self.headers = GetClientIDConfig.HEADERS self....
qateam-neo/fe-connect-automation
apis/get_client_id/get_client_id.py
get_client_id.py
py
897
python
en
code
0
github-code
6
[ { "api_name": "apis.config_apis.BASE_URL", "line_number": 11, "usage_type": "name" }, { "api_name": "apis.get_client_id.get_client_id_config.GetClientIDConfig.HEADERS", "line_number": 12, "usage_type": "attribute" }, { "api_name": "apis.get_client_id.get_client_id_config.GetClien...
34776558173
from django.http import JsonResponse from django.shortcuts import render, redirect from productionplanning.models.SemiFinished import SemiFinished from productionplanning.forms.SemiFinishedForm import SemiFinishedForm, ViewSemiFinishedForm from django.contrib import messages from productionplanning.filters.SemiFinished...
nazmul53p/ERP
productionplanning/views/SemiFinishedViews.py
SemiFinishedViews.py
py
5,192
python
en
code
1
github-code
6
[ { "api_name": "productionplanning.models.SemiFinished.SemiFinished.objects.all", "line_number": 32, "usage_type": "call" }, { "api_name": "productionplanning.models.SemiFinished.SemiFinished.objects", "line_number": 32, "usage_type": "attribute" }, { "api_name": "productionplanni...
24199093497
from typing import List from collections import deque # Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def levelOrder(self, root: TreeNode) -> List[List[int]]: if not root: ...
AiZhanghan/Leetcode
code/102. 二叉树的层序遍历.py
102. 二叉树的层序遍历.py
py
1,314
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 14, "usage_type": "name" } ]
41844183537
#!/usr/bin/env python # coding: utf-8 # ## Sentence to Predicate (STP) Converter # # # In[1]: # Step 1: Tokenize words # Step 2: find subject (first noun/prp), verb, object (first noun after subject), goal-state (PP) # these will be arg1-4 # Step 3: check if goal state is atomic, if not, process it # Step 4: che...
theogbrand/NLU-research-project
demo/stp.py
stp.py
py
13,038
python
en
code
1
github-code
6
[ { "api_name": "nltk.pos_tag", "line_number": 50, "usage_type": "call" }, { "api_name": "nltk.word_tokenize", "line_number": 50, "usage_type": "call" }, { "api_name": "stanfordcorenlp.StanfordCoreNLP", "line_number": 58, "usage_type": "call" }, { "api_name": "nltk....
73637534909
#importing libraries for the project teaching assistant dataset evaluation import numpy as np import pandas as pd import matplotlib.pyplot as plt # names is the list consisting of all the column names or the features of the project names=['english_speaker','course_instructor','course','semester','class_size','score...
Khushbu0304/Teaching_Assistant
teaching_assistant_evaluation.py
teaching_assistant_evaluation.py
py
2,409
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 14, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.StandardScaler", "line_number": 31, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 41, "usage_type": "call" ...
10623849788
import discord import Cogs.settings as settings helpembed = discord.Embed(title="VirusTotalBot", description="This Bot checks suspicous links and files in all " "hannels he is in and flags them", color=settings.helpembedcolour) ...
veni-vidi-code/VirusTotalDiscordBot
Utils/Helpembed.py
Helpembed.py
py
804
python
en
code
3
github-code
6
[ { "api_name": "discord.Embed", "line_number": 5, "usage_type": "call" }, { "api_name": "Cogs.settings.helpembedcolour", "line_number": 8, "usage_type": "attribute" }, { "api_name": "Cogs.settings", "line_number": 8, "usage_type": "name" } ]
42488809691
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Oct 14 15:01:57 2019 @author: michal """ import networkx as nx from os import getcwd from jobNode import GaussianNode from parsers import getGaussianInpFromSlurmFile import sys from graphManager import GraphManager from graphGenerators import addSPcorr...
chemiczny/calculationFlow
addSPcorrection.py
addSPcorrection.py
py
1,462
python
en
code
1
github-code
6
[ { "api_name": "sys.argv", "line_number": 19, "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": "os.getcwd", "line_numbe...
16167431494
from typing import List class Solution: def isAcronym(self, words: List[str], s: str) -> bool: make = "" for word in words: make+=word[0] print(make) return make==s obj = Solution() print(obj.isAcronym(["alice","bob","charlie"],"abc"))
alaminjwel/leetcode
leetcode/contest/2828. Check if a String Is an Acronym of Words.py
2828. Check if a String Is an Acronym of Words.py
py
285
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 4, "usage_type": "name" } ]
75344893946
import time import boto.ec2 from frigga_snake.ami import AMIName import sys NUMBER_OF_IMAGES_TO_KEEP = 10 # provide these for the account you want to use AWS_ACCESS_KEY_ID = "" AWS_SECRET_ACCESS_KEY = "" ACCOUNT_ID = None if not ACCOUNT_ID: if not len(sys.argv) > 1: print("Provide AWS Account ID as arg...
plecto/app-image-recycler
run.py
run.py
py
3,087
python
en
code
0
github-code
6
[ { "api_name": "sys.argv", "line_number": 16, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 19, "usage_type": "attribute" }, { "api_name": "boto.ec2.ec2.connect_to_region", "line_number": 21, "usage_type": "call" }, { "api_name": "boto.ec2.e...
44844101063
import os import d4rl import gym import numpy as np from tqdm.auto import trange def d4rl_dataset(env): dataset = env.get_dataset() N = dataset['rewards'].shape[0] obs_, action_, reward_ = [], [], [] done_, real_done_ = [], [] for i in trange(N, desc=f"Loading {env.spec.id} dataset"): ob...
Howuhh/faster-trajectory-transformer
trajectory/datasets/get_d4rl.py
get_d4rl.py
py
1,491
python
en
code
90
github-code
6
[ { "api_name": "tqdm.auto.trange", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.array", "line_numb...
9401503099
from flask import Flask from datetime import datetime from os import environ from pytz import timezone from application.utils.common import ( convert_datestring_to_datetime, convert_datetime_to_datestring, ) from application.models.orm import db from application.models.models import ( Contest, Problem,...
coniferousdyer/Stats-Portal
api/application/database.py
database.py
py
5,339
python
en
code
1
github-code
6
[ { "api_name": "application.models.models.Contest.query.delete", "line_number": 31, "usage_type": "call" }, { "api_name": "application.models.models.Contest.query", "line_number": 31, "usage_type": "attribute" }, { "api_name": "application.models.models.Contest", "line_number"...
38949278099
from urllib import request import urllib.request from selenium import webdriver import requests import time import re import os import random # 全局声明的可以写到配置文件,这里为了读者方便看,故只写在一个文件里面 fileDir = { '国产': {'自拍视频': "/video/zipai/", '淫妻作乐': "/video/fuqi/", '开放青年': "/video/kaifang/", '精品分享': "/video/jingpin/", '台湾辣妹': "/vid...
SubMirk/12345
aaq52.py
aaq52.py
py
14,407
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 44, "usage_type": "call" }, { "api_name": "os.path", "line_number": 44, "usage_type": "attribute" }, { "api_name": "os.path.isdir", "line_number": 46, "usage_type": "call" }, { "api_name": "os.path", "line_number": ...
24502740771
import json def _check_not_null(d, name): if d.get(name) is None: raise RuntimeError("Missing required field {}".format(name)) def _check_non_empty_str(d, name): value = d.get(name) if value is None: return if not isinstance(value, str): raise RuntimeError("Field {} must be a s...
williamhogman/cloudevents-python
cloudevents/model.py
model.py
py
2,576
python
en
code
4
github-code
6
[ { "api_name": "json.loads", "line_number": 61, "usage_type": "call" } ]
41735768401
from sanic import Sanic from sanic.request import Request from sanic.response import json from sanic_jwt import initialize from sanic_restful import Api import os from src.auth import authenticate from src.definitions import ApiError, BadRequestError from src.resources import DataResource, DataResourceList ...
sashkavyshka/salt_homework
test-server/src/main.py
main.py
py
1,499
python
en
code
0
github-code
6
[ { "api_name": "sanic.Sanic", "line_number": 12, "usage_type": "call" }, { "api_name": "sanic_restful.Api", "line_number": 13, "usage_type": "call" }, { "api_name": "sanic_jwt.initialize", "line_number": 14, "usage_type": "call" }, { "api_name": "src.auth.authentic...
36466165995
#!/usr/bin/env python import utils import gzip import argparse from pysam import TabixFile import numpy as np def get_args(): parser = argparse.ArgumentParser() parser.add_argument('-r', dest='rate_file', required=True, help='Path file co...
ryanlayerlab/layer_lab_chco
bin/get_coverage_zscores.py
get_coverage_zscores.py
py
2,694
python
en
code
1
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "gzip.open", "line_number": 29, "usage_type": "call" }, { "api_name": "utils.Interval", "line_number": 32, "usage_type": "call" }, { "api_name": "gzip.open", "line...
30828224585
import pytest import os from tools import getGuiItem, readFile, writeFile from mock import causeOSError from PyQt5.QtWidgets import QAction, QMessageBox, QDialog from novelwriter.dialogs import GuiDocSplit, GuiItemEditor from novelwriter.enum import nwItemType, nwWidget from novelwriter.core.document import NWDoc fr...
vaelue/novelWriter
tests/test_dialogs/test_dlg_docsplit.py
test_dlg_docsplit.py
py
7,757
python
en
code
null
github-code
6
[ { "api_name": "PyQt5.QtWidgets.QMessageBox", "line_number": 20, "usage_type": "argument" }, { "api_name": "PyQt5.QtWidgets.QMessageBox.Yes", "line_number": 20, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets.QMessageBox", "line_number": 21, "usage_type": "argu...
21553545752
import sys import argparse from DataLoader import BoatLoader, Mode, NetworkArchitecture from DataValidator import DataValidator def main(mode, inputclass, split, kernel, default_testing): training_set, testing_set = BoatLoader(mode, network=NetworkArchitecture.VGG16, vstype=inputclass).loadset() validator = D...
LithiumSR/venice_boat_ml
main.py
main.py
py
2,684
python
en
code
0
github-code
6
[ { "api_name": "DataLoader.BoatLoader", "line_number": 8, "usage_type": "call" }, { "api_name": "DataLoader.NetworkArchitecture.VGG16", "line_number": 8, "usage_type": "attribute" }, { "api_name": "DataLoader.NetworkArchitecture", "line_number": 8, "usage_type": "name" }...
24532715369
# This project is run inside a custom conda environment, which is built using conda and pip together # Since merely copying the environment via a env.yaml file does result in multiple issues, # a clean manual install is recommended. # # On Windows follow these steps: # - conda create -n "new_env" python=3.8 # - c...
JonasLewe/thesis_codebase
Code/src/main.py
main.py
py
21,476
python
en
code
0
github-code
6
[ { "api_name": "os.environ", "line_number": 32, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 33, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 35, "usage_type": "call" }, { "api_name": "os.path", "line_numb...
71379586747
import numpy as np from scipy import linalg import matplotlib.pyplot as plt import math as m def CoinOperator(CoinString): if CoinString == "X": Coin = np.array([[0,1],[1,0]]) elif CoinString == "H": Coin = np.array([[1,1],[1,-1]])/np.sqrt(2) return Coin def CycleShiftOpera...
JaimePSantos/Dissertation-Tex-Code
Coding/Python Simulations/CoinedQW/coinbruno.py
coinbruno.py
py
2,777
python
en
code
0
github-code
6
[ { "api_name": "numpy.array", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 15...
36809910452
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters PROXY = {'proxy_url': 'socks5://t1.learn.python.ru:1080', 'urllib3_proxy_kwargs': {'username': 'learn', 'password': 'python'}} import logging logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', ...
koiiNyan/LearnPython
lesson2/hw/bot.py
bot.py
py
6,601
python
en
code
0
github-code
6
[ { "api_name": "logging.basicConfig", "line_number": 7, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 8, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 14, "usage_type": "call" }, { "api_name": "datetime.da...
18313887361
from django.shortcuts import render, get_object_or_404 from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin from django.contrib.auth.models import User from django.http import JsonResponse, HttpResponse #from .models import Post import json from PIL import Image import requests, math from io...
rpshredow/rpshredow-website-reverieslab.com-v3
projects/views.py
views.py
py
3,447
python
en
code
0
github-code
6
[ { "api_name": "django.shortcuts.render", "line_number": 15, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 19, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 23, "usage_type": "call" }, { "api_name"...
15358217511
from __future__ import absolute_import, division, print_function import tensorflow as tf from tensorflow import keras import numpy as np import pandas as pd import matplotlib.pyplot as plt print("TensorFlow Version", tf.__version__) boston_housing = keras.datasets.boston_housing (train_data, train_labels), (test_d...
kratzlos/Keras-TensorFlow-Tutorials
regression.py
regression.py
py
3,262
python
en
code
0
github-code
6
[ { "api_name": "tensorflow.__version__", "line_number": 10, "usage_type": "attribute" }, { "api_name": "tensorflow.keras.datasets", "line_number": 12, "usage_type": "attribute" }, { "api_name": "tensorflow.keras", "line_number": 12, "usage_type": "name" }, { "api_n...
41419295346
#!/usr/bin/env python # coding=utf8 import logging; logging.basicConfig(level=logging.INFO) import asyncio, os, json, time, re from datetime import datetime from aiohttp import web from jinja2 import Environment, FileSystemLoader, evalcontextfilter, Markup, escape import orm from config import configs ...
cyanife/Pyanife
app.py
app.py
py
6,587
python
en
code
0
github-code
6
[ { "api_name": "logging.basicConfig", "line_number": 4, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 4, "usage_type": "attribute" }, { "api_name": "logging.info", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path.join", "...
23181679121
import setuptools from hfoGUI.main import version with open("README.md", "r") as fh: long_description = fh.read() pkgs = setuptools.find_packages() print('found these packages:', pkgs) pkg_name = "hfoGUI" setuptools.setup( name=pkg_name, version=version, author="Geoffrey Barrett", author_email="...
HussainiLab/hfoGUI
setup.py
setup.py
py
1,007
python
en
code
3
github-code
6
[ { "api_name": "setuptools.find_packages", "line_number": 7, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_number": 12, "usage_type": "call" }, { "api_name": "hfoGUI.main.version", "line_number": 14, "usage_type": "name" } ]
17610164526
from .web import WebObject class Yakker(WebObject): def __init__(self, session, data): super().__init__() self.session = session self.herd = data.get('myHerd', None) self.nickname = data.get('nickname', None) self.personaID = data.get('personaID', None) self.userI...
louis-haddrell/Yik-Yak-API
yikyakapi/yakker.py
yakker.py
py
681
python
en
code
14
github-code
6
[ { "api_name": "web.WebObject", "line_number": 4, "usage_type": "name" } ]
73362848828
from flask import jsonify class responses: Taxcode = { 1: { "name": "Food", "refund": True, "tax": 0.10 }, 2: { "name": "Tobacco", "refund": False, "tax": 0.02 }, 3: { "name": "Entertainment", "refund": False, "tax": 0.01 } } def data_structur...
dedidot/pisopi
App/Helper/responses.py
responses.py
py
1,686
python
en
code
1
github-code
6
[ { "api_name": "flask.jsonify", "line_number": 44, "usage_type": "call" }, { "api_name": "flask.jsonify", "line_number": 67, "usage_type": "call" } ]
28866480330
import pyautogui import time # wechat in WOA def openWechat(): time.sleep(0.5) pyautogui.keyDown('winleft') time.sleep(0.05) pyautogui.keyUp('winleft') time.sleep(0.5) pyautogui.typewrite(['w','e','c','h','a','t','space'], interval=0.25) time.sleep(0.5) pyautogui.typewrite(['down','down...
welcozh/jywechat-autosign
autosign.py
autosign.py
py
1,124
python
en
code
0
github-code
6
[ { "api_name": "time.sleep", "line_number": 6, "usage_type": "call" }, { "api_name": "pyautogui.keyDown", "line_number": 7, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 8, "usage_type": "call" }, { "api_name": "pyautogui.keyUp", "line_numb...
44083656885
import string import warnings from typing import Iterable, Tuple, Dict, List import numpy as np from matplotlib import pyplot as plt from sklearn.cluster import SpectralClustering, DBSCAN, OPTICS from sklearn.metrics import silhouette_score from comparaison_classes import CachedCustomLCS, Singleton from segmentation ...
llmhyy/malware-traffic
Experiments/exp16_visualisation/clustering.py
clustering.py
py
6,576
python
en
code
7
github-code
6
[ { "api_name": "warnings.filterwarnings", "line_number": 15, "usage_type": "call" }, { "api_name": "typing.Iterable", "line_number": 33, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 33, "usage_type": "name" }, { "api_name": "typing.Iterable"...
24034444046
# local imports import xmatters import config # python3 package imports import logging import json from logging.handlers import RotatingFileHandler # main process def main() -> object: dynamic_teams_data = dynamic_teams_file.get_rows(["targetName", "supervisors", "observers", "operand"], {"targetName"}, True, "...
matthewhenry1/integrator_py
src/dynamic_teams.py
dynamic_teams.py
py
3,224
python
en
code
1
github-code
6
[ { "api_name": "json.dumps", "line_number": 15, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 22, "usage_type": "call" }, { "api_name": "logging.basicConfig", "line_number": 63, "usage_type": "call" }, { "api_name": "config.dynamic_teams", ...
3257239131
import pandas as pd import sklearn import matplotlib.pyplot as plt import numpy as np from scipy.stats import spearmanr, pearsonr from sklearn.model_selection import train_test_split from time import time def match(C): """ Replication of R's match function """ u, ui = np.unique(C, return_index=Tr...
AkiNikolaidis/BaggingSubtyping
scripts/Split_Louvain.py
Split_Louvain.py
py
16,559
python
en
code
1
github-code
6
[ { "api_name": "numpy.unique", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.where", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number":...
11731360446
#!/usr/bin/env python3 import argparse,array,can,json,os,queue,re,signal,threading,time import ruamel.yaml as yaml def signal_handler(signal, frame): global t print('') print('You pressed Ctrl+C! Exiting...') print('') t.kill_received = True exit(0) signal.signal(signal.SIGINT, signal_handl...
linuxkidd/rvc-monitor-py
usr/bin/rvc2mqtt.py
rvc2mqtt.py
py
10,218
python
en
code
12
github-code
6
[ { "api_name": "signal.signal", "line_number": 15, "usage_type": "call" }, { "api_name": "signal.SIGINT", "line_number": 15, "usage_type": "attribute" }, { "api_name": "can.Message", "line_number": 47, "usage_type": "call" }, { "api_name": "can.CanError", "line...
4600703185
bl_info = { "name": "Export Binary (.model)", "author": "John Stricker (modified from Jeff LaMarche's C Header script", "location": "File > Export", "description": "Export Model Verts, Norms, & Texture Coords to Binary File", "category": "Import-Export"} import bpy from bpy.props import * import mathutils, math, ...
guozhaokui/layaphy
src/tools/expBin.py
expBin.py
py
4,048
python
en
code
1
github-code
6
[ { "api_name": "bpy.context", "line_number": 16, "usage_type": "attribute" }, { "api_name": "bpy.ops.object.mode_set", "line_number": 17, "usage_type": "call" }, { "api_name": "bpy.ops", "line_number": 17, "usage_type": "attribute" }, { "api_name": "bpy.context", ...
73008019709
#Lesson 19 instructor version of vode, no comments from pyspark import SparkConf, SparkContext conf = SparkConf().setMaster("local").setAppName("WordCount") sc = SparkContext(conf = conf) input = sc.textFile("file:///C:/Users/cenzo/sparkcourse/csv/book.txt") #only line I had to update words = input.flatMap(lambda x: ...
CenzOh/Python_Spark
InstructorCode/word-count.py
word-count.py
py
524
python
en
code
0
github-code
6
[ { "api_name": "pyspark.SparkConf", "line_number": 4, "usage_type": "call" }, { "api_name": "pyspark.SparkContext", "line_number": 5, "usage_type": "call" } ]
3194701939
# Add RA and DEC in degrees # Remove duplicates from __future__ import division, print_function import sys, os, glob, time, warnings, gc import numpy as np from astropy.table import Table, vstack, hstack import fitsio import match_coord cat = Table.read('/Users/rongpu/Downloads/c3r2_DR1+DR2_2019april11.txt', format='...
rongpu/desi-truth-table
reduction/c3r2_dr2.py
c3r2_dr2.py
py
1,658
python
en
code
0
github-code
6
[ { "api_name": "astropy.table.Table.read", "line_number": 11, "usage_type": "call" }, { "api_name": "astropy.table.Table", "line_number": 11, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.array"...
33349618195
import os import requests import uuid from flask import Flask, request, abort app = Flask(__name__) @app.route('/', methods=['GET']) def proxy_request(): service_name = request.args.get('service') if not service_name: abort(400, 'Missing service parameter') url = f'http://{service_name}.openfaas...
leonardobarilani/edge-computing-thesis
Proxy/proxy.py
proxy.py
py
1,187
python
en
code
4
github-code
6
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 11, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 11, "usage_type": "attribute" }, { "api_name": "flask.reque...
31651477573
import enum from models.client import Client from models.subnet import Subnet from models.vlan import VLan from models.network import Network from types_mangement.ip import IPv4 from utilities.Formatters import ( display_all_formatter, display_information_formatter) # Using enum class create enumerations for cki ...
AhmedSHelmi/IP-Management-System
facades/CliFacade.py
CliFacade.py
py
8,256
python
en
code
0
github-code
6
[ { "api_name": "enum.Enum", "line_number": 12, "usage_type": "attribute" }, { "api_name": "models.subnet.Subnet", "line_number": 30, "usage_type": "name" }, { "api_name": "models.client.Client", "line_number": 31, "usage_type": "name" }, { "api_name": "models.vlan....
1957815797
import os import torch import pickle import numpy as np from conf import * import pandas as pd from model import * from clearml import Task # from datetime import datetime import matplotlib.pyplot as plt from run import * def get_test_data(path): test_labels = pd.read_csv(path + lables) test_exp = pd.read_csv...
agotliber/CH3_project
src/test.py
test.py
py
2,726
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 15, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.read_csv", ...
74923811066
from tinydb import TinyDB, Query from app.controllers import c_players from app.views import v_menu import datetime class Player: def __init__(self, id=None): self.name = '' self.surname = '' self.birthday = '' self.genre = '' self.rank = '' self.scores = '' ...
MaeRiz/OC_P4_Chess
app/models/m_players.py
m_players.py
py
2,532
python
en
code
0
github-code
6
[ { "api_name": "tinydb.Query", "line_number": 26, "usage_type": "call" }, { "api_name": "tinydb.TinyDB", "line_number": 27, "usage_type": "call" }, { "api_name": "tinydb.TinyDB", "line_number": 39, "usage_type": "call" }, { "api_name": "app.controllers.c_players.pl...
10202480117
# Exercício 4 Baseados em uma página contendo detalhes sobre um livro http://books.toscrape.com/catalogue/the-grand-design_405/index.html , faça a extração dos campos título, preço, descrição e url contendo a imagem de capa do livro. # O preço deve vir somente valores numéricos e ponto. Ex: £13.76 -> 13.76 . # A descr...
albertoscandido/trybe-exercises
exercises/CS/bloco_34/dia_3/exercise_4.py
exercise_4.py
py
1,467
python
pt
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 15, "usage_type": "call" }, { "api_name": "requests.HTTPError", "line_number": 17, "usage_type": "attribute" }, { "api_name": "requests.ReadTimeout", "line_number": 17, "usage_type": "attribute" }, { "api_name": "parsel...
4998234032
# We'll add the path to the directory above this one so we can import the Models folder. import sys sys.path.append('..') from Models.Project import Project import erppeek class project_test(object): def test_project_creation(): # Order: client, model, show_generated_records_in_terminal, number_of_recs ...
odoofans/Odata
Odata/Tests/project_test.py
project_test.py
py
1,016
python
en
code
0
github-code
6
[ { "api_name": "sys.path.append", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "erppeek.Client", "line_number": 18, "usage_type": "call" }, { "api_name": "Models.Project.Project", ...
71047277628
import streamlit as st import openai # from openai import OpenAI # client = OpenAI(api_key = st.secrets["OPENAI_API_KEY"]) from langchain.agents import load_tools from langchain.agents import initialize_agent from langchain.agents import AgentType from langchain.llms import OpenAI import numpy as np import pandas a...
yiqiao-yin/youth_homeless
app.py
app.py
py
5,678
python
en
code
0
github-code
6
[ { "api_name": "openai.api_key", "line_number": 20, "usage_type": "attribute" }, { "api_name": "streamlit.secrets", "line_number": 20, "usage_type": "attribute" }, { "api_name": "pandas.concat", "line_number": 24, "usage_type": "call" }, { "api_name": "openai.Compl...
41039357102
import argparse import logging from multiprocessing import Pool import datetime from typing import List, Optional from examples.agent_market.agents import ( MM_WALLET, TERMINATE_WALLET, TRADER_1_WALLET, MarketMaker, MarketOrderTraders, random_walk_price, ) from vega_sim.environment import Marke...
vegaprotocol/vega-market-sim
examples/agent_market/agent_market.py
agent_market.py
py
3,374
python
en
code
19
github-code
6
[ { "api_name": "typing.Optional", "line_number": 23, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 27, "usage_type": "name" }, { "api_name": "vega_sim.null_service.VegaServiceNull", "line_number": 27, "usage_type": "name" }, { "api_name": ...
73780221949
import networkx as nx import numpy as np import matplotlib.pyplot as plt def init_graph(n): matrix = np.zeros((n, n)) for i in range(n): for j in range(i + 1, n): matrix[i][j] = matrix[j][i] = np.random.randint(0, 10) return matrix def prim(matrix): n = matrix.shape[0] distanc...
BestUazDriver/MachineLearning
hw3/hw3.py
hw3.py
py
2,191
python
en
code
0
github-code
6
[ { "api_name": "numpy.zeros", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.random.randint", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 9, "usage_type": "attribute" }, { "api_name": "numpy.ones", "lin...
16644715389
# -*- coding: utf-8 -*- # @Time:2021/4/820:18 # @File:4.8_degree_in_out.py # -*- coding: utf-8 -*- # @Time:2021/4/712:51 # @File:4.8_degeneracyInDegree.py # -*- coding: utf-8 -*- # @Time:2021/3/3014:16 # @File:3.30_null_model测试.py import numpy as np from numpy import * import networkx as nx import matplotlib.pyplot as ...
QingqingSun-Bao/GitResp2
nested/4.8_degree_in_out.py
4.8_degree_in_out.py
py
4,920
python
en
code
0
github-code
6
[ { "api_name": "numpy.random.RandomState", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 18, "usage_type": "attribute" }, { "api_name": "numpy.shape", "line_number": 32, "usage_type": "call" }, { "api_name": "numpy.shape", ...
70665827388
from __future__ import print_function import numpy as np import tensorflow as tf from six.moves import cPickle as pickle from six.moves import range import pdb pickle_file = 'notMNIST.pickle' # dimentions will be 20000 * 784 * 1 # 20000 training points # each of which there are 784 points [28 * 28] # every point is r...
srjit/padawan
deeplearning/tensorflow/train.py
train.py
py
4,169
python
en
code
0
github-code
6
[ { "api_name": "six.moves.cPickle.load", "line_number": 16, "usage_type": "call" }, { "api_name": "six.moves.cPickle", "line_number": 16, "usage_type": "name" }, { "api_name": "numpy.float32", "line_number": 38, "usage_type": "attribute" }, { "api_name": "numpy.ara...
71751657149
import numpy as np from PIL import Image from stego.metrics import cos, mse, psnr from stego.preprocess import ( text_to_msg, read_file_to_msg, bits_to_msg, text_from_msg, write_fille_from_msg, bits_from_msg ) from stego.transform import inject, eject def inject_command( image_path: str,...
maksfourlife/hse-ib-stego
stego/commands.py
commands.py
py
1,457
python
en
code
0
github-code
6
[ { "api_name": "numpy.array", "line_number": 25, "usage_type": "call" }, { "api_name": "stego.preprocess.text_to_msg", "line_number": 28, "usage_type": "call" }, { "api_name": "stego.preprocess.read_file_to_msg", "line_number": 30, "usage_type": "call" }, { "api_na...
37543037564
import pygame from random import randint, uniform # CONSTANTS WIDTH = 500 HEIGHT = 500 FPS = 60 SHIP_SPEED = 5 BLACK = (0, 0, 0) # INITIALIZATION pygame.init() screen = pygame.display.set_mode((WIDTH, HEIGHT)) clock = pygame.time.Clock() # ship ship_img = pygame.image.load('razorinv.png') w, h = 60, 5...
nvxden/pygame
space-invaders/kd/1/3.Персонаж и управление.py
3.Персонаж и управление.py
py
1,733
python
en
code
0
github-code
6
[ { "api_name": "pygame.init", "line_number": 19, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 20, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 20, "usage_type": "attribute" }, { "api_name": "pygame.time.C...
16464520431
from __future__ import unicode_literals import argparse import pexpect import os import time import sys import tempfile from itertools import count class EngineMaster(object): def __init__(self, command, logfile=None): self.command = command if not logfile: self.logfile, _ = tempfile.m...
bsamseth/Ricefish
play-match.py
play-match.py
py
4,727
python
en
code
0
github-code
6
[ { "api_name": "tempfile.mkstemp", "line_number": 15, "usage_type": "call" }, { "api_name": "pexpect.spawnu", "line_number": 25, "usage_type": "call" }, { "api_name": "itertools.count", "line_number": 117, "usage_type": "call" }, { "api_name": "itertools.count", ...
4557813707
import pandas as pd from sklearn.tree import DecisionTreeRegressor import matplotlib.pyplot as plt import numpy as np base = pd.read_csv('plano_saude2.csv') X = base.iloc[:, 0:1].values y = base.iloc[:, 1].values #Tree regressor regressor = DecisionTreeRegressor() regressor.fit(X, y) score = regressor.score(X, y) ...
guilhermelamb/Machine-Learning-Studies
Linear-Regression/regressao_arvore_decisao_plano_saude.py
regressao_arvore_decisao_plano_saude.py
py
723
python
en
code
1
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 6, "usage_type": "call" }, { "api_name": "sklearn.tree.DecisionTreeRegressor", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.scatter", "line_number": 17, "usage_type": "call" }, { "api_n...
29564858015
""" encode:utf-8 Author:aidan.hu Data:2022/1/10 """ import pytest from model.symbol import symbol as s from common.logger import logger from common.mongodb_operate import MongoDb from model.fund_rate import fund_rate from operation.contract.client.quote.qoute_class import Qoute from test_cases.contract.client.conftest ...
shiqilouyang/thanos_test
test_cases/contract/client/quote/test_funding_rate_record.py
test_funding_rate_record.py
py
3,208
python
en
code
0
github-code
6
[ { "api_name": "operation.contract.client.quote.qoute_class.Qoute", "line_number": 17, "usage_type": "call" }, { "api_name": "test_cases.contract.client.conftest.get_data", "line_number": 18, "usage_type": "call" }, { "api_name": "common.logger.logger.info", "line_number": 27,...
18245572047
from config import Config from os import listdir from os.path import join from PIL import Image import numpy as np import matplotlib.pyplot as plt from model import get_model def get_single_test(dir): sz = 200 test = np.zeros(shape=(sz, 160, 160, 1)) cnt = 0 for f in sorted(listdir(dir)): if s...
mitiksh/anomaly-detection-in-surveillance-video
evaluate.py
evaluate.py
py
1,404
python
en
code
0
github-code
6
[ { "api_name": "numpy.zeros", "line_number": 12, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 15, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_number...
32475343866
from django.shortcuts import render,redirect from django.http import HttpRequest,HttpResponse from django.contrib import messages from django.contrib.auth.models import User from django.contrib.auth import authenticate, login,logout from appeventos.models import eventosm from appforo.models import forom from reindev.f...
jkaalexkei/reindev
apprein/views.py
views.py
py
8,869
python
es
code
0
github-code
6
[ { "api_name": "appblog.models.blogm.objects.all", "line_number": 29, "usage_type": "call" }, { "api_name": "appblog.models.blogm.objects", "line_number": 29, "usage_type": "attribute" }, { "api_name": "appblog.models.blogm", "line_number": 29, "usage_type": "name" }, ...
199282102
import os.path import custom from tornado.options import define define("HTTPS_port", default=443, help="run on the given port", type=int) define("HTTP_port", default=80, help="run on the given port", type=int) define("config", default=None, help="tornado config file") define("debug", default=False, help="debug mode"...
chinhtle/ops-restd
opsrest/settings.py
settings.py
py
1,084
python
en
code
0
github-code
6
[ { "api_name": "tornado.options.define", "line_number": 7, "usage_type": "call" }, { "api_name": "tornado.options.define", "line_number": 8, "usage_type": "call" }, { "api_name": "tornado.options.define", "line_number": 9, "usage_type": "call" }, { "api_name": "tor...
12931148980
import os from dotenv import load_dotenv from aiogram import types, executor, Dispatcher, Bot from aiogram.dispatcher.filters.state import State, StatesGroup from aiogram.types.message import ContentType, ContentTypes import logging import aiogram.utils.markdown as md from aiogram.contrib.fsm_storage.memory import Mem...
Anastas1a1/fin-accounting
financial-accounting/UI.py
UI.py
py
12,834
python
en
code
0
github-code
6
[ { "api_name": "dotenv.load_dotenv", "line_number": 23, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 24, "usage_type": "call" }, { "api_name": "aiogram.Bot", "line_number": 25, "usage_type": "call" }, { "api_name": "aiogram.contrib.fsm_storage....
23900950107
import pandas as pd import numpy as np from scipy import spatial # Below function returns top-N recommendations for a given user def get_top_n_recommendations(user_ratings_matrix, current_user, top_list_length): closest_user = get_most_similar_users(user_ratings_matrix, current_user)[0] closest_neighbours_rat...
malinthasa/Recommender-Systems
source/Memory_Based_Collaborative_Filtering/UserBasedCollaboration/UserBasedImp.py
UserBasedImp.py
py
2,296
python
en
code
0
github-code
6
[ { "api_name": "numpy.where", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.asarray", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number"...
26764253290
# -*- coding: utf-8 -*- """ Created on Sun Jan 1 16:17:57 2023 @author: Gauthier Guyaz """ import tkinter as tk #gestion graphismes from random import randint #germe aléatoire import WindVector #importation d'un fichier annexe from PIL import Image #gestion du raster # =======...
Gauthier23/Forest-Fire
Forest_Fire.py
Forest_Fire.py
py
10,737
python
fr
code
2
github-code
6
[ { "api_name": "tkinter.ALL", "line_number": 76, "usage_type": "attribute" }, { "api_name": "WindVector.Angle2Vector", "line_number": 103, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 180, "usage_type": "call" }, { "api_name": "PIL.Image.o...
6522452587
import configparser import json import unittest from lyft.authentication.auth import LyftPublicAuth from lyft.availability import Availability from tests import availability_res # path to secret access config file ACCESS_TOKEN_PATH = "/Users/Raj/Root/Code/_PRIVATE_KEYS/lyft/test_app.cfg" # file format/ content, save ...
rzskhr/Lyft-Python-SDK
tests/availability_test.py
availability_test.py
py
2,350
python
en
code
2
github-code
6
[ { "api_name": "configparser.ConfigParser", "line_number": 18, "usage_type": "call" }, { "api_name": "lyft.authentication.auth.LyftPublicAuth", "line_number": 24, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 25, "usage_type": "call" }, { "api_...
72182396027
'''Kafka Consumer - kafka -> MongoDB Consume weather data from kafka to MongoDB. ''' from kafka import KafkaConsumer from pymongo import MongoClient import json def kafka_consumer(kfk_bootstrap_server:str, db_name:str) -> None: try: # connect to MongoDB client = MongoClient('localhost',27017) ...
felipedmnq/streaming-weather-kafka
kafka/weather_consumer_mongodb.py
weather_consumer_mongodb.py
py
2,214
python
en
code
3
github-code
6
[ { "api_name": "pymongo.MongoClient", "line_number": 13, "usage_type": "call" }, { "api_name": "kafka.KafkaConsumer", "line_number": 21, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 26, "usage_type": "call" } ]
1693711596
import secrets import os from flask import current_app from PIL import Image def save_picture(form_picture): random_hex = secrets.token_hex(16) _, file_extension = os.path.splitext(form_picture.filename) picture_fn = random_hex + file_extension picture_path = os.path.join(current_app.root_path, ...
vCel/IAB207-Assignment3-Group42
auction/sell/utils.py
utils.py
py
575
python
en
code
0
github-code
6
[ { "api_name": "secrets.token_hex", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.splitext", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.path.join", "line...
27813318430
import random from ucts import uct from utils.util import hash_str_encoding, save_one_in_hash_file, Merge, sample_component from utils.eliminate_isomorphism import instance_to_isom_str, maintain_reward_hash_with_edge \ , get_component_priorities import collections import networkx as nx import matplotlib.pyplot as p...
fanshaoze/UCT-for-Converter-Design
UCTUsingAnalytics/3-components/UCT_for_CD_analytics/ucts/TopoPlanner.py
TopoPlanner.py
py
61,307
python
en
code
1
github-code
6
[ { "api_name": "copy.deepcopy", "line_number": 57, "usage_type": "call" }, { "api_name": "ucts.uct.State", "line_number": 209, "usage_type": "attribute" }, { "api_name": "ucts.uct", "line_number": 209, "usage_type": "name" }, { "api_name": "collections.defaultdict"...
38903260274
import argparse from TrainPipelineBuilder import TrainPipelineBuilder from predict import run_batch, run_online def run_test(model_dir): # global model, vocab, setup model, vocab, setup, _ = TrainPipelineBuilder.load(model_dir) if args.gpu >= 0: run_batch(args.gpu, model, vocab, setup) else: ...
elangovana/sentimentanalysis-chainer-sagemaker
custom_chainer/main_predict.py
main_predict.py
py
963
python
en
code
0
github-code
6
[ { "api_name": "TrainPipelineBuilder.TrainPipelineBuilder.load", "line_number": 9, "usage_type": "call" }, { "api_name": "TrainPipelineBuilder.TrainPipelineBuilder", "line_number": 9, "usage_type": "name" }, { "api_name": "predict.run_batch", "line_number": 11, "usage_type...
27445869703
from pytube import YouTube link = input("Please enter the link of your Youtube Video : ") video = YouTube(link) print(video.title) print("\nDownloading Audio...") video.streams.get_audio_only().download( output_path="C:\\Users\Mohamed Farid\Desktop\songs")
MohamedFarid612/Youtube-song-downloader
youtube.py
youtube.py
py
274
python
en
code
0
github-code
6
[ { "api_name": "pytube.YouTube", "line_number": 5, "usage_type": "call" } ]
10225783655
#!/usr/bin/python # -*- coding: utf-8 -*- import binascii import datetime import math import re import select import socket import sys import time import os from ansible.module_utils._text import to_native def main(): module = AnsibleModule( argument_spec = dict( pid=dict(default=None, type='...
pingcap/tidb-ansible
library/wait_for_pid.py
wait_for_pid.py
py
4,770
python
en
code
325
github-code
6
[ { "api_name": "re.compile", "line_number": 41, "usage_type": "call" }, { "api_name": "re.MULTILINE", "line_number": 41, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 48, "usage_type": "call" }, { "api_name": "datetime.datetime"...
38800378641
import optuna import numpy as np import pandas as pd import matplotlib.pyplot as plt import xgboost as xgb import matplotlib.ticker as ticker import matplotlib.dates as mdates from sklearn.metrics import mean_squared_error from sklearn.metrics import mean_squared_error as mse from sklearn.metrics import mean_absolute_e...
wuyeyuan/Wyy
5years_xg_duo.py
5years_xg_duo.py
py
4,276
python
en
code
0
github-code
6
[ { "api_name": "warnings.filterwarnings", "line_number": 15, "usage_type": "call" }, { "api_name": "pandas.read_excel", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 32, "usage_type": "call" }, { "api_name": "numpy.array", ...
70643855867
import datetime as dt from datetime import timedelta from airflow import DAG from airflow.operators.bash_operator import BashOperator from airflow.operators.python_operator import PythonOperator def Get_DF(Day): import pandas as pd DF_i=None try: URL_Day=f'https://raw.githubuserco...
shoroqtrad/DataEngineeringHW2
HW20208075/dags/covid_dag.py
covid_dag.py
py
5,102
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 13, "usage_type": "call" }, { "api_name": "datetime.datetime.today", "line_number": 30, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 30, "usage_type": "attribute" }, { "api_name": "dateti...
9150103813
import numpy import joblib class Bootstrapper: """The entry point of all Bootstrapper features. :param n_jobs: How many process workers are used. -1 means the CPU counts available. Defaults to -1. :type n_jobs: int, optional :param bootstrap_count: How many bootstrap samples are drawn. Defaults to 1...
ownshogo/bootstrapper
bootstrapper/bootstrapper.py
bootstrapper.py
py
3,760
python
en
code
0
github-code
6
[ { "api_name": "numpy.random.choice", "line_number": 38, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 38, "usage_type": "attribute" }, { "api_name": "joblib.Parallel", "line_number": 41, "usage_type": "call" }, { "api_name": "joblib.delayed"...
19812069338
# -*- coding: utf-8 -*- """ The result is a BibTeX file that includes all the entries included in the BibTeX files given with the -bib parameter. The result has not duplicated entries. A. M. Reina Quintero <reinaqu@us.es> """ import argparse from bibtexparser.bibdatabase import BibDatabase import bibtexparser...
reinaqu/bibtex_utils
src/bibmerge.py
bibmerge.py
py
1,104
python
en
code
0
github-code
6
[ { "api_name": "logging.basicConfig", "line_number": 16, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 16, "usage_type": "attribute" }, { "api_name": "logging.info", "line_number": 21, "usage_type": "call" }, { "api_name": "argparse.ArgumentP...
4677136797
import argparse import logging import sys from pds_github_util.requirements.requirements import Requirements, NoAppropriateVersionFoundException from pds_github_util.utils import addStandardArguments _logger = logging.getLogger(__name__) def main(): parser = argparse.ArgumentParser(description='Create a require...
NASA-PDS/pds-github-util
pds_github_util/requirements/generate_requirements.py
generate_requirements.py
py
1,843
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "pds_github_util.utils.addStandardArguments", "line_number": 13, "usage_type": "call" }, { ...
26623474829
import matplotlib.pyplot as plt import numpy as np import seaborn as sns from scipy.optimize import curve_fit def vac(data, tsteps, npart): trange = int((tsteps - 1) / 2) vac = np.zeros(trange - 1) for deltaT in range(1, trange): ## Cᵥ = ∑Cᵥ(t) / M for t0 in range(trange): ## Cᵥ...
sofiabelen/Molecular-Dynamics-Course
vac.py
vac.py
py
2,126
python
en
code
0
github-code
6
[ { "api_name": "numpy.zeros", "line_number": 8, "usage_type": "call" }, { "api_name": "scipy.optimize.curve_fit", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.arange", "...
73022609467
#!/usr/bin/env python3 import json from argparse import ArgumentParser __version__ = "1.0.3" def _load_cohort_info(cohort_json_file): """ Load a cohort json file Args: cohort_json_file (str): Path to the cohort JSON file Returns: (dict): A dict of cohort information """ with ...
PacificBiosciences/wdl-dockerfiles
docker/pyyaml/scripts/parse_cohort.py
parse_cohort.py
py
4,978
python
en
code
1
github-code
6
[ { "api_name": "json.load", "line_number": 18, "usage_type": "call" }, { "api_name": "yaml.dump", "line_number": 69, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 120, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_nu...
39795600524
import boto3 img = open("siem.jpeg", "rb") dmx=img.read() def add_faces_to_collection(bucket, photo, collection_id, idn): client = boto3.client('rekognition', aws_access_key_id=access_key_id, aws_secret_access_key=secret_access_key, ...
SiemGHM/Login_with_Facial_Recognition
test.py
test.py
py
4,748
python
en
code
0
github-code
6
[ { "api_name": "boto3.client", "line_number": 7, "usage_type": "call" }, { "api_name": "boto3.client", "line_number": 49, "usage_type": "call" }, { "api_name": "boto3.client", "line_number": 76, "usage_type": "call" }, { "api_name": "boto3.client", "line_number...
26974675964
# -*- coding: utf-8 -*- """ Created on Fri Oct 19 23:12:10 2018 """ from subprocess import call import os import glob import pytesseract from PIL import Image from PyPDF2 import PdfFileMerger pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files (x86)\Tesseract-OCR\tesseract.exe" class Searcha...
madmak100/PDF_Reader_Exact
OCR_Searchable_pdf.py
OCR_Searchable_pdf.py
py
4,053
python
en
code
0
github-code
6
[ { "api_name": "pytesseract.pytesseract", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number": 33, "usage_type": "call" }, { "api_name": "os.sep", "line_number": 35, "usage_type": "attribute" }, { "api_name": "subprocess.call"...
40687413533
from typing import Any, Callable, Dict, Iterable from magma.enodebd.data_models import transform_for_magma from magma.enodebd.data_models.data_model import DataModel, TrParam from magma.enodebd.data_models.data_model_parameters import ( ParameterName, TrParameterType, ) from magma.enodebd.devices.freedomfi_one...
magma/magma
lte/gateway/python/magma/enodebd/devices/freedomfi_one/data_model.py
data_model.py
py
9,523
python
en
code
1,605
github-code
6
[ { "api_name": "magma.enodebd.data_models.data_model.DataModel", "line_number": 17, "usage_type": "name" }, { "api_name": "magma.enodebd.data_models.data_model_parameters.ParameterName.DEVICE", "line_number": 41, "usage_type": "attribute" }, { "api_name": "magma.enodebd.data_model...
28577181479
from django import forms from django.contrib.auth import get_user_model from django.core.files.uploadedfile import SimpleUploadedFile from django.test import Client, TestCase from django.urls import reverse from ..models import Comment, Follow, Group, Post User = get_user_model() class PostFormModelTest(TestCase): ...
NikitaSavvin/hw05_final
posts/test/test_views.py
test_views.py
py
8,544
python
en
code
0
github-code
6
[ { "api_name": "django.contrib.auth.get_user_model", "line_number": 9, "usage_type": "call" }, { "api_name": "django.test.TestCase", "line_number": 12, "usage_type": "name" }, { "api_name": "django.test.Client", "line_number": 17, "usage_type": "call" }, { "api_nam...
28296135730
import asyncio import websocket from websocket import create_connection import sender import receiver import webSocketManager import time from sensor import Sensor from serial_communication import SerialCommunication import json class RaspManager: """ Rasp manager is reading the serial port and the server ( websock...
AlexFourgs/AVAST
Rasp/SocketCommunication/python_communication/central_com.py
central_com.py
py
1,734
python
en
code
0
github-code
6
[ { "api_name": "json.loads", "line_number": 22, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 42, "usage_type": "call" }, { "api_name": "webSocketManager.WebSocketManager", "line_number": 51, "usage_type": "call" }, { "api_name": "serial_commun...
33821301574
import time import argparse import numpy as np import tensorflow as tf import horovod.tensorflow as hvd from sparse_operation_kit import experiment as sok if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--batch_size", type=int, default=8192) parser.add_argument("--key_s...
NVIDIA-Merlin/HugeCTR
sparse_operation_kit/sparse_operation_kit/experiment/benchmark/benchmark/dynamic_variable_benchmark.py
dynamic_variable_benchmark.py
py
2,505
python
en
code
849
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "call" }, { "api_name": "tensorflow.config.list_physical_devices", "line_number": 19, "usage_type": "call" }, { "api_name": "tensorflow.config", "line_number": 19, "usage_type": "attribute" }, {...
8864030266
#!/usr/bin/env python3 ''' This script is related to the RQ6. It compares time execution with more CPU available. @author: Sotero Junior <https://soterojunior.github.io/> The Arguments = <PROJECT_DIR> and <NUM_CORE> are required # Usage: ./scalability_cores <PROJECT_DIR> <NUM_CORE> # Example: ./scalability_cores ....
damorim/testsuite-parallelization
scripts/result_rq6/scalability_cores.py
scalability_cores.py
py
5,340
python
en
code
1
github-code
6
[ { "api_name": "subprocess.check_output", "line_number": 28, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 30, "usage_type": "call" }, { "api_name": "subprocess.CalledProcessError", "line_number": 31, "usage_type": "name" }, { "api_name": "re.sub",...
9083824905
from args import ArgReader from args import str2bool import os import glob import torch import numpy as np from skimage.transform import resize from skimage import img_as_ubyte import matplotlib.pyplot as plt plt.switch_backend('agg') from sklearn.manifold import TSNE import sklearn import matplotlib.cm as cm impor...
anony812/BR-CNN
code/processResults.py
processResults.py
py
66,826
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.pyplot.switch_backend", "line_number": 13, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 13, "usage_type": "name" }, { "api_name": "matplotlib.cm", "line_number": 59, "usage_type": "name" }, { "api_name": "matp...
11983964901
# -*- coding: utf-8 -*- from urllib import request import chardet from os import path, makedirs, getcwd import copy from html import parser from shutil import rmtree root_url = u"http://www.opencv.org.cn/opencvdoc/2.3.2/html/index.html" def get_base_url_path(root_url): result = request.urlparse(root_url) re...
yyFFans/DemoPractises
WebScrab/webscrab.py
webscrab.py
py
5,902
python
en
code
0
github-code
6
[ { "api_name": "urllib.request.urlparse", "line_number": 14, "usage_type": "call" }, { "api_name": "urllib.request", "line_number": 14, "usage_type": "name" }, { "api_name": "urllib.request.urlunparse", "line_number": 15, "usage_type": "call" }, { "api_name": "urll...
24526224398
import scipy.stats as st import numpy as np import sys class PairMatch: def __init__(self): self.ref_d_value_means = None self.ref_d_value_std = None def paired_elements_measurements_to_d_values(self, l_meas, r_meas): return l_meas - r_meas def d_values_means(self, d_values): ...
jwarsom/osteometrics
osteometrics/pair_matching/pair_matching.py
pair_matching.py
py
5,400
python
en
code
0
github-code
6
[ { "api_name": "numpy.nanmean", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.nanstd", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.divide", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.absolute", "line_nu...