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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
24045939566 |
from PySide2 import QtWidgets
import styles
class CustomMenu(QtWidgets.QWidget):
def __init__(self, parent=None, type=None):
QtWidgets.QWidget.__init__(self, parent)
self.layout = QtWidgets.QGridLayout()
# self.layout.setContentsMargins(0, 0, 0, 0)
self.layout.setSpacing(0)
... | timsmolyanin/work_examples | preamp_tof_gui/custom_menu.py | custom_menu.py | py | 912 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PySide2.QtWidgets.QWidget",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "PySide2.QtWidgets",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "PySide2.QtWidgets.QWidget.__init__",
"line_number": 9,
"usage_type": "call"
},
{
"... |
70768948159 | import cv2
from detection import AccidentDetectionModel
import numpy as np
import os
import streamlit as st
from PIL import Image
def load_image(img):
return Image.open(img)
st.title('Vehicle Accident Identificaiton System')
model = AccidentDetectionModel("model.json", 'model_weights.h5')
font = cv2.FONT_HERSHEY_S... | maddydevgits/vehicle-crash-identification | app.py | app.py | py | 864 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PIL.Image.open",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "streamlit.title",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "detection.AccidentDetectionMod... |
7503943203 | from flask import Flask
from providers.redis import RedisProvider
from providers.mongo import MongoProvider
from providers.in_memory import InMemoryProvider
from providers.postgres_direct import PostgresDirectProvider
from experiments.hit_count import HitCountExperiment
from experiments.single_entity import SingleEntit... | andrius-learns-things/studies | experiments/1/app/code/app.py | app.py | py | 1,273 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "providers.redis",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "providers.redis.RedisProvider",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "providers.m... |
27845898095 | import time
import random
import board
import digitalio
from PIL import Image, ImageDraw, ImageFont
#import adafruit_ssd1306
from luma.core.interface.serial import i2c
from luma.core.render import canvas
from luma.oled.device import ssd1327
#def rounded_rectangle(self: ImageDraw, xy, corner_radius, fill=None... | tlaukkanen/lunapi | src/face-1327.py | face-1327.py | py | 3,403 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PIL.ImageDraw",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "PIL.ImageDraw.rounded_rectangle",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "PIL.ImageDraw",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "digi... |
33369697380 | """Solving and counting Drive Ya Nuts puzzles.
A Drive Ya Nuts puzzle is a list of 7 hexagonal nuts, each identified by
a permutation of marks 0 through 5 arranged counterclockwise around its
edges. The nuts are arranged with puzzle[6] in the center, and
puzzle[0:6] in a ring counterclockwise around the center, w... | possibly-wrong/drive-ya-nuts | drive_ya_nuts.py | drive_ya_nuts.py | py | 5,487 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "itertools.permutations",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "itertools.permutations",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "itertools.product",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "itert... |
9689342242 | from pathlib import Path
import os
from django.urls import reverse_lazy
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/check... | AldereteEma28/proyectoInfo | source/settings/base.py | base.py | py | 4,366 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pathlib.Path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_num... |
37088996333 | import os
import cv2
import numpy as np
import json
from tqdm import tqdm
from copy import deepcopy
from pathlib import Path
img_exts=['jpg', 'png', 'jpeg', 'bmp', 'tif']
def img_resize(image, width_new = 1280, height_new = 720):
height, width = image.shape[0], image.shape[1]
# 设置新的图片分辨率框架
# 判断图片的长宽比率
... | 7eu7d7/pixiv_AI_crawler | labeler_folder.py | labeler_folder.py | py | 1,219 | python | en | code | 466 | github-code | 97 | [
{
"api_name": "cv2.resize",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number":... |
27837830781 | from sklearn.preprocessing import PolynomialFeatures
from fastsklearnfeature.declarative_automl.optuna_package.optuna_utils import id_name
class PolynomialFeaturesOptuna(PolynomialFeatures):
def generate_hyperparameters(self, space_gen, depending_node=None):
self.name = id_name('PolynomialFeatures_')
... | BigDaMa/DeclarativeAutoML | fastsklearnfeature/declarative_automl/optuna_package/autosklearn_flex/components/feature_preprocessers/polynomial.py | polynomial.py | py | 678 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "sklearn.preprocessing.PolynomialFeatures",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "fastsklearnfeature.declarative_automl.optuna_package.optuna_utils.id_name",
"line_number": 6,
"usage_type": "call"
}
] |
36900365461 | import json
import random as r
import tkinter as tk
#iniciacion de la ventana
#configuracion de ventana vvvvvvvvvv
ventana=tk.Tk()
ventana.title('capricho de lucas')
#anchoXalto
ventana.geometry('380x300')
ventana.configure(background='dark turquoise')
#declaracion de la funcion de la ventana:
def interfaz():
... | tomas0011/proyecto_lucapricho | datos.py | datos.py | py | 2,290 | python | es | code | 0 | github-code | 97 | [
{
"api_name": "tkinter.Tk",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 82... |
27830586611 | ## (C) 2016 Muthiah Annamalai,
from . import views
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# evaluate code by enqueuing in file
url(r'^eval/$',views.evaluate),
... | Ezhil-Language-Foundation/Ezhil-Lang | web/koodam/evalq/urls.py | urls.py | py | 720 | python | en | code | 167 | github-code | 97 | [
{
"api_name": "django.contrib.admin.autodiscover",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.conf.urls.patterns",
"line_number": 7,
"usage_type": "call"
},
{
"api... |
42471801957 | from PIL import Image
import numpy
import pywt
import sys
import cv2
def estimate_blur(image: numpy.array, threshold: int = 100):
if image.ndim == 3:
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
blur_map = cv2.Laplacian(image, cv2.CV_64F)
score = numpy.var(blur_map)
return blur_map, score, ... | YannickAaron/FullTikTokBot | app/contentCreator/detectBlurr.py | detectBlurr.py | py | 1,013 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.array",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "cv2.cvtColor",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "cv2.Laplacian",
... |
19873079762 | from pyuvdata import UVData
import numpy as np
from SSINS import util as u
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('obsfile')
parser.add_argument('indir')
parser.add_argument('outdir')
args = parser.parse_args()
obslist = u.make_obslist(args.obsfile)
for obs in obslist:
UV = UVData... | mwilensky768/MJW-MWA | HERA_Cal_Obs/HERA_Cal_Obs_Chunk.py | HERA_Cal_Obs_Chunk.py | py | 643 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "SSINS.util.make_obslist",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "SSINS.util",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "pyuvdata.UV... |
74596220159 | import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import argparse
plt.style.use("seaborn-dark")
parser = argparse.ArgumentParser()
parser.add_argument("-x", required=True)
parser.add_argument("-y", required=True)
parser.add_argument("-p", "--player", required=False)
parser.add_argument("-m", "--m... | lucaspellegrinelli/valorant-team-stats | bar.py | bar.py | py | 1,218 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 6,
"usage_type": "name"
},
{
"api_name"... |
39841947711 | import json
import os
import torch
from utils import set_seed, get_checkpoint_name
from transformers import AutoTokenizer, AutoModelForSequenceClassification, DataCollatorWithPadding
from torch.nn import functional as F
from collections import defaultdict
from utils import calculate_IR_metrics
from data import load_all... | chrysapz/Multi-Turn-Dialogue-Reasoning | evaluate.py | evaluate.py | py | 6,391 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "torch.cat",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "torch.cat",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "utils.calculate_IR_metrics",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "utils.RPF1",
"line... |
34202639741 | import re
import logging
import shutil
import os
logger = logging.getLogger(__name__)
cppkeyword = ('alignas', 'continue', 'friend', 'register', 'true',
'alignof', 'decltype' 'goto', 'reinterpret_cast', 'try',
'asm', 'default', 'if', 're... | ZhangYongChang/docker_env | xgen/xgen/util.py | util.py | py | 4,656 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 64,
"u... |
42453216825 | import json
import os
from copy import deepcopy
from datetime import datetime, timezone
from enum import Enum
from pathlib import Path
from typing import Any, Dict, Optional
from neural_compressor.ux.components.model.repository import ModelRepository
from neural_compressor.ux.components.optimization import Optimizatio... | mlcommons/inference_results_v2.1 | closed/Inspur/code/code_br/code/resnet50/modelProcess/inference_calibration/neural-compressor/neural_compressor/ux/utils/workload/workload.py | workload.py | py | 14,132 | python | en | code | 19 | github-code | 97 | [
{
"api_name": "neural_compressor.ux.utils.json_serializer.JsonSerializer",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 26,
"usage_type": "name"
},
{
"... |
2234741651 | import logging
import re
from collections import OrderedDict
from rest_framework.exceptions import NotFound
from rest_framework.request import Request
from rest_framework.response import Response
from rest_framework.views import APIView
from usaspending_api.awards.models import ParentAward
from usaspending_api.commo... | fedspendingtransparency/usaspending-api | usaspending_api/idvs/v2/views/amounts.py | amounts.py | py | 11,287 | python | en | code | 265 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "usaspending_api.common.helpers.sql_helpers.execute_sql_to_ordered_dictionary",
"line_number": 50,
"usage_type": ... |
5401761999 | """
Interface for creating prompts
"""
from nicegui import app, ui
from mysensei.generation import PromptParams, TCParams, TCRevisionParams, TCSoundParams
from mysensei.ui import PromptUI
# ==========
# Parameters
# ==========
N_CONCEPTS = 4
# ==========
# Components
# ==========
def _displayer(sub_prompt_uis: lis... | xavierfontaine/mysensei | app/main.py | main.py | py | 3,042 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "mysensei.ui.PromptUI",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "nicegui.ui.card",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "nicegui.ui",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "nicegui.ui.row",
... |
36619545605 | from io import BytesIO
from collections import OrderedDict
from jinja2 import Template
def get_url_parameters(url):
params = {}
val = ""
start = False
url_parts = [url_part for url_part in url.split("/") if url_part]
partN = 0
for url_part in url_parts:
if url_part:
if url_part[0] == "<" and url_part[-1] ==... | gjergjk71/dyluna | dyluna/dyluna.py | dyluna.py | py | 2,619 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "jinja2.Template",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "paste.httpserver.serve",
"line_number": 87,
"usage_type": "call"
},
{
"api_name": "paste.... |
26715441772 | from django.contrib import admin
from django.urls import path
from .views import *
urlpatterns = [
path('', index),
path('signin/', signin),
path('signup/', signup),
path('user-detail/', user_details),
path('healthy-food/', healthy_food),
path('logout/', logout_view)
]
| Jasleengarcha/E-Comm | home/urls.py | urls.py | py | 296 | python | en | code | 0 | github-code | 97 | [
{
"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",
... |
25516882641 | from collections import namedtuple
from ...compiler import blocks, expressions
UNSUPPORTED_META_FIELDS = {
u'@class': u'__typename'
}
SKIPPABLE_BLOCK_TYPES = (
# MarkLocation blocks are used in the first pass over the IR blocks to create a mapping of
# IR block -> query path for all IR blocks. They can ... | 0xflotus/graphql-compiler | graphql_compiler/compiler/ir_lowering_sql/constants.py | constants.py | py | 2,439 | python | en | code | null | github-code | 97 | [
{
"api_name": "compiler.blocks.MarkLocation",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "compiler.blocks",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "compiler.blocks.GlobalOperationsStart",
"line_number": 15,
"usage_type": "attribute"
... |
36512063959 | from pymongo import MongoClient
import re
from .error_handlers import InvalidData
class Mongo_crud:
"""CRUD con las operaciones de la API.
Parameters
----------
host: str
IP donde está funcionando la base de datos
username: str
Usuario de la bd
password: str
contraseña de la bd
auth_source: str
base ... | arodriguxn/api_genetics | app/mongo_crud.py | mongo_crud.py | py | 6,467 | python | es | code | 0 | github-code | 97 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 107,
"usage_type": "call"
},
{
"api_name": "re.IGNORECASE",
"line_number": 107,
"usage_type": "attribute"
},
{
"api_name": "re.compile",
... |
14962683784 | #!/usr/bin/env python
import rospy
from std_msgs.msg import Float32
from std_msgs.msg import String
from enum import Enum
# Define enums for data IDs
class DataID(Enum):
LATITUDE = 10
LONGITUDE = 20
DEPTH = 30
VELOCITY_X = 40
YAW = 50
BATTERY_STATE = 60
SBC_STATUS = 70
# Define a class ... | Vi-Ku/AUV-Test | BulkTopicSubscriberAndPublisher.py | BulkTopicSubscriberAndPublisher.py | py | 1,326 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "enum.Enum",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "rospy.Publisher",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "std_msgs.msg.String",
"line_number": 25,
"usage_type": "argument"
},
{
"api_name": "rospy.Subscriber",
... |
37831568148 | import pathlib
from matplotlib import pyplot as plt
import logging
from astropy import units as u
import diskchef.chemistry.scikit
from diskchef.physics.williams_best import WilliamsBest2014
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s %(name)-60s %(levelname)-8s %(message)s',
datefmt=... | rfranceschi/diskchef | examples/example/example.py | example.py | py | 1,654 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.basicConfig",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pathlib.Path"... |
28853281529 | import mysql.connector
import pandas as pd
import streamlit as st
import random
def add_new_user(conn:mysql.connector.connect, username, password, name, email):
cur = conn.cursor()
query = f"""
INSERT INTO users
values ('{username}', '{password}', '{email}');
"""
cur.execute(query... | seanwhitee/e-commerce | database.py | database.py | py | 3,153 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "mysql.connector.connector",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "mysql.connector",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "mysql.connector.connector",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_n... |
17610485753 |
import numpy as np
import pandas as pd
from enum import Enum
from copy import deepcopy
MAX_OUTS = 3
MAX_RUNS_PER_INNING = 5
MAX_INNINGS = 4
class Player:
p1b = 1.0
p2b = 1.0
p3b = 0.0
phr = 0.0
pso = 0.0 #struck out
pbo = 0.0 #hit but thrown out at first (useful for advancing a player)
... | jrs2/baseball_simulation | baseball_simulation.py | baseball_simulation.py | py | 12,567 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.random.choice",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "enum.Enum",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "copy.deepcopy",
"... |
28559122005 | import cv2
import torch.cuda
from torchvision import transforms
from transformers import CLIPProcessor, CLIPModel
from tqdm.notebook import tqdm
from db_utils.database_handler import *
folder = "E:\\Yolo_v3_pretrained\\dataset\\videos\\"
# dictionary to map the movie title and the respective local filepath
movie_filep... | PieroRendina/multidisciplinary-project-2023-INDYcs | products_detection_notebooks/video_detection.py | video_detection.py | py | 9,811 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "torchvision.transforms.ToTensor",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "transformers.CLIPProcessor.from_pretrained",
"line_number": 61,
"usage_type": "cal... |
33337958118 | import random, re
import matplotlib.pyplot as plt
p = re.compile(r'^(\d{1,3}) (\d{1,3})$')
with open("locations.txt") as txt:
coords = [[int(i) for i in p.search(l).groups()] for l in txt.readlines()]
res1 = [5,10,15,20,25,30,35,40] # only visit 3 of these
res2 = [2,4,6,8,10,20,22,32,33,35] # only visit 5 o... | Lab-Brat/tsp | Data.py | Data.py | py | 2,253 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "re.compile",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "random.sample",
"line_numbe... |
23947517853 | import json
import simplejson
import os
import logging
import tempfile
import pandas as pd
from datetime import timedelta
from airflow.models import BaseOperator
from airflow.utils.decorators import apply_defaults
from airflow.providers.google.cloud.hooks.gcs import GCSHook
class MergeHotelWeather(BaseOperator):
... | MustaphaAmine/hotel-book-tracks | mnt/airflow/dags/custom/operators/MergeHotelWeather.py | MergeHotelWeather.py | py | 2,712 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "airflow.models.BaseOperator",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "airflow.utils.decorators.apply_defaults",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "airflow.providers.google.cloud.hooks.gcs.GCSHook",
"line_number": 31,
... |
35449527371 | import pprint
from pydantic import BaseModel, Field
class InputSchema(BaseModel):
database_name: str = Field(
title='Database Name',
description='Name of the MongoDB database.'
)
collection_name: str = Field(
title='Collection Name',
description='Name of the MongoDB collec... | unskript/Awesome-CloudOps-Automation | Mongo/legos/mongodb_count_documents/mongodb_count_documents.py | mongodb_count_documents.py | py | 1,669 | python | en | code | 258 | github-code | 97 | [
{
"api_name": "pydantic.BaseModel",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "pydantic.Field",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pydantic.Field",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pydantic.Field",
"... |
1417982333 | from flask import Flask
import utils
app = Flask(__name__)
"""Создайте представление для роута `/` (главная страница).
Выведите список в таком формате (тег <pre> - преформатирование)"""
@app.route("/")
def index():
candidates = utils.get_all_candidates()
result = '<br>'
for candidate in candidates:
... | VyacheslavTim/Homework_13 | main.py | main.py | py | 1,809 | python | ru | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "utils.get_all_candidates",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "utils.get_candidates_by_pk",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "utils.... |
43210968271 | import numpy as np
import wave, array
import scipy.io as scio
import scipy.io.wavfile as wave1
from scipy import signal as si
import matplotlib.pyplot as plt
# a. Using experimentally measured HRIRs
# 1) Time domain
def loadHRIR1(database):
"""
Load up Head Related Impulse Response database as in horizontal a... | featherblacker/Mono-to-Stereo | Mono_to_Stereo.py | Mono_to_Stereo.py | py | 11,230 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "scipy.io.loadmat",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "scipy.io",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number"... |
20480177712 | from typing import Optional
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def hasCycle(self, head: Optional[ListNode]) -> bool:
"""
Determines if a singly-linked list contains a cycle.
Uses the ... | AndreBacic/DSA_Practice | linked lists/contains_cycle.py | contains_cycle.py | py | 629 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "typing.Optional",
"line_number": 10,
"usage_type": "name"
}
] |
18401698148 | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 18 15:19:47 2022
@author: Matt Dodd
"""
import numpy as np
from array_funcs import *
def hex_count(len_d, elements=0):
elements = len_d*6 + elements
if len_d ==0:
return elements
len_d = len_d-1
return hex_count(len_d,elements)
def rps(fmax,r,N):... | majedo-net/array_synthesis | hex_rps.py | hex_rps.py | py | 2,867 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.zeros",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numpy.cos",
"line_number": ... |
39922540067 | from collections import namedtuple
heart_rate_measurement_characteristic_id = '00002a37-0000-1000-8000-00805f9b34fb'
HeartRateMeasurement = namedtuple('HeartRateMeasurement', ['sensor_contact', 'bpm', 'rr_interval', 'energy_expended'])
def _parse_hr_measurement(data):
flags = data[0]
is_uint16_measurement_... | zacharyedwardbull/pycycling | pycycling/heart_rate_service.py | heart_rate_service.py | py | 2,409 | python | en | code | 84 | github-code | 97 | [
{
"api_name": "collections.namedtuple",
"line_number": 5,
"usage_type": "call"
}
] |
73268513280 | import argparse
import logging
import re
from requests.exceptions import HTTPError
from urllib3.exceptions import MaxRetryError
import datetime
import csv
from common import config
import news_page_object as news
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
#building regExp
is_well_... | abrahammanuel/web-scraper | extract/main.py | main.py | py | 3,199 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.basicConfig",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "re.compile",
... |
36356716496 | #coding=utf-8
import tensorflow as tf
import json
import re
import numpy as np
import random
from sklearn.metrics import r2_score
from scipy.stats import kendalltau
from sklearn import ensemble
import joblib
#邻接矩阵填充
def padding_zero_in_matrix(adjecent_matrix, module_operations):
len_operations = len(module_opera... | Ascend/samples | best_practices/contrib/performance_predictor/application_demo/demo1_performance_predictor/code/train_predictor.py | train_predictor.py | py | 5,199 | python | en | code | 78 | github-code | 97 | [
{
"api_name": "numpy.insert",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.insert",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number"... |
10217515748 | from __future__ import division, unicode_literals, print_function, absolute_import
import time
from .. import constants
from .resource import Resource
from .messagebased import MessageBasedResource
from . import helpers as hlp
class _GPIBMixin(object):
"""Common attributes and methods of GPIB Instr and Interfac... | caryan/pyvisa | pyvisa/resources/gpib.py | gpib.py | py | 9,179 | python | en | code | null | github-code | 97 | [
{
"api_name": "messagebased.MessageBasedResource",
"line_number": 100,
"usage_type": "name"
},
{
"api_name": "time.clock",
"line_number": 142,
"usage_type": "call"
},
{
"api_name": "time.clock",
"line_number": 148,
"usage_type": "call"
},
{
"api_name": "resource.R... |
39224315595 | import argparse
import random
import os
from PIL import Image
from tqdm import tqdm
SIZE = 128
parser = argparse.ArgumentParser()
parser.add_argument('--data_dir', default='../data/dataset', help='Directory with the currency dataset')
parser.add_argument('--output_dir', default='../data/224x224_currency', help='wher... | 10zinten/Indian-Currency-Recognition | build_dataset.py | build_dataset.py | py | 2,596 | python | en | code | 16 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "PIL.Image.BILINEAR",... |
6393562312 | import sys
import numpy as np
from bayes_opt import BayesianOptimization
from bayes_opt.util import UtilityFunction, Colours
from tools import write2tree2 as w
from tools.getdata import get_position, get_residuals
from tools.fitness import xyz_fit,residuals_fit
def black_box_function(wetz,dryz,Iu,Uu,PIu,PUu,Psigma)... | Malegoca/optimizer | BOpGipsy.py | BOpGipsy.py | py | 1,279 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tools.write2tree2.write2tree",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tools.write2tree2",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "sys.exit",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "tools.getdata... |
74814198397 | import torch
import torch.nn as nn
import torch.nn.functional as func
from tools import GesdSim
class Simler(nn.Module):
def __init__(self, negative_size, threshold):
super(Simler, self).__init__()
self.similarity = GesdSim(gamma=1.0, c=1.0)
self.negative_size = negative_size
sel... | zsliu98/Pytorch-AS | model/simler.py | simler.py | py | 2,072 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "tools.GesdSim",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.max",
"line_numbe... |
43476385227 | import numpy as np
import pandas as pd
import scipy.sparse as sp
import math
from sklearn.datasets import fetch_rcv1
def freq(x, prob=True):
return np.unique(x), x.value_counts(prob)
def freq2(x, y, prob=True):
df = pd.concat([x, y], axis=1)
return np.unique(x), np.unique(y), df.value_counts(normalize=p... | TheShadowKing19/PiAD-Zad4-Selekcja | main.py | main.py | py | 2,063 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.unique",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.unique",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "math.log",
"line_number": ... |
14851861203 | # 作用:获取本地的外网出口地址
import requests
import re
def getIP():
headers = {}
headers['User-Agent'] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36"
response = requests.get('http://www.baidu.com/s?wd=ip', headers=headers)
html = response.te... | 290149290/testaction | 获取ip.py | 获取ip.py | py | 3,274 | python | zh | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.localtime",
"line_number": 56,
"usage_type": "call"
}
] |
5385570889 | #!/usr/bin/env python
# coding=utf8
from setuptools import setup, find_packages
import os
if os.path.exists('requirements.txt'):
requirements = [x.strip() for x in open("requirements.txt").readlines()]
else:
requirements = []
# Create build meta
setup(
name="qcaudit",
version="{PYPI_VERSION}",
aut... | zycer/qqq | setup.py | setup.py | py | 542 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.exists",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "setuptools.setup",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",... |
32105184948 | from bayesian_optimization.plotter.plot import Plot
from bayesian_optimization.datahandler.data_table import COLUMNS
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
class RegretPlot(Plot):
def __init__(self, figsize, title, out_path, df):
super().__init__(figsize, title, out_path... | marketdesignresearch/NOMU | bayesian_optimization/bayesian_optimization/plotter/regret_plot_td.py | regret_plot_td.py | py | 2,649 | python | en | code | 9 | github-code | 97 | [
{
"api_name": "bayesian_optimization.plotter.plot.Plot",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.gca",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 33,
"usage_type": "name"
},
{
"ap... |
797654887 | # -*- coding: utf-8 -*-
"""
@File : cdndomain_list.py
@Time : 2023/6/30 12:01 下午
@Author : xxlaila
@Software: PyCharm
"""
from django.db import models
from django.db.models import F
import logging
import uuid
from domains.models.domain_list import CLOUD_CHOICES
__all__ = ['CdnDomainsList']
logger = logging.get... | xxlaila/domainer | domains/models/cdndomain_list.py | cdndomain_list.py | py | 3,805 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.db.models.Model",
"line_number": 69,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 69,
"usage_type": "name"
},
{
"api_name": "django... |
25974260654 | import unittest.mock
import datetime
from unittest.mock import MagicMock
from unittest.mock import patch
from clock.Clock import Clock
from clock.SpeakingClock import SpeakingClock
class TestSpeakingClock(unittest.TestCase):
def test_speaking_clock_gets_time_from_clock(self):
# arrange
# create ... | nicktodd/pythondemos | demos/testingAndMocking/TestSpeakingClock.py | TestSpeakingClock.py | py | 1,617 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "unittest.mock.TestCase",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "unittest.mock",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "clock.Clock.Clock",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "unittest.mo... |
23859019456 | from tifffile import imread
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
from PyQt5.QtWidgets import (QDialog, QSizePolicy, QApplication, QTableWidget, QVBoxLayout,
QPu... | grinic/tethers_analysis | GUI/utils.py | utils.py | py | 2,901 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tifffile.imread",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QApplication",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "subWindows... |
21298677506 | """
Will print whether or not there is a dog in the input image file.
"""
import argparse
from dog_breed.detectors import detectors
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Will print whether or not there is a dog in the input image file.')
parser.add_argument('-f', '--file', ... | smedagli/dog_breed | scripts/dog_detector.py | dog_detector.py | py | 542 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "dog_breed.detectors.detectors.is_dog",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "dog_breed.detectors.detectors",
"line_number": 13,
"usage_type": "name"
}
] |
2275384815 | """
Tools for shuffling a time interval data set,
i.e. where we know the start and end times and wish to know which months it contains.
"""
import logging
import pandas as pd
from .utilities import shuffle
from .progress_bar import ProgressBar
from .file_structure import START, END
class GetMonth:
"""
Iterat... | Stat-Cook/NuRS_Python_Executable | nurs_routines/utilities/month_tools.py | month_tools.py | py | 5,746 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "file_structure.START",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "file_structure.END",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "pandas.date_range",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "pandas.to_d... |
32585274595 | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 12 11:24:24 2022
@author: Christopher
"""
import numpy as np
import matplotlib.pyplot as plt
def defineCircle(p1, p2, p3):
"""
Returns the center and radius of the circle passing the given 3 points.
In case the 3 points form a line, returns (None, infinity).... | Chritopher-Gonzalez/Medtronic-Soft-Robotics- | Tests/circlePlot.py | circlePlot.py | py | 1,325 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "numpy.inf",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "numpy.sqrt",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot"... |
7371245499 | from datetime import datetime
from zoneinfo import ZoneInfo
from flask import Blueprint, render_template
from ichrisbirch.config import get_settings
settings = get_settings()
blueprint = Blueprint(
'health',
__name__,
template_folder='templates/health',
static_folder='static',
)
@blueprint.route('... | datapointchris/ichrisbirch | ichrisbirch/app/routes/health.py | health.py | py | 553 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "ichrisbirch.config.get_settings",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.Blueprint",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "... |
38866158286 | import os
import sys
import csv
import numpy as np
import pandas as pd
import scipy
import sklearn
from sklearn.model_selection import KFold
import matplotlib
import matplotlib.pyplot as plt
from PIL import Image
import gc
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
fr... | sunwng/SpyGR-segmentation | spygr_temp.py | spygr_temp.py | py | 5,732 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
28453119820 | # coding=utf-8
# pip3 install requests
import requests
import json
# Configuración de conexión con Thingsboard
url = "http://10.0.2.83/api/v1/A1_TEST_TOKEN/telemetry"
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-Authorization": "Bearer A1_TEST_TOKEN"
}
# Crear un dic... | fabianastudillo/TICsEnLaIndustria | Capitulo4/Nodos/nodo-api.py | nodo-api.py | py | 776 | python | es | code | 0 | github-code | 97 | [
{
"api_name": "json.dumps",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 26,
"usage_type": "call"
}
] |
10099911603 | import asyncio
from aiohttp import web
import json
import random
import os
import time
import struct
import socket
import sys
from collections import deque
wsclients = []
async def handle(request):
indexpage = None
with open('index.html', 'r') as indexfile:
indexpage=indexfile.read()
return web.... | adventureloop/streamingtalks | frontend/webapp.py | webapp.py | py | 5,529 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "aiohttp.web.Response",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "aiohttp.web",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "aiohttp.web.WebSocketResponse",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "aiohtt... |
72909135038 | import logging
from datetime import datetime
import pandas as pd
from django.utils import timezone
from core.models import Project
from core.models.url import UrlManager
from core.models.website import WebsiteManager
from exports.googleanalytics4_last_14m_export import GoogleAnalytics4Last14mExport
from exports.googl... | evgenipetrov/webtools | src/data_processors/url_data_processor.py | url_data_processor.py | py | 10,541 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "core.models.Project",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "exports.screamingfrog_list_crawl_export.ScreamingFrogListCrawlExport",
"line_number": 43,
"usage_ty... |
31439068287 | from core.tests.base import UserBaseTestCase
from django.urls import reverse
from json import loads
from core.tests.utils import data_provider
class ReferralCodeTestCase(UserBaseTestCase):
def setUp(self):
super(ReferralCodeTestCase, self).setUp()
# one referral code is created on first profile s... | hossamelneily/nexchange | referrals/tests/test_views.py | test_views.py | py | 1,304 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "core.tests.base.UserBaseTestCase",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.urls.reverse",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "core.t... |
26595002368 | import time
import jwt
from django.contrib import messages
from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import LoginView
from django.core.exceptions import PermissionDenied
from django.db import IntegrityError
from django.http import Ht... | nurr0/jaicrm | JaiCRM/Jaimain/views.py | views.py | py | 60,044 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "django.shortcuts.render",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "django.views.generic.ListView",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "django.utils.decorators.method_decorator",
"line_number": 42,
"usage_type": "call"
... |
22098401050 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import json
import logging
from typing import Any
import httpx
import pytest
from pytest_mock import MockerFixture
fro... | 0c0w3/merino-py | tests/unit/providers/test_adm.py | test_adm.py | py | 6,515 | python | en | code | null | github-code | 97 | [
{
"api_name": "typing.Any",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 67,
"usage_type": "name"
},
{
"api_name": "httpx.Response",
"line_number": 94,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": ... |
7031277966 | import glob
import numpy as np
import imageio
import os
visit_colors = {1:'black', 2:'red'}
edge_cnter = {}
g_i_edge_colors = []
for i, e in enumerate(euler_circuit, start=1):
edge = frozenset([e[0], e[1]])
if edge in edge_cnter:
edge_cnter[edge] += 1
else:
edge_cnter[edge] =... | dashingDragon/mp-tp | essai2.py | essai2.py | py | 1,855 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "glob.glob",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.argsort",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number":... |
21954139040 | from urllib import request
from django.shortcuts import render,redirect,get_list_or_404,get_object_or_404
from .models import *
from userapp.models import UserBookTableModel, UserFeedbackModel, UserRegModel
from django.contrib import messages
# Create your views here.
def restro_reg(request):
if request.metho... | nannapravalika/RestroBE | restaurentapp/views.py | views.py | py | 7,861 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "urllib.request.method",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "urllib.request.FILES",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "u... |
31461822989 | from __future__ import annotations
from django.core.cache import cache
from django.http import JsonResponse, HttpRequest
from django.views.decorators.csrf import csrf_exempt
from datetime import datetime, timedelta
from django.core.exceptions import ObjectDoesNotExist
import pathlib
from typing import Iterable
class ... | Calici/Django-Redis-InMemoryStorageHandler | src/requestHandler.py | requestHandler.py | py | 2,679 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.timedelta",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
... |
9305866644 | from django.db import models
from django.utils import timezone as tz
class Author(models.Model):
name=models.CharField(max_length=50)
class BlogPost(models.Model):
author = models.ForeignKey(Author,on_delete=models.CASCADE,related_name='blogposts')
title = models.TextField(max_length=250)
... | marzieraee/QueraExercise | blog/blog/blog/models.py | models.py | py | 841 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.db.models.Model",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "... |
36464074368 | from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
import os
# Init app
app = Flask(__name__)
basedir = os.path.abspath(os.path.dirname(__file__))
# Database
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + os.path.join(basedir, 'd... | m4ri4am/last-update- | app.py | app.py | py | 5,434 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_num... |
481353922 | import numpy as np
from keras.layers import Input, Conv2D, BatchNormalization, MaxPooling2D, Reshape, Dense, LSTM, add, concatenate, Dropout, Lambda, Flatten
from keras.models import Model
import keras.backend as K
from .STN.spatial_transformer import SpatialTransformer
class ModelCRNN:
def __init__(self, cfg):
... | fransafu/read-image-text | model/CRNN.py | CRNN.py | py | 3,736 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "keras.layers.Input",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "keras.layers.Conv2D",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "keras.layers.Conv2D",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "keras.laye... |
14412385105 | import psycopg2 as ps
def connect_sql():
HOSTNAME = 'db.fzlwltihnzomlghwgbnl.supabase.co'
USERNAME = 'postgres'
PASSWORD = 'HqeQhH+7%.wX_4e'
DATABASE = 'postgres'
connection = ps.connect(host=HOSTNAME, user=USERNAME, password=PASSWORD, dbname=DATABASE)
cursor = connection.cursor()
return (... | Maxime-de-Pape/DI-Bootcamp-Stage1 | bootcamp/Week4/DAY4/XP/menu_editor.py | menu_editor.py | py | 5,359 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "psycopg2.connect",
"line_number": 9,
"usage_type": "call"
}
] |
40943421972 | # Bu kod edalet_22 tərəfindən yazılıb
# Öz adına çıxaran peysərdi
# Bu yazıları silmədən işlədin
# t.me/RoBotlarimTg | YouTube: RoBotlarimTg |
# t.me/aykhan_s | t.me/edalet_22
# GitHub: EdaletRoBot
from telethon import events
import asyncio
import random
from telethon.tl.types import ChannelParticipantsBots
from tele... | EdaletRoBot/Start-Help_RoBotlarimTg | banda.py | banda.py | py | 1,580 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "telethon.events.NewMessage",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "telethon.events",
"line_number": 27,
"usage_type": "name"
}
] |
71738423999 | import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style({"axes.facecolor": ".95"})
def arrow(value):
a = None
if value == 0:
a = r'$\leftarrow$'
elif value == 1:
a = r'$\uparrow$'
elif value == 2:
a = r'$\rightarrow$'
elif value ... | leslie-CH/CSE257-Project | maze.py | maze.py | py | 7,803 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "seaborn.set_style",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "matplotli... |
73408891838 | from sklearn.linear_model import LogisticRegression
from sklearn.compose import make_column_transformer
from sklearn.compose import make_column_selector as selector
from imblearn.pipeline import make_pipeline as make_pipeline_with_sampler
from sklearn.impute import SimpleImputer
from sklearn.preprocessing import Sta... | jakobkolb/ml-covid-nowcasting | model/log_reg_model.py | log_reg_model.py | py | 1,581 | python | en | code | 6 | github-code | 97 | [
{
"api_name": "sklearn.pipeline.make_pipeline",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.StandardScaler",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sklearn.impute.SimpleImputer",
"line_number": 15,
"usage_type": "call... |
15342431040 | from email.policy import default
from problem.models import Problem
from account.decorators import login_required
from forumPost.models import ForumComment, ForumPost
from forumPost.serializers import CreateOrEditForumCommentSerializer, CreateOrEditForumPostSerializer, ForumPostSerializer, ForumCommentSerializer
from u... | vlo-software/bajton | OnlineJudge/forumPost/views/oj.py | oj.py | py | 4,609 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "utils.api.api.APIView",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "problem.models.Problem.objects.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "problem.models.Problem.objects",
"line_number": 18,
"usage_type": "attribute"
}... |
25387022897 | from rest_framework.views import APIView
from events.models import Events
from events.serializers import EventSerializers
from rest_framework.permissions import IsAuthenticated
from services.pagination import CustomPagination
from rest_framework.authentication import TokenAuthentication
from rest_framework.response imp... | cristianoroch56/community_app_backend | events/views.py | views.py | py | 4,106 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "rest_framework.authentication.TokenAuthentication",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "rest_framework.permissions.IsAuthenticated",
"line_number": 17... |
20342048896 | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 9 21:25:53 2019
@author: ajkra
"""
import numpy as np
from rpy2.robjects.packages import importr
import rpy2.robjects as robjects
from math import pi
import math
import sys
from FUNCTIONS_coordinate_conversions import *
from FUNCTIONS_plotting import *
... | ajkran2/Geologic-Model-Input-Uncertainty-Characterization | FUNCTIONS_ori.py | FUNCTIONS_ori.py | py | 9,459 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "rpy2.robjects.packages.importr",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
... |
29524388149 | __author__ = 'Vas Vasiliadis <vas@uchicago.edu>'
import sys
import time
import boto3
#import boto
import driver
from datetime import datetime
import subprocess
from botocore.exceptions import ClientError
from boto3.dynamodb.conditions import Key, Attr
import os
import json
from botocore.exceptions import ParamValidati... | asriram1/Cloud-Computing-Capstone-Project | ann/run.py | run.py | py | 6,173 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "configparser.SafeConfigParser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
41737908136 | from sklearn.manifold import TSNE
import matplotlib.pyplot as plt
import torch
import os
from dataset import str2slide, prepareLabels, SequenceDataset
from det_model import Darknet
from cls_model import create_model
import datetime
import joblib
class trans_PARAM:
def __init__(self):
x = {
'icn' : ... | Chrisa142857/You-Only-Look-Cytopathology-Once | qualitation-results/tsne_ana.py | tsne_ana.py | py | 16,580 | python | en | code | 15 | github-code | 97 | [
{
"api_name": "matplotlib.pyplot.scatter",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 55,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.show",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "ma... |
11239885137 | import config
import click
import pickle
import os
import re
import sys
from trogon import tui
from telethon.sync import TelegramClient
from textual import on
from textual.app import App, ComposeResult
from textual.containers import Horizontal
from textual.events import Mount
from textual.widgets import Footer, Header... | v1nc/telegram_music | main.py | main.py | py | 7,874 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "textual.app.App",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "textual.widgets.Header",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "textual.containers.Horizontal",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "... |
29341906619 | from PyQt5.QtWidgets import QDialog, QTreeWidget, QPushButton, QStatusBar, QVBoxLayout, QLabel, QFileDialog, QMessageBox, QTreeWidgetItem, QLineEdit, QComboBox, QFormLayout
from PyQt5.QtCore import QDateTime, QCoreApplication, QStandardPaths
import time
from .constants import langcodes
from .dictionary import getDictsF... | FreeLanguageTools/vocabsieve | vocabsieve/dictmanager.py | dictmanager.py | py | 10,225 | python | en | code | 216 | github-code | 97 | [
{
"api_name": "PyQt5.QtWidgets.QDialog",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "local_dictionary.LocalDictionary",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QTreeWidget",
"line_number": 26,
"usage_type": "call"
},
{
... |
14682805421 | from ListaDoblementeEnlazada import ListaDoblementeEnlazada #Importación del TDA Lista Doble
from ListaSimple import ListaSimple #Importación del TDA Lista Simpre
import xml.etree.ElementTree as ET #Importacion de el módulo ElementTree
from xml import etree ... | Diegomrza/IPC2_P1_1S_2021 | main.py | main.py | py | 4,382 | python | es | code | 0 | github-code | 97 | [
{
"api_name": "ListaDoblementeEnlazada.ListaDoblementeEnlazada",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 22,
"usage_type": "nam... |
36051587031 | from PIL import Image
img = Image.open("Jigsaw puzzle/png/原图.jpg")
print(img.size)
num = 0
for j in range(3):
for i in range(3):
cropped = img.crop((i*300, j*300, (i+1)*300, (j+1)*300))
cropped.save("Jigsaw puzzle/png/%s.jpg" % num)
num = num+1
i = i+1
j = j+1
| GLORYFeonix/Python_Learning_Homework | Jigsaw_Puzzle/Cut_Photo.py | Cut_Photo.py | py | 307 | python | en | code | 8 | github-code | 97 | [
{
"api_name": "PIL.Image.open",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 3,
"usage_type": "name"
}
] |
27919636331 | import pytest
from idbsocialdatapy import get_countries, get_sources, get_themes, query_dictionary
@pytest.fixture
def example_get_countries():
return get_countries()
@pytest.fixture
def example_get_themes():
return get_themes()
@pytest.fixture
def example_get_sources():
return get_sources()
@pytes... | EL-BID/idbsocialdatapy | tests/test_metadata.py | test_metadata.py | py | 2,987 | python | en | code | 6 | github-code | 97 | [
{
"api_name": "idbsocialdatapy.get_countries",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "idbsocialdatapy.get_themes",
"line_number": 13,
"usage_type": "call"
},
{
"api_na... |
32147119322 | # -*- coding:utf-8 -*-
from utils import *
from role import *
from TTS_MacApple import *
from TTS_Baidu import *
TTS_FLAG_FAILED = "Failed"
class TextDurationItem :
start = 0
duration = 0
text = ""
def combineAudio(destPath, fromPath, format_v):
from pydub import AudioSegment
if not fileExist(destPath):
myaud... | Asmot/TextToVoice | TTSUtil.py | TTSUtil.py | py | 2,993 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pydub.AudioSegment.from_file",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pydub.AudioSegment",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "pydub.AudioSegment.from_file",
"line_number": 21,
"usage_type": "call"
},
{
"api_... |
74078968320 | # -*- coding: utf-8 -*-
"""
Created on Mon Jul 27 08:26:42 2020
@author: David
"""
import itertools
from enum import IntEnum, Enum
from .dataframe_filtering.filtering import (
filter_dataframe
)
import os
from ..utils.settings import load_object, load_object_with_params
import json
from collect... | amunc/Optimal-Feature-Configuration-for-Dynamic-Malware-Classification-Code | tool/statistics/processing.py | processing.py | py | 13,594 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "utils.settings.load_object_with_params",
"line_number": 30,
"usage_type": "call"
},
{
"api_n... |
27025254364 | import rsa
import hashlib
from Crypto.Signature.pkcs1_15 import PKCS115_SigScheme
from Crypto.Hash import BLAKE2b
class Asymetric_Crypto:
def __init__(self, content: str, public_key: str, crypto_algorithm: str):
self.content = content.encode("utf-8")
self.crypto_algorithm = crypto_algorithm
... | Nahoer/TCHAI-CLEMENT-PRUNOT-KEVIN-LAMBLIN | src/asymetric_crypto.py | asymetric_crypto.py | py | 1,255 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "Crypto.Signature.pkcs1_15.PKCS115_SigScheme",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "Crypto.Hash.BLAKE2b.new",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "Crypto.Hash.BLAKE2b",
"line_number": 23,
"usage_type": "name"
},
... |
71231594239 | from typing import List
class Solution:
def longestConsecutive(self, nums: List[int]) -> int:
num_set = set(nums)
longest = 0
for num in num_set:
if num - 1 not in num_set:
length = 0
while num + length in num_set:
length += 1... | aravindas4/snippetbox-1 | leets/longest-consecutive-sequence.py | longest-consecutive-sequence.py | py | 505 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
}
] |
73683547518 | """Add table tokens
Revision ID: eeeede4c6639
Revises: d58a3bf35637
Create Date: 2022-02-05 21:35:46.857812
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "eeeede4c6639"
down_revision = "d58a3bf35637"
branch_labels = N... | lpite/directory.org.ua | migrations/versions/2022-02-05_add_table_tokens_eeeede4c6639.py | 2022-02-05_add_table_tokens_eeeede4c6639.py | py | 870 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "alembic.op.create_table",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.diale... |
34075063845 | #!/usr/bin/env python
import ipaddress
import pdb
import shelve
from plugins import PLUGINS, UNAVAILABLE_PLUGINS
DATA = None
VERBOSE = False
def ensure_structure(d):
try:
DATA['index']
except KeyError:
DATA['index'] = dict()
def main():
global DATA, VERBOSE
import argparse
... | pklaus/network-scanner | scan.py | scan.py | py | 2,627 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "ipaddress.ip_network",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "shelve.open",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "plugins.UNAV... |
25676916121 |
import os
import re
import copy
import json
import tensorflow as tf
import numpy as np
import time
from classes.keyboard_structure import KeyboardStructure
from classes.characters_placement import CharactersPlacement
start_time = time.time()
random_seed=961
np.random.seed(random_seed)
tf.random.set_seed(random_seed)... | kerenivasch/MKLOGA | mkloga/generate_network_data.py | generate_network_data.py | py | 7,639 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "time.time",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.random.set_s... |
404583973 | from . import catalog
from . import irodscatalog
from six.moves import configparser
from six import print_
import os
import os.path
import stat
import tempfile
import collections
# default config location
default_config_filename = os.path.join(os.path.expanduser('~'),
'.brocoli... | mesocentre-mcia/brocoli | brocoli/config.py | config.py | py | 2,817 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.path.expanduser",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict"... |
16429551546 | import dlib
import pickle
import numpy as np
from skimage import io
from iextraction import IExtraction
import matplotlib.pyplot as plt
class FacePrefExctractor(IExtraction):
def __init__(self, predictorFilePath):
self.shape_predictor_path = predictorFilePath
def __transform_to_global_coordinates(sel... | PaShTiDa/EyePredict | project/mlmodule/faceprefextractor.py | faceprefextractor.py | py | 3,531 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "iextraction.IExtraction",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "skimage.io.imread",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "skimage.io",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot... |
24066391555 | # -*- coding: utf-8 -*-
"""
Created on Wed Dec 7 08:33:48 2022
@author: Nino
"""
from aoc import *
import networkx as nx
import matplotlib.pyplot as plt
commands = read_input('day07')
G = nx.DiGraph()
# root node
node_id, cwd_id, cwd_name = 1, 1, '/'
G.add_node(node_id, name=cwd_name, size=0, ftype=0)
for c in ... | NKrvavica/AdventofCode2022 | day07.py | day07.py | py | 1,951 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "networkx.DiGraph",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "networkx.nodes",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "networkx.descendants",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "networkx.nodes",... |
37316239418 | import datetime
import os
import json
import re
import pickle
import requests
from bs4 import BeautifulSoup
from dateutil import parser
from traceback import format_exc
from retry import retry
from project.server.main.utils_swift import upload_object, download_object
from project.server.main.logger import get_logger
l... | dataesr/harvest-theses | project/server/main/referentiel.py | referentiel.py | py | 6,512 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "project.server.main.logger.get_logger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "retry.retry",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "json.d... |
21710193659 | import os
import tensorflow as tf
from tensor2tensor import problems
from tensor2tensor.bin import t2t_decoder # To register the hparams set
from tensor2tensor.utils import registry
from tensor2tensor.utils import trainer_lib
from tensor2tensor.visualization import attention
from tensor2tensor.visualization import v... | S4NdeeP/transformer-caption | visualization/TransformerVisualizationCaption.py | TransformerVisualizationCaption.py | py | 6,252 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "csv.field_size_limit",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "sys.maxsize",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "pickle.dump",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"... |
601755636 | from csv import reader
import sys
from pyspark import SparkContext
sc = SparkContext()
joined = sc.textFile(sys.argv[1], 1) # "/user/as9621/task1b.out")
joined = joined.mapPartitions(lambda x : reader(x))
joined = joined.map(lambda line : [elem.strip() for elem in line])
# agent_name x[20] | fare_amount x[5]
joi... | ahmed1/spark-rdd-sql | task4c.py | task4c.py | py | 637 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "pyspark.SparkContext",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "csv.reader",
"line_number": 9,
"usage_type": "call"
}
] |
26806102801 | import socket
import threading
import json
import time
import random
class Message:
def __init__(self, request, key, value, timestamp):
self.request = request
self.key = key
self.value = value
self.timestamp = timestamp
class Server:
def __init__(self, localIP, localPort, lead... | BrunoSNogueira/Coordinated_Servers | server.py | server.py | py | 7,098 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "socket.socket",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_STREAM",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "socket.erro... |
17115385913 | import logging
from logging.handlers import SysLogHandler
import os
import sys
import time
import re
from slackclient import SlackClient
log = logging.getLogger('starterbot')
# instantiate Slack client
slack_client = SlackClient(os.environ.get('SLACK_API_TOKEN'))
# starterbot's user ID in Slack: value is assigned aft... | raaperrotta/Slack_App | starterbot.py | starterbot.py | py | 4,178 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "slackclient.SlackClient",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.environ",
... |
10417205213 | import pygame, random, math, time, sys
# intialize the pygame
pygame.init()
SCREEN_WIDTH = 800
# Create the screen
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_WIDTH))
# Game area dimenision 600 X 600
AREA_START_POINT = 100 # X1 =100 , Y1 = 100
AREA_END_POINT = 700 # X2 = 700 , Y2 = 700
# Caption
pygam... | saurabhlanjewar/Snake-Game | snakegame.py | snakegame.py | py | 4,191 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pygame.init",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.s... |
34591600287 | import os
import shutil
import tempfile
from maxminddb.const import MODE_AUTO, MODE_MMAP
from ichnaea.geocode import GEOCODER
from ichnaea import geoip
from ichnaea.tests import DATA_DIRECTORY
GEOIP_BAD_FILE = os.path.join(DATA_DIRECTORY, "GeoIP2-Connection-Type-Test.mmdb")
GEOIP_TEST_FILE = os.path.join(DATA_DIRECT... | mozilla/ichnaea | ichnaea/tests/test_geoip.py | test_geoip.py | py | 5,969 | python | en | code | 527 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "ichnaea.tests.DATA_DIRECTORY",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.jo... |
32007034835 | ################################################################################################
''' Developed by Kalenia Marquez Florez
Aix Marseille Univ, CNRS, ISM, Marseille, France
June 2022
'''
import psutil
import logging
logging.info(psutil.virtual_memory())
# WRITE EXPORT FILE FOR EACH RUN
#90% of avai... | sarroyavet/BioDesign_joint_morphogenesis | Pyfile/write_ExportAster_file.py | write_ExportAster_file.py | py | 1,261 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.info",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "psutil.virtual_memory",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "psutil.virtual_memory",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.error"... |
33312341281 | from bot import SlackBot
from django.core.cache import cache
from django.conf import settings
from django.http import HttpResponse, JsonResponse, HttpResponseBadRequest
from django.shortcuts import render_to_response
from django.views.decorators.http import require_POST
from image_response import ImageResponse
from sla... | changecoin/changetip-slack | slack/views.py | views.py | py | 10,802 | python | en | code | 31 | github-code | 97 | [
{
"api_name": "django.conf.settings.SLACK_CLIENT_ID",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "django.conf.settings.SLACK_CLIENT_SECRET",
"line_number": 44,
"usage_type"... |
73878734400 | #Importing modules
from tkinter import*
from tkinter.font import Font
from PIL import ImageTk,Image
import random
import datetime
import mysql.connector
from tkinter import ttk
from tkinter import messagebox
import csv
room=[]
roomc=[]
day=[]
roomc2=[]
def csvfile():
File1=open("rooms.csv","w", newline='')
... | khairnarhg/pythonapp | HM.py | HM.py | py | 31,677 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "csv.writer",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "tkinter.font.Font",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "tkinter.font.Font",
"line... |
16535010337 | from django.contrib import admin
from .models import Doctor, Direction
class DoctorInline(admin.TabularInline):
model = Doctor.direction.through
class DoctorAdmin(admin.ModelAdmin):
list_display = ('id', 'name', 'directions', 'slug', 'description', 'birthday', 'work_experience')
search_fields = ['name'... | olegatorh/API_endpoints | api/admin.py | admin.py | py | 1,122 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.contrib.admin.TabularInline",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "models.Doctor.direction",
"line_number": 7,
"usage_type": "attribute"
},
{... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.