code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import datetime import logging from airflow import DAG from airflow.models import Variable from airflow.operators.python_operator import PythonOperator from airflow.hooks.S3_hook import S3Hook def list_keys(): hook = S3Hook(aws_conn_id='aws_credentials') bucket = Variable.get('s3_bucket') logging.info(f"...
[ "airflow.models.Variable.get", "airflow.operators.python_operator.PythonOperator", "airflow.hooks.S3_hook.S3Hook", "datetime.datetime.now", "logging.info" ]
[((550, 621), 'airflow.operators.python_operator.PythonOperator', 'PythonOperator', ([], {'task_id': '"""list_keys"""', 'python_callable': 'list_keys', 'dag': 'dag'}), "(task_id='list_keys', python_callable=list_keys, dag=dag)\n", (564, 621), False, 'from airflow.operators.python_operator import PythonOperator\n'), ((2...
from django.conf.urls import url from . import views app_name = 'orchid_app' urlpatterns = [ url(r'^$', views.list, name='list'), url(r'^actions/$', views.action_list, name='action_list'), url(r'^sysinfo/$', views.sysinfo_list, name='sysinfo_list'), ]
[ "django.conf.urls.url" ]
[((100, 134), 'django.conf.urls.url', 'url', (['"""^$"""', 'views.list'], {'name': '"""list"""'}), "('^$', views.list, name='list')\n", (103, 134), False, 'from django.conf.urls import url\n'), ((141, 197), 'django.conf.urls.url', 'url', (['"""^actions/$"""', 'views.action_list'], {'name': '"""action_list"""'}), "('^ac...
"""Legrand Home+ Control Cover Entity Module that uses the HomeAssistant DataUpdateCoordinator.""" from functools import partial from homeassistant.components.cover import ( ATTR_POSITION, DEVICE_CLASS_SHUTTER, SUPPORT_CLOSE, SUPPORT_OPEN, SUPPORT_SET_POSITION, SUPPORT_STOP, CoverEntity, ) ...
[ "functools.partial", "homeassistant.helpers.dispatcher.async_dispatcher_connect" ]
[((1574, 1634), 'functools.partial', 'partial', (['add_cover_entities'], {'add_entities': 'async_add_entities'}), '(add_cover_entities, add_entities=async_add_entities)\n', (1581, 1634), False, 'from functools import partial\n'), ((1783, 1877), 'homeassistant.helpers.dispatcher.async_dispatcher_connect', 'dispatcher.as...
import os import re from os import path as op import itertools from collections import OrderedDict class DirScanner(object): def __init__(self, top_dir, ignores=None, ignore_symlinks=False, ignore_files=False, ignore_dirs=False, ignore_empty_dirs=False): # Check top_dir is valid at sta...
[ "os.listdir", "re.compile", "os.path.join", "os.path.isdir", "os.path.islink" ]
[((1045, 1059), 'os.listdir', 'os.listdir', (['dr'], {}), '(dr)\n', (1055, 1059), False, 'import os\n'), ((338, 355), 'os.path.isdir', 'op.isdir', (['top_dir'], {}), '(top_dir)\n', (346, 355), True, 'from os import path as op\n'), ((523, 540), 're.compile', 're.compile', (['pattn'], {}), '(pattn)\n', (533, 540), False,...
# Generated by Django 2.2.12 on 2020-05-18 11:43 import account.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('account', '0005_auto_20200518_1120'), ] operations = [ migrations.AlterField( model_name='userprofile', ...
[ "django.db.models.ImageField" ]
[((375, 496), 'django.db.models.ImageField', 'models.ImageField', ([], {'default': '"""defaultBackground.jpg"""', 'null': '(True)', 'upload_to': 'account.models.introduction_image_save_path'}), "(default='defaultBackground.jpg', null=True, upload_to=\n account.models.introduction_image_save_path)\n", (392, 496), Fal...
from argparse import Namespace from OCBO.strategies.agnostic_opt import agn_strats from OCBO.strategies.corr_opt import corr_strats, corr_args from OCBO.strategies.multi_opt import multi_opt_args from OCBO.strategies.random_strat import RandomOpt, JointRandom from OCBO.strategies.mei import MEI from OCBO.strategies.mt...
[ "OCBO.strategies.mts.MTS.get_opt_method_name", "OCBO.strategies.random_strat.JointRandom.get_opt_method_name", "OCBO.strategies.joint_mei.JointMEI.get_opt_method_name", "argparse.Namespace", "OCBO.strategies.mei.MEI.get_opt_method_name", "OCBO.strategies.joint_mts.JointMTS.get_opt_method_name" ]
[((508, 548), 'argparse.Namespace', 'Namespace', ([], {'name': '"""Random"""', 'impl': 'RandomOpt'}), "(name='Random', impl=RandomOpt)\n", (517, 548), False, 'from argparse import Namespace\n'), ((861, 894), 'OCBO.strategies.random_strat.JointRandom.get_opt_method_name', 'JointRandom.get_opt_method_name', ([], {}), '()...
import random import array import time def generate32bitStringFromDecimal(decimal): not32bit = bin(decimal).replace("0b", "") boyut = len(not32bit) zero = 32 - boyut fixed32bit = "" for i in range(zero): fixed32bit = fixed32bit + "0" for i in range(boyut): fixed32bi...
[ "random.getrandbits", "time.time" ]
[((409, 431), 'random.getrandbits', 'random.getrandbits', (['(32)'], {}), '(32)\n', (427, 431), False, 'import random\n'), ((4976, 4987), 'time.time', 'time.time', ([], {}), '()\n', (4985, 4987), False, 'import time\n'), ((5026, 5037), 'time.time', 'time.time', ([], {}), '()\n', (5035, 5037), False, 'import time\n')]
#!/usr/bin/env python3 # Copyright 2020 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
[ "logging.getLogger", "listener.base_jrpc_listener.parse_bind_url", "argparse.ArgumentParser", "listener.base_jrpc_listener.get_config_dir", "sys.exit", "config.config.parse_configuration_files" ]
[((835, 862), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (852, 862), False, 'import logging\n'), ((1787, 1812), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1810, 1812), False, 'import argparse\n'), ((3161, 3186), 'argparse.ArgumentParser', 'argparse.Argume...
import itertools from coalib.bears.GlobalBear import GlobalBear from coalib.results.Result import Result from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY class DuplicateFileBear(GlobalBear): LANGUAGES = {'All'} AUTHORS = {'The coala developers'} AUTHORS_EMAILS = {'<EMAIL>'} LICENSE = 'AGPL-...
[ "itertools.combinations", "coalib.results.Result.Result.from_values", "coalib.results.Result.Result" ]
[((486, 574), 'coalib.results.Result.Result', 'Result', (['self', '"""You did not add any file to compare"""'], {'severity': 'RESULT_SEVERITY.MAJOR'}), "(self, 'You did not add any file to compare', severity=\n RESULT_SEVERITY.MAJOR)\n", (492, 574), False, 'from coalib.results.Result import Result\n'), ((652, 726), ...
import os from db.crud import get_db from sqlalchemy.orm.session import Session from fastapi.security import OAuth2PasswordBearer from jose import jwt, JWTError from passlib.context import CryptContext from typing import Optional from datetime import datetime, timedelta from fastapi import Depends, HTTPException, statu...
[ "db.crud.get_user_by_email", "fastapi.security.OAuth2PasswordBearer", "fastapi.HTTPException", "datetime.datetime.utcnow", "jose.jwt.decode", "passlib.context.CryptContext", "os.environ.get", "jose.jwt.encode", "datetime.timedelta", "fastapi.Depends" ]
[((400, 432), 'os.environ.get', 'os.environ.get', (['"""JWT_SECRET_KEY"""'], {}), "('JWT_SECRET_KEY')\n", (414, 432), False, 'import os\n'), ((469, 520), 'passlib.context.CryptContext', 'CryptContext', ([], {'schemes': "['bcrypt']", 'deprecated': '"""auto"""'}), "(schemes=['bcrypt'], deprecated='auto')\n", (481, 520), ...
# ***************************************************************** # Copyright 2013 MIT Lincoln Laboratory # Project: SPAR # Authors: SY # Description: report generator superclass # # # Modifications: # Date Name Modification # ---- ...
[ "logging.getLogger" ]
[((533, 560), 'logging.getLogger', 'logging.getLogger', (['__file__'], {}), '(__file__)\n', (550, 560), False, 'import logging\n')]
import unittest from asq.queryables import Queryable __author__ = "<NAME>" class TestToSet(unittest.TestCase): def test_to_set(self): a = [1, 2, 4, 8, 16, 32] b = Queryable(a).to_set() c = set([1, 2, 4, 8, 16, 32]) self.assertEqual(b, c) def test_to_set_closed(self): ...
[ "asq.queryables.Queryable" ]
[((357, 369), 'asq.queryables.Queryable', 'Queryable', (['a'], {}), '(a)\n', (366, 369), False, 'from asq.queryables import Queryable\n'), ((533, 545), 'asq.queryables.Queryable', 'Queryable', (['a'], {}), '(a)\n', (542, 545), False, 'from asq.queryables import Queryable\n'), ((186, 198), 'asq.queryables.Queryable', 'Q...
import os from azure.storage.blob import BlobServiceClient from pathlib import Path from datetime import datetime as dt def download_if_required(config, force=False): STORAGEACCOUNTURL = os.environ['STORAGEACCOUNTURL'] STORAGEACCOUNTKEY = os.environ['STORAGEACCOUNTKEY'] CONTAINERNAME = os.environ['CONTAINE...
[ "datetime.datetime.utcnow", "azure.storage.blob.BlobServiceClient", "os.makedirs", "pathlib.Path" ]
[((346, 424), 'azure.storage.blob.BlobServiceClient', 'BlobServiceClient', ([], {'account_url': 'STORAGEACCOUNTURL', 'credential': 'STORAGEACCOUNTKEY'}), '(account_url=STORAGEACCOUNTURL, credential=STORAGEACCOUNTKEY)\n', (363, 424), False, 'from azure.storage.blob import BlobServiceClient\n'), ((461, 471), 'pathlib.Pat...
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests, getpass, json, pprint import asyncio import websockets async def hello(): async with websockets.connect('ws://localhost:8000/playsolo/?token='+token) as websocket: await websocket.send('{"test":1}') while 1: print("\n") ...
[ "requests.post", "json.decoder.JSONDecoder", "requests.get", "getpass.getpass", "websockets.connect", "asyncio.get_event_loop", "pprint.pprint" ]
[((674, 700), 'json.decoder.JSONDecoder', 'json.decoder.JSONDecoder', ([], {}), '()\n', (698, 700), False, 'import requests, getpass, json, pprint\n'), ((832, 860), 'getpass.getpass', 'getpass.getpass', (['"""Password:"""'], {}), "('Password:')\n", (847, 860), False, 'import requests, getpass, json, pprint\n'), ((1551,...
import os from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.test.testcases import LiveServerTestCase, LiveServerThread, QuietWSGIRequestHandler from sslserver.management.commands.runsslserver import ( SecureHTTPServer, WSGIRequestHandler, default_ssl_files_dir, ) class SecureQu...
[ "sslserver.management.commands.runsslserver.default_ssl_files_dir", "sslserver.management.commands.runsslserver.SecureHTTPServer" ]
[((646, 742), 'sslserver.management.commands.runsslserver.SecureHTTPServer', 'SecureHTTPServer', (['(self.host, self.port)', 'SecureQuietWSGIRequestHandler', 'cert_file', 'key_file'], {}), '((self.host, self.port), SecureQuietWSGIRequestHandler,\n cert_file, key_file)\n', (662, 742), False, 'from sslserver.managemen...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 9/13/20 4:53 PM # @Author : joshon # @Site : hsae # @File : test.py # @Software: PyCharm from tensorflow.keras.layers import Lambda ,Input import tensorflow as tf import numpy as np import keras.backend as K import cv2 # @tf.function def f(): a = tf...
[ "tensorflow.Variable", "numpy.array", "tensorflow.constant", "tensorflow.matmul", "tensorflow.print", "keras.backend.concatenate" ]
[((829, 862), 'keras.backend.concatenate', 'K.concatenate', (['[tt1, tt2]'], {'axis': '(0)'}), '([tt1, tt2], axis=0)\n', (842, 862), True, 'import keras.backend as K\n'), ((318, 354), 'tensorflow.constant', 'tf.constant', (['[[10, 10], [11.0, 1.0]]'], {}), '([[10, 10], [11.0, 1.0]])\n', (329, 354), True, 'import tensor...
from sklearn import datasets from sklearn.metrics import accuracy_score from sklearn.model_selection import train_test_split from sklearn.preprocessing import minmax_scale from algorithms.backpropagation import bp_fit from algorithms.elm import elm_fit, elm_predict from utils.label_encoding import onehot_enc, onehot_d...
[ "sklearn.model_selection.train_test_split", "utils.label_encoding.onehot_dec", "sklearn.datasets.load_digits", "algorithms.elm.elm_predict", "sklearn.preprocessing.minmax_scale", "utils.label_encoding.onehot_enc", "algorithms.elm.elm_fit", "sklearn.metrics.accuracy_score", "algorithms.backpropagatio...
[((348, 370), 'sklearn.datasets.load_digits', 'datasets.load_digits', ([], {}), '()\n', (368, 370), False, 'from sklearn import datasets\n'), ((379, 404), 'sklearn.preprocessing.minmax_scale', 'minmax_scale', (['digits.data'], {}), '(digits.data)\n', (391, 404), False, 'from sklearn.preprocessing import minmax_scale\n'...
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() def reset_database(): from rest_api_app.database.models import Backup, Category # noqa db.drop_all() db.create_all()
[ "flask_sqlalchemy.SQLAlchemy" ]
[((46, 58), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', ([], {}), '()\n', (56, 58), False, 'from flask_sqlalchemy import SQLAlchemy\n')]
import re b = open("demo.txt", 'r') for regel in b: if re.search(".*(@|\[at\]).*(\.|\[dot\])(com|nl|be)", regel): print(regel)
[ "re.search" ]
[((60, 122), 're.search', 're.search', (['""".*(@|\\\\[at\\\\]).*(\\\\.|\\\\[dot\\\\])(com|nl|be)"""', 'regel'], {}), "('.*(@|\\\\[at\\\\]).*(\\\\.|\\\\[dot\\\\])(com|nl|be)', regel)\n", (69, 122), False, 'import re\n')]
from pylanguagetool import converters markdown = """# Heading This is *a* Sentence. """ html = """<h1>Heading</h1> <p>This is <em>a</em> Sentence.</p> """ plaintext = """Heading This is a Sentence. """ ipython = """{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "#...
[ "pylanguagetool.converters.ipynb2markdown", "pylanguagetool.converters.markdown2html", "pylanguagetool.converters.html2text" ]
[((936, 962), 'pylanguagetool.converters.html2text', 'converters.html2text', (['html'], {}), '(html)\n', (956, 962), False, 'from pylanguagetool import converters\n'), ((1015, 1049), 'pylanguagetool.converters.markdown2html', 'converters.markdown2html', (['markdown'], {}), '(markdown)\n', (1039, 1049), False, 'from pyl...
import time import requests from urllib.parse import urljoin from urllib3.util.retry import Retry from requests.adapters import HTTPAdapter import pytest pytest_plugins = ["docker_compose"] @pytest.fixture(scope="module") def wait_for_api(module_scoped_container_getter): """Wait for the api from my_api_service ...
[ "requests.Session", "urllib3.util.retry.Retry", "requests.adapters.HTTPAdapter", "time.sleep", "pytest.main", "urllib.parse.urljoin", "pytest.fixture", "time.time" ]
[((195, 225), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (209, 225), False, 'import pytest\n'), ((366, 384), 'requests.Session', 'requests.Session', ([], {}), '()\n', (382, 384), False, 'import requests\n'), ((399, 472), 'urllib3.util.retry.Retry', 'Retry', ([], {'total':...
import io import json import requests from pathlib import Path import joblib import numpy as np import zipfile def format_neurovault_metadata_url(collection_id): return f"https://neurovault.org/api/collections/{collection_id}" def format_neurovault_download_url(collection_id): return f"https://neurovault.o...
[ "pathlib.Path", "io.BytesIO", "requests.get", "numpy.array_split", "joblib.Parallel", "joblib.delayed" ]
[((667, 693), 'requests.get', 'requests.get', (['metadata_url'], {}), '(metadata_url)\n', (679, 693), False, 'import requests\n'), ((987, 1009), 'requests.get', 'requests.get', (['data_url'], {}), '(data_url)\n', (999, 1009), False, 'import requests\n'), ((1736, 1774), 'numpy.array_split', 'np.array_split', (['collecti...
from flask import render_template, flash, redirect, url_for from app import app from app.forms import LoginForm @app.route('/') @app.route('/index') def index(): user = {'username':'Juan'} return render_template('index.html', user = user) @app.route('/login', methods = ['GET', 'POST']) def login(): form = Login...
[ "flask.render_template", "app.forms.LoginForm", "app.app.route", "flask.url_for" ]
[((113, 127), 'app.app.route', 'app.route', (['"""/"""'], {}), "('/')\n", (122, 127), False, 'from app import app\n'), ((129, 148), 'app.app.route', 'app.route', (['"""/index"""'], {}), "('/index')\n", (138, 148), False, 'from app import app\n'), ((246, 290), 'app.app.route', 'app.route', (['"""/login"""'], {'methods':...
# import the necessary packages import sys sys.path.append("../") from pyimagesearch.utils.captchahelper import preprocess from tensorflow.keras.preprocessing.image import img_to_array from tensorflow.keras.models import load_model from imutils.contours import sort_contours from imutils import grab_contours from imuti...
[ "cv2.rectangle", "cv2.imshow", "tensorflow.keras.models.load_model", "imutils.paths.list_images", "sys.path.append", "argparse.ArgumentParser", "cv2.threshold", "imutils.grab_contours", "tensorflow.keras.preprocessing.image.img_to_array", "cv2.waitKey", "pyimagesearch.utils.captchahelper.preproc...
[((43, 65), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (58, 65), False, 'import sys\n'), ((436, 461), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (459, 461), False, 'import argparse\n'), ((717, 742), 'tensorflow.keras.models.load_model', 'load_model', (["args['mo...
import os import pytest import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') @pytest.mark.parametrize("installed_packages", [ ("httpd"), ("mod_ssl"), ]) def test_packages_installed(host, installed_pa...
[ "pytest.mark.parametrize" ]
[((191, 258), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""installed_packages"""', "['httpd', 'mod_ssl']"], {}), "('installed_packages', ['httpd', 'mod_ssl'])\n", (214, 258), False, 'import pytest\n'), ((413, 459), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""services"""', "['httpd']"], {}...
from bot import Bot import settings.config extensions = ['plugins.general', 'plugins.voice', 'plugins.chatbot'] def main(): bot = Bot(extensions) bot.run(settings.config.DISCORD_TOKEN) if __name__ == '__main__': main()
[ "bot.Bot" ]
[((136, 151), 'bot.Bot', 'Bot', (['extensions'], {}), '(extensions)\n', (139, 151), False, 'from bot import Bot\n')]
import unittest from katas.kyu_6.multiples_of_3_and_5 import solution class MultiplesOfThreeAndFiveTestCase(unittest.TestCase): def test_equals(self): self.assertEqual(solution(10), 23) def test_equals_2(self): self.assertEqual(solution(100), 2318) def test_equals_3(self): self....
[ "katas.kyu_6.multiples_of_3_and_5.solution" ]
[((183, 195), 'katas.kyu_6.multiples_of_3_and_5.solution', 'solution', (['(10)'], {}), '(10)\n', (191, 195), False, 'from katas.kyu_6.multiples_of_3_and_5 import solution\n'), ((256, 269), 'katas.kyu_6.multiples_of_3_and_5.solution', 'solution', (['(100)'], {}), '(100)\n', (264, 269), False, 'from katas.kyu_6.multiples...
#!/usr/bin/env python3 import argparse ''' * Stream of numbers. * First N numbers (N=25 for this code) are part of the preamble. * Every number following the preamble must be a sum of two of the N numbers prior to it Part 2: For the invalid number you found, there is a contiguous set of numbers in the prior preamble...
[ "argparse.ArgumentParser" ]
[((644, 714), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""XMAS decoder (Advent 2020 day 9"""'}), "(description='XMAS decoder (Advent 2020 day 9')\n", (667, 714), False, 'import argparse\n')]
import unittest from nuget_package_scanner.nuget import version_util as nugetversion from nuget_package_scanner.nuget import VersionPart as VersionPart class TestNugetVersion(unittest.TestCase): def test_get_version_part(self): m = nugetversion.pattern.match("1.2.3.4") self.assertEqual(nugetversio...
[ "nuget_package_scanner.nuget.version_util.get_version_part", "nuget_package_scanner.nuget.version_util.is_newer_release", "unittest.main", "nuget_package_scanner.nuget.version_util.get_version_count_behind", "nuget_package_scanner.nuget.version_util.pattern.match", "nuget_package_scanner.nuget.version_uti...
[((4074, 4089), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4087, 4089), False, 'import unittest\n'), ((246, 283), 'nuget_package_scanner.nuget.version_util.pattern.match', 'nugetversion.pattern.match', (['"""1.2.3.4"""'], {}), "('1.2.3.4')\n", (272, 283), True, 'from nuget_package_scanner.nuget import version...
import base64 import binascii import collections from Crypto.Cipher import PKCS1_OAEP from Crypto.PublicKey import RSA from Crypto.PublicKey.RSA import RsaKey from werkzeug.datastructures import FileStorage from .AMessage import EMessageType from .ImageMessage import ImageMessage class EncryptedImageMe...
[ "binascii.hexlify", "binascii.unhexlify" ]
[((692, 719), 'binascii.unhexlify', 'binascii.unhexlify', (['address'], {}), '(address)\n', (710, 719), False, 'import binascii\n'), ((767, 788), 'binascii.hexlify', 'binascii.hexlify', (['enc'], {}), '(enc)\n', (783, 788), False, 'import binascii\n'), ((1297, 1329), 'binascii.unhexlify', 'binascii.unhexlify', (['self....
import gzip import os import os.path import data_algebra import data_algebra.data_ops import data_algebra.db_model _have_bigquery = False try: # noinspection PyUnresolvedReferences import google.cloud.bigquery _have_bigquery = True except ImportError: pass def _bigquery_median_expr(dbmodel, express...
[ "data_algebra.data_ops.describe_table", "data_algebra.db_model.DBModel.__init__", "data_algebra.db_model.DBHandle.__init__", "gzip.open" ]
[((1186, 1381), 'data_algebra.db_model.DBModel.__init__', 'data_algebra.db_model.DBModel.__init__', (['self'], {'identifier_quote': '"""`"""', 'string_quote': '"""\\""""', 'sql_formatters': 'BigQuery_formatters', 'on_start': '"""("""', 'on_end': '""")"""', 'on_joiner': '""" AND """', 'string_type': '"""STRING"""'}), '(...
from fastapi import APIRouter from api.api_v1.horoskop import horoskop_anielski horoskop_router = APIRouter() horoskop_router.include_router(horoskop_anielski.router, prefix="/horoskop-anielski")
[ "fastapi.APIRouter" ]
[((100, 111), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (109, 111), False, 'from fastapi import APIRouter\n')]
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache L...
[ "trac.core.implements" ]
[((1104, 1137), 'trac.core.implements', 'implements', (['IDocIndexPreprocessor'], {}), '(IDocIndexPreprocessor)\n', (1114, 1137), False, 'from trac.core import Component, implements\n')]
import numpy as np import math import matplotlib.pyplot as plt import vtk from vtk.util.numpy_support import vtk_to_numpy def get_topology(path): reader = vtk.vtkXMLUnstructuredGridReader() reader.SetFileName(path) reader.Update() data = reader.GetOutput() points = data.GetPoints() npts = poin...
[ "matplotlib.pyplot.gca", "vtk.vtkXMLUnstructuredGridReader", "matplotlib.pyplot.figure", "matplotlib.pyplot.triplot", "matplotlib.pyplot.axis" ]
[((161, 195), 'vtk.vtkXMLUnstructuredGridReader', 'vtk.vtkXMLUnstructuredGridReader', ([], {}), '()\n', (193, 195), False, 'import vtk\n'), ((748, 774), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(8, 8)'}), '(figsize=(8, 8))\n', (758, 774), True, 'import matplotlib.pyplot as plt\n'), ((779, 837), 'matp...
import numpy as np from scipy.stats import linregress import json import sys import getopt try: from matplotlib import pyplot as plt except Exception: import matplotlib matplotlib.use('pdf') from matplotlib import pyplot as plt def save_plot(alg_name, file_suffix, y_label, legend_list, title_prefix, ...
[ "scipy.stats.linregress", "getopt.getopt", "matplotlib.pyplot.grid", "matplotlib.pyplot.savefig", "json.loads", "matplotlib.pyplot.ylabel", "matplotlib.use", "matplotlib.pyplot.clf", "matplotlib.pyplot.plot", "matplotlib.pyplot.axes", "matplotlib.pyplot.ticklabel_format", "numpy.around", "nu...
[((559, 600), 'matplotlib.pyplot.legend', 'plt.legend', (['legend_list'], {'loc': '"""upper left"""'}), "(legend_list, loc='upper left')\n", (569, 600), True, 'from matplotlib import pyplot as plt\n'), ((770, 789), 'matplotlib.pyplot.ylabel', 'plt.ylabel', (['y_label'], {}), '(y_label)\n', (780, 789), True, 'from matpl...
# pylint: disable=missing-module-docstring # pylint: disable=missing-class-docstring # pylint: disable=missing-function-docstring from textwrap import dedent import pytest from quantify_scheduler.backends.types.zhinst import DeviceType from quantify_scheduler.backends.zhinst.seqc_il_generator import ( SEQC_INSTR_C...
[ "textwrap.dedent", "pytest.mark.parametrize", "pytest.raises", "quantify_scheduler.backends.zhinst.seqc_il_generator.add_wait", "quantify_scheduler.backends.zhinst.seqc_il_generator.SeqcILGenerator" ]
[((2186, 2290), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""index,expected"""', "[(0, 'waitDigTrigger(1);'), (1, 'waitDigTrigger(1, 1);')]"], {}), "('index,expected', [(0, 'waitDigTrigger(1);'), (1,\n 'waitDigTrigger(1, 1);')])\n", (2209, 2290), False, 'import pytest\n'), ((4400, 4788), 'pytest.mark....
# encoding: utf-8 """ peer.py Created by <NAME> on 2013-02-26. Copyright (c) 2009-2012 Exa Networks. All rights reserved. """ from struct import unpack from exabgp.protocol.ip import IPv4 from exabgp.protocol.ip import IPv6 # XXX: FIXME: Move this within Peer with the same API as other classes such as Attribute or M...
[ "exabgp.protocol.ip.IPv6.unpack", "struct.unpack", "exabgp.protocol.ip.IPv4.unpack" ]
[((835, 859), 'exabgp.protocol.ip.IPv4.unpack', 'IPv4.unpack', (['data[32:36]'], {}), '(data[32:36])\n', (846, 859), False, 'from exabgp.protocol.ip import IPv4\n'), ((756, 779), 'struct.unpack', 'unpack', (['"""!L"""', 'data[4:8]'], {}), "('!L', data[4:8])\n", (762, 779), False, 'from struct import unpack\n'), ((795, ...
# forms.py --- Custom Forms for Dataset ingestion and management for Fedora # sever. # # 2011 (c) Colorado College # __author__ = '<NAME>' import logging from django import forms from eulxml.xmlmap import mods from eulxml.forms import XmlObjectForm,SubformField class ThesisDatasetForm(forms.Form): """DatasetForm a...
[ "django.forms.BooleanField", "eulxml.xmlmap.mods.MODS", "django.forms.Textarea", "eulxml.xmlmap.mods.Note", "django.forms.FileField" ]
[((784, 835), 'django.forms.BooleanField', 'forms.BooleanField', ([], {'required': '(False)', 'label': '"""I agree"""'}), "(required=False, label='I agree')\n", (802, 835), False, 'from django import forms\n'), ((916, 967), 'django.forms.BooleanField', 'forms.BooleanField', ([], {'required': '(False)', 'label': '"""I a...
import pytest def test_import_vdjtools_beta_w_validation(): import pandas as pd import numpy as np import os from tcrdist.paths import path_to_base from tcrdist.vdjtools_funcs import import_vdjtools from tcrdist.repertoire import TCRrep # Reformat vdj_tools input format for tcrdist3 ...
[ "tcrdist.repertoire.TCRrep", "tcrdist.vdjtools_funcs.import_vdjtools", "numpy.all", "os.path.join" ]
[((342, 445), 'os.path.join', 'os.path.join', (['path_to_base', '"""tcrdist"""', '"""data"""', '"""formats"""', '"""vdj.M_15_CD8_beta.clonotypes.TRB.txt.gz"""'], {}), "(path_to_base, 'tcrdist', 'data', 'formats',\n 'vdj.M_15_CD8_beta.clonotypes.TRB.txt.gz')\n", (354, 445), False, 'import os\n'), ((453, 595), 'tcrdis...
from django.utils.translation import ugettext_lazy as _ INTEREST_CHOICES = ( (1, _("Entertainment")), (2, _("Sports")), (3, _("Technology")), )
[ "django.utils.translation.ugettext_lazy" ]
[((87, 105), 'django.utils.translation.ugettext_lazy', '_', (['"""Entertainment"""'], {}), "('Entertainment')\n", (88, 105), True, 'from django.utils.translation import ugettext_lazy as _\n'), ((116, 127), 'django.utils.translation.ugettext_lazy', '_', (['"""Sports"""'], {}), "('Sports')\n", (117, 127), True, 'from dja...
from KingMaker.processor.tasks.CROWNBuild import CROWNBuild import law import luigi import os from subprocess import PIPE from law.util import interruptable_popen from processor.framework import RemoteTask class ProducerDataset(RemoteTask): """ collective task to trigger ntuple production of a given dataset...
[ "KingMaker.processor.tasks.CROWNBuild.CROWNBuild.req", "luigi.Parameter", "law.util.interruptable_popen" ]
[((344, 361), 'luigi.Parameter', 'luigi.Parameter', ([], {}), '()\n', (359, 361), False, 'import luigi\n'), ((476, 496), 'KingMaker.processor.tasks.CROWNBuild.CROWNBuild.req', 'CROWNBuild.req', (['self'], {}), '(self)\n', (490, 496), False, 'from KingMaker.processor.tasks.CROWNBuild import CROWNBuild\n'), ((830, 907), ...
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ "oci.util.formatted_flat_dict", "oci.util.value_allowed_none_or_none_sentinel" ]
[((23904, 23929), 'oci.util.formatted_flat_dict', 'formatted_flat_dict', (['self'], {}), '(self)\n', (23923, 23929), False, 'from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel\n'), ((11914, 11982), 'oci.util.value_allowed_none_or_none_sentinel', 'value_allowed_none_or_none_sent...
import logging from click.testing import Result from resolos.logging import clog logger = logging.getLogger(__name__) def verify_result(result: Result): logger.debug(result.output) if result.exit_code != 0: if result.exception: raise result.exception else: raise Except...
[ "logging.getLogger", "resolos.logging.clog.debug" ]
[((91, 118), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (108, 118), False, 'import logging\n'), ((480, 495), 'resolos.logging.clog.debug', 'clog.debug', (['msg'], {}), '(msg)\n', (490, 495), False, 'from resolos.logging import clog\n')]
#!/usr/bin/env python # coding: utf-8 import html import itertools import os import re import pandas as pd import requests from bs4 import BeautifulSoup, NavigableString, Tag target_url = {"jp0": "http://scp-jp.wikidot.com/scp-series-jp", "jp1": "http://scp-jp.wikidot.com/scp-series-jp-2", ...
[ "itertools.chain", "re.split", "re.compile", "html.unescape", "requests.get", "bs4.BeautifulSoup", "pandas.DataFrame", "os.path.abspath", "re.search" ]
[((1811, 1848), 're.compile', 're.compile', (['"""a href="/scp-\\\\d\\\\d\\\\d+"""'], {}), '(\'a href="/scp-\\\\d\\\\d\\\\d+\')\n', (1821, 1848), False, 'import re\n'), ((1864, 1904), 're.compile', 're.compile', (['"""a href="/scp-..-\\\\d\\\\d\\\\d+"""'], {}), '(\'a href="/scp-..-\\\\d\\\\d\\\\d+\')\n', (1874, 1904), ...
import rdkit.Chem as Chem import numpy as np import os ''' This script is meant to split the Tox21 train dataset into the individual target datasets for training single-task models. ''' if __name__ == '__main__': # Read SDF suppl = Chem.SDMolSupplier( os.path.join( os.path.dirname(os.path.dirname(__file__)...
[ "os.path.dirname", "numpy.isnan", "rdkit.Chem.MolToSmiles", "numpy.concatenate" ]
[((661, 682), 'rdkit.Chem.MolToSmiles', 'Chem.MolToSmiles', (['mol'], {}), '(mol)\n', (677, 682), True, 'import rdkit.Chem as Chem\n'), ((911, 934), 'numpy.concatenate', 'np.concatenate', (['(ys, y)'], {}), '((ys, y))\n', (925, 934), True, 'import numpy as np\n'), ((295, 320), 'os.path.dirname', 'os.path.dirname', (['_...
from __future__ import absolute_import from __future__ import print_function from scipy import sparse import sys import os.path import fileinfo import numpy as np import logging logger = logging.getLogger(__name__) moduleversion = 2 def discdiff(g, kind = "laplacian"): '''Make a matrix representing a discrete di...
[ "logging.getLogger", "scipy.sparse.load_npz", "scipy.sparse.dok_matrix", "scipy.sparse.save_npz" ]
[((188, 215), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (205, 215), False, 'import logging\n'), ((924, 958), 'scipy.sparse.load_npz', 'sparse.load_npz', (["(pathname + '.npz')"], {}), "(pathname + '.npz')\n", (939, 958), False, 'from scipy import sparse\n'), ((1051, 1076), 'scipy.spa...
import cv2 import numpy as np import json import os from argparse import ArgumentParser from video_stream import OpenCVStream from engine import Detector from datetime import datetime from collections import deque import logging logging.basicConfig() logger = logging.getLogger('Human-Counter-ExtractFrames') logger.s...
[ "logging.basicConfig", "logging.getLogger", "cv2.imwrite", "argparse.ArgumentParser", "os.makedirs", "engine.Detector", "os.path.basename", "video_stream.OpenCVStream", "cv2.cvtColor", "cv2.resize" ]
[((232, 253), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (251, 253), False, 'import logging\n'), ((263, 311), 'logging.getLogger', 'logging.getLogger', (['"""Human-Counter-ExtractFrames"""'], {}), "('Human-Counter-ExtractFrames')\n", (280, 311), False, 'import logging\n'), ((1833, 1870), 'argparse....
# Generated by Django 2.2.14 on 2020-07-30 15:57 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('cms', '0022_auto_20180620_1551'), ] operations = [ migrations.CreateModel( ...
[ "django.db.models.URLField", "django.db.models.OneToOneField", "django.db.models.CharField" ]
[((408, 634), 'django.db.models.OneToOneField', 'models.OneToOneField', ([], {'auto_created': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'parent_link': '(True)', 'primary_key': '(True)', 'related_name': '"""google_slides_googleslidespluginmodel"""', 'serialize': '(False)', 'to': '"""cms.CMSPlugin"""'})...
from functools import partial import mock import re import os from dmcontent import ContentLoader from dmutils.user import User from flask import json, Blueprint from werkzeug.datastructures import MultiDict from flask_login import login_user from app import create_app, data_api_client, _make_content_loader_factory f...
[ "werkzeug.datastructures.MultiDict", "mock.patch", "mock.patch.dict", "re.compile", "flask_login.login_user", "mock.Mock", "os.path.join", "app.create_app", "dmutils.user.User.from_json", "os.path.dirname", "functools.partial", "dmutils.user.User", "re.sub", "app.login_manager.user_loader"...
[((369, 407), 'flask.Blueprint', 'Blueprint', (['"""login_for_tests"""', '__name__'], {}), "('login_for_tests', __name__)\n", (378, 407), False, 'from flask import json, Blueprint\n'), ((709, 734), 'dmutils.user.User.from_json', 'User.from_json', (['user_json'], {}), '(user_json)\n', (723, 734), False, 'from dmutils.us...
# imports import pickle import cv2 import glob import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg # Helper functions for camera calibration # Directory for calibration images image_dir = glob.glob('camera_cal/calibration*.jpg') # Directory to Save objpoints and imgpoints on pickle c...
[ "cv2.imwrite", "numpy.array", "numpy.zeros", "cv2.destroyAllWindows", "cv2.cvtColor", "cv2.calibrateCamera", "cv2.findChessboardCorners", "cv2.drawChessboardCorners", "cv2.imread", "glob.glob" ]
[((224, 264), 'glob.glob', 'glob.glob', (['"""camera_cal/calibration*.jpg"""'], {}), "('camera_cal/calibration*.jpg')\n", (233, 264), False, 'import glob\n'), ((897, 929), 'numpy.zeros', 'np.zeros', (['(6 * 9, 3)', 'np.float32'], {}), '((6 * 9, 3), np.float32)\n', (905, 929), True, 'import numpy as np\n'), ((1980, 2003...
### code from the notebook pycocoEvalDemo.ipynb from pycocotools.coco import COCO import cocoeval_modif import numpy as np import pandas as pd from os.path import join import logging logging.basicConfig(format='%(levelname)s: %(filename)s L.%(lineno)d - %(message)s', level=logging.INFO) ### Validation File: # ...
[ "logging.basicConfig", "tabulate.tabulate", "pycocotools.coco.COCO", "os.path.join", "numpy.random.randint", "pandas.DataFrame", "cocoeval_modif.COCOeval" ]
[((185, 301), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(levelname)s: %(filename)s L.%(lineno)d - %(message)s"""', 'level': 'logging.INFO'}), "(format=\n '%(levelname)s: %(filename)s L.%(lineno)d - %(message)s', level=\n logging.INFO)\n", (204, 301), False, 'import logging\n'), ((1572...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """etc Module for classes defining Flask configuration. PORT configuation and HOST are configured as arguments in app""" from flask_env import MetaFlaskEnv import os, tempfile from __init__ import __version__ # pylint: disable=too-few-public-methods class BaseConfig(metacla...
[ "tempfile.mkdtemp", "os.path.join" ]
[((536, 573), 'os.path.join', 'os.path.join', (['"""."""', '"""task_database.db"""'], {}), "('.', 'task_database.db')\n", (548, 573), False, 'import os, tempfile\n'), ((681, 716), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {'prefix': '"""rest_api"""'}), "(prefix='rest_api')\n", (697, 716), False, 'import os, tempfile...
from django.shortcuts import render # noqa from allauth.socialaccount.models import SocialApp, SocialToken from rest_framework import viewsets, status from rest_framework.response import Response from .models import User from .serializers import serializerProfile import json class profileViewSet(viewsets.ViewSet): ...
[ "rest_framework.response.Response", "allauth.socialaccount.models.SocialToken.objects.get", "allauth.socialaccount.models.SocialApp.objects.get" ]
[((468, 493), 'rest_framework.response.Response', 'Response', (['serializer.data'], {}), '(serializer.data)\n', (476, 493), False, 'from rest_framework.response import Response\n'), ((824, 868), 'rest_framework.response.Response', 'Response', ([], {'status': 'status.HTTP_400_BAD_REQUEST'}), '(status=status.HTTP_400_BAD...
from __future__ import print_function import sys from subprocess import call from unittest import TestCase from testfixtures import OutputCapture, compare from .test_compare import CompareHelper class TestOutputCapture(CompareHelper, TestCase): def test_compare_strips(self): with OutputCapture() as o: ...
[ "subprocess.call", "testfixtures.OutputCapture", "testfixtures.compare" ]
[((3955, 3994), 'testfixtures.compare', 'compare', (['o.captured'], {'expected': "b'outerr'"}), "(o.captured, expected=b'outerr')\n", (3962, 3994), False, 'from testfixtures import OutputCapture, compare\n'), ((4316, 4349), 'testfixtures.compare', 'compare', (['o.captured'], {'expected': "b''"}), "(o.captured, expected...
""" datasets used for integration testing This is just a collection of useful datasets which seemed useful for testing purposes. The classes in here should not be relied upon in production mode. """ import numpy as np import vigra from tsdl.tools import OpArrayPiperWithAccessCount from tsdl.tools import OpReorderAxe...
[ "numpy.random.choice", "numpy.where", "vigra.defaultAxistags", "tsdl.tools.OutputSlot", "numpy.square", "numpy.linspace", "numpy.sin", "vigra.taggedView" ]
[((2385, 2397), 'tsdl.tools.OutputSlot', 'OutputSlot', ([], {}), '()\n', (2395, 2397), False, 'from tsdl.tools import OutputSlot\n'), ((3185, 3197), 'tsdl.tools.OutputSlot', 'OutputSlot', ([], {}), '()\n', (3195, 3197), False, 'from tsdl.tools import OutputSlot\n'), ((4064, 4076), 'tsdl.tools.OutputSlot', 'OutputSlot',...
import lsh_partition import models import torch import pandas as pd import numpy as np import math from distributed_rep import embeding from models import core from lsh_partition import lsh from torch import nn import time class MatchingModel(): def __init__(self, embeding_style, embeding_src, schema, train_src=No...
[ "torch.jit.script", "models.core.DMFormatDataset", "numpy.reshape", "torch.nn.CrossEntropyLoss", "pandas.read_csv", "torch.jit.load", "torch.max", "lsh_partition.lsh.LSH", "torch.reshape", "torch.reshprediction_l_src.numpy", "torch.tensor", "models.core.ERModel", "numpy.concatenate", "dist...
[((9655, 9666), 'time.time', 'time.time', ([], {}), '()\n', (9664, 9666), False, 'import time\n'), ((10127, 10138), 'time.time', 'time.time', ([], {}), '()\n', (10136, 10138), False, 'import time\n'), ((449, 466), 'torch.nn.SmoothL1Loss', 'nn.SmoothL1Loss', ([], {}), '()\n', (464, 466), False, 'from torch import nn\n')...
import os # from tkinter import PhotoImage RES_DIR = os.path.dirname(__file__) leave = os.path.join(RES_DIR, "leave.png") check = os.path.join(RES_DIR, "check.png") correct = os.path.join(RES_DIR, "correct.png") wrong = os.path.join(RES_DIR, "wrong.png")
[ "os.path.dirname", "os.path.join" ]
[((56, 81), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (71, 81), False, 'import os\n'), ((94, 128), 'os.path.join', 'os.path.join', (['RES_DIR', '"""leave.png"""'], {}), "(RES_DIR, 'leave.png')\n", (106, 128), False, 'import os\n'), ((139, 173), 'os.path.join', 'os.path.join', (['RES_DIR'...
import os import time import datetime import numpy as np import cv2 import torch import torch.nn as nn import torch.backends.cudnn as cudnn from torch.utils.data import DataLoader import network import test_dataset import utils def WGAN_tester(opt): # Save the model if pre_train == True def load_model_g...
[ "os.path.exists", "os.makedirs", "utils.create_generator", "torch.load", "os.path.join", "test_dataset.InpaintDataset", "torch.utils.data.DataLoader", "utils.save_sample_png", "torch.no_grad", "torch.cat" ]
[((1383, 1415), 'test_dataset.InpaintDataset', 'test_dataset.InpaintDataset', (['opt'], {}), '(opt)\n', (1410, 1415), False, 'import test_dataset\n'), ((1533, 1646), 'torch.utils.data.DataLoader', 'DataLoader', (['trainset'], {'batch_size': 'opt.batch_size', 'shuffle': '(False)', 'num_workers': 'opt.num_workers', 'pin_...
import behave import os @behave.when(u'I upload item using data frame from "{upload_path}"') def step_impl(context, upload_path): import pandas upload_path = os.path.join(os.environ['DATALOOP_TEST_ASSETS'], upload_path) # get filepathes filepaths = list() # go over all file and run ".feature" fil...
[ "os.path.join", "os.path.splitext", "behave.when", "pandas.DataFrame", "behave.then", "os.walk" ]
[((27, 94), 'behave.when', 'behave.when', (['u"""I upload item using data frame from "{upload_path}\\""""'], {}), '(u\'I upload item using data frame from "{upload_path}"\')\n', (38, 94), False, 'import behave\n'), ((846, 888), 'behave.then', 'behave.then', (['u"""Items should have metadata"""'], {}), "(u'Items should ...
import requests from bs4 import BeautifulSoup import sys, os sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) from functions.crawler_decorator import url_crawler, article_crawler import utility.constant as constant @url_crawler def getGalleryArticleURLs(gallery_url, page, headers): # articl...
[ "bs4.BeautifulSoup", "os.path.dirname" ]
[((525, 559), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""html.parser"""'], {}), "(html, 'html.parser')\n", (538, 559), False, 'from bs4 import BeautifulSoup\n'), ((109, 134), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (124, 134), False, 'import sys, os\n')]
#!/usr/bin/python3 # File name : piGpio.py # Description : gpio utility module import RPi.GPIO as GPIO from piServices.piConstants import * from piServices.piUtils import * # constant defines all the pins are not valid # note: pin 1, 2 are not valid InvalidPins = [4, 6, 9, 14, 17, 20, 25, 27, 28, 30, 34, 39] def ...
[ "RPi.GPIO.gpio_function", "RPi.GPIO.setup", "RPi.GPIO.output", "RPi.GPIO.setwarnings", "RPi.GPIO.input", "RPi.GPIO.setmode" ]
[((330, 353), 'RPi.GPIO.setwarnings', 'GPIO.setwarnings', (['(False)'], {}), '(False)\n', (346, 353), True, 'import RPi.GPIO as GPIO\n'), ((355, 379), 'RPi.GPIO.setmode', 'GPIO.setmode', (['GPIO.BOARD'], {}), '(GPIO.BOARD)\n', (367, 379), True, 'import RPi.GPIO as GPIO\n'), ((1098, 1121), 'RPi.GPIO.gpio_function', 'GPI...
#!/usr/bin/env python3 import os from typing import List from dhole.containers import Container def create_sshconfig( name: str, ip: str, containers: List[Container], connection_port_num: int = 22, # host connection port ) -> str: """Create .ssh/config_{name} for an user formating: ``...
[ "os.getenv", "os.chmod" ]
[((1852, 1869), 'os.chmod', 'os.chmod', (['fp', '(436)'], {}), '(fp, 436)\n', (1860, 1869), False, 'import os\n'), ((1742, 1759), 'os.getenv', 'os.getenv', (['"""HOME"""'], {}), "('HOME')\n", (1751, 1759), False, 'import os\n')]
import click from esque.cli.autocomplete import list_brokers from esque.cli.helpers import fallback_to_stdin from esque.cli.options import State, default_options, output_format_option from esque.cli.output import format_output from esque.errors import ValidationException from esque.resources.broker import Broker @cl...
[ "esque.resources.broker.Broker.from_host", "click.argument", "esque.errors.ValidationException", "esque.cli.output.format_output", "click.command", "esque.resources.broker.Broker.from_id" ]
[((318, 374), 'click.command', 'click.command', (['"""broker"""'], {'short_help': '"""Describe a broker."""'}), "('broker', short_help='Describe a broker.')\n", (331, 374), False, 'import click\n'), ((376, 495), 'click.argument', 'click.argument', (['"""broker"""'], {'metavar': '"""BROKER"""', 'callback': 'fallback_to_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #********************************************************************* # Filename: Python_SQLite3.Connection_Singleton.Pattern.py # Author: <NAME> (<EMAIL>enegro.github.io) # Copyright: @2020 # Details: this gist is a example of singleton pattern in Python #****...
[ "sqlite3.connect" ]
[((804, 834), 'sqlite3.connect', 'sqlite3.connect', (['"""db.sqllite3"""'], {}), "('db.sqllite3')\n", (819, 834), False, 'import sqlite3\n')]
""" This module handles the selection of image regions, the second stage of processing. """ import re from typing import Callable, Any, Sequence, Tuple import numpy as np import cv2 import matplotlib.pyplot as plt import pytesseract from fuzzywuzzy import process from .text_row_extractors import RowExtraction def ...
[ "matplotlib.pyplot.imshow", "matplotlib.pyplot.waitforbuttonpress", "numpy.repeat", "matplotlib.pyplot.connect", "matplotlib.pyplot.xlabel", "re.match", "matplotlib.pyplot.close", "numpy.array", "fuzzywuzzy.process.extractOne", "numpy.concatenate", "pytesseract.image_to_string", "matplotlib.py...
[((454, 499), 'numpy.repeat', 'np.repeat', (['whitespace_element', 'image.shape[1]'], {}), '(whitespace_element, image.shape[1])\n', (463, 499), True, 'import numpy as np\n'), ((522, 563), 'numpy.array', 'np.array', (['whitespace_line'], {'dtype': 'np.uint8'}), '(whitespace_line, dtype=np.uint8)\n', (530, 563), True, '...
import glob import os import cv2 import time from dsfd import detect def draw_faces(im, bboxes): for bbox in bboxes: x0, y0, x1, y1 = [int(_) for _ in bbox] cv2.rectangle(im, (x0, y0), (x1, y1), (0, 0, 255), 2) if __name__ == "__main__": impaths = "images" impaths = glob.glob(os.path.joi...
[ "cv2.rectangle", "cv2.imwrite", "os.path.join", "os.path.dirname", "dsfd.detect.DSFDDetector", "os.path.basename", "time.time", "cv2.imread" ]
[((386, 407), 'dsfd.detect.DSFDDetector', 'detect.DSFDDetector', ([], {}), '()\n', (405, 407), False, 'from dsfd import detect\n'), ((179, 232), 'cv2.rectangle', 'cv2.rectangle', (['im', '(x0, y0)', '(x1, y1)', '(0, 0, 255)', '(2)'], {}), '(im, (x0, y0), (x1, y1), (0, 0, 255), 2)\n', (192, 232), False, 'import cv2\n'),...
import numpy as np class Stencil: ''' Initialise a Stencil instance with relative cell indices where -1 and 0 are the adjacent cells upwind and downwind of the target face respectively. ''' def __init__(self, indices): self.indices = np.array(indices) def cellCentres(self, mesh, in...
[ "numpy.append", "numpy.array" ]
[((267, 284), 'numpy.array', 'np.array', (['indices'], {}), '(indices)\n', (275, 284), True, 'import numpy as np\n'), ((618, 630), 'numpy.array', 'np.array', (['Cs'], {}), '(Cs)\n', (626, 630), True, 'import numpy as np\n'), ((1119, 1164), 'numpy.append', 'np.append', (['self.indices', '(self.indices[-1] + 1)'], {}), '...
import os from discord import AllowedMentions from discord.ext import commands as c from module.prefix import table from module import db db.init() class MyBot(c.Bot): async def on_ready(self): print('Logged in as') print(self.user.name) print(self.user.id) print("------") ...
[ "module.db.init", "discord.AllowedMentions", "os.environ.get", "pathlib.Path" ]
[((139, 148), 'module.db.init', 'db.init', ([], {}), '()\n', (146, 148), False, 'from module import db\n'), ((1185, 1220), 'os.environ.get', 'os.environ.get', (['"""DISCORD_TOKEN_FFM"""'], {}), "('DISCORD_TOKEN_FFM')\n", (1199, 1220), False, 'import os\n'), ((560, 577), 'pathlib.Path', 'pathlib.Path', (['"""."""'], {})...
import questionary if __name__ == "__main__": path = questionary.path("Path to the projects version file").ask() if path: print(f"Found version file at {path} 🦄") else: print("No version file it is then!")
[ "questionary.path" ]
[((58, 111), 'questionary.path', 'questionary.path', (['"""Path to the projects version file"""'], {}), "('Path to the projects version file')\n", (74, 111), False, 'import questionary\n')]
import sonnet as snt import tempfile import tensorflow.compat.v1 as tf from easydict import EasyDict from luminoth.train import run from luminoth.models import get_model from luminoth.utils.config import ( get_model_config, load_config_files, get_base_config ) class MockFasterRCNN(snt.AbstractModule): """ ...
[ "luminoth.utils.config.load_config_files", "luminoth.utils.config.get_model_config", "tensorflow.compat.v1.get_default_graph", "tensorflow.compat.v1.Session", "luminoth.utils.config.get_base_config", "luminoth.train.run", "easydict.EasyDict", "tensorflow.compat.v1.FIFOQueue", "tensorflow.compat.v1.c...
[((4822, 4836), 'tensorflow.compat.v1.test.main', 'tf.test.main', ([], {}), '()\n', (4834, 4836), True, 'import tensorflow.compat.v1 as tf\n'), ((573, 633), 'tensorflow.compat.v1.get_variable', 'tf.get_variable', (['"""w"""'], {'initializer': '[2.5, 3.0]', 'trainable': '(True)'}), "('w', initializer=[2.5, 3.0], trainab...
import csv import os import re import requests csv_path = '../references/http-status-codes.csv' header_path = '../include/hypp/status.hpp' status_codes = [] def slugify(description): table = { ord('-'): '', ord('('): '', ord(')'): '', ord(' '): '_', } return description.translate(table) def get_csv_file()...
[ "os.path.exists", "os.path.getsize", "re.compile", "requests.get", "csv.reader" ]
[((327, 427), 'requests.get', 'requests.get', (['"""https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv"""'], {}), "(\n 'https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv'\n )\n", (339, 427), False, 'import requests\n'), ((1631, 1667), 're.compile', 're.compile', ([...
# Under MIT licence, see LICENCE.txt import time from typing import List from Util.constant import ROBOT_CENTER_TO_KICKER, KEEPOUT_DISTANCE_FROM_BALL from Util import Pose, Position from Util.ai_command import CmdBuilder, Idle from Util.geometry import compare_angle, normalize from ai.GameDomainObjects import Player ...
[ "Util.geometry.compare_angle", "config.config.Config", "Util.ai_command.CmdBuilder", "Util.Pose", "Util.geometry.normalize", "time.time" ]
[((834, 840), 'Util.Pose', 'Pose', ([], {}), '()\n', (838, 840), False, 'from Util import Pose, Position\n'), ((3665, 3712), 'Util.geometry.normalize', 'normalize', (['(self.target.position - ball_position)'], {}), '(self.target.position - ball_position)\n', (3674, 3712), False, 'from Util.geometry import compare_angle...
import ppe.dataclasses as dc from datetime import datetime, timedelta, date from ppe import aggregations from ppe.aggregations import AssetRollup, DemandCalculationConfig, AggColumn from ppe.models import ScheduledDelivery, Purchase, Inventory from ppe.dataclasses import OrderType from typing import List, Callable, Na...
[ "ppe.dataclasses.Item", "ppe.models.Inventory.active", "ppe.models.Purchase.active", "datetime.date.today", "ppe.aggregations.DemandCalculationConfig" ]
[((1896, 1914), 'ppe.models.Inventory.active', 'Inventory.active', ([], {}), '()\n', (1912, 1914), False, 'from ppe.models import ScheduledDelivery, Purchase, Inventory\n'), ((2075, 2100), 'ppe.aggregations.DemandCalculationConfig', 'DemandCalculationConfig', ([], {}), '()\n', (2098, 2100), False, 'from ppe.aggregation...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import gzip import numpy from six.moves import xrange # pylint: disable=redefined-builtin from tensorflow.contrib.learn.python.learn.datasets import base from tensorflow.python.framework ...
[ "numpy.multiply", "tensorflow.python.framework.dtypes.as_dtype", "six.moves.xrange", "tensorflow.contrib.learn.python.learn.datasets.base.Datasets", "numpy.random.seed", "numpy.concatenate", "tensorflow.python.framework.random_seed.get_seed", "numpy.load", "numpy.arange", "numpy.random.shuffle" ]
[((4669, 4687), 'numpy.load', 'np.load', (['train_dir'], {}), '(train_dir)\n', (4676, 4687), True, 'import numpy as np\n'), ((5143, 5203), 'tensorflow.contrib.learn.python.learn.datasets.base.Datasets', 'base.Datasets', ([], {'train': 'train', 'validation': 'validation', 'test': 'test'}), '(train=train, validation=vali...
import utils from os import path import numpy as np from scipy import stats, sparse from paris_cluster import ParisClusterer from sklearn.linear_model import LogisticRegression from tqdm import tqdm import pandas as pd ##Set a random seed to make it reproducible! np.random.seed(utils.getSeed()) #load up data: x, y = ...
[ "numpy.unique", "utils.getSeed", "utils.get_subset", "numpy.random.choice", "utils.calc_AVE_quick", "utils.trim", "numpy.memmap", "utils.evaluate_split", "utils.split_clusters", "numpy.isin", "numpy.random.randint", "utils.get_four_matrices", "pandas.DataFrame", "utils.cut_balanced", "ut...
[((320, 372), 'utils.load_feature_and_label_matrices', 'utils.load_feature_and_label_matrices', ([], {'type': '"""morgan"""'}), "(type='morgan')\n", (357, 372), False, 'import utils\n'), ((511, 552), 'numpy.random.choice', 'np.random.choice', (['(226)', '(100)'], {'replace': '(False)'}), '(226, 100, replace=False)\n', ...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ "googlecloudsdk.third_party.apitools.base.py.encoding.DictToMessage", "googlecloudsdk.calliope.arg_parsers.ArgDict", "googlecloudsdk.calliope.arg_parsers.ArgList" ]
[((3671, 3747), 'googlecloudsdk.third_party.apitools.base.py.encoding.DictToMessage', 'encoding.DictToMessage', (['args.properties', 'messages.PySparkJob.PropertiesValue'], {}), '(args.properties, messages.PySparkJob.PropertiesValue)\n', (3693, 3747), False, 'from googlecloudsdk.third_party.apitools.base.py import enco...
from django.utils import unittest from mock import patch, Mock from nose.tools import eq_, ok_ from make_mozilla.events import tasks class AddOrganiserAsConstituentTaskTest(unittest.TestCase): @patch.object(tasks.BSDRegisterConstituent, 'add_email_to_group') def test_task_func_correctly_invokes_bsd_client(sel...
[ "mock.patch.object", "make_mozilla.events.tasks.register_email_address_as_constituent" ]
[((200, 264), 'mock.patch.object', 'patch.object', (['tasks.BSDRegisterConstituent', '"""add_email_to_group"""'], {}), "(tasks.BSDRegisterConstituent, 'add_email_to_group')\n", (212, 264), False, 'from mock import patch, Mock\n'), ((396, 457), 'make_mozilla.events.tasks.register_email_address_as_constituent', 'tasks.re...
from itertools import chain from django.http import HttpResponse, HttpResponseRedirect from django.utils.safestring import mark_safe from .models import EmailPreferences, Task from django.views.generic.list import ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.forms impor...
[ "itertools.chain", "django.db.transaction.atomic", "django.http.HttpResponse", "django.core.exceptions.ValidationError", "django.utils.safestring.mark_safe" ]
[((8438, 8584), 'django.http.HttpResponse', 'HttpResponse', (['f"""Total views is {total_views} and the user is {request.user} and are they authenticated? {request.user.is_authenticated}"""'], {}), "(\n f'Total views is {total_views} and the user is {request.user} and are they authenticated? {request.user.is_authent...
# import sys # sys.path.append('..') # sys.path.append('../..') import numpy as np from pulse2percept import electrode2currentmap as e2cm from pulse2percept import effectivecurrent2brightness as ec2b from pulse2percept import utils from pulse2percept import files as n2sf # import npy2savedformats as n2sf import matpl...
[ "pulse2percept.electrode2currentmap.Retina", "pulse2percept.effectivecurrent2brightness.onoffRecombine", "pulse2percept.effectivecurrent2brightness.TemporalModel", "numpy.array", "pulse2percept.electrode2currentmap.retinalmovie2electrodtimeseries", "numpy.sin", "pulse2percept.electrode2currentmap.Movie2...
[((1756, 1789), 'numpy.arange', 'np.arange', (['(-2362)', '(2364)', 'e_spacing'], {}), '(-2362, 2364, e_spacing)\n', (1765, 1789), True, 'import numpy as np\n'), ((2176, 2243), 'pulse2percept.electrode2currentmap.ElectrodeArray', 'e2cm.ElectrodeArray', (['rlist', 'xlist', 'ylist', 'hlist'], {'ptype': '"""subretinal"""'...
# Generated by Django 3.0.1 on 2020-03-09 18:07 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('travello', '0022_auto_20200227_0045'), ] operations = [ migrations.AlterField( model_name='team', na...
[ "datetime.datetime" ]
[((390, 438), 'datetime.datetime', 'datetime.datetime', (['(2020)', '(3)', '(10)', '(0)', '(7)', '(49)', '(525888)'], {}), '(2020, 3, 10, 0, 7, 49, 525888)\n', (407, 438), False, 'import datetime\n')]
from labelbox.orm.db_object import DbObject from labelbox.orm.model import Field class AssetMetadata(DbObject): """ AssetMetadata is a datatype to provide extra context about an asset while labeling. """ VIDEO = "VIDEO" IMAGE = "IMAGE" TEXT = "TEXT" meta_type = Field.String("meta_type") ...
[ "labelbox.orm.model.Field.String" ]
[((293, 318), 'labelbox.orm.model.Field.String', 'Field.String', (['"""meta_type"""'], {}), "('meta_type')\n", (305, 318), False, 'from labelbox.orm.model import Field\n'), ((336, 362), 'labelbox.orm.model.Field.String', 'Field.String', (['"""meta_value"""'], {}), "('meta_value')\n", (348, 362), False, 'from labelbox.o...
import serial """ # VE.Direct parser inspired by https://github.com/karioja/vedirect/blob/master/vedirect.py """ class Vedirect: # The error code of the device (relevant when the device is in the fault state). # # Error 19 can be ignored, this condition regularly occurs during start-up or shutdown of the ...
[ "serial.Serial" ]
[((3006, 3049), 'serial.Serial', 'serial.Serial', (['port', '(19200)'], {'timeout': 'timeout'}), '(port, 19200, timeout=timeout)\n', (3019, 3049), False, 'import serial\n')]
from collections import namedtuple import re Quantity = namedtuple( "Quantity", ["quantity", "unit", "containerName"], defaults=(None, None, None)) def convertQuantity(mappingDict, toUnit, quantity): fromFactor = mappingDict[quantity.unit] toFactor = mappingDict[toUnit] return Quantity(quantity.quantity *...
[ "collections.namedtuple", "re.compile" ]
[((57, 152), 'collections.namedtuple', 'namedtuple', (['"""Quantity"""', "['quantity', 'unit', 'containerName']"], {'defaults': '(None, None, None)'}), "('Quantity', ['quantity', 'unit', 'containerName'], defaults=(\n None, None, None))\n", (67, 152), False, 'from collections import namedtuple\n'), ((3582, 3648), 'r...
import logging import pytest from pyspark.sql import SparkSession from pyspark.context import SparkContext from pyspark.conf import SparkConf def quiet_py4j(): """Suppress spark logging for the test context.""" logger = logging.getLogger('py4j') logger.setLevel(logging.WARN) @pytest.fixture(scope="sess...
[ "logging.getLogger", "pyspark.sql.SparkSession.builder.master", "pyspark.context.SparkContext", "pyspark.conf.SparkConf", "pytest.fixture" ]
[((294, 325), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (308, 325), False, 'import pytest\n'), ((770, 801), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (784, 801), False, 'import pytest\n'), ((231, 256), 'logging.getLogg...
#!/usr/bin/env python """ @package ion.agents.data.test.test_external_dataset_agent_slocum @file ion/agents/data/test/test_external_dataset_agent_slocum.py @author <NAME> @brief """ # Import pyon first for monkey patching. from pyon.public import log, IonObject from pyon.ion.resource import PRED, RT from interface.se...
[ "numpy.dtype", "interface.objects.ExternalDatasetAgentInstance", "interface.services.sa.idata_product_management_service.DataProductManagementServiceClient", "interface.objects.ContactInformation", "interface.services.dm.idataset_management_service.DatasetManagementServiceClient", "interface.services.sa.i...
[((2049, 2081), 'interface.services.dm.idataset_management_service.DatasetManagementServiceClient', 'DatasetManagementServiceClient', ([], {}), '()\n', (2079, 2081), False, 'from interface.services.dm.idataset_management_service import DatasetManagementServiceClient\n'), ((2101, 2141), 'interface.services.sa.idata_acqu...
# -*- coding: utf-8 -*- import dash import dash_table import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import yaml from iriscovid19 import IRISCOVID19 from iris_python_suite import irisglobal, irisdomestic, irisglobalchart import networkx as nx im...
[ "dash_html_components.Button", "dash_core_components.Location", "dash_html_components.H3", "dash.dependencies.Input", "iriscovid19.IRISCOVID19", "dash_html_components.Div", "dash.Dash", "dash_core_components.Link", "dash.dependencies.Output", "dash_html_components.Br", "dash.dependencies.State",...
[((656, 759), 'dash.Dash', 'dash.Dash', (['__name__'], {'external_stylesheets': '[dbc.themes.BOOTSTRAP]', 'suppress_callback_exceptions': '(True)'}), '(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP],\n suppress_callback_exceptions=True)\n', (665, 759), False, 'import dash\n'), ((805, 833), 'iris_python_suite....
from typing import Dict, Optional, Union import numpy as np from werkzeug import ImmutableMultiDict from .endpoint import Endpoint def predict(model, input_data: Union[Dict, ImmutableMultiDict], config: Endpoint): # new model if hasattr(model, "public_inputs"): sample = {} for k, v in dict(i...
[ "numpy.array" ]
[((780, 796), 'numpy.array', 'np.array', (['sample'], {}), '(sample)\n', (788, 796), True, 'import numpy as np\n')]
import random from io import BytesIO import requests from .EmbedPages import paginate def gen_resource(chance: float, base_amount: int): if chance < random.random(): return 0 return base_amount def get_request(URL, headers, params): with open("Token.txt") as auth: headers.update({'Autho...
[ "random.random", "requests.post", "requests.get" ]
[((406, 455), 'requests.get', 'requests.get', (['URL'], {'headers': 'headers', 'params': 'params'}), '(URL, headers=headers, params=params)\n', (418, 455), False, 'import requests\n'), ((744, 790), 'requests.post', 'requests.post', (['URL'], {'headers': 'headers', 'json': 'json'}), '(URL, headers=headers, json=json)\n'...
import numpy as np import math from scipy import special import matplotlib.pyplot as plt import sys def pdf(x, a, b): return math.gamma(a + b) / (math.gamma(a) * math.gamma(b)) * x**(a - 1) * (1 - x)**(b-1) args = sys.argv[1:] if len(args) != 2: print("Invalid arguments. Example: main.py 2 5") sys.exit(1) a = ...
[ "math.gamma", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "numpy.linspace", "sys.exit", "numpy.vectorize", "matplotlib.pyplot.show" ]
[((393, 417), 'numpy.linspace', 'np.linspace', (['(0)', '(1.0)', '(100)'], {}), '(0, 1.0, 100)\n', (404, 417), True, 'import numpy as np\n'), ((425, 442), 'numpy.vectorize', 'np.vectorize', (['pdf'], {}), '(pdf)\n', (437, 442), True, 'import numpy as np\n'), ((462, 487), 'matplotlib.pyplot.plot', 'plt.plot', (['x', 'y'...
# module for the <eadheader/> or <control/> portion import xml.etree.cElementTree as ET import globals from messages import error from mixed_content import mixed_content import wx def eadheader(EAD, CSheet): eadheader_root = EAD[0] #update GUI progress bar from wx.lib.pubsub import pub wx.CallAfter(pub.sendMessa...
[ "publicationstmt.publicationstmt", "seriesstmt.seriesstmt", "xml.etree.cElementTree.Element", "wx.CallAfter", "messages.error", "editionstmt.editionstmt" ]
[((294, 370), 'wx.CallAfter', 'wx.CallAfter', (['pub.sendMessage', '"""update_spread"""'], {'msg': '"""Reading <eadheader>..."""'}), "(pub.sendMessage, 'update_spread', msg='Reading <eadheader>...')\n", (306, 370), False, 'import wx\n'), ((3989, 4024), 'editionstmt.editionstmt', 'editionstmt', (['eadheader_root', 'CShe...
import numpy as np from ....constants import DATA from .normalization_transform import NormalizationTransform from .histogram_standardization import normalize class HistogramRandomChange(NormalizationTransform): """ Same thins as HistogramStandardization but the landmarks is a random curve """ def __i...
[ "numpy.convolve", "numpy.ones", "numpy.random.rand", "numpy.sort", "numpy.squeeze", "numpy.max", "numpy.random.randint", "numpy.linspace", "numpy.interp", "numpy.min" ]
[((985, 1021), 'numpy.linspace', 'np.linspace', (['(0)', '(1)', 'self.nb_point_ini'], {}), '(0, 1, self.nb_point_ini)\n', (996, 1021), True, 'import numpy as np\n'), ((1035, 1057), 'numpy.linspace', 'np.linspace', (['(0)', '(1)', '(100)'], {}), '(0, 1, 100)\n', (1046, 1057), True, 'import numpy as np\n'), ((1071, 1091)...
# vim: set fileencoding=utf-8 : from __future__ import absolute_import, print_function, unicode_literals import abc import json import logbook import requests import six import stethoscope.utils logger = logbook.Logger(__name__) @six.add_metaclass(abc.ABCMeta) class BaseHTTPMixin(object): """Abstract plugin b...
[ "requests.post", "json.dumps", "six.add_metaclass", "logbook.Logger" ]
[((210, 234), 'logbook.Logger', 'logbook.Logger', (['__name__'], {}), '(__name__)\n', (224, 234), False, 'import logbook\n'), ((238, 268), 'six.add_metaclass', 'six.add_metaclass', (['abc.ABCMeta'], {}), '(abc.ABCMeta)\n', (255, 268), False, 'import six\n'), ((1048, 1078), 'six.add_metaclass', 'six.add_metaclass', (['a...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import os import platform import shutil import socket import sys import tempfile import time import urllib2 import zipfile from t...
[ "zipfile.ZipFile", "time.sleep", "sys.exit", "logging.info", "os.remove", "page_sets.Typical25PageSet", "urllib2.urlopen", "json.dumps", "telemetry.benchmark.BenchmarkMetadata", "platform.system", "os.path.isdir", "socket.gethostname", "telemetry.page.test_expectations.TestExpectations", "...
[((3475, 3524), 'os.path.join', 'os.path.join', (['output_dir', "('%s.crx' % extension_id)"], {}), "(output_dir, '%s.crx' % extension_id)\n", (3487, 3524), False, 'import os\n'), ((3691, 3721), 'urllib2.urlopen', 'urllib2.urlopen', (['extension_url'], {}), '(extension_url)\n', (3706, 3721), False, 'import urllib2\n'), ...
# By: <NAME>, 2018 # Ported to Keras from the official Tensorflow implementation by Magenta # Most utilities in 'utils' remained the same as in the official implementation """ SketchRNN data loading, callbacks and image manipulation utilities. """ from __future__ import absolute_import from __future__ import division...
[ "numpy.random.rand", "numpy.argsort", "numpy.array", "copy.deepcopy", "numpy.linalg.norm", "numpy.sin", "numpy.random.random", "numpy.concatenate", "numpy.maximum", "six.moves.cStringIO", "random.choice", "keras.backend.set_value", "requests.get", "numpy.std", "numpy.copy", "numpy.mini...
[((3132, 3192), 'numpy.concatenate', 'np.concatenate', (['(train_strokes, valid_strokes, test_strokes)'], {}), '((train_strokes, valid_strokes, test_strokes))\n', (3146, 3192), True, 'import numpy as np\n'), ((8890, 8903), 'numpy.sin', 'np.sin', (['omega'], {}), '(omega)\n', (8896, 8903), True, 'import numpy as np\n'),...
# -*- coding: utf-8 -*- #This code calculate the Standar Error of the Mean (SEM) for two rows (4 and 5) using the numpy lib, and also # graph the average of the cost and de SEM for 3 different problems, which each one has 4 algorithms (RRT,tRRT,biRRT and tbiRRT) import numpy as np import matplotlib.pyplot as plt # i...
[ "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((3859, 3873), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {}), '()\n', (3871, 3873), True, 'import matplotlib.pyplot as plt\n'), ((8735, 8745), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (8743, 8745), True, 'import matplotlib.pyplot as plt\n')]
#!/usr/bin/env python3 """Solution for https://www.hackerrank.com/challenges/fibonacci-modified""" import functools as ft @ft.lru_cache() def mod_fib(t1: int, t2: int, num: int) -> int: """Calculate tn.""" if num == 1: return t1 if num == 2: return t2 return mod_fib(num - 2, t1, t2) +...
[ "functools.lru_cache" ]
[((126, 140), 'functools.lru_cache', 'ft.lru_cache', ([], {}), '()\n', (138, 140), True, 'import functools as ft\n')]
""" The fusion strategy. The goal of the fusion strategy is to find a pair of adjacent rows, or adjacent columns such that they can be viewed as a single column, with a line drawn between them. When this fusion happens, an assumption that we can count the number of points in the fused row or column is added. When we m...
[ "tilings.algorithms.ComponentFusion", "comb_spec_searcher.exception.StrategyDoesNotApply", "sympy.var", "collections.defaultdict", "sympy.Number", "tilings.algorithms.Fusion" ]
[((3531, 3548), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (3542, 3548), False, 'from collections import defaultdict\n'), ((22018, 22103), 'tilings.algorithms.Fusion', 'Fusion', (['tiling'], {'row_idx': 'self.row_idx', 'col_idx': 'self.col_idx', 'tracked': 'self.tracked'}), '(tiling, row_idx=...
from flask import Flask from flask_dotenv import DotEnv app = Flask(__name__) env = DotEnv() env.init_app(app) settings = app.config
[ "flask_dotenv.DotEnv", "flask.Flask" ]
[((63, 78), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (68, 78), False, 'from flask import Flask\n'), ((86, 94), 'flask_dotenv.DotEnv', 'DotEnv', ([], {}), '()\n', (92, 94), False, 'from flask_dotenv import DotEnv\n')]
import numpy as np def load_swirls(): with np.load('a1_data.npz') as data: x = data['swirls_x'] y = data['swirls_y'] return x, y def load_noisy_circles(): with np.load('a1_data.npz') as data: x = data['circles_x'] y = data['circles_y'] return x, y def load_noisy_moo...
[ "numpy.exp", "numpy.mean", "numpy.load" ]
[((1325, 1350), 'numpy.mean', 'np.mean', (['(Y_predicted == Y)'], {}), '(Y_predicted == Y)\n', (1332, 1350), True, 'import numpy as np\n'), ((49, 71), 'numpy.load', 'np.load', (['"""a1_data.npz"""'], {}), "('a1_data.npz')\n", (56, 71), True, 'import numpy as np\n'), ((192, 214), 'numpy.load', 'np.load', (['"""a1_data.n...
from django.contrib import admin from midstream.models import * # Register your models here. # admin.site.register(Midstream) # 中游商 class MidstreamInline(admin.StackedInline): model = Midstream extra = 1 class MidstreamAdmin(admin.ModelAdmin): list_display = ( 'id', 'company_Name', 'company_principal', ...
[ "django.contrib.admin.site.register" ]
[((928, 974), 'django.contrib.admin.site.register', 'admin.site.register', (['Midstream', 'MidstreamAdmin'], {}), '(Midstream, MidstreamAdmin)\n', (947, 974), False, 'from django.contrib import admin\n'), ((1469, 1528), 'django.contrib.admin.site.register', 'admin.site.register', (['Midstream_person', 'MidstreamPersonA...