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
29007039516
from django.urls import path from . import views from django.shortcuts import render, redirect urlpatterns = [ path("", views.index ,name="index"), path("index.html", views.index ,name="index"), path("robots.txt", views.robots ,name="robots"), path("ads.txt", (lambda request: render(request, "ads.txt")...
minegishirei/flamevalue
trashbox/django3/app/short_tips/urls.py
urls.py
py
622
python
en
code
0
github-code
1
[ { "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", ...
2180140168
"""TCP hole punching and peer communication.""" import socket import threading from typing import Callable class Error(Exception): pass class Tunnel: """High-level packet transmission.""" class Listener: """Automatic tunnel creation on port.""" def __init__(self, port: int, backlog: int = None):...
TheDocTrier/pyble
pyble/server/tunnel.py
tunnel.py
py
1,468
python
en
code
0
github-code
1
[ { "api_name": "socket.socket", "line_number": 20, "usage_type": "call" }, { "api_name": "threading.RLock", "line_number": 24, "usage_type": "call" }, { "api_name": "typing.Callable", "line_number": 34, "usage_type": "name" }, { "api_name": "threading.Thread", ...
11178768615
import pandas import matplotlib.pyplot as plt import numpy as np import pandas as pd from sklearn.tree import DecisionTreeClassifier data = pandas.read_csv("database.csv") crop = pandas.read_csv("crop.csv") city = data['city'].to_list() max_temp = list(map(int, data['max temperature'].to_list())) min_temp = li...
dr1810/Agrolect
main.py
main.py
py
2,546
python
en
code
1
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 6, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 33, "usage_type": "call" }, { "api_name": "sklearn.tree.DecisionT...
72720227234
import requests as req # api url url = "https://animechan.vercel.app/api" def res_to_str(data): character = data["character"] anime = data["anime"] quote = data["quote"] res_string = f"\nQuote by: {character}\nFrom: {anime}\nQuote: {quote}\n" return res_string def get_data(full_url): print("G...
imtiaz0307/Python
random_anime_quote_generator.py
random_anime_quote_generator.py
py
1,363
python
en
code
1
github-code
1
[ { "api_name": "requests.get", "line_number": 15, "usage_type": "call" } ]
17074239864
from django.db import models import uuid class CategoriesOfProducts(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(max_length=64) seq = models.IntegerField(blank=True, unique=True) class Meta: verbose_name = 'CategoryOfProducts' verbose_name_plural = 'C...
masian4eg/livest_test
stock_app/models.py
models.py
py
1,347
python
en
code
0
github-code
1
[ { "api_name": "django.db.models.Model", "line_number": 5, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 5, "usage_type": "name" }, { "api_name": "django.db.models.AutoField", "line_number": 6, "usage_type": "call" }, { "api_name": "...
28176082453
import io import sys import json from smoke.io.wrap import demo as io_wrp_dm from smoke.replay import demo as rply_dm from smoke.replay.const import Data class Chat(object): def __init__(self, player, message): self.player = player self.message = message class Player(object): def __init__(sel...
qiemem/dotalang
messages.py
messages.py
py
1,914
python
en
code
0
github-code
1
[ { "api_name": "io.open", "line_number": 29, "usage_type": "call" }, { "api_name": "smoke.io.wrap.demo.Wrap", "line_number": 30, "usage_type": "call" }, { "api_name": "smoke.io.wrap.demo", "line_number": 30, "usage_type": "name" }, { "api_name": "smoke.replay.const...
40296920999
from django.core.mail import send_mail from fitness.celery import app from fitness.settings import EMAIL_HOST_USER from django.utils.translation import gettext_lazy as _ @app.task def send_code_to_email(code_user, email_user): """ Отправка письма с кодом подтверждения """ mail_sent = send_mail( ...
SimonaSoloduha/fitness
authentication/tasks.py
tasks.py
py
605
python
ru
code
0
github-code
1
[ { "api_name": "django.core.mail.send_mail", "line_number": 13, "usage_type": "call" }, { "api_name": "fitness.settings.EMAIL_HOST_USER", "line_number": 16, "usage_type": "argument" }, { "api_name": "django.utils.translation.gettext_lazy", "line_number": 14, "usage_type": ...
4340651422
from datetime import datetime from PySide2.QtCore import Qt, QAbstractItemModel, QModelIndex from PySide2.QtGui import QBrush from jal.constants import BookAccount, PredefinedAsset, CustomColor from jal.widgets.helpers import g_tr from jal.db.helpers import executeSQL from jal.widgets.delegates import GridLinesDelegate...
iliakan/jal
jal/reports/income_spending_report.py
income_spending_report.py
py
11,723
python
en
code
null
github-code
1
[ { "api_name": "datetime.datetime.utcfromtimestamp", "line_number": 16, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 16, "usage_type": "name" }, { "api_name": "datetime.datetime.utcfromtimestamp", "line_number": 17, "usage_type": "call" }, ...
19752680843
import json import os from datetime import datetime from flask import Flask from flask import request from flask import Response from tornado.wsgi import WSGIContainer from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from kaner.context import GlobalContext as gctx from kaner.adapter.tokeniz...
knowledgeresearch/kaner
kaner/service.py
service.py
py
5,904
python
en
code
4
github-code
1
[ { "api_name": "kaner.context.GlobalContext.init", "line_number": 19, "usage_type": "call" }, { "api_name": "kaner.context.GlobalContext", "line_number": 19, "usage_type": "name" }, { "api_name": "flask.Flask", "line_number": 20, "usage_type": "call" }, { "api_name...
13457456760
from spacy.lang.en import English import numpy as np import srsly from flask import Flask, render_template patterns = srsly.read_jsonl("Backend/skill_patterns.jsonl") nlp = English() ruler = nlp.add_pipe("entity_ruler") ruler.add_patterns(patterns) def extract_keywords(txt): doc = nlp(txt) keywords = lis...
MAlshaik/Joblify
Backend/analyzer.py
analyzer.py
py
1,008
python
en
code
0
github-code
1
[ { "api_name": "srsly.read_jsonl", "line_number": 8, "usage_type": "call" }, { "api_name": "spacy.lang.en.English", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.array", "...
11510348772
# Released under the MIT License. See LICENSE for details. # """Various functionality related to achievements.""" from __future__ import annotations import logging from typing import TYPE_CHECKING import babase import bascenev1 import bauiv1 if TYPE_CHECKING: from typing import Any, Sequence import baclassi...
efroemling/ballistica
src/assets/ba_data/python/baclassic/_achievement.py
_achievement.py
py
50,903
python
en
code
468
github-code
1
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 13, "usage_type": "name" }, { "api_name": "baclassic.Achievement", "line_number": 79, "usage_type": "attribute" }, { "api_name": "bascenev1.BaseTimer", "line_number": 81, "usage_type": "attribute" }, { "api_name...
28275954002
from __future__ import absolute_import from __future__ import division from __future__ import print_function import gzip import os import shutil import tempfile import numpy from six.moves import urllib import tensorflow as tf # CVDF mirror of http://yann.lecun.com/exdb/mnist/ SOURCE_URL = 'http://yann.lecun.com/exd...
Pensarfeo/MNISTFullyConnectedTensorflowExample
dataset.py
dataset.py
py
3,185
python
en
code
1
github-code
1
[ { "api_name": "tensorflow.gfile.Exists", "line_number": 24, "usage_type": "call" }, { "api_name": "tensorflow.gfile", "line_number": 24, "usage_type": "attribute" }, { "api_name": "tensorflow.gfile.MakeDirs", "line_number": 25, "usage_type": "call" }, { "api_name"...
20897754659
from PyQt4 import QtCore, QtGui import xml.etree.cElementTree as ET from log_manager import logger import csv SYNC_CONFIG_FILE = "storj_sync_config.xml" SYNC_DIRECTORIES_FILE = "storj_sync_dirs.csv" # Configuration backend section class SyncConfiguration(): def __init__(self, load_config=False): if loa...
lakewik/EasyStorj
UI/utilities/sync_config.py
sync_config.py
py
5,871
python
en
code
74
github-code
1
[ { "api_name": "xml.etree.cElementTree.parse", "line_number": 20, "usage_type": "call" }, { "api_name": "xml.etree.cElementTree", "line_number": 20, "usage_type": "name" }, { "api_name": "log_manager.logger.error", "line_number": 22, "usage_type": "call" }, { "api_...
10289153237
from paprika.core.base_signal import Signal from paprika.data.fetcher import DataType from paprika.data.feed_subscriber import FeedSubscriber from paprika.signals.signal_data import SignalData from paprika.data.data_channel import DataChannel from paprika.alpha.base import Alpha from paprika.data.data_processor import ...
hraoyama/radish
paprika/signals/signals/alpha_unit.py
alpha_unit.py
py
2,770
python
en
code
1
github-code
1
[ { "api_name": "paprika.data.feed_subscriber.FeedSubscriber", "line_number": 18, "usage_type": "name" }, { "api_name": "paprika.core.base_signal.Signal", "line_number": 18, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 24, "usage_type": "call" ...
44293486284
import pygame import os pygame.font.init() WIDTH, HEIGHT = 1100, 800 WIN = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption("Cowboy shooter") class Draw_Controller: def __init__(self, covers, P1, P2, Bullet_Controller): self._DESERT = pygame.transform.scale(pygame.image.load(os.path.j...
Ivailo2707/Pygame_Project_Cowboy
Draw_Controller.py
Draw_Controller.py
py
1,641
python
en
code
1
github-code
1
[ { "api_name": "pygame.font.init", "line_number": 4, "usage_type": "call" }, { "api_name": "pygame.font", "line_number": 4, "usage_type": "attribute" }, { "api_name": "pygame.display.set_mode", "line_number": 7, "usage_type": "call" }, { "api_name": "pygame.display...
36780999631
import numpy as np from isoexp.linear.linearbandit import EfficientLinearBandit, LinearBandit, LinPHE from isoexp.conservative.linearmabs import EfficientConservativeLinearBandit, SafetySetCLUCB from isoexp.linear.linearmab_models import RandomLinearArms, DiffLinearArms, OtherArms, CircleBaseline, LinPHEModel from matp...
facebookresearch/ContextualBanditsAttacks
examples/main_linearmab.py
main_linearmab.py
py
8,137
python
en
code
4
github-code
1
[ { "api_name": "matplotlib.rc", "line_number": 10, "usage_type": "call" }, { "api_name": "collections.namedtuple", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.random.randint", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.rando...
22942092792
import logging import os from typing import Dict from monai.transforms import Invertd, SaveImaged import monailabel from monailabel.interfaces.app import MONAILabelApp from monailabel.interfaces.tasks.infer_v2 import InferTask from monailabel.interfaces.tasks.scoring import ScoringMethod from monailabel.interfaces.ta...
Project-MONAI/MONAILabel
sample-apps/monaibundle/main.py
main.py
py
7,247
python
en
code
472
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 20, "usage_type": "call" }, { "api_name": "monailabel.interfaces.app.MONAILabelApp", "line_number": 23, "usage_type": "name" }, { "api_name": "monailabel.utils.others.generic.get_bundle_models", "line_number": 25, "usage_t...
42687602182
import numpy as np from collections import OrderedDict import csv import matplotlib.pyplot as plt class Adam: """Adam (http://arxiv.org/abs/1412.6980v8)""" def __init__(self, lr=0.001, beta1=0.9, beta2=0.999): self.lr = lr self.beta1 = beta1 self.beta2 = beta2 self.iter = 0 ...
r07942086/ML2018FALL
hw2/train_best.py
train_best.py
py
8,694
python
en
code
0
github-code
1
[ { "api_name": "numpy.zeros_like", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.zeros_like", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_n...
12458772738
import os, sys import pygame import pygame.locals import grid import gem import random import player import threading import time BLACK = 0, 0, 0 OFFSET = 70 pygame.init() class Updater(threading.Thread): '''Handles brick drop speed.''' def __init__(self, players): threading.Thread.__init__(self) ...
Ceasar/Puzzle-Fighter
main.py
main.py
py
5,000
python
en
code
4
github-code
1
[ { "api_name": "pygame.init", "line_number": 15, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 17, "usage_type": "attribute" }, { "api_name": "threading.Thread.__init__", "line_number": 20, "usage_type": "call" }, { "api_name": "threading...
19152762512
from django.test import TestCase from django.core.urlresolvers import reverse from committee.models import Committee, Meeting class ResponseStatus(TestCase): def test_committees(self): response = self.client.get(reverse('committee-hub')) self.assertEqual(response.status_code, 200) def test_c...
imagreenplant/beacon-food-forest
committee/tests.py
tests.py
py
1,001
python
en
code
2
github-code
1
[ { "api_name": "django.test.TestCase", "line_number": 6, "usage_type": "name" }, { "api_name": "django.core.urlresolvers.reverse", "line_number": 9, "usage_type": "call" }, { "api_name": "committee.models", "line_number": 17, "usage_type": "name" }, { "api_name": "...
13649108676
import json from rest_framework import status from api.constans import AutoNotificationConstants, TaskStageConstants from api.models import * from api.tests import GigaTurnipTestHelper class DateTimeSortTest(GigaTurnipTestHelper): def test_datetime_sort_for_tasks(self): from datetime import datetime ...
KloopMedia/GigaTurnip
api/tests/test_datetime_sort.py
test_datetime_sort.py
py
6,128
python
en
code
2
github-code
1
[ { "api_name": "api.tests.GigaTurnipTestHelper", "line_number": 10, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 45, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 60, "usage_type": "call" }, { "api_name": "rest_fram...
10327628407
import numpy as np import os from PIL import Image import cv2 import matplotlib.pyplot as plt from tqdm import tqdm import pandas as pd from config import * import dlib def convert_csv_to_jpg(csv_path): # 加载opencv的人脸识别文件 # 'haarcascade_frontalface_alt' higher accuracy, but slower # 'haarcascade_frontalfac...
ryangawei/CNN-Facial-Expression-Recognition
src/preprocess.py
preprocess.py
py
5,897
python
en
code
16
github-code
1
[ { "api_name": "dlib.get_frontal_face_detector", "line_number": 17, "usage_type": "call" }, { "api_name": "dlib.shape_predictor", "line_number": 18, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 21, "usage_type": "call" }, { "api_name": "o...
18652820535
from django.conf.urls import url from django.urls import path from .views import CustomerGroupAPIView, CustomerGroupAPIDetailView, SiteAPIDetailView, SiteAPIView app_name = "api-group" # app_name will help us do a reverse look-up latter. urlpatterns = [ url(r'^(?P<id>\d+)/$', CustomerGroupAPIDetailView.as_view(...
KUSH23/bkend
customergroups/api/urls.py
urls.py
py
539
python
en
code
1
github-code
1
[ { "api_name": "django.conf.urls.url", "line_number": 11, "usage_type": "call" }, { "api_name": "views.CustomerGroupAPIDetailView.as_view", "line_number": 11, "usage_type": "call" }, { "api_name": "views.CustomerGroupAPIDetailView", "line_number": 11, "usage_type": "name" ...
71114520353
from plot import * from bokeh.plotting import output_file, show from bokeh.models import Div # example values layout = column( Div(text="<h1>Cruise control (PI regulator)</h1>", align="center"), make_plot(start_velocity=0, end_velocity=50), make_plots(start_velocity=0, end_velocity=50) ) output_file("crui...
gg-mike/PUT-3-PA-project
Main.py
Main.py
py
376
python
en
code
0
github-code
1
[ { "api_name": "bokeh.models.Div", "line_number": 7, "usage_type": "call" }, { "api_name": "bokeh.plotting.output_file", "line_number": 12, "usage_type": "call" }, { "api_name": "bokeh.plotting.show", "line_number": 14, "usage_type": "call" } ]
4157922495
from django.urls import path from .views import ( SignupAPIView, SigninAPIView, DeleteUserView, ProjectMixins, ProjectDetailMixins ) urlpatterns = [ path("users/signup/", SignupAPIView.as_view(), name='signup'), path("users/signin/", SigninAPIView.as_view(), name='signin'), path("user...
HyeonWooJo/tts-input-service
backend/apis/urls.py
urls.py
py
531
python
en
code
0
github-code
1
[ { "api_name": "django.urls.path", "line_number": 13, "usage_type": "call" }, { "api_name": "views.SignupAPIView.as_view", "line_number": 13, "usage_type": "call" }, { "api_name": "views.SignupAPIView", "line_number": 13, "usage_type": "name" }, { "api_name": "djan...
38302460948
"""Tests for `ember_mug.mug connections`.""" from __future__ import annotations from datetime import datetime from typing import TYPE_CHECKING from unittest.mock import AsyncMock, Mock, patch import pytest from bleak import BleakError from bleak.backends.device import BLEDevice from ember_mug.consts import ( EMB...
sopelj/python-ember-mug
tests/test_connection.py
test_connection.py
py
21,188
python
en
code
18
github-code
1
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 24, "usage_type": "name" }, { "api_name": "ember_mug.mug.EmberMug", "line_number": 26, "usage_type": "name" }, { "api_name": "unittest.mock.AsyncMock", "line_number": 27, "usage_type": "name" }, { "api_name": "b...
21484583538
import math import numpy as np import scipy.constants as sc import units as unit def db_to_abs(db_value): """ :param db_value: list or float :return: Convert dB to absolute value """ absolute_value = 10**(db_value/float(10)) return absolute_value def abs_to_db(absolute_value): """ :p...
adiazmont/optical-network-simulator
transmission_system.py
transmission_system.py
py
23,048
python
en
code
4
github-code
1
[ { "api_name": "numpy.log10", "line_number": 21, "usage_type": "call" }, { "api_name": "units.mW", "line_number": 188, "usage_type": "attribute" }, { "api_name": "numpy.log2", "line_number": 219, "usage_type": "call" }, { "api_name": "units.c", "line_number": 2...
37614366922
import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression plt.style.use('fivethirtyeight') def fit_model(x_train, y_train): # Fits a linear regression to find the actual b and w that minimize the loss regression = LinearRegression() regression.fit(x_train, y_train...
dvgodoy/PyTorchStepByStep
plots/chapter1.py
chapter1.py
py
1,612
python
en
code
622
github-code
1
[ { "api_name": "matplotlib.pyplot.style.use", "line_number": 4, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 4, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 4, "usage_type": "name" }, { "api_name"...
26191591366
import numpy as np import matplotlib.pyplot as plt import torch from torchvision.io import read_image from torchvision.ops import masks_to_boxes def show_mask(mask, ax, random_color=False): if random_color: color = np.concatenate([np.random.random(3), np.array([0.6])], axis=0) else: color = np...
anushkumarv/AITestKitchen
SAM/utils/helper.py
helper.py
py
1,807
python
en
code
0
github-code
1
[ { "api_name": "numpy.concatenate", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.random.random", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 10, "usage_type": "attribute" }, { "api_name": "numpy.array",...
38420624656
import configparser import csv from src.web_monitor import web_monitor def read_config(): config = configparser.ConfigParser() config.read('config.ini') with open("websites.txt", "r") as web_config: tsv_reader = csv.DictReader(web_config, delimiter='\t') web_dict = {} for row in t...
Cy83rr/web_monitor
run_script.py
run_script.py
py
556
python
en
code
0
github-code
1
[ { "api_name": "configparser.ConfigParser", "line_number": 8, "usage_type": "call" }, { "api_name": "csv.DictReader", "line_number": 11, "usage_type": "call" }, { "api_name": "src.web_monitor.web_monitor.main", "line_number": 22, "usage_type": "call" }, { "api_name...
72794581795
#!/usr/bin/env python # -*- coding: utf-8 -*- from rknn.api import RKNN #import _init_paths import cv2 import numpy as np import math import threading from time import sleep imreadLock = threading.Lock() #from python_wrapper import * #import os import sys PNET_PYRAMID= np.array([[270,207],[192,147],[136,10...
chenshiqin/mtcnn
demo_camera_spilt.py
demo_camera_spilt.py
py
26,819
python
en
code
5
github-code
1
[ { "api_name": "threading.Lock", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.array", "line_number...
41559504876
#!/usr/bin/env python def fit_lambda(root='j100025+021706', newfunc=True, bucket_name='aws-grivam'): import time import os import numpy as np import boto3 import json from grizli_aws.fit_redshift_single import run_grizli_fit beams, files = get_needed_paths(root, bucket_name=bucket...
grizli-project/grizli-aws
scripts/fit_redshift_local.py
fit_redshift_local.py
py
2,656
python
en
code
0
github-code
1
[ { "api_name": "grizli_aws.fit_redshift_single.run_grizli_fit", "line_number": 27, "usage_type": "call" }, { "api_name": "boto3.resource", "line_number": 41, "usage_type": "call" }, { "api_name": "boto3.client", "line_number": 42, "usage_type": "call" }, { "api_nam...
44221249022
import torch def tile_features_and_labels(x, y): """ Tile the features and lables along the sequence dimension. Example: the sequence [(x_1,y_1), (x_2, y_2), (x_3, y_3)] encodes 3 different testing paradigms. We can use [(x_1, y_1), (x_2, y_2), x_3] to predict y_3, [(x_2,y_2), (x_3,y_3), x_1] to predict y_1...
cfifty/CAMP
models/context_model_utils.py
context_model_utils.py
py
830
python
en
code
0
github-code
1
[ { "api_name": "torch.arange", "line_number": 24, "usage_type": "call" } ]
41436655263
import logging from string import ascii_letters import pytest # Import TestListener with a leading underscore to prevent pytest from # thinking that it's a test class. from stomp.listener import TestListener as _TestListener from streamsets.testframework.markers import jms, sdc_min_version from streamsets.testframewor...
streamsets/datacollector-tests
pipeline/test_jms_stages.py
test_jms_stages.py
py
5,338
python
en
code
17
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "streamsets.testframework.utils.get_random_string", "line_number": 30, "usage_type": "call" }, { "api_name": "string.ascii_letters", "line_number": 30, "usage_type": "argument" }...
70547442913
import logging import ask_sdk_core.utils as ask_utils import openai from ask_sdk_core.skill_builder import SkillBuilder from ask_sdk_core.dispatch_components import AbstractRequestHandler from ask_sdk_core.dispatch_components import AbstractExceptionHandler from ask_sdk_core.handler_input import HandlerInput from ask_s...
cainfoxy/Alexa-GPT4-CFX
Lambda/lambda_function.py
lambda_function.py
py
4,046
python
en
code
1
github-code
1
[ { "api_name": "openai.api_key", "line_number": 11, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 14, "usage_type": "attribute" }, { "api_name": "ask_sdk_core....
32060238017
from django.shortcuts import render from core.forms import NameForm def form_manual(request): data = {} if request.method == 'POST': data['name'] = request.POST.get('name', 'name not found') data['active'] = request.POST.get('active', 'off') data['week'] = request.POST.get('week', 'week not fou...
djangomoc/formularios
core/views.py
views.py
py
927
python
en
code
1
github-code
1
[ { "api_name": "django.shortcuts.render", "line_number": 13, "usage_type": "call" }, { "api_name": "core.forms.NameForm", "line_number": 17, "usage_type": "call" }, { "api_name": "pdb.set_trace", "line_number": 29, "usage_type": "call" }, { "api_name": "django.shor...
9324774880
import csv, re, os from typing import List, Dict, Tuple from cProfile import Profile from pstats import Stats from vacancy import InputConnect from statistic import Report, get_statistic, get_salary_level, get_count_vacancies, print_statistic from Task322 import get_stat_by_year prof = Profile() prof.disable() class...
Elenaz441/Zasypkina
main.py
main.py
py
13,812
python
ru
code
0
github-code
1
[ { "api_name": "cProfile.Profile", "line_number": 9, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 46, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 59, "usage_type": "call" }, { "api_name": "typing.Tuple", "line_number": 4...
16988584968
import scipy.io as sio import numpy as np import matplotlib.pyplot as plt def lsfit(data): x = data[:,0] y = data[:,1] x_bar = np.mean(x) y_bar = np.mean(y) xy_bar = np.mean(x*y) xx_bar = np.mean(x*x) w1 = (xy_bar - y_bar*x_bar)/(xx_bar - x_bar*x_bar) w0 = y_bar - w1*x_bar loss = n...
cartfjord/ASI
Lab1/lab1.py
lab1.py
py
3,700
python
en
code
0
github-code
1
[ { "api_name": "numpy.mean", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 11, ...
36937439358
import pprint import sys from os import path import yaml def to_upper(oldList): newList = [] for element in oldList: newList.append(element.upper()) return newList def find_key(input_dict, target): solutions = [] for key, value in input_dict.items(): for i in to_upper(value): ...
richardphi1618/personal_finances
test/match_key.py
match_key.py
py
999
python
en
code
0
github-code
1
[ { "api_name": "os.path.isfile", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path", "line_number": 24, "usage_type": "name" }, { "api_name": "yaml.safe_load", "line_number": 30, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 3...
41405496993
from http import HTTPStatus from typing import Any from fastapi import APIRouter, Depends, Request from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer from fastapi_restful.cbv import cbv from pydantic.schema import UUID from src.api.response_models.error import generate_error_responses from...
Studio-Yandex-Practicum/lomaya_baryery_backend
src/api/routers/report.py
report.py
py
4,802
python
ru
code
26
github-code
1
[ { "api_name": "fastapi.APIRouter", "line_number": 16, "usage_type": "call" }, { "api_name": "src.core.services.authentication_service.AuthenticationService", "line_number": 21, "usage_type": "name" }, { "api_name": "fastapi.Depends", "line_number": 21, "usage_type": "call...
74395034273
from mlfromscratch.supervised.random_forest import Random_forest import numpy as np from sklearn.ensemble import RandomForestClassifier from sklearn.datasets import load_iris from sklearn.model_selection import train_test_split def test(): iris = load_iris() X = iris['data'] y = iris['target'] X_train...
harjotsodhi/ML-from-scratch
mlfromscratch/testing/test_random_forest.py
test_random_forest.py
py
965
python
en
code
0
github-code
1
[ { "api_name": "sklearn.datasets.load_iris", "line_number": 9, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 12, "usage_type": "call" }, { "api_name": "mlfromscratch.supervised.random_forest.Random_forest", "line_number": 15, ...
33682119543
""" 28.06.23 @tcnicholas Utility functions. """ import re from typing import Tuple, List import numpy as np from numba import njit def round_maxr(max_r: float, bin_width: float) -> float: """ Round the max_r value by flooring to a multiple of the bin_width. :param max_r: maximum value of r. :param ...
tcnicholas/amorphous-calcium-carbonate
ljg_simulator/utils.py
utils.py
py
3,772
python
en
code
4
github-code
1
[ { "api_name": "numpy.round", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.round", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.ndarray", "line_number": 37, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_number":...
71112237794
from AIPUBuilder.Optimizer.utils import * from AIPUBuilder.Optimizer.framework import * from AIPUBuilder.Optimizer.ops.activation import apply_with_activation, with_activation_out_is_signed, apply_with_activation_quantize, with_activation_allow_merge_out_zerop_to_bias from AIPUBuilder.Optimizer.logger import * from AI...
Arm-China/Compass_Optimizer
AIPUBuilder/Optimizer/ops/conv.py
conv.py
py
14,605
python
en
code
18
github-code
1
[ { "api_name": "torch.Tensor", "line_number": 30, "usage_type": "attribute" }, { "api_name": "torch.nn.functional.pad", "line_number": 38, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 38, "usage_type": "attribute" }, { "api_name": "torch.nn.func...
19609459955
import flask import threading import os import slackeventsapi import slackweb import bedroomtv import youtube import surveillance slack_signing_secret=os.environ.get('SLACK_SIGNING_SECRET') approved_user_id=os.environ.get('APPROVED_USER_ID') app=flask.Flask(__name__) slack_events_adapter=slackeventsapi.SlackEventAda...
kriscfoster/my_rpi_personal_assistant
my_rpi_personal_assistant/app.py
app.py
py
1,456
python
en
code
0
github-code
1
[ { "api_name": "os.environ.get", "line_number": 11, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line_number": 12, "usage_type": "call" }, { "api_name": "os.environ", "line_...
438838700
from functools import reduce import numpy as np from scipy import optimize, linalg from utils import * import itertools # === Configure === np.set_printoptions(precision=3, linewidth=120, suppress=True) # === Constants === ineq_coeff = None # === Memory Locations === mem_loc = [2, 2, 2, 2, 7] ps_A1, ps...
tcfraser/quantum_tools
archive/chsh_violation.py
chsh_violation.py
py
3,101
python
en
code
1
github-code
1
[ { "api_name": "numpy.set_printoptions", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.trace", "line_number": 44, "usage_type": "call" }, { "api_name": "numpy.dot", "line_number": 44, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_nu...
8478882949
from bs4 import BeautifulSoup from selenium import webdriver import requests import csv browser = webdriver.Chrome() URL = "https://search.shopping.naver.com/search/all?query=%EB%B0%80%ED%82%A4%ED%8A%B8%20%EB%96%A1%EB%B3%B6%EC%9D%B4&pagingIndex=1" URLTEST = "https://search.shopping.naver.com/search/all?query=%EC%83%9D...
setda1494/MyCode
Python/1-1/home/data crawling/MultipleProduct.py
MultipleProduct.py
py
954
python
en
code
0
github-code
1
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 6, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 6, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "bs4.Beautiful...
34641424745
import re import uuid from django import template from django.utils.safestring import mark_safe from django.template.loader import get_template from django.utils.translation import gettext as _ from dal_select2.widgets import Select2WidgetMixin register = template.Library() @register.inclusion_tag('selia/components...
CONABIO-audio/irekua
irekua/selia/templatetags/selia_components.py
selia_components.py
py
9,880
python
en
code
0
github-code
1
[ { "api_name": "django.template.Library", "line_number": 10, "usage_type": "call" }, { "api_name": "django.template", "line_number": 10, "usage_type": "name" }, { "api_name": "django.template", "line_number": 50, "usage_type": "name" }, { "api_name": "dal_select2.w...
6609929946
import pytest from unittest.mock import MagicMock, patch from cura.PrinterOutput.Models.ExtruderConfigurationModel import ExtruderConfigurationModel from cura.PrinterOutput.Models.MaterialOutputModel import MaterialOutputModel from cura.PrinterOutput.Models.PrinterConfigurationModel import PrinterConfigurationModel fr...
Ultimaker/Cura
tests/PrinterOutput/TestPrinterOutputDevice.py
TestPrinterOutputDevice.py
py
3,837
python
en
code
5,387
github-code
1
[ { "api_name": "unittest.mock.patch", "line_number": 17, "usage_type": "call" }, { "api_name": "cura.PrinterOutput.PrinterOutputDevice.PrinterOutputDevice", "line_number": 18, "usage_type": "call" }, { "api_name": "pytest.fixture", "line_number": 15, "usage_type": "call" ...
18481811861
# -*- coding: utf-8 -*- """ Functions to analyze the distances between given number inside a sudoku. """ # STD from collections import defaultdict import math import functools # EXT import numpy import matplotlib.pyplot as plt from scipy.linalg import eigh # PROJECT from general import Sudoku, SudokuCollection, read...
Kaleidophon/shiny-robot
experiments/distances.py
distances.py
py
9,676
python
en
code
1
github-code
1
[ { "api_name": "general.Sudoku", "line_number": 23, "usage_type": "name" }, { "api_name": "numpy.zeros", "line_number": 39, "usage_type": "call" }, { "api_name": "numpy.linalg.norm", "line_number": 74, "usage_type": "call" }, { "api_name": "numpy.linalg", "line...
29448425552
from PIL import Image from flask import Flask, request, render_template from glob import glob import os from imageTransfer import Transfer import numpy as np class PathInfo(object): def __init__(self): style_img_paths = glob('static/style/*.jpg') + glob('static/style/*.jpeg') + glob('static/style/*.png') ...
Jieqianyu/styleTransfer
server.py
server.py
py
2,650
python
en
code
4
github-code
1
[ { "api_name": "glob.glob", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.basename", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "imageTransfer.Transfer", ...
39994314829
from GQA.functions.peaks import Peaks from GQA.functions.rastrigin import Rastrigin from GQA.functions.eggholder import Eggholder from GQA.quantum.gqa_function import GQA_function from GQA.utils.plotutils import plotList,average_evals from tqdm import tqdm # r = Rastrigin(-5.12,5.12,-5.12,5.12) # r.plot_() # e = Eggh...
simonetome/QuantumGeneticAlgorithm
experiments.py
experiments.py
py
1,209
python
en
code
3
github-code
1
[ { "api_name": "tqdm.tqdm", "line_number": 35, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number": 41, "usage_type": "call" }, { "api_name": "GQA.quantum.gqa_function.GQA_function", "line_number": 42, "usage_type": "call" }, { "api_name": "GQA.utils.p...
25092121024
from __future__ import print_function import os.path from time import sleep from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request from google.oauth2.credentials import Credentials from vidconvert import getframes f...
ray1i/googledocs-bad-apple
main.py
main.py
py
3,375
python
en
code
1
github-code
1
[ { "api_name": "os.path.path.exists", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 20, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 20, "usage_type": "name" }, { "api_name": "google.oauth2.credentia...
9196596468
from collections import namedtuple import altair as alt import math import pandas as pd import streamlit as st """ # Welcome to Streamlit! Edit `/streamlit_app.py` to customize this app to your heart's desire :heart: If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community fo...
kathleenmariekelly/streamlit-example
streamlit_app.py
streamlit_app.py
py
7,031
python
en
code
null
github-code
1
[ { "api_name": "os.environ", "line_number": 31, "usage_type": "attribute" }, { "api_name": "openai.api_key", "line_number": 32, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 32, "usage_type": "attribute" }, { "api_name": "llama_index.Simpl...
4295634182
import streamlit as st import requests import streamlit.components.v1 as components import streamlit.components.v1 as stc from PIL import Image, UnidentifiedImageError import PIL.Image import os import csv import pandas as pd import pymongo from pymongo import MongoClient from io import BytesIO import base...
fl0rch/Pet_Enhacement_Transition
pagina.py
pagina.py
py
18,889
python
es
code
1
github-code
1
[ { "api_name": "streamlit.set_page_config", "line_number": 36, "usage_type": "call" }, { "api_name": "streamlit.markdown", "line_number": 38, "usage_type": "call" }, { "api_name": "streamlit.write", "line_number": 54, "usage_type": "call" }, { "api_name": "streamli...
35881891250
from selenium import webdriver class ImageMonkeyChromeWebDriver(webdriver.Chrome): def __init__(self, headless=True, delete_all_cookies=True): options = webdriver.ChromeOptions() if headless: options.add_argument('--headless') options.add_argument('--disable-dev-shm-usage') options.add_argument('--no-s...
ImageMonkey/imagemonkey-core
tests/ui/webdriver.py
webdriver.py
py
451
python
en
code
46
github-code
1
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 3, "usage_type": "attribute" }, { "api_name": "selenium.webdriver", "line_number": 3, "usage_type": "name" }, { "api_name": "selenium.webdriver.ChromeOptions", "line_number": 5, "usage_type": "call" }, { "a...
36427186703
""" 199. Binary Tree Right Side View Medium 1076 46 Favorite Share Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. Example: Input: [1,2,3,null,5,null,4] Output: [1, 3, 4] Explanation: 1 ...
fengyang95/OJ
LeetCode/python3/199_BinaryTreeRightSideView.py
199_BinaryTreeRightSideView.py
py
1,718
python
en
code
2
github-code
1
[ { "api_name": "collections.deque", "line_number": 45, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 51, "usage_type": "call" } ]
30992767830
from fastapi import HTTPException from fastapi.param_functions import Depends from fastapi_users.fastapi_users import FastAPIUsers from sqlalchemy.sql import select, delete from sqlalchemy.ext.asyncio.session import AsyncSession from sqlalchemy.sql.expression import desc from starlette.responses import Response from fa...
HakierGrzonzo/PBL-polsl-2022
backend/backend/measurements.py
measurements.py
py
13,022
python
en
code
3
github-code
1
[ { "api_name": "fastapi_users.fastapi_users.FastAPIUsers", "line_number": 26, "usage_type": "name" }, { "api_name": "fastapi_users.fastapi_users", "line_number": 27, "usage_type": "name" }, { "api_name": "database.Measurements", "line_number": 30, "usage_type": "name" },...
7074320791
#!/usr/bin/env python # coding: utf-8 # # Image_Segmentation # ## 1. Contours # ### Contours are continuous lines or curves that bound or cover the full-boundary of an object in an image # In[1]: import cv2 #importing necessary libraries import numpy as np # In[2]: image=...
Prasad3617/IMAGE-MANIPULATIONS
Image_Segmentation.py
Image_Segmentation.py
py
1,228
python
en
code
1
github-code
1
[ { "api_name": "cv2.imread", "line_number": 20, "usage_type": "call" }, { "api_name": "cv2.imshow", "line_number": 26, "usage_type": "call" }, { "api_name": "cv2.waitKey", "line_number": 27, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 3...
16069403722
import json from qwikidata.sparql import (get_subclasses_of_item, return_sparql_query_results) import logging queries_log = logging.getLogger('QUERIES') class Queries: @staticmethod def query(query=None, json_path=None, log="", already_asked=False, limit=None): if limit ...
lucastorrealba/CC7220
app/cc7220/extra/queries.py
queries.py
py
7,412
python
en
code
0
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "qwikidata.sparql.return_sparql_query_results", "line_number": 15, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 17, "usage_type": "call" }, { "api_name...
34305147841
import random as rn import os from art import logo2 def clear(): '''this clears the terminal''' os.system('cls') def number_game(): '''This is a number guessing game function''' print(logo2) print("Welcome to the number guessing game \nI am thinking of a number between 1 and 100") numbers = ...
Samthesurf/Practice-and-Learn
guessing_game.py
guessing_game.py
py
2,677
python
en
code
0
github-code
1
[ { "api_name": "os.system", "line_number": 8, "usage_type": "call" }, { "api_name": "art.logo2", "line_number": 13, "usage_type": "argument" }, { "api_name": "random.choice", "line_number": 16, "usage_type": "call" } ]
15405786193
#!/usr/bin/env python3 """ https://adventofcode.com/2022/day/9 """ from collections import namedtuple from operator import add, sub import aoc PUZZLE = aoc.Puzzle(day=9, year=2022) class Point(namedtuple('Point', ('x', 'y'))): """A point class with overridden operators""" def __abs__(self): return ...
trosine/advent-of-code
2022/day09.py
day09.py
py
1,929
python
en
code
0
github-code
1
[ { "api_name": "aoc.Puzzle", "line_number": 10, "usage_type": "call" }, { "api_name": "collections.namedtuple", "line_number": 13, "usage_type": "call" }, { "api_name": "operator.add", "line_number": 20, "usage_type": "argument" }, { "api_name": "operator.sub", ...
29499148195
from flask import render_template, url_for, flash, redirect, request, abort, jsonify, make_response from app import app, db, bcrypt, mail from forms import * from models import * from flask_login import login_user, current_user, logout_user, login_required from routes.commonRoutes import commonTempRoute @app.route("...
alankhoangfr/NilStock_Inventory
routes/supplierRoutes.py
supplierRoutes.py
py
5,120
python
en
code
0
github-code
1
[ { "api_name": "routes.commonRoutes.commonTempRoute", "line_number": 13, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 14, "usage_type": "call" }, { "api_name": "app.app.route", "line_number": 10, "usage_type": "call" }, { "api_name"...
23033727735
# gets grupy data and runs a plotting function import matplotlib.pyplot as plt def GruPlot( prefix, q_labels, gru_data): fig, axes = plt.subplots(nrows=1, ncols=1) x = [] lab = [] for i in xrange( len(q_labels) ): lab.append( q_labels[i][1] ) x.append( q_labels[i][0] ) plt.setp(axes, xticks=x, xticklabel...
alex-miller-0/grupy
Versions/1.0/grupy/GruPlot.py
GruPlot.py
py
561
python
en
code
5
github-code
1
[ { "api_name": "matplotlib.pyplot.subplots", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 6, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.setp", "line_number": 14, "usage_type": "call" }, { "api_name": "mat...
4474723624
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Dec 27 19:24:35 2020 @author: Scott T. Small This module demonstrates documentation as specified by the `NumPy Documentation HOWTO`_. Docstrings may extend over multiple lines. Sections are created with a section header followed by an underline of equal...
stsmall/abc_scripts2
project/stat_modules/sumstats.py
sumstats.py
py
12,274
python
en
code
3
github-code
1
[ { "api_name": "allel.HaplotypeArray", "line_number": 43, "usage_type": "call" }, { "api_name": "allel.SortedIndex", "line_number": 44, "usage_type": "call" }, { "api_name": "project.stat_modules.popstats.pi_window", "line_number": 50, "usage_type": "call" }, { "ap...
30675767566
from .values import * from docx.shared import Pt from docx.enum.text import WD_PARAGRAPH_ALIGNMENT def setParagraphType(paragraph): if paragraph[:7].upper() == CHAPTER_TEXT: type = CHAPTER_TEXT elif paragraph[:10].upper() == DEDICATION_TEXT: type = EXTRA_SECTION elif paragraph[:14].upper()...
Cristian-G-P/Writer-Apps
Flask-Web-App-Tutorial-main/website/callistoAuxFunctions.py
callistoAuxFunctions.py
py
7,872
python
en
code
0
github-code
1
[ { "api_name": "docx.shared.Pt", "line_number": 87, "usage_type": "call" }, { "api_name": "docx.shared.Pt", "line_number": 89, "usage_type": "call" }, { "api_name": "docx.shared.Pt", "line_number": 91, "usage_type": "call" }, { "api_name": "docx.enum.text.WD_PARAGR...
22549796737
from PIL import Image import PIL.ImageOps from shutil import move def alpha_channel_upscale(inpath, outpath, workingImage, settings): """Opens the current working image as well as the original image, resizes (BICUBIC) the original image and copies the alpha channel""" originalImage = Image.open(workingImage.or...
RainbowRedux/TextureUpscalingPipeline
TextureUpscaler/AlphaChannelUpscale.py
AlphaChannelUpscale.py
py
833
python
en
code
5
github-code
1
[ { "api_name": "PIL.Image.open", "line_number": 7, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 7, "usage_type": "name" }, { "api_name": "shutil.move", "line_number": 11, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_number"...
73587061154
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Nov 26 2017 Description: Input: symbols of chosen stocks Randomly assign weights to given stocks. Calculate portfolio return, volatility, and Sharp Ratio. Output: portfolio with maximum SR or minimum volatility @author: chenkai """ import nump...
chenkai0208/Quantitative_Finance_in_Python
portfolio_optimization.py
portfolio_optimization.py
py
3,072
python
en
code
3
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 21, "usage_type": "call" }, { "api_name": "pandas_datareader.data.DataReader", "line_number": 25, "usage_type": "call" }, { "api_name": "pandas_datareader.data", "line_number": 25, "usage_type": "name" }, { "api_name...
18187098239
import re import sqlite3 import os import glob import datetime as dt import bokeh.models import xarray import numpy as np from functools import lru_cache from forest.exceptions import FileNotFound, IndexNotFound from forest.old_state import old_state, unique import forest.util import forest.map_view from forest import ...
MetOffice/forest
forest/drivers/eida50.py
eida50.py
py
11,480
python
en
code
38
github-code
1
[ { "api_name": "numpy.datetime64", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.where", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.isnat", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.argmax", "line_num...
23670216784
import pandas as pd, numpy as np import re import pickle dataset = pd.read_csv("Restaurant_Reviews.csv") dataset['Review'] import nltk nltk.download('stopwords') from nltk.corpus import stopwords from nltk.stem.porter import PorterStemmer corpus = [] for i in range(0, 1000): review = re.sub('[^a-zA...
MM1026-DS/Ml-web-nlp-app
app_1.py
app_1.py
py
1,549
python
en
code
1
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 4, "usage_type": "call" }, { "api_name": "nltk.download", "line_number": 11, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 16, "usage_type": "call" }, { "api_name": "nltk.stem.porter.PorterStemmer", ...
23015193717
from dataclasses import field from rest_framework import serializers from django.contrib.auth import get_user_model import requests import json from apps.core.models import UserRole from apps.core.serializers import MyAccountSerializer, UserAppointment, UserSerializer from apps.profiles.serializers import CounsellorPr...
rupendra-p/ekurakani
apps/appointment/serializers.py
serializers.py
py
4,487
python
en
code
0
github-code
1
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 16, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 16, "usage_type": "name" }, { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 22, ...
24412532866
from appFile import request, app, ma, cross_origin from models.index import db, Events, Timeline from flask import jsonify from controllers.auth import JWTcheck class EventSchema(ma.Schema): class Meta: fields = ('id', 'name', 'info', 'timeline_id', 'day', 'month', 'year', 'time', 'date_created') event_schema =...
Snugles/onTimeline
server/controllers/events.py
events.py
py
2,173
python
en
code
0
github-code
1
[ { "api_name": "appFile.ma.Schema", "line_number": 6, "usage_type": "attribute" }, { "api_name": "appFile.ma", "line_number": 6, "usage_type": "name" }, { "api_name": "appFile.request.json", "line_number": 16, "usage_type": "attribute" }, { "api_name": "appFile.req...
11343329447
import re from utils import logger BIO_PATTERN = re.compile(r'\[(.+?)\](_[A-Z]{3}_)') BIO_BEGIN = re.compile(r'_[A-Z]{3}_\[') BIO_END = re.compile(r'\]_[A-Z]{3}_') def pre_process(text): text = BIO_PATTERN.sub(r'\2[\1]\2', text) i = 0 res = [] label = '' is_begin = False is_inner = False ...
henryhyn/caesar-next
ner/ner_utils.py
ner_utils.py
py
2,017
python
en
code
1
github-code
1
[ { "api_name": "re.compile", "line_number": 5, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 6, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 7, "usage_type": "call" }, { "api_name": "utils.logger.info", "line_number": ...
37749262526
import os import requests import shutil import boto3 from PIL import Image import urllib.request access_key_src = os.environ.get("AWS_ACCESS_KEY_ID") secret_key_src = os.environ.get("AWS_SECRET_ACCESS_KEY") region_name = os.environ.get("AWS_REGION_NAME") bucket_name = os.environ.get("AWS_MEDIA_BUCKET_NAME") bucket_fol...
trungannl/globallink-upload-media-master
uploadwebp/cron.py
cron.py
py
2,536
python
en
code
0
github-code
1
[ { "api_name": "os.environ.get", "line_number": 8, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line_number": 9, "usage_type": "call" }, { "api_name": "os.environ", "line_num...
186882541
import json import pandas as pd import numpy as np def processing_title(title): return title.upper() def processing_author(author): return author.title() def processing_discount(discount): try: discount = discount.replace('%dcto', '') return int(discount) except ValueError: ...
avilanac/book_tracker_buddy
processing.py
processing.py
py
2,114
python
en
code
0
github-code
1
[ { "api_name": "numpy.nan", "line_number": 23, "usage_type": "attribute" }, { "api_name": "numpy.nan", "line_number": 45, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 74, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_...
33820929017
from werkzeug.utils import secure_filename import sqlite3 import json import os class DatabaseHelper: """ This help to manage databases. """ def __init__(self) -> None: pass def save_image(self, main_dir: str, user_token: str, images: dict) -> bool: """ save_image() will ...
s3h4n/CVIS
packages/db_helper/db_helper.py
db_helper.py
py
1,171
python
en
code
0
github-code
1
[ { "api_name": "os.mkdir", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path.splitext", "line_number": 31, "usage_type": "call" }, { "api_name": "os.path", "line_number": 31, "usage_type": "attribute" }, { "api_name": "werkzeug.utils.secure_filename...
35942244086
import heapq from collections import defaultdict from typing import List start_and_end_times = [[4, 7], [2, 5], [1, 3], [5, 8]] # test_tuples = [(1, 5), (3, 4), (3, 3), (2, 1), (2, 7), (1, 1)] # heapq.heapify(test_tuples) def max_concurrency_best(s): """Naive method to solve max_concurrency. Passes all tests!"...
eforgacs/schoolSandbox
fundamental_algorithms/Midterm/max_concurrency.py
max_concurrency.py
py
7,345
python
en
code
0
github-code
1
[ { "api_name": "heapq.heapify", "line_number": 17, "usage_type": "call" }, { "api_name": "heapq.heappush", "line_number": 25, "usage_type": "call" }, { "api_name": "heapq.heappushpop", "line_number": 28, "usage_type": "call" }, { "api_name": "heapq.heappop", "l...
70205998754
from typing import List from .. import DeviceModel, _template_env from . import signed_weight class IntegratorModel(DeviceModel): ng_spice_model_name = 'int' def __init__( self, model_name: str, in_offset: float = 0.0, gain: float = 1.0, out_lower_limit: float = -10.0,...
hammal/cbadc
src/cbadc/circuit/models/integrator.py
integrator.py
py
2,546
python
en
code
8
github-code
1
[ { "api_name": "typing.List", "line_number": 18, "usage_type": "name" } ]
71773999394
"""EJERCICIO 3 El día juliano correspondiente a una fecha es un número entero que indica los días que han transcurrido desde el 1 de enero del año indicado. Queremos crear un programa principal que al introducir una fecha nos diga el día juliano que corresponde. Para ello podemos hacer las siguientes subrutinas:  Leer...
dvidals/python
ejercicios_clase_interfaces/ejer_funciones3.py
ejer_funciones3.py
py
2,974
python
es
code
0
github-code
1
[ { "api_name": "datetime.datetime.strptime", "line_number": 86, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 86, "usage_type": "name" }, { "api_name": "datetime.datetime.strptime", "line_number": 87, "usage_type": "call" }, { "api_name"...
26481678278
import torch import gym from model import Model from collections import deque import numpy as np from env_wrapper import FlappyBirdEnv env = FlappyBirdEnv(render_mode = "human") policy = Model(4, 2) def reinforce(policy, n_training_episodes, max_t, gamma, print_every): is_pick = True scores_deque = deque(maxl...
qvd808/flappy-bird-policy-gradient
flappy_bird_env.py
flappy_bird_env.py
py
2,299
python
en
code
0
github-code
1
[ { "api_name": "env_wrapper.FlappyBirdEnv", "line_number": 8, "usage_type": "call" }, { "api_name": "model.Model", "line_number": 10, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.random.u...
22374085933
from PyQt5.QtWidgets import QMainWindow, QAction, qApp, QApplication, QFrame from PyQt5.QtWidgets import QApplication, QGridLayout, QLabel, QMainWindow, QPushButton, QWidget, QTableWidget, QTableWidgetItem, QMessageBox, QMenuBar, QLineEdit from PyQt5.QtGui import QBrush, QColor from PyQt5 import QtCore from matplot...
celee1/expense-tracker
expense_tracker.py
expense_tracker.py
py
39,348
python
en
code
0
github-code
1
[ { "api_name": "matplotlib.use", "line_number": 17, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QMainWindow", "line_number": 20, "usage_type": "name" }, { "api_name": "sqlite3.connect", "line_number": 26, "usage_type": "call" }, { "api_name": "PyQt5.QtWi...
26839905654
# before use run in command shell: # pip install pipenv # pipenv install requests # pipenv install BeautifulSoup # pipenv install lxml # pip install BeautifulSoup # pip install beautifulsoup4 # pip install lxml import requests import re from bs4 import BeautifulSoup import json # r = requests.get('http://immunet.cn...
lightweave/CRISPR-dynamics
crawler/hmmcas.py
hmmcas.py
py
2,986
python
en
code
0
github-code
1
[ { "api_name": "requests.post", "line_number": 44, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 59, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 64, "usage_type": "call" }, { "api_name": "re.findall", "line_number":...
10599399107
import praw import pause posts = [] url_set = set() message_user = 'VirtualLeak' reddit = praw.Reddit('user') subreddit = reddit.subreddit('friends') # Output post data in markdown table format def output(): format_title = '|'.join(['title', 'author', 'subreddit', 'url', '# of comments\n']) format_columns = ...
shaneavila/reddit-alert
reddit_scraper.py
reddit_scraper.py
py
1,274
python
en
code
0
github-code
1
[ { "api_name": "praw.Reddit", "line_number": 7, "usage_type": "call" }, { "api_name": "pause.hours", "line_number": 34, "usage_type": "call" } ]
71681471074
# -*- coding: utf-8 -*- import logging import werkzeug from odoo import SUPERUSER_ID, api, http, _ from odoo import registry as registry_get from odoo.addons.web.controllers.main import (login_and_redirect, ensure_db, set_cookie_and_redirect) from odoo.exceptions import AccessDenied _logger = logging.getLogger(__name_...
chenrongxu/login_sso
controllers/controllers.py
controllers.py
py
1,975
python
en
code
0
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "odoo.http.Controller", "line_number": 12, "usage_type": "attribute" }, { "api_name": "odoo.http", "line_number": 12, "usage_type": "name" }, { "api_name": "odoo.registry", ...
14991617651
#!/usr/bin/env python # coding: utf-8 # In[1]: ############################################## # Hardware # - Windows 11 # - NI USB-6008 # Erst NI-DAQmx 19.5 installiert # (aktuelle Version 2023 Q2 zeigt die Karte nicht an) # (Die Unterstützung für Net Framework und C++ nicht installieren...
alexwohlers/ni_daq
scripts/ni_read_voltage_buffered.py
ni_read_voltage_buffered.py
py
2,120
python
de
code
0
github-code
1
[ { "api_name": "pprint.PrettyPrinter", "line_number": 24, "usage_type": "call" }, { "api_name": "nidaqmx.Task", "line_number": 34, "usage_type": "call" }, { "api_name": "time.time", "line_number": 35, "usage_type": "call" }, { "api_name": "nidaqmx.constants.Acquisi...
44912301952
import sys from rdkit import Chem from rdkit.Chem import AllChem import glob import shutil import os import multiprocessing as mp nprocs = 4 except_dir_path = os.path.abspath(os.path.dirname(__file__)) + "\except_mol" def optimize(mol_file): try: m = Chem.MolFromMolFile(mol_file) m = Chem.AddHs(m) AllChem.Em...
miya-dai/system_design
scripts/rdk.py
rdk.py
py
829
python
en
code
0
github-code
1
[ { "api_name": "os.path.abspath", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 10, "usage_type": "call" }, { "api_name": "rdkit.Chem.MolFromMolFil...
45888664352
from starlette.endpoints import HTTPEndpoint from starlette.responses import UJSONResponse from api.utils import is_admin from db.conn import get_conn from db.replica import Replica from db.replica_files import ReplicaFiles class ReplicasHandlers(HTTPEndpoint): async def post(self, request): is_admin(req...
wooque/openpacs
backend/api/replicas.py
replicas.py
py
1,811
python
en
code
4
github-code
1
[ { "api_name": "starlette.endpoints.HTTPEndpoint", "line_number": 10, "usage_type": "name" }, { "api_name": "api.utils.is_admin", "line_number": 12, "usage_type": "call" }, { "api_name": "db.conn.get_conn", "line_number": 15, "usage_type": "call" }, { "api_name": "...
29599272508
import argparse import cv2 import logging as log import sys import time import socket import paho.mqtt.client as mqtt import json import math import os from inference import Network # Set the MQTT server environment variables HOSTNAME = socket.gethostname() IPADDRESS = socket.gethostbyname(HOSTNAME) MQTT_HOST = IPAD...
jonathanyeh0723/OpenVINO_People_Counter_App
main.py
main.py
py
7,735
python
en
code
2
github-code
1
[ { "api_name": "socket.gethostname", "line_number": 16, "usage_type": "call" }, { "api_name": "socket.gethostbyname", "line_number": 17, "usage_type": "call" }, { "api_name": "paho.mqtt.client.Client", "line_number": 24, "usage_type": "call" }, { "api_name": "paho....
6899169608
# %% # Shi-TOmasi角点检测(一种适应追踪的角点检测方式) import numpy as np import cv2 from matplotlib import pyplot as plt # %% img = cv2.imread('data/calibresult.png') gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) """goodFeaturesToTrack函数: 参数: (1)gray:输入灰度图 (2) 25:想要检测的角点数量 (3) 0:角点最低水平 (0到1) (4) 10:两...
vvgoder/opencv_learning_chinese
opencv学习文件/9.Shi-Tomas角点检测.py
9.Shi-Tomas角点检测.py
py
747
python
zh
code
2
github-code
1
[ { "api_name": "cv2.imread", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 9, "usage_type": "attribute" }, { "api_name": "cv2.goodFeaturesToTrack"...
44258172133
import altair as alt import pandas as pd import streamlit as st import aws import driver import requests import json import os from textblob import TextBlob import datetime import time credentials_path = "credentials.json" auth_dict = { "CONSUMER_KEY": "", "CONSUMER_SECRET": "", "ACCESS_TOKEN": "", "A...
enpuyou/aws-fastapi-streamlit
src/visualization.py
visualization.py
py
13,343
python
en
code
2
github-code
1
[ { "api_name": "streamlit.warning", "line_number": 28, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 31, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 42, "usage_type": "call" }, { "api_name": "pandas.to_datetime", ...
24765487770
import matplotlib.pyplot as plt import cv2 import numpy as np from os.path import join, basename from collections import deque from utils import grayscale, canny, gaussian_blur, hough_lines, get_slope, get_bias, draw_lines, weighted_img # region of interest def region_of_interest(image): height = image.shape[0] ...
namigaliyev/road-lane-tracking
lane_detection.py
lane_detection.py
py
4,915
python
en
code
4
github-code
1
[ { "api_name": "numpy.array", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.int32", "line_number": 18, "usage_type": "attribute" }, { "api_name": "numpy.zeros_like", "line_number": 21, "usage_type": "call" }, { "api_name": "cv2.fillPoly", "lin...
8985294273
from pycocotools.coco import COCO import numpy as np from tqdm import tqdm import matplotlib.pyplot as plt import cv2 as cv # ======================================= # ======================================= obj_class = 255 dataDir='E:/00_graduation project/DataSet/COCO/' # 数据集根目录 dataType='val2017' # 选择图像类型 annFile='...
Gao-Jinlong/Graduation-Project
U-Net/utils/coco_to_voc.py
coco_to_voc.py
py
3,911
python
en
code
0
github-code
1
[ { "api_name": "numpy.array", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.int32", "line_number": 29, "usage_type": "attribute" }, { "api_name": "cv2.fillPoly", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_num...
23205933467
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import dgl from dgl.base import DGLError from dgl.ops import edge_softmax import dgl.function as fn class Identity(nn.Module): """A placeholder identity operator that is argument-insensitive. (Identity has already been supp...
taotianli/gin_model.py
examples/pytorch/tgn/modules.py
modules.py
py
18,905
python
en
code
5
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 12, "usage_type": "name" }, { "api_name": "torch.nn.Module", "line_number": 26, "usage_type": "attribute" }, { "api_name": "torch.nn", "li...
69890553314
import agent.potil_lstm as agent from expert_dataloader import ExpertLoader, ExpertLoader_each_step import agent.utils as utils import sys sys.path.append('/catkin_workspace/src/ros_kortex/kortex_examples/src/move_it') import torch torch.backends.cudnn.benchmark = True from mpl_toolkits import mplot3d import numpy as n...
ZDDWLIG/KinovaArm_PegInsert_DRL
BC_train.py
BC_train.py
py
4,776
python
en
code
3
github-code
1
[ { "api_name": "sys.path.append", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "torch.backends", "line_number": 7, "usage_type": "attribute" }, { "api_name": "agent.potil_lstm.POTIL...
12316864652
import matplotlib.pyplot as plt x_list = [] y_list = [] def process(line): ### transformation matix 로 궤적 얻기 ############################################################## pose = line.strip().split() x_list.append(float(pose[3])) # position y_list.append(float(pose[11])) ######...
owl-d/Visual_Odometry_Basic
05_trajectory_visualization/kitti_odom_visual.py
kitti_odom_visual.py
py
823
python
en
code
0
github-code
1
[ { "api_name": "matplotlib.pyplot.plot", "line_number": 28, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 28, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.title", "line_number": 30, "usage_type": "call" }, { "api_name": "matp...
71276797475
# Python standard libraries from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import json import sqlite3 # Third-party libraries from flask import Flask, redirect, request, url_for, render_template from flask_login import ( LoginManager, cu...
ColtAllen/codex_vitae_app
codex_vitae/app.py
app.py
py
4,766
python
en
code
0
github-code
1
[ { "api_name": "os.getenv", "line_number": 30, "usage_type": "call" }, { "api_name": "etl.gcp_utils.access_secret", "line_number": 33, "usage_type": "call" }, { "api_name": "etl.gcp_utils.access_secret", "line_number": 34, "usage_type": "call" }, { "api_name": "etl...
8533855613
import getopt import sys from prisma.calibrate import main_loop # parse arguments try: opts, args = getopt.getopt(sys.argv[1:], "d:", ["days_to_sync="]) except getopt.GetoptError: print("Please provide proper arguments.") print("Usage: $python3 sync_fripon.py --d=<days>") sys.exit(2) for opt, arg in ...
Matteo04052017/PRISMA_automation
src/run_calibration.py
run_calibration.py
py
441
python
en
code
0
github-code
1
[ { "api_name": "getopt.getopt", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "getopt.GetoptError", "line_number": 10, "usage_type": "attribute" }, { "api_name": "sys.exit", "lin...
4752869794
#!/usr/bin/env python """ This module has api-key-specific methods """ import argparse from api_request.request import * class UNIQUE_ID(): def __init__(self, director_url): self.base_url = director_url + "/v3" + "/settings/websocketproxy.unique.identity" requestobj = Data('', '') self....
mayadata-io/oep-e2e
api_testing/unique-id/unique-id.py
unique-id.py
py
964
python
en
code
6
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 22, "usage_type": "call" } ]
16516618905
from __future__ import absolute_import, division, print_function,\ with_statement import collections import errno import socket import logging import ssl import sys from tornado import ioloop from tornado.log import gen_log from tornado.netutil import ssl_wrap_socket, ssl_match_hostname, \ SSLCertificateError...
zinic/pyrox
pyrox/tstream/iostream.py
iostream.py
py
20,656
python
en
code
37
github-code
1
[ { "api_name": "tornado.platform.posix._set_nonblocking", "line_number": 22, "usage_type": "name" }, { "api_name": "errno.EWOULDBLOCK", "line_number": 27, "usage_type": "attribute" }, { "api_name": "errno.EAGAIN", "line_number": 27, "usage_type": "attribute" }, { "...
42327230
# important: process ids are global, i. e. are preserved (same pid for each instance) ==> <> os-managed pid import itertools import json from datetime import timedelta, datetime from typing import Sequence, Tuple, Dict import os import locale import sys import argparse root, filename = os.path.split(__file__) proj_roo...
raffaelfoidl/ProvCaptPyEnvs
instances/large/inst_l.py
inst_l.py
py
10,789
python
en
code
0
github-code
1
[ { "api_name": "os.path.split", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_numbe...
19046607125
from iqoptionapi.stable_api import IQ_Option import iqoptionapi.country_id as Pais import time, logging, json, configparser from datetime import datetime, date, timedelta from dateutil import tz import sys #CODIGO PARA DESATIVAR DEBUG OU logging.ERROR #logging.disable(level=(logging.DEBUG)) # Credenciais API = IQ_Op...
Cleoir-Dev/iqoptionapi
tests/bot_CopyTrade.py
bot_CopyTrade.py
py
8,285
python
pt
code
0
github-code
1
[ { "api_name": "iqoptionapi.stable_api.IQ_Option", "line_number": 13, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 28, "usage_type": "call" }, { "api_name": "datetime.datetime.strptime", "line_number": 37, "usage_type": "call" }, { "api_name":...