code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import json import time import gevent import requests.exceptions from lib.ai import grequests from lib.ai.local import create_local_snake from lib.ai.serializers import serialize_game from lib.log import get_logger DEFAULT_TIMEOUT_SECONDS = 1.0 logger = get_logger(__name__) class AIResponse(object): """ ...
[ "lib.ai.serializers.serialize_game", "lib.log.get_logger", "lib.ai.grequests.map", "lib.ai.grequests.get", "lib.ai.local.create_local_snake", "json.dumps", "gevent.Timeout", "time.time" ]
[((259, 279), 'lib.log.get_logger', 'get_logger', (['__name__'], {}), '(__name__)\n', (269, 279), False, 'from lib.log import get_logger\n'), ((3325, 3336), 'time.time', 'time.time', ([], {}), '()\n', (3334, 3336), False, 'import time\n'), ((3353, 3409), 'lib.ai.grequests.map', 'grequests.map', (['reqs'], {'exception_h...
#!/usr/bin/env python3 """ Author : taniya <https://github.com/tas09009> Date : 2020-10-12 Purpose: Thredup scrape """ import requests import time import random from bs4 import BeautifulSoup import pandas as pd from alive_progress import alive_bar # -------------------------------------------------- """ Define inpu...
[ "pandas.read_csv", "random.randrange", "requests.get", "bs4.BeautifulSoup", "pandas.DataFrame" ]
[((1028, 1050), 'requests.get', 'requests.get', (['url_page'], {}), '(url_page)\n', (1040, 1050), False, 'import requests\n'), ((1077, 1120), 'bs4.BeautifulSoup', 'BeautifulSoup', (['response.text', '"""html.parser"""'], {}), "(response.text, 'html.parser')\n", (1090, 1120), False, 'from bs4 import BeautifulSoup\n'), (...
#!/usr/bin/env python3 import os from xxpystuff.pyside2 import Resource, UiFile def main(): resource = Resource() for entry in os.scandir(): if not entry.is_file(): continue if entry.name.endswith('.svg'): print('RC: ' + entry.name) resource.append(entry....
[ "os.scandir", "xxpystuff.pyside2.Resource" ]
[((111, 121), 'xxpystuff.pyside2.Resource', 'Resource', ([], {}), '()\n', (119, 121), False, 'from xxpystuff.pyside2 import Resource, UiFile\n'), ((139, 151), 'os.scandir', 'os.scandir', ([], {}), '()\n', (149, 151), False, 'import os\n')]
import signal import os import random def get_n_running_proc(procs): statuses = [proc.poll() for proc in procs] n_proc = sum([1 for st in statuses if st is None]) # None from proc.poll() means that process is still running return n_proc def get_n_gpu_proc(gpu): gpu_command = """nvidia-smi -g """ + ...
[ "os.popen" ]
[((405, 426), 'os.popen', 'os.popen', (['gpu_command'], {}), '(gpu_command)\n', (413, 426), False, 'import os\n')]
import math as math import pandas as pd import csv import matplotlib as plt data = pd.read_csv('data/data_cocktails.csv') print(data)
[ "pandas.read_csv" ]
[((86, 124), 'pandas.read_csv', 'pd.read_csv', (['"""data/data_cocktails.csv"""'], {}), "('data/data_cocktails.csv')\n", (97, 124), True, 'import pandas as pd\n')]
import pytest import numpy as np def assert_equal(arr, arr2): assert np.array_equal(arr, arr2) assert arr.dtype == arr2.dtype def test_bulk_importer_ndarray(repo): from hangar.bulk_importer import run_bulk_import from hangar.bulk_importer import UDF_Return def make_ndarray(column, key, shape, d...
[ "numpy.prod", "hangar.bulk_importer.run_bulk_import", "hangar.bulk_importer.UDF_Return", "numpy.array_equal", "pytest.raises", "numpy.arange" ]
[((75, 100), 'numpy.array_equal', 'np.array_equal', (['arr', 'arr2'], {}), '(arr, arr2)\n', (89, 100), True, 'import numpy as np\n'), ((1041, 1157), 'hangar.bulk_importer.run_bulk_import', 'run_bulk_import', (['repo'], {'branch_name': '"""master"""', 'column_names': "['arr']", 'udf': 'make_ndarray', 'udf_kwargs': 'kwar...
# -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import inspect import numpy as np import pprint from abc import ABCMeta, abstractmethod from fvcore.transforms.transform import Transform, TransformList __all__ = ["TransformGen", "apply_transform_gens"] def check_dtype(i...
[ "inspect.signature", "fvcore.transforms.transform.TransformList", "pprint.pformat", "numpy.random.uniform" ]
[((1884, 1918), 'numpy.random.uniform', 'np.random.uniform', (['low', 'high', 'size'], {}), '(low, high, size)\n', (1901, 1918), True, 'import numpy as np\n'), ((4193, 4212), 'fvcore.transforms.transform.TransformList', 'TransformList', (['tfms'], {}), '(tfms)\n', (4206, 4212), False, 'from fvcore.transforms.transform ...
import logging from typing import Dict, Any from functools import lru_cache from lxml import etree from batchout.core.config import with_config_key from batchout.core.mixin import WithStrategy from batchout.core.registry import Registry from batchout.extractors import Extractor log = logging.getLogger(__name__) c...
[ "logging.getLogger", "lxml.etree.XPath", "batchout.core.registry.Registry.bind", "batchout.core.config.with_config_key", "functools.lru_cache", "lxml.etree.iselement" ]
[((289, 316), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (306, 316), False, 'import logging\n'), ((377, 433), 'batchout.core.config.with_config_key', 'with_config_key', (['"""html"""'], {'default': '(False)', 'yn': '(True, False)'}), "('html', default=False, yn=(True, False))\n", (392...
import subprocess import sys import os import shutil if os.path.isdir("docs/source/api"): shutil.rmtree("docs/source/api") providers = [] for folder in os.listdir("pyunity/window/providers"): path = os.path.join("pyunity/window/providers", folder) if os.path.isdir(path): providers.append(path) re...
[ "os.listdir", "os.path.join", "os.path.isdir", "subprocess.call", "shutil.rmtree", "os.system" ]
[((57, 89), 'os.path.isdir', 'os.path.isdir', (['"""docs/source/api"""'], {}), "('docs/source/api')\n", (70, 89), False, 'import os\n'), ((158, 196), 'os.listdir', 'os.listdir', (['"""pyunity/window/providers"""'], {}), "('pyunity/window/providers')\n", (168, 196), False, 'import os\n'), ((327, 569), 'subprocess.call',...
#!/usr/bin/env python3 import requests def get_position_from_spi(date_str): auth = (user, password) params = {'date': date_str} r = requests.get('https://scdm-ace.swisspolar.ch/api/position', params=params, auth=auth) result = r.json() return result['latitude'], result['longitude'] position = get_po...
[ "requests.get" ]
[((144, 233), 'requests.get', 'requests.get', (['"""https://scdm-ace.swisspolar.ch/api/position"""'], {'params': 'params', 'auth': 'auth'}), "('https://scdm-ace.swisspolar.ch/api/position', params=params,\n auth=auth)\n", (156, 233), False, 'import requests\n')]
#=============================================================================# # # # MODIFIED: 27-Jun-2018 by <NAME> # # # #===...
[ "imutils.resize", "cv2.copyMakeBorder", "cv2.resize" ]
[((1013, 1084), 'cv2.copyMakeBorder', 'cv2.copyMakeBorder', (['image', 'padH', 'padH', 'padW', 'padW', 'cv2.BORDER_REPLICATE'], {}), '(image, padH, padH, padW, padW, cv2.BORDER_REPLICATE)\n', (1031, 1084), False, 'import cv2\n'), ((1128, 1162), 'cv2.resize', 'cv2.resize', (['image', '(width, height)'], {}), '(image, (w...
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -------------------------------------------------------------------...
[ "logging.info", "datetime.datetime.utcnow" ]
[((5048, 5196), 'logging.info', 'logging.info', (['f"""Using {LAST_CHECKPOINT_FILE_NAME_WITH_SUFFIX} as the best checkpoint: Renaming to {BEST_CHECKPOINT_FILE_NAME_WITH_SUFFIX}"""'], {}), "(\n f'Using {LAST_CHECKPOINT_FILE_NAME_WITH_SUFFIX} as the best checkpoint: Renaming to {BEST_CHECKPOINT_FILE_NAME_WITH_SUFFIX}'...
#!/usr/bin/env python3 import argparse import logging import sys import os import time from multiprocessing import Process from concurrent.futures import ThreadPoolExecutor from pathlib import Path from kube_env import setup_application_deployment, stop_kubernetes from benchmark.benchmark import start_benchmark import ...
[ "logging.getLogger", "logging.StreamHandler", "argparse.ArgumentParser", "pathlib.Path", "logging.Formatter", "kube_env.stop_kubernetes", "time.sleep", "kube_env.setup_application_deployment", "benchmark.benchmark.start_benchmark" ]
[((362, 389), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (379, 389), False, 'import logging\n'), ((1783, 1839), 'kube_env.setup_application_deployment', 'setup_application_deployment', (['platform', 'multizonal', '"""BK"""'], {}), "(platform, multizonal, 'BK')\n", (1811, 1839), False,...
# # ------------------------------------------------------------------------- # Copyright (C) 2019 IBM. # # 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...
[ "unittest.main", "conductor.common.models.order_lock_history.OrderLockHistory" ]
[((1626, 1641), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1639, 1641), False, 'import unittest\n'), ((989, 1007), 'conductor.common.models.order_lock_history.OrderLockHistory', 'OrderLockHistory', ([], {}), '()\n', (1005, 1007), False, 'from conductor.common.models.order_lock_history import OrderLockHistory\...
# # Demo generator: you can do anything in make_case, complex calculation for # case parameters, complex string manipulation, generation files, etc. The # conf_root, dest_root and vpath will be passed so you know where all your # files are. # from collections import OrderedDict def make_case(conf_root, output_root,...
[ "collections.OrderedDict" ]
[((707, 764), 'collections.OrderedDict', 'OrderedDict', ([], {'cmd': 'cmd', 'envs': 'envs', 'run': 'run', 'results': 'results'}), '(cmd=cmd, envs=envs, run=run, results=results)\n', (718, 764), False, 'from collections import OrderedDict\n')]
from sqlalchemy import Column, Integer, ForeignKey, Table from ... import Base google_scope_uri_correlation = Table( "google_scope_uri_correlation", Base.metadata, Column( "scope_uri_id", ForeignKey("google_scope_uri.id", ondelete="CASCADE", onupdate="CASCADE"), primary_key=True, ...
[ "sqlalchemy.ForeignKey" ]
[((217, 290), 'sqlalchemy.ForeignKey', 'ForeignKey', (['"""google_scope_uri.id"""'], {'ondelete': '"""CASCADE"""', 'onupdate': '"""CASCADE"""'}), "('google_scope_uri.id', ondelete='CASCADE', onupdate='CASCADE')\n", (227, 290), False, 'from sqlalchemy import Column, Integer, ForeignKey, Table\n'), ((365, 434), 'sqlalche...
from typing import Dict, Optional, List from maggma.builders.map_builder import MapBuilder from maggma.core import Store from pymatgen.core.structure import Structure from emmet.core.robocrys import RobocrystallogapherDoc from emmet.core.utils import jsanitize class RobocrystallographerBuilder(MapBuilder): def _...
[ "emmet.core.robocrys.RobocrystallogapherDoc.from_structure", "pymatgen.core.structure.Structure.from_dict" ]
[((940, 978), 'pymatgen.core.structure.Structure.from_dict', 'Structure.from_dict', (["item['structure']"], {}), "(item['structure'])\n", (959, 978), False, 'from pymatgen.core.structure import Structure\n'), ((1069, 1183), 'emmet.core.robocrys.RobocrystallogapherDoc.from_structure', 'RobocrystallogapherDoc.from_struct...
""" API operations on a sample tracking system. """ import logging from galaxy import util, web from galaxy.web.base.controller import * from galaxy.model.orm import * from galaxy.util.bunch import Bunch log = logging.getLogger( __name__ ) class RequestsAPIController( BaseAPIController ): _update_types = Bunch( R...
[ "logging.getLogger", "galaxy.util.Params", "galaxy.util.bunch.Bunch" ]
[((211, 238), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (228, 238), False, 'import logging\n'), ((312, 342), 'galaxy.util.bunch.Bunch', 'Bunch', ([], {'REQUEST': '"""request_state"""'}), "(REQUEST='request_state')\n", (317, 342), False, 'from galaxy.util.bunch import Bunch\n'), ((296...
import unittest from unittest import TestCase from transformers import BertConfig, BertForQuestionAnswering from nn_pruning.model_structure import BertStructure from nn_pruning.modules.masked_nn import ( ChannelPruningModulePatcher, JointPruningModulePatcher, LinearPruningArgs, LinearPruningModulePatc...
[ "nn_pruning.modules.masked_nn.LinearPruningModulePatcher", "transformers.BertForQuestionAnswering", "transformers.BertConfig.from_pretrained", "nn_pruning.training_patcher.LinearModelPatcher", "nn_pruning.modules.masked_nn.ChannelPruningModulePatcher", "nn_pruning.modules.masked_nn.JointPruningModulePatch...
[((5414, 5429), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5427, 5429), False, 'import unittest\n'), ((530, 577), 'transformers.BertConfig.from_pretrained', 'BertConfig.from_pretrained', (['"""bert-base-uncased"""'], {}), "('bert-base-uncased')\n", (556, 577), False, 'from transformers import BertConfig, Bert...
from blockdev import Blockdev from dmtable import Table class DmOrigin(Table): """ Snapshot-origin based on device mapper. """ def __init__(self, name, root_helper=''): super(DmOrigin, self).__init__(name, 'snapshot-origin', root_helper=root_helper) if self.existed: self._...
[ "blockdev.Blockdev" ]
[((1016, 1054), 'blockdev.Blockdev', 'Blockdev', ([], {'root_helper': 'self.root_helper'}), '(root_helper=self.root_helper)\n', (1024, 1054), False, 'from blockdev import Blockdev\n')]
import datetime from random import random from time import sleep import requests import tensorflow.compat.v1 as tf from geopy.geocoders import Nominatim tf.disable_v2_behavior() import json import os from time import time from PIL import Image import person_detector from config import (JSON_LOGS_FOLDER, PROFILES_FILE, ...
[ "PIL.Image.open", "tensorflow.compat.v1.disable_v2_behavior", "os.makedirs", "tensorflow.compat.v1.config.experimental.list_physical_devices", "datetime.datetime.strptime", "tensorflow.compat.v1.config.experimental.set_memory_growth", "geopy.geocoders.Nominatim", "tensorflow.compat.v1.config.experimen...
[((153, 177), 'tensorflow.compat.v1.disable_v2_behavior', 'tf.disable_v2_behavior', ([], {}), '()\n', (175, 177), True, 'import tensorflow.compat.v1 as tf\n'), ((540, 567), 'geopy.geocoders.Nominatim', 'Nominatim', ([], {'user_agent': '"""bot"""'}), "(user_agent='bot')\n", (549, 567), False, 'from geopy.geocoders impor...
import hashlib import json from flask import Flask, jsonify, request import requests from uuid import uuid4 from urllib.parse import urlparse import jsonpickle # create the class block to maintain the block information class Block(object): def __init__(self, block_id, block_data, block_prev_hash, p...
[ "hashlib.sha256", "urllib.parse.urlparse", "flask.Flask", "uuid.uuid4", "flask.request.get_json", "flask.jsonify" ]
[((4736, 4751), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (4741, 4751), False, 'from flask import Flask, jsonify, request\n'), ((6109, 6127), 'flask.request.get_json', 'request.get_json', ([], {}), '()\n', (6125, 6127), False, 'from flask import Flask, jsonify, request\n'), ((6463, 6481), 'flask.reque...
""" This script resolve a problem with the scraping.py script. The scraping.py couldn't get the url for downloading ".doc" papers. This is an old extesion of microsoft word that is not used no more. Is a problem regards old computer from researchers that was not previously thought. problems with .doc papers just ocor...
[ "pandas.read_csv", "pandas.DataFrame", "pandas.merge", "requests.get", "os.chdir", "bs4.BeautifulSoup", "os.path.abspath" ]
[((500, 526), 'os.path.abspath', 'os.path.abspath', (['os.curdir'], {}), '(os.curdir)\n', (515, 526), False, 'import os\n'), ((527, 556), 'os.chdir', 'os.chdir', (['f"""{root}/dados/raw"""'], {}), "(f'{root}/dados/raw')\n", (535, 556), False, 'import os\n'), ((570, 613), 'pandas.read_csv', 'pd.read_csv', (['"""data-ind...
import pygame import sys import random from pygame.locals import * from board import Board from flags import F from controller import Controller from ui import StatusBar, GenUI from mover import Mover from sound import SoundPlayer from trophy import Trophy def eventkey_to_action(eventkey): action = None if ev...
[ "ui.StatusBar", "pygame.init", "ui.GenUI", "pygame.event.get", "pygame.display.set_mode", "mover.Mover", "pygame.time.Clock", "board.Board", "mover.Mover.center_text", "pygame.draw.rect", "controller.Controller", "sound.SoundPlayer", "pygame.display.set_caption", "trophy.Trophy", "pygame...
[((675, 688), 'pygame.init', 'pygame.init', ([], {}), '()\n', (686, 688), False, 'import pygame\n'), ((689, 728), 'pygame.display.set_caption', 'pygame.display.set_caption', (['F.game_name'], {}), '(F.game_name)\n', (715, 728), False, 'import pygame\n'), ((737, 744), 'board.Board', 'Board', ([], {}), '()\n', (742, 744)...
#!/usr/bin/env python ''' The article dictionary ends up in this mongo format comment_id : [<e|"#comment-68330010">] author : [<content>] author_id : [<content>] reply_count : [<content>] timestamp : [<content>] reply_to_author : [<content>] reply_to_comment : [<content>] content : [<c...
[ "pandas.DataFrame" ]
[((402, 435), 'pandas.DataFrame', 'pd.DataFrame', (["article['comments']"], {}), "(article['comments'])\n", (414, 435), True, 'import pandas as pd\n')]
import torch import numpy as np from resnext import get_net, Conv, Bottleneck config = dict() config['flip'] = True config['loss_idcs'] = [1] net_type = 'resnext101' config['net_type'] = net_type input_size = [299, 299] block = Conv fwd_out = [64, 128, 256, 256, 256] num_fwd = [2, 3, 3, 3, 3] back_out = [64, 128, 256...
[ "resnext.get_net" ]
[((441, 551), 'resnext.get_net', 'get_net', (['input_size', 'block', 'fwd_out', 'num_fwd', 'back_out', 'num_back', 'n', 'shrink', 'noise', 'hard_mining', 'loss_norm'], {}), '(input_size, block, fwd_out, num_fwd, back_out, num_back, n, shrink,\n noise, hard_mining, loss_norm)\n', (448, 551), False, 'from resnext impo...
""" Docker Compose Support ====================== Allows to spin up services configured via :code:`docker-compose.yml`. """ import requests import subprocess from testcontainers.core.waiting_utils import wait_container_is_ready from testcontainers.core.exceptions import NoSuchPortExposed class DockerCompose(object...
[ "subprocess.check_output", "testcontainers.core.waiting_utils.wait_container_is_ready", "subprocess.run", "requests.get", "subprocess.call" ]
[((6371, 6431), 'testcontainers.core.waiting_utils.wait_container_is_ready', 'wait_container_is_ready', (['requests.exceptions.ConnectionError'], {}), '(requests.exceptions.ConnectionError)\n', (6394, 6431), False, 'from testcontainers.core.waiting_utils import wait_container_is_ready\n'), ((3840, 3936), 'subprocess.ru...
import pandas as pd from glob import glob from sklearn.metrics import accuracy_score, f1_score, recall_score, precision_score from scipy.stats import ttest_1samp, chi2_contingency, ks_2samp, ttest_ind, ttest_rel from tqdm import tqdm import numpy as np import warnings, sys, getopt warnings.filterwarnings('ignore') de...
[ "sklearn.metrics.accuracy_score", "getopt.getopt", "sklearn.metrics.f1_score", "pandas.read_csv", "tqdm.tqdm", "sklearn.metrics.precision_score", "sklearn.metrics.recall_score", "sys.exit", "pandas.DataFrame", "warnings.filterwarnings", "glob.glob" ]
[((283, 316), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (306, 316), False, 'import warnings, sys, getopt\n'), ((361, 384), 'glob.glob', 'glob', (["(inpath + '/*.tsv')"], {}), "(inpath + '/*.tsv')\n", (365, 384), False, 'from glob import glob\n'), ((412, 424), 'tqdm.tq...
import os import numpy as np from random import choices from radar_scenes.sequence import get_training_sequences, get_validation_sequences, Sequence from radar_scenes.labels import ClassificationLabel from radar_scenes.evaluation import per_point_predictions_to_json, PredictionFileSchemas class SemSegNetwork: """...
[ "os.path.exists", "numpy.random.choice", "radar_scenes.labels.ClassificationLabel", "numpy.random.random", "radar_scenes.labels.ClassificationLabel.translation_dict", "os.path.join", "os.path.splitext", "radar_scenes.sequence.get_validation_sequences", "os.getcwd", "numpy.array", "random.choices...
[((9145, 9200), 'os.path.join', 'os.path.join', (['path_to_dataset', '"""data"""', '"""sequences.json"""'], {}), "(path_to_dataset, 'data', 'sequences.json')\n", (9157, 9200), False, 'import os\n'), ((9472, 9509), 'radar_scenes.sequence.get_training_sequences', 'get_training_sequences', (['sequence_file'], {}), '(seque...
import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split, cross_val_score,\ ShuffleSplit from sklearn.svm import SVC from sklearn.metrics import classification_report, confusion_matrix,\ ac...
[ "numpy.mean", "sklearn.svm.SVC", "sklearn.metrics.confusion_matrix", "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.metrics.classification_report", "sklearn.metrics.accuracy_score", "sklearn.model_selection.cross_val_score" ]
[((426, 472), 'pandas.read_csv', 'pd.read_csv', (['wine_dataset_csv'], {'index_col': '(False)'}), '(wine_dataset_csv, index_col=False)\n', (437, 472), True, 'import pandas as pd\n'), ((1015, 1078), 'sklearn.model_selection.train_test_split', 'train_test_split', (['dataset', 'label'], {'test_size': '(0.2)', 'random_stat...
#!/usr/bin/python3 import asyncio import csv import httpx import json import os import statistics import sys import tabulate import time import tsv from catalog.catalog import Item BROKER_RATE = 0.05 REPROCESSING_EFFICIENCY = 0.5 REPROCESSING_TAX_RATE = 0.05 SALES_TAX_RATE = 0.05 ESI_MARKET_HISTORY_URI = "https://es...
[ "csv.DictReader", "json.dumps", "asyncio.wait", "tsv.TsvReader", "httpx.AsyncClient", "os.path.abspath", "asyncio.get_event_loop", "time.time" ]
[((767, 778), 'time.time', 'time.time', ([], {}), '()\n', (776, 778), False, 'import time\n'), ((2314, 2333), 'httpx.AsyncClient', 'httpx.AsyncClient', ([], {}), '()\n', (2331, 2333), False, 'import httpx\n'), ((2345, 2369), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (2367, 2369), False, 'imp...
# coding: utf-8 # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. from __future__ import print_function from base64 import b64encode import click import json import re import six import sys from services.core.src.oci_cli_compute.generated import compute_cli from oci import wait_until fro...
[ "services.core.src.oci_cli_compute.generated.compute_cli.compute_root_group.commands.pop", "services.core.src.oci_cli_compute.generated.compute_cli.instance_group.command", "services.core.src.oci_cli_compute.generated.compute_cli.compute_root_group.add_command", "click.File", "click.echo", "oci_cli.cli_ut...
[((795, 842), 'oci_cli.cli_root.cli.add_command', 'cli.add_command', (['compute_cli.compute_root_group'], {}), '(compute_cli.compute_root_group)\n', (810, 842), False, 'from oci_cli.cli_root import cli\n'), ((844, 918), 'services.core.src.oci_cli_compute.generated.compute_cli.compute_root_group.commands.pop', 'compute_...
#!/usr/bin/env python from sys import argv from daemonize import Daemonize pid = argv[1] working_dir = argv[2] file_name = argv[3] def main(): with open(file_name, "w") as f: f.write("test") daemon = Daemonize(app="test_app", pid=pid, action=main, chdir=working_dir) daemon.start()
[ "daemonize.Daemonize" ]
[((219, 285), 'daemonize.Daemonize', 'Daemonize', ([], {'app': '"""test_app"""', 'pid': 'pid', 'action': 'main', 'chdir': 'working_dir'}), "(app='test_app', pid=pid, action=main, chdir=working_dir)\n", (228, 285), False, 'from daemonize import Daemonize\n')]
import re from flask import current_app from src.asana_client import AsanaClient from src.constants import AsanaCustomFieldLabels from src.linear_client import LinearClient def old_sync_asana_projects(milestone_name: str): """Create Asana projects from Linear projects""" asana_client = AsanaClient(current_...
[ "flask.current_app.logger.debug", "re.match", "src.asana_client.AsanaClient", "src.linear_client.LinearClient", "flask.current_app.logger.info", "flask.current_app.logger.warning" ]
[((300, 353), 'src.asana_client.AsanaClient', 'AsanaClient', (["current_app.config['ASANA_WORKSPACE_ID']"], {}), "(current_app.config['ASANA_WORKSPACE_ID'])\n", (311, 353), False, 'from src.asana_client import AsanaClient\n'), ((472, 486), 'src.linear_client.LinearClient', 'LinearClient', ([], {}), '()\n', (484, 486), ...
#################################################### # # @ Authors : <NAME> # <NAME> # # @ Hint: you have to install all requirements # from requirements.txt # #################################################### import numpy as np import cv2 as cv import matplotlib.pyplot as plt # loa...
[ "matplotlib.pyplot.show", "cv2.imshow", "numpy.zeros", "cv2.destroyAllWindows", "cv2.waitKey", "numpy.arange", "cv2.imread" ]
[((343, 365), 'cv2.imread', 'cv.imread', (['"""rose.jpeg"""'], {}), "('rose.jpeg')\n", (352, 365), True, 'import cv2 as cv\n'), ((857, 875), 'numpy.zeros', 'np.zeros', (['(256, 1)'], {}), '((256, 1))\n', (865, 875), True, 'import numpy as np\n'), ((1031, 1041), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (1...
# Generated by Django 2.0.2 on 2018-07-31 12:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project', '0040_auto_20180731_1224'), ] operations = [ migrations.AddField( model_name='historicalproject', name='su...
[ "django.db.models.CharField" ]
[((355, 443), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(256)', 'verbose_name': '"""Project Leader\'s email"""'}), '(blank=True, max_length=256, verbose_name=\n "Project Leader\'s email")\n', (371, 443), False, 'from django.db import migrations, models\n'), ((578, 665)...
import io import os from flask import abort from flask import Flask from flask import jsonify from flask import request from flask import send_file from flask_cors import CORS import numpy as np import PIL from PIL import Image from scipy import misc import tensorflow as tf import DCSCN from helper import args api =...
[ "PIL.Image.open", "flask_cors.CORS", "flask.Flask", "os.environ.get", "helper.args.flags.DEFINE_string", "io.BytesIO", "scipy.misc.toimage", "numpy.array", "flask.abort", "flask.send_file", "DCSCN.SuperResolution", "helper.args.get", "flask.jsonify" ]
[((321, 336), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (326, 336), False, 'from flask import Flask\n'), ((337, 346), 'flask_cors.CORS', 'CORS', (['api'], {}), '(api)\n', (341, 346), False, 'from flask_cors import CORS\n'), ((348, 412), 'helper.args.flags.DEFINE_string', 'args.flags.DEFINE_string', ([...
from django.db import models, connection, transaction from django.contrib.postgres.fields import JSONField class ActionStep(models.Model): EXACT = "exact" CONTAINS = "contains" URL_MATCHING = [ (EXACT, EXACT), (CONTAINS, CONTAINS), ] action: models.ForeignKey = models.ForeignKey("A...
[ "django.contrib.postgres.fields.JSONField", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((300, 375), 'django.db.models.ForeignKey', 'models.ForeignKey', (['"""Action"""'], {'related_name': '"""steps"""', 'on_delete': 'models.CASCADE'}), "('Action', related_name='steps', on_delete=models.CASCADE)\n", (317, 375), False, 'from django.db import models, connection, transaction\n'), ((409, 464), 'django.db.mod...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Strip titles' trailing/leading spaces Create Date: 2016-12-29 19:16:11.268293 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-name from ggr...
[ "ggrc.migrations.utils.strip_text_field.strip_spaces_ensure_uniq" ]
[((1354, 1408), 'ggrc.migrations.utils.strip_text_field.strip_spaces_ensure_uniq', 'strip_spaces_ensure_uniq', (['tables', '"""title"""', 'uniq_tables'], {}), "(tables, 'title', uniq_tables)\n", (1378, 1408), False, 'from ggrc.migrations.utils.strip_text_field import strip_spaces_ensure_uniq\n')]
from diagrams import Cluster, Diagram from diagrams.programming.language import Java graph_attr = { "fontsize": "20", "bgcolor": "white" # transparent } with Diagram("", direction="LR", graph_attr=graph_attr, outformat="png", filename="no-collaborator-setup"): with Cluster("Class Under Test (CUT)"): cut ...
[ "diagrams.Diagram", "diagrams.Cluster", "diagrams.programming.language.Java" ]
[((165, 270), 'diagrams.Diagram', 'Diagram', (['""""""'], {'direction': '"""LR"""', 'graph_attr': 'graph_attr', 'outformat': '"""png"""', 'filename': '"""no-collaborator-setup"""'}), "('', direction='LR', graph_attr=graph_attr, outformat='png',\n filename='no-collaborator-setup')\n", (172, 270), False, 'from diagram...
import asyncio from datetime import datetime, timedelta from random import choice, randint from typing import Union import aiosql import discord import psutil from discord.ext import commands from discord.ext.commands import errors import bitbay import dimond import dimsecret import missile import tribe from bruckser...
[ "traceback.format_tb", "mod.aegis.Aegis", "missile.prefix_process", "psutil.Process", "aiosql.from_str", "missile.Bot", "xp.XP", "psutil.virtual_memory", "missile.append_msg", "discord.ext.commands.has_guild_permissions", "datetime.timedelta", "os.remove", "missile.get_logger", "subprocess...
[((532, 554), 'discord.Intents.none', 'discord.Intents.none', ([], {}), '()\n', (552, 554), False, 'import discord\n'), ((698, 725), 'missile.Bot', 'missile.Bot', ([], {'intents': 'intent'}), '(intents=intent)\n', (709, 725), False, 'import missile\n'), ((798, 826), 'missile.get_logger', 'missile.get_logger', (['"""Dim...
import os import pytest import pygame from tests.shared_fixtures import _init_pygame, default_ui_manager from tests.shared_fixtures import default_display_surface, _display_surface_return_none from tests.shared_comparators import compare_surfaces from pygame_gui.ui_manager import UIManager from pygame_gui.elements.ui...
[ "pytest.mark.filterwarnings", "pygame.Surface", "pygame_gui.ui_manager.UIManager", "os.path.join", "tests.shared_comparators.compare_surfaces", "pygame.event.Event", "pygame.Color", "tests.shared_fixtures.default_ui_manager.get_sprite_group", "pygame.Rect", "tests.shared_fixtures.default_ui_manage...
[((8267, 8317), 'pytest.mark.filterwarnings', 'pytest.mark.filterwarnings', (['"""ignore:Invalid value"""'], {}), "('ignore:Invalid value')\n", (8293, 8317), False, 'import pytest\n'), ((8323, 8375), 'pytest.mark.filterwarnings', 'pytest.mark.filterwarnings', (['"""ignore:Colour hex code"""'], {}), "('ignore:Colour hex...
import argparse def read_blast_table(blastx_file): '''Read blastx table''' totalList=[] for line in blastx_file: line=line.rstrip() if line.startswith('ID'): continue else: parts=line.split('\t') try: taxid=parts[int...
[ "argparse.ArgumentParser" ]
[((585, 631), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""Select unique taxid"""'], {}), "('Select unique taxid')\n", (608, 631), False, 'import argparse\n')]
# # Copyright 2022 DMetaSoul # # 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, ...
[ "metaspore.nn.Normalization", "torch.sigmoid", "metaspore.FTRLTensorUpdater", "metaspore.NormalTensorInitializer", "torch.sum", "metaspore.EmbeddingSumConcat" ]
[((894, 921), 'torch.sigmoid', 'torch.sigmoid', (['(z / self.tau)'], {}), '(z / self.tau)\n', (907, 921), False, 'import torch\n'), ((1803, 1898), 'metaspore.EmbeddingSumConcat', 'ms.EmbeddingSumConcat', (['self.embedding_dim', 'self.column_name_path', 'self.combine_schema_path'], {}), '(self.embedding_dim, self.column...
import matplotlib.pyplot as plt import numpy as np from keras.callbacks import TensorBoard from keras.datasets import mnist from keras.layers import Dense, Dropout from keras.layers import Input from keras.models import Model from keras.utils import to_categorical def main(): # this is the size of our encoded rep...
[ "numpy.prod", "matplotlib.pyplot.gray", "keras.datasets.mnist.load_data", "keras.utils.to_categorical", "matplotlib.pyplot.subplot", "keras.callbacks.TensorBoard", "keras.layers.Input", "matplotlib.pyplot.figure", "keras.models.Model", "keras.layers.Dense", "keras.layers.Dropout", "matplotlib....
[((485, 529), 'keras.layers.Input', 'Input', ([], {'shape': '(784,)', 'name': '"""encode-img-input"""'}), "(shape=(784,), name='encode-img-input')\n", (490, 529), False, 'from keras.layers import Input\n'), ((879, 897), 'keras.layers.Input', 'Input', ([], {'shape': '(32,)'}), '(shape=(32,))\n', (884, 897), False, 'from...
"""Tests for CompilerBuiltIns class.""" import imp from unittest import TestCase from EasyClangComplete.plugin.flags_sources import compiler_builtins imp.reload(compiler_builtins) CompilerBuiltIns = compiler_builtins.CompilerBuiltIns class TestFlag(TestCase): """Test getting built in flags from a target compil...
[ "imp.reload" ]
[((152, 181), 'imp.reload', 'imp.reload', (['compiler_builtins'], {}), '(compiler_builtins)\n', (162, 181), False, 'import imp\n')]
from collections import Counter, defaultdict import csv import json import os import random import sys from time import time from metal.contrib.info_extraction.mentions import RelationMention from metal.contrib.info_extraction.utils import mark_entities import numpy as np import torch from scipy.sparse import issparse...
[ "numpy.ceil", "random.shuffle", "torch.LongTensor", "csv.writer", "scipy.sparse.issparse", "random.seed", "metal.contrib.info_extraction.utils.mark_entities", "collections.defaultdict", "csv.reader", "sys.stdout.flush", "time.time", "torch.zeros", "sys.stdout.write" ]
[((5921, 5938), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (5932, 5938), False, 'from collections import Counter, defaultdict\n'), ((6427, 6489), 'metal.contrib.info_extraction.utils.mark_entities', 'mark_entities', (['tokens', 'positions', 'markers'], {'style': '"""concatenate"""'}), "(token...
import codecs from typing import Iterator, Tuple import javalang from javalang.ast import Node from javalang.tree import MethodDeclaration, PackageDeclaration, ClassDeclaration from ...model import JavaEntry def is_entry_method(node: Node) -> bool: """ Determine if the given method node is an entry or not. ...
[ "javalang.parse.parse", "codecs.open" ]
[((1481, 1507), 'javalang.parse.parse', 'javalang.parse.parse', (['code'], {}), '(code)\n', (1501, 1507), False, 'import javalang\n'), ((1074, 1100), 'codecs.open', 'codecs.open', (['filename', '"""r"""'], {}), "(filename, 'r')\n", (1085, 1100), False, 'import codecs\n')]
#!/usr/local/bin/python from sprint import sprint as print import copy import basics import bfiles import config import useful # ------- ---------------------------------------------------------- class CarsFile(bfiles.ArgFile): def __init__(self, fname=useful.relpath(config.SRC_DIR, "cars.dat")): self...
[ "bfiles.ArgFile.__init__", "useful.relpath", "copy.deepcopy" ]
[((263, 305), 'useful.relpath', 'useful.relpath', (['config.SRC_DIR', '"""cars.dat"""'], {}), "(config.SRC_DIR, 'cars.dat')\n", (277, 305), False, 'import useful\n'), ((386, 422), 'bfiles.ArgFile.__init__', 'bfiles.ArgFile.__init__', (['self', 'fname'], {}), '(self, fname)\n', (409, 422), False, 'import bfiles\n'), ((6...
# Generated by Django 2.1.1 on 2018-09-13 13:27 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('app', '0001_initial'), ] operations = [ migrations.CreateModel( name='Item', fields...
[ "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((346, 439), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (362, 439), False, 'from django.db import migrations, models\...
# Copyright 2016 OpenStack Foundation. # 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 req...
[ "oslo_utils.timeutils.utcnow", "sqlalchemy.Table", "sqlalchemy.create_engine", "apmec.common.exceptions.InvalidInput", "sqlalchemy.MetaData", "sqlalchemy.select", "sqlalchemy.inspect", "datetime.timedelta", "sqlalchemy.and_" ]
[((1646, 1686), 'sqlalchemy.Table', 'sqlalchemy.Table', (['t', 'meta'], {'autoload': '(True)'}), '(t, meta, autoload=True)\n', (1662, 1686), False, 'import sqlalchemy\n'), ((2484, 2528), 'sqlalchemy.Table', 'sqlalchemy.Table', (['tname', 'meta'], {'autoload': '(True)'}), '(tname, meta, autoload=True)\n', (2500, 2528), ...
import os import matplotlib.pyplot as plt import numpy as np from utils.util import save_fig #http://matplotlib.org/examples/pylab_examples/subplots_demo.html plt.figure(figsize=(12,4)) ks = range(1,10) ys = [1.0/k for k in ks] print(ys) plt.subplot(1,3,1) plt.plot(ks, np.log(ys), color = 'r') plt.title('Sublinear c...
[ "numpy.log", "utils.util.save_fig", "matplotlib.pyplot.figure", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "matplotlib.pyplot.draw", "matplotlib.pyplot.subplot", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((161, 188), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(12, 4)'}), '(figsize=(12, 4))\n', (171, 188), True, 'import matplotlib.pyplot as plt\n'), ((241, 261), 'matplotlib.pyplot.subplot', 'plt.subplot', (['(1)', '(3)', '(1)'], {}), '(1, 3, 1)\n', (252, 261), True, 'import matplotlib.pyplot as plt\n')...
# Copyright 2022 Amazon.com, Inc. or its affiliates. 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 require...
[ "aws_ddk_core.resources.SQSFactory.queue", "aws_cdk.assertions.Template.from_stack" ]
[((842, 948), 'aws_ddk_core.resources.SQSFactory.queue', 'SQSFactory.queue', ([], {'scope': 'test_stack', 'id': '"""dummy-queue-1"""', 'environment_id': '"""dev"""', 'queue_name': '"""dummy-queue"""'}), "(scope=test_stack, id='dummy-queue-1', environment_id='dev',\n queue_name='dummy-queue')\n", (858, 948), False, '...
# Generated by Django 4.0.3 on 2022-03-23 20:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cart', '0001_initial'), ] operations = [ migrations.AlterField( model_name='order', name='order_amount', ...
[ "django.db.models.IntegerField" ]
[((327, 380), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'blank': '(True)', 'default': '(1)', 'null': '(True)'}), '(blank=True, default=1, null=True)\n', (346, 380), False, 'from django.db import migrations, models\n')]
import os import pytest from .context import pybus # the below two lines are for pip installing with test option and the tests will open files: CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) os.chdir(CURRENT_DIR) def subscriber_func(event): print('triggered') def test_bus_add_subscriber(): even...
[ "os.chdir", "os.path.realpath" ]
[((203, 224), 'os.chdir', 'os.chdir', (['CURRENT_DIR'], {}), '(CURRENT_DIR)\n', (211, 224), False, 'import os\n'), ((175, 201), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (191, 201), False, 'import os\n')]
""" BlackHole.py Author: <NAME> Affiliation: University of Colorado at Boulder Created on: Mon Jul 8 09:56:38 MDT 2013 Description: """ import numpy as np from .Star import _Planck from .Source import Source from types import FunctionType from scipy.integrate import quad from ..util.ReadData import read_lit from...
[ "scipy.integrate.quad", "numpy.exp", "numpy.log", "numpy.log10" ]
[((8536, 8574), 'scipy.integrate.quad', 'quad', (['integrand', 'self.T_out', 'self.T_in'], {}), '(integrand, self.T_out, self.T_in)\n', (8540, 8574), False, 'from scipy.integrate import quad\n'), ((11555, 11611), 'numpy.exp', 'np.exp', (['((1.0 - self.epsilon) / self.epsilon * dt / t_edd)'], {}), '((1.0 - self.epsilon)...
"""Basic common tools for testing netify.""" # Copyright 2016 <NAME> # # 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 ...
[ "netify.app.NetifyApp" ]
[((1040, 1055), 'netify.app.NetifyApp', 'app.NetifyApp', ([], {}), '()\n', (1053, 1055), True, 'import netify.app as app\n')]
import random # TODO: Get this outta here! spinner_choice = random.choice(['aesthetic', 'arc', 'arrow3', 'betaWave', 'balloon', 'bounce', 'bouncingBar', 'circle', 'dots', 'line', 'squish', 'toggle10', 'pong']) # TODO: Replace these removed soundtracks soundtrack_files = [ "talc_soundtrack.mp3", "talc_soundtrac...
[ "random.choice" ]
[((60, 217), 'random.choice', 'random.choice', (["['aesthetic', 'arc', 'arrow3', 'betaWave', 'balloon', 'bounce',\n 'bouncingBar', 'circle', 'dots', 'line', 'squish', 'toggle10', 'pong']"], {}), "(['aesthetic', 'arc', 'arrow3', 'betaWave', 'balloon',\n 'bounce', 'bouncingBar', 'circle', 'dots', 'line', 'squish', ...
from collections import namedtuple from dagster import check from dagster.core.types.runtime import RuntimeType, resolve_to_runtime_type from .expectation import ExpectationDefinition from .utils import check_valid_name class InputDefinition(object): '''An InputDefinition instance represents an argument to a co...
[ "dagster.check.inst_param", "collections.namedtuple", "dagster.check.opt_list_param", "dagster.check.str_param", "dagster.check.opt_str_param", "dagster.core.types.runtime.resolve_to_runtime_type" ]
[((1419, 1482), 'collections.namedtuple', 'namedtuple', (['"""_InputMapping"""', '"""definition solid_name input_name"""'], {}), "('_InputMapping', 'definition solid_name input_name')\n", (1429, 1482), False, 'from collections import namedtuple\n'), ((1040, 1126), 'dagster.check.opt_list_param', 'check.opt_list_param',...
############################################################################### ## ## Copyright 2013 Tavendo GmbH ## ## 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...
[ "snappy.StreamCompressor", "snappy.StreamDecompressor" ]
[((14741, 14766), 'snappy.StreamCompressor', 'snappy.StreamCompressor', ([], {}), '()\n', (14764, 14766), False, 'import snappy\n'), ((14883, 14908), 'snappy.StreamCompressor', 'snappy.StreamCompressor', ([], {}), '()\n', (14906, 14908), False, 'import snappy\n'), ((15220, 15247), 'snappy.StreamDecompressor', 'snappy.S...
#!/usr/bin/env python3 '''Generate PIM rules for ipmi-fru-parser. ''' import argparse import os import sys import yaml from mako.template import Template tmpl = ''' description: > PIM rules for ipmi-fru-parser inventory objects. events: - name: Host off at startup description: > Mark ipmi-fr...
[ "os.path.realpath", "os.path.join", "argparse.ArgumentParser", "mako.template.Template" ]
[((3837, 3911), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""ipmi-fru-parser PIM rule generator."""'}), "(description='ipmi-fru-parser PIM rule generator.')\n", (3860, 3911), False, 'import argparse\n'), ((4372, 4423), 'os.path.join', 'os.path.join', (['args.outputdir', '"""ipmi-fru-ru...
import json import sys import time from glob import glob from adet.data.video_data.util import * from PIL import Image import os def generate_detectron2_annotations(img_path, detectron2_annos_path, meta_path, split): f = open(meta_path, ) data = json.load(f) f.close() video_id_names = lis...
[ "PIL.Image.open", "os.path.join", "json.load", "time.time", "json.dump" ]
[((267, 279), 'json.load', 'json.load', (['f'], {}), '(f)\n', (276, 279), False, 'import json\n'), ((526, 537), 'time.time', 'time.time', ([], {}), '()\n', (535, 537), False, 'import time\n'), ((1893, 1929), 'json.dump', 'json.dump', (['detectron2_annos', 'outfile'], {}), '(detectron2_annos, outfile)\n', (1902, 1929), ...
# Copyright (C) 2021, Mindee. # This program is licensed under the Apache License version 2. # See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details. from typing import List, Tuple import numpy as np from doctr.models.builder import DocumentBuilder from doctr.utils.geometry...
[ "doctr.utils.geometry.rotate_boxes", "doctr.utils.geometry.rotate_image" ]
[((1016, 1049), 'doctr.utils.geometry.rotate_image', 'rotate_image', (['page', '(-angle)', '(False)'], {}), '(page, -angle, False)\n', (1028, 1049), False, 'from doctr.utils.geometry import rotate_boxes, rotate_image\n'), ((2703, 2734), 'doctr.utils.geometry.rotate_boxes', 'rotate_boxes', (['page_boxes', 'angle'], {}),...
# coding: utf-8 """ Gitea API. This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.16.7 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility libra...
[ "six.iteritems", "gitea_api.api_client.ApiClient" ]
[((2701, 2732), 'six.iteritems', 'six.iteritems', (["params['kwargs']"], {}), "(params['kwargs'])\n", (2714, 2732), False, 'import six\n'), ((6760, 6791), 'six.iteritems', 'six.iteritems', (["params['kwargs']"], {}), "(params['kwargs'])\n", (6773, 6791), False, 'import six\n'), ((11071, 11102), 'six.iteritems', 'six.it...
from distutils.core import setup, Extension import Cython from Cython.Build import cythonize import numpy setup( ext_modules=cythonize("special_partition.pyx"), include_dirs=[numpy.get_include()] ) """ Build instructions: ------------------ > cd special_partition > python setup.py build_ext --inplace """
[ "Cython.Build.cythonize", "numpy.get_include" ]
[((130, 164), 'Cython.Build.cythonize', 'cythonize', (['"""special_partition.pyx"""'], {}), "('special_partition.pyx')\n", (139, 164), False, 'from Cython.Build import cythonize\n'), ((184, 203), 'numpy.get_include', 'numpy.get_include', ([], {}), '()\n', (201, 203), False, 'import numpy\n')]
from astropy import units as u from six import reraise from six.moves import zip_longest import sys import os import errno import itertools _quantity = u.Quantity def mkdir_p(path): """ mkdir -p equivalent [used by get_datafile]""" try: os.makedirs(path) except OSError as exc: # Python >2.5 ...
[ "os.path.exists", "os.makedirs", "astropy.units.Unit", "astroquery.lamda.Lamda.query", "os.path.splitext", "os.path.join", "os.path.split", "os.path.isfile", "sys.exc_info", "os.path.isdir", "astroquery.lamda.core.parse_lamda_datafile", "six.moves.zip_longest" ]
[((797, 827), 'os.path.join', 'os.path.join', (['savedir', 'species'], {}), '(savedir, species)\n', (809, 827), False, 'import os\n'), ((849, 874), 'os.path.splitext', 'os.path.splitext', (['species'], {}), '(species)\n', (865, 874), False, 'import os\n'), ((1303, 1326), 'os.path.split', 'os.path.split', (['datapath'],...
from ibata.Transaction import Transaction from ibata.cli_app import * def test_transaction_analyzer_constructor(config_file): transaction_analyzer = TransactionAnalyzer(config_file) assert len(transaction_analyzer.categories_json) == 18 assert len(transaction_analyzer.categories_json) + 2 == len(transacti...
[ "ibata.Transaction.Transaction" ]
[((939, 1061), 'ibata.Transaction.Transaction', 'Transaction', (['"""2020-01-05"""', 'None', 'None', '(-443.25)', '"""CZK"""', '"""Balza.cz"""', '"""Platba kartou"""', '"""<NAME>"""', '"""Sluchátka v alze"""', 'None'], {}), "('2020-01-05', None, None, -443.25, 'CZK', 'Balza.cz',\n 'Platba kartou', '<NAME>', 'Sluchát...
# -*- coding: utf-8 -*- """correct_date.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/168VF123qwRpjZWIlW6AYrt1wn4ZO4NlY """ import pandas as pd from datetime import datetime #Prepare #data = pd.read_csv('SAFETY_GPS.csv')\n", def correct_date(...
[ "datetime.datetime.strptime", "datetime.datetime.strftime", "pandas.notna" ]
[((342, 371), 'pandas.notna', 'pd.notna', (["data['DESCRIPTION']"], {}), "(data['DESCRIPTION'])\n", (350, 371), True, 'import pandas as pd\n'), ((821, 862), 'datetime.datetime.strptime', 'datetime.strptime', (['case', '"""%d/%m/%y %H:%M"""'], {}), "(case, '%d/%m/%y %H:%M')\n", (838, 862), False, 'from datetime import d...
#!/usr/bin/env python # pipescaler/sorters/regex_sorter.py # # Copyright (C) 2020-2021 <NAME> # All rights reserved. # # This software may be modified and distributed under the terms of the # BSD license. from __future__ import annotations import re from logging import info from os.path import basename, dirn...
[ "os.path.dirname", "logging.info", "re.compile" ]
[((633, 650), 're.compile', 're.compile', (['regex'], {}), '(regex)\n', (643, 650), False, 'import re\n'), ((745, 760), 'os.path.dirname', 'dirname', (['infile'], {}), '(infile)\n', (752, 760), False, 'from os.path import basename, dirname\n'), ((831, 887), 'logging.info', 'info', (['f"""{self}: \'{name}\' matches \'{s...
from django.core.management.base import BaseCommand from adminrestrict.models import AllowedIP class Command(BaseCommand): help = 'Remove an IP address from the Admin Allowed IP table' def add_arguments(self, parser): parser.add_argument('ip_address', type=str) def handle(self, *args, **options)...
[ "adminrestrict.models.AllowedIP.objects.filter" ]
[((382, 429), 'adminrestrict.models.AllowedIP.objects.filter', 'AllowedIP.objects.filter', ([], {'ip_address': 'ip_address'}), '(ip_address=ip_address)\n', (406, 429), False, 'from adminrestrict.models import AllowedIP\n')]
from .API_Elements import * import json class OAuth: def __init__(self, bot, secret, redirect_uri, scope): self.bot = bot self.secret = secret self.id = bot.get_self_user().id self.redirect_uri = redirect_uri self.scope = scope def get_url(self): """ Get the url for authentification with discord "...
[ "json.loads" ]
[((943, 960), 'json.loads', 'json.loads', (['token'], {}), '(token)\n', (953, 960), False, 'import json\n'), ((1950, 1967), 'json.loads', 'json.loads', (['token'], {}), '(token)\n', (1960, 1967), False, 'import json\n')]
#!/usr/bin/env python from threading import Thread, Lock import random lock = Lock() # lock for making operations atomic def calcInside(nsamples,rank): global inside # we need something everyone can share random.seed(rank) random.seed(rank) for i in range(nsamples): x = random.random() y ...
[ "threading.Lock", "random.random", "threading.Thread", "random.seed" ]
[((80, 86), 'threading.Lock', 'Lock', ([], {}), '()\n', (84, 86), False, 'from threading import Thread, Lock\n'), ((234, 251), 'random.seed', 'random.seed', (['rank'], {}), '(rank)\n', (245, 251), False, 'import random\n'), ((294, 309), 'random.random', 'random.random', ([], {}), '()\n', (307, 309), False, 'import rand...
import json import matplotlib.pyplot as plt from qiskit import __qiskit_version__, QuantumCircuit, execute, Aer from qiskit.visualization import plot_histogram, plot_bloch_vector, plot_bloch_multivector print('Qiskit Version :') print(json.dumps(__qiskit_version__, indent=3)) circ = QuantumCircuit(1) circ.draw('mp...
[ "qiskit.execute", "matplotlib.pyplot.show", "json.dumps", "qiskit.QuantumCircuit", "qiskit.visualization.plot_histogram", "qiskit.Aer.get_backend" ]
[((287, 304), 'qiskit.QuantumCircuit', 'QuantumCircuit', (['(1)'], {}), '(1)\n', (301, 304), False, 'from qiskit import __qiskit_version__, QuantumCircuit, execute, Aer\n'), ((325, 335), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (333, 335), True, 'import matplotlib.pyplot as plt\n'), ((350, 367), 'qiskit....
from ..baseops import * from ..exprs import * from ..db import Database from ..schema import * from ..tuples import * from ..util import cache, OBTuple from ..udfs import * from itertools import chain ######################################################## # # Aggregation Operators # ################################...
[ "itertools.chain" ]
[((1998, 2052), 'itertools.chain', 'chain', (['*[e.referenced_attrs for e in self.group_exprs]'], {}), '(*[e.referenced_attrs for e in self.group_exprs])\n', (2003, 2052), False, 'from itertools import chain\n')]
import re import json from genie.metaparser import MetaParser # ==================== # Schema for: # * 'show platform software fed switch active punt cause summary' # ==================== class ShowPlatformSchema(MetaParser): """show platform software fed switch active punt cause summary""" schema = { ...
[ "re.compile" ]
[((2110, 2222), 're.compile', 're.compile', (['"""^(?P<cause>\\\\d+)\\\\s+(?P<cause_info>([\\\\S]+\\\\s)+)\\\\s+(?P<rcvd>\\\\d+)\\\\s+(?P<dropped>(0|1))"""'], {}), "(\n '^(?P<cause>\\\\d+)\\\\s+(?P<cause_info>([\\\\S]+\\\\s)+)\\\\s+(?P<rcvd>\\\\d+)\\\\s+(?P<dropped>(0|1))'\n )\n", (2120, 2222), False, 'import re\...
from morfdict import Paths from morfdict import StringDict class TaskInheritance(object): def __init__(self, base_cls, child_cls, migration=None): self.base_cls = base_cls self.child_cls = child_cls self.migration = migration or self._default_migration def is_ready_to_migrate(self, t...
[ "morfdict.Paths", "morfdict.StringDict" ]
[((771, 783), 'morfdict.StringDict', 'StringDict', ([], {}), '()\n', (781, 783), False, 'from morfdict import StringDict\n'), ((805, 812), 'morfdict.Paths', 'Paths', ([], {}), '()\n', (810, 812), False, 'from morfdict import Paths\n')]
#!/usr/bin/env python # License: MIT # Copyright Joe Security 2018 """ jbxapi.py serves two purposes. (1) a light wrapper around the REST API of Joe Sandbox (2) a command line script to interact with Joe Sandbox """ from __future__ import print_function from __future__ import unicode_literals from __future__ impo...
[ "requests.Session", "requests.utils.guess_filename", "sys.platform.startswith", "io.BytesIO", "copy.deepcopy", "sys.exit", "copy.copy", "os.walk", "os.remove", "argparse.ArgumentParser", "json.dumps", "os.path.isdir", "os.mkdir", "ctypes.c_int", "random.uniform", "json.loads", "shuti...
[((38355, 38394), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'add_help': '(False)'}), '(add_help=False)\n', (38378, 38394), False, 'import argparse\n'), ((39244, 39302), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Joe Sandbox Web API"""'}), "(description='Joe Sandbox ...
#coding:utf-8 import sys import festival print("talking") festival.execCommand("(voice_el_diphone)") string = unicode("Hola mundo, esta es una prueba del criticon, con una canción", "ascii") festival.sayText(string)
[ "festival.execCommand", "festival.sayText" ]
[((60, 102), 'festival.execCommand', 'festival.execCommand', (['"""(voice_el_diphone)"""'], {}), "('(voice_el_diphone)')\n", (80, 102), False, 'import festival\n'), ((193, 217), 'festival.sayText', 'festival.sayText', (['string'], {}), '(string)\n', (209, 217), False, 'import festival\n')]
import os import pathlib import unittest from parameterized import parameterized import pytest from openspoor.spoortakmodel import SpoortakModelsData MODELS_DATA_DIR = str(pathlib.Path(__file__).parents[2].resolve().joinpath('data').resolve()) def _test_model_name(func, param_num, param): """ expects the first ...
[ "openspoor.spoortakmodel.SpoortakModelsData", "os.path.exists", "pathlib.Path", "parameterized.parameterized.expand" ]
[((1093, 1344), 'parameterized.parameterized.expand', 'parameterized.expand', (['[(3, 13163), (4, 13145), (5, 12952), (6, 12937), (7, 12867), (8, 12662), (9,\n 12528), (10, 12443), (11, 12390), (12, 12256), (13, 12217), (14, 12153),\n (15, 12057), (16, 11935), (17, 11906)]'], {'name_func': '_test_model_name'}), '...
from valorant.utils.gameplay import check_buy_phase from valorant import market from valorant.utils.gameplay import enemy_score_info, own_score_info import random, time, pickle shop = market.Shop() with open(r'D:/valorant_model/buyassistmodel', 'rb') as training_model: model = pickle.load(training_model) time.sle...
[ "random.choice", "pickle.load", "time.sleep", "valorant.utils.gameplay.check_buy_phase", "valorant.market.Shop", "valorant.utils.gameplay.own_score_info", "valorant.utils.gameplay.enemy_score_info" ]
[((185, 198), 'valorant.market.Shop', 'market.Shop', ([], {}), '()\n', (196, 198), False, 'from valorant import market\n'), ((312, 325), 'time.sleep', 'time.sleep', (['(5)'], {}), '(5)\n', (322, 325), False, 'import random, time, pickle\n'), ((283, 310), 'pickle.load', 'pickle.load', (['training_model'], {}), '(trainin...
import numpy as np from numba import jit, int32, float32, double, cfunc from numba.experimental import jitclass spec = [ ('x', double[:]), ('dq', double[:]), ('u', double[:]), ('m', double), ('Iz', double), ('lf', double), ('lr', double), ('Bf', double), ('Cf', double), ('Df', double), ('Br', doubl...
[ "matplotlib.pyplot.grid", "matplotlib.pyplot.plot", "numba.experimental.jitclass", "numpy.append", "numpy.array", "numpy.deg2rad", "matplotlib.pyplot.figure", "numpy.zeros", "numpy.arctan2", "numpy.arctan", "numpy.cos", "numpy.sin", "matplotlib.pyplot.axis", "numpy.zeros_like", "matplotl...
[((536, 550), 'numba.experimental.jitclass', 'jitclass', (['spec'], {}), '(spec)\n', (544, 550), False, 'from numba.experimental import jitclass\n'), ((4413, 4427), 'numpy.deg2rad', 'np.deg2rad', (['(20)'], {}), '(20)\n', (4423, 4427), True, 'import numpy as np\n'), ((4437, 4455), 'numpy.array', 'np.array', (['[v.x[0]]...
import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from flags import CONST from sklearn.model_selection import train_test_split from keras import backend as K from tensorflow.keras.models import Sequential, model_from_json from tensorflow.keras.layers import SimpleRNN, Embedding, Dense, Dropout ...
[ "sklearn.model_selection.train_test_split", "tensorflow.keras.models.model_from_json", "keras.backend.clip", "numpy.asarray", "tensorflow.keras.callbacks.EarlyStopping", "tensorflow.keras.layers.Dense", "keras.backend.clear_session", "tensorflow.keras.callbacks.ModelCheckpoint", "keras.backend.epsil...
[((1075, 1160), 'sklearn.model_selection.train_test_split', 'train_test_split', (['data.vector', 'data.label'], {'test_size': 'test_size', 'random_state': '(321)'}), '(data.vector, data.label, test_size=test_size, random_state=321\n )\n', (1091, 1160), False, 'from sklearn.model_selection import train_test_split\n')...
import datetime from eye.eye import Eye from analyzer.analyzer import Analyzer from sender.sender import Sender from config.config import Config configuration = Config() eye = Eye() analyzer = Analyzer() sender = Sender() frame = eye.capture() while True: data = analyzer.analyze(frame) sender.send(data) ...
[ "sender.sender.Sender", "config.config.Config", "eye.eye.Eye", "analyzer.analyzer.Analyzer" ]
[((163, 171), 'config.config.Config', 'Config', ([], {}), '()\n', (169, 171), False, 'from config.config import Config\n'), ((179, 184), 'eye.eye.Eye', 'Eye', ([], {}), '()\n', (182, 184), False, 'from eye.eye import Eye\n'), ((196, 206), 'analyzer.analyzer.Analyzer', 'Analyzer', ([], {}), '()\n', (204, 206), False, 'f...
# Licensed to the StackStorm, Inc ('StackStorm') 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 License, Version 2.0 # (the "License"); you may not use th...
[ "os.close", "fcntl.ioctl", "os.ctermid", "os.getenv" ]
[((1052, 1095), 'fcntl.ioctl', 'fcntl.ioctl', (['fd', 'termios.TIOCGWINSZ', '"""1234"""'], {}), "(fd, termios.TIOCGWINSZ, '1234')\n", (1063, 1095), False, 'import fcntl\n'), ((1289, 1301), 'os.ctermid', 'os.ctermid', ([], {}), '()\n', (1299, 1301), False, 'import os\n'), ((1394, 1406), 'os.close', 'os.close', (['fd'], ...
import argparse import glob import os import pickle import sys import time from itertools import product import matplotlib.pyplot as plt import multiprocessing as mp import numpy as np import pandas as pd import seaborn as sns import statsmodels.nonparametric.api as smnp import swifter import utils import graphs N_P...
[ "numpy.log10", "numpy.log", "numpy.array", "numpy.arange", "os.path.exists", "numpy.histogram", "pandas.read_feather", "numpy.mean", "argparse.ArgumentParser", "os.path.split", "numpy.linspace", "numpy.dot", "pandas.DataFrame", "numpy.trapz", "graphs.rename_bias_groups", "time.time", ...
[((542, 593), 'os.path.join', 'os.path.join', (['BASE_DIR', '"""Processed/Real"""', '"""Samples"""'], {}), "(BASE_DIR, 'Processed/Real', 'Samples')\n", (554, 593), False, 'import os\n'), ((605, 660), 'os.path.join', 'os.path.join', (['BASE_DIR', '"""Processed/Real"""', '"""Sample_dist"""'], {}), "(BASE_DIR, 'Processed/...
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-06 15:47 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('base', '0001_initial'), ] operations = [ mig...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.AutoField", "django.db.models.PositiveIntegerField", "django.db.models.CharField" ]
[((1283, 1359), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(64)', 'null': '(True)', 'verbose_name': '"""Title"""'}), "(blank=True, max_length=64, null=True, verbose_name='Title')\n", (1299, 1359), False, 'from django.db import migrations, models\n'), ((1486, 1545), 'django...
# -*- coding: utf-8 -*- """ @author: GitHub@Oscarshu0719 """ import subprocess def run(cmd): process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, encoding='utf-8', errors='replace' ) while True: realtime_out...
[ "subprocess.Popen", "subprocess.run" ]
[((109, 232), 'subprocess.Popen', 'subprocess.Popen', (['cmd'], {'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.STDOUT', 'shell': '(True)', 'encoding': '"""utf-8"""', 'errors': '"""replace"""'}), "(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,\n shell=True, encoding='utf-8', errors='replace')\n", (125, ...
import json import os from uwsgidecorators import * from flask import Flask, render_template from api import Source app = Flask(__name__) src = Source() @timer(3) def update_coordinates(num): src.update_coordinates() @timer(10800) def update_people(num): src.update_people() @app.route("/") def main(): ...
[ "api.Source", "flask.Flask" ]
[((125, 140), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (130, 140), False, 'from flask import Flask, render_template\n'), ((148, 156), 'api.Source', 'Source', ([], {}), '()\n', (154, 156), False, 'from api import Source\n')]
# -*- coding: utf-8 -*- from __future__ import unicode_literals from rchitect import rcopy, reval from rchitect.interface import rstring import string from collections import OrderedDict def test_booleans(gctorture): assert rcopy(reval("TRUE")) is True assert rcopy(reval("FALSE")) is False assert rcopy(l...
[ "rchitect.interface.rstring", "rchitect.reval" ]
[((1022, 1055), 'rchitect.reval', 'reval', (['"""list(a = 1, b = \'hello\')"""'], {}), '("list(a = 1, b = \'hello\')")\n', (1027, 1055), False, 'from rchitect import rcopy, reval\n'), ((1160, 1193), 'rchitect.reval', 'reval', (['"""list(a = 1, b = \'hello\')"""'], {}), '("list(a = 1, b = \'hello\')")\n', (1165, 1193), ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import os def here(p): return os.path.abspath(os.path.join(os.path.dirname(__file__), p)) from .korg import LineGrokker from .pattern import PatternRepo
[ "os.path.dirname" ]
[((145, 170), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (160, 170), False, 'import os\n')]
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from unittest import TestCase import requests from quickbook3 import * try: from unittest import mock except ImportError: import mock ERROR_MSG_MAP = { AuthenticationError: 'User authentication Failed', Pe...
[ "requests.Response" ]
[((666, 685), 'requests.Response', 'requests.Response', ([], {}), '()\n', (683, 685), False, 'import requests\n')]
""" MIT License Sugaroid Artificial Intelligence Chatbot Core Copyright (c) 2020-2021 <NAME> Copyright (c) 2021 The Sugaroid Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restri...
[ "sugaroid.brain.postprocessor.random_response", "sugaroid.sugaroid.SugaroidStatement" ]
[((3803, 3833), 'sugaroid.brain.postprocessor.random_response', 'random_response', (['HANGMAN_WORDS'], {}), '(HANGMAN_WORDS)\n', (3818, 3833), False, 'from sugaroid.brain.postprocessor import random_response\n'), ((7747, 7788), 'sugaroid.sugaroid.SugaroidStatement', 'SugaroidStatement', (['response'], {'chatbot': '(Tru...
import os import pytest from shapely.geometry import Point import trackintel as ti @pytest.fixture def testdata_tpls(): """Read triplegs test data from files.""" pfs, _ = ti.io.dataset_reader.read_geolife(os.path.join("tests", "data", "geolife")) pfs, sp = pfs.as_positionfixes.generate_staypoints(method...
[ "shapely.geometry.Point", "os.path.join", "pytest.raises" ]
[((217, 257), 'os.path.join', 'os.path.join', (['"""tests"""', '"""data"""', '"""geolife"""'], {}), "('tests', 'data', 'geolife')\n", (229, 257), False, 'import os\n'), ((783, 812), 'pytest.raises', 'pytest.raises', (['AttributeError'], {}), '(AttributeError)\n', (796, 812), False, 'import pytest\n'), ((1071, 1134), 'p...
from collections import OrderedDict import json import os import shutil import unittest from opentrons.data_storage import old_container_loading from opentrons.containers.placeable import Container, Well from opentrons.util import environment from opentrons.config import feature_flags as ff if not ff.split_labware_d...
[ "json.loads", "opentrons.data_storage.old_container_loading.load_all_containers_from_disk", "opentrons.util.environment.refresh", "opentrons.data_storage.old_container_loading.persisted_containers_dict.clear", "shutil.copytree", "opentrons.data_storage.old_container_loading.get_persisted_container", "op...
[((302, 332), 'opentrons.config.feature_flags.split_labware_definitions', 'ff.split_labware_definitions', ([], {}), '()\n', (330, 332), True, 'from opentrons.config import feature_flags as ff\n'), ((617, 672), 'opentrons.data_storage.old_container_loading.persisted_containers_dict.clear', 'old_container_loading.persist...
# package NLP_ITB.POSTagger.HMM from copy import deepcopy import re import math class WordFreq: def __init__(self, wordTagFreq={}): self.wordTagFreq = wordTagFreq def getWordTagFreq(self): #Returns Map<String, Map<Integer, Integer>> return self.wordTagFreq def readWordTagFreq(reader, ...
[ "math.log" ]
[((10087, 10175), 'math.log', 'math.log', (['(self.d_l1 * uniGramProb + self.d_l2 * biGramProb + self.d_l3 * triGramProb)'], {}), '(self.d_l1 * uniGramProb + self.d_l2 * biGramProb + self.d_l3 *\n triGramProb)\n', (10095, 10175), False, 'import math\n'), ((11008, 11022), 'math.log', 'math.log', (['prob'], {}), '(pro...
import unittest import foauth.providers import urllib class ProviderTests(unittest.TestCase): def setUp(self): class Example(foauth.providers.OAuth): provider_url = 'http://example.com' api_domain = 'api.example.com' self.provider = Example def test_auto_name(self): ...
[ "urllib.quote" ]
[((691, 711), 'urllib.quote', 'urllib.quote', (['backup'], {}), '(backup)\n', (703, 711), False, 'import urllib\n')]
import pprint import logging import colorlog import uuid from mindsdb import CONFIG from mindsdb.libs.helpers.text_helpers import gen_chars from inspect import getframeinfo, stack class MindsdbLogger(): internal_logger = None id = None def __init__(self, log_level, uuid): ''' # Initializ...
[ "logging.StreamHandler", "inspect.stack", "uuid.uuid1", "mindsdb.libs.helpers.text_helpers.gen_chars", "colorlog.ColoredFormatter" ]
[((774, 797), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (795, 797), False, 'import logging\n'), ((834, 910), 'colorlog.ColoredFormatter', 'colorlog.ColoredFormatter', (['"""%(log_color)s%(levelname)s:%(name)s:%(message)s"""'], {}), "('%(log_color)s%(levelname)s:%(name)s:%(message)s')\n", (859,...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ .. module:: matrix :platform: Unix, Windows :synopsis: Operations on matrices. .. moduleauthor:: hbldh <<EMAIL>> Created on 2013-05-15, 10:45 """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals from...
[ "numpy.zeros", "numpy.int64" ]
[((981, 1010), 'numpy.zeros', 'np.zeros', (['(9,)'], {'dtype': '"""float"""'}), "((9,), dtype='float')\n", (989, 1010), True, 'import numpy as np\n'), ((2341, 2370), 'numpy.zeros', 'np.zeros', (['(9,)'], {'dtype': '"""int32"""'}), "((9,), dtype='int32')\n", (2349, 2370), True, 'import numpy as np\n'), ((3669, 3690), 'n...
#!/usr/bin/env python """Newtons Cradle example using the visualizer. This is the same example as provided in [1], but translated into Python and using the `raisimpy` library (which is a wrapper around `raisimLib` [2] and `raisimOgre` [3]). References: - [1] https://github.com/leggedrobotics/raisimOgre/blob/maste...
[ "numpy.identity", "raisimpy.OgreVis.get", "numpy.zeros", "raisimpy.World" ]
[((859, 879), 'raisimpy.OgreVis.get', 'raisim.OgreVis.get', ([], {}), '()\n', (877, 879), True, 'import raisimpy as raisim\n'), ((2034, 2048), 'raisimpy.World', 'raisim.World', ([], {}), '()\n', (2046, 2048), True, 'import raisimpy as raisim\n'), ((2199, 2219), 'raisimpy.OgreVis.get', 'raisim.OgreVis.get', ([], {}), '(...
""" Original version: https://github.com/bitcoin-core/HWI MIT License Copyright (c) 2017 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation...
[ "traceback.print_exc" ]
[((8046, 8067), 'traceback.print_exc', 'traceback.print_exc', ([], {}), '()\n', (8065, 8067), False, 'import traceback\n')]