code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# # Copyright (c) 2019 -2021 MINRES Technolgies GmbH # # SPDX-License-Identifier: Apache-2.0 # from cppyy_backend._cppyy_generator import CppyyGenerator from clang.cindex import Config from pprint import pprint import glob import os.path proj_dir='../../PySysC-SC/components' flags=['-I/home/eyck/.conan/data/SystemC/...
[ "cppyy_backend._cppyy_generator.CppyyGenerator", "clang.cindex.Config", "pprint.pprint", "clang.cindex.Config.set_library_file" ]
[((527, 595), 'clang.cindex.Config.set_library_file', 'Config.set_library_file', (['"""/usr/lib/x86_64-linux-gnu/libclang-6.0.so"""'], {}), "('/usr/lib/x86_64-linux-gnu/libclang-6.0.so')\n", (550, 595), False, 'from clang.cindex import Config\n'), ((962, 1079), 'cppyy_backend._cppyy_generator.CppyyGenerator', 'CppyyGen...
# Copyright 2008-2018 Univa 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 law or agreed to in...
[ "marshmallow.fields.Dict", "marshmallow.fields.String" ]
[((808, 821), 'marshmallow.fields.Dict', 'fields.Dict', ([], {}), '()\n', (819, 821), False, 'from marshmallow import fields\n'), ((843, 858), 'marshmallow.fields.String', 'fields.String', ([], {}), '()\n', (856, 858), False, 'from marshmallow import fields\n'), ((1532, 1547), 'marshmallow.fields.String', 'fields.Strin...
import logging import inspect import functools from urllib.request import urlopen, Request from functools import partial import toml as hjson import mistune from django.conf import settings from django.template import loader from biostar.utils.decorators import task # # Do not use logging in tasks! Deadlocking may occ...
[ "biostar.accounts.auth.send_verification_email", "biostar.accounts.models.MessageBody.objects.create", "biostar.accounts.models.User.objects.filter", "mistune.markdown", "biostar.accounts.models.Message.objects.create", "urllib.request.Request", "biostar.accounts.models.Profile.objects.filter", "urlli...
[((2074, 2113), 'biostar.accounts.auth.send_verification_email', 'auth.send_verification_email', ([], {'user': 'user'}), '(user=user)\n', (2102, 2113), False, 'from biostar.accounts import auth, models\n'), ((2367, 2403), 'biostar.accounts.models.User.objects.filter', 'User.objects.filter', ([], {'id__in': 'user_ids'})...
import unittest from datetime import datetime from unittest.mock import patch from src.updater.helpers import filter_outdated_players, get_player_usernames class TestFilterOutdatedPlayers(unittest.TestCase): @classmethod def setUpClass(cls): cls._mock_now_patcher = patch('src.updater.helpers._now') ...
[ "unittest.main", "datetime.datetime", "unittest.mock.patch", "src.updater.helpers.filter_outdated_players", "src.updater.helpers.get_player_usernames" ]
[((2929, 2944), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2942, 2944), False, 'import unittest\n'), ((285, 318), 'unittest.mock.patch', 'patch', (['"""src.updater.helpers._now"""'], {}), "('src.updater.helpers._now')\n", (290, 318), False, 'from unittest.mock import patch\n'), ((410, 451), 'datetime.datetime...
""" An implementation of a stereo algorith based on Lucas-Kanade method """ import sys, os, time import skimage import numpy as np def preprocess_image(path): return list(skimage.transform.pyramid_gaussian( skimage.color.rgb2gray( skimage.io.imread(path) ), max_layer = 8, ...
[ "skimage.io.imshow_collection", "skimage.io.show", "skimage.io.imread" ]
[((603, 666), 'skimage.io.imshow_collection', 'skimage.io.imshow_collection', (['[dx[-1], dt[-1], dt[-1] / dx[-1]]'], {}), '([dx[-1], dt[-1], dt[-1] / dx[-1]])\n', (631, 666), False, 'import skimage\n'), ((734, 751), 'skimage.io.show', 'skimage.io.show', ([], {}), '()\n', (749, 751), False, 'import skimage\n'), ((258, ...
import pika from lakeweed import clickhouse as d2c from . import dbms_clickhouse as dbms from .dbms_clickhouse import TableNotFoundException class Grebe: def __init__(self, client, schema_store, source_settings_store, resend_exchange_name, retry_max: int, tz_str: str, logger): self.client = client ...
[ "pika.BasicProperties", "lakeweed.clickhouse.data_string2type_value" ]
[((3463, 3541), 'lakeweed.clickhouse.data_string2type_value', 'd2c.data_string2type_value', (['payload'], {'specified_types': 'spec_types', 'tz_str': 'tz_str'}), '(payload, specified_types=spec_types, tz_str=tz_str)\n', (3489, 3541), True, 'from lakeweed import clickhouse as d2c\n'), ((4476, 4546), 'pika.BasicPropertie...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # (c) University of St Andrews 2020-2021 # (c) University of Strathclyde 2020-2021 # (c) James Hutton Institute 2020-2021 # # Author: # <NAME> # # Contact # <EMAIL> # # <NAME>, # Biomolecular Sciences Building, # University of St Andrews, # North Haugh Campus, # St Andrews...
[ "argparse.Namespace", "cazy_webscraper.sql.sql_interface.get_data.get_taxonomies.get_taxs_for_uniprots", "cazy_webscraper.sql.sql_orm.get_db_connection", "pytest.raises", "cazy_webscraper.sql.sql_interface.get_data.get_taxonomies.get_uni_gbk_tax_dict", "cazy_webscraper.sql.sql_interface.get_data.get_taxon...
[((3365, 3413), 'cazy_webscraper.sql.sql_orm.get_db_connection', 'sql_orm.get_db_connection', (['db_path', '(False)', '(False)'], {}), '(db_path, False, False)\n', (3390, 3413), False, 'from cazy_webscraper.sql import sql_orm\n'), ((1988, 2171), 'argparse.Namespace', 'Namespace', ([], {'genbank_accessions': '"""tests/t...
from findthatpostcode.controllers.controller import Controller from tests.fixtures import MockElasticsearch def test_controller_class(): id_ = "testentity" data = {"code": "testentity", "name": "Test Entity"} # test a found entity a = Controller(id_, data) assert a.id == id_ assert a.attribut...
[ "findthatpostcode.controllers.controller.Controller", "tests.fixtures.MockElasticsearch", "findthatpostcode.controllers.controller.Controller.get_from_es" ]
[((254, 275), 'findthatpostcode.controllers.controller.Controller', 'Controller', (['id_', 'data'], {}), '(id_, data)\n', (264, 275), False, 'from findthatpostcode.controllers.controller import Controller\n'), ((563, 582), 'findthatpostcode.controllers.controller.Controller', 'Controller', (['id_', '{}'], {}), '(id_, {...
import argparse from typing import List from prompt_toolkit.completion import NestedCompleter from gamestonk_terminal import feature_flags as gtff from gamestonk_terminal.menu import session from gamestonk_terminal.helper_funcs import ( EXPORT_ONLY_RAW_DATA_ALLOWED, MENU_GO_BACK, MENU_QUIT, MENU_RESET,...
[ "argparse.ArgumentParser", "gamestonk_terminal.helper_funcs.system_clear", "gamestonk_terminal.helper_funcs.get_flair", "gamestonk_terminal.cryptocurrency.nft.nftcalendar_view.display_nft_upcoming_drops", "gamestonk_terminal.helper_funcs.parse_known_args_and_warn", "gamestonk_terminal.cryptocurrency.nft.n...
[((874, 925), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'add_help': '(False)', 'prog': '"""nft"""'}), "(add_help=False, prog='nft')\n", (897, 925), False, 'import argparse\n'), ((1052, 1117), 'prompt_toolkit.completion.NestedCompleter.from_nested_dict', 'NestedCompleter.from_nested_dict', (['{c: None ...
"""The H API service.""" from h_api.bulk_api import BulkAPI, CommandBuilder from lms.models import HUser from lms.services import ExternalRequestError class HAPIError(ExternalRequestError): """ A problem with an h API request. Raised whenever an h API request times out or when an unsuccessful, invalid ...
[ "h_api.bulk_api.BulkAPI.to_string", "lms.models.HUser" ]
[((1820, 1884), 'lms.models.HUser', 'HUser', ([], {'username': 'username', 'display_name': "user_info['display_name']"}), "(username=username, display_name=user_info['display_name'])\n", (1825, 1884), False, 'from lms.models import HUser\n'), ((1420, 1447), 'h_api.bulk_api.BulkAPI.to_string', 'BulkAPI.to_string', (['co...
import os from pprint import pprint as pp import colorgram from flask import Flask from flask import render_template app = Flask(__name__) def get_filenames(f_dir, prefix='', suffix=''): """Get list of filenames within a directory. Optionally scope by prefix/suffix.""" f_names = [] for r,d,files in os.wal...
[ "colorgram.extract", "flask.Flask", "os.walk", "flask.render_template" ]
[((124, 139), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (129, 139), False, 'from flask import Flask\n'), ((314, 328), 'os.walk', 'os.walk', (['f_dir'], {}), '(f_dir)\n', (321, 328), False, 'import os\n'), ((1141, 1181), 'flask.render_template', 'render_template', (['"""color.html"""'], {'imgs': 'imgs'...
"""The project.""" from dataclasses import dataclass from jupiter.domain.entity_name import EntityName from jupiter.domain.projects.project_key import ProjectKey from jupiter.framework.aggregate_root import AggregateRoot from jupiter.framework.base.entity_id import BAD_REF_ID from jupiter.framework.base.timestamp impo...
[ "dataclasses.dataclass" ]
[((336, 347), 'dataclasses.dataclass', 'dataclass', ([], {}), '()\n', (345, 347), False, 'from dataclasses import dataclass\n'), ((407, 429), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (416, 429), False, 'from dataclasses import dataclass\n'), ((507, 529), 'dataclasses.dataclas...
import os import logging import testfixtures from pyvivado import interface, signal, builder from rfgnocchi import config, ettus logger = logging.getLogger(__name__) def get_mult_interface(params): module_name = 'Mult' width_A = params['width_A'] width_B = params['width_B'] width_P =...
[ "pyvivado.signal.StdLogicVector", "rfgnocchi.ettus.get_builder", "pyvivado.interface.Interface", "logging.getLogger" ]
[((149, 176), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (166, 176), False, 'import logging\n'), ((467, 492), 'rfgnocchi.ettus.get_builder', 'ettus.get_builder', (['"""mult"""'], {}), "('mult')\n", (484, 492), False, 'from rfgnocchi import config, ettus\n'), ((1432, 1619), 'pyvivado.i...
from nox_poetry import session, SDIST args = lambda s: s.split() @session(python=['3.7', '3.8', '3.9']) def test_main(session): session.poetry.installroot(distribution_format=SDIST) session.install('pytest') session.run(*args('pytest -v tests/main')) @session(python=['3.7', '3.8', '3.9']) def test_geo(...
[ "nox_poetry.session.install", "nox_poetry.session.poetry.installroot", "nox_poetry.session" ]
[((69, 106), 'nox_poetry.session', 'session', ([], {'python': "['3.7', '3.8', '3.9']"}), "(python=['3.7', '3.8', '3.9'])\n", (76, 106), False, 'from nox_poetry import session, SDIST\n'), ((269, 306), 'nox_poetry.session', 'session', ([], {'python': "['3.7', '3.8', '3.9']"}), "(python=['3.7', '3.8', '3.9'])\n", (276, 30...
from typing import List, Tuple from soco.data_center.online import stop from soco.data_center.online.uni_dimensional import ( lazy_capacity_provisioning, memoryless, probabilistic, randomized, randomly_biased_greedy, ) from soco.data_center.online.multi_dimensional import ( horizon_control, ...
[ "soco.data_center.online.multi_dimensional.lazy_budgeting.smoothed_balanced_load_optimization.Options", "soco.data_center.online.uni_dimensional.lazy_capacity_provisioning.integral.start", "soco.data_center.online.multi_dimensional.online_balanced_descent.primal.Options.euclidean_squared", "soco.data_center.o...
[((1553, 1563), 'soco.data_center.online.stop', 'stop', (['ADDR'], {}), '(ADDR)\n', (1557, 1563), False, 'from soco.data_center.online import stop\n'), ((2233, 2305), 'soco.data_center.online.uni_dimensional.lazy_capacity_provisioning.fractional.start', 'lazy_capacity_provisioning.fractional.start', (['ADDR', 'model', ...
#!/usr/bin/env python3 from cv_bridge import CvBridge, CvBridgeError import cv2 import rospy from sensor_msgs.msg import Image from gazebo_msgs.srv import GetModelState from tf.transformations import euler_from_quaternion import numpy as np import json import os data_dir = os.path.abspath( os.path.join(os.path.dirnam...
[ "rospy.Subscriber", "rospy.ServiceProxy", "numpy.sin", "os.path.dirname", "rospy.init_node", "cv2.destroyAllWindows", "cv2.circle", "numpy.min", "numpy.cos", "cv_bridge.CvBridge", "json.load", "numpy.flip", "cv2.putText", "numpy.deg2rad", "rospy.get_rostime", "rospy.Publisher", "nump...
[((374, 409), 'rospy.init_node', 'rospy.init_node', (['"""satview_streamer"""'], {}), "('satview_streamer')\n", (389, 409), False, 'import rospy\n'), ((428, 438), 'cv_bridge.CvBridge', 'CvBridge', ([], {}), '()\n', (436, 438), False, 'from cv_bridge import CvBridge, CvBridgeError\n'), ((700, 760), 'rospy.ServiceProxy',...
from __future__ import unicode_literals import unittest from datetime import date from infi.clickhouse_orm.database import Database from infi.clickhouse_orm.models import Model from infi.clickhouse_orm.fields import * from infi.clickhouse_orm.engines import * class ArrayFieldsTest(unittest.TestCase): def setUp(...
[ "datetime.date", "infi.clickhouse_orm.utils.unescape", "datetime.date.today", "infi.clickhouse_orm.utils.parse_array", "infi.clickhouse_orm.database.Database" ]
[((351, 370), 'infi.clickhouse_orm.database.Database', 'Database', (['"""test-db"""'], {}), "('test-db')\n", (359, 370), False, 'from infi.clickhouse_orm.database import Database\n'), ((1881, 1898), 'infi.clickhouse_orm.utils.parse_array', 'parse_array', (['"""[]"""'], {}), "('[]')\n", (1892, 1898), False, 'from infi.c...
import Utils from config.Resources import UnitTypes from controllers.Controller import Controller class ZombieController(Controller): def __init__(self): self.good_points = [] def do(self, unit, all_units): target = list(all_units)[0] #target = self.find_nearest_obj(unit, all_units, {...
[ "Utils.classical_dist" ]
[((457, 504), 'Utils.classical_dist', 'Utils.classical_dist', (['better_target', 'target.pos'], {}), '(better_target, target.pos)\n', (477, 504), False, 'import Utils\n'), ((507, 549), 'Utils.classical_dist', 'Utils.classical_dist', (['point[0]', 'target.pos'], {}), '(point[0], target.pos)\n', (527, 549), False, 'impor...
import csv import numpy as np import os import sklearn from sklearn import datasets from sklearn import neighbors, datasets, preprocessing from sklearn.decomposition import PCA from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LogisticRegression from sklearn.model_selection import tra...
[ "sklearn.ensemble.RandomForestClassifier", "numpy.load", "numpy.nan_to_num", "numpy.savetxt", "numpy.zeros", "sklearn.linear_model.LogisticRegression", "sklearn.neighbors.KNeighborsClassifier", "sklearn.decomposition.PCA", "sklearn.multioutput.MultiOutputClassifier" ]
[((573, 594), 'numpy.zeros', 'np.zeros', (['(2705, 147)'], {}), '((2705, 147))\n', (581, 594), True, 'import numpy as np\n'), ((730, 804), 'sklearn.linear_model.LogisticRegression', 'LogisticRegression', ([], {'random_state': '(0)', 'solver': '"""saga"""', 'n_jobs': '(-1)', 'max_iter': '(250)'}), "(random_state=0, solv...
#!/usr/bin/python3.7 import time from gpiozero import CPUTemperature import psutil import sys from datetime import datetime def check_temp(threshold=70): ''' uses gpiozero to measure the cpu temp of the pi returns a data structure with the result, a status flag and a string representation of what is g...
[ "psutil.virtual_memory", "gpiozero.CPUTemperature", "time.sleep", "datetime.datetime.now", "psutil.cpu_percent" ]
[((347, 363), 'gpiozero.CPUTemperature', 'CPUTemperature', ([], {}), '()\n', (361, 363), False, 'from gpiozero import CPUTemperature\n'), ((905, 928), 'psutil.virtual_memory', 'psutil.virtual_memory', ([], {}), '()\n', (926, 928), False, 'import psutil\n'), ((1570, 1607), 'psutil.cpu_percent', 'psutil.cpu_percent', (['...
import elevator import unittest class TestElevator(unittest.TestCase): def test_parenthesesCount_inputFile(self): self.assertEqual(74, elevator.parenthesesCount("input1.1.txt")) def test_parenthesesMismatch_inputFile(self): self.assertEqual(1795, elevator.parenthesesMismatch("input1.1.txt")) ...
[ "unittest.main", "elevator.parenthesesCount", "elevator.parenthesesMismatch" ]
[((352, 367), 'unittest.main', 'unittest.main', ([], {}), '()\n', (365, 367), False, 'import unittest\n'), ((149, 190), 'elevator.parenthesesCount', 'elevator.parenthesesCount', (['"""input1.1.txt"""'], {}), "('input1.1.txt')\n", (174, 190), False, 'import elevator\n'), ((274, 318), 'elevator.parenthesesMismatch', 'ele...
# coding: utf-8 # In[ ]: import numpy import sys import glob import matplotlib.pyplot def analyze(filename): data = numpy.loadtxt(fname=filename, delimiter=',') fig = matplotlib.pyplot.figure(figsize=(10.0,3.0)) axes1 = fig.add_subplot(1,3,1) axes2 = fig.add_subplot(1,3,2) axes3 = fig.ad...
[ "numpy.min", "numpy.mean", "numpy.max", "numpy.loadtxt", "glob.glob" ]
[((130, 174), 'numpy.loadtxt', 'numpy.loadtxt', ([], {'fname': 'filename', 'delimiter': '""","""'}), "(fname=filename, delimiter=',')\n", (143, 174), False, 'import numpy\n'), ((667, 709), 'numpy.loadtxt', 'numpy.loadtxt', ([], {'fname': 'f_name', 'delimiter': '""","""'}), "(fname=f_name, delimiter=',')\n", (680, 709),...
import graphene from django.conf import settings from django.utils.timezone import get_default_timezone from opening_hours.utils.opening_hours_client import OpeningHoursClient DEFAULT_TIMEZONE = get_default_timezone() class TimeSpanType(graphene.ObjectType): start_time = graphene.Time() end_time = graphene....
[ "graphene.List", "graphene.String", "graphene.Boolean", "opening_hours.utils.opening_hours_client.OpeningHoursClient", "django.utils.timezone.get_default_timezone", "graphene.Date", "graphene.Int", "graphene.Time" ]
[((197, 219), 'django.utils.timezone.get_default_timezone', 'get_default_timezone', ([], {}), '()\n', (217, 219), False, 'from django.utils.timezone import get_default_timezone\n'), ((280, 295), 'graphene.Time', 'graphene.Time', ([], {}), '()\n', (293, 295), False, 'import graphene\n'), ((311, 326), 'graphene.Time', 'g...
#!/usr/bin/python from commands import getstatusoutput import sys W = '\033[0m' # white (normal) R = '\033[31m' # red G = '\033[32m' # green O = '\033[33m' # orange B = '\033[34m' # blue P = '\033[35m' # purple format_file_type = [ ".c", ".h", ".cpp" ] status, output = getstatusoutput(...
[ "sys.stdout.write", "commands.getstatusoutput" ]
[((304, 355), 'commands.getstatusoutput', 'getstatusoutput', (['"""git show --pretty="" --name-only"""'], {}), '(\'git show --pretty="" --name-only\')\n', (319, 355), False, 'from commands import getstatusoutput\n'), ((731, 752), 'sys.stdout.write', 'sys.stdout.write', (['cmd'], {}), '(cmd)\n', (747, 752), False, 'impo...
from django.db import models from billing.models import BillingProfile ADDRESS_TYPES = ( ('billing', 'Billing'), ('shipping', 'Shipping'), ) class Addresses(models.Model): billing_profile = models.ForeignKey(BillingProfile, on_delete=models.DO_NOTHING) address_type = models.CharField(max_length=12...
[ "django.db.models.ForeignKey", "django.db.models.CharField" ]
[((205, 267), 'django.db.models.ForeignKey', 'models.ForeignKey', (['BillingProfile'], {'on_delete': 'models.DO_NOTHING'}), '(BillingProfile, on_delete=models.DO_NOTHING)\n', (222, 267), False, 'from django.db import models\n'), ((290, 345), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(120)',...
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import logging from collections import defaultdict import pytest from datadog_checks.dev.testing import requires_windows try: from datadog_test_libs.win.pdh_mocks import ( # noqa: F401 init...
[ "datadog_checks.checks.win.winpdh.WinPDHCounter", "datadog_test_libs.win.pdh_mocks.initialize_pdh_tests", "collections.defaultdict", "pytest.raises", "platform.system", "logging.getLogger" ]
[((603, 630), 'logging.getLogger', 'logging.getLogger', (['__file__'], {}), '(__file__)\n', (620, 630), False, 'import logging\n'), ((875, 897), 'datadog_test_libs.win.pdh_mocks.initialize_pdh_tests', 'initialize_pdh_tests', ([], {}), '()\n', (895, 897), False, 'from datadog_test_libs.win.pdh_mocks import initialize_pd...
import calendar import datetime from nevow import tags as t, url, itaglibrary, rend, static _calendar_css = """ .calendar tbody td.today { background-color: #aaaaaa; } """ calendarCSS = t.style(type_="text/css")[_calendar_css] calendarCSSFile = static.File(_calendar_css, "text/css") class CalendarComponent(object):...
[ "nevow.tags.td", "nevow.tags.xml", "nevow.tags.tr", "nevow.tags.a", "nevow.tags.table", "calendar.monthcalendar", "nevow.tags.style", "datetime.date", "calendar.weekheader", "nevow.static.File", "datetime.timedelta", "nevow.tags.th", "nevow.itaglibrary.ICalendarOptions", "datetime.datetime...
[((248, 286), 'nevow.static.File', 'static.File', (['_calendar_css', '"""text/css"""'], {}), "(_calendar_css, 'text/css')\n", (259, 286), False, 'from nevow import tags as t, url, itaglibrary, rend, static\n'), ((189, 214), 'nevow.tags.style', 't.style', ([], {'type_': '"""text/css"""'}), "(type_='text/css')\n", (196, ...
import numpy as np import pytest import numpy.testing as npt from lenstronomy.Util import util import lenstronomy.Util.param_util as param_util def test_cart2polar(): #singel 2d coordinate transformation center_x, center_y = 0, 0 x = 1 y = 1 r, phi = param_util.cart2polar(x, y, center_x, center_y)...
[ "lenstronomy.Util.param_util.cart2polar", "lenstronomy.Util.param_util.shear_polar2cartesian", "numpy.testing.assert_almost_equal", "numpy.allclose", "lenstronomy.Util.util.make_grid", "lenstronomy.Util.param_util.shear_cartesian2polar", "pytest.main", "numpy.sin", "numpy.array", "numpy.cos", "l...
[((273, 320), 'lenstronomy.Util.param_util.cart2polar', 'param_util.cart2polar', (['x', 'y', 'center_x', 'center_y'], {}), '(x, y, center_x, center_y)\n', (294, 320), True, 'import lenstronomy.Util.param_util as param_util\n'), ((429, 445), 'numpy.array', 'np.array', (['[1, 2]'], {}), '([1, 2])\n', (437, 445), True, 'i...
#!/usr/bin/env python3 import math import operator from pywizlight.bulb import PilotBuilder, PilotParser, wizlight try: from .vec import *; except: from vec import *; # can't actually change a value like this from another file once it's been loaded. this # is actually a very bad design on python's part IMNSHO, and ...
[ "math.cos", "pywizlight.bulb.PilotBuilder", "math.atan2" ]
[((5770, 5844), 'pywizlight.bulb.PilotBuilder', 'PilotBuilder', ([], {'rgb': 'rgb', 'warm_white': 'cw', 'cold_white': 'cw', 'brightness': 'brightness'}), '(rgb=rgb, warm_white=cw, cold_white=cw, brightness=brightness)\n', (5782, 5844), False, 'from pywizlight.bulb import PilotBuilder, PilotParser, wizlight\n'), ((8308,...
# -- coding: utf-8 -- import json from datetime import datetime, timedelta from test.factories import ProjectFactory, OrganizationFactory, IssueFactory from test.harness import IntegrationTest from app import db, Issue class TestProjects(IntegrationTest): def test_all_projects_order(self): ''' T...
[ "test.factories.ProjectFactory", "json.loads", "app.db.session.execute", "test.factories.OrganizationFactory", "datetime.timedelta", "app.db.session.commit", "app.db.session.flush", "test.factories.IssueFactory", "app.db.session.query", "datetime.datetime.now", "app.db.session.add" ]
[((397, 476), 'test.factories.ProjectFactory', 'ProjectFactory', ([], {'name': 'u"""Project 1"""', 'last_updated': '"""Mon, 01 Jan 2010 00:00:00 GMT"""'}), "(name=u'Project 1', last_updated='Mon, 01 Jan 2010 00:00:00 GMT')\n", (411, 476), False, 'from test.factories import ProjectFactory, OrganizationFactory, IssueFact...
import pytest def test_get_games_dataset_subset(): from relevanceai.utils.datasets import get_games_dataset assert len(get_games_dataset(number_of_documents=100)) == 100
[ "relevanceai.utils.datasets.get_games_dataset" ]
[((130, 172), 'relevanceai.utils.datasets.get_games_dataset', 'get_games_dataset', ([], {'number_of_documents': '(100)'}), '(number_of_documents=100)\n', (147, 172), False, 'from relevanceai.utils.datasets import get_games_dataset\n')]
import requests from datetime import datetime, timedelta import jwt import base64 secret = '' # The secret provided by ROK is b64 encoded, we need to decode it for jwt notb64_secret = base64.b64decode(secret) # Here we provide the registered claims and the claims we agreed on with ROK data = { 'aud': 'Rok-solutio...
[ "jwt.encode", "base64.b64decode", "datetime.timedelta", "requests.post", "datetime.datetime.now" ]
[((185, 209), 'base64.b64decode', 'base64.b64decode', (['secret'], {}), '(secret)\n', (201, 209), False, 'import base64\n'), ((540, 590), 'jwt.encode', 'jwt.encode', (['data', 'notb64_secret'], {'algorithm': '"""HS256"""'}), "(data, notb64_secret, algorithm='HS256')\n", (550, 590), False, 'import jwt\n'), ((602, 801), ...
import sys import os.path as op import pyxnat from . import skip_if_no_network _modulepath = op.dirname(op.abspath(pyxnat.__file__)) dd = op.join(op.split(_modulepath)[0], 'bin') sys.path.append(dd) @skip_if_no_network def test_001_sessionmirror(): from sessionmirror import create_parser, main parser = creat...
[ "sys.path.append", "sessionmirror.create_parser", "os.path.abspath", "pyxnat.Interface", "sessionmirror.main", "os.path.split" ]
[((181, 200), 'sys.path.append', 'sys.path.append', (['dd'], {}), '(dd)\n', (196, 200), False, 'import sys\n'), ((105, 132), 'os.path.abspath', 'op.abspath', (['pyxnat.__file__'], {}), '(pyxnat.__file__)\n', (115, 132), True, 'import os.path as op\n'), ((315, 330), 'sessionmirror.create_parser', 'create_parser', ([], {...
# Copyright (c) 2008 Simplistix Ltd # See license.txt for license details. from logging import Handler,ERROR,getLogger class ErrorHandler(Handler): fired = False def __init__(self,level=ERROR,logger='',install=True): Handler.__init__(self) self.level=level self.logger=logger ...
[ "logging.Handler.__init__", "logging.getLogger" ]
[((241, 263), 'logging.Handler.__init__', 'Handler.__init__', (['self'], {}), '(self)\n', (257, 263), False, 'from logging import Handler, ERROR, getLogger\n'), ((429, 451), 'logging.getLogger', 'getLogger', (['self.logger'], {}), '(self.logger)\n', (438, 451), False, 'from logging import Handler, ERROR, getLogger\n'),...
import os from django.core.exceptions import ValidationError from django.shortcuts import get_object_or_404 from django.http import JsonResponse, HttpResponse from django.views import View from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.db impo...
[ "board.models.Board.objects.filter", "django.utils.decorators.method_decorator", "django.core.exceptions.ValidationError", "os.path.exists", "django.http.JsonResponse", "accounts.serializers.AccountSerializerInPost", "board.serializers.BoardCategorySerializer", "accounts.models.Account.objects.filter"...
[((918, 967), 'django.utils.decorators.method_decorator', 'method_decorator', (['login_required'], {'name': '"""dispatch"""'}), "(login_required, name='dispatch')\n", (934, 967), False, 'from django.utils.decorators import method_decorator\n'), ((5029, 5078), 'django.utils.decorators.method_decorator', 'method_decorato...
#!/usr/bin/python # Copyright (C) 2010-2013 Google Inc. # # 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 l...
[ "protorpc.messages.MessageField", "protorpc.messages.EnumField", "protorpc.messages.IntegerField", "protorpc.messages.StringField" ]
[((809, 847), 'protorpc.messages.StringField', 'messages.StringField', (['(1)'], {'required': '(True)'}), '(1, required=True)\n', (829, 847), False, 'from protorpc import messages\n'), ((972, 1008), 'protorpc.messages.IntegerField', 'messages.IntegerField', (['(1)'], {'default': '(10)'}), '(1, default=10)\n', (993, 100...
# -*- coding: utf-8 -*- import logging import platform from enzi.backend.backend import * from enzi.backend.ies import IES from enzi.backend.questa import Questa from enzi.backend.vivado import Vivado __all__ = ['KnownBackends', 'Questa', 'IES', 'Vivado', 'Backend', 'BackendCallback', 'value_str_filter'] ...
[ "platform.system", "logging.getLogger" ]
[((330, 357), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (347, 357), False, 'import logging\n'), ((405, 422), 'platform.system', 'platform.system', ([], {}), '()\n', (420, 422), False, 'import platform\n')]
"""Test suite for Taxa Tree display module.""" from app.display_modules.display_module_base_test import BaseDisplayModuleTest from app.display_modules.taxa_tree import TaxaTreeDisplayModule from app.display_modules.taxa_tree.models import TaxaTreeResult from app.display_modules.taxa_tree.constants import MODULE_NAME f...
[ "app.display_modules.taxa_tree.models.TaxaTreeResult", "app.tool_results.krakenhll.KrakenHLLResultModule.name", "app.tool_results.kraken.tests.factory.create_kraken", "app.tool_results.metaphlan2.tests.factory.create_metaphlan2", "app.tool_results.metaphlan2.Metaphlan2ResultModule.name", "app.tool_results...
[((1433, 1457), 'app.display_modules.taxa_tree.models.TaxaTreeResult', 'TaxaTreeResult', ([], {}), '(**kwargs)\n', (1447, 1457), False, 'from app.display_modules.taxa_tree.models import TaxaTreeResult\n'), ((1693, 1718), 'app.tool_results.kraken.KrakenResultModule.name', 'KrakenResultModule.name', ([], {}), '()\n', (17...
""" .. _tut-fnirs-glm-components: GLM and Design Matrix Parameters ================================ This tutorial describes the various design choices available when analysing fNIRS data with a GLM approach. .. sidebar:: Nilearn If you use MNE-NIRS to conduct a GLM analysis please cite Nilearn. This package r...
[ "matplotlib.pyplot.title", "nilearn.glm.first_level.spm_hrf", "os.path.join", "numpy.zeros_like", "matplotlib.colors.Normalize", "nilearn.plotting.plot_design_matrix", "matplotlib.cm.ScalarMappable", "nilearn.glm.first_level.compute_regressor", "nilearn.glm.first_level.glover_hrf", "numpy.linspace...
[((3942, 4009), 'nilearn.glm.first_level.glover_hrf', 'first_level.glover_hrf', (['(1)'], {'oversampling': '(50)', 'time_length': 'time_length'}), '(1, oversampling=50, time_length=time_length)\n', (3964, 4009), False, 'from nilearn.glm import first_level\n'), ((4027, 4091), 'nilearn.glm.first_level.spm_hrf', 'first_le...
import glob import multiprocessing import os import json from django.core.exceptions import ImproperlyConfigured # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # Load Secrets def load_secrets(file=os.path.join(BASE_DIR, '.secrets.json'))...
[ "os.path.abspath", "django.core.exceptions.ImproperlyConfigured", "glob.glob", "os.path.join", "multiprocessing.cpu_count" ]
[((214, 239), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (229, 239), False, 'import os\n'), ((280, 319), 'os.path.join', 'os.path.join', (['BASE_DIR', '""".secrets.json"""'], {}), "(BASE_DIR, '.secrets.json')\n", (292, 319), False, 'import os\n'), ((1574, 1601), 'multiprocessing.cpu_count...
import datetime from billy.utils.fulltext import pdfdata_to_text, text_after_line_numbers from billy.scrape.utils import url_xpath from .bills import MOBillScraper from .legislators import MOLegislatorScraper from .committees import MOCommitteeScraper from .votes import MOVoteScraper metadata = dict( name = 'Misso...
[ "billy.utils.fulltext.text_after_line_numbers", "billy.utils.fulltext.pdfdata_to_text", "datetime.date", "billy.scrape.utils.url_xpath" ]
[((4170, 4261), 'billy.scrape.utils.url_xpath', 'url_xpath', (['"""http://www.senate.mo.gov/pastsessions.htm"""', '"""//div[@id="list"]/li/a/text()"""'], {}), '(\'http://www.senate.mo.gov/pastsessions.htm\',\n \'//div[@id="list"]/li/a/text()\')\n', (4179, 4261), False, 'from billy.scrape.utils import url_xpath\n'), ...
# -*- coding: utf-8 -*- r""" ================================= Wasserstein unmixing with PyTorch ================================= In this example we estimate mixing parameters from distributions that minimize the Wasserstein distance. In other words we suppose that a target distribution :math:`\mu^t` can be expressed...
[ "ot.emd2", "torch.tensor", "matplotlib.pylab.scatter", "matplotlib.pylab.legend", "ot.unif", "ot.dist", "numpy.zeros", "numpy.random.RandomState", "torch.mv", "matplotlib.pylab.xlabel", "ot.utils.proj_simplex", "matplotlib.pylab.semilogy", "matplotlib.pylab.title", "torch.no_grad", "matp...
[((1453, 1477), 'numpy.random.RandomState', 'np.random.RandomState', (['(2)'], {}), '(2)\n', (1474, 1477), True, 'import numpy as np\n'), ((1639, 1665), 'numpy.concatenate', 'np.concatenate', (['(xs1, xs2)'], {}), '((xs1, xs2))\n', (1653, 1665), True, 'import numpy as np\n'), ((1701, 1718), 'numpy.zeros', 'np.zeros', (...
from elements import Elements from enemy import Goal, GoalType from ability import EffectType, Effect from ai.single_target_attack import SingleTargetAttack from ai.single_target_heal import SingleTargetHeal from ai.status_effect import StatusEffect from summon import Summon from ai.explode import Explode summons = { ...
[ "ability.Effect", "enemy.Goal" ]
[((705, 740), 'enemy.Goal', 'Goal', (['GoalType.damage_opponent', '(400)'], {}), '(GoalType.damage_opponent, 400)\n', (709, 740), False, 'from enemy import Goal, GoalType\n'), ((1220, 1244), 'enemy.Goal', 'Goal', (['GoalType.enrage', '(0)'], {}), '(GoalType.enrage, 0)\n', (1224, 1244), False, 'from enemy import Goal, G...
from __future__ import annotations from typing import Match from bot.config import Config from bot.data import command from bot.data import esc from bot.data import format_msg @command('!bonk') async def cmd_bonk(config: Config, match: Match[str]) -> str: _, _, rest = match['msg'].partition(' ') rest = rest...
[ "bot.data.command", "bot.data.esc" ]
[((181, 197), 'bot.data.command', 'command', (['"""!bonk"""'], {}), "('!bonk')\n", (188, 197), False, 'from bot.data import command\n'), ((420, 429), 'bot.data.esc', 'esc', (['rest'], {}), '(rest)\n', (423, 429), False, 'from bot.data import esc\n')]
from flask import Flask from flask_restful import Resource, Api, reqparse app = Flask(__name__) api = Api(app) parser = reqparse.RequestParser() parser.add_argument('name', type=str, help='Name of a guest') parser.add_argument('id', type=int, help='Numerical ID of a guest in the list') # A list containing names of...
[ "flask_restful.Api", "flask.Flask", "flask_restful.reqparse.RequestParser" ]
[((82, 97), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (87, 97), False, 'from flask import Flask\n'), ((104, 112), 'flask_restful.Api', 'Api', (['app'], {}), '(app)\n', (107, 112), False, 'from flask_restful import Resource, Api, reqparse\n'), ((124, 148), 'flask_restful.reqparse.RequestParser', 'reqpa...
from flask_appbuilder import ModelRestApi from flask_appbuilder.models.sqla.interface import SQLAInterface from flask_appbuilder.security.sqla.models import PermissionView class PermissionViewMenuApi(ModelRestApi): resource_name = "security/permissions-resources" openapi_spec_tag = "Security Permissions on Re...
[ "flask_appbuilder.models.sqla.interface.SQLAInterface" ]
[((407, 436), 'flask_appbuilder.models.sqla.interface.SQLAInterface', 'SQLAInterface', (['PermissionView'], {}), '(PermissionView)\n', (420, 436), False, 'from flask_appbuilder.models.sqla.interface import SQLAInterface\n')]
""" GTSAM Copyright 2010-2018, Georgia Tech Research Corporation, Atlanta, Georgia 30332-0415 All Rights Reserved Authors: <NAME>, et al. (see THANKS for the full author list) See LICENSE for the license information Kinematics of three-link manipulator with GTSAM poses and product of exponential maps. Author: <NAME> ...
[ "unittest.main", "numpy.stack", "gtsam.Pose2", "math.radians", "numpy.remainder", "math.sin", "gtsam.Pose2.Expmap", "numpy.append", "matplotlib.pyplot.figure", "numpy.array", "numpy.linalg.norm", "numpy.linspace", "numpy.linalg.inv", "math.cos", "numpy.linalg.pinv", "numpy.testing.asse...
[((775, 810), 'numpy.array', 'np.array', (['[x, y, z]'], {'dtype': 'np.float'}), '([x, y, z], dtype=np.float)\n', (783, 810), True, 'import numpy as np\n'), ((10685, 10703), 'matplotlib.pyplot.figure', 'plt.figure', (['fignum'], {}), '(fignum)\n', (10695, 10703), True, 'import matplotlib.pyplot as plt\n'), ((11207, 112...
# Generated by Django 3.0.2 on 2020-01-13 02:58 from uuid import uuid4 from django.conf import settings from django.db import migrations, models from private_storage.fields import PrivateFileField from private_storage.storage.files import PrivateFileSystemStorage import django.utils.timezone import model_utils.fields ...
[ "django.db.models.OneToOneField", "django.db.models.TextField", "django.db.migrations.swappable_dependency", "private_storage.storage.files.PrivateFileSystemStorage", "django.db.models.CharField", "django.db.models.BigAutoField", "django.db.models.DateTimeField", "django.db.models.ForeignKey", "djan...
[((592, 649), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (623, 649), False, 'from django.db import migrations, models\n'), ((3256, 3296), 'attendees.persons.models.Utility.default_sql', 'Utility.default_sql', (['"""...
# -*- coding:utf-8 -*- import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__))) from appUI.MainWindow import main if __name__ == "__main__": # main()
[ "os.path.abspath", "appUI.MainWindow.main" ]
[((180, 186), 'appUI.MainWindow.main', 'main', ([], {}), '()\n', (184, 186), False, 'from appUI.MainWindow import main\n'), ((78, 103), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (93, 103), False, 'import os\n')]
#!/usr/bin/env python from datetime import date, timedelta import logging import sys import click from sickle import Sickle from sickle.iterator import OAIItemIterator from sickle.oaiexceptions import NoRecordsMatch from smart_open import open yesterday = (date.today() - timedelta(days=1)).strftime('%Y-%m-%d') tomor...
[ "logging.debug", "logging.basicConfig", "click.option", "datetime.date.today", "smart_open.open", "click.command", "logging.info", "datetime.timedelta", "sickle.Sickle", "sys.exit" ]
[((385, 400), 'click.command', 'click.command', ([], {}), '()\n', (398, 400), False, 'import click\n'), ((402, 526), 'click.option', 'click.option', (['"""--host"""'], {'default': '"""https://dspace.mit.edu/oai/request"""', 'help': '"""hostname of OAI-PMH server to harvest from"""'}), "('--host', default='https://dspac...
import time from osbrain import run_agent from osbrain import run_nameserver def rep_handler(agent, message): if not agent.tasks: return None return agent.tasks.pop() def request_work(agent): x = agent.send_recv('dispatcher', 'READY!') if not x: agent.shutdown() return ti...
[ "osbrain.run_nameserver", "osbrain.run_agent", "time.sleep" ]
[((318, 331), 'time.sleep', 'time.sleep', (['x'], {}), '(x)\n', (328, 331), False, 'import time\n'), ((438, 454), 'osbrain.run_nameserver', 'run_nameserver', ([], {}), '()\n', (452, 454), False, 'from osbrain import run_nameserver\n'), ((470, 490), 'osbrain.run_agent', 'run_agent', (['"""Results"""'], {}), "('Results')...
import operator import os import re import sys import time from collections import deque from functools import reduce import numpy as np def read_input() -> list[list[int]]: # Read lines input: # 2199943210 # 3987894921 # 9856789892 # 8767896789 # 9899965678 # return list with lists of in...
[ "os.path.basename", "time.process_time", "numpy.array", "re.search", "collections.deque" ]
[((1912, 1919), 'collections.deque', 'deque', ([], {}), '()\n', (1917, 1919), False, 'from collections import deque\n'), ((3345, 3364), 'time.process_time', 'time.process_time', ([], {}), '()\n', (3362, 3364), False, 'import time\n'), ((3441, 3460), 'time.process_time', 'time.process_time', ([], {}), '()\n', (3458, 346...
""" * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * - Redistributions in bina...
[ "threading.Lock", "subprocess.Popen", "re.sub" ]
[((2730, 2746), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (2744, 2746), False, 'import threading\n'), ((7917, 8020), 'subprocess.Popen', 'subprocess.Popen', (['cmd'], {'stdout': 'subprocess.PIPE', 'stderr': 'stderr_fd', 'shell': '(True)', 'start_new_session': '(True)'}), '(cmd, stdout=subprocess.PIPE, stder...
import matplotlib.pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D def plot_image_frame(image_frame): """ utils for plot image frames :param image_frame: list of images """ for ii, image in enumerate(image_frame): plt.figure() if isinstance(image, list): image = image[0] plt.imsh...
[ "matplotlib.pyplot.subplot", "matplotlib.pyplot.show", "mpl_toolkits.mplot3d.Axes3D", "matplotlib.pyplot.plot", "matplotlib.pyplot.imshow", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "numpy.array", "numpy.arange", "matplotlib.pyplot.subplots_adjust", "matplotlib.pyplot.ylabel", "m...
[((558, 578), 'numpy.array', 'np.array', (['pose_frame'], {}), '(pose_frame)\n', (566, 578), True, 'import numpy as np\n'), ((673, 700), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(12, 7)'}), '(figsize=(12, 7))\n', (683, 700), True, 'import matplotlib.pyplot as plt\n'), ((706, 725), 'numpy.arange', 'np...
# Code generated by `typeddictgen`. DO NOT EDIT. """V1ServiceSpecDict generated type.""" from typing import TypedDict, Dict, List from kubernetes_typed.client import V1ServicePortDict, V1SessionAffinityConfigDict V1ServiceSpecDict = TypedDict( "V1ServiceSpecDict", { "allocateLoadBalancerNodePorts": bo...
[ "typing.TypedDict" ]
[((235, 852), 'typing.TypedDict', 'TypedDict', (['"""V1ServiceSpecDict"""', "{'allocateLoadBalancerNodePorts': bool, 'clusterIP': str, 'clusterIPs':\n List[str], 'externalIPs': List[str], 'externalName': str,\n 'externalTrafficPolicy': str, 'healthCheckNodePort': int,\n 'internalTrafficPolicy': str, 'ipFamilie...
from .common import Benchmark, get_squares_, get_indexes_rand, TYPES1 import numpy_demo as np class Eindot(Benchmark): def setup(self): self.a = np.arange(60000.0).reshape(150, 400) self.ac = self.a.copy() self.at = self.a.T self.atc = self.a.T.copy() self.b = np.arange(24...
[ "numpy_demo.dot", "numpy_demo.arange", "numpy_demo.inner", "numpy_demo.tensordot", "numpy_demo.seterr", "numpy_demo.einsum", "numpy_demo.matmul", "numpy_demo.linalg.lstsq" ]
[((363, 377), 'numpy_demo.arange', 'np.arange', (['(600)'], {}), '(600)\n', (372, 377), True, 'import numpy_demo as np\n'), ((395, 409), 'numpy_demo.arange', 'np.arange', (['(400)'], {}), '(400)\n', (404, 409), True, 'import numpy_demo as np\n'), ((563, 585), 'numpy_demo.dot', 'np.dot', (['self.a', 'self.b'], {}), '(se...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import tempfile import shutil import numpy as np import pytest from datetime import datetime import os from urllib.parse import urlparse import re from unittest.mock import Mock, patch from astropy import coordinates from astropy import units as u from a...
[ "astropy.units.Unit", "os.path.join", "shutil.rmtree", "os.path.split", "unittest.mock.Mock", "pytest.fixture", "urllib.parse.urlparse", "unittest.mock.patch", "datetime.datetime.utcnow", "datetime.datetime.strptime", "tempfile.mkdtemp", "pytest.mark.skipif", "pytest.raises", "pytest.mark....
[((27292, 27350), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""dataarchive_url"""', '_test_url_list'], {}), "('dataarchive_url', _test_url_list)\n", (27315, 27350), False, 'import pytest\n'), ((27352, 27407), 'pytest.mark.skip', 'pytest.mark.skip', (['"""Not working for now - Investigating"""'], {}), "('...
import ocdskingfisherprocess.cli.commands.base import redis class UpgradeDataBaseCLICommand(ocdskingfisherprocess.cli.commands.base.CLICommand): command = 'upgrade-database' def configure_subparser(self, subparser): subparser.add_argument("--deletefirst", help="Delete Database First", action="store_...
[ "redis.Redis" ]
[((664, 769), 'redis.Redis', 'redis.Redis', ([], {'host': 'self.config.redis_host', 'port': 'self.config.redis_port', 'db': 'self.config.redis_database'}), '(host=self.config.redis_host, port=self.config.redis_port, db=\n self.config.redis_database)\n', (675, 769), False, 'import redis\n')]
import datetime from charms.reactive import hook from charms.reactive import RelationBase from charms.reactive import scopes class NrpeExternalMasterProvides(RelationBase): scope = scopes.GLOBAL @hook('{provides:nrpe-external-master}-relation-{joined,changed}') def changed_nrpe(self): self.set_s...
[ "datetime.datetime.now", "charms.reactive.hook" ]
[((208, 273), 'charms.reactive.hook', 'hook', (['"""{provides:nrpe-external-master}-relation-{joined,changed}"""'], {}), "('{provides:nrpe-external-master}-relation-{joined,changed}')\n", (212, 273), False, 'from charms.reactive import hook\n'), ((360, 426), 'charms.reactive.hook', 'hook', (['"""{provides:nrpe-external...
from http import HTTPStatus from django import forms from django.core.cache import cache from django.test import Client, TestCase from django.urls import reverse from ..models import Follow, Group, Post, User, Comment # , Profile POSTS_COUNT = 13 PAGE_COUNT = 10 class PostPagesTests(TestCase): @classmethod ...
[ "django.urls.reverse", "django.core.cache.cache.clear", "django.test.Client" ]
[((1214, 1222), 'django.test.Client', 'Client', ([], {}), '()\n', (1220, 1222), False, 'from django.test import Client, TestCase\n'), ((1254, 1262), 'django.test.Client', 'Client', ([], {}), '()\n', (1260, 1262), False, 'from django.test import Client, TestCase\n'), ((1464, 1477), 'django.core.cache.cache.clear', 'cach...
import frappe from frappe.utils import get_defaults from frappe import _ from frappe.utils import cint, flt, cstr from frappe.utils import num2words # # convert currency to words # def money_in_words(number, main_currency=None, fraction_currency=None): try: # note: `flt` returns 0 for invalid input and we...
[ "frappe.utils.flt", "frappe.utils.num2words", "frappe.db.get_value", "frappe.db.get_default", "frappe.utils.get_defaults", "frappe.utils.cint", "frappe._" ]
[((423, 434), 'frappe.utils.flt', 'flt', (['number'], {}), '(number)\n', (426, 434), False, 'from frappe.utils import cint, flt, cstr\n'), ((481, 495), 'frappe.utils.get_defaults', 'get_defaults', ([], {}), '()\n', (493, 495), False, 'from frappe.utils import get_defaults\n'), ((734, 809), 'frappe.db.get_value', 'frapp...
from django.shortcuts import render from django.http import HttpResponseRedirect from django.urls import reverse from django.contrib import messages from django.db.models import Avg, Max, Sum, Count, ProtectedError, DateTimeField from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.db.mo...
[ "django.db.models.Max", "django.utils.timezone.now", "django.db.models.DateTimeField", "django.db.models.Sum", "django.urls.reverse", "django.core.paginator.Paginator", "django.db.models.functions.ExtractHour", "django.shortcuts.render", "django.contrib.messages.success", "django.db.models.Avg", ...
[((726, 740), 'django.utils.timezone.now', 'timezone.now', ([], {}), '()\n', (738, 740), False, 'from django.utils import timezone\n'), ((1436, 1629), 'django.shortcuts.render', 'render', (['request', '"""index.html"""', "{'qtd_cadastro': qtd_cadastro, 'total_vendas': total_vendas, 'media_vendas':\n media_vendas, 'v...
from pathlib import Path from setuptools import setup, find_packages long_description = Path("README.md").read_text() reqs = Path("requirements.txt").read_text().strip().splitlines() pkg = "google_takeout_parser" setup( name=pkg, version="0.1.0", url="https://github.com/seanbreckenridge/google_takeout_par...
[ "pathlib.Path", "setuptools.find_packages" ]
[((89, 106), 'pathlib.Path', 'Path', (['"""README.md"""'], {}), "('README.md')\n", (93, 106), False, 'from pathlib import Path\n'), ((623, 711), 'setuptools.find_packages', 'find_packages', ([], {'include': "['google_takeout_parser', 'google_takeout_parser.parse_html']"}), "(include=['google_takeout_parser',\n 'goog...
""" Question -------- When comparing the core metabolism of Archaea and Bacteria, what differences and similarities occur? Method ------ - build Bacteria clade - build Archaea clade - REPEAT for varying majority-percentages: - overlap core metabolisms and print amount of EC numbers inside the intersection and fall...
[ "FEV_KEGG.Evolution.Clade.Clade", "FEV_KEGG.KEGG.File.cache", "FEV_KEGG.Drawing.Export.forCytoscape", "FEV_KEGG.Evolution.Clade.CladePair", "FEV_KEGG.Graph.Elements.EcNumber.removeWildcards" ]
[((2072, 2135), 'FEV_KEGG.KEGG.File.cache', 'cache', ([], {'folder_path': '"""experiments/41"""', 'file_name': '"""bacteria_clade"""'}), "(folder_path='experiments/41', file_name='bacteria_clade')\n", (2077, 2135), False, 'from FEV_KEGG.KEGG.File import cache\n'), ((2351, 2413), 'FEV_KEGG.KEGG.File.cache', 'cache', ([]...
# -*- coding: utf-8 -*- import math from collections import OrderedDict import flask import pandas as pd import netCDF4 import numpy as np from bokeh.embed import components from bokeh.resources import INLINE from bokeh.templates import RESOURCES from bokeh.util.string import encode_utf8 from bokeh.models import Da...
[ "bokeh.util.string.encode_utf8", "viz2.timeseries", "viz2.legend", "bokeh.embed.components", "flask.Flask", "utils.colormap.RGBAColorMapper", "bokeh.templates.RESOURCES.render", "bokeh.plotting.vplot", "bokeh.plotting.hplot", "flask.render_template", "viz2.climate_map", "viz2.title" ]
[((687, 708), 'flask.Flask', 'flask.Flask', (['__name__'], {}), '(__name__)\n', (698, 708), False, 'import flask\n'), ((721, 751), 'utils.colormap.RGBAColorMapper', 'RGBAColorMapper', (['(-6)', '(6)', 'RdBu11'], {}), '(-6, 6, RdBu11)\n', (736, 751), False, 'from utils.colormap import RGBAColorMapper\n'), ((815, 828), '...
from rest_framework import viewsets from rest_framework.generics import ListAPIView from rest_framework.permissions import AllowAny from rest_framework import status from rest_framework.decorators import api_view, permission_classes from rest_framework.generics import CreateAPIView, ListAPIView from rest_framework.p...
[ "jobs.models.Applicant.objects.filter", "jobs.models.Job.objects.filter", "rest_framework.response.Response", "rest_framework.decorators.permission_classes", "rest_framework.decorators.api_view", "django.http.response.HttpResponse" ]
[((2522, 2539), 'rest_framework.decorators.api_view', 'api_view', (["['GET']"], {}), "(['GET'])\n", (2530, 2539), False, 'from rest_framework.decorators import api_view, permission_classes\n'), ((2541, 2590), 'rest_framework.decorators.permission_classes', 'permission_classes', (['[IsAuthenticated, IsEmployee]'], {}), ...
#!/usr/bin/env python2 from argparse import ArgumentParser from markovmusic.player import Player parser = ArgumentParser() parser.add_argument('--input', default='input/bach', metavar='PATH', help='MIDI input, either a single file or a directory') parser.add_argument('--chain-l...
[ "argparse.ArgumentParser" ]
[((108, 124), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (122, 124), False, 'from argparse import ArgumentParser\n')]
from JumpScale import j def cb(): from .BackupFactory import BackupFactory return BackupFactory j.base.loader.makeAvailable(j, 'clients') j.clients._register('backup', cb)
[ "JumpScale.j.base.loader.makeAvailable", "JumpScale.j.clients._register" ]
[((106, 147), 'JumpScale.j.base.loader.makeAvailable', 'j.base.loader.makeAvailable', (['j', '"""clients"""'], {}), "(j, 'clients')\n", (133, 147), False, 'from JumpScale import j\n'), ((149, 182), 'JumpScale.j.clients._register', 'j.clients._register', (['"""backup"""', 'cb'], {}), "('backup', cb)\n", (168, 182), Fals...
#!/usr/bin/env python # -*- coding: utf-8 -*- import math import geopandas as gpd from shapely.geometry import Polygon from geoedfframework.utils.GeoEDFError import GeoEDFError """ Helper module implementing various geometry operations """ def geom_distance(lat1, lon1, lat2, lon2): try: R = 6378.137 # ...
[ "geopandas.GeoSeries", "math.sqrt", "math.sin", "geopandas.GeoDataFrame", "math.cos", "geoedfframework.utils.GeoEDFError.GeoEDFError" ]
[((2592, 2653), 'geopandas.GeoDataFrame', 'gpd.GeoDataFrame', ([], {'index': '[0]', 'crs': 'crs', 'geometry': '[polygon_geom]'}), '(index=[0], crs=crs, geometry=[polygon_geom])\n', (2608, 2653), True, 'import geopandas as gpd\n'), ((713, 765), 'geoedfframework.utils.GeoEDFError.GeoEDFError', 'GeoEDFError', (['"""Could ...
# -------------- # Importing header files import numpy as np # Path of the file has been stored in variable called 'path' #New record new_record=[[50, 9, 4, 1, 0, 0, 40, 0]] #Code starts here data=np.genfromtxt(path,delimiter=",",skip_header=1) ##print(data) census=np.concatenate((data,new_record)) ...
[ "numpy.sum", "numpy.std", "numpy.genfromtxt", "numpy.max", "numpy.mean", "numpy.min", "numpy.array", "numpy.concatenate" ]
[((215, 264), 'numpy.genfromtxt', 'np.genfromtxt', (['path'], {'delimiter': '""","""', 'skip_header': '(1)'}), "(path, delimiter=',', skip_header=1)\n", (228, 264), True, 'import numpy as np\n'), ((286, 320), 'numpy.concatenate', 'np.concatenate', (['(data, new_record)'], {}), '((data, new_record))\n', (300, 320), True...
import collections.abc import types import typing from . import _abc class BaseHeaders(collections.abc.Mapping): def __init__(self, source: typing.Optional[typing.Mapping]=None) -> None: self.__http_headers__: typing.Dict[str, str] = {} if source is not None: self.__http_headers__.u...
[ "types.MappingProxyType" ]
[((1399, 1429), 'types.MappingProxyType', 'types.MappingProxyType', (['params'], {}), '(params)\n', (1421, 1429), False, 'import types\n')]
# Unit test configuration file for MessageLogger service: # Suppression based on minimum severity level. # (This is part A - verify that the suppression occurs. # u35 is part B - verifying that suppression does not occur if any threshold # is low enough to not suppress.) # import FWCore.ParameterSet.Config as cms pro...
[ "FWCore.ParameterSet.Config.untracked.int32", "FWCore.ParameterSet.Config.untracked.vstring", "FWCore.ParameterSet.Config.untracked.string", "FWCore.ParameterSet.Config.untracked.bool", "FWCore.ParameterSet.Config.Process", "FWCore.ParameterSet.Config.Source", "FWCore.ParameterSet.Config.EDAnalyzer", ...
[((327, 346), 'FWCore.ParameterSet.Config.Process', 'cms.Process', (['"""TEST"""'], {}), "('TEST')\n", (338, 346), True, 'import FWCore.ParameterSet.Config as cms\n'), ((890, 915), 'FWCore.ParameterSet.Config.Source', 'cms.Source', (['"""EmptySource"""'], {}), "('EmptySource')\n", (900, 915), True, 'import FWCore.Param...
#! /usr/bin/env python3 """与加载了RNN Classifier导出的Servable的TensorFlow Serving进行通信 """ import numpy as np import jieba import tensorlayer as tl from grpc.beta import implementations import predict_pb2 import prediction_service_pb2 from packages import text_regularization as tr def text_tensor(text, wv): """获取文本向量 ...
[ "tensorlayer.files.load_npy_to_any", "jieba.cut", "prediction_service_pb2.beta_create_PredictionService_stub", "predict_pb2.PredictRequest", "numpy.asarray", "packages.text_regularization.extractWords" ]
[((965, 1039), 'tensorlayer.files.load_npy_to_any', 'tl.files.load_npy_to_any', ([], {'name': '"""../word2vec/output/model_word2vec_200.npy"""'}), "(name='../word2vec/output/model_word2vec_200.npy')\n", (989, 1039), True, 'import tensorlayer as tl\n'), ((1143, 1209), 'prediction_service_pb2.beta_create_PredictionServic...
from PyQt5 import QtGui from PyQt5.QtWidgets import QApplication, QWidget, QHBoxLayout, QLabel, QPushButton, QButtonGroup import sys from PyQt5 import QtCore class Window(QWidget): def __init__(self): super().__init__() self.title = "PyQt5 QButton Group" self.top = 200 self.left = ...
[ "PyQt5.QtWidgets.QLabel", "PyQt5.QtGui.QIcon", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtCore.QSize", "PyQt5.QtGui.QFont", "PyQt5.QtWidgets.QApplication", "PyQt5.QtWidgets.QButtonGroup" ]
[((1950, 1972), 'PyQt5.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (1962, 1972), False, 'from PyQt5.QtWidgets import QApplication, QWidget, QHBoxLayout, QLabel, QPushButton, QButtonGroup\n'), ((553, 566), 'PyQt5.QtWidgets.QHBoxLayout', 'QHBoxLayout', ([], {}), '()\n', (564, 566), False,...
import numpy as np import tensorflow as tf def mmd_penalty(sample_qz, sample_pz, pz_scale, kernel='RBF'): sigma2_p = pz_scale ** 2 n, d = sample_pz.get_shape().as_list() n = tf.cast(n, tf.int32) nf = tf.cast(n, tf.float32) half_size = (n * n - n) / 2 norms_pz = tf.reduce_sum(tf.square(sample_p...
[ "tensorflow.reduce_sum", "tensorflow.random.normal", "tensorflow.global_variables_initializer", "tensorflow.eye", "tensorflow.Session", "tensorflow.transpose", "tensorflow.cast", "tensorflow.matmul", "tensorflow.Variable", "tensorflow.exp", "numpy.linspace", "tensorflow.square" ]
[((187, 207), 'tensorflow.cast', 'tf.cast', (['n', 'tf.int32'], {}), '(n, tf.int32)\n', (194, 207), True, 'import tensorflow as tf\n'), ((217, 239), 'tensorflow.cast', 'tf.cast', (['n', 'tf.float32'], {}), '(n, tf.float32)\n', (224, 239), True, 'import tensorflow as tf\n'), ((366, 415), 'tensorflow.matmul', 'tf.matmul'...
from theatre_ag.theatre_ag.actor import Actor as TheatreActor from theatre_ag.theatre_ag.task import Task from .Constraints import Deadline, ResourceDelta from .Responsibilities import Responsibility, Obligation from abc import ABCMeta from .utility_functions import mean from .Responsibilities import Act, Responsibilit...
[ "theatre_ag.theatre_ag.task.Task", "copy.copy", "random.choice" ]
[((1358, 1371), 'copy.copy', 'copy', (['notions'], {}), '(notions)\n', (1362, 1371), False, 'from copy import copy\n'), ((1430, 1443), 'copy.copy', 'copy', (['notions'], {}), '(notions)\n', (1434, 1443), False, 'from copy import copy\n'), ((3070, 3080), 'copy.copy', 'copy', (['resp'], {}), '(resp)\n', (3074, 3080), Fal...
from sqlalchemy.sql.functions import func from model.db import db import json from controller.logicTopoBasin import LogicTopoBasin from controller.logicTopoLivingArea import LogicTopoLivingArea from controller.logicTopoAgricultureArea import LogicTopoAgricultureArea from controller.logicTopoWaterwork import LogicTopoWa...
[ "controller.logicTopoWaterin.LogicTopoWaterin", "controller.logicTopoSewageTreatmentPlant.LogicTopoSewageTreatmentPlant", "controller.logicTopoCatchment.LogicTopoCatchment", "controller.logicTopoPollution.LogicTopoPollution", "controller.logicTopoLivingArea.LogicTopoLivingArea", "model.db.db.engine.execut...
[((1255, 1277), 'model.db.db.engine.execute', 'db.engine.execute', (['sql'], {}), '(sql)\n', (1272, 1277), False, 'from model.db import db\n'), ((1522, 1544), 'model.db.db.engine.execute', 'db.engine.execute', (['sql'], {}), '(sql)\n', (1539, 1544), False, 'from model.db import db\n'), ((9502, 9540), 'controller.util.G...
from os import path from lxml import objectify, etree class Repo: def __init__(self, extension): self._extension = extension def filepath(self, drawing, location): return path.join(location, '{}.{}'.format(drawing.name, self._extension)) def as_svg(drawing): E = objectify.ElementMaker(annotate=False, ...
[ "lxml.etree.ElementTree", "lxml.objectify.ElementMaker" ]
[((281, 453), 'lxml.objectify.ElementMaker', 'objectify.ElementMaker', ([], {'annotate': '(False)', 'namespace': '"""http://www.w3.org/2000/svg"""', 'nsmap': "{None: 'http://www.w3.org/2000/svg', 'xlink': 'http://www.w3.org/1999/xlink'}"}), "(annotate=False, namespace=\n 'http://www.w3.org/2000/svg', nsmap={None: 'h...
# # Copyright 2016 NVIDIA 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 law or agreed to in ...
[ "tensorflow.train.shuffle_batch", "tensorflow.reshape", "tensorflow.decode_raw", "tensorflow.matmul", "tensorflow.Variable", "tensorflow.nn.conv2d", "tensorflow.nn.conv2d_transpose", "tensorflow.layers.batch_normalization", "tensorflow.get_variable", "sys.path.append", "tensorflow.nn.relu", "t...
[((765, 791), 'sys.path.append', 'sys.path.append', (['"""../util"""'], {}), "('../util')\n", (780, 791), False, 'import sys\n'), ((992, 1011), 'tensorflow.TFRecordReader', 'tf.TFRecordReader', ([], {}), '()\n', (1009, 1011), True, 'import tensorflow as tf\n'), ((1563, 1600), 'tensorflow.cast', 'tf.cast', (["features['...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals from django.db.models import ForeignKey from django.urls import Resolver404, resolve from django.utils.translation import get_language_from_request, override from cms.apphook_pool import apphook_pool from app_data import...
[ "app_data.AppDataContainer.from_form", "cms.apphook_pool.apphook_pool.get_apphook", "django.utils.translation.get_language_from_request", "django.urls.resolve" ]
[((806, 869), 'cms.apphook_pool.apphook_pool.get_apphook', 'apphook_pool.get_apphook', (['request.current_page.application_urls'], {}), '(request.current_page.application_urls)\n', (830, 869), False, 'from cms.apphook_pool import apphook_pool\n'), ((1864, 1902), 'app_data.AppDataContainer.from_form', 'AppDataContainer....
import Utilities.HypixelAPI as HypixelAPI import Utilities.MojangAPI as MojangAPI import Utilities.Weights.playerStore as playerStore from Constants import * from dotenv import load_dotenv, dotenv_values import json import os load_dotenv() API_KEY = dotenv_values('.env')["API_KEY"] BASE_DIR = os.path.dirname...
[ "json.load", "Utilities.Weights.playerStore.storePlayerScore", "os.path.realpath", "Utilities.HypixelAPI.getStrandedData", "dotenv.load_dotenv", "Utilities.MojangAPI.getUUIDFromUsername", "dotenv.dotenv_values" ]
[((235, 248), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (246, 248), False, 'from dotenv import load_dotenv, dotenv_values\n'), ((260, 281), 'dotenv.dotenv_values', 'dotenv_values', (['""".env"""'], {}), "('.env')\n", (273, 281), False, 'from dotenv import load_dotenv, dotenv_values\n'), ((321, 347), 'os.pa...
# -*- coding: utf-8 -*- import os import time import gym import numpy as np import matplotlib.pyplot as plt from gym.envs.classic_control.cartpole import * from gym.envs.mujoco import * import pandas as pd # from gym.envs.registration import * # from gym.wrappers.time_limit import TimeLimit env_name = 'Walker2d-v2' e...
[ "gym.make", "time.sleep" ]
[((325, 343), 'gym.make', 'gym.make', (['env_name'], {}), '(env_name)\n', (333, 343), False, 'import gym\n'), ((742, 755), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (752, 755), False, 'import time\n')]
import sys from argparse import ArgumentParser, Namespace from logging import basicConfig, DEBUG, INFO, ERROR, info, error from typing import List from pyerge import tmerge, utils, __version__ def run_parser() -> None: """ Function to collect command line arguments. Construct main object with correct se...
[ "logging.error", "argparse.ArgumentParser", "logging.basicConfig", "pyerge.tmerge.is_portage_running", "pyerge.utils.set_portage_tmpdir", "pyerge.tmerge.run_check", "pyerge.utils.is_internet_connected", "pyerge.utils.handling_mounting", "logging.info", "pyerge.utils.unmounttmpfs", "pyerge.tmerge...
[((358, 416), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '"""Emerge in temporary RAM disk"""'}), "(description='Emerge in temporary RAM disk')\n", (372, 416), False, 'from argparse import ArgumentParser, Namespace\n'), ((1760, 1838), 'logging.basicConfig', 'basicConfig', ([], {'format': '"""%(asc...
from pouring_base import Pouring_base from gym import spaces from scipy.spatial.transform import Rotation as R from collections import deque import math import numpy as np import os,sys FILE_PATH = os.path.abspath(os.path.dirname(__file__)) class Pouring_featured(Pouring_base): """A concrete water-pouring gym envi...
[ "os.path.dirname", "numpy.array", "gym.spaces.Box", "scipy.spatial.transform.Rotation.from_matrix" ]
[((215, 240), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (230, 240), False, 'import os, sys\n'), ((1024, 1062), 'gym.spaces.Box', 'spaces.Box', ([], {'low': '(-1)', 'high': '(1)', 'shape': '(3,)'}), '(low=-1, high=1, shape=(3,))\n', (1034, 1062), False, 'from gym import spaces\n'), ((1094...
from flask import abort, flash, redirect, url_for from flask_login import current_user from dmutils.flask import timed_render_template as render_template from app import data_api_client from .. import main from ..helpers.buyers_helpers import ( get_framework_and_lot, is_brief_correct, ) BRIEF_WITHDRAWN_MESSA...
[ "app.data_api_client.get_brief", "flask.abort", "app.data_api_client.withdraw_brief", "flask.url_for", "dmutils.flask.timed_render_template" ]
[((1592, 1660), 'app.data_api_client.withdraw_brief', 'data_api_client.withdraw_brief', (['brief_id', 'current_user.email_address'], {}), '(brief_id, current_user.email_address)\n', (1622, 1660), False, 'from app import data_api_client\n'), ((761, 796), 'app.data_api_client.get_brief', 'data_api_client.get_brief', (['b...
## Conversion from Ocean to Numpy import pyOcean_cpu as ocean import ocean_numpy import numpy as np A = ocean.asTensor([[1,2,3],[4,5,6]], ocean.float) B = A.convertTo('numpy', True) A.fill(3) print(B) print(B.dtype) A = ocean.asTensor([[1,2,3],[4,5,6]], ocean.float) A.byteswap() B = A.convertTo('numpy', True) print...
[ "pyOcean_cpu.asTensor" ]
[((105, 156), 'pyOcean_cpu.asTensor', 'ocean.asTensor', (['[[1, 2, 3], [4, 5, 6]]', 'ocean.float'], {}), '([[1, 2, 3], [4, 5, 6]], ocean.float)\n', (119, 156), True, 'import pyOcean_cpu as ocean\n'), ((223, 274), 'pyOcean_cpu.asTensor', 'ocean.asTensor', (['[[1, 2, 3], [4, 5, 6]]', 'ocean.float'], {}), '([[1, 2, 3], [4...
#!/usr/bin/env python """ This portion of code ingests data on driving time and distance from google API and saves the data as json files. """ import os import json import requests import urllib2 import requests #def main(): api_key = "<KEY>" ## pull the above API key from folder name in this URL https://drive.googl...
[ "json.dump", "json.dumps" ]
[((879, 907), 'json.dump', 'json.dump', (['data', 'f'], {'indent': '(2)'}), '(data, f, indent=2)\n', (888, 907), False, 'import json\n'), ((1292, 1320), 'json.dump', 'json.dump', (['data', 'f'], {'indent': '(2)'}), '(data, f, indent=2)\n', (1301, 1320), False, 'import json\n'), ((1706, 1734), 'json.dump', 'json.dump', ...
from setuptools import setup setup(name='py2ifttt', version='1.0.0', description='an interface for triggering ifttt webhooks', long_description='an interface for triggering ifttt webhooks, http://github.com/moevis/py2ifttt', url='http://github.com/moevis/py2ifttt', author='moevis', ...
[ "setuptools.setup" ]
[((30, 415), 'setuptools.setup', 'setup', ([], {'name': '"""py2ifttt"""', 'version': '"""1.0.0"""', 'description': '"""an interface for triggering ifttt webhooks"""', 'long_description': '"""an interface for triggering ifttt webhooks, http://github.com/moevis/py2ifttt"""', 'url': '"""http://github.com/moevis/py2ifttt""...
import altair as alt from vega_datasets import data cars = data.cars() print(cars.columns) cars.head()
[ "vega_datasets.data.cars" ]
[((61, 72), 'vega_datasets.data.cars', 'data.cars', ([], {}), '()\n', (70, 72), False, 'from vega_datasets import data\n')]
import re import collections from ..css_abbreviation import parse, tokens, CSSValue, FunctionCall re_property = re.compile(r'^([a-z-]+)(?:\s*:\s*([^\n\r;]+?);*)?$') opt = {'value': True} class CSSSnippetType: Raw = 'Raw' Property = 'Property' class CSSSnippetRaw: __slots__ = ('type', 'key', 'value') ...
[ "collections.OrderedDict", "re.compile" ]
[((114, 169), 're.compile', 're.compile', (['"""^([a-z-]+)(?:\\\\s*:\\\\s*([^\\\\n\\\\r;]+?);*)?$"""'], {}), "('^([a-z-]+)(?:\\\\s*:\\\\s*([^\\\\n\\\\r;]+?);*)?$')\n", (124, 169), False, 'import re\n'), ((1192, 1217), 'collections.OrderedDict', 'collections.OrderedDict', ([], {}), '()\n', (1215, 1217), False, 'import c...
"""TensorFlow has two major kinds of "shape" - The Static Shape - The Dynamic Shape """ # To ignore tensorflow version warning import warnings warnings.filterwarnings("ignore") import tensorflow as tf print(tf.VERSION) # Demo: TF Static Shape my_tensor = tf.ones(shape=[8, 2]) print('my_tensor = {}'.format(my_tensor)...
[ "tensorflow.ones", "warnings.filterwarnings", "tensorflow.reshape", "tensorflow.Session", "tensorflow.placeholder", "tensorflow.shape" ]
[((144, 177), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (167, 177), False, 'import warnings\n'), ((258, 279), 'tensorflow.ones', 'tf.ones', ([], {'shape': '[8, 2]'}), '(shape=[8, 2])\n', (265, 279), True, 'import tensorflow as tf\n'), ((658, 707), 'tensorflow.placehol...
# -*- coding: utf-8 -*- from __future__ import ( absolute_import, division, print_function, unicode_literals) from django.test import TestCase from mock import patch from urllib3._collections import HTTPHeaderDict from readthedocs.builds.models import Version from readthedocs.projects.models import Project from r...
[ "readthedocs.projects.models.Project.objects.get", "mock.patch.object", "urllib3._collections.HTTPHeaderDict", "readthedocs.docsitalia.models.PublisherProject.objects.create", "mock.patch", "readthedocs.builds.models.Version.objects.create", "readthedocs.docsitalia.models.Publisher.objects.create", "r...
[((1286, 1422), 'mock.patch', 'patch', (['"""elasticsearch.connection.http_urllib3.Urllib3HttpConnection.perform_request"""'], {'side_effect': 'perform_request_project_mock'}), "(\n 'elasticsearch.connection.http_urllib3.Urllib3HttpConnection.perform_request'\n , side_effect=perform_request_project_mock)\n", (129...
import wikipedia import wolframalpha import wx import pyttsx3 import speech_recognition as sr engine = pyttsx3.init() class MyFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, pos=wx.DefaultPosition, size=wx.Size(550, 100), style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU |...
[ "wx.BoxSizer", "pyttsx3.init", "wx.Panel", "speech_recognition.Microphone", "wx.StaticText", "wx.TextCtrl", "wx.App", "wolframalpha.Client", "wikipedia.summary", "wx.Size", "speech_recognition.Recognizer" ]
[((105, 119), 'pyttsx3.init', 'pyttsx3.init', ([], {}), '()\n', (117, 119), False, 'import pyttsx3\n'), ((2307, 2319), 'wx.App', 'wx.App', (['(True)'], {}), '(True)\n', (2313, 2319), False, 'import wx\n'), ((422, 436), 'wx.Panel', 'wx.Panel', (['self'], {}), '(self)\n', (430, 436), False, 'import wx\n'), ((456, 480), '...
''' Functions to call appropriate constructor functions based on UI data and to link decoder objects in the database ''' import os import re import tempfile import xmlrpc.client import pickle import json import logging import numpy as np from celery import task, chain from django.http import HttpResponse from riglib....
[ "tempfile.NamedTemporaryFile", "pickle.dump", "riglib.bmi.train.rescale_KFDecoder_units", "riglib.bmi.sskfdecoder.SteadyStateKalmanFilter", "celery.chain", "os.path.basename", "riglib.bmi.sskfdecoder.SSKFDecoder", "riglib.bmi.train._interpolate_KFDecoder_state_between_updates", "numpy.array", "rig...
[((2464, 2500), 're.compile', 're.compile', (['"""(\\\\d{1,3})\\\\s*(\\\\w{1})"""'], {}), "('(\\\\d{1,3})\\\\s*(\\\\w{1})')\n", (2474, 2500), False, 'import re\n'), ((6088, 6121), 'tempfile.NamedTemporaryFile', 'tempfile.NamedTemporaryFile', (['"""wb"""'], {}), "('wb')\n", (6115, 6121), False, 'import tempfile\n'), ((6...
import sys import os sys.path.append(os.path.abspath("../")) import torch import numpy as np import torch.nn as nn from torch import multiprocessing, cuda from misc import torchutils, indexing, imutils from data.chexpert_dataset_irnet import CheXpertTestCAMDatasetIRNet from torch.utils.data import DataLoader from con...
[ "os.path.abspath", "data.chexpert_dataset_irnet.CheXpertTestCAMDatasetIRNet", "tqdm.tqdm", "os.path.join", "torch.sum", "args.train_arg_parser_irnet.TrainArgParserIRNet", "os.cpu_count", "torch.cuda.is_available", "torch.no_grad", "torch.cuda.device" ]
[((37, 59), 'os.path.abspath', 'os.path.abspath', (['"""../"""'], {}), "('../')\n", (52, 59), False, 'import os\n'), ((636, 665), 'data.chexpert_dataset_irnet.CheXpertTestCAMDatasetIRNet', 'CheXpertTestCAMDatasetIRNet', ([], {}), '()\n', (663, 665), False, 'from data.chexpert_dataset_irnet import CheXpertTestCAMDataset...
""" PREPARE Before running train, you need to run prepare.py with the respective task. Example (in the command line): > cd to root dir > conda activate nlp > python src/prepare.py --do_format --task 1 """ #NOTE: the following is a workaround for AML to load modules import os, sys; sys.path.append(os.path.dirname(os.p...
[ "argparse.ArgumentParser", "helper.load_spacy_model", "custom.filter_qa", "custom.load_qa", "helper.get_logger", "sys.path.append", "pandas.DataFrame", "re.sub", "pandas.concat", "os.path.realpath", "custom.load_text", "pandas.Series", "data.Data", "helper.remove_short", "custom.get_plac...
[((537, 561), 'sys.path.append', 'sys.path.append', (['"""./src"""'], {}), "('./src')\n", (552, 561), False, 'import sys\n'), ((630, 662), 'helper.get_logger', 'he.get_logger', ([], {'location': '__name__'}), '(location=__name__)\n', (643, 662), True, 'import helper as he\n'), ((11464, 11482), 'custom.load_text', 'cu.l...
from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec from hazelcast.protocol.builtin import DataCodec from hazelcast.protocol.builtin import ListMultiFrameCodec # hex: 0x012700 _REQUEST_MESSAGE_TYPE = 75520 # hex: 0...
[ "hazelcast.protocol.builtin.DataCodec.encode", "hazelcast.protocol.builtin.StringCodec.encode", "hazelcast.protocol.client_message.create_initial_buffer", "hazelcast.protocol.builtin.ListMultiFrameCodec.decode", "hazelcast.protocol.client_message.OutboundMessage" ]
[((459, 532), 'hazelcast.protocol.client_message.create_initial_buffer', 'create_initial_buffer', (['_REQUEST_INITIAL_FRAME_SIZE', '_REQUEST_MESSAGE_TYPE'], {}), '(_REQUEST_INITIAL_FRAME_SIZE, _REQUEST_MESSAGE_TYPE)\n', (480, 532), False, 'from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SI...
# Copyright 2017 Google Inc. # # 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 agreed to in writing, ...
[ "tensorflow.gfile.Glob", "tensorflow.logging.info", "six.moves.xrange", "tensor2tensor.data_generators.tokenizer.Tokenizer", "tensorflow.gfile.Open", "six.iteritems" ]
[((4773, 4794), 'tensor2tensor.data_generators.tokenizer.Tokenizer', 'tokenizer.Tokenizer', ([], {}), '()\n', (4792, 4794), False, 'from tensor2tensor.data_generators import tokenizer\n'), ((8304, 8358), 'tensorflow.logging.info', 'tf.logging.info', (["('Trying min_count %d' % present_count)"], {}), "('Trying min_count...
import numpy as np import cv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg import glob import sys import os import pickle def extract_points(images): ''' args: - images: list of strings containing the filenames of the calibration image set returns: - mtx: camera ...
[ "cv2.findChessboardCorners", "matplotlib.image.imread", "os.makedirs", "cv2.cvtColor", "numpy.zeros", "cv2.imread", "cv2.calibrateCamera", "glob.glob", "cv2.undistort" ]
[((398, 430), 'numpy.zeros', 'np.zeros', (['(6 * 9, 3)', 'np.float32'], {}), '((6 * 9, 3), np.float32)\n', (406, 430), True, 'import numpy as np\n'), ((844, 917), 'cv2.calibrateCamera', 'cv2.calibrateCamera', (['obj_points', 'img_points', 'gray.shape[::-1]', 'None', 'None'], {}), '(obj_points, img_points, gray.shape[::...
# coding: utf-8 #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------------...
[ "pytest.raises", "azure.common.credentials._CliCredentials", "mock.patch", "time.time" ]
[((1007, 1057), 'azure.common.credentials._CliCredentials', '_CliCredentials', (['cli_profile', '"""http://resource.id"""'], {}), "(cli_profile, 'http://resource.id')\n", (1022, 1057), False, 'from azure.common.credentials import _CliCredentials\n'), ((1487, 1537), 'azure.common.credentials._CliCredentials', '_CliCrede...