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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15226744942 | from flask import Flask, jsonify, request, render_template
import random
import requests
from bs4 import BeautifulSoup
from sqlalchemy.sql.expression import func
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from models import *
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"]... | mcDeeplearning/flask_kakao_chatbot | app.py | app.py | py | 3,603 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask_migrate.Migrate",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "flask.jsonify... |
14020575799 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import telnetlib
import socket
from pylms.server import Server
import Config
from Exceptions import ServerNotFoundException
server = None
def provide():
global server
"""
:rtype: Server
"""
config = Config.get_config()
hostname = config.get('... | mastercad/lms-client | src/LMSServerProvider.py | LMSServerProvider.py | py | 753 | python | de | code | 0 | github-code | 97 | [
{
"api_name": "Config.get_config",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pylms.server.Server",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "telnetlib.Telnet",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "socket.error",... |
29089560451 | import os
import rpa as r
from bs4 import BeautifulSoup
from urllib.request import urlparse, urljoin
import sys
from fpdf import FPDF
import time
import logging
import sendmail
internal_urls = []
external_urls = []
visited_urls = []
form_urls = []
vuln_forms = []
non_vuln_forms = []
generated_pocs = {}
def is_valid(u... | Frankwotfurters/RedTeamAutomation | Scripts/csrf.py | csrf.py | py | 6,555 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "urllib.request.urlparse",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "urllib.request.urlparse",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "rpa.dom",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "rpa.url",
... |
25273472647 | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import gym
from matplotlib import pyplot as plt
import os
os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE'
env = gym.make('Pendulum-v0').unwrapped
'''Pendulum环境状态特征是三个,杆子的sin(角度)、cos(角度)、角速度,(状态是无限多个,因为连续),动作值是力矩,限定在[-2,2]之间的任意的小数... | xinzhao101/- | ppo1_lisan.py | ppo1_lisan.py | py | 11,376 | python | zh | code | 1 | github-code | 97 | [
{
"api_name": "os.environ",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "gym.make",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "torch.manual_seed",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_... |
70589697280 | # coding=utf-8
import re
from typing import Optional, List
from PyQt5.QtCore import QObject, QRegularExpression, pyqtProperty, pyqtSlot
from PyQt5.QtCore import QVariant
from PyQt5.QtCore import pyqtSignal
from PyQt5.QtGui import QColor, QFont
from PyQt5.QtGui import QTextCharFormat
from PyQt5.QtQml import QJSValue
f... | thejoeejoee/VUT-FIT-IFJ-2017-toolkit | ifj2017/ide/code/expression/exp_syntax_highlighter.py | exp_syntax_highlighter.py | py | 4,135 | python | en | code | 23 | github-code | 97 | [
{
"api_name": "PyQt5.QtCore.QObject",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.pyqtSignal",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtCore.QVariant",
"line_number": 28,
"usage_type": "argument"
},
{
"api_name":... |
1412153101 | import functools
import json
from flask import Flask, Blueprint, session, make_respose
from flask_restful import request, Api, abort, Resource, url_for
app = Flask(__name__)
app.config["SECRET_KEY"] ="THUgLif3"
api_bp = Blueprint("api", __name__)
api = Api(api_bp)
"""
Below uses default config;
spaces -> 4
"""
@api... | collinsmarra/dumb-api | app.py | app.py | py | 2,526 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.Blueprint",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask_restful.Api",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_num... |
40166948138 | from django.urls import path
from ..main.views import AddBookingView, LoginView, RegistrationView, MyLogoutoView, AboutUsView
urlpatterns = [
path('AddBooking/', AddBookingView.as_view(), name='AddBooking'),
path('login/', LoginView.as_view(), name='Login'),
path('registration/', RegistrationView.as_view()... | Wiwoucho/FirstDjangoWebApp | ExamProject/main/urls.py | urls.py | py | 466 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "main.views.AddBookingView.as_view",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "main.views.AddBookingView",
"line_number": 5,
"usage_type": "name"
},
{
"api_nam... |
31443068309 | import logging
from moon_engine.api import configuration
from moon_engine.api.authz import authz
LOGGER = logging.getLogger("moon.manager.authz_driver")
AuthzManager = None
class Driver:
"""
Generic driver
"""
def __init__(self, driver_name, engine_name):
self.name = driver_name
se... | opnfv/moon | moon_engine/moon_engine/authz_driver.py | authz_driver.py | py | 1,268 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "moon_engine.api.configuration.get_authz_driver",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "moon_engine.api.configuration",
"line_number": 18,
"usage_type": "name"
... |
33070674288 | import os
import argparse
from pathlib import Path
from dotenv import load_dotenv
import pandas as pd
from tqdm import tqdm
from langchain.llms import Ollama
from loggers import log_message_with_traceback
load_dotenv()
DE_TOOLS_LOG = os.getenv("DE_TOOLS_LOG")
JOBS_PROCESSED = os.getenv("JOBS_PROCESSED")
DE_TOOLS_OU... | offraildev/linkedin-bot | extraction_scripts/extract_de_tools.py | extract_de_tools.py | py | 2,020 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number":... |
16361935657 |
import sys
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton
def prepareGui():
app= QApplication(sys.argv) # gui for append all component sys.argv attach sys with prg
window = QWidget() # create window
window.resize(400,500)
# window.setWindowIcon(QIcon... | farid07a/PLC_Project | GUI_Practice/P1.py | P1.py | py | 932 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PyQt5.QtWidgets.QApplication",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "Py... |
9493001912 | import socketio
import json
import threading
import time
import alsaaudio
# The ObjectRecognitionWorker class starts the object recognition service on a seperate thread, where it
# uses a socket to connect to the YOLO server. Via the socket, it receives detected objects, and relays them
# as audio. Takes in a priorit... | varunven/EE475Capstone | object_recognition_refactored.py | object_recognition_refactored.py | py | 5,640 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "socketio.Client",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "alsaaudio.Mixer",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "json.loads",
"li... |
18935224624 | import board
from DB.models import Alarm, Comment, User, Lect, LectEnrollment, Board, UserDelete, Bank, LectBoard, ContestBoard
from django.shortcuts import resolve_url
from django.db.models import Q
from user_controller import get_logined_user
# 대댓글 대상자에게 알람 보내는 함수
# 파라미터: 등록할 댓글 객체
def create_comment_alarm(comment:... | YangTaeyoung/IBAS | alarm/alarm_controller.py | alarm_controller.py | py | 9,555 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "DB.models.Comment",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "DB.models.Board.objects.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "DB.models.Board.objects",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_na... |
2651032601 | import scrapy
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
class Spider5Spider(CrawlSpider):
name = 'spider5'
allowed_domains = ['quotes.toscrape.com']
start_urls = ['http://quotes.toscrape.com']
rules = (
Rule(LinkExtractor(allow='(page)'), cal... | perfect-python/perfect-python | part4/chapter17/spider5.py | spider5.py | py | 853 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "scrapy.spiders.CrawlSpider",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "scrapy.spiders.Rule",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "scrapy.linkextractors.LinkExtractor",
"line_number": 12,
"usage_type": "call"
}
] |
551479533 | #!/usr/bin/python3
"""import libraries"""
import requests
def top_ten(subreddit):
"""top ten posts"""
try:
headers = {
'User-Agent': 'Mahmoud_Elwazeer'
}
url = "https://www.reddit.com/r/{}/hot.json".format(subreddit)
req = requests.get(
url, hea... | Mahmoud-Elwazeer/alx-system_engineering-devops | 0x16-api_advanced/1-top_ten.py | 1-top_ten.py | py | 545 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
}
] |
70578888319 | #Watts farmer Bot
import signal
import sys
import json
sys.path.append('../')
from structure import Den
from nxbot import RaidBot
def signal_handler(signal, frame): #CTRL+C handler
print()
print("Stop request")
b.close()
config = json.load(open("../config.json"))
b = RaidBot(config["IP"])
signal.signal... | zwab/PyNXBot_Breed_Egg_Generate | tests/WattFarmer.py | WattFarmer.py | py | 1,144 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.path.append",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "json.load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "nxbot.RaidBot",
"line_numbe... |
16687866820 | ## Data processing
import pandas as pd
import numpy as np
import collections_model_get_data_v1 as gd
from collections_model_utility_functions_v1 import get_connector, get_raw_data, truncate_table, write_to_snowflake, read_file
import collections_model_utility_functions_v1 as uf
# Model and performance evaluation
from s... | vedangbhardwaj/cm_ac_v1_airflow_job | collections_model_ds_v1.py | collections_model_ds_v1.py | py | 3,449 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "collections_model_utility_functions_v1.get_connector",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pandas.api.types.is_numeric_dtype",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pandas.api",
"line_number": 18,
"usage_type": "att... |
32734109600 | '''
Random utilities that are used across many legendary modules.
'''
# core libraries
import errno
import json
import logging
import os
import shutil
# third party libraries
from appdirs import user_data_dir
import pkg_resources
# legendary libraries
from . exceptions import InitializationError
# constants
PACKAGE... | timepieces141/legendary-chooser | src/legendary/util.py | util.py | py | 6,775 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "appdirs.user_data_dir",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "logging.CRITICAL",
... |
6418052116 | from django.shortcuts import render, redirect
from django.http import JsonResponse
from .models import Income
from django.contrib.auth.decorators import login_required
from .forms import incomeform
# Create your views here.
@login_required(login_url='register')
def incomeview(request):
form = incomeform()
if ... | ronisback/TAKA | taka/income/views.py | views.py | py | 1,415 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "forms.incomeform",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "forms.incomeform",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.redirect",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "models.In... |
26130014341 | from django.test import TestCase
from django.urls import reverse
from webapp.models import Product, Category
class AutoCompletePageTestCase(TestCase):
def test_if_autocomplete_page_display_json_products_list(self):
fake_cat = Category.objects.create(category_name="Fake category",)
fake_prod = Prod... | Awoodz/Projet11 | webapp/test/test_autocomplete_view.py | test_autocomplete_view.py | py | 1,186 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.test.TestCase",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "webapp.models.Category.objects.create",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "webapp.models.Category.objects",
"line_number": 8,
"usage_type": "attribute"
}... |
42241497689 | from discord.ext import commands
from bot.classes import Place
from bot.utils import at_town, create_embed
from bot.database import query
from bot.constants import NUM_TO_ALPHA
class PlaceCommands(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.group(name="town", aliases=["towns", "... | Sharpz7-Archives/sharpbot-discord | project/bot/cogs/place.py | place.py | py | 2,532 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "bot.classes",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "bot.util... |
41306337936 | from sensor_streamers.SensorStreamer import SensorStreamer
from visualizers.XsensSkeletonVisualizer import XsensSkeletonVisualizer
import socket
import struct
import time
import numpy as np
import traceback
import h5py
import os
import copy
# For post-processing
import pandas
from bs4 import BeautifulSoup
import glob
... | delpreto/ActionNet | recording_data/sensor_streamers/XsensStreamer.py | XsensStreamer.py | py | 119,233 | python | en | code | 8 | github-code | 97 | [
{
"api_name": "sensor_streamers.SensorStreamer.SensorStreamer",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "sensor_streamers.SensorStreamer.SensorStreamer.__init__",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "sensor_streamers.SensorStreamer.SensorStre... |
72582979518 | # ----------------------------------------------------------------------
# |
# | DismissStalePullRequestApprovalsPlugin.py
# |
# | David Brownell <db@DavidBrownell.com>
# | 2023-11-10 14:49:10
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell ... | davidbrownell/DavidBrownell_GitHubConfigurationValidator | src/GitHubConfigurationValidator/src/Plugins/DismissStalePullRequestApprovalsPlugin.py | DismissStalePullRequestApprovalsPlugin.py | py | 2,134 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.Any",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "GitHubConfigurationValidatorLib.Plugin.Plugin.ValidateResultType",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "GitHubConfigurationValidatorLib.Plugin.Plugin",
"line_number... |
72748860159 | #import modules
import json
import pandas as pd
from dotenv import load_dotenv
from envs import env
import time
import re
import os
import datetime
from datetime import timedelta
import statistics
import numpy as np
from scipy.stats import kurtosis, skew
#import classes from ./ folder
import postgresdbAccess
#read fi... | joengelh/binance-fibonaccibot | tools/backtesting.py | backtesting.py | py | 6,990 | python | en | code | 8 | github-code | 97 | [
{
"api_name": "json.load",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "postgresdbAccess.postgresAccess",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "pandas.Dat... |
22401507565 | import cv2
import numpy as np
from sklearn.metrics import average_precision_score, roc_auc_score
import matplotlib.pyplot as plt
from shapely.geometry import Polygon
from scripts.utils import part_corpus_to_idxs
def compute_iou(gt_coord, c, target_width, H):
gt_polygon = Polygon(gt_coord)
# minx, miny, maxx,... | nicolasfeyer/KWS-SIFT | scripts/evaluation.py | evaluation.py | py | 10,207 | python | en | code | 5 | github-code | 97 | [
{
"api_name": "shapely.geometry.Polygon",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "shapely.geometry.Polygon",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.u... |
73200059839 | from rest_framework import serializers
from django.db.models import Avg
from .models import Course, Review
class ReviewSerializer(serializers.ModelSerializer):
class Meta:
extra_kwargs = {
'email': {'write_only': True}
}
model = Review
fields = (
'id',
... | LexGalante/Python.DjangoRestFramework | courses/serializers.py | serializers.py | py | 1,530 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "models.Review",
"line_number": 12,
"usage_type": "name"
},
{... |
16821866557 | import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import os
def parse_args():
import argparse
parser = argparse.ArgumentParser(
description = 'Create YOLO format from masks')
parser.add_argument(
'-dir', dest='directory',
... | ABC-iRobotics/OE_Logo_BAT | images_to_yolo_format.py | images_to_yolo_format.py | py | 2,668 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"li... |
43054665822 | from timeit import main
import PyPDF2
import difflib
import sys
def pdfToText(pdf, txt):
pdffileobj = open(pdf, "rb")
# create reader variable that will read the pdffileobj
pdfreader = PyPDF2.PdfFileReader(pdffileobj)
# This will store the number of pages of this pdf file
x = pdfreader.numPages
... | JesperStromblad/diffpdf | diff.py | diff.py | py | 1,385 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "PyPDF2.PdfFileReader",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "difflib.unified_diff",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
... |
38348405948 | from datetime import datetime
import http.client
import json
import sys
import tzlocal
def measure_workflow_execution_time(
circle_ci_token: str,
metrics_endpoint: str,
workflow_id: str,
has_run_e2e_tests: str,
):
conn = http.client.HTTPSConnection("circleci.com")
auth = f"Basic {circle_ci_to... | bruno-ebstein-pass-culture/pass-culture-main | scripts/measure_workflow_execution_time.py | measure_workflow_execution_time.py | py | 1,419 | python | en | code | null | github-code | 97 | [
{
"api_name": "http.client.client.HTTPSConnection",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "http.client.client",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "http.client",
"line_number": 15,
"usage_type": "name"
},
{
"api_name":... |
16767375230 | __copyright__ = "Copyright 2020, 3Liz"
__license__ = "GPL version 3"
__email__ = "info@3liz.org"
__revision__ = "$Format:%H$"
from functools import partial
from qgis.PyQt import (
QtWidgets,
)
from qgis.PyQt.QtWidgets import (
QPushButton,
)
from qgis.core import (
Qgis,
)
from webbrowser import open_new... | mdouchin/qgis-lizsync-plugin | lizsync/lizsync_dockwidget.py | lizsync_dockwidget.py | py | 2,341 | python | en | code | null | github-code | 97 | [
{
"api_name": "lizsync.qgis_plugin_tools.tools.resources.load_ui",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "qgis.PyQt.QtWidgets.QDockWidget",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "qgis.PyQt.QtWidgets",
"line_number": 26,
"usage_ty... |
16877877738 | import pandas as pd
import time
from datetime import datetime
from kafka import KafkaProducer
# Read CSV file into a DataFrame
# Replace 'your_file.csv' with the actual file name
df = pd.read_csv('ecommerce.csv', low_memory=False)
# Kafka producer configuration
producer = KafkaProducer(bootstrap_servers='localhost:90... | mehdi-touil/Real-Time-Sales-Analysis-Dashboard | kafka_producer.py | kafka_producer.py | py | 927 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "kafka.KafkaProducer",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 29,
"usage_type": "call"
}
] |
44963193926 | """Steps implementation for following scenarios: verifyStage.feature."""
from behave import given, when, then
from features.src.stage import Stage
from features.src import pipeline
from pyshould import should
@given(u'I have verified a booster\'s pipeline has completed')
def given_pipeline_completed(context):
""... | fabric8io/fabric8-test | booster_bdd/features/steps/verifyStage.py | verifyStage.py | py | 1,110 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "features.src.pipeline.pipelineVerified",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "features.src.pipeline",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "pyshould.should.be_true.desc",
"line_number": 12,
"usage_type": "call"
... |
15716354537 | import tensorflow as tf
import matplotlib.pyplot as plt
from tensorflow.keras import Model
from tensorflow.keras.layers import Conv2D, Dense, MaxPool2D, Flatten, Dropout, GlobalAvgPool2D
class NiNBlock(Model):
def __init__(self, filter_num, kernel_size, padding, strids):
super(NiNBlock, self).__init__()
... | xiaoye-hua/MachineLearning_DataScience | src/Model/CNN/NiN.py | NiN.py | py | 3,896 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tensorflow.keras.Model",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "tensorflow.keras.layers.Conv2D",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.layers.Conv2D",
"line_number": 15,
"usage_type": "call"
},
{
... |
14276857479 | import sys,os
pj = os.path.join
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)
sys.path.append(curPath)
sys.path.append(pj(curPath,'FaceRecog'))
sys.path.append(pj(curPath,'Pytorch_Retinaface'))
import torch
import torch.nn as nn
from torchvision.mod... | chaffeechenyefei/mlu_video | mlu_inference.py | mlu_inference.py | py | 11,389 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "os.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_nu... |
1486464393 | from datetime import datetime
from multiprocessing import Process, Pipe, Event
import os
from os import path
import pickle
from PIL import Image
from typing import Any, Dict, List, Tuple
# Project Modules
from parsing import imageops, opencv, tesseract
from utils.directories import get_temp_directory, get_assets_direct... | RedFantom/gsf-parser | parsing/scoreboards.py | scoreboards.py | py | 9,396 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "utils.directories.get_assets_directory",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.j... |
32723898401 | import json
from typing import Any, Dict, List, Optional, Union
from flet_core.border import Border, BorderSide
from flet_core.constrained_control import ConstrainedControl
from flet_core.control import Control, OptionalNumber
from flet_core.control_event import ControlEvent
from flet_core.event_handler import EventHa... | flet-dev/flet | sdk/python/packages/flet-core/src/flet_core/datatable.py | datatable.py | py | 21,133 | python | en | code | 7,307 | github-code | 97 | [
{
"api_name": "flet_core.control_event.ControlEvent",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "flet_core.control.Control",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "flet_core.control.Control",
"line_number": 33,
"usage_type": "name"
},
... |
21665682278 | # -*- coding:utf-8 -*-
from functools import partial
import httplib
from libcloud.loadbalancer import providers
from libcloud_rest.api.handlers import ServiceHandler, invoke_method,\
invoke_extension_method, list_providers, provider_info
from libcloud_rest.utils import json
invoke_method = partial(invoke_method... | islamgulov/libcloud.rest | libcloud_rest/api/handlers/loadbalancer.py | loadbalancer.py | py | 3,819 | python | en | code | 15 | github-code | 97 | [
{
"api_name": "libcloud_rest.api.handlers.invoke_method",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "functools.partial",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "libcloud.loadbalancer.providers",
"line_number": 12,
"usage_type": "argument"
... |
13973882822 | #!/usr/bin/env python
# encoding: utf-8
import logging
from sanic import Blueprint, response
from sanic.response import json, text, html, redirect
from sanic_openapi import doc
import ujson
from common.utils import jsonify, insert_sql, select_sql, update_sql
import datetime
from bs4 import BeautifulSoup
import ujson... | baojiweicn/mem_words | views.py | views.py | py | 18,348 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sanic.Blueprint",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "datetime.timedel... |
73408630398 | from collections import deque
with open('i19.txt') as f:
scn = [[(*map(int, line.split(',')),) for line in sc.split()[4:]]
for sc in f.read().strip().split('\n\n')]
N = len(scn)
MIN_OVERLAP = 12
def rot90z(coords):
return [(-y, x, z) for x, y, z in coords]
def rot90x(coords):
return [(x, -z... | jakobkordez/AoC | 2021/d19.py | d19.py | py | 2,669 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "collections.deque",
"line_number": 86,
"usage_type": "call"
}
] |
17968333721 | import contextlib
import enum
import functools
import os
import tempfile
from typing import Any, Dict, List, Optional, TypeVar, Union
from sklearn import base
from sklearn import dummy
from sklearn import ensemble
from sklearn import tree
import tensorflow as tf
import tensorflow_decision_forests as tfdf
class TaskT... | tensorflow/decision-forests | tensorflow_decision_forests/contrib/scikit_learn_model_converter/scikit_learn_model_converter.py | scikit_learn_model_converter.py | py | 11,761 | python | en | code | 631 | github-code | 97 | [
{
"api_name": "enum.Enum",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "typing.TypeVar",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sklearn.base.BaseEstimator",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "sklearn... |
12482595277 | import time
import gym
import gym_rover
from gym import spaces
import numpy as np
from gym_rover.learning.ccea import CCEA
RENDER = True
GENS = 10000
NUM_POIS = 1
NUM_AGENTS = 1
TIME_LIMIT = 10
LENGTH = 10
class FitnessEval(object):
def __init__(self, env):
self.env = env
self.input_shape = (1... | eklinkhammer/gym-rover | ea_example.py | ea_example.py | py | 1,695 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.reshape",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "gym_rover.learning.ccea.CCEA",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "gym.make",
... |
37623684981 | import logging
from os.path import join, exists, splitext, basename, split
from os import makedirs, remove, listdir
from franklin.backbone.specifications import (BACKBONE_DIRECTORIES,
BACKBONE_BASENAMES)
from franklin.utils.cmd_utils import call
from franklin.utils.misc_uti... | JoseBlanca/franklin | franklin/backbone/blast_runner.py | blast_runner.py | py | 6,031 | python | en | code | 24 | github-code | 97 | [
{
"api_name": "franklin.utils.cmd_utils.call",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "franklin.utils.cmd_utils.call",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.path.splitext",
"line_number": 34,
"usage_type": "call"
},
{
"api_... |
12398844781 | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 6 06:26:39 2018
@author: vishal
"""
url = 'https://www.imdb.com/india/top-rated-indian-movies/?sort=rk,asc&mode=simple&page=1'
from selenium import webdriver
driver = webdriver.Chrome(r"C:\Users\visha\chromedriver")
driver.get(url)
#for storing all titles ... | vk23208/top-rated-indian-movies | IMDB(scrapping_india_movies).py | IMDB(scrapping_india_movies).py | py | 1,444 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 10,
"usage_type": "name"
}
] |
12725838528 | import warnings
warnings.filterwarnings("ignore")
import argparse
import torch
import os
import numpy as np
import pdb
from torch import nn, optim
from torch.utils import data
from torch.nn import functional as F
from data_utils import *
from vis_tools import *
# from model_utils import *
from torchvision.utils impo... | goodmattg/ndivplanning | train_autoencoder.py | train_autoencoder.py | py | 2,784 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "torch.manual_seed",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "numpy.rand... |
887210402 | """
You are given a sorted unique integer array nums.
Return the smallest sorted list of ranges that cover all the numbers
in the array exactly. That is, each element of nums is covered by
exactly one of the ranges, and there is no integer x such that x is
in one of the ranges but not in nums.
Each range [a,b] in the... | maxkhrichtchatyi/Practice-Python | Python/leetcode/summary_ranges.py | summary_ranges.py | py | 1,482 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 52,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 53,
"usage_type": "name"
}
] |
70132368638 | from __future__ import annotations
from typing import Generator
from ansible_collections.arista.avd.plugins.filter.convert_dicts import convert_dicts
from ansible_collections.arista.avd.plugins.plugin_utils.errors import AvdConversionWarning, AvdDeprecationWarning
from ansible_collections.arista.avd.plugins.plugin_ut... | aristanetworks/ansible-avd | ansible_collections/arista/avd/plugins/plugin_utils/schema/avddataconverter.py | avddataconverter.py | py | 8,914 | python | en | code | 206 | github-code | 97 | [
{
"api_name": "typing.Generator",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "ansible_collections.arista.avd.plugins.plugin_utils.utils.get_all",
"line_number": 97,
"usage_type": "call"
},
{
"api_name": "ansible_collections.arista.avd.plugins.filter.convert_dicts.co... |
1288636325 | """Align multiple sequence FASTA files with MAFFT.
This script allows the user to concatenate multiple sequence files in FASTA format using the
concatenate_contigs() function and to align the multifasta file with the mafft_align() function.
"""
import os
import logging
import subprocess
from Bio import SeqIO
from B... | marcelauliano/MitoHiFi | src/alignContigs.py | alignContigs.py | py | 1,570 | python | en | code | 132 | github-code | 97 | [
{
"api_name": "Bio.SeqIO.parse",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "Bio.SeqIO",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "Bio.SeqIO.write",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "Bio.SeqIO",
"line_numbe... |
38144482352 | import os
from PyPDF2 import PdfReader, PdfWriter
path = r"D:\python\real_python_materials\book1-exercises\chp11\practice_files"
input_file_name = os.path.join(path, 'Pride and Prejudice.pdf')
input_file = PdfReader(open(input_file_name, 'rb'))
output_pdf = PdfWriter()
for page_num in range(1, 4):
output_pdf.a... | Ga11eaN/real_python | book1_chapter11/lecture.py | lecture.py | py | 1,977 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "PyPDF2.PdfReader",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PyPDF2.PdfWriter",
"line_... |
17577987819 | import reflex as rx
from app import style
from app.state import State
def chat() -> rx.Component:
return rx.box(
rx.text(State.chat_history, style=style.question_style)
#rx.foreach(
# State.chat_history,
# lambda messages: qa(messages[0], messages[1]),
#)
)
d... | OctoConsulting/hello_reflex | app/app/app.py | app.py | py | 1,835 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "reflex.box",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "reflex.text",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "app.state.State.chat_history",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "app.state.St... |
9056285786 | # The Nature of Code
# Daniel Shiffman
# http://natureofcode.com
# A basic implementation of John Conway's Game of Life CA
import pygame
import random as rnd
import os.path
width = 640
height = 360
window = pygame.display.set_mode((width,height))
window.fill((0,0,0)) # Fills the screen with black
w = 8
class GOL:... | brainyandnerdy/TheNatureOfCode | 07.Cellular Automata/VII.02.GameOfLife.py | VII.02.GameOfLife.py | py | 2,640 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pygame.display.set_mode",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "random.randint",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pygame.dra... |
18225815140 | import numpy as np
import pickle
import sys
import os
import RBFN as RBFN
from sklearn.ensemble import RandomForestRegressor
from sklearn import linear_model
from sklearn.neighbors import KNeighborsRegressor
from sklearn import svm
# import logging
# logging.basicConfig(filename='/home/naamah/Documents/CatES/result_All... | naamahoresh/ES-categorical | surrogate.py | surrogate.py | py | 11,242 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "pickle.dump",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pickle.dump",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "smac_RF.main_loop",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number... |
19847040478 | from django.conf.urls import url, include
from . import views
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'tasks', views.NewTaskViewSet)
router.register(r'projects', views.ProjectViewSet)
urlpatterns = [
url(r'^', include... | wojciezki/task | task/api_task/urls.py | urls.py | py | 336 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.include",
"line_number": 12,
"usage_type": "call"
}
] |
37460566036 | import pygame
import os
from pygame.math import Vector2
class Player:
def __init__(self):
self.animations = {}
self.initialize_animation_frames("./assets/dwarf/")
self.frame = 0
self.direction = "right"
self.animation = "wait" + "_" + self.direction
# animations_fo... | therbin404/dwarf_game | player/player.py | player.py | py | 4,942 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.walk",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pygame.image.load",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.load",
"... |
72608692798 | #!/usr/bin/env python3.10
import subprocess
import os
from PIL import Image
import re
import numpy as np
from datetime import datetime
from astropy.io import fits
import sys
import argparse
fitcropX=1.0
fitcropY=1.0
speedPara=1.0
downSample=2 ##default downSample=2
depthStar='11-20'
dt=datetime.now()
... | arided02/aigo_getGPS | solveLocal6.py | solveLocal6.py | py | 9,245 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.datetime.now",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.now",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "datetim... |
38555794153 | from _csv import register_dialect, QUOTE_ALL
import csv
import codecs
import cStringIO
from HTMLParser import HTMLParser
from itertools import groupby
from django.conf import settings
def currency_converter(amount, year):
return amount * settings.OPENAID_CURRENCY_CONVERSIONS[year]
def eur_to_usd_converter(amount... | DeppSRL/open-aid | project/openaid/utils.py | utils.py | py | 4,801 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.conf.settings.OPENAID_CURRENCY_CONVERSIONS",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "django.conf.settings.OPENAID_CURRENCY_CONVERSIONS",
"line_number"... |
38555180789 | import networkx as nx
from sklearn.metrics.pairwise import cosine_similarity
import numpy as np
import json
import os
from io import BytesIO
from typing import List
import openai
import PyPDF2
from langchain.embeddings import OpenAIEmbeddings
from langchain.text_splitter import RecursiveCharacterTextSplitter
import cha... | Geni-zone/AscendKGChat | DataSchema/Usinggraph.py | Usinggraph.py | py | 6,623 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "openai.api_key",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "langchain.text_splitter.RecursiveCharacterTextSplitter",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "chainlit.AskFileMessage",
"line_number": 42,
"usage_type": "ca... |
17118847856 | import collections
import copy
from typing import Any, Mapping, Optional
from ..components.structures import ComponentSpec, ComponentReference
from ..components._components import _default_component_name, _resolve_command_line_and_paths
from ..components._naming import _sanitize_python_function_name, generate_unique_na... | chironghua/kubeflow-piplines | sdk/python/kfp/dsl/_component_bridge.py | _component_bridge.py | py | 4,989 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "components.structures.ComponentSpec",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "typing.Mapping",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "typing.... |
25870047317 | #!/usr/bin/env python
import asyncio
import websockets
async def hello():
async with websockets.connect("ws://localhost:8001") as websocket:
speed = input("Enter the speed : ")
height = input("Enter the height : ")
while speed != str(-1) and height != str(-1):
await websocket.... | AbdallahHussien4/Websocket-Task | client.py | client.py | py | 593 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "websockets.connect",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "asyncio.run",
"line_number": 20,
"usage_type": "call"
}
] |
40947249880 | import scipy.cluster.hierarchy as hcluster
from sklearn.cluster import DBSCAN
import numpy as np
import pandas as pd
def get_cluster_id(clusters,route_id):
"""
Returns the cluster_id of a given route_id
"""
for i in range(len(clusters)):
try:
clusters[i].loc[route_id]
... | bblazeka/movement-prediction | server/clustering.py | clustering.py | py | 1,711 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.zeros",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sklearn.cluster.DBSCAN",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy.radians",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "pandas.Series",
... |
72126396479 | from __future__ import annotations
from typing import Callable, List, Optional, Union
from copy import deepcopy
import torch
class LossWeightTree:
def __init__(
self, name: str,
weight: Union[float, Callable[[int], float]],
children: Optional[List[LossWeightTree]],
) -> None:
... | Daniel-Chin/torchWork | loss_weight_tree.py | loss_weight_tree.py | py | 2,657 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "typing.Union",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "typing.Callable",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_... |
24771244238 | # numeric imports
import numpy as np
import torch
# typing imports
from typing import List, Tuple, Dict
def get_theta_and_V(
daily_excess_return_series : np.ndarray,
daily_risk_free_series : np.ndarray,
signal : np.ndarray,
initial_cash : float = 200_000.,
leverage : float = 5.) -> Tuple[np.ndar... | maxnorman569/comp0051_algorithmic_trading | coursework-two/utilities/strategy_utilities.py | strategy_utilities.py | py | 6,085 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "numpy.ndarray",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "numpy.ndarray",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "numpy.ndarray",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros"... |
22932820228 | import requests
import json
import datetime
import hashlib
import uuid
import jwt
from django.shortcuts import render, redirect
from django.http import HttpResponse, JsonResponse
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import TemplateView, ListView, DetailView
from django.core.ex... | khalatyan/auth_module | account/views.py | views.py | py | 24,564 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.views.generic.TemplateView",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "django.core.exceptions.PermissionDenied",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.redirect",
"line_number": 35,
"usage_type": "c... |
34384992229 | # -*- coding: utf-8 -*-
# #!/usr/bin/env python
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import... | symlib/gui | lunmapping_del.py | lunmapping_del.py | py | 3,388 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "unittest.TestCase",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "login_ds.loginFirefox",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "to_log.tolog",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "time.sleep"... |
23892445397 | from django.conf.urls import url
from . import views
app_name = 'vjk'
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^student-intake', views.student_form, name='studentform'),
url(r'^success', views.success, name='success')
]
| CodeTheChangeUBC/vjk | vjk/urls.py | urls.py | py | 254 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
}
] |
35115789908 | import os
import unittest
from unittest.mock import patch
from k8s_handle import settings
from k8s_handle import handler_deploy
from kubernetes import client
class TestDeployHandler(unittest.TestCase):
def setUp(self):
settings.CONFIG_FILE = 'tests/fixtures/config_with_env_vars.yaml'
settings.TE... | 2gis/k8s-handle | tests/test_handlers.py | test_handlers.py | py | 1,223 | python | en | code | 168 | github-code | 97 | [
{
"api_name": "unittest.TestCase",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "k8s_handle.settings.CONFIG_FILE",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "k8s_handle.settings",
"line_number": 13,
"usage_type": "name"
},
{
"a... |
26318755504 | import logging
from typing import Dict, Optional
from opentrons_shared_data.pipette.dev_types import PipetteNameType
from opentrons.types import Mount
from ..protocol import AbstractProtocol
from ..legacy.legacy_protocol_core import LegacyProtocolCore
from ..legacy.legacy_labware_core import LegacyLabwareCore
from ..... | Opentrons/opentrons | api/src/opentrons/protocol_api/core/legacy_simulator/legacy_protocol_core.py | legacy_protocol_core.py | py | 2,333 | python | en | code | 363 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "legacy.legacy_protocol_core.LegacyProtocolCore",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "protocol.AbstractProtocol",
"line_number": 20,
"usage_type": "name"
},... |
5174042782 | from abc import ABC
import os
from functools import lru_cache
import addict
from PIL import Image
import cv2
import numpy as np
import torch
import torch.nn.functional as F
from torch.utils.data import Dataset
from src.utils.index import index_ego_masks
class BaseDataset(Dataset, ABC):
def __ini... | kzvdar42/segm-road-infer | src/datasets/base_dataset.py | base_dataset.py | py | 7,538 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "abc.ABC",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "addict.Dict",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "src.utils.index.ind... |
9223964210 | # -*- coding:utf-8 -*-
import json
import hashlib
import os
import re
from collect.custom.mysql import conn
f = open('quotes-qianku-data.json', 'r')
data = json.load(f)
handleData = {}
db = conn.conn().getConn()
# i = 0
# def addslashes(s):
# d = {'"':'\\"', "'":"\\'", "\0":"\\\0", "\\":"\\\\"}
# ... | antonidasZhao/scarpy | collect/handleQiankuData.py | handleQiankuData.py | py | 3,612 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "json.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "collect.custom.mysql.conn.conn",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "collect.custom.mysql.conn",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "re.... |
31494129932 | #!/usr/bin/python3
# Összehasonlítja a diak_jelszo fájl aktuális névsorát
# az ifa.db névsorával.
import sys
base_dir = '/home/szaszi/g/'
sys.path.append(base_dir)
import sqlite3
import utils
import hashlib
DB = '../db/ifa.db'
diak_jelszo = 'diak-jelszo.csv'
conn = sqlite3.connect(DB)
cur = conn.cursor()
diak_reg... | szaszpisti/ifa | local/osszehasonlitas.py | osszehasonlitas.py | py | 1,305 | python | hu | code | 2 | github-code | 97 | [
{
"api_name": "sys.path.append",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "sqlite3.connect",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "hashlib.sha256",
"lin... |
42673562764 | #!/usr/bin/python
#coding=utf8
"""
# Author: andy
# Created Time : 2017-10-12 17:50:43
# File Name: make_vocabulary.py
# Description:
# 做训练用的基础词表
"""
import sys
import re
import jieba
import common_segment
if __name__ == '__main__':
if len(sys.argv) != 4:
print("need input_file & seg_output_file & tfdf_o... | xiaochao00/conp_clf | make_vocabulary.py | make_vocabulary.py | py | 2,038 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.argv",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "jieba.load_userdict",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "jieba.add_word",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "re.compile",
"li... |
40915211982 | """Resolwe Python process support."""
import logging
import sys
from .communicator import communicator
from .descriptor import Persistence, ProcessDescriptor, SchedulingClass, ValidationError
from .fields import (
BooleanField,
DataField,
DateField,
DateTimeField,
DirField,
FileField,
FileH... | gregorjerse/resolwe | resolwe/process/__init__.py | __init__.py | py | 2,147 | python | en | code | null | github-code | 97 | [
{
"api_name": "logging.Formatter",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "logging.StreamHandler",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "logging.getLo... |
73531596160 | import asyncio
from typing import cast
import discord
from sqlalchemy import and_, delete
from sqlalchemy.ext.asyncio import AsyncSession
from ..bot import embed
from ..models import Cooldown, Egg, Hunt
from .base import EasterbotContext, controled_command, egg_command_group
@egg_command_group.command(
name="re... | Dashstrom/easterobot | easterobot/commands/reset.py | reset.py | py | 3,472 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "base.EasterbotContext",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "discord.ui.View",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "discord.ui",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "discord.ui.Butt... |
42782265702 | """
implement some more feature than pyorient
@author:yuantaixing
"""
import logging
from pyorient.ogm import Graph
from pyorient.ogm.query import Query
from ngpyorient import ng_node, ng_relationship
class NgGraph(Graph):
"""extends Graph,but has more feature than graph --next generation graph"""
def out(... | wangsanshi123/mysite_orientdb | ngpyorient/graph.py | graph.py | py | 6,915 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "pyorient.ogm.Graph",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "pyorient.ogm.Graph.coerce_class_names_to_quoted",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pyorient.ogm.Graph",
"line_number": 27,
"usage_type": "name"
},
{
... |
11306938847 | from typing import Any
import eel
from electionguard_gui.eel_utils import eel_success
from electionguard_gui.components.component_base import ComponentBase
from electionguard_gui.services import (
DecryptionService,
ElectionService,
)
from electionguard_gui.services.plaintext_ballot_service import (
get_pla... | microsoft/electionguard-python | src/electionguard_gui/components/view_tally_component.py | view_tally_component.py | py | 1,706 | python | en | code | 155 | github-code | 97 | [
{
"api_name": "electionguard_gui.components.component_base.ComponentBase",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "electionguard_gui.services.DecryptionService",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "electionguard_gui.services.ElectionService... |
21264253571 | import pytest
from colibris.middleware.errors import handle_errors_json
from colibris.schemas import ModelSchema
from colibris import persist
from colibris.views.filtering import fields, operators
from colibris.views.filtering.base import ModelFilter
from colibris.views.generic import ListCreateModelView
class Item... | colibris-framework/colibris | tests/unit/views/test_model_view_filtering.py | test_model_view_filtering.py | py | 5,655 | python | en | code | 7 | github-code | 97 | [
{
"api_name": "colibris.persist.Model",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "colibris.persist",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "colibris.persist.CharField",
"line_number": 13,
"usage_type": "call"
},
{
"api_name"... |
33094954224 | import os
import sys
import codecs
import collections
import pandas as pd
import numpy as np
import jenkspy
from sklearn.neighbors import NearestNeighbors
file_name = input('Please enter a name of csv file for input >> ')
if os.path.exists(file_name):
with codecs.open(file_name, 'r', 'utf-8', 'ignore') as f:
... | sanskruthiya/MapNLP | tools/hexGrid_evaluator.py | hexGrid_evaluator.py | py | 4,083 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.exists",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "codecs.open",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_n... |
34333271567 | from django.urls import path
from django.conf.urls import url, handler404, handler500
from . import views
app_name = "board"
handler404 = 'board.views.error_404'
urlpatterns = [
path('', views.login, name="login"),
path('logout/', views.logout, name="logout"),
path('index/', views.index, name="index"),
... | myomi2767/PreBike | board/urls.py | urls.py | py | 1,368 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.conf.urls.handler404",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.u... |
69973509120 | import tkinter
from tkinter import *
from tkinter import ttk
import os
from time import strftime
# Pillow Library
from PIL import Image, ImageTk
# Importing components
from student import Student
from train import Train
from face_recognition import Face_Recognition
from attendance import Attendance
from developer imp... | SSNegi23/Face-Recognition-Student-Attendance-System | main.py | main.py | py | 8,290 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PIL.Image.open",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "PIL.Image.Resampling",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "PIL.Image",
"l... |
38676462178 | import os
import signal
import time
import socket
import sys
from multiprocessing import Process
WATCHDOG_TIMEOUT = 10 # Timeout value in seconds
WATCHDOG_PORT = 3000 # Port number for the TCP connection
def handle_watchdog_signal(signum, frame):
global server_ip
print(f"Server {server_ip} cannot be reached... | ofirshitrit/Networks-Ex4 | watchdog.py | watchdog.py | py | 1,867 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.exit",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "signal.signal",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "signal.SIGUSR1",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "socket.gethostbyname",
... |
4267289517 | from django import template
from direct_messages.models import Message
register = template.Library()
@register.filter
def unread_message_counter(user):
if user.is_authenticated:
total_unread = 0
messages = Message.get_messages(user=user)
for message in messages:
total_unread =... | salgokrisz/MagicCardTrader | direct_messages/templatetags/messages_template_tags.py | messages_template_tags.py | py | 381 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.template.Library",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "django.template",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "direct_messages.models.Message.get_messages",
"line_number": 11,
"usage_type": "call"
},
{
... |
11316711623 |
import requests
import json
import random
URL = "http://localhost:5000"
r = requests.post(
URL + "/new-move",
data = {
"round_id": 2,
"user_id": 6,
"content": "move: " + str(random.randrange(100,1000))
})
print(r.json())
| 2-complex/telecan | posttests/make_moves.py | make_moves.py | py | 261 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "requests.post",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "random.randrange",
"line_number": 13,
"usage_type": "call"
}
] |
74289535360 | import json
import logging
import os
import re
import sys
import boto3
from semver import VersionInfo
S3_MAIN_BUCKET = os.environ.get("S3_MAIN_BUCKET")
S3_CHANNEL_BUCKET = os.environ.get("S3_CHANNEL_BUCKET")
FIRMWARE_FILE_REGEX = re.compile(r"^\d+\.\d+\.\d+\.bin$")
# remove AWS pre-config that interferes with custom... | CuriBio/IaC | src/lambdas/get_latest_firmware/src/app.py | app.py | py | 3,625 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.environ.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_... |
13791971613 | #!/usr/bin/env python3
import sys
import os
import logging
import numpy as np
import pandas as pd
import dateutil
def tempF2C(x): return (x-32.0)*5.0/9.0
def tempC2F(x): return (x*9.0/5.0)+32.0
def load_temperature_hdf5(temps_fn, local_time_offset, basedir=None, start_year=None, truncate_to_full_day=False):
## ... | manoukis/outbreak-reporter | bin/temperature_functions.py | temperature_functions.py | py | 8,500 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.info",
"line_number": 17,
"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": "pandas.read_hdf",
"line_nu... |
4868652416 | # *******************************************************
# @Fr4nc3
# 04/20/2013
# percolation module
# *******************************************************
import numpy as np
import matplotlib.pyplot as plt
def read_grid(input_file):
"""Create a site vacancy matrix from a text file."""
N = input_file.rea... | Fr4nc3/code-hints | python/Scientific/sample5/part2/percolation2.py | percolation2.py | py | 4,288 | python | en | code | 5 | github-code | 97 | [
{
"api_name": "numpy.array",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.savetxt",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.random.choice",
"line... |
11187053586 | from argparse import ArgumentParser
from script.oci import OCIManager, Citation
from requests import get
from json import loads, load
from re import sub, findall
from urllib.parse import unquote, quote
from datetime import datetime
from csv import DictReader, DictWriter
from os.path import isdir, exists
from os import ... | opencitations/croci | script/cnc.py | cnc.py | py | 16,751 | python | en | code | 10 | github-code | 97 | [
{
"api_name": "re.sub",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "urllib.parse.unquote",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "urllib.parse.quote",
"li... |
72620499520 | import os
import sys
import pytest
sys.path.append(os.path.realpath(os.path.dirname(__file__) + "../.."))
from send_email_function import main
@pytest.fixture
def mock_env(monkeypatch):
"""Setting mock environment variables"""
monkeypatch.setenv("SIGNED_URL", "True")
monkeypatch.setenv("FROM_EMAIL", "se... | GoogleCloudPlatform/professional-services | examples/bq-email-exports/tests/send_email_function/test_main.py | test_main.py | py | 1,805 | python | en | code | 2,602 | github-code | 97 | [
{
"api_name": "sys.path.append",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numbe... |
36383430858 | import os.path
import aiohttp
import asyncio
from pokeretriever.ability import Ability
from pokeretriever.custom_exceptions import InvalidFileTypeError, FileExtensions
from pokeretriever.move import Move
from pokeretriever.stat import Stat
from pokeretriever.pokemon import Pokemon
from pathlib import Path
def read_... | Lilchoo/pokedex-python | pokeretriever/helper_functions.py | helper_functions.py | py | 9,997 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pathlib.Path",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pokeretriever.custom_exceptions.FileExtensions",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "pokeretriever.custom_exceptions.InvalidFileTypeError",
"line_number": 25,
"us... |
43718200088 | import json
import logging
import os
accuracy = 2
# Set up logging configuration
logging.basicConfig(level=logging.WARNING, format='%(levelname)s - %(message)s')
def delete_files_in_folder(folder_path):
i = 0
# Iterate over all the files in the folder
for filename in os.listdir(folder_path):
fil... | klavsd/CURTAIN_WALL_CLASSIFICATION | cw_backend/src/cw_backend/write_file/write_json.py | write_json.py | py | 4,436 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.basicConfig",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.WARNING",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.join",
... |
38554279642 | from pygame.math import Vector2 as V2
from pygame.math import Vector3 as V3
import math
import random
def get_stl_lines(filename):
f = open(filename, "r")
lines = f.readlines()
f.close()
return [line.replace("\n","") for line in lines]
def get_vertex(line):
if "vertex" in line:
line = line... | YannThorimbert/pygame3D | core3d.py | core3d.py | py | 6,092 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pygame.math.Vector3",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pygame.math.Vector3",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pygame.math.Vector3",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "random.ra... |
36716805280 | from django.db import models
from mongoengine import connect,Document,StringField,DynamicField,DateTimeField
from cassandra.cqlengine import columns
from django_cassandra_engine.models import DjangoCassandraModel
connect(host="mongodb://192.168.57.119:27017/session")
class PgSession(models.Model):
class Meta:
... | nay-kang/session-benchmark | python/bench/models.py | models.py | py | 999 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "mongoengine.connect",
"line_number": 6,
"usage_type": "call"
},
{
"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.... |
5701379583 | from datetime import datetime
from mongoengine import (
CASCADE,
DateTimeField,
DynamicField,
EmbeddedDocument,
EmbeddedDocumentListField,
EnumField,
GenericReferenceField,
ListField,
ReferenceField,
StringField,
)
from core.audit.enum import ActivityTypesEnum
from core.auth.mo... | khybort/graphql-backend-app | core/audit/models/audit.py | audit.py | py | 1,559 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "mongoengine.EmbeddedDocument",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "mongoengine.StringField",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "mongoengine.DynamicField",
"line_number": 25,
"usage_type": "call"
},
{
"api... |
73050695998 | import os
from loguru import logger
import torch
import torch.nn as nn
from decalib.utils.lossfunc import VGGFace2Loss
from .utils.config import cfg
from .utils import util
class ConvBlock(nn.Module):
def __init__(self, in_channel, out_channel, kernel_size=3, stride=1, padding=1, dilation=1, bias=True):
s... | dddraxxx/Skull2Face | decalib/gan.py | gan.py | py | 9,680 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
3929786009 | import numpy as np
import cv2
#For more info about contours: https://docs.opencv.org/4.5.3/d3/d05/tutorial_py_table_of_contents_contours.html
im = np.zeros(shape =(400,400)).astype('uint8')
polygons = [np.array([[20,20],[120,50],[30,80]]),
np.array([[200,200],[200,350],[350,350], [350,200] ]),
... | neokarn/computer_vision | example2_3_findcontour.py | example2_3_findcontour.py | py | 1,156 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "numpy.zeros",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 9,
... |
2107445427 | """
It is responsible for recommendation functionality, as also
providing the available filters that go along with the result
...
Methods
-------
get_documents(query_base_request, documents_deploy_request)
Disables recommendation resource creation calls
"""
import cProfile
import pstats
import io
im... | onezer00/oner-flask-rest-api-exemple | src/log/log.py | log.py | py | 2,625 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "config.get_current_config",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "logging.Formatter",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "logging.StreamHandler",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sys... |
6003211078 | import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras.layers import Conv2D, LeakyReLU, Flatten
from tensorflow.keras.layers import Dense, Conv2DTranspose
from tensorflow.keras.layers import Reshape, Activation
from tensorflow.keras import backe... | shevious/webstudy | deep/basics/11-04-ae.py | 11-04-ae.py | py | 5,102 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.exists",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.mkdir",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.mkdir",
"line_number": 18... |
33700333393 | from __future__ import print_function
from instantiate import gen_inst_task
from pddlstream.algorithms.downward import get_problem, task_from_domain_problem, get_cost_scale, \
scale_cost, fd_from_fact, make_domain, make_predicate, evaluation_from_fd, fact_from_fd, \
get_preimage_literals_with_idxes
from pddlstr... | ttianyuren/eTAMP | etamp/pddlstream/algorithms/scheduling/optimistic_solver.py | optimistic_solver.py | py | 26,953 | python | en | code | 12 | github-code | 97 | [
{
"api_name": "pddlstream.utils.INF",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "collections.namedtuple",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "co... |
8271975860 | import numpy as np
import matplotlib.pyplot as plt
def tanh_test(x, x0, L):
return np.tanh((x-x0)/L)
if __name__ == "__main__":
x = np.linspace(0, 10, 1000)
LL = [0.01, 0.05, 0.1, 1]
x0 = 5
for L in LL:
y = tanh_test(x, x0, L)
plt.plot(x, y, label=f"L={L}")
plt.legend()
pl... | dodogabrie/MetNumFis21 | Modulo4/Progetto4/simulazioni_finali/tanh_test.py | tanh_test.py | py | 329 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.tanh",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
... |
16830477249 | import sys, time, argparse
import subprocess, os.path, pathlib
import math, shutil
from xml.etree.ElementInclude import default_loader
Description = """FASTQ file compression tool
For example
{exe} example.txt
--------------------------
Command line options:
--------------------------
""".format(exe=sys.argv[0])
... | anabeatrizthezolin/Compression-FASTQ | main.py | main.py | py | 12,858 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.argv",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "argparse.RawTextHelpFormatter",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name... |
35109696978 | from pathlib import Path
import sys
raw_data_folder = Path("W:\\swc\\branco\\Federico\\Locomotion\\raw")
local_raw_recordings_folder = Path(r"D:\recordings")
# ccm_matrices = Path(r"W:\swc\branco\Federico\Locomotion\raw\CMM_matrices")
ccm_matrices = Path(r"K:\CMM_matrices")
processed_tracking = Path(
r"W:\swc\br... | BrancoLab/LocomotionControl | data/paths.py | paths.py | py | 728 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "pathlib.Path",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number":... |
38921897773 | """
A school is trying to take an annual photo of all the students. The students are asked to stand in a single file
line in non-decreasing order by height. Let this ordering be represented by the integer array expected where
expected[i] is the expected height of the ith student in line.
You are given an integer array... | SamanehGhafouri/leetcode | easy/above_70_percent_easy/height_checker.py | height_checker.py | py | 880 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 14,
"usage_type": "name"
}
] |
34859040138 | from rest_framework import serializers
from players.serializers import PlayerSerializer
from .models import Item, Match, MatchComp, Augment, Champion, Trait
class AugmentSerializer(serializers.ModelSerializer):
class Meta:
model = Augment
fields = ["name"]
class ItemSerializer(serializers.Model... | ShuriMya/monkey-tactics | back/src/matches/serializers.py | serializers.py | py | 1,532 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "models.Augment",
"line_number": 9,
"usage_type": "name"
},
{... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.