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
24731026374
from typing import TextIO, AnyStr import yaml from yaml.loader import SafeLoader class ReadFile: def __init__(self, file_name): self.absolute_file_name = file_name self.data = None self.file: TextIO = TextIO() self.title: str = "" self.description: str = "" self.d...
kukkalli/python_file_handler
file_handler/read_yaml.py
read_yaml.py
py
2,623
python
en
code
0
github-code
18
[ { "api_name": "typing.TextIO", "line_number": 12, "usage_type": "name" }, { "api_name": "yaml.load", "line_number": 21, "usage_type": "call" }, { "api_name": "yaml.loader.SafeLoader", "line_number": 21, "usage_type": "name" }, { "api_name": "yaml.load", "line_...
75325275880
import pandas as pd import logging import json # Create a logger logging.basicConfig(filename="../movie_dataset.log", level=logging.INFO) class MovieAnalyzer: def __init__(self, metadata_path, ratings_path): self.metadata_path = metadata_path self.ratings_path = ratings_path self.load_dat...
vesso8/Movies-Dataset
task/movies_analyzer.py
movies_analyzer.py
py
4,601
python
en
code
0
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 6, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 6, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_number": 18, "usage_type": "call" }, { "api_name": "pandas.read_csv",...
37616199078
from itertools import izip from jinja2.utils import escape from templatefilters import escapejs, timesince_ago from models import Exercise, UserExerciseGraph def class_progress_report_graph_context(user_data, list_students): if not user_data: return {} list_students = sorted(list_students, key=lambd...
KhanWorld/KhanAcademy
profiles/class_progress_report_graph.py
class_progress_report_graph.py
py
3,564
python
en
code
9
github-code
18
[ { "api_name": "jinja2.utils.escape", "line_number": 14, "usage_type": "call" }, { "api_name": "templatefilters.escapejs", "line_number": 15, "usage_type": "call" }, { "api_name": "models.Exercise.get_all_use_cache", "line_number": 17, "usage_type": "call" }, { "ap...
26965426530
import sys import pprint as pp import itertools as it grid = [line.strip() for line in sys.stdin] def evolve(grid: list[str]) -> list[str]: h, w = len(grid), len(grid[0]) east = [["." for _ in range(w)] for _ in range(h)] for i, row in enumerate(grid): for j, c in enumerate(row): if ...
kwshi/aoc-2021
25/25.py
25.py
py
1,100
python
en
code
0
github-code
18
[ { "api_name": "sys.stdin", "line_number": 5, "usage_type": "attribute" }, { "api_name": "itertools.count", "line_number": 37, "usage_type": "call" } ]
72745528679
# %% import numpy as np import matplotlib.pyplot as plt import math import matplotlib.image as mpimg import glob import json import os import torch import torch.nn as nn import torch from torch.autograd import Variable import torch.nn.functional as F import torch.optim as optim from torch.utils.data import DataLoader,...
glcanvas/master-diploma
bboxes/2_noise_data_to_pix2pix.py
2_noise_data_to_pix2pix.py
py
11,706
python
en
code
0
github-code
18
[ { "api_name": "os.path.join", "line_number": 46, "usage_type": "call" }, { "api_name": "os.path", "line_number": 46, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 47, "usage_type": "call" }, { "api_name": "os.path", "line_number": 4...
36516042879
import asyncio from bot.utils import logger as KatLogger from bot.utils import constants MAX_EVENT_TIMER = constants.EventManager.MAX_EVENT_TIMER class EventManager: """Managed event caller for Kat. Events are registered with `create_event` and are called every `seconds`. event information is stored i...
ReignBit/discord-kat
bot/utils/events.py
events.py
py
3,725
python
en
code
3
github-code
18
[ { "api_name": "bot.utils.constants.EventManager", "line_number": 6, "usage_type": "attribute" }, { "api_name": "bot.utils.constants", "line_number": 6, "usage_type": "name" }, { "api_name": "bot.utils.logger.get_logger", "line_number": 33, "usage_type": "call" }, { ...
42891611799
import os import json from setuptools import setup with open("README.md", "r", encoding="utf8") as fh: long_description = fh.read() with open( os.path.join("webviz_subsurface_components", "package.json"), encoding="utf8" ) as f: package = json.load(f) package_name = ( package["name"] .replace(" ...
HansKallekleiv/webviz-subsurface-components
setup.py
setup.py
py
1,821
python
en
code
null
github-code
18
[ { "api_name": "os.path.join", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 12, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_numb...
10440541324
from django.core.mail import EmailMessage from rest_framework import viewsets from contact.api import serializers from contact.models import Email from rest_framework.permissions import AllowAny from sahyog_settings import settings def send_email(receiver_email): email = EmailMessage( settings.CONTACT_U...
iprashant14/sahyog
apps/contact/api/views.py
views.py
py
858
python
en
code
0
github-code
18
[ { "api_name": "django.core.mail.EmailMessage", "line_number": 12, "usage_type": "call" }, { "api_name": "sahyog_settings.settings.CONTACT_US_SUBJECT_CONTENT", "line_number": 13, "usage_type": "attribute" }, { "api_name": "sahyog_settings.settings", "line_number": 13, "usa...
29963364273
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import pandas as pd import plotly.express as px import plotly import plotly.graph_objects as go from plotly.subplots import make_subplots from tabs.utils import line_plot, heat_plot from app i...
givewgun/RamaIV-Dashboard
tabs/tab_3.py
tab_3.py
py
2,798
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 28, "usage_type": "call" }, { "api_name": "dash_html_components.Div", "line_number": 42, "usage_type": "call" }, { "api_name": "dash_html_components.H1", "line_number": 43, "usage_type": "call" }, { "api_name": "dash...
33093383644
from __future__ import absolute_import import collections import logging import time import uuid from threading import Thread, Lock import yaml from k8s.client import NotFound from k8s.models.common import ObjectMeta from k8s.models.deployment import Deployment from prometheus_client import Counter, Gauge from .rbac ...
fiaas/skipper
fiaas_skipper/deploy/deploy.py
deploy.py
py
7,222
python
en
code
3
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 16, "usage_type": "call" }, { "api_name": "prometheus_client.Gauge", "line_number": 20, "usage_type": "call" }, { "api_name": "prometheus_client.Counter", "line_number": 21, "usage_type": "call" }, { "api_name": "p...
4234283712
import requests testUrl = "http://127.0.0.1:5000/ahi/api/v1.0/add_patient" patientTest = { 'patient_id': '340000', 'firstname': 'example55', 'lastname': 'example66', 'inpatient': True } apiRequest = requests.post(testUrl, json=patientTest) apiRequest.status_code testUrl = "h...
hantswilliams/AHI_Flask_API
pythonTestScripts/Build4TestScript.py
Build4TestScript.py
py
422
python
en
code
1
github-code
18
[ { "api_name": "requests.post", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 20, "usage_type": "call" } ]
34224031071
from django.shortcuts import render,redirect # Create your views here. from pulses.models import snacks,vendor def h1(request): a=snacks.objects.all() return render(request,'master/h1.html',{'b':a}) def login(request): return render(request,'master/login.html') def start(request): if request.method...
learnSasi/day
organic/pulses/views.py
views.py
py
1,710
python
en
code
0
github-code
18
[ { "api_name": "pulses.models.snacks.objects.all", "line_number": 8, "usage_type": "call" }, { "api_name": "pulses.models.snacks.objects", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pulses.models.snacks", "line_number": 8, "usage_type": "name" }, { ...
1571388153
from mlcalcdriver import Posinp import numpy as np import os from copy import copy import matplotlib.pyplot as plt pos_folder = "positions/" positions = [ Posinp.from_file(pos_folder + file) for file in os.listdir(pos_folder) if file.endswith(".xyz") ] n = 200000 npzfile = np.load("prob_32at_3d.npz") pro...
OMalenfantThuot/scripts_raman
databases/graphene_data/32_atoms/verification.py
verification.py
py
1,510
python
en
code
1
github-code
18
[ { "api_name": "mlcalcdriver.Posinp.from_file", "line_number": 10, "usage_type": "call" }, { "api_name": "mlcalcdriver.Posinp", "line_number": 10, "usage_type": "name" }, { "api_name": "os.listdir", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.lo...
5970560258
import arcade import Settings class ArtificialPlayer(arcade.Sprite): def __init__(self, map_obj, row, col): super().__init__("graphics/adventurer/robot_stand.png", Settings.SPRITE_SCALING) self.map = map_obj self.row = row self.col = col self.right = (self.col * Settings.S...
davidtv2008/MiningRush
ArtificialPlayer.py
ArtificialPlayer.py
py
8,134
python
en
code
0
github-code
18
[ { "api_name": "arcade.Sprite", "line_number": 5, "usage_type": "attribute" }, { "api_name": "Settings.SPRITE_SCALING", "line_number": 7, "usage_type": "attribute" }, { "api_name": "Settings.SCALED_PIXEL_SIZE", "line_number": 12, "usage_type": "attribute" }, { "api...
1609370954
from django.shortcuts import render from django.contrib.auth import logout as django_logout from django.http import HttpResponseRedirect from decouple import config import json from django.shortcuts import render, redirect from django.http import HttpResponseRedirect, HttpResponse from django.views.decorators.csrf impo...
shwbhandari/Walkover_project
Home/views.py
views.py
py
3,996
python
en
code
0
github-code
18
[ { "api_name": "django.shortcuts.render", "line_number": 21, "usage_type": "call" }, { "api_name": "django.shortcuts.redirect", "line_number": 25, "usage_type": "call" }, { "api_name": "dynamic_models.models.ModelSchema.objects.create", "line_number": 34, "usage_type": "ca...
13733125535
from telebot import TeleBot from telebot.util import antiflood from telebot.apihelper import ApiException import hashlib LOWER_LETTERS = 'абвгдеёжзийклмнопрстуфхцчшщъыьэюя' UPPER_LETTERS = 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ' EMPTY_SYMB = ' ' CONNECT_SYMB = '-' UTF = 'utf-8' def send_text(bot: TeleBot, chat_id: int,...
Cub11k/ActiveSchoolBotTemplate
mypackage/business_logic/__init__.py
__init__.py
py
3,073
python
en
code
0
github-code
18
[ { "api_name": "telebot.TeleBot", "line_number": 14, "usage_type": "name" }, { "api_name": "telebot.util.antiflood", "line_number": 18, "usage_type": "call" }, { "api_name": "telebot.apihelper.ApiException", "line_number": 19, "usage_type": "name" }, { "api_name": ...
22506119475
import sys import logging from pathlib import Path import hp if False: from cute import Cute class HPLog: def __init__(self, directory: str): self.path_str: str = f"{directory}/" self.path: Path = Path(self.path_str) self.path.mkdir(parents=True, exist_ok=True) self.path_str ...
jkarns275/cute
src/hp_log.py
hp_log.py
py
1,590
python
en
code
0
github-code
18
[ { "api_name": "pathlib.Path", "line_number": 14, "usage_type": "name" }, { "api_name": "logging.fatal", "line_number": 22, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 23, "usage_type": "call" }, { "api_name": "logging.fatal", "line_number"...
29509526311
""" Thuật toán bubble sort """ import random as rd import time import copy import matplotlib.pyplot as plt import sys sys.setrecursionlimit(4002) def bubbleSort(key): n = len(key) for i in range(n -1 ): for j in range(0,n-i- 1): if key[j] > key[j+1]: key[j] , key[j+1] = key[...
nguyenduc810/DSA_HUST_20202
Sorting_Algorithms/RuntimeOfSortA.py
RuntimeOfSortA.py
py
4,484
python
en
code
0
github-code
18
[ { "api_name": "sys.setrecursionlimit", "line_number": 9, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 100, "usage_type": "call" }, { "api_name": "sys.getrecursionlimit", "line_number": 119, "usage_type": "call" }, { "api_name": "copy.copy...
33370520889
from django.urls import path from . import views # . means current directory urlpatterns = [ path('', views.home, name='app-home'), path('about/', views.about, name='app-about'), path('graph/', views.graph, name='app-graph'), path('search/', views.search, name='app-search'), ]
donmin062501/StockViz
Visualizer/urls.py
urls.py
py
297
python
en
code
1
github-code
18
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "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", ...
15010781312
import logging from typing import Any, Type from pydantic import BaseModel, ValidationError def try_valparse( raw_data: dict[str, Any], datamodel: Type[BaseModel] ) -> tuple[dict[str, Any], bool]: """ Attempts data validation and type parsing using Pydantic models. Logs validation errors upon failure...
jason-cls/cryptoscout
batch_ingest/src/batch_ingest/utils/validate.py
validate.py
py
1,077
python
en
code
0
github-code
18
[ { "api_name": "typing.Any", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.Type", "line_number": 8, "usage_type": "name" }, { "api_name": "pydantic.BaseModel", "line_number": 8, "usage_type": "name" }, { "api_name": "logging.info", "line_numbe...
10891495541
import json import boto3 from b_node_cdk_layer_test.integration.infrastructure.main_stack import MainStack def test_FUNCTION_custom_node_function_WITH_node_cdk_layer_EXPECT_user_created() -> None: """ Check whether created lambda function with node cdk layer can run CDK CLI commands. :return: No return...
Biomapas/B.NodeCdkLayer
b_node_cdk_layer_test/integration/tests/test_layer.py
test_layer.py
py
644
python
en
code
0
github-code
18
[ { "api_name": "b_node_cdk_layer_test.integration.infrastructure.main_stack.MainStack.get_output", "line_number": 14, "usage_type": "call" }, { "api_name": "b_node_cdk_layer_test.integration.infrastructure.main_stack.MainStack", "line_number": 14, "usage_type": "name" }, { "api_na...
3346142384
from flask import jsonify, session from api.dao.location import Location from api.util.utilities import Utilities class LocationHandler: @staticmethod def getLocationsWithinOneKilometerRadius(json): try: locations = Location.getLocationsWithinOneKilometerRadius(json) result_lis...
uprm-inso-4116-2020-2021-S1/semester-project-team-f
covid-tracking-app-backend/api/handler/location.py
location.py
py
3,372
python
en
code
0
github-code
18
[ { "api_name": "api.dao.location.Location.getLocationsWithinOneKilometerRadius", "line_number": 10, "usage_type": "call" }, { "api_name": "api.dao.location.Location", "line_number": 10, "usage_type": "name" }, { "api_name": "api.util.utilities.Utilities.to_dict", "line_number"...
1171861109
from django.shortcuts import render from django.http import HttpResponse from django.template import loader import requests import json def index(request): r = requests.get('https://swapi.co/api/films') datos = r.json() template = loader.get_template('swapihandler/index.html') id = 0 for i in dato...
Zepk/T1swapi
swapihandler/views.py
views.py
py
6,945
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 9, "usage_type": "call" }, { "api_name": "django.template.loader.get_template", "line_number": 11, "usage_type": "call" }, { "api_name": "django.template.loader", "line_number": 11, "usage_type": "name" }, { "api_name":...
12076970471
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Shutter module # # Thiebolt aug.19 updated # Francois apr.16 initial release # import time import json import threading import paho.mqtt.client as mqtt_client import os import sys from connection import Objet import RPi.GPIO as GPIO #GREEN/UP LED PIN_UP = 6 #RED/...
Dane-Amrouche/Tp7_iot
shutter.py
shutter.py
py
6,191
python
en
code
0
github-code
18
[ { "api_name": "RPi.GPIO.setmode", "line_number": 23, "usage_type": "call" }, { "api_name": "RPi.GPIO", "line_number": 23, "usage_type": "name" }, { "api_name": "RPi.GPIO.BCM", "line_number": 23, "usage_type": "attribute" }, { "api_name": "RPi.GPIO.setup", "lin...
31267465515
from django.shortcuts import render,redirect from jobapp.forms import Register from jobapp.models import CityJobs,Apply from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.db.models import Q # Create your views here. def welcome(request): return render...
prkusid/JOBPORTALPROJECTREPO
JOBPORTALPROJECT/jobapp/views.py
views.py
py
2,925
python
en
code
0
github-code
18
[ { "api_name": "django.shortcuts.render", "line_number": 11, "usage_type": "call" }, { "api_name": "jobapp.forms.Register", "line_number": 14, "usage_type": "call" }, { "api_name": "jobapp.forms.Register", "line_number": 16, "usage_type": "call" }, { "api_name": "d...
43744785727
# !/usr/bin/env python3 # -*- coding: utf-8 -*- import cv2 from datetime import datetime import numpy as np ir_camera_index = 2 def raw_to_8bit(data): cv2.normalize(data, data, 0, 65535, cv2.NORM_MINMAX) np.right_shift(data, 8, data) return cv2.cvtColor(np.uint8(data), cv2.COLOR_GRAY2RGB) def main():...
vinceHuyghe/Workshop_Multispectral_Cognification_Turtlebot2
lepton_pt_capture/utils/lepton_cap_t.py
lepton_cap_t.py
py
1,576
python
en
code
2
github-code
18
[ { "api_name": "cv2.normalize", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.NORM_MINMAX", "line_number": 13, "usage_type": "attribute" }, { "api_name": "numpy.right_shift", "line_number": 14, "usage_type": "call" }, { "api_name": "cv2.cvtColor", ...
36006296044
from __future__ import unicode_literals from django import forms from django.db import models from django.forms import ModelForm from django.core.validators import MinValueValidator, MaxValueValidator class Schedule(models.Model): MONDAY ='MON' TUESDAY = 'TUE' WEDNESDAY= 'WED' THURSDAY = 'THU' ...
atirados/CS425-Final-Project
Schedule/models.py
models.py
py
1,234
python
en
code
0
github-code
18
[ { "api_name": "django.db.models.Model", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 28, "usage_type": "call" }, { "api_name": ...
24689842638
from django import template from home.models import FooterText from issue.models import IssuePage from contact.models import Contact register = template.Library() @register.inclusion_tag('home/footer.html') def footer(): _contacts = Contact.objects.all() if _contacts: _contact = _contacts[0] else...
theReboot/powertoolkit
powerkit/home/templatetags/footer_tags.py
footer_tags.py
py
814
python
en
code
0
github-code
18
[ { "api_name": "django.template.Library", "line_number": 6, "usage_type": "call" }, { "api_name": "django.template", "line_number": 6, "usage_type": "name" }, { "api_name": "contact.models.Contact.objects.all", "line_number": 11, "usage_type": "call" }, { "api_name...
20444850478
10001# -*- coding: utf-8 -*- """ Created on Fri Oct 4 17:13:01 2019 @author: alexa """ import pygame from pygame.locals import * import numpy as np import matplotlib.cm as cm import matplotlib.pyplot as plt n = 100 cells = np.zeros((n,n),dtype=int) cellsize = int(400/n) class Ant: def __init__(self,pos,way): ...
xelanicol/miniprojects
Langtons Ant Custom.py
Langtons Ant Custom.py
py
2,648
python
en
code
0
github-code
18
[ { "api_name": "numpy.zeros", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 35, "usage_type": "call" }, { "api_name": "pygame.init", "line_number": ...
20077396387
import json import pytest from click.testing import CliRunner from sqlite_utils import Database, cli def test_memory_basic(): result = CliRunner().invoke(cli.cli, ["memory", "select 1 + 1"]) assert result.exit_code == 0 assert result.output.strip() == '[{"1 + 1": 2}]' @pytest.mark.parametrize("sql_fro...
simonw/sqlite-utils
tests/test_cli_memory.py
test_cli_memory.py
py
9,219
python
en
code
1,356
github-code
18
[ { "api_name": "click.testing.CliRunner", "line_number": 10, "usage_type": "call" }, { "api_name": "sqlite_utils.cli.cli", "line_number": 10, "usage_type": "attribute" }, { "api_name": "sqlite_utils.cli", "line_number": 10, "usage_type": "name" }, { "api_name": "cl...
29741805212
import os import random from utils import normalize_text from os import path import sys def remove_dir_files(path): """ Removes all files in the directory """ for file in os.listdir(path): os.remove(os.path.join(path, file)) def update_dir(path, data, msg=""): """ Updates the directo...
Devolafriend/483-bot-detection
python/process_data.py
process_data.py
py
3,444
python
en
code
0
github-code
18
[ { "api_name": "os.listdir", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "argument" }, { "api_name": "os.remove", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 12...
70222140520
import cv2 import numpy as np # 读取图片,彩色模式 img_color = cv2.imread('faces.jpg',cv2.IMREAD_COLOR) # 读取图片,灰度模式 img_gray = cv2.imread('faces.jpg',cv2.IMREAD_GRAYSCALE) # 读取人脸模板图片,灰度模式 template = cv2.imread('face_template1.jpg',cv2.IMREAD_GRAYSCALE) # 获取模板尺寸 w, h = template.shape[::-1] # 模板匹配方法数组 methods = ['cv2.TM_CCOEFF',...
CSsaan/Deep-learning-of-machine-vision
ch4.未有深度学习之前/haar/FaceDetection_TemplateMatching.py
FaceDetection_TemplateMatching.py
py
1,609
python
en
code
46
github-code
18
[ { "api_name": "cv2.imread", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.IMREAD_COLOR", "line_number": 5, "usage_type": "attribute" }, { "api_name": "cv2.imread", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.IMREAD_GRAYSCALE", "...
73663138600
# COMPLETE EXPLAINATION AT :- https://youtu.be/CuR0DVzToi4 ''' author: cYpHeR github: cypher-nullbyte ''' import math import numpy import sympy def modInverse(a, m) : a = a % m for x in range(1, m) : if ((a * x) % m == 1) : return x return 1 def KeyMatrix(Key,n): Matrix=[] for i...
cypher-nullbyte/CryptoTuts
HillCipher_decrypt.py
HillCipher_decrypt.py
py
1,419
python
en
code
1
github-code
18
[ { "api_name": "math.floor", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.linalg.det", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.linalg", "line_number": 23, "usage_type": "attribute" }, { "api_name": "sympy.Matrix", "lin...
34451836336
from flask import Blueprint, g, current_app, jsonify from flask_restful import Api, Resource, inputs from flask_restful.reqparse import RequestParser from models import * from lib.decorators import api_login_required bp = Blueprint('my', __name__) api = Api(bp) class HistoryResource(Resource): """ 我的浏览记录 ...
xlztongxue/xlzwenxue
xlzwx-backend/applet_app/my.py
my.py
py
1,939
python
en
code
0
github-code
18
[ { "api_name": "flask.Blueprint", "line_number": 8, "usage_type": "call" }, { "api_name": "flask_restful.Api", "line_number": 10, "usage_type": "call" }, { "api_name": "flask_restful.Resource", "line_number": 13, "usage_type": "name" }, { "api_name": "lib.decorator...
35244512254
import cv2 import tkinter as tk from tkinter import Entry, Canvas from pyzbar.pyzbar import decode from PIL import Image, ImageTk import tkinter as tk from tkinter import Entry, Canvas from PIL import Image, ImageTk import cv2 def create_qr_scanner_app(root): root.title("QR Scanner") entry_var = tk.StringVar...
hungtrt/python-tkinter-karaoke
card/scan.py
scan.py
py
1,687
python
en
code
0
github-code
18
[ { "api_name": "tkinter.StringVar", "line_number": 15, "usage_type": "call" }, { "api_name": "tkinter.Entry", "line_number": 16, "usage_type": "call" }, { "api_name": "tkinter.Button", "line_number": 19, "usage_type": "call" }, { "api_name": "tkinter.Canvas", "...
3018782908
import time from typing import List import volatility.framework.interfaces.plugins as plugins from volatility.framework import constants, interfaces, layers from volatility.framework.configuration import requirements from volatility.framework.renderers import TreeGrid from volatility.framework.symbols.windows.kdbg imp...
drkmrin78/volatility3
volatility/framework/plugins/windows/info.py
info.py
py
5,601
python
en
code
0
github-code
18
[ { "api_name": "volatility.framework.interfaces.plugins.PluginInterface", "line_number": 12, "usage_type": "attribute" }, { "api_name": "volatility.framework.interfaces.plugins", "line_number": 12, "usage_type": "name" }, { "api_name": "volatility.framework.configuration.requireme...
74662107878
import functools import time from flask import request, Response, make_response, jsonify, current_app from flask_classy import FlaskView from tigereye.helper.code import Code # 我们自己写aipview class ApiView(FlaskView): # 使用钩子函数来测试接口的响应时间 def before_request(self): self.request_start_time = time.time() ...
LZPTonyLiu/YiBAI
tigereye/api/__init__.py
__init__.py
py
3,852
python
en
code
0
github-code
18
[ { "api_name": "flask_classy.FlaskView", "line_number": 9, "usage_type": "name" }, { "api_name": "time.time", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.current_app.logger.info", "line_number": 14, "usage_type": "call" }, { "api_name": "flask.c...
71427556200
import numpy as np import pandas as pd import spacy from spacy import displacy nlp = spacy.load('en_core_web_sm') import nltk from sklearn import * test = pd.read_csv('../input/test_stage_1.tsv', delimiter='\t').rename(columns={'A': 'A_Noun', 'B': 'B_Noun'}) sub = pd.read_csv('../input/sample_submission_stage...
aorursy/new-nb-3
jazivxt_pro-noun-pro-gram.py
jazivxt_pro-noun-pro-gram.py
py
2,136
python
en
code
0
github-code
18
[ { "api_name": "spacy.load", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 19, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "lin...
12157966374
__author__ = 'RicksLab' __copyright__ = 'Copyright (C) 2020 RicksLab' __license__ = 'GNU General Public License' __program_name__ = 'gpu-utils' __maintainer__ = 'RicksLab' __docformat__ = 'reStructuredText' # pylint: disable=multiple-statements # pylint: disable=line-too-long # pylint: disable=consider-using-f-string ...
Ricks-Lab/gpu-utils
GPUmodules/GPUgui.py
GPUgui.py
py
9,300
python
en
code
122
github-code
18
[ { "api_name": "gi.require_version", "line_number": 19, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 26, "usage_type": "call" }, { "api_name": "typing.Dict", "line_number": 30, "usage_type": "name" }, { "api_name": "logging.getLogger", "line...
41717908312
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 image_size = 28 num_labels = 10 train_subset = 10000 batch_size = 128 num_steps = 3001 def accuracy(predictions, labels): return (100.0*np.sum(np.argmax(predictions, 1...
AJ2802/Deep-Learning-
Assignment 2/OpCompGraphForSGD.py
OpCompGraphForSGD.py
py
1,986
python
en
code
0
github-code
18
[ { "api_name": "numpy.sum", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.argmax", "line_number": 15, "usage_type": "call" }, { "api_name": "tensorflow.Session", "line_number": 18, "usage_type": "call" }, { "api_name": "tensorflow.global_variables...
8630989013
from itertools import product from binary_values import binary_values def main(): vals = range(- 2 ** 7, 2 ** 7) binvals = binary_values(vals, 8) ops = list(product(vals, vals)) binops = list(product(binvals, binvals)) products = [] for o in ops: products.append(o[0] * o[1]) binpr...
massimopavoni/RL22-PF-BoothMultiplier
BoothMultiplier/test_gen/rx4boothmult.py
rx4boothmult.py
py
619
python
en
code
0
github-code
18
[ { "api_name": "binary_values.binary_values", "line_number": 8, "usage_type": "call" }, { "api_name": "itertools.product", "line_number": 9, "usage_type": "call" }, { "api_name": "itertools.product", "line_number": 10, "usage_type": "call" }, { "api_name": "binary_...
6992956725
import random import strings_manager as sm import classifier as cl from data import knowledge_base as kb from data import keywords as kw FLAG = "fast" # given a key, it returns randomly one of its value def find_value(key): values = kb.dictionary[key] return values[random.randint(0, (len(values)-1))] # give...
rho9/chatbot_leo
kb_manager.py
kb_manager.py
py
2,617
python
en
code
0
github-code
18
[ { "api_name": "data.knowledge_base.dictionary", "line_number": 11, "usage_type": "attribute" }, { "api_name": "data.knowledge_base", "line_number": 11, "usage_type": "name" }, { "api_name": "random.randint", "line_number": 12, "usage_type": "call" }, { "api_name":...
30093635520
import requests from http import HTTPStatus from pprint import pprint from urllib.parse import urljoin from django.conf import settings if getattr(settings, 'DISABLE_URLLIB3_WARNINGS', False): import urllib3 urllib3.disable_warnings() class BearerAuth(requests.auth.AuthBase): def __init__(self, token)...
vbanasihan/sample_code
maria/client.py
client.py
py
1,618
python
en
code
0
github-code
18
[ { "api_name": "django.conf.settings", "line_number": 9, "usage_type": "argument" }, { "api_name": "urllib3.disable_warnings", "line_number": 11, "usage_type": "call" }, { "api_name": "requests.auth", "line_number": 14, "usage_type": "attribute" }, { "api_name": "r...
28110726230
# -*- coding: UTF-8 -*- import wx from CommandInterface import CommandInterface _metaclass_ = type class ChoseFileCmd(CommandInterface,object): def __init__(self,view): super(ChoseFileCmd,self).__init__(view) def Excute(self): dlg = wx.FileDialog(None, mes...
oneApple/ContentThreadPool
Command/ChoseFileCmd.py
ChoseFileCmd.py
py
786
python
en
code
2
github-code
18
[ { "api_name": "CommandInterface.CommandInterface", "line_number": 7, "usage_type": "name" }, { "api_name": "wx.FileDialog", "line_number": 12, "usage_type": "call" }, { "api_name": "wx.OPEN", "line_number": 15, "usage_type": "attribute" }, { "api_name": "wx.ID_OK"...
72805394281
# coding: UTF-8 import torch import torch.nn as nn from pytorch_pretrained_bert import BertModel, BertTokenizer import json class FGM(): def __init__(self, model): self.model = model self.backup = {} def attack(self, epsilon=1., emb_name='bert.embedding'): # emb_name这个参数要换成你模型中embeddi...
xhjcxxl/ccf2020_classification
torch_bert_Adversarial/bert_rnn.py
bert_rnn.py
py
2,492
python
en
code
0
github-code
18
[ { "api_name": "torch.norm", "line_number": 18, "usage_type": "call" }, { "api_name": "torch.nn.Module", "line_number": 32, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 32, "usage_type": "name" }, { "api_name": "pytorch_pretrained_bert.Bert...
28499786315
import requests from requests.exceptions import RequestException import re import json import time def get_page(url): try: headers = { 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0' } rsp = requests.get(url=url, headers=headers) if ...
xiangshuyu/PythonAioWeb
src/robot/base_spider.py
base_spider.py
py
1,269
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.codes", "line_number": 14, "usage_type": "attribute" }, { "api_name": "requests.exceptions.RequestException", "line_number": 16, "usage_type": "name" }, { "api_name": ...
12650120781
# coding: utf-8 import codecs import sys from django.core.management.base import BaseCommand from django.template.defaultfilters import timesince from twiggy_goodies.django import LogMixin from allmychanges.models import User class Command(LogMixin, BaseCommand): help = u"""Drops user and all his packages.""" ...
AllMyChanges/allmychanges.com
allmychanges/management/commands/get_users_info.py
get_users_info.py
py
1,187
python
en
code
3
github-code
18
[ { "api_name": "twiggy_goodies.django.LogMixin", "line_number": 12, "usage_type": "name" }, { "api_name": "django.core.management.base.BaseCommand", "line_number": 12, "usage_type": "name" }, { "api_name": "codecs.getwriter", "line_number": 16, "usage_type": "call" }, ...
26976218812
""" Created on Fri Nov 4 12:53:02 2022 """ import pandas as pd df = pd.read_csv("Sales.csv") df.shape df.head() df.dtypes # Label encode from sklearn.preprocessing import LabelEncoder LE = LabelEncoder() df['ShelveLoc'] = LE.fit_transform(df['ShelveLoc']) df['Urban'] = LE.fit_transform(df['Urban']...
Niru456/Decision-Tree
DT_2.py
DT_2.py
py
1,378
python
en
code
0
github-code
18
[ { "api_name": "pandas.read_csv", "line_number": 6, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.LabelEncoder", "line_number": 13, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 25, "usage_type": "call" },...
35023216614
#!/usr/bin/env python3 """ Primary module for generating release notes from Jira @author Martin Proffitt <martin.proffitt@hpe.com> @package pyccata.core """ from datetime import datetime from pyccata.core.document import DocumentController class ReleaseNote(object): """ Contains the structure for generating ...
mproffitt/pyccata
src/bin/releasenote.py
releasenote.py
py
1,534
python
en
code
0
github-code
18
[ { "api_name": "pyccata.core.document.DocumentController", "line_number": 28, "usage_type": "call" }, { "api_name": "datetime.datetime.strftime", "line_number": 44, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 44, "usage_type": "name" }, { ...
4003110394
import collections import copy import csv import json import os import re import sys import time import numpy as np from tensorflow.core.framework import summary_pb2 from tensorflow.python.checkpoint import checkpoint_management from tensorflow.python.checkpoint import checkpoint_options as checkpoint_options_lib fro...
tensorflow/tensorflow
tensorflow/python/keras/callbacks.py
callbacks.py
py
108,880
python
en
code
178,918
github-code
18
[ { "api_name": "tensorflow.python.keras.utils.mode_keys.ModeKeys.TRAIN", "line_number": 65, "usage_type": "attribute" }, { "api_name": "tensorflow.python.keras.utils.mode_keys.ModeKeys", "line_number": 65, "usage_type": "name" }, { "api_name": "tensorflow.python.keras.utils.mode_k...
37729975409
import sys import platform from PySide2 import QtCore, QtGui, QtWidgets from PySide2.QtCore import (QCoreApplication, QPropertyAnimation, QDate, QDateTime, QMetaObject, QObject, QPoint, QRect, QSize, QTime, QUrl, Qt, QEvent) from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont, QFontDatabase,...
zahraahhajhsn/automatic-student-counter
AuroraAppCode/mainController.py
mainController.py
py
1,932
python
en
code
0
github-code
18
[ { "api_name": "Main.Ui_MainWindow", "line_number": 18, "usage_type": "call" }, { "api_name": "PyQt5.QtCore.QTimer", "line_number": 21, "usage_type": "call" }, { "api_name": "PyQt5.QtCore", "line_number": 21, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.QTim...
4584664117
from abc import ABC, abstractmethod from typing import Dict, Optional, Tuple import tensorflow as tf import tensorflow_datasets as tfds class Dataset(ABC): """ An abstract base class to encapsulate a dataset. Concrete sub-classes must implement the `train` method, and optionally the `validation` method. ...
jwfromm/zookeeper
zookeeper/tf/dataset.py
dataset.py
py
5,792
python
en
code
null
github-code
18
[ { "api_name": "abc.ABC", "line_number": 8, "usage_type": "name" }, { "api_name": "abc.abstractmethod", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 15, "usage_type": "name" }, { "api_name": "tensorflow.data", "line_nu...
15826545403
from django.urls import path from . import views urlpatterns = [ path('',views.test_prog,name='test_prog'), path('tasklist/',views.TaskList.as_view(),name='tasklist/'), path('taskdetail/<int:question_id>',views.taskdetail,name='taskdetail'), path('taskcreator/',views.TaskCreator.as_view(),name='taskcre...
CPTCIC5/django_restframework_concepts
app1/urls.py
urls.py
py
485
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", ...
42352632645
""" This file implements passing Coap Requests and Responses between server and client. There is a simple state machine which maintains the message states such as ACK, RST. This state machine runs as a separate thread(_fsm_loop). """ import gevent.monkey gevent.monkey.patch_all() import socket import urlparse import...
samueldotj/pycoap
coap/coap.py
coap.py
py
27,490
python
en
code
1
github-code
18
[ { "api_name": "gevent.monkey.monkey.patch_all", "line_number": 8, "usage_type": "call" }, { "api_name": "gevent.monkey.monkey", "line_number": 8, "usage_type": "attribute" }, { "api_name": "gevent.monkey", "line_number": 8, "usage_type": "name" }, { "api_name": "c...
23914845482
import sqlite3 def category_dishwasher(price): max = 1649 return((price*6)/max) def category_electric_stovetop(price): max = 3999 return((price*6)/max) def category_gas_stovetop(price): max = 4049 return((price*6)/max) def category_microwave(price): max = 619 return((price*6)/max) de...
alfman99/Recomm-ai
script/hack.py
hack.py
py
5,785
python
en
code
0
github-code
18
[ { "api_name": "sqlite3.connect", "line_number": 38, "usage_type": "call" } ]
41610685085
import requests import base64 url = 'https://accounts.spotify.com/api/token' client_id = '' client_secret = '' credentials = ('%s:%s' % (client_id, client_secret)) headers = { "Authorization": "Basic " + str(base64.b64encode(credentials.encode())).replace("b'", "").replace("'", ""), 'scope': 'user-modify-pl...
GabrielElkadiki/cuHacking2019
accessToken.py
accessToken.py
py
630
python
en
code
0
github-code
18
[ { "api_name": "base64.b64encode", "line_number": 12, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 23, "usage_type": "call" } ]
20429038662
#!/usr/bin/env python3 import argparse import os from timeit import default_timer as timer import wave from pydub import AudioSegment, effects import json # Arguments parser = argparse.ArgumentParser(description="Running Vosk speaker ID test.") parser.add_argument("-f", "--folder", default="../test-files/", help="""Fo...
fquirin/speech-recognition-experiments
vosk/test_spk.py
test_spk.py
py
4,337
python
en
code
34
github-code
18
[ { "api_name": "argparse.ArgumentParser", "line_number": 10, "usage_type": "call" }, { "api_name": "vosk.SetLogLevel", "line_number": 21, "usage_type": "call" }, { "api_name": "timeit.default_timer", "line_number": 26, "usage_type": "call" }, { "api_name": "vosk.Mo...
7289098732
from cms.models import CMSPlugin from django.template.defaultfilters import slugify from django.utils.translation import ugettext_lazy as _ import djangocms_charts.cache as charts_cache from djangocms_charts.utils import get_unique_list from .consts import LEGEND_POSITIONS from .models_axes import AxisOptionsGroupMo...
mcldev/djangocms-charts
djangocms_charts/models.py
models.py
py
7,352
python
en
code
8
github-code
18
[ { "api_name": "cms.models.CMSPlugin", "line_number": 22, "usage_type": "name" }, { "api_name": "models_datasets.DatasetBase", "line_number": 22, "usage_type": "name" }, { "api_name": "django.utils.translation.ugettext_lazy", "line_number": 33, "usage_type": "call" }, ...
22718314573
from django.http import HttpResponse from django.shortcuts import render def index(request): return render(request, 'index.html') def removepunc(request): djtext = request.POST.get("text", "default") removepunc = request.POST.get("removepunc", 'off') newline = request.POST.get("newline", 'off') c...
Saksham-garg/TextUtils
mysite/views.py
views.py
py
1,400
python
en
code
0
github-code
18
[ { "api_name": "django.shortcuts.render", "line_number": 5, "usage_type": "call" }, { "api_name": "django.http.HttpResponse", "line_number": 39, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 41, "usage_type": "call" } ]
11325634721
import numpy as np import matplotlib.pyplot as plt #from labvaja3.vaja03 import displayImage ## 1. NALOGA (nalaganje 3D slike): def loadImage3D(iPath, iSize, iType): fid = open(iPath, 'rb') im_shape = (iSize[1], iSize[0], iSize[2]) oImage = np.ndarray(shape=im_shape, dtype=iType, buffer=fid...
leskovecg/ImageAndVideoProcessing
labvaja4/NOVO.py
NOVO.py
py
6,038
python
en
code
0
github-code
18
[ { "api_name": "numpy.ndarray", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 21, "usage_type": "attribute" }, { "api_name": "numpy.arange", "line_number": 38, "usage_type": "call" }, { "api_name": "numpy.arange", "line_...
21790665551
"""This is the Day 17 project for my 100 days 100 projects course by Angela Yu THe missing day 16 is done inside the day 15 folder. """ import random import html import requests class QuizzGame: """This is the Main Class for the Quizz Game.""" def __init__(self): self.api_url = "https://opent...
Evelin964/100_days_of_code
17.Day_17/day_17.py
day_17.py
py
6,356
python
en
code
0
github-code
18
[ { "api_name": "requests.get", "line_number": 26, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 77, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 94, "usage_type": "call" }, { "api_name": "html.unescape", "line_num...
29894094015
from django.conf import settings as django_settings from a3 import models SITE_NAME = 'Sample Website' SITE_URL = 'http://a3.com/' SITE_IMAGE = 'a3.png' SITE_STATIC_URL = '//localhost:{}/'.format(django_settings.DEBUG_PORT) if django_settings.DEBUG else '//i.a3.com/' GAME_NAME = 'Sample Game' DISQUS_SHORTNAME = 'a3' A...
MagiCircles/A3Theater
a3/settings.py
settings.py
py
368
python
en
code
0
github-code
18
[ { "api_name": "django.conf.settings.DEBUG", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 7, "usage_type": "name" }, { "api_name": "django.conf.settings.DEBUG_PORT", "line_number": 7, "usage_type": "attribute" }, {...
72432239719
from __future__ import annotations import inspect import numpy as np from manimlib.animation.animation import Animation from manimlib.constants import DEGREES from manimlib.constants import OUT from manimlib.mobject.mobject import Group from manimlib.mobject.mobject import Mobject from manimlib.utils.paths import pa...
slowisfast2030/3b1b_anaconda_install
manimlib/animation/transform.py
transform.py
py
14,838
python
en
code
0
github-code
18
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 17, "usage_type": "name" }, { "api_name": "manimlib.animation.animation.Animation", "line_number": 24, "usage_type": "name" }, { "api_name": "manimlib.mobject.mobject.Mobject", "line_number": 29, "usage_type": "name" ...
71840550121
from common import data scores = {"X": 1, "Y": 2, "Z": 3} beats = {"A": "Y", "B": "Z", "C": "X"} ties = {"A": "X", "B": "Y", "C": "Z"} loses = {"A": "Z", "B": "X", "C": "Y"} parts = data(2, sep="\n") rounds = [part.split(" ") for part in parts] score = 0 for round in rounds: theirs = round[0] ours = round[1...
awbraunstein/aoc
2022/days/2.py
2.py
py
766
python
en
code
0
github-code
18
[ { "api_name": "common.data", "line_number": 9, "usage_type": "call" } ]
22815453237
import datetime import time from unittest.mock import patch import arrow import pytest from blue_krill.async_utils.poll_task import CallbackResult, CallbackStatus, PollingMetadata, PollingStatus from paas_wl.cnative.specs.constants import DeployStatus, MResConditionType, MResPhaseType from paas_wl.cnative.specs.resou...
leafage-collb/bk-paas
workloads/paas_wl/tests/cnative/specs/test_tasks.py
test_tasks.py
py
3,476
python
en
code
null
github-code
18
[ { "api_name": "pytest.mark", "line_number": 17, "usage_type": "attribute" }, { "api_name": "unittest.mock.patch", "line_number": 23, "usage_type": "call" }, { "api_name": "tests.utils.mocks.platform.FakePlatformSvcClient", "line_number": 23, "usage_type": "call" }, { ...
26588261624
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 9/26/2017 10:54 AM # @Author : Ruiming_Ma # @Site : # @File : ShiftPlan.py # @Software: PyCharm Community Edition from selenium import webdriver from pyquery import PyQuery as pq from urllib.parse import urlencode import time import os i...
answerMA/Shift_Plan
ShiftPlan.py
ShiftPlan.py
py
5,713
python
en
code
0
github-code
18
[ { "api_name": "logging.basicConfig", "line_number": 18, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 18, "usage_type": "attribute" }, { "api_name": "urllib.parse.urlencode", "line_number": 32, "usage_type": "call" }, { "api_name": "seleniu...
12749454504
from collections import defaultdict import utils def is_nondecreasing(num): digits = [c for c in str(num)] for i in range(1, len(digits)): prev = digits[i - 1] curr = digits[i] if prev > curr: return False return True def get_digit_adjacencies(num): adjacencie...
alexander-yu/adventofcode
problems_2019/4.py
4.py
py
1,070
python
en
code
1
github-code
18
[ { "api_name": "collections.defaultdict", "line_number": 20, "usage_type": "call" }, { "api_name": "utils.get_input", "line_number": 37, "usage_type": "call" }, { "api_name": "utils.part", "line_number": 35, "usage_type": "attribute" }, { "api_name": "utils.get_inp...
22431926408
from django.core.urlresolvers import reverse from django.contrib.sitemaps import Sitemap from django.db import connection from arches.app.search.search_engine_factory import SearchEngineFactory import arches.app.models.models as archesmodels class MySiteSitemap(Sitemap): def items(self): se = SearchEngine...
bojankastelic/zbiva
zbiva/sitemap.py
sitemap.py
py
1,244
python
en
code
1
github-code
18
[ { "api_name": "django.contrib.sitemaps.Sitemap", "line_number": 7, "usage_type": "name" }, { "api_name": "arches.app.search.search_engine_factory.SearchEngineFactory", "line_number": 10, "usage_type": "call" }, { "api_name": "django.db.connection.cursor", "line_number": 12, ...
32523811184
from django.db import models from django.db.models import Sum, Case, When, F from django.contrib.auth.models import User class Accomplishment(models.Model): class Meta: ordering = ("-id", ) name = models.CharField(max_length=200, null=True, blank=False, verbose_name="Bezeichnung") full_score = mo...
memobijou/clinic-app
accomplishment/models.py
models.py
py
3,593
python
en
code
0
github-code
18
[ { "api_name": "django.db.models.Model", "line_number": 6, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 6, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 10, "usage_type": "call" }, { "api_name": ...
41994432413
import urllib3 import pymorphy2 import datetime import re import json from urllib3.util.retry import Retry from bs4 import BeautifulSoup from collections import Counter from config import MONTHS urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) retry = Retry(connect=1000, backoff_factor=2) http = ur...
iManOfSteel/news_parser
parser.py
parser.py
py
3,848
python
en
code
0
github-code
18
[ { "api_name": "urllib3.disable_warnings", "line_number": 11, "usage_type": "call" }, { "api_name": "urllib3.exceptions", "line_number": 11, "usage_type": "attribute" }, { "api_name": "urllib3.util.retry.Retry", "line_number": 13, "usage_type": "call" }, { "api_nam...
15504342685
import time import datetime from keywords.utils import log_info class Time: def get_unix_timestamp(self, delta=0): """ Returns the unix timestamp since epoch (https://en.wikipedia.org/wiki/Unix_time) If a delta is provided, it will return the timestamp +/- the delta (s) ex. delta...
couchbaselabs/mobile-testkit
keywords/timeutils.py
timeutils.py
py
1,668
python
en
code
14
github-code
18
[ { "api_name": "time.time", "line_number": 17, "usage_type": "call" }, { "api_name": "keywords.utils.log_info", "line_number": 18, "usage_type": "call" }, { "api_name": "keywords.utils.log_info", "line_number": 20, "usage_type": "call" }, { "api_name": "datetime.da...
11660477773
import pygame, sys, random, math from pygame.color import THECOLORS def drawrect(screen): for i in range(150): left = random.randint(0, 1024) top = random.randint(0, 800) width = random.randint(0, 1024) height = random.randint(0, 800) line = random.randint(0, 2) col...
hanyahui88/python
study2/pygame_test.py
pygame_test.py
py
3,748
python
en
code
0
github-code
18
[ { "api_name": "random.randint", "line_number": 7, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 8, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 9, "usage_type": "call" }, { "api_name": "random.randint", "line_...
41343613809
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup # Help messages Messages = { "dl": """ **Here is The Help Of Mega.nz Downloader Module** ✘ Send me a Mega.nz file/folder link. (Use `/megapy` command for old `mega.py` download engine) ✘ Wait Till It Download and Upload to Telegram. **...
Itz-fork/Mega.nz-Bot
megadl/data.py
data.py
py
4,923
python
en
code
284
github-code
18
[ { "api_name": "pyrogram.types.InlineKeyboardButton", "line_number": 73, "usage_type": "call" }, { "api_name": "pyrogram.types.InlineKeyboardButton", "line_number": 74, "usage_type": "call" }, { "api_name": "pyrogram.types.InlineKeyboardButton", "line_number": 76, "usage_t...
26707189222
import tensorflow as tf import numpy as np import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import copy from morphodynamics.landscapes.utils import get_meshgrid from morphodynamics.landscapes.analysis.get_fields import * from morphodynamics.landscapes.analy...
hcbiophys/morphodynamics
morphodynamics/landscapes/analysis/save_ims.py
save_ims.py
py
4,309
python
en
code
3
github-code
18
[ { "api_name": "matplotlib.use", "line_number": 4, "usage_type": "call" }, { "api_name": "morphodynamics.landscapes.utils.get_meshgrid", "line_number": 29, "usage_type": "call" }, { "api_name": "tensorflow.convert_to_tensor", "line_number": 30, "usage_type": "call" }, ...
6983331904
import boto3 s3 = boto3.client('s3') #s3.create_bucket(Bucket = "fade-test-bot03", CreateBucketConfiguration = {'LocationConstraint':'us-east-2'}) response = s3.list_buckets() buckets = response["Buckets"] for bucket in buckets: print(bucket["Name"])
oluwato1123/boto3-python-scripts
s3/list-s3.py
list-s3.py
py
259
python
en
code
0
github-code
18
[ { "api_name": "boto3.client", "line_number": 3, "usage_type": "call" } ]
41847001415
from uuid import UUID, uuid4 import pytest from boe.lib.domains.bank_domain import ( BankAccountEntity, BankTransactionMethodEnum, BankTransactionEntity, BankDomainWriteModel, BankDomainAggregate, BankDomainFactory, BankDomainRepository, BankTransactionValueObject, BankAccountStateE...
byt3-m3/bank_of_excellence
tests/lib/domains/test_bank_domain.py
test_bank_domain.py
py
5,872
python
en
code
0
github-code
18
[ { "api_name": "boe.lib.domains.bank_domain.BankDomainWriteModel", "line_number": 20, "usage_type": "call" }, { "api_name": "pytest.fixture", "line_number": 18, "usage_type": "name" }, { "api_name": "boe.lib.domains.bank_domain.BankDomainRepository", "line_number": 25, "us...
20300806365
import pendulum from pendulum.date import Date from pendulum.time import Time from pendulum.datetime import DateTime from gooker import base class TeeItUpCourse(base.Course): slug: str class TeeItUpBaseClient(base.TeeTimeClient): courses: list[TeeItUpCourse] base_url = "https://phx-api-be-east-1b.kenna...
claytonwgreen/gooker
gooker/clients/teeitup.py
teeitup.py
py
2,837
python
en
code
0
github-code
18
[ { "api_name": "gooker.base.Course", "line_number": 9, "usage_type": "attribute" }, { "api_name": "gooker.base", "line_number": 9, "usage_type": "name" }, { "api_name": "gooker.base.TeeTimeClient", "line_number": 13, "usage_type": "attribute" }, { "api_name": "gook...
27028574275
import requests import os from os.path import basename import json import sys import tempfile from google.cloud import storage PER_PAGE = 100 GS_BUCKET_NAME = os.environ["GS_BUCKET_NAME"] TOKEN = os.environ["GIT_TOKEN"] headers = {"Authorization": "token {}".format(TOKEN), "Accept": "application/vnd.github...
kush20/github-serverless
ch01_ch02/main.py
main.py
py
6,127
python
en
code
0
github-code
18
[ { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "google.cloud.storage.Client", "line_number": 33, "usage_type": "call" }, { "api_name": "google.cl...
16014132561
from PyQt5.QtCore import QSize, Qt from PyQt5.QtGui import QPalette from PyQt5.QtSvg import QSvgWidget from PyQt5.QtWidgets import ( QHBoxLayout, QLabel, QLayout, QListWidget, QListWidgetItem, QWidget, ) from gridplayer.params.languages import Language from gridplayer.widgets.video_status impor...
vzhd1701/gridplayer
gridplayer/widgets/language_list.py
language_list.py
py
4,144
python
en
code
858
github-code
18
[ { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 17, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.QSize", "line_number": 18, "usage_type": "call" }, { "api_name": "gridplayer.widgets.video_status.StatusIcon", "line_number": 28, "usage_type": "call" }, { ...
73420403240
from django.shortcuts import render, redirect from .forms import ExperienceForm from .models import Experience # Create your views here. def experiences(request): experiences= Experience.objects.all() context_data = { 'experiences' : experiences } return render(request, "experiences/experien...
AdrianAdame/Portfolio-v2
experiences/views.py
views.py
py
776
python
en
code
0
github-code
18
[ { "api_name": "models.Experience.objects.all", "line_number": 8, "usage_type": "call" }, { "api_name": "models.Experience.objects", "line_number": 8, "usage_type": "attribute" }, { "api_name": "models.Experience", "line_number": 8, "usage_type": "name" }, { "api_n...
28588018383
import numpy as np from tensorflow.keras.models import load_model from import_test_cartoon_gray import data import matplotlib.pyplot as plt model = load_model(r"E:\model_face\model_face.h5") model.summary() IMG_SIZE = 64 n_channels = 1 X = np.array([i[0] for i in data]).reshape(-1, IMG_SIZE, IMG_SIZE, n_channels) Y = ...
teastoilkovska/AMLS_20-21_SN17089990
B1/B1_test.py
B1_test.py
py
1,416
python
en
code
0
github-code
18
[ { "api_name": "tensorflow.keras.models.load_model", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 10, "usage_type": "call" }, { "api_name": "import_test_cartoon_gray.data", "line_number": 10, "usage_type": "name" }, { "api_n...
23548085592
import datetime import json from pathlib import Path import base64 from cryptography.fernet import Fernet import hashlib def store_assignments(directory, assignments, key=None): now = datetime.datetime.now() history_dir = Path(directory, "history") if not history_dir.exists(): history_dir.mkdir(p...
pattonw/secret-santa
ss/store.py
store.py
py
2,384
python
en
code
0
github-code
18
[ { "api_name": "datetime.datetime.now", "line_number": 11, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 11, "usage_type": "attribute" }, { "api_name": "pathlib.Path", "line_number": 12, "usage_type": "call" }, { "api_name": "json.dumps"...
23407853107
from azure.storage.blob import BlobServiceClient import urllib.parse connection_string = "https://teststockagefastapi.blob.core.windows.net/borderaucontainer" connection_string = "DefaultEndpointsProtocol=https;AccountName=teststockagefastapi;AccountKey=P4hCscg4j1a+B6aIlKMKJM0eBBVz1PsESRVPl8Lt7QyqD08ICDO8AnDGShrqWdC3...
polarysbron/fastapi_azure_func
acces_blob.py
acces_blob.py
py
1,180
python
en
code
0
github-code
18
[ { "api_name": "azure.storage.blob.BlobServiceClient.from_connection_string", "line_number": 9, "usage_type": "call" }, { "api_name": "azure.storage.blob.BlobServiceClient", "line_number": 9, "usage_type": "name" } ]
4819813152
""" 581. Shortest Unsorted Continuous Subarray Given an integer array nums, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order. Return the shortest such subarray and output its length. Example1: Input: nums = [2,6,4,8...
tkwang0530/LeetCode
0581.py
0581.py
py
3,000
python
en
code
4
github-code
18
[ { "api_name": "typing.List", "line_number": 41, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 61, "usage_type": "name" }, { "api_name": "unittest.TestCase", "line_number": 82, "usage_type": "attribute" }, { "api_name": "unittest.main", "l...
16697769084
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 11/9/21 6:39 PM # @Author : Jiyuan Wang # @File : minist.py import numpy as np import matplotlib.pyplot as plt from tensorflow import keras from keras.models import Sequential from keras.datasets import mnist from keras.layers import Dense from keras.utils...
fabriceyhc/pyfuzz
src/examples/mnist/mnist.py
mnist.py
py
2,709
python
en
code
1
github-code
18
[ { "api_name": "keras.models.Sequential", "line_number": 19, "usage_type": "call" }, { "api_name": "keras.layers.Dense", "line_number": 20, "usage_type": "call" }, { "api_name": "keras.layers.Dense", "line_number": 22, "usage_type": "call" }, { "api_name": "keras.l...
23694704039
from flask import Flask, request, jsonify from torchvision import models, transforms import torch from image_encoder.image_encoder import decode import pika import mysql.connector def get_image(uuid): config = { 'user': 'root', 'password': 'root', 'host': 'db', 'por...
jagath-jaikumar/DockerExample
MLSample/object_detection.py
object_detection.py
py
2,129
python
en
code
0
github-code
18
[ { "api_name": "mysql.connector.connector.connect", "line_number": 17, "usage_type": "call" }, { "api_name": "mysql.connector.connector", "line_number": 17, "usage_type": "attribute" }, { "api_name": "mysql.connector", "line_number": 17, "usage_type": "name" }, { "...
17760149612
import folium from django.utils.timezone import localtime from django.shortcuts import render, get_object_or_404 from .models import Pokemon, PokemonEntity MOSCOW_CENTER = [55.751244, 37.618423] DEFAULT_IMAGE_URL = ( 'https://vignette.wikia.nocookie.net/pokemon/images/6/6e/%21.png/revision' '/latest/fixed-asp...
Maxim-Pekov/pokemon_map
pokemon_entities/views.py
views.py
py
2,691
python
en
code
null
github-code
18
[ { "api_name": "folium.features.CustomIcon", "line_number": 16, "usage_type": "call" }, { "api_name": "folium.features", "line_number": 16, "usage_type": "attribute" }, { "api_name": "folium.Marker", "line_number": 20, "usage_type": "call" }, { "api_name": "django....
28611139028
from django.core.validators import validate_email from ipware.ip import get_ip from django.contrib.staticfiles.templatetags.staticfiles import static import numpy as np import random import string import requests from geopy.distance import vincenty from main import settings from builtins import range, len, dict, ord, E...
Kelvin-Chu/mechpages
main/mechpages/util.py
util.py
py
13,562
python
en
code
0
github-code
18
[ { "api_name": "string.digits", "line_number": 19, "usage_type": "attribute" }, { "api_name": "builtins.dict", "line_number": 20, "usage_type": "call" }, { "api_name": "builtins.ord", "line_number": 20, "usage_type": "call" }, { "api_name": "builtins.len", "lin...
22617668224
""" This file defines the PILQR-based algorithm. """ import copy import logging import numpy as np from gps.algorithm.algorithm import Algorithm from gps.algorithm.config import ALG_PILQR from gps.algorithm.traj_opt.traj_opt_utils import approximated_cost LOGGER = logging.getLogger(__name__) class AlgorithmTrajOp...
cbfinn/gps
python/gps/algorithm/algorithm_traj_opt_pilqr.py
algorithm_traj_opt_pilqr.py
py
6,340
python
en
code
588
github-code
18
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "gps.algorithm.algorithm.Algorithm", "line_number": 15, "usage_type": "name" }, { "api_name": "copy.deepcopy", "line_number": 17, "usage_type": "call" }, { "api_name": "gps...
26564245310
# Run a term query against UberEats # External dependencies: # yab https://code.uberinternal.com/w/rpc/yab # jq https://stedolan.github.io/jq/ import os, sys, getopt, tempfile, time import datetime helpstr = 'eatsQuery.py --lat=37.77493 --long=-122.41942 --cityID=1 --starttime=1582722000 --endtime=158272920...
dupratAtousa/Eats-Query-Debugging
eatsQuery.py
eatsQuery.py
py
3,339
python
en
code
0
github-code
18
[ { "api_name": "getopt.getopt", "line_number": 23, "usage_type": "call" }, { "api_name": "getopt.GetoptError", "line_number": 24, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 27, "usage_type": "call" }, { "api_name": "sys.exit", "line_n...
15922871542
from django.urls import path, include from .views import HomeView, SignUpView, DashboardView, LoginView, admin_dashboard, upload_xml, JobListView, JobDetailView, JobListXMLView from django.contrib.auth.views import LogoutView from django.conf import settings from django.conf.urls.static import static app_name = 'Use...
mikenahabedian3/python_jobasoar_1
UserApp/urls.py
urls.py
py
1,150
python
en
code
0
github-code
18
[ { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "views.HomeView.as_view", "line_number": 10, "usage_type": "call" }, { "api_name": "views.HomeView", "line_number": 10, "usage_type": "name" }, { "api_name": "django.urls.pa...
40030600603
import json import time import httpx import random import asyncio import httpcore # 动态基类 class Dynamic(object): code: int message: str timestamp: int dynamic_id_str: str dynamic_type: int dynamic_desc: dict dynamic_card: dict def __init__(self, code, message, dynamic_desc, dynamic_car...
paoka1/Ali-Bot
src/plugins/BiliPush/bili_dynamic_api.py
bili_dynamic_api.py
py
15,855
python
en
code
6
github-code
18
[ { "api_name": "time.localtime", "line_number": 44, "usage_type": "call" }, { "api_name": "time.strftime", "line_number": 45, "usage_type": "call" }, { "api_name": "time.localtime", "line_number": 257, "usage_type": "call" }, { "api_name": "time.strftime", "lin...
74088284839
import os,logging,json from common import opmysql from public import config operation_db = opmysql.OperationDbInterface() #封装接口返回值校验 class CompareParam(object): def __init__(self, interface_params): self.interface_params = interface_params self.id_case = interface_params['id'] self.result_l...
lily0000001/autotest_interface01
common/test.py
test.py
py
3,595
python
en
code
0
github-code
18
[ { "api_name": "common.opmysql.OperationDbInterface", "line_number": 4, "usage_type": "call" }, { "api_name": "common.opmysql", "line_number": 4, "usage_type": "name" }, { "api_name": "json.loads", "line_number": 18, "usage_type": "call" }, { "api_name": "logging.b...
33930175562
import abc from collections import defaultdict from functools import cached_property from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional from xmlrpc.client import Boolean from zipfile import ZipFile from django.core.files.storage import Storage from django.db.models import Q, QuerySet from django.db....
junaid33/baserow
backend/src/baserow/core/registries.py
registries.py
py
33,796
python
en
code
1
github-code
18
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 44, "usage_type": "name" }, { "api_name": "registry.APIUrlsInstanceMixin", "line_number": 50, "usage_type": "name" }, { "api_name": "registry.Instance", "line_number": 50, "usage_type": "name" }, { "api_name": "...
14855156746
from django.conf import settings from django.contrib.admin.widgets import AdminTextareaWidget from django.core.exceptions import ImproperlyConfigured, ValidationError from django.db import models from django.forms import MultipleChoiceField from django.utils.text import capfirst from django.utils.translation import get...
stephenmcd/mezzanine
mezzanine/core/fields.py
fields.py
py
4,096
python
en
code
4,663
github-code
18
[ { "api_name": "django.db.models.IntegerField", "line_number": 14, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 14, "usage_type": "name" }, { "api_name": "mezzanine.core.forms.OrderWidget", "line_number": 16, "usage_type": "name" }, { ...
1983522957
#%% import tensorflow as tf import tensorflow_probability as tfp tfd = tfp.distributions import matplotlib.pyplot as plt import numpy as np print("TF version:", tf.__version__) print("TFP version:", tfp.__version__) # %% normal_diag = tfd.MultivariateNormalDiag(loc = [0,5], scale_diag=[10,15]) normal_diag # %% normal...
Patchino76/XGB_SST_Tests
tfp_multivar.py
tfp_multivar.py
py
1,047
python
en
code
0
github-code
18
[ { "api_name": "tensorflow_probability.distributions", "line_number": 4, "usage_type": "attribute" }, { "api_name": "tensorflow.__version__", "line_number": 9, "usage_type": "attribute" }, { "api_name": "tensorflow_probability.__version__", "line_number": 10, "usage_type":...
4086392722
import os.path import pandas as pd import open3d as o3d import numpy as np import pybullet as p import xml.dom.minidom as xmldom import pymeshlab def parse_xml(fn): rpy = {} xyz = {} xml_file = xmldom.parse(fn) rootNode = xml_file.documentElement print(rootNode.nodeName) links = rootNode.getEle...
susu1210/3d_object_reconstruction
evaluate_recon.py
evaluate_recon.py
py
9,058
python
en
code
1
github-code
18
[ { "api_name": "xml.dom.minidom.parse", "line_number": 12, "usage_type": "call" }, { "api_name": "xml.dom.minidom", "line_number": 12, "usage_type": "name" }, { "api_name": "numpy.asarray", "line_number": 23, "usage_type": "call" }, { "api_name": "pybullet.getMatri...
12015434201
#!/usr/bin/env python import scipy.stats import numpy as np import astropy.io.fits as fits import emcee import matplotlib.pyplot as p from matplotlib import rc from astropy.table import Table, Column rc('text',usetex=True) execfile('logprob.py') s = fits.getdata('colira_subset.fits') hdr = fits.getheader('colira_sub...
low-sky/colira
bayes/hold/bayes_ratio_validation2d.py
bayes_ratio_validation2d.py
py
3,475
python
en
code
0
github-code
18
[ { "api_name": "matplotlib.rc", "line_number": 10, "usage_type": "call" }, { "api_name": "astropy.io.fits.getdata", "line_number": 14, "usage_type": "call" }, { "api_name": "astropy.io.fits", "line_number": 14, "usage_type": "name" }, { "api_name": "astropy.io.fits...
32049870843
import re from datetime import date from dateutil.relativedelta import relativedelta from odoo import api, fields, models from odoo.exceptions import ValidationError class ProfesorRecord(models.Model): _name = "profesor.record" _rec_name = "profesor_id" _description = "profesor" profesor_id = fi...
kinjal-lalani16/school_management_system
school_management/models/profesor_record.py
profesor_record.py
py
4,285
python
en
code
0
github-code
18
[ { "api_name": "odoo.models.Model", "line_number": 12, "usage_type": "attribute" }, { "api_name": "odoo.models", "line_number": 12, "usage_type": "name" }, { "api_name": "odoo.fields.Many2one", "line_number": 18, "usage_type": "call" }, { "api_name": "odoo.fields",...
29995073919
import re import string import numpy as np from nltk import pos_tag from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer from textblob.wordnet import NOUN, VERB, ADJ, ADV _WORD_PAT = r"\w[\w']{3,}" _SENT_PAT = r"(?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|\?)\s" _NW_LINE = r"\\n+" _WHITE_SPACE = r"\\t|\\r...
Stringsaeed/NLP-Library
Normalization.py
Normalization.py
py
3,287
python
en
code
0
github-code
18
[ { "api_name": "nltk.corpus.stopwords.words", "line_number": 38, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords", "line_number": 38, "usage_type": "name" }, { "api_name": "string.punctuation", "line_number": 39, "usage_type": "attribute" }, { "api_nam...