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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28543286335 | from django.contrib.auth import get_user_model
from django.test import TestCase, Client
from http import HTTPStatus
from ..models import Group, Post
User = get_user_model()
class PostURLTest(TestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.guest_client = Client()
... | Dorosh93/YaTube | yatube/posts/tests/test_urls.py | test_urls.py | py | 4,539 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.test.TestCase",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.test.Client",
"line_number": 13,
"usage_type": "call"
},
{
"api_name... |
13813787925 | #!/usr/bin/env python
# encoding: utf-8
"""
Functions for working with metadata about the observations.
low level: get, get_groups, get_mslit_data, write
manipulation functions: get_group, get_object_spectra, get_sky_spectra
init_data
calculation functions: calculate_angles, calculate_sections... | tungol/mslit | mslit/data.py | data.py | py | 5,296 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "yaml.load",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "yaml.load",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "yaml.dump",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "os.path.path.isfile",
"line_number"... |
19244209197 | from flask import Flask, render_template, request, redirect
from markupsafe import escape
from kafka import KafkaConsumer, KafkaProducer, errors
from serializers import serializer, deserializer
import yaml
from datetime import datetime
import csv
## load config
CONFIG_PATH = "./config/config.yaml"
with open(CONFIG_PAT... | SoloValue/BDT_project | UI/app.py | app.py | py | 3,902 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "yaml.safe_load",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"li... |
34869991492 | """
https://leetcode.com/problems/binary-search
"""
from typing import List
def search(nums: List[int], target: int) -> int:
left, right = 0, len(nums) - 1
mid = left + (right - left) // 2
while left <= right:
if nums[mid] < target:
left = mid + 1
elif nums[mid] > target:
... | dippingconda/python_algorithm_interview | binary-search.py | binary-search.py | py | 551 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 7,
"usage_type": "name"
}
] |
28090099432 | from django.test import Client, TestCase
from django.urls.base import reverse
class TestIndex(TestCase):
def test_should_check_index_view(self):
client = Client()
uri = reverse('index')
profiles_url = reverse('profiles:index')
lettings_url = reverse('lettings:index')
respon... | EmmanuelD79/OpenClassrooms_Projet_13_Orange_County_Lettings | tests/tests.py | tests.py | py | 713 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.test.TestCase",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.test.Client",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.base.reverse",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.... |
15098919197 | import os
from testtools import TestCase
from testscenarios.testcase import TestWithScenarios
from tests.base import get_scenarios, BaseTestCase
import doctest
import testtools
from jenkins_jobs.builder import YamlParser
class TestCaseModuleYamlInclude(TestWithScenarios, TestCase, BaseTestCase):
fixtures_path = o... | gtest-org/test11 | tests/yamlparser/test_yamlparser.py | test_yamlparser.py | py | 1,283 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "testscenarios.testcase.TestWithScenarios",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "testtools.TestCase",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "tests.base.BaseTestCase",
"line_number": 10,
"usage_type": "name"
},
{
... |
17995532724 |
from detectImgModel.imgHandler import ImageHandler
from detectImgModel.squareImgHandler import SquareImgHandler
import matplotlib.pyplot as plt
from shapedetector import ShapeDetector
import argparse
import imutils
import cv2
def detectSquare(imagePath):
# load the image and resize it to a smaller factor so t... | hcgcarry/digitDetect | detectSquare.py | detectSquare.py | py | 1,816 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.imread",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "imutils.resize",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line... |
69888829812 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import json
import time
from metrics.aggregator import MetricsAggregator
class metrics():
def __init__(self, manager, label):
self.__label = label
self.__manager = manager
self.__metrics = None
self.__ready = False
self.__fn = lambda *ar... | jancajthaml-openbank/lake | perf/metrics/decorator.py | decorator.py | py | 1,294 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "metrics.aggregator.MetricsAggregator",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path.realpath",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "os... |
37911084995 | import time
import logging
import json
from json import JSONDecodeError
from django.conf import settings
from rest_framework.authentication import get_authorization_header
log = logging.getLogger(__name__)
class APIParserMiddleware:
exception_urls = ['/admin/']
def __init__(self, get_response):
se... | nuhbye/django_backend | backend/middleware.py | middleware.py | py | 2,295 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number"... |
74661378291 | """
test_tenant.py
Test "agavecli tenant" actions.
Tenant actions manage communication between the user and the Agave API by
means of a local database. The local database can be located in ~/agave.json
by default but other paths can be specify, make sure to keep track of this.
See "agavecli tenant -h" for mo... | alejandrox1/agavecli | tests/test_tenant.py | test_tenant.py | py | 3,543 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "agavecli.main_parser.parse_args",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "agavecli.main_parser",
"line_number": 71,
"usage_type": "attribute"
},
{
"api_name": "agavecli.main",
"line_number": 72,
"usage_type": "call"
},
{
"api_name"... |
28684993026 | import re
import requests
from lxml.html import fromstring, tostring
def download(url, user_agent='wswp', num_retries=2, proxies=None):
print('Downloading: ', url)
headers = {'User-Agent': user_agent}
try:
resp = requests.get(url, headers=headers, proxies=proxies)
html = resp.text
i... | QTYResources/wswp | Chapter02/ScrapingArea03.py | ScrapingArea03.py | py | 935 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.exceptions",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "lxml.html.fromstring",
"line_number": 24,
"usage_type": "call"
}
] |
24325430983 | import os
import bs4
import requests
url = 'https://xkcd.com'
# Сохраняем комикс в папке ./xkcd
os.makedirs('../xkcd', exist_ok=True)
while not url.endswith('#'):
# Загрузка страницы.
print(f'Загрузка страницы {url}...')
res = requests.get(url)
res.raise_for_status()
soup = bs4.BeautifulSoup(res... | aitmrza/book-projects | al_sweigart/download_image/download_xkcd.py | download_xkcd.py | py | 1,394 | python | ru | code | 0 | github-code | 21 | [
{
"api_name": "os.makedirs",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_nu... |
73027773813 | #!/usr/bin/env python
import asyncio
import websockets
async def hello(websocket, path):
name = await websocket.recv()
print("< {}".format(name))
greeting = "Hello {}!".format(name)
await websocket.send(greeting)
print("> {}".format(greeting))
start_server = websockets.serve(hello, 'localhost', ... | LiuFang816/SALSTM_py_data | python/aaugustin_websockets/websockets-master/example/server.py | server.py | py | 424 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "websockets.serve",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "asyncio.get_event_loop",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "asyncio.get_event_loop",
"line_number": 17,
"usage_type": "call"
}
] |
8616907075 | import openpyxl
from openpyxl import Workbook, load_workbook
from tqdm import tqdm
class ExcelData:
def __init__(self, cas_list=[], deal_cas_list=[], rows=0):
'''
:param cas_list: 22_101_1的cas
:param deal_cas_list: 22-101-1的cas
:param rows: excel的最大的列
'''
self.cas_... | codeking01/python_project | CodekingPython/Deal_Excel/Basic_Excle.py | Basic_Excle.py | py | 5,051 | python | zh | code | 0 | github-code | 21 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "openpyxl.load_workbook",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "openpyxl.Work... |
9710663590 | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 10 10:26:42 2022
@author: Youngbin Moon (y.moon@unibas.ch)
"""
import pandas as pd
import argparse
import pysam
import numpy as np
"""
Aim : write a csv file where:
1st column = average distance from start of longest terminal exon to representative cleavage site ... | zavolanlab/SCINPAS | src/get_type1_type2_distance_nextflow.py | get_type1_type2_distance_nextflow.py | py | 13,686 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "pandas.DataFrame",
"line_number": 86,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 133,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 134,
"usage_type": "call"
},
{
"api_name": "numpy.argmax",
"li... |
39134179488 | import sys
if "pytest" in sys.modules:
import tests.testing_config as config
else:
import config
from constants import *
from mconfig import MConfig
from tape import Tape
def process_description_num(dn):
"""
creates and returns a dict of m-configs from a description number
dn: string
made... | kh9sd/UniversalTuringMachine | turingmachine.py | turingmachine.py | py | 4,071 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "sys.modules",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "mconfig.MConfig",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "tape.Tape",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "config.TAPE_ARRAY",
"li... |
1100821113 | import discord
from discord.ext import commands
import json, logging, datetime, aiohttp, traceback, sys, dbl
from exts.utils.formats import read_file
from pymongo import MongoClient as mc
def get_pre(bot, message):
prefix = read_file('prefs.json')
try:
pfxs = [f'{prefix[str(message.guild.id)]} ',f'{prefix[str(m... | eve-alt/trashbot | bot.py | bot.py | py | 2,856 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "exts.utils.formats.read_file",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands.when_mentioned_or",
"line_number": 22,
"usage_type": "call"
},
{
"api... |
73025849973 | import sys
sys.path.insert(0, "..")
import logging
from datetime import datetime
try:
from IPython import embed
except ImportError:
import code
def embed():
vars = globals()
vars.update(locals())
shell = code.InteractiveConsole(vars)
shell.interact()
from opcua import ua,... | LiuFang816/SALSTM_py_data | python/FreeOpcUa_python-opcua/python-opcua-master/examples/server-example.py | server-example.py | py | 4,543 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "sys.path.insert",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "code.InteractiveConsole",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "opcua.ua.Variant"... |
38251138745 | # The Postgres Database Interface for the API Gateway
import logging
from typing import List, Dict
from sqlalchemy.ext.asyncio import create_async_engine
from sqlalchemy.ext.asyncio.engine import AsyncEngine
from data_definition import Temperature, Average
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchem... | finkbefl/backend-infrastructure-demo | api-gateway/api_gateway/database.py | database.py | py | 5,200 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.ext.asyncio.create_async_engine",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.ext.asyncio.engine.AsyncEngine",
"line_number": 36,
"usage_type":... |
32708880546 | from flask import Flask, render_template, request, redirect, url_for, flash, abort, session, jsonify
import json
import os.path
import os
from werkzeug.utils import secure_filename
import pandas as pd
import numpy as np
import re
import string
import pickle
import uuid
from ftfy import fix_encoding, fix_text, badness
f... | TechResume-001/jagmeetmalhotra_1666712199 | app.py | app.py | py | 7,214 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "nltk.stem.WordNetLemmatizer",
"line_number": 24,
"usage_type": "call"
},
{
"api... |
13550805454 | """Plotting module for elements.
This modules provides functions to plot the elements statistic data.
"""
from copy import copy
import numpy as np
from plotly import graph_objects as go
from plotly import io as pio
from plotly.subplots import make_subplots
from scipy.stats import gaussian_kde
from ross.plotly_theme ... | petrobras/ross | ross/stochastic/st_results_elements.py | st_results_elements.py | py | 4,005 | python | en | code | 99 | github-code | 21 | [
{
"api_name": "copy.copy",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "copy.copy",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "ross.plotly_theme.tableau_colors",
"line_number": 53,
"usage_type": "name"
},
{
"api_name": "ross.plotly_them... |
42059532971 | import logging
from rooibos.solr import SolrIndex
from rooibos.workers.registration import register_worker, run_worker
logger = logging.getLogger("rooibos_solr_workers")
@register_worker("solr_index")
def solr_index(data):
logger.info("Starting solr index")
count = SolrIndex().index()
logger.info("solr... | knabar/fynbos | rooibos/solr/workers.py | workers.py | py | 426 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "rooibos.solr.SolrIndex",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "rooibos.workers.registration.register_worker",
"line_number": 10,
"usage_type": "call"
},
{
... |
10349035649 | from pycocotools.coco import COCO
import os
import shutil
from tqdm import tqdm
import matplotlib.pyplot as plt
import cv2
from PIL import Image, ImageDraw
import argparse
def mkr(path):
if os.path.exists(path):
shutil.rmtree(path)
os.makedirs(path)
def id2name(coco):
classes=dict()
for c... | pansionpan/convert_coco_object365 | cooc_annos2voc.py | cooc_annos2voc.py | py | 3,594 | python | en | code | 23 | github-code | 21 | [
{
"api_name": "os.path.exists",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "shutil.rmtree",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_num... |
7643995947 | from flask import Flask
from flask import render_template
from flask import request
import daten
app = Flask("medtrack")
# Bekommt ein Suchbegriff aus dem Formular der Seite index.html und ruft die suche Funktion auf (Datei Daten.py)
@app.route("/index/", methods=['GET', 'POST'])
def suche():
if request.method ... | Isabelle434/PROG2.0 | medtrack/main.py | main.py | py | 4,991 | python | de | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "flask.request.form... |
2492605507 | #!/usr/bin/env python3
__author__ = "cloudstrife9999"
from zipfile import ZipFile
from shutil import rmtree
from typing import Iterable
from argparse import ArgumentParser, Namespace
import os
def main() -> None:
file_path: str = parse_arguments()
dir_name: str = os.path.dirname(file_path)
unzipped: s... | dicelab-rhul/automated_tester | unzipper.py | unzipper.py | py | 2,089 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.dirname",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "typing.Iterable",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "os.listdir",
"line_n... |
69814576693 | from flask import Flask
from flask_bootstrap import Bootstrap
from flask_wtf.csrf import CSRFProtect
from app.registry.container import Container
from app.interface.views import link_view
from config.setting import *
csrf = CSRFProtect()
def create_app() -> Flask:
container = Container()
container.config.sec... | dwdarm/url-shortener | main.py | main.py | py | 878 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask_wtf.csrf.CSRFProtect",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "app.registry.container.Container",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "app.registry.container",
"line_number": 18,
"usage_type": "name"
},
{
... |
3437198917 | import logging
import os
import pandas as pd
import sys
import tqdm
from lib.parsers import lamoda_parser
from lib.utils import web
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
def get_man_id(man_ids, raw_man_id):
man_id = man_ids[raw_man_id] if raw_man_id in man_ids.keys() else len(man_ids)
... | roma1n/face_clothes_matching | lib/raw_datasets/lamoda_validation.py | lamoda_validation.py | py | 2,416 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.basicConfig",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "logging.INFO",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "logging.info",
... |
18121489281 | import pandas as pd
import numpy as np
import pandas as pd
import random
import matplotlib.pyplot as plt
from collections import Counter
import scipy
from scipy import stats
melanoma = pd.read_csv('/home/kpusteln/melanoma/train_concat.csv')
def probability_mass(data):
counts = Counter(data) # counting the c... | mim-uw/eXplainableMachineLearning-2023 | Projects/KrystianKról_MaciejPióro_KarolPustelnik/checkpoint2/xai_project/xai_melanoma/melanoma/train_test_split.py | train_test_split.py | py | 3,015 | python | en | code | 16 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "random.sample",
... |
16143683093 | import requests
import pandas as pd
import json
from tqdm import tqdm
import time
import numpy as np
from pandas.core.common import SettingWithCopyWarning
import warnings
warnings.simplefilter(action="ignore", category=SettingWithCopyWarning)
import config as cf
import sp500
def get_auth_token():
... | ltanedo/woo-put-selling-strategy | util_options.py | util_options.py | py | 4,851 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "warnings.simplefilter",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.core.common.SettingWithCopyWarning",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "config.refresh_token",
"line_number": 17,
"usage_type": "attribute"
},
... |
41138646613 | from tkinter import*
from tkinter import messagebox
import mysql.connector
from tkinter.ttk import Combobox
import datetime
yenikayit=Tk()
yenikayit.title("Silah Kayıt Sistemi")
yenikayit.geometry("1000x600+200+50")
yenikayit.resizable(FALSE,FALSE)
class header():
baslik=Label(
yenikayit,
... | gurhantekoglu/python | silah-kayit-sistemi/sks/sks_yenikayit.py | sks_yenikayit.py | py | 12,896 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "datetime.datetime.now",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "mysql.connector.connector.connect",
"line_number": 43,
"usage_type": "call"
},
{
"ap... |
6702692226 | import logging
import pdb
import pytest
from .utils import (NAMED_PAGES, ELEMENT_SELECTORS, DEFAULT_WAIT_TIME, LOGIN_ERROR_MESSAGE, check_visibility_of_element,
check_presence_of_element)
from .utils import (get_webdriver, assert_current_url,
take_screenshot, open_named_page)
... | eruckemmanuel/automated-web-testing-with-selenium | tests/test_login.py | test_login.py | py | 3,762 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "utils.take_screenshot",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "utils.get_webdriver",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "utils.DEF... |
71528079414 | from typing import Union
from application.services import MissionService
from common.constants import DEFAULT_PAGE_LEN
from common.exceptions.db import DuplicatedKeyError
from common.logging import get_logger
from fastapi import APIRouter, Depends, HTTPException, Query, Response, status
from presentation.rest.dependen... | searchwingCV/log-viewer | server/src/presentation/rest/controllers/mission.py | mission.py | py | 2,538 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "common.logging.get_logger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "fastapi.APIRouter",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "presentation.rest.serializers.mission.CreateMissionSerializer",
"line_number": 25,
"usage_typ... |
73026914613 | import sys; sys.path.insert(0, '../')
import geoplot as gplt
import geoplot.crs as gcrs
import geopandas as gpd
import pandas as pd
import numpy as np
from shapely.geometry import Point
import matplotlib.pyplot as plt
# Shape the data.
collisions = pd.read_csv("../../data/nyc_collisions/NYPD_Motor_Vehicle_Collisions_... | LiuFang816/SALSTM_py_data | python/ResidentMario_geoplot/geoplot-master/docs/examples/aggplot-collisions-1.py | aggplot-collisions-1.py | py | 3,867 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "sys.path.insert",
"line_number": 1,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 1,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.isnull",
"line... |
34869176423 | import grpc
from discordproxy.discord_api_pb2 import (
SendChannelMessageRequest,
SendDirectMessageRequest,
GetGuildChannelsRequest,
Embed,
)
from discordproxy.discord_api_pb2_grpc import DiscordApiStub
from discordproxy.helpers import parse_error_details
def send_channel_message(channel_id):
wit... | staropera/discordproxy | examples/client.py | client.py | py | 2,328 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "grpc.insecure_channel",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "discordproxy.discord_api_pb2_grpc.DiscordApiStub",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "discordproxy.discord_api_pb2.SendChannelMessageRequest",
"line_number"... |
40316996780 | import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.colors import ListedColormap
import matplotlib.cm as cmx
import matplotlib
from Processing.process_raw_trace import get_spike_times_for_cc
from Processing.calculate_spike_rate import get_spi... | syorkp/granule_categories | Visualisation/figures.py | figures.py | py | 8,190 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.show",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "m... |
73032864693 | import numpy as np
from neupy.utils import format_data
from neupy.exceptions import NotTrained
from neupy.core.properties import BoundedProperty
from neupy.algorithms.base import BaseNetwork
from neupy.algorithms.gd.base import MinibatchTrainingMixin
from .learning import LazyLearningMixin
from .utils import pdf_betwe... | LiuFang816/SALSTM_py_data | python/itdxer_neupy/neupy-master/neupy/algorithms/rbfn/pnn.py | pnn.py | py | 6,660 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "neupy.algorithms.base.BaseNetwork",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "learning.LazyLearningMixin",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "neupy.algorithms.gd.base.MinibatchTrainingMixin",
"line_number": 15,
"usage_... |
16854031396 | bl_info = {
"name": "BMesh Map",
"author": "Cubiest, Benjamin Lösch",
"version": (1, 4, 0),
"blender": (3, 3, 0),
"description": "Export your mesh as a RAW heightmap",
"doc_url": "https://github.com/cubiest/bmesh-to-raw/blob/main/docs/README.md",
"category": "Object",
}
import bpy, math, st... | cubiest/bmesh-map | bmesh-to-map.py | bmesh-to-map.py | py | 15,001 | python | en | code | 5 | github-code | 21 | [
{
"api_name": "bpy.types",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "bpy.props.StringProperty",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "bpy.props",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "bpy.props.Stri... |
12715815918 | import pygame
from time import *
from tkinter import *
from tkinter import filedialog
import threading
import RPi.GPIO as GPIO
import sys
root = Tk()
root.title('Julian SPA Test')
root.geometry ("800x500")
pygame.mixer.init()
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
GPIO.setup(40, GPIO.OUT)
pwm_pin40 = GPIO.... | aghix/spa_automation | spa.py | spa.py | py | 8,553 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pygame.mixer.init",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pygame.mixer",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "RPi.GPIO.setmode",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "RPi.GPIO",
"... |
28794562015 | import os
import platform
import subprocess
from pathlib import Path
temp_folder = Path() / 'temp'
if not temp_folder.exists():
temp_folder.mkdir()
def writeTempFile(data: str or bytes, suffix: str, is_bytes: bool = True) -> Path:
folder = temp_folder / suffix
if not folder.exists():
folder.mkdir... | merdovash/VisitCount | Domain/FileManager/__init__.py | __init__.py | py | 769 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pathlib.Path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "platform.system",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.startfile",
"line_num... |
28344113537 | ## @package MenuView
# Takes care of the first menu
#
# This module contains the class MenuView, which makes it possible easily to add new buttons in
# the main menu
import pygame
from MenuItem import MenuItem
from Colors import *
class MenuView():
"""Class to generate a vertical menu.
How to use:
1... | caee/MIDroneControl | ArduinoScript/DroneMenu/MenuView.py | MenuView.py | py | 5,832 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "pygame.time.Clock",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "pygame.time",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "pygame.mouse.set_visible",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "pygame.mo... |
35592170408 | import pandas.io.sql
from .core import GeoDataFrame
from .factory import from_wkb
def read_sql(sql, con, geom_col, index_col=None, coerce_float=True,
params=None):
"""
Query SQL/MM database and return GIS data frame with specified column
as GIS series.
:param geom_col: GIS column (can be coll... | wrobell/geocoon | geocoon/sql.py | sql.py | py | 779 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.io.sql.io.sql.read_sql",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pandas.io.sql.io",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "pandas.io.sql",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "cor... |
7555260910 | import bz2
import json
import pandas as pd
import pydash
import pickle
import argparse
def wikidata(filename):
with bz2.open(filename, mode='rt') as f:
f.read(2) # skip first two bytes: "{\n"
for line in f:
try:
yield json.loads(line.rstrip(',\n'))
except jso... | hkefka385/mitigation_diachronic_fake | get_wikiID.py | get_wikiID.py | py | 1,866 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "bz2.open",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.decoder",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "pydash.has",
"line_number": ... |
3832728531 | import datetime
import json
import os
import re
import sys
ref = os.getenv('GITHUB_REF')
def set_output(key, value):
with open(os.getenv('GITHUB_OUTPUT'), 'a') as f:
f.write(f"{key}={value}\n")
match = re.match(r'refs/tags/(v[0-9]+)', ref)
if match:
vtag = match.group(1)
else:
vtag = datetime.datetime.now().str... | The-Powder-Toy/tpt-libs | .github/prepare.py | prepare.py | py | 2,633 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "os.getenv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number"... |
13421935537 | # -*- coding: utf-8 -*-
# @Author: XP
import os
import argparse
import open3d
import numpy as np
import jittor as jt
from datetime import datetime
from tqdm import tqdm
from tensorboardX import SummaryWriter
from utils import helpers, average_meter, scheduler, yaml_reader, loss_util, misc
from core import builder
fro... | AllenXiangX/SPD_jittor | completion/train.py | train.py | py | 5,785 | python | en | code | 13 | github-code | 21 | [
{
"api_name": "numpy.random.seed",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "jittor.set_global_seed",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "argparse.A... |
34336236396 | #https://stackabuse.com/random-forest-algorithm-with-python-and-scikit-learn/
import pandas as pd
import numpy as np
from sklearn.externals import joblib
dataset = pd.read_csv("test.csv")
X = dataset.iloc[:, 0:6].values
y = dataset.iloc[:, 6].values
for i in range(len(y)):
if y[i] == 'damage' or y[i] == 0:
... | premnathkulal/Rice_Grain_Grader | Model_Creation/Training_Testing/REFER/random_forest_algo.py | random_forest_algo.py | py | 1,165 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.StandardScaler",
"line_number": 20,
"usage_type": "call"
... |
40542077152 | from logging import getLogger
from pathlib import PurePath
from typing import Callable, Collection, Set
from monkeytypes import Credentials, OperatingSystem
from common.agent_events import AgentEventTag
from common.tags import (
BRUTE_FORCE_T1110_TAG,
EXPLOITATION_OF_REMOTE_SERVICES_T1210_TAG,
INGRESS_TOO... | guardicore/monkey | monkey/agent_plugins/exploiters/wmi/src/wmi_remote_access_client.py | wmi_remote_access_client.py | py | 2,793 | python | en | code | 6,367 | github-code | 21 | [
{
"api_name": "common.tags.REMOTE_SERVICES_T1021_TAG",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "common.tags.BRUTE_FORCE_T1110_TAG",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "common.tags.EXPLOITATION_OF_REMOTE_SERVICES_T1210_TAG",
"line_number"... |
12914308329 | from __future__ import print_function
import collections
import os
import tensorflow as tf
from keras.models import Sequential, load_model
from keras.layers import Dense, Activation, Embedding, Dropout, TimeDistributed
from keras.layers import LSTM
from keras.optimizers import Adam
from keras.utils import to_categorica... | juleslagarde/AI_ENSSAT_s5 | LSTM/keras_lstm.py | keras_lstm.py | py | 8,116 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "tensorflow.gfile.GFile",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "tensorflow.gfile",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "... |
4825120734 | from django.conf.urls import url,include
from django.contrib import admin
from blog import views
urlpatterns = [
url(r'test/(\d{4})$',views.mytest,name="test"),
url(r'article/(\d{4})$',views.article_year),
url(r'article/(?P<year>\d{4})/(?P<month>\d{2})',views.article_year_month),
url(r'article/(?P<y... | huotong1212/mylearnpy | django_site/blog/urls.py | urls.py | py | 814 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "django.conf.urls.url",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "blog.views.mytest",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "blog.views",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.conf.urls.... |
23460475021 | """Unit Tests for Wavefront SDK Metrics Registry.
@author Hao Song (songhao@vmware.com)
"""
import unittest
try:
import queue
except ImportError:
import Queue as queue # noqa
from wavefront_sdk.common.metrics.registry import WavefrontSdkMetricsRegistry
from wavefront_sdk.direct import remaining_capacity_ge... | shavidissa/wavefront-sdk-python | test/test_wavefront_metrics_registry.py | test_wavefront_metrics_registry.py | py | 1,761 | python | en | code | null | github-code | 21 | [
{
"api_name": "unittest.TestCase",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "wavefront_sdk.common.metrics.registry.WavefrontSdkMetricsRegistry",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "Queue.Queue",
"line_number": 24,
"usage_type": "... |
8179598983 | # coding: utf-8
from enum import Enum
import json
from allennlp.data.tokenizers import WordTokenizer
from allennlp.data.tokenizers.word_splitter import SpacyWordSplitter
from spacy.symbols import ORTH, LEMMA
from src.context.converter import SQLConverter
from src.context.db_context import SparcDBContext
from src.uti... | microsoft/ContextualSP | interactive_text_to_sql/src/utils/semql_converter.py | semql_converter.py | py | 5,522 | python | en | code | 348 | github-code | 21 | [
{
"api_name": "enum.Enum",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "allennlp.data.tokenizers.word_splitter.SpacyWordSplitter",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "spacy.symbols.ORTH",
"line_number": 25,
"usage_type": "name"
},
{
... |
12828266161 | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep
from credentials import login,pwd
class ZTF():
def __init__(self):
self.driver=webdriver.Chrome()
def login(self):
#maximazing and opening IG
self.driver.maximize_window()
... | ZTF666/Instagram-bot | Unfollow.py | Unfollow.py | py | 3,232 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "credentials.log... |
13091625055 | import collections, copy
from typing import Deque, Tuple
import sys
sys.setrecursionlimit(10000)
Deck = Deque[int]
cache = {}
calcing = {}
def state(l1: Deck, l2: Deck) -> Tuple[int, ...]:
return (len(l2),)+tuple(l2)+tuple(l1)
cache2 = {'all': 0, 'hit': 0}
def p2(r: int, l1: Deck, l2:Deck) -> Tuple[bool, Deck]... | acsaba22/aoc | 2020/d22/main.py | main.py | py | 5,629 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "sys.setrecursionlimit",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "typing.Deque",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "copy.copy",
"line_n... |
533131412 | import pytube
def Search_Tube(SongList):
videos = list()
for song in SongList:
s = pytube.Search(song)
#if we got back any results, go ahead and add the first youtube object to our results list
if len(s.results) != 0:
videos.append(s.results[0])
if len(videos) == 0:
... | Lgreim33/SpoitpyScraper | ScrapeSongs.py | ScrapeSongs.py | py | 501 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pytube.Search",
"line_number": 6,
"usage_type": "call"
}
] |
12581633516 | from . import views
from django.urls import path
app_name='portal'
urlpatterns = [
path('',views.formpage, name='formpage'),
path('approval/<int:staff_id>/<slug:token>/', views.approval),
path('staff_requests/<int:staff_id>/',views.requests),
path('all_requests/',views.all_requests, name='all_requests... | ObedBalogun/TempoPortal | portal/urls.py | urls.py | py | 325 | python | en | code | 0 | github-code | 21 | [
{
"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",
... |
37684447203 | # Import Dependencies
import board
import pandas as pd
from busio import I2C
import adafruit_bme680
from datetime import datetime, timedelta
import time
import json
# Create library object using Bus I2C port
i2c = I2C(board.SCL, board.SDA)
bme680 = adafruit_bme680.Adafruit_BME680_I2C(i2c, debug=False)
# change this... | SlavPetkovic/JetsonNano | test.py | test.py | py | 1,126 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "busio.I2C",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "board.SCL",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "board.SDA",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "adafruit_bme680.Adafruit_BME6... |
25933827714 | import traceback
import http.server
import threading
import os
import io
import hashlib
import logging
import inspect
import re
import functools
import time
import queue
import socketserver
from logger import logger
import commandhandler
##############################
# Helper Classes
##############################
c... | blobbyblob/SyncyTowne | server/server.py | server.py | py | 3,458 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "http.server.server",
"line_number": 70,
"usage_type": "attribute"
},
{
"api_name": "http.server",
"line_number": 70,
"usage_type": "name"
},
{
"api_name": "http.server.server.BaseHTTPRequestHandler.__init__",
"line_number": 76,
"usage_type": "call"
},
{... |
43375198517 | from bs4 import BeautifulSoup, Comment, NavigableString, Tag
import htmlmin
from playwright.async_api import async_playwright
def clean_html(html_content):
# Create a BeautifulSoup object and specify the parser
soup = BeautifulSoup(html_content, "html.parser")
# Remove script tags
for scrip... | CreatlV/thesis | demo/lm/html_utils.py | html_utils.py | py | 2,995 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bs4.Comment",
"line_number": 15,
"usage_type": "argument"
},
{
"api_name": "bs4.NavigableString",
"line_number": 26,
"usage_type": "argument"
},
{
"api_name": "htmlmin.mini... |
19357294282 | #!/usr/bin/env python3
"""
Read Atlas Scientific water quality sensors
and send their readings over LoRaWAN via a
Dragino Raspberry Pi hat.
Add --sleep argument to control time between transmission.
cache.json will be created if it doesn't exist
Based on:
* https://github.com/whitebox-labs/... | sighmon/water-quality-lorawan-dragino-pi | water_quality.py | water_quality.py | py | 4,077 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "RPi.GPIO.setwarnings",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "RPi.GPIO",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "logging.DEBUG",... |
18012773105 | #!/usr/bin/env python3
"""Author: Matuzalem (Mat) Muller.
License: GPLv3
"""
import sys
def main():
"""Entrypoint.
If no parameters are provided, start in GUI mode. Otherwise,
run in CLI mode. The imports are done according to the execution mode: if
CLI mode is used it is not necessary to import all... | matuzalemmuller/dummy-files-creator | dummyfilescreator/__main__.py | __main__.py | py | 692 | python | en | code | 11 | github-code | 21 | [
{
"api_name": "sys.argv",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets.QApplication",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "dfc_ui.DFCUi... |
22435221874 | __author__ = 'Pavan Kotehal'
from . import models
from rest_framework import serializers
class ResponseSerializer(serializers.ModelSerializer):
class Meta:
extra_kwargs = {
'user': {'write_only': True}
}
fields = (
'id',
'survey',
'question'... | pavankotehal/inhouse_survey | feedback/serializers.py | serializers.py | py | 407 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 7,
"usage_type": "name"
}
] |
25874744558 | import matplotlib.pyplot as plt
from scipy.optimize import fsolve
from scipy.special import comb
import scipy.integrate as integrate
import numpy as np
from classes.plotting import *
from parameters_functions import *
N_block = 1000
s = 10
theta_0 = 0# / 180 * np.pi
amp_c_c = 1.5
j_max = 1.2 * amp_c_c
j_min = -0.7 * a... | j857388954/MFT_for_Ring | ring_calc_ZJ.py | ring_calc_ZJ.py | py | 3,649 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.tanh",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "scipy.special.comb",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "scipy.special.comb",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"l... |
25491793557 | from django.shortcuts import render, get_object_or_404
from myblog.models import Post, Comment
from django.core.paginator import Paginator
from django.contrib.auth import login, authenticate
from django.http import HttpResponseRedirect, HttpResponse
from myblog.forms import SigUpForm, SignInForm, FeedBackForm
from djan... | entourage5/Mysite | blog/myblog/views.py | views.py | py | 5,114 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "myblog.models.Post.objects.all",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "myblog.models.Post.objects",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "myblog.models.Post",
"line_number": 16,
"usage_type": "name"
},
{
... |
11185996778 | #!/usr/bin/python3
# _*_ coding:utf-8 _*_
# @Time : 9/12/17 1:39 AM
# @Author : 'zhangxun'
# @Email : 15025689012@163.com
# @File : lasReaderWriter_Debug.py.py
# @Software: PyCharm
import datetime
import struct
from IO.PCIO.LasDefine import LasFormat0
from IO.PCIO.LasReader import LasReader
from IO.PCIO.LasW... | zhang-xun/python-las | test/lasReaderWriter_Debug.py | lasReaderWriter_Debug.py | py | 2,297 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "IO.PCIO.LasReader.LasReader",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 47,
"usage_type": "attribute"
},
{
"api_name... |
27258292344 | from django.shortcuts import render,redirect,get_list_or_404,get_object_or_404
from orders.models import Order
from .models import *
from .forms import *
from django.http import HttpResponse,HttpResponseRedirect
from django.contrib import messages
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginato... | shabi9605/hydaker | product/views.py | views.py | py | 6,740 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.shortcuts.render",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages.success",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "django.contrib.messages",
"line_number": 32,
"usage_type": "name"
},
{
"a... |
16120847590 | from datetime import datetime
import serial as s
## Documentation for the AGPort class
#
# This class extend the python Serial class with some function that simplifies its use with the agilis controllers commands
class AGPort(s.Serial):
## Class constructor
# @param portName String: The name of the virt... | lando1784/pyagilis | pyagilis/agPort.py | agPort.py | py | 2,317 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "serial.Serial",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "serial.EIGHTBITS",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "serial.PARITY_NONE",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "seria... |
35994368538 |
import os
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" # see issue #152
os.environ["CUDA_VISIBLE_DEVICES"] = ""
#from model import unet, unetLightMobile
from model import unetLightMobile
#import tflite_runtime.interpreter as tflite
import cv2
#from train import generator
import numpy as np
import pdb
import dlib
i... | appstud/appstud-glens-backend | training_glens/hairSegmentation/src/test/test.py | test.py | py | 6,232 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.environ",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_PROP_FPS",
... |
4565457724 | #!/usr/bin/env python3
from setuptools import setup, find_packages
description = "A collection of useful signal processing and astronomy functionality"
setup(
name="doodads",
version="0.0.1.dev",
url="https://github.com/joseph-long/doodads",
description=description,
author="Joseph D. Long",
au... | joseph-long/doodads | setup.py | setup.py | py | 897 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
}
] |
31095187115 | import PySide6.QtCore as QtCore
import PySide6.QtWidgets as QtWidgets
import mainwindowqmainwindow
from settings import user_settings
class DraggableQFrame(QtWidgets.QFrame):
"""A custom QFrame class that allows for dragging and moving its QMainWindow."""
def mousePressEvent(self, event):
self.old_p... | Davi-S/Toolorant | src/custom/draggableqframe.py | draggableqframe.py | py | 724 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "PySide6.QtWidgets.QFrame",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "PySide6.QtWidgets",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "mainwindowqmainwindow.get_main_window",
"line_number": 14,
"usage_type": "call"
},
{
... |
6707480339 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.db.models.signals import pre_save,post_save
from django.dispatch import receiver
from django.shortcuts import render,get_object_or_404,redirect
class owner(models.Model):
name = models.CharField(max_length=30)
... | riddhesh-jangid/Milken | start/models.py | models.py | py | 3,804 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.db.models.Model",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "... |
15443962897 | import typing
import datetime
import logging
from uds.REST.handlers import AUTH_TOKEN_HEADER
from uds.REST.methods.actor_v3 import MANAGED, UNMANAGED, ALLOWED_FAILS
from uds.core.util.stats import counters
from ..utils import rest
from ..fixtures import stats_counters
logger = logging.getLogger(__name__)
class Sys... | Future998/openuds | server/src/tests/REST/test_system.py | test_system.py | py | 2,483 | python | en | code | null | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "utils.rest.test",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "utils.rest",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "utils.rest.test",
... |
44370929093 | import os, sys
import pygame
from samuraijam.util.Helpers import *
from pygame.locals import *
from samuraijam.player.attacks import VerticalSlash
class Enemy(pygame.sprite.Sprite):
def __init__(self, xPos, yPos):
pygame.sprite.Sprite.__init__(self)
#self.image, self.rect = load_image('pinkcreep... | SamuraiJam/SamuraiJam | src/samuraijam/enemies/Enemy.py | Enemy.py | py | 1,082 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pygame.sprite",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pygame.sprite.Sprite.__init__",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pygame.sprite",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "sa... |
41952452226 | #!/usr/bin/python3
"""Libvirt port-forwarding hook control utility.
Utility for adding, modifying and deleting machine definitions from the Libvirt
hook configuration file.
0.0.1:
======
* Initial version
"""
__author__ = "Martin Bo Kristensen Groenholdt <martin.groenholdt@gmail.com>"
__version__ = "0.0.1"
impo... | deadbok/libvirt-nat-hook | hookctrl.py | hookctrl.py | py | 9,266 | python | en | code | null | github-code | 21 | [
{
"api_name": "os.getenv",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_nu... |
6875145350 | from data.container_handler import get_containers
async def get_tree(username):
containers, extras = get_containers(username)
if containers is None:
return {}
items = ""
for container in ("inventory", "accessories", "ender_chest", "armor", "wardrobe", "vault", "storage", "pets"):
for ... | lappalaineev/CommunityAPI | api/endpoints/tree.py | tree.py | py | 473 | python | en | code | null | github-code | 21 | [
{
"api_name": "data.container_handler.get_containers",
"line_number": 4,
"usage_type": "call"
}
] |
38017248535 | import math
import operator
import pandas as pd
from sklearn import metrics
from KNN1 import KNN
def opt(k):
features_index = []
res = KNN(k)
y_test = res[0]
test_res = res[1]
acc = metrics.accuracy_score(y_test, test_res)
tmp_acc=acc
tmp = []
features_init = list(ra... | maram-yehya/ill-or-not | OPT.py | OPT.py | py | 1,375 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "KNN1.KNN",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sklearn.metrics.accuracy_score",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sklearn.metrics",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "KNN1.KNN",
... |
42267375908 | import os
import re
import unittest
from unittest.runner import TextTestResult
import vtk, qt, ctk, slicer
from slicer.ScriptedLoadableModule import *
import logging
#
# OpenAnatomyExport
#
class OpenAnatomyExport(ScriptedLoadableModule):
"""Uses ScriptedLoadableModule base class, available at:
https://github.com... | PerkLab/SlicerOpenAnatomy | OpenAnatomyExport/OpenAnatomyExport.py | OpenAnatomyExport.py | py | 25,911 | python | en | code | 13 | github-code | 21 | [
{
"api_name": "slicer.util.loadUI",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "slicer.util",
"line_number": 47,
"usage_type": "attribute"
},
{
"api_name": "slicer.util.childWidgetVariables",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "... |
25547661992 | from django.conf.urls import patterns, url
from morphology import views
urlpatterns = patterns(
'',
url(r'^segments/(?P<segment_id>\d+)$',
views.quran_segment_by_id,
name='quran_segment_by_id'),
url(r'^(?P<chapter>\d+)/(?P<verse>\d+)/tokens$',
views.quran_verse_tokens,
name='quran_verse_t... | shamsuzzamansadi/quranic-corpus | website/morphology/urls.py | urls.py | py | 659 | python | en | code | 8 | github-code | 21 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "morphology.views.quran_segment_by_id",
"line_number": 7,
"usage_type": "attribute"
},
{
... |
23051441523 | import os
import pycurl
import magic
import requests
from requests_toolbelt import MultipartEncoder, MultipartEncoderMonitor
from src.classes.Config import Config
mime = magic.Magic(mime=True)
def download(url):
return requests.get(url, allow_redirects=True).content
# Class which holds a file reference and t... | hoangtu92/calomni_software | src/api/Api.py | Api.py | py | 9,325 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "magic.Magic",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "src.classes.Config.Config.load_token",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "src.cla... |
2071356797 | import json
"""Documentation for a class.
Object representing an ipv4 address and port
"""
class IPV4Connection:
def __init__(self, address, port):
if not isinstance(address, str):
raise Exception("ADDRESS Must be a string")
if not isinstance(port, int):
raise Exception("PORT Must ... | monolith-network/pycrate | pycrate/types.py | types.py | py | 14,152 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.loads",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 108,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 171,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 22... |
21180455144 | from django.forms import ModelForm
from .models import Book, Quote,Author
from dal import autocomplete
from . import urls
class BookForm(ModelForm):
class Meta:
model = Book
fields = ('title', 'image', 'author', 'summary', 'tags', 'isbn' )
widgets = {
'author': autocomplete.Mod... | maciejurm/zyjswiadomieeuv3 | books/forms.py | forms.py | py | 603 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "models.Book",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "dal.autocomplete.ModelSelect2",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "dal.au... |
22176481530 | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import datetime
import re
import redis
import scrapy
from scrapy.loader import ItemLoader
from scrapy.loader.processors import MapCompose, TakeFirst, Join
from w3lib.... | dongnanzhy/web-crawler | ArticleSpider/ArticleSpider/items.py | items.py | py | 15,763 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "elasticsearch_dsl.connections.connections.create_connection",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "elasticsearch_dsl.connections.connections",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "redis.StrictRedis",
"line_number": 24,
... |
41799176116 | import importlib
import json
import logging
import os
import random
import sys
import traceback
import warnings
from typing import Any, Dict, List, Optional, Union, cast
import numpy as np
logger = logging.getLogger(__name__)
def set_seed(seed: Optional[int], enable_gpu: bool = False):
if seed is None:
... | pocokhc/simple_distributed_rl | srl/utils/common.py | common.py | py | 10,012 | python | en | code | 25 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "typing.Optional",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "random.seed",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
... |
26850391327 | import yaml
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument("-d",
type=str,
required=True,
help="yaml data file containg publication.")
args = parser.parse_args()
fl = open(args.d, "r")
data = yaml.load(fl, Loader=yaml.CLoade... | md-arif-shaikh/md-arif-shaikh.github.io | scripts/generate_publication_list_for_tex.py | generate_publication_list_for_tex.py | py | 1,089 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "yaml.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "yaml.CLoader",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.path.splitext",... |
28935851574 | #Gupta, R.; Gupta, P.; Wang, S.; Melnykov, A.; Jiang, Q.; Seth, A.; Wang, Z.; Morrissey, J.; George, I.; Gandra, S.; Sinha, P.; Storch, G.; Parikh, B.; Genin, G.; Singamanenei, S.;
#Ultrasensitive lateral-flow assays via plasmonically active antibody-conjugated fluorescent nanoparticles.
#Nature Biomedical Engineerin... | seanwangsalad/AreaUnderCurveForLFAReader | AreaUnderTheCurve.py | AreaUnderTheCurve.py | py | 7,388 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.abs",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"lin... |
37145034956 | from datetime import datetime
from .business import Analytics
from .constants import typography
from .post import Post
class FeedStory(Post, Analytics):
"""Stories created by the user"""
typography = None
emoji = None
background_color = None
text_color = None
created = None
def __init__(... | Jhilbran/Instagram_console_test | modules/feedstory.py | feedstory.py | py | 1,711 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "post.Post",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "business.Analytics",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "constants.typography",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "constants.typography"... |
29361667815 | import datetime
import unittest
from unittest import mock
import numpy as np
import pytest
import xarray as xr
from satpy.tests.utils import make_dataid
class GOESNCBaseFileHandlerTest(unittest.TestCase):
"""Testing the file handler."""
longMessage = True
@mock.patch('satpy.readers.goes_imager_nc.xr')... | Mervolt/pp | venv/Lib/site-packages/satpy/tests/reader_tests/test_goes_imager_nc.py | test_goes_imager_nc.py | py | 23,947 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "unittest.TestCase",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "satpy.readers.goes_imager_nc.CALIB_COEFS",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
"line_number": 28,
"usage_type": "call"
},
{
... |
8915174272 | import tensorflow as tf
import utils
import numpy as np
import json
import time
from tensorflow.keras.preprocessing.image import ImageDataGenerator
tf.random.set_seed(0)
class Block1(tf.keras.layers.Layer):
def __init__(self,filters,kernel_size=(3,3), stride=1):
super(Block1, self).__init__()
self... | JinyuJinyuJinyu/MasterProject | beta/vgg16_tf.py | vgg16_tf.py | py | 9,600 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "tensorflow.random.set_seed",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "tensorflow.random",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": ... |
10356228703 | import torch.nn as nn
import torch
from net import mlp
from torch.distributions import Categorical,Normal,Distribution
import numpy as np
from logger import Logger
from gym.spaces import Box,Discrete
class MLPActor(nn.Module):
def __init__(self,params) -> None:
super().__init__()
self.params=params... | DiligentPanda/mrllib | mrl/actor.py | actor.py | py | 2,295 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.nn.Module",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "gym.spaces.Discrete",
"line_number": 19,
"usage_type": "argument"
},
{
"api_name": "gym.spaces.Box",
... |
32850234581 | from django.conf import settings
from corehq.apps.hqadmin.management.commands.make_supervisor_conf import SupervisorConfCommand
class Command(SupervisorConfCommand):
help = "Make pillowtop supervisord conf - multiple configs per the PILLOWTOPS setting"
args = ""
def render_configuration_file(self, conf_t... | gmimano/commcaretest | corehq/apps/hqadmin/management/commands/make_supervisor_pillowtop_conf.py | make_supervisor_pillowtop_conf.py | py | 1,011 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "corehq.apps.hqadmin.management.commands.make_supervisor_conf.SupervisorConfCommand",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.conf.settings.PILLOWTOPS.items",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.PILL... |
7373190777 | import logging
'''
try:
r = 10/int('a')
print('result:',r) #上面有错,这句不会执行
except ValueError as e:
print('ValueError:',e)
logging.exception(e)
except ZeroDivisionError as e:
print('ZeroDivisionError:',e)
else:
print('no error') # 此外,如果没有错误发生,可以在except语句块后面加一个else,当没有错误发生时,会自动执行else语句:
finally: # fi... | xfhy/LearnPython | 廖雪峰老师的教程/8. 错误,调试+测试/错误处理.py | 错误处理.py | py | 2,653 | python | zh | code | 0 | github-code | 21 | [
{
"api_name": "functools.reduce",
"line_number": 60,
"usage_type": "call"
}
] |
71649620213 | import abc
import typing
from google import auth
from google.auth import credentials # type: ignore
from perxtech.ml_v1beta1.types import reward_recommendation
class RewardRecommendationTransport(metaclass=abc.ABCMeta):
"""Abstract transport class for RewardRecommendation."""
AUTH_SCOPES = (
)
de... | PerxTech/perx-ml-api-client | sdk/python/perxtech/ml_v1beta1/services/reward_recommendation/transports/base.py | base.py | py | 1,670 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "abc.ABCMeta",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "google.auth.credentials.Credentials",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "google.auth.credentials",
"line_number": 19,
"usage_type": "name"
},
{
... |
31095367345 | import json
from pathlib import Path
import dynaconf
APP_SETTINGS_PATH = Path(__file__).resolve().parent / 'app_settings.toml'
USER_SETTINGS_PATH = Path(__file__).resolve().parent / 'user_settings.json'
SECRETS_PATH = Path(__file__).resolve().parent / '.secrets.toml'
class CustomDynaconf(dynaconf.Dynaconf):
"""... | Davi-S/Toolorant | src/settings/__init__.py | __init__.py | py | 864 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "pathlib.Path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "dynaconf.Dynaconf",
"line_num... |
31599403581 | import os
import argparse
from segmentation.threshold import InRange
from annotation import coco2yolo
from data.videos import extract_frames, track
from postprocessing.glitter import tracks2nix
def parse_args():
arg_builder = argparse.ArgumentParser(
description="Multiple Animal Tracking"
)
arg_bu... | healthonrails/annolid | annolid/main.py | main.py | py | 7,620 | python | en | code | 28 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "data.videos.extract_frames",
"line_number": 109,
"usage_type": "call"
},
{
"api_name": "segmentation.threshold.InRange",
"line_number": 116,
"usage_type": "call"
},
{
... |
18957124505 | #!/usr/bin/env python
from __future__ import print_function
from binascii import hexlify
import struct
import sys
import time
import serial
import threading
import Queue
def bidict(d):
new_d = dict()
for (k,v) in d.items():
new_d[v] = k
new_d[k] = v
return new_d
AXIS_MAP = {
0: "Left-X... | thejpster/robot | dualshock.py | dualshock.py | py | 3,622 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "struct.unpack",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "serial.Serial",
"line_number": 127,
"usage_type": "call"
},
{
"api_name": "Queue.Queue",
"line_number": 133,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"lin... |
42243276112 | #!/usr/bin/env python
import sys
import rospy
from core2.msg import Core2PubMsg
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import datetime as dt
import numpy as np
from matplotlib.widgets import CheckButtons
import threading
class Odometry:
def __init__(self):
pass
circui... | TopRamen1/CarDataVisualisation | analytic_center/scripts/plot_drawer.py | plot_drawer.py | py | 3,487 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "datetime.datetime.now",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "rospy.Subscriber",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "core2.m... |
1606298844 | import streamlit as st
from streamlit_option_menu import option_menu
from outscraper import ApiClient
import pandas as pd
import os
import openai
import requests
from tqdm import tqdm
import time
import docx
import datetime
import base64
st.set_page_config(
page_title="My Streamlit App",
lay... | soerenssch/SentimentAnalysis_Capstone | Test.py | Test.py | py | 10,149 | python | de | code | 0 | github-code | 21 | [
{
"api_name": "streamlit.set_page_config",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "streamlit.container",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "streamlit.image",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "streaml... |
16269970433 | from flask import Flask, json, request, jsonify
import pytesseract
from pdf2image import convert_from_path, convert_from_bytes
import os
import uuid
import boto3
# environment variables
from config import S3_BUCKET_NAME, AWS_ACCESS_KEY, AWS_SECRET_KEY, TESSDATA_PREFIX
pytesseract.pytesseract.tesseract_cmd = str(os.env... | RehberOdhano/OCR-Flask-API | app.py | app.py | py | 2,393 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pytesseract.pytesseract",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "flask.Fla... |
4980723692 | import os
import time
import json
import html
from tornado import websocket, web
HOST = 'http://tornado-ws-spark-tornado-ws-spark.193b.starter-ca-central-1.openshiftapps.com'
USERS = []
# TODO: name generator or give the user the ability to specify a name
AVAILABLE_USER_NAMES = {
'voluptate', 'deleniti', 'consequu... | melnik-ivan/spark | spark_app.py | spark_app.py | py | 5,522 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "time.time",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "html.escape",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "tornado.web.RequestHandler",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "tornado.web",
... |
22357873529 | import json
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.model.rename_doc import rename_doc
from frappe.utils import flt, today
from healthcare.healthcare.doctype.clinical_procedure_template.clinical_procedure_template import (
make_item_price,
update_item_and_item_price... | frappe/health | healthcare/healthcare/doctype/lab_test_template/lab_test_template.py | lab_test_template.py | py | 4,803 | python | en | code | 190 | github-code | 21 | [
{
"api_name": "frappe.model.document.Document",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "frappe.db.get_all",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "frappe.db",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "frapp... |
28601188766 | import numpy as np
from flask import Flask, request, jsonify, render_template
import pickle
import xgboost as xgb
import pandas as pd
import datetime
import joblib
app = Flask(__name__)
# model = pickle.load(open("pima.pickle.dat", "rb"))
# model = xgb.Booster()
# model.load_model("model.json")
# filename = 'global.... | abhisheksoni-iitb/mould-inspection | app.py | app.py | py | 2,965 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "xgboost.XGBClassifier",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "flask.request... |
10541763471 | import RPi.GPIO as GPIO
import multiprocessing
import time
button = 25
led = [4, 17, 18, 23, 24]
b_ltr = True
counter = 0
led_direction = 0 # 0 is left to right, 1 is right to left
GPIO.setmode(GPIO.BCM)
GPIO.setup(button, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(4, GPIO.OUT)
GPIO.setup(17, GPIO.OUT)
GPIO.setu... | robocharlie/489b | lab4/43.py | 43.py | py | 1,402 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "RPi.GPIO.setmode",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "RPi.GPIO",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "RPi.GPIO.BCM",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "RPi.GPIO.setup",
"lin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.