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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2774723378 | from rest_framework import serializers
from rest_framework.validators import UniqueValidator
from .models import Category, Comment, Genre, Review, Title, User
from .validations import uniq_review
class ObtainCodeSerializer(serializers.Serializer):
email = serializers.EmailField(
validators=[UniqueValidat... | alidzen/yamdb_final | api/serializers.py | serializers.py | py | 2,541 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "rest_framework.serializers.Serializer",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.EmailField",
"line_number": 9,
"usage_type... |
42022732592 | """
dict 服务端
功能:业务逻辑处理
模型:多进程tcp并发
"""
from socket import *
from multiprocessing import Process
import signal, sys
# 全局变量
HOST = '0.0.0.0'
PORT = 8001
ADDR = (HOST, PORT)
# 接受客户端请求,分配处理函数
def request(c):
while True:
data = c.recv(1024).decode()
print(c.getpeername(), ':', data)
# 搭建网络
def mai... | immmmt/gitimmmt | PythonLearning/Tedu/dict/dict_server.py | dict_server.py | py | 1,038 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "signal.signal",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "signal.SIGCHLD",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "signal.SIG_IGN",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
... |
31442696288 | #!/usr/bin/env python3
from KudoCop import SimulationDat
from KudoCop import SimulationDats
from KudoCop.utils import analyze_file_type
import numpy as np
import pandas as pd
import argparse
pd.set_option('display.max_rows', None)
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='... | kudoryutaro/kudocop | package/KudoCop_scripts/density.py | density.py | py | 2,672 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.set_option",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "KudoCop.SimulationDat",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "KudoCo... |
73738152862 | #Loading Required Modules
import csv
import matplotlib.pyplot as plt
import cv2
import numpy as np
import os
import keras
from keras.models import Sequential
from keras.layers import Flatten,Dense,Lambda,Dropout
from keras.layers.convolutional import Convolution2D, Cropping2D,MaxPooling2D
import sklearn
from sklearn.mo... | behnamprime/UDACITY-CarND-Behavioral-Cloning-P3 | model.py | model.py | py | 4,713 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "os.listdir",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "random... |
8798257403 | from flask import Flask, render_template, redirect, session
app = Flask(__name__)
app.secret_key = 'Jimmy Johns pizza is the pizza for you and me'
@app.route('/')
def index():
if 'count' not in session:
session["count"] = 0
else:
print["count"] += 1
return render_template("index.html")
@... | ktnguyen808/Flask_fundamentals | server.py | server.py | py | 451 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "flask.session",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "flask.session",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "flask.render_template",
"lin... |
8994433864 | import asyncio
import datetime
import logging
from decimal import Decimal
from byn.predict_utils import build_and_predict_linear
from byn.tasks.launch import app
from byn.postgres_db import (
NbrbKind,
get_last_predicted_trade_date,
get_valid_nbrb_gt,
insert_trade_dates_prediction_data,
)
start_predi... | demidov91/byn | byn/tasks/daily_predict.py | daily_predict.py | py | 1,450 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "datetime.date",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "byn.postgres_db.get_last_predicted_trade_date",
"line_number": 26,
"usage_type": "call"
},
{
"api... |
39529360840 | import logging
from flask import Blueprint, jsonify, request
from werkzeug.routing import ValidationError
from config import ONFIDO_TOKEN
from onfid.models import Check, Report, Webhook
log = logging.getLogger(__name__)
blueprint = Blueprint('onfido', __name__)
@blueprint.route(f'/v1/onfido/{ONFIDO_TOKEN}', method... | getdock/whitelist | app/onfid/views.py | views.py | py | 807 | python | en | code | 106 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.Blueprint",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.request.get_json",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flask.request... |
17743569950 | import argparse
import os
import time
from pathlib import Path
import cv2
from source.plate_detector import PlateDetector
from source.plate_recognizer import PlateRecognizer
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
def main():
output_dir_path = os.path.join(args.output, Pat... | SajjadAemmi/VLPR | python/inference_image.py | inference_image.py | py | 2,139 | python | en | code | 16 | github-code | 7 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
... |
12986466349 | #!/usr/bin/env python3
import os
from pathlib import Path
from gql import gql, Client
from gql.transport.requests import RequestsHTTPTransport
from jinja2 import Environment, FileSystemLoader
TEMPLATE_DIR = Path.cwd() / "templates"
OUTPUT_DIR = Path.cwd() / "output"
TEMPLATE_ROWS = 6
def get_repos(client, after=No... | staticintlucas/readme-stats | main.py | main.py | py | 3,873 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pathlib.Path.cwd",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pathlib.Path.cwd",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"li... |
30075918139 | from memory_profiler import profile
from threading import Thread, Timer
from threading import Semaphore
from collections import namedtuple as NT
from influxdb import InfluxDBClient
import logging
from logging.handlers import RotatingFileHandler
import time
from datetime import datetime
from datetime import timedelta
... | robitmoh/pysnmpcollector | measurement.py | measurement.py | py | 28,468 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "collections.namedtuple",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "binascii.hexlify",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "netsnmp.VarList",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "netsnmp.Sessi... |
24263825983 | # -*- coding: utf-8 -*-
"""
Example Services for using pypandoc
"""
from tempfile import NamedTemporaryFile
import pypandoc
class BasePandocService(object):
"""
Base class for converting provided HTML to a doc or docx
"""
file_object = None
def __init__(self):
self.service = self.get_ser... | JessicaTegner/pypandoc | examples/services.py | services.py | py | 1,989 | python | en | code | 740 | github-code | 7 | [
{
"api_name": "tempfile.NamedTemporaryFile",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "tempfile.NamedTemporaryFile",
"line_number": 59,
"usage_type": "call"
}
] |
23504301789 | from flask import Flask, render_template
import connecttodb
app = Flask(__name__)
@app.route("/")
def index():
# Load current count
f = open("count.txt", "r")
count = int(f.read())
f.close()
# Increment the count
count += 1
# Overwrite the count
f = open("count.txt", "w")
f.... | enkhtur0123/heroku-python-postgres | app.py | app.py | py | 674 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "connecttodb.rowcount",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "connecttodb.getdatabaseurl",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "flask.rend... |
21417286955 | import sqlite3
from sqlite3 import Error
import config
def create_connection():
conn = None;
try:
conn = sqlite3.connect(config.DATABASE)
return conn
except Error as e:
print(e)
return conn
def create_table(conn):
try:
sql = '''CREATE TABLE IF NOT EXISTS indices (
... | aidenphr/smol-dev | database.py | database.py | py | 928 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sqlite3.connect",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "config.DATABASE",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "sqlite3.Error",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "sqlite3.Error",
... |
23017715763 | from datetime import datetime
import piexif
filename = r"D:\temp\Сортировка фото\Несортированные\007.jpg"
exif_dict = piexif.load(filename)
new_date = datetime(2022, 7, 12, 8, 20, 10).strftime("%Y:%m:%d %H:%M:%S")
exif_dict['0th'][piexif.ImageIFD.DateTime] = new_date
exif_dict['Exif'][piexif.ExifIFD.DateTimeOriginal] ... | IgorAgarkov/fvsorter | insert_exif.py | insert_exif.py | py | 467 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "piexif.load",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "piexif.ImageIFD",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "piexif.ExifIFD",
... |
8973228594 | from element import Element
from parser import Parser
from interpreter.viedgets.service.viedget import Viedget
class TextViedget(Viedget):
keyword = "text"
swift_boilerplate = """Text("{text}"){swift_style}"""
dart_boilerplate = """Text(
"{text}",
style: TextStyle({dart_style}
)
)"""
dart_short_boi... | DEMIDOB/Swart | interpreter/viedgets/text_viedget.py | text_viedget.py | py | 2,224 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "interpreter.viedgets.service.viedget.Viedget",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "element.Element",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "parser.Parser",
"line_number": 58,
"usage_type": "call"
},
{
"api_nam... |
39989019912 | # Importing Required Modules
import logging
from telegram.ext import Updater
from bot.handlers.feedback import add_feedback_handlers
from bot.handlers.request import add_request_handlers
import bot.configs as vars
# Logging Stuff
logging.basicConfig(
level=logging.INFO,
format="%(asctim... | skr1405/Feedback-and-Request-Bot-TG | bot/__main__.py | __main__.py | py | 1,370 | python | en | code | 9 | github-code | 7 | [
{
"api_name": "logging.basicConfig",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "logging.INFO"... |
15670188037 | import urllib.request, urllib.parse, urllib.error
from bs4 import BeautifulSoup
import ssl
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
trt = input('Enter url: ')
mop = urllib.request.urlopen(trt, context=ctx).read()
soup = BeautifulSoup(mop, 'html.parser')
lst = list(... | fachiny17/python_py4info | exercise_12d(1).py | exercise_12d(1).py | py | 410 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "ssl.create_default_context",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "ssl.CERT_NONE",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "urllib.request.request.urlopen",
"line_number": 10,
"usage_type": "call"
},
{
"api_na... |
36600534512 | #!/usr/bin/env python
# coding: utf-8
# In[5]:
import tensorflow as tf
import numpy as np
from tensorflow.keras.preprocessing import image
# In[6]:
# load the saved model
model = tf.keras.models.load_model('accident_detection_model.h5')
# define a function to preprocess the image
def preprocess_image(img_path):... | drakpanda/Makeathon-ShockSquad | Software/Deploy.py | Deploy.py | py | 1,951 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "tensorflow.keras.models.load_model",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras.preprocessing.image.load_img",
"line_number": 20,
"usage_type":... |
74538115422 | import sys
import os
import numpy as np
path = os.getcwd()
path += "/engine"
sys.path.append(path)
from polygone import *
from vector import Vector
from transform import Transform
v1 = Vector(0,0)
v2 = Vector(2,1)
s = Segment(v1,v2)
vs = s.get_vector()
ls1 = s.get_line()
v = Vector(1,2)
v1 += v
v2 += v
s2 = Segme... | Daetheys/ProjetGenieLogiciel | engine/examples/ex_poly.py | ex_poly.py | py | 394 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "os.getcwd",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "vector.Vector",
"line_number... |
21356073228 | from fastapi import APIRouter, HTTPException, Depends
from fastapi.logger import logger
from sqlalchemy.orm import Session
from models.tag import Tag, TagCreate
import services.equipservice as crud
from database import get_db
from models.equipment import Equipment, EquipmentCreate, EquipmentPatch
from auth import requi... | roarengen/equiplib | backend/routes/equipment.py | equipment.py | py | 4,958 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "fastapi.Depends",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "auth.require_user",
"line_number": 13,
"usage_type": "argument"
},
{
"api_name": "sqlalchemy.or... |
9411504918 | '''
Common Preprocessor Module
'''
import queue as Q
import params
import utils
from .task import Task
class BasePreprocessor(Task):
'''
Base Preprocessor
'''
@property
def name(self):
return 'prep'
def apply(self, queue):
# The image shape maybe updated before preprocess
params.INROWS.va... | adamcavendish/Deep-Image-Steganography | model/common/preprocessor.py | preprocessor.py | py | 1,362 | python | en | code | 24 | github-code | 7 | [
{
"api_name": "task.Task",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "params.INROWS",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "params.INCOLS",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "params.INCNLS",
"... |
35156553266 | import hys_backend
from flask import Flask, render_template, request, redirect, flash, session, url_for
app = Flask(__name__)
app.secret_key = '7JmEPqJ82SiS9GciBNHB8k82Zg7AvOqg' # A little entropy for the session handling
halfy = hys_backend.MatrixSwitch()
pr = hys_backend.PowerRelay()
# If we have a session, load t... | thebopshoobop/halfyserial | hys_frontend.py | hys_frontend.py | py | 4,197 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "hys_backend.MatrixSwitch",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "hys_backend.PowerRelay",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.sessio... |
9890755165 | # coding: utf-8
"""
"""
import typing
from sqlalchemy.orm import Mapped, Query, relationship
from .. import db
from .utils import Model
if typing.TYPE_CHECKING:
from .languages import Language
class ActionTypeTranslation(Model):
__tablename__ = 'action_type_translations'
id: Mapped[int] = db.Column(d... | sciapp/sampledb | sampledb/models/action_translations.py | action_translations.py | py | 4,833 | python | en | code | 21 | github-code | 7 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "utils.Model",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.orm.Mapped",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "sqlalchem... |
20862019850 | import telebot
import requests
import json
bot = telebot.TeleBot('6448669823:AAG5yiZrIDrNTp7kdsor4zH8hv3nzClJVDI')
API = 'abee9796a740914ece3366a6f2860a40'
@bot.message_handler(commands=['start'])
def start(message):
bot.send_message(
message.chat.id, 'Напиши город, в котором хочешь узнать погоду')
@bo... | roflerboom/tg-bot | weather.py | weather.py | py | 1,020 | python | ru | code | 0 | github-code | 7 | [
{
"api_name": "telebot.TeleBot",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 21,
"usage_type": "call"
}
] |
10835959446 | import itertools
from operator import itemgetter
def sieve(buses):
"""
https://en.wikipedia.org/wiki/Chinese_remainder_theorem#Search_by_sieving
"""
step, start = buses[0]
for i, (bus, remainder) in enumerate(buses[1:]):
for count in itertools.count(1):
timestamp = start + count... | szampier/adventofcode2020 | src/day13.py | day13.py | py | 1,191 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "itertools.count",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "operator.itemgetter",
"line_number": 22,
"usage_type": "call"
}
] |
37520455382 | import math
from typing import Dict, List, Optional
import sys
import torch
import torch.nn as nn
from fairseq import search, utils
from fairseq.data import data_utils
from fairseq.models import FairseqIncrementalDecoder
from torch import Tensor
from fairseq.ngram_repeat_block import NGramRepeatBlock
class SequenceG... | yandex-research/proxy-dirichlet-distillation | fairseq/fairseq/sequence_generator.py | sequence_generator.py | py | 81,503 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "torch.nn.Module",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "fairseq.ngram_repeat_block.NGramRepeatBlock",
"line_number": 90,
"usage_type": "call"
},
{
"api_nam... |
39539112090 | """A renderer base class."""
from __future__ import annotations
from abc import ABC, abstractmethod
from contextlib import contextmanager
from dataclasses import dataclass, field
from types import TracebackType
from typing import ContextManager, Iterator, Optional, Text, Type, TypeVar
from ..messages import Event
... | getcuia/cuia | src/cuia/renderer/renderer.py | renderer.py | py | 1,909 | python | en | code | 18 | github-code | 7 | [
{
"api_name": "typing.TypeVar",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "typing.ContextManager",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "abc.ABC",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "dataclasses.field",
... |
14198736515 | # from pudb import set_trace; set_trace()
from typing import List
import math
from collections import Counter, defaultdict
class Solution:
def displayTable(self, orders: List[List[str]]) -> List[List[str]]:
"""Very straightforward data wrangling problem.
The tricky part is everything in orders is... | FanchenBao/leetcode | LeetCode_1418.py | LeetCode_1418.py | py | 2,058 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "typing.List",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "collections.defaultdict",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 20,
"usage_type": "argument"
}
] |
40023309400 | from imdb import IMDb
class Movie(object):
def __init__(self, title):
# create an instance of the IMDb class
self.ia = IMDb()
search_results = self.ia.search_movie(title)
self.movie = None
for movie in search_results:
if movie["kind"] == "tv series" or movie["k... | Awolize/TV-Show-Tracker---Google-Sheets | movieHandler.py | movieHandler.py | py | 1,453 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "imdb.IMDb",
"line_number": 7,
"usage_type": "call"
}
] |
24559484027 | import json
import logging
import os
import tempfile
import time
from abc import ABC
from io import StringIO
from pathlib import Path
from typing import Any, Dict, Iterator, List, Mapping, Optional, Sequence, Union
from urllib.parse import urlparse
import requests
from langchain_core.documents import Document
from lan... | langchain-ai/langchain | libs/community/langchain_community/document_loaders/pdf.py | pdf.py | py | 26,024 | python | en | code | 68,990 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "langchain_community.document_loaders.unstructured.UnstructuredFileLoader",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "unstructured.partition.pdf.partition_pdf",
"line_n... |
14696200763 | import pandas as pd
import os
import codecs
from io import StringIO
import math
with codecs.open(os.path.abspath("with_retweets.csv"), 'r', encoding='utf-8', errors='ignore') as fdata:
tweets_string = fdata.read()
tweets = pd.read_csv(StringIO(tweets_string), low_memory=False)
re_tweets = tweets[tweet... | papaemman/Social-Network-Analysis-AUTh | src/graph_creation.py | graph_creation.py | py | 3,335 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "codecs.open",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_num... |
28161194820 | # launcher.py
from flask import Flask, request
import os
import subprocess
import logging
app = Flask(__name__)
logging.basicConfig(level=logging.INFO)
@app.route('/run-script', methods=['POST'])
def run_script():
# extract job name from headers
job_name = request.headers.get('X-MyScript-Name', '')
loggi... | aditibhatia05/python-projects | generative-ai-trending-topics-disseminator/launcher.py | launcher.py | py | 803 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "flask.request.headers.... |
71935577503 | try:
import cv2 as cv
except ImportError:
pass
import glob
import logging
import re
import threading
import time
class PlanktonHDMIException(Exception):
pass
class PlanktonHDMI:
_VIDEO_STREAM_THREAD_JOIN_TIMEOUT_SECS = 1.0
def __init__(self, uvc_video_index=None, uvc_video_port=None,
capt... | arccode/factory | py/test/fixture/dolphin/plankton_hdmi.py | plankton_hdmi.py | py | 8,748 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "logging.debug",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "logging.debug",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_PROP_FPS",
"... |
30332148619 | import cv2 as cv
import numpy as np
def video():
capture = cv.VideoCapture(0)
while(True):
ret ,frame = capture.read()
frame = cv.flip(frame,1)
if ret == False:
break
hsv = cv.cvtColor(frame,cv.COLOR_BGR2HSV)
lower_hsv = np.array([0, 43, 46])
upper_hs... | 907597029/back_up | test8video.py | test8video.py | py | 586 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.flip",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2HSV",
"line_nu... |
70373643103 | #@PydevCodeAnalysisIgnore
"""add_water_level_attr
Revision ID: 0bbe624e28b8
Revises: 65a56457757f
Create Date: 2020-12-18 11:58:29.886532
"""
from alembic import op
from sqlalchemy.orm.session import Session
import sqlalchemy as sa
# revision identifiers, used by Alembic.
from yasmine.app.enums.xml_node import XmlN... | iris-edu/yasmine-stationxml-editor | backend/yasmine/alembic/versions/0bbe624e28b8_add_water_level_attr.py | 0bbe624e28b8_add_water_level_attr.py | py | 1,278 | python | en | code | 8 | github-code | 7 | [
{
"api_name": "alembic.op.get_bind",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.orm.session.Session",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "yasmine... |
3664648095 | import csv
import numpy as np
import scanpy as sc
from scipy.stats import norm, gamma
import torch
from torch import nn
from torch.utils.data import Dataset, DataLoader
import anndata
import matplotlib.pyplot as plt
import copy
import os
def load_db(adata, file = 'human_lr_pair.tsv'):
print("Loading Database...")... | mcgilldinglab/CellAgentChat | src/model_setup.py | model_setup.py | py | 9,987 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "csv.reader",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.average",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "numpy.std",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "scipy.stats.norm.cdf",
"line_n... |
39022519050 | from unittest import mock
import pytest
import torch
import matplotlib.pyplot as plt
from src.datasets import BaseDataset
from src.utils import MultiLevelTimer
class TmpData(BaseDataset):
def __init__(self, n, **kwargs):
self.n = range(n)
super().__init__(**kwargs)
def __len__(self):
... | jspenmar/monodepth_benchmark | tests/test_datasets/test_base.py | test_base.py | py | 7,489 | python | en | code | 83 | github-code | 7 | [
{
"api_name": "src.datasets.BaseDataset",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pytest.raises",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "src.datasets.BaseDataset",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "src.d... |
8585976199 | from aiogram.types import ReplyKeyboardMarkup, KeyboardButton
b1 = KeyboardButton('/Найти_работника')
b2 = KeyboardButton('/Сделать_выборку_сотрудников_по_должности')
b3 = KeyboardButton('/Сделать_выборку_сотрудников_по_зарплате')
b4 = KeyboardButton('/Добавить_сотрудника')
b5 = KeyboardButton('/Удалить_сотрудника')
... | Pol888/home_work_10_py | keyboard.py | keyboard.py | py | 1,324 | python | ru | code | 0 | github-code | 7 | [
{
"api_name": "aiogram.types.KeyboardButton",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "aiogram.types.KeyboardButton",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "aiogram.types.KeyboardButton",
"line_number": 6,
"usage_type": "call"
},
{
... |
18513803088 | import matplotlib.dates as mdates
import mplcursors
import numpy as np
from matplotlib import pyplot as plt
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg
spline = False
labels = {}
class MlpTimelineCanvas(FigureCanvasQTAgg):
'''
Класс холста Qt для помещения рисунка Matplotlib
'''
... | user160244980349/VAST2014 | ui/timeline/mlpTimeline.py | mlpTimeline.py | py | 3,535 | python | ru | code | 2 | github-code | 7 | [
{
"api_name": "matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg.__init__",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "matplotlib.backends.backend_qt... |
69870874462 | from enum import Enum
from flask import Flask
from flask_restplus import Api, Resource, fields, reqparse
app = Flask(__name__)
api = Api(app)
# Перечисление для выбора поля сортировки
class SortingField(Enum):
NAME = 'name' # Для сортировки по имени
AGE = 'age' # Для сортировки по возрасту
... | rommie/lab2 | students/main.py | main.py | py | 12,950 | python | ru | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask_restplus.Api",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "enum.Enum",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": ... |
10104099070 | import os
from pathlib import Path
from shutil import copyfile
from deepclustering.manager import ConfigManger, yaml_load
from deepclustering.model import Model, to_Apex
from deepclustering.utils import fix_all_seed
from main import get_dataloader
DATA_PATH = Path(".data")
from analyze import AnalyzeInference
def ... | jizongFox/DeepClusteringProject | analyze_main.py | analyze_main.py | py | 4,487 | python | en | code | 6 | github-code | 7 | [
{
"api_name": "pathlib.Path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_numbe... |
70308209822 | import numpy as np
import tensorflow as tf
import requests
# Beispieldaten zum Lernen (Außentemp/Vorlauf) (noch einen zweiten graden ausdenken, für raum temp und anhand dessen 3satz)
train_data = np.array([[20,21,0.25], [10,21,0.4375], [0,21,0.5874], [-10,21,0.7125], [-20,21,0.85], [-30,21,1],
... | Ningal13/Heizungssteuerung | test.py | test.py | py | 2,823 | python | de | code | 0 | github-code | 7 | [
{
"api_name": "numpy.array",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "tensorflow.constant_initializer",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.Sequential",
"line_number": 21,
"usage_type": "call"
},
{
"api_name":... |
8314966678 | import json
import numpy as np
import pandas as pd
from datetime import timedelta, date
f = open('neighbor-districts-modified.json')
data = json.load(f)
vaccine_data=pd.read_csv("vaccination_data_district_wise.csv")
state_list=vaccine_data.loc[1:,'State']
dist_codes=[]
for i in data:
if i[:2] not in dist_codes:
... | akash-panzade28/Data-mining-Assignment | Assign 1/21111006-assign1/Q5.py | Q5.py | py | 10,496 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "json.load",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_... |
9110558327 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time
# @Author : Huix
# @File
# @Software: PyCharm
import os
import tkinter as tk
from tkinter import * # 导入 Tkinter 库
from tkinter.filedialog import askdirectory
import multiprocessing
import threading
import platform
import getpass
from InstallApk ... | LindomHu/Batch-installer | DeviceManager.py | DeviceManager.py | py | 12,740 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.system",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "getpass.getuser",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "platform.system",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Pool",
... |
13791408502 | import numpy as np
import pandas as pd
import io
from PIL import Image
import matplotlib
from anndata import AnnData
import networkx as nx
from typing import Optional, Union, Mapping # Special
from typing import Sequence, Iterable # ABCs
from typing import Tuple # Classes
from textwrap import dedent
from enum imp... | BiomedicalMachineLearning/stLearn | stlearn/utils.py | utils.py | py | 4,202 | python | en | code | 125 | github-code | 7 | [
{
"api_name": "enum.Enum",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "matplotlib.axes.Axes",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "matplotlib.axes.SubplotBase",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "matpl... |
26869271353 | import time
import traceback
# import pyttsx3
import utils.constants as Constants
from actuators.actuator import Actuator
import logging
logger = logging.getLogger("mqtt-nao-interface.actuators.speech.tts")
class TextToSpeech(Actuator):
""" Text to speech actuator. Processes direcctives that indicate what to sa... | dellannadavide/MQTT-Nao-Interface | actuators/speech/tts.py | tts.py | py | 3,728 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "actuators.actuator.Actuator",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "utils.constants.NAO_SERVICE_TTS",
"line_number": 15,
"usage_type": "attribute"
},
{
... |
5634774508 | import sympy
from random import randint
import base64
import io
from sympy import *
from numpy import *
import matplotlib.pyplot as plt
from sympy.parsing.sympy_parser import parse_expr
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
plt.switch_backend... | banano111/MetodosNumericos_Ex1 | MN.py | MN.py | py | 2,062 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "matplotlib.pyplot.switch_backend",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "sympy.symbols",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matp... |
72705441183 | import os
import numpy as np
from Bio import SeqIO
import logging
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
def import_epigenetic_dataset(files_path, cell_line, perc=1.0):
if cell_line not in ["GM12878", "HelaS3", "HepG2", "K562"]:
raise ValueError... | lipry/GenomeRegulatoryRegionNN | src/dataset_utils.py | dataset_utils.py | py | 7,036 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.path.exists",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
4685677801 | from asyncio import Lock
from pyrogram import filters
from pyrogram.types import Message
from TechlockRobot import pbot as app
from TechlockRobot import arq
from TechlockRobot.utils.dbfunctions import get_trust_db, update_trust_db
from TechlockRobot.utils.filter_groups import trust_group
spam_db = {}
lock_access =... | SatishMarisetty/TechlockRobot | TechlockRobot/modules/trust.py | trust.py | py | 1,576 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "asyncio.Lock",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pyrogram.types.Message",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "TechlockRobot.arq.nlp",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "TechlockRob... |
34863593442 | """
Date and time utils for SHTOOLS
"""
import datetime as _datetime
def _yyyymmdd_to_year_fraction(date):
"""Convert YYYMMDD.DD date string or float to YYYY.YYY"""
date = str(date)
if '.' in date:
date, residual = str(date).split('.')
residual = float('0.' + residual)
else:
re... | SHTOOLS/SHTOOLS | pyshtools/utils/datetime.py | datetime.py | py | 752 | python | en | code | 314 | github-code | 7 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "datetime.timedelta",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "... |
34180583605 | from flask_jwt_extended import jwt_required
from flask_restful import Resource
from flask import render_template, make_response, request, session
from models import Skills, Jobs, AppliedJobs
class LoginPage(Resource):
def get(self):
return make_response(render_template('login.html', data={'login_page': Tr... | Fasil005/job_portel_flask | templates.py | templates.py | py | 1,979 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask_restful.Resource",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "flask.make_response",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask_r... |
13499659165 | import gym
import random
import numpy as np
from tqdm import tqdm
def PartidasRandom(num_partidas = 2000, score_minimo = 50):
env = gym.make('CartPole-v0')
env.reset()
partidas_train = []
for _ in range(num_partidas):
done = False
observation = env.reset()
movimientos_partida ... | SergioPN/ReinforcementLearning | cosasvarias/cartpole-v0/Generacion_Partidas.py | Generacion_Partidas.py | py | 999 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "gym.make",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 20,
"usage_type": "call"
}
] |
23524694740 | import av
import av.container
import czeditor.util.avhelper
import numpy as np
from PySide6.QtCore import QFileInfo
# PyAV video reader with intelligent seeking.
class PyAVSeekableVideoReader:
def __init__(self, filename):
self._filename = filename
self._container: av.container.InputContainer =... | CZEditor/CZEditor | czeditor/avreader.py | avreader.py | py | 3,535 | python | en | code | 27 | github-code | 7 | [
{
"api_name": "av.container",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "av.open",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "PySide6.QtCore.QFileInfo",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.full",
"... |
21403180595 | #import libraries and modules
from langchain.agents import Tool, AgentExecutor, LLMSingleActionAgent, AgentOutputParser, agent
from langchain.chains import llm
from langchain.prompts import StringPromptTemplate
from langchain import OpenAI, LLMChain
from typing import List, Union
import re
from langchain.schema ... | AishaNoory/Reasoning_agent_LangChain | Custom_Agent.py | Custom_Agent.py | py | 5,448 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "openai.api_key",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "langchain.agents.T... |
69849412062 | import numpy as np
import pytest
from ase.cluster.icosahedron import Icosahedron
from ase.neighborlist import neighbor_list
sym = 'Au'
a0 = 4.05
ico_cubocta_sizes = [1, 13, 55, 147, 309, 563, 923, 1415]
ico_corner_coordination = 6
ico_corners = 12
def coordination_numbers(atoms):
return np.bincount(neighbor_lis... | elinscott/ase_koopmans | ase/test/test_cluster.py | test_cluster.py | py | 746 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "numpy.bincount",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "ase.neighborlist.neighbor_list",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "ase.cluster.icosahedron.Icosahedron",
"line_number": 20,
"usage_type": "call"
},
{
... |
1199332885 | import keras
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras.utils import to_categorical
from keras.preprocessing import image
import numpy as np
import pandas as pd
from PIL import Image
import cv2
from keras.models import mo... | nhbala/AI-Matheq | cnn.py | cnn.py | py | 2,151 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sklearn.utils.class_weight",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "sklearn.utils.class_weight.compute_class_weight",
"line_number": 27,
"usage_type": "call"
},... |
26726155198 | ##################################################################################
# Module: db_sql_runner
# Purpose: Basic SQL helper routines
#
# Notes:
#
##################################################################################
import data_pipeline.utils.dbuser as dbuser
import data_pipeline.db.factory ... | albertteoh/data_pipeline | validate/utils/db_sql_runner.py | db_sql_runner.py | py | 1,271 | python | en | code | null | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "data_pipeline.utils.dbuser.get_dbuser_properties",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "data_pipeline.utils.dbuser",
"line_number": 18,
"usage_type": "name"
... |
43262491664 | import logging
import os
import sys
from typing import List
import click
from spsdk.apps.tp_utils import (
TPConfigConfig,
device_help,
get_counters,
list_tpdevices,
multiple_tp_dict,
process_tp_inputs,
tp_device_options,
)
from spsdk.apps.utils import (
CommandsTreeGroupAliasedGetCfgT... | kaposh/spsdk | spsdk/apps/tpconfig.py | tpconfig.py | py | 5,452 | python | en | code | null | github-code | 7 | [
{
"api_name": "logging.basicConfig",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "logging.WARNING",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "click.group",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "spsdk.apps.utils... |
7621524973 | import numpy as np
import cv2
import dlib
import time
from scipy.spatial import distance as dist
from imutils import face_utils
import playsound
def trigger_alarm():
playsound.playsound('alarm2.mp3')
def cal_yawn(shape):
top_lip = shape[50:53]
top_lip = np.concatenate((top_lip, shape[61:64]))
low_l... | shubhamslngh/AIDriverSafety | combo.py | combo.py | py | 3,570 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "playsound.playsound",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.concatenate",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.concatenate",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
... |
30781962341 | import json
import re
import logging
from ldap3.core import exceptions
from ldap3.utils.conv import escape_filter_chars
from ldap3 import Server, Connection, SIMPLE, RESTARTABLE, SUBTREE, ALL, ALL_ATTRIBUTES
from ldap3.utils.ciDict import CaseInsensitiveDict
import saq
import saq.email
connection = None
def connect():... | ace-ecosystem/ACE | saq/ldap.py | ldap.py | py | 3,885 | python | en | code | 23 | github-code | 7 | [
{
"api_name": "ldap3.Connection",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "ldap3.Server",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "saq.CONFIG",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "saq.CONFIG",
"line_... |
14852664605 | """ Aioauth-client example. """
import asyncio
from aiohttp import web
import html
from pprint import pformat
from aioauth_client import (
BitbucketClient,
FacebookClient,
GithubClient,
GoogleClient,
OAuth1Client,
TwitterClient,
VKClient,
YandexClient,
)
app = web.Application()
clien... | butla/aioauth-client | example/app.py | app.py | py | 5,293 | python | en | code | null | github-code | 7 | [
{
"api_name": "aiohttp.web.Application",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "aiohttp.web",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "aioauth_client.TwitterClient",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "aioa... |
13250460313 | #! /usr/bin/env python3
# import ros stuff
import rospy
from sensor_msgs.msg import LaserScan
from geometry_msgs.msg import Point
from ackermann_msgs.msg import AckermannDrive, AckermannDriveStamped
from nav_msgs.msg import Odometry
from tf.transformations import euler_from_quaternion
import math
# global constants
... | lnt-hien/beginner_tutorials | scripts/go_to_point_rev.py | go_to_point_rev.py | py | 4,475 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "math.pi",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "geometry_msgs.msg.Point",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "geometry_msgs.msg.Point",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "tf.trans... |
13442504735 | # -*- coding: utf-8 -*-
import numpy as np
from numpy.testing import assert_array_almost_equal
from scipy.sparse import csc_matrix
from scipy.linalg import orthogonal_procrustes
from fmralign.alignment_methods import (
DiagonalAlignment,
Hungarian,
Identity,
OptimalTransportAlignment,
POTAlignment... | Parietal-INRIA/fmralign | fmralign/tests/test_alignment_methods.py | test_alignment_methods.py | py | 6,746 | python | en | code | 17 | github-code | 7 | [
{
"api_name": "numpy.random.randn",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros_like",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.eye",
... |
23017742663 | import ctx as ctx
import discord
import asyncio
from discord.ext.commands import bot
import time
fazendo = 0
client = discord.Client()
ROLE = "「✅」 ᴡʜɪᴛᴇʟɪsᴛ"
nome =''
from discord.utils import get
@client.event
async def on_ready():
print("BOT ONLINE")
print(client.user.na... | Igovi/DiscordGtaRpBotQuiz | main.py | main.py | py | 10,905 | python | pt | code | 0 | github-code | 7 | [
{
"api_name": "discord.Client",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "discord.__version__",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "discord.utils.get",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "discord.uti... |
72900420062 | """
https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/
"""
from typing import List
class Solution:
def maxProfit(self, prices: List[int]) -> int:
rslt = 0
for i in range(1, len(prices)):
rslt += max(prices[i] - prices[i - 1], 0)
return rslt
prices = [7, 1, 5... | eronekogin/leetcode | 2019/best_time_to_buy_and_sell_stock_ii.py | best_time_to_buy_and_sell_stock_ii.py | py | 367 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "typing.List",
"line_number": 10,
"usage_type": "name"
}
] |
25798613694 | import discord
from discord.ext import commands
from discord.ext import commands, tasks
from discord.voice_client import VoiceClient
import youtube_dl
import random
import asyncio
from discord.ext import commands
from discord.utils import get
from discord import Embed, Color
import os
import aiofiles
import praw
import... | HOLM564/Discord-py-bot | main.py | main.py | py | 9,424 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "discord.Client",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands.Bot",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands",
"line_number": 53,
"usage_type": "name"
},
{
"api_name": "discord.... |
37924848405 | from django.conf.urls import url
from django.conf import settings
from django.conf.urls.static import static
from . import views
# 说明该模块是属于blog应用的
app_name = 'blog'
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^post/(?P<pk>[0-9]+)/$',
views.PostDetailView.as_view(), name='... | Ehco1996/django_blog | blog/urls.py | urls.py | py | 881 | python | en | code | 52 | github-code | 7 | [
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.... |
17241721008 | import unittest
import json
from werkzeug.datastructures import ContentRange
from werkzeug.wrappers import response
from tests.auth.v2.basecases import TestBaseCase
class AuthenticationTestCase(TestBaseCase):
"""
Test class for the registration endpoint
"""
def setUp(self) -> None:
"""
... | Bakley/mc45_flaskAPI | tests/auth/v2/test_user_view_register.py | test_user_view_register.py | py | 1,090 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "tests.auth.v2.basecases.TestBaseCase",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "tests.auth.v2.basecases.TestBaseCase.setUp",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "tests.auth.v2.basecases.TestBaseCase",
"line_number": 18,
... |
2256634847 | from aawedha.io.base import DataSet
from aawedha.paradigms.erp import ERP
from aawedha.paradigms.subject import Subject
from aawedha.utils.network import download_file
from mne import Epochs, pick_types, events_from_annotations
from mne import set_log_level
from mne.io import concatenate_raws, read_raw_edf
import panda... | okbalefthanded/aawedha | aawedha/io/essex.py | essex.py | py | 12,498 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "aawedha.io.base.DataSet",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "mne.set_log_level",
"line_number": 130,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 142,
"usage_type": "call"
},
{
"api_name": "mne.io.concaten... |
8587794635 |
from django.shortcuts import render
from django.template.loader import render_to_string
from upload_media.models import UploadMedia
from user.models import UserMail
from .forms import TicketForm
from .models import Ticket
from .utils import send_email
def home(request):
tickets = Ticket.objects.all().order_by('-... | HamdyAbdelhamidHamdy/help-desk | ticket/views.py | views.py | py | 1,603 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "models.Ticket.objects.all",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "models.Ticket.objects",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "models.Ticket",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "dj... |
69957632545 | import pygame #Подключение pygame
import os #Подключение os
import json #Подключение json
#Начинаем работу с кодом
pygame.init() #Дополнительные возможности pygame
card_width = 190 #Ширмна карт
card_height = 320 #Высота карт
step = 10 #Не знаю как это назвать, поэтому назову перемещение
# config = {
# "scre... | dimasribnyj14/HomeWorksDimaSribnyj | Practice/Second Course Logika/Game/main.py | main.py | py | 6,198 | python | ru | code | 2 | github-code | 7 | [
{
"api_name": "pygame.init",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_numb... |
25269130148 | import databaseManager as dbManager
import srcomAPIHandler
import json
import os
dirPath = os.path.dirname(os.path.realpath(__file__))
insertList = []
for category in ["oob", "inbounds", "unrestricted", "legacy", "glitchless"]:
print("starting", category)
with open(dirPath+f"/downloads/{category}DL.json", "r")... | William-Carter/ThatOtherLeaderboard | plugSrcomRuns.py | plugSrcomRuns.py | py | 1,536 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.path.dirname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_numb... |
72844153502 | import os
import argparse
import numpy as np
from tqdm import tqdm
parser = argparse.ArgumentParser()
parser.add_argument('--gt_path', type=str, default='./data_preprocessed_bs1/gt')
parser.add_argument('--output_path', type=str, default='./output_bs1/')
parser.add_argument('-b', '--batch_size', type=int, default=1)
... | Ascend/ModelZoo-PyTorch | ACL_PyTorch/built-in/cv/Flownet2_for_Pytorch/Flownet2_postprocess.py | Flownet2_postprocess.py | py | 1,481 | python | en | code | 31 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_... |
37523634961 | """Handles a new SSH connection."""
import logging
import threading
from pathlib import Path
import paramiko
from .ssh_honeypot_server import SSHHoneypotServer
logger = logging.getLogger()
def handle_ssh_connection(
client,
address,
rsa_key,
data_file_name: Path,
data_file_lock: threading.Lock... | dennisbakhuis/ssh_honeypot_server | ssh_honeypot/server/handle_ssh_connection.py | handle_ssh_connection.py | py | 1,132 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "threading.Lock",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "paramiko.Transport... |
24832015907 | import pytest
import tvm
from raf._ffi.pass_ import FromRelay, InferType, LiftBranchBody
from raf.ir import ScopeBuilder
from tvm import relay
def test_basic_if():
main = relay.GlobalVar("main")
def get_recursive_mod():
sb = ScopeBuilder()
mod = tvm.IRModule()
# Recursive function f
... | awslabs/raf | tests/python/pass/test_pass_lift_branch_body.py | test_pass_lift_branch_body.py | py | 2,590 | python | en | code | 133 | github-code | 7 | [
{
"api_name": "tvm.relay.GlobalVar",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tvm.relay",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "raf.ir.ScopeBuilder",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "tvm.IRModule",
"l... |
72512633504 | '''
Use the VERY SAME methods (as far as possible) to test on actual known heatmaps
Compute by hand what the answer *should* be
'''
import math
import numpy as np
import json
import cv2
import copy
class AccuracyTester():
def __init__(self, joint_accur=None, joints=None, output=None, nStack=None, gtMaps=None, bat... | hannahcy/stacked-hourglass | accuracy_testing.py | accuracy_testing.py | py | 5,040 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "math.sqrt",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "numpy.argmax",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 79,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 80,... |
35941605710 | from django.contrib.auth.decorators import login_required
from django.db.models.signals import pre_save, pre_delete
from django.dispatch import receiver
from django.http import HttpResponseRedirect, JsonResponse
from django.shortcuts import get_object_or_404, render
from django.template import loader
from django.urls i... | AlexeyDubrov/Django_geekshop | basketapp/views.py | views.py | py | 3,436 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "django.shortcuts.render",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.decorators.login_required",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "django.http.HttpResponseRedirect",
"line_number": 33,
"usage_type":... |
15823020236 | import json
import requests
from dtwechat.settings import APP_ID, APP_SECRET
from wechat.Start.startDev import get_access_token
def setcomment(openid_lst, comment_lst):
access_token = get_access_token(APP_ID, APP_SECRET, access_token_type='test_gzh')
url_set = 'https://api.weixin.qq.com/cgi-bin/user/info/upd... | dingtong8/dtwechat | wechat/UserManage/setUserComments.py | setUserComments.py | py | 870 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "wechat.Start.startDev.get_access_token",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "dtwechat.settings.APP_ID",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "dtwechat.settings.APP_SECRET",
"line_number": 9,
"usage_type": "argumen... |
22407882148 | from __future__ import absolute_import
from __future__ import print_function
import numpy as np
np.random.seed(1337) # for reproducibility
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras... | alyato/lfw_fuel | example/run-lfw.py | run-lfw.py | py | 2,592 | python | en | code | null | github-code | 7 | [
{
"api_name": "numpy.random.seed",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sys.path",
"lin... |
27765555059 | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import logging
import re
import subprocess
from googlecloudsdk.core.util import encoding
_GIT_PENDING_CHANGE_PATTERN = ('^# *('
'Untracked files|'
... | twistedpair/google-cloud-sdk | google-cloud-sdk/lib/googlecloudsdk/command_lib/builds/deploy/git.py | git.py | py | 2,115 | python | en | code | 55 | github-code | 7 | [
{
"api_name": "re.search",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "re.MULTILINE",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "googlecloudsdk.core.util.encoding.Decode",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "... |
8747064155 | import argparse
import yaml
import io
import torch
from torch import nn
def parse_opt():
parser = argparse.ArgumentParser()
parser.add_argument('--model', type=str, default="resnet18", help='model name')
parser.add_argument('--config', type=str, default="", help='config .yaml file')
parser.add_argumen... | avgurov2000/LIVECell | utils/parser.py | parser.py | py | 1,791 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "yaml.safe_load",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "torch.device",
"line_number": 55,
"usage_type": "call"
}
] |
8768920410 | from transformers import Trainer, Wav2Vec2ForCTC, Wav2Vec2ForSequenceClassification,\
Wav2Vec2Model, DataCollator, TrainingArguments, Wav2Vec2Processor, Wav2Vec2FeatureExtractor
from datasets import Dataset, Audio, load_dataset
from huggingface_hub import login, hf_hub_download, HfFolder
from safetensors.torch impo... | markjosims/zugubul | src/zugubul/models/train.py | train.py | py | 10,143 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "typing.Union",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "os.PathLike",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "typing.Union",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "os.PathLike",
"line_nu... |
74209998942 | import z3
from miasm.ir.translators import Translator
from miasm.expression.expression import *
translator = Translator.to_language("z3")
values = [
(42, 10, 4, 2),
(-42, 10, -4, -2),
(42, -10, -4, 2),
(-42, -10, 4, -2)
]
for a, b, c, d in values:
cst_a = ExprInt(a, 8)
cst_b = ExprInt(b, 8)
... | cea-sec/miasm | test/expression/z3_div.py | z3_div.py | py | 994 | python | en | code | 3,204 | github-code | 7 | [
{
"api_name": "miasm.ir.translators.Translator.to_language",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "miasm.ir.translators.Translator",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "z3.Solver",
"line_number": 21,
"usage_type": "call"
},
{
... |
24559064387 | """Anyscale Endpoints chat wrapper. Relies heavily on ChatOpenAI."""
from __future__ import annotations
import logging
import os
import sys
from typing import TYPE_CHECKING, Dict, Optional, Set
import requests
from langchain_core.messages import BaseMessage
from langchain_core.pydantic_v1 import Field, SecretStr, roo... | langchain-ai/langchain | libs/community/langchain_community/chat_models/anyscale.py | anyscale.py | py | 7,945 | python | en | code | 68,990 | github-code | 7 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "langchain_community.chat_models.openai.ChatOpenAI",
"line_number": 31,
"usage_type": "name"
},
... |
39380840501 | #! /usr/bin/env python3
from enum import Enum
class Cell(Enum):
painted = '#'
clear = '.'
class Surface:
def __init__(self):
self.rows = 0
self.columns = 0
self.matrix = {}
def import_from_file(self, filename):
with open('simple.in', 'r') as f:
self.rows, s... | Horgix/google-hashcode-2016 | practice-painting/painting.py | painting.py | py | 1,192 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "enum.Enum",
"line_number": 5,
"usage_type": "name"
}
] |
34292727077 | from argparse import ArgumentParser
from argparse import RawDescriptionHelpFormatter
import os
import sys
import logging
class CmdLineAble(object):
"""
Bundles methods that are required by the command line tools that this file provides
"""
def __init__(self):
pass
def getParser(se... | tholzheim/wikirender | wikifile/cmdline.py | cmdline.py | py | 4,246 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "argparse.RawDescriptionHelpFormatter",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "logging.basicConfig",
"line_number": 50,
"usage_type": "call"
},
{
"... |
74211615904 | import pygame as pg
import random
import time
import numpy as np
pg.init()
SIZE = 100
HEIGHT = 700
WIDTH = 1000
BOXCOUNT = 15
SPEED = 0.5
SHOWN = (140, 140, 220)
EMPTY = (170,170,170)
BACKGROUND = (255,255,255)
FONT = pg.font.SysFont("timesnewroman.ttf", 72)
TEXT = (20, 20, 20)
class Game:
... | EgeEken/Aim | Aim.py | Aim.py | py | 3,578 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pygame.init",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygame.font.SysFont",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pygame.font",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.set_mo... |
42002592510 | import os
from dotenv import load_dotenv
load_dotenv()
TOKEN = os.getenv('TOKEN')
HEROKU_APP_NAME = os.getenv('HEROKU_APP_NAME')
PORT = os.getenv('PORT')
DATABASE_URL = os.getenv('DATABASE_URL', '')
if DATABASE_URL.startswith('postgres://'):
DATABASE_URL = DATABASE_URL.replace('postgres', 'postgresql')
API_... | kapizm/kinderstore-bot | src/config.py | config.py | py | 393 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 11... |
18337215350 | from unicodedata import name
from django.urls import path
from . import views
urlpatterns = [
path("", views.index, name="index"),
path("wiki/<str:title>/", views.entry, name="entry"),
path("wiki/create", views.create, name="create"),
path("wiki/randompage", views.randompage, name="randompage"),
p... | hincheyjosh/wiki | encyclopedia/urls.py | urls.py | py | 408 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
70897334942 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('Factz', '0018_auto_20150923_2251'),
]
operations = [
migrations.AddField(
model_name='message',
name... | bcorwin/MsgSender | Factz/migrations/0019_auto_20150924_1022.py | 0019_auto_20150924_1022.py | py | 583 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AddField",
"line_number": 14,
"usage_type": "call"
},
{
... |
11342965115 | from flask import Flask
import os
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager, login_manager
from flask_bcrypt import Bcrypt
from flask_session import Session
# gives current directory of this file
basedir = os.path.abspath(os.path.dirname(__file__))
# instance of the Flask class
myapp... | ptdanhhh/StudyHub-Flask | myapp/__init__.py | __init__.py | py | 1,149 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.path.abspath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_num... |
74226030942 | #!/usr/bin/env python
# coding: utf-8
# Library of Python functions created to help convert ROCKETSEIS and CALIPSO data
import os
print(os.getcwd())
import shutil
import glob
import pandas as pd
from obspy.core import Stream, read
import numpy as np
from obspy.core.utcdatetime import UTCDateTime
import warnings
wa... | gthompson/kitchensinkGT | PROJECTS/CALIPSO/SeismicDataConvertGT.py | SeismicDataConvertGT.py | py | 17,990 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "os.getcwd",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "warnings.filterwarnings",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"lin... |
16853408600 | import wx
import wx.lib.throbber as throb
import MatroxFramegrabber
import numpy as np
class wxSaviorTopPanel(wx.Panel):
"""Image acquisition control panel
"""
def __init__(self,
parent,
matrox_frame_grabber_wx_event_generator,
local_savior_path = '... | Eurybiadan/Fixation_GUI | pre_modified_server_side_scripts/wxSaviorTopPanel.py | wxSaviorTopPanel.py | py | 15,833 | python | en | code | 4 | github-code | 7 | [
{
"api_name": "wx.Panel",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "wx.Panel.__init__",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "wx.Panel",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "wx.GridBagSizer",
"l... |
2155945309 | """Disposable module with temporary work-arounds until upstream changes are made in Dask/Xarray"""
import warnings
import xarray as xr
import dask.array as da
from dask.dataframe import DataFrame
from dask.array import Array
from dask.array.overlap import overlap, trim_internal
from numbers import Integral
# pylint: di... | related-sciences/gwas-analysis | notebooks/platform/xarray/lib/dask_ext.py | dask_ext.py | py | 7,931 | python | en | code | 23 | github-code | 7 | [
{
"api_name": "dask.array.Array",
"line_number": 89,
"usage_type": "argument"
},
{
"api_name": "warnings.warn",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "tlz.get",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "tlz.get",
"line_number... |
40234022478 | """
API endpoints for the global teacher campus sync
"""
from django.conf import settings
from django.utils.translation import get_language
from cms.api import add_plugin
from cms.models import Page
from rest_framework.decorators import api_view
from rest_framework.exceptions import ValidationError
from rest_framework... | eduNEXT/ednx-richie-site-factory | sites/unesco/src/backend/unesco/courses_api/api.py | api.py | py | 4,681 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "rest_framework.exceptions.ValidationError",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "cms.models.Page.objects.get",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "cms.models.Page.objects",
"line_number": 58,
"usage_type": "attribu... |
1617498920 | # Method to iterate through an image collection and merge images that are found within the
# same 16-day LANDSAT passover chunk.
import ee
import copy
ee.Initialize()
def mergeByChunk(imgcoll):
imgcoll = imgcoll.toList(imgcoll.size())
seq = ee.List.sequence(0, imgcoll.size().subtract(1), 1)
def addI... | mincej/ExportTables | MergeChunk.py | MergeChunk.py | py | 6,246 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "ee.Initialize",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "ee.List.sequence",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "ee.List",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "ee.Image",
"line_numbe... |
75155339423 | import argparse
import os
from datetime import datetime as dt
from time import sleep
import estClient.est.errors as est_errors
import estClient.est.client as est_client
import OpenSSL.crypto as openssl
NUM_TRY_LATER_ATTEMPTS = 2 # Number of times request should be resent on HTTP 202-Try Later
class bcolors:
HEAD... | bbc/nmos-est-client | nmosEstClient/nmosest.py | nmosest.py | py | 13,185 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "estClient.est.client.Client",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "estClient.est.client",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "OpenSSL.crypto.load_certificate",
"line_number": 52,
"usage_type": "call"
},
{
"... |
70264944223 | import asyncio
import aiohttp
import re
import itertools
from util import *
class Scouter:
def __init__(self, replays=list, names=list):
self.names = set(names)
self.replay_list = replays
self.valid_replays = 0
self.replay_data = self.retrieve_data(replays)
self.mon_data = [... | MubsPokesart/1v1Scouter | scouter.py | scouter.py | py | 14,245 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "asyncio.set_event_loop_policy",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "asyncio.WindowsSelectorEventLoopPolicy",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "asyncio.run",
"line_number": 39,
"usage_type": "call"
},
{
"... |
70996324703 | from __future__ import annotations
import itertools
import logging
import re
from requests import Response
from typing import TYPE_CHECKING, Union
from collections import defaultdict
from dkutils.constants import (
API_DELETE,
API_GET,
API_POST,
API_PUT,
)
from dkutils.datakitchen_api.vault import V... | DataKitchen/DKUtils | dkutils/datakitchen_api/kitchen.py | kitchen.py | py | 17,889 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "datakitchen_client.DataKitchenClient",
"line_number": 28,
"usage_type": "name"
},
{
"api_n... |
39080515596 | import json
import pprint
from abc import ABC
from pathlib import Path
from econicer.auxiliary import json2Dict
pp = pprint.PrettyPrinter()
class Settings(ABC):
_settingsName = ""
def listCurrentSettings(self):
"""Print all attributes"""
print(f"Current {self._settingsName} settings:")
... | Spiony/econicer | econicer/settings.py | settings.py | py | 4,723 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pprint.PrettyPrinter",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "abc.ABC",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 24,
"usage_type": "argument"
},
{
"api_name": "pathlib.Path",
"line... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.