code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import sys sys.path.append('/usr/users/oliverren/meng/check-worthy') from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.layers import Embedding, LSTM, Bidirectional, Dropout, Dense from keras import Sequential from src.data import debates import numpy as np...
[ "sys.path.append", "keras.preprocessing.sequence.pad_sequences", "keras.Sequential", "numpy.asarray", "keras.layers.Dropout", "keras.layers.LSTM", "sklearn.metrics.recall_score", "keras.preprocessing.text.Tokenizer", "src.data.debates.get_for_crossvalidation", "keras.layers.Dense", "sklearn.metr...
[((11, 68), 'sys.path.append', 'sys.path.append', (['"""/usr/users/oliverren/meng/check-worthy"""'], {}), "('/usr/users/oliverren/meng/check-worthy')\n", (26, 68), False, 'import sys\n'), ((561, 594), 'src.data.debates.get_for_crossvalidation', 'debates.get_for_crossvalidation', ([], {}), '()\n', (592, 594), False, 'fr...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import logging import webapp2 from google.appengine.api import taskqueue from appengine_module.test_results.handlers import util from appengine...
[ "logging.error", "json.loads", "google.appengine.api.taskqueue.add", "infra_libs.event_mon.Event", "appengine_module.test_results.model.testfile.TestFile.get_files", "infra_libs.ts_mon.CounterMetric", "appengine_module.test_results.model.jsonresults.JsonResults.load_json" ]
[((579, 684), 'infra_libs.ts_mon.CounterMetric', 'ts_mon.CounterMetric', (['"""test_results/num_test_results"""'], {'description': '"""Number of reported test results"""'}), "('test_results/num_test_results', description=\n 'Number of reported test results')\n", (599, 684), False, 'from infra_libs import ts_mon\n'),...
import requests import os from .ProvenanceObject import ProvenanceObject from .dependency import Dependency from .task_status import TaskStatus from .dataset import DataSet from .performance import Performance from datetime import datetime dfa_url = os.environ.get('DFA_URL',"http://localhost:22000/") class Task(Prov...
[ "os.environ.get", "requests.post", "datetime.datetime.now" ]
[((251, 303), 'os.environ.get', 'os.environ.get', (['"""DFA_URL"""', '"""http://localhost:22000/"""'], {}), "('DFA_URL', 'http://localhost:22000/')\n", (265, 303), False, 'import os\n'), ((3961, 3993), 'requests.post', 'requests.post', (['url'], {'json': 'message'}), '(url, json=message)\n', (3974, 3993), False, 'impor...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import os import copy import math from pathlib import Path import warnings from typing import Callable, Tuple, Union, List import decord from einops.layers.torch import Rearrange import matplotlib.pyplot as plt import numpy ...
[ "torch.utils.data.Subset", "os.path.join", "torch.manual_seed", "numpy.zeros", "matplotlib.pyplot.subplots", "pathlib.Path", "torchvision.transforms.Compose", "numpy.random.randint", "os.path.normpath", "warnings.warn", "einops.layers.torch.Rearrange", "matplotlib.pyplot.tight_layout", "os.l...
[((3444, 3457), 'torchvision.transforms.Compose', 'Compose', (['tfms'], {}), '(tfms)\n', (3451, 3457), False, 'from torchvision.transforms import Compose\n'), ((8514, 8535), 'os.listdir', 'os.listdir', (['self.root'], {}), '(self.root)\n', (8524, 8535), False, 'import os\n'), ((17194, 17212), 'matplotlib.pyplot.tight_l...
""" Usage: tpch-fed.py --file=<file> Options: --file=<file> Query file. -h --help Show this screen. --version Show version. """ import os import connectorx as cx from contexttimer import Timer from docopt import docopt import pandas as pd if __name__ == "__main__": args = doco...
[ "contexttimer.Timer", "connectorx.read_sql", "docopt.docopt" ]
[((316, 357), 'docopt.docopt', 'docopt', (['__doc__'], {'version': '"""Naval Fate 2.0"""'}), "(__doc__, version='Naval Fate 2.0')\n", (322, 357), False, 'from docopt import docopt\n'), ((612, 619), 'contexttimer.Timer', 'Timer', ([], {}), '()\n', (617, 619), False, 'from contexttimer import Timer\n'), ((643, 689), 'con...
# -*- coding: utf-8 -*- """ Copyright ArxanFintech Technology Ltd. 2018 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...
[ "json.loads", "rest.api.common.build_signature_body", "base64.b64decode", "json.dumps", "base64.b64encode", "sys.setdefaultencoding", "requests.Request", "rest.api.common.build_signature_body_base" ]
[((705, 736), 'sys.setdefaultencoding', 'sys.setdefaultencoding', (['"""utf-8"""'], {}), "('utf-8')\n", (727, 736), False, 'import sys\n'), ((5787, 5806), 'json.dumps', 'json.dumps', (['payload'], {}), '(payload)\n', (5797, 5806), False, 'import json\n'), ((5937, 5967), 'rest.api.common.build_signature_body', 'build_si...
#!/usr/bin/env python import re import sys import argparse ERRORMESSAGE = ("'ChromUsed' chromosome: '%s' chosen for GC-correction is not" " available in the Mappability file (--MappabilityPath):" "\n\t'%s'\nMake sure to just same prefixes in ChromUsed" " and Mappability ...
[ "argparse.ArgumentParser" ]
[((604, 668), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""Checking mappability chromosomes"""'}), "(prog='Checking mappability chromosomes')\n", (627, 668), False, 'import argparse\n')]
from __future__ import print_function import os import cv2 import pickle import argparse import numpy as np import pandas as pd import xml.dom.minidom import matplotlib.pyplot as plt from PIL import Image,ImageDraw root_dir = "./" #root_dir = "/home/ksuresh/fpn.pytorch-master/data/uavdt/data/VOCdevki...
[ "numpy.array", "matplotlib.pyplot.show", "os.listdir", "matplotlib.pyplot.hist" ]
[((2469, 2479), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (2477, 2479), True, 'import matplotlib.pyplot as plt\n'), ((2485, 2526), 'matplotlib.pyplot.hist', 'plt.hist', (['area'], {'bins': '(75)', 'range': '(0, 25000)'}), '(area, bins=75, range=(0, 25000))\n', (2493, 2526), True, 'import matplotlib.pyplot...
import os import platform import re import sys from typing import Any, List, Callable from functools import partial, wraps from contextlib import contextmanager from fabric.api import sudo, run, path, puts, quiet from fabric.contrib.files import upload_template from .git import get_active_branch_name def su(user): ...
[ "functools.partial", "fabric.api.path", "fabric.api.quiet", "fabric.api.sudo", "os.environ.get", "functools.wraps", "platform.system", "re.sub" ]
[((4414, 4468), 'functools.partial', 'partial', (['upload_template'], {'use_jinja': '(True)', 'backup': '(False)'}), '(upload_template, use_jinja=True, backup=False)\n', (4421, 4468), False, 'from functools import partial, wraps\n'), ((331, 355), 'functools.partial', 'partial', (['sudo'], {'user': 'user'}), '(sudo, use...
from cumulus.util.template_query import TemplateQuery try: # python 3 from unittest.mock import patch # noqa from unittest.mock import MagicMock except: # noqa # python 2 from mock import patch, MagicMock # noqa import unittest import troposphere from troposphere import codepipeline # noqa fro...
[ "troposphere.codepipeline.Stages", "cumulus.util.template_query.TemplateQuery.get_resource_by_type", "cumulus.steps.dev_tools.cloud_formation_action.CloudFormationAction", "troposphere.Template", "troposphere.codepipeline.Pipeline" ]
[((1762, 2126), 'cumulus.steps.dev_tools.cloud_formation_action.CloudFormationAction', 'cloud_formation_action.CloudFormationAction', ([], {'action_name': '"""CloudFormation"""', 'input_artifact_names': "['InfraInput']", 'input_template_path': '"""InfraInput::template.json"""', 'input_template_configuration': '"""Infra...
# -*- coding: utf-8 -*- import mock from pytube import cli @mock.patch('pytube.cli.YouTube') @mock.patch('pytube.cli.sys') def test_download(MockYouTube, mock_sys): instance = MockYouTube.return_value instance.prefetch_init.return_value = None instance.streams = mock.Mock() cli.download('asdf', 'asdf...
[ "mock.patch", "mock.Mock", "pytube.cli.download" ]
[((63, 95), 'mock.patch', 'mock.patch', (['"""pytube.cli.YouTube"""'], {}), "('pytube.cli.YouTube')\n", (73, 95), False, 'import mock\n'), ((97, 125), 'mock.patch', 'mock.patch', (['"""pytube.cli.sys"""'], {}), "('pytube.cli.sys')\n", (107, 125), False, 'import mock\n'), ((278, 289), 'mock.Mock', 'mock.Mock', ([], {}),...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: data.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflecti...
[ "google.protobuf.symbol_database.Default", "google.protobuf.descriptor.FieldDescriptor", "google.protobuf.descriptor.Descriptor", "google.protobuf.descriptor.MethodDescriptor" ]
[((434, 460), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (458, 460), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((1196, 1577), 'google.protobuf.descriptor.Descriptor', '_descriptor.Descriptor', ([], {'name': '"""GetIntDataArrayStreamRequest"...
#!/usr/bin/env python3 from setuptools import setup setup( name='pyverse', version='0.3', description='Stub description for pyverse.', install_requires=[], scripts=[], packages=['pyverse'], author='PyVerse contributors', author_email='<EMAIL>', maintainer="<NAME>", maintainer_em...
[ "setuptools.setup" ]
[((53, 835), 'setuptools.setup', 'setup', ([], {'name': '"""pyverse"""', 'version': '"""0.3"""', 'description': '"""Stub description for pyverse."""', 'install_requires': '[]', 'scripts': '[]', 'packages': "['pyverse']", 'author': '"""PyVerse contributors"""', 'author_email': '"""<EMAIL>"""', 'maintainer': '"""<NAME>""...
""" Main application """ import os import wx from events import EVT_FORWARD_MAIN_EVENT from main import MainFrame from wizard import SelectDBFileFrame __VERSION__ = '1.0.0' __APP_NAME__ = 'SQLiteClient' def read_conf_file(fp): """ Read configuration from file """ try: with open(fp) as f: ...
[ "os.mkdir", "os.path.exists", "wizard.SelectDBFileFrame", "wx.StandardPaths.Get", "os.path.join", "main.MainFrame" ]
[((1808, 1830), 'wizard.SelectDBFileFrame', 'SelectDBFileFrame', (['app'], {}), '(app)\n', (1825, 1830), False, 'from wizard import SelectDBFileFrame\n'), ((659, 681), 'wx.StandardPaths.Get', 'wx.StandardPaths.Get', ([], {}), '()\n', (679, 681), False, 'import wx\n'), ((760, 803), 'os.path.join', 'os.path.join', (['use...
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # 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 a...
[ "collections.defaultdict" ]
[((4514, 4531), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (4525, 4531), False, 'from collections import defaultdict\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask_restful import Resource from aiida.restapi.api import AiidaApi, App from aiida.restapi.run_api import run_api class NewResource(Resource): """ resource containing GET and POST methods. Description of each method follows: GET: returns id, ctime...
[ "aiida.restapi.run_api.run_api", "aiida.orm.QueryBuilder", "aiida.orm.Dict", "click.option", "click.command", "aiida.load_profile", "click.Path" ]
[((1642, 1657), 'click.command', 'click.command', ([], {}), '()\n', (1655, 1657), False, 'import click\n'), ((1659, 1737), 'click.option', 'click.option', (['"""-P"""', '"""--port"""'], {'type': 'click.INT', 'default': '(5000)', 'help': '"""Port number"""'}), "('-P', '--port', type=click.INT, default=5000, help='Port n...
import os from enum import Enum from typing import Optional, Union # pylint: disable=no-name-in-module from pydantic import ( BaseSettings, Field, SecretStr, validator, ) from sqlalchemy.engine import URL as SQLAlchemy_DB_URL class LogLevel(str, Enum): # https://docs.python.org/3/library/logging...
[ "pydantic.SecretStr", "os.environ.get", "pydantic.Field", "pydantic.validator", "sqlalchemy.engine.URL.create" ]
[((11937, 11988), 'os.environ.get', 'os.environ.get', (['"""HD_RUNTIME_ENVIRONMENT_FILE"""', 'None'], {}), "('HD_RUNTIME_ENVIRONMENT_FILE', None)\n", (11951, 11988), False, 'import os\n'), ((880, 984), 'pydantic.Field', 'Field', (['""""""'], {'env': '"""OPENAPI_PREFIX"""', 'description': '"""root path (necessary for Op...
# Universidade Federal de Viçosa - Campus Rio Paranaíba # Sistemas de Informação - Processamento Digital de Imagens # # Professor: <NAME> # Autores: # - MatheusRV (3929) # - iguit0 (3902) # - ThiagoMunich (3628) # # Filtragem espacial para suavização - Filtro de máximo e mínimo # Como Executa...
[ "scipy.ndimage.filters.minimum_filter", "scipy.ndimage.filters.maximum_filter", "scipy.misc.imread", "scipy.misc.imsave" ]
[((887, 923), 'scipy.ndimage.filters.maximum_filter', 'filters.maximum_filter', (['img'], {'size': 'ms'}), '(img, size=ms)\n', (909, 923), False, 'from scipy.ndimage import filters\n'), ((941, 977), 'scipy.ndimage.filters.minimum_filter', 'filters.minimum_filter', (['img'], {'size': 'ms'}), '(img, size=ms)\n', (963, 97...
#!/usr/bin/python3 # Imports import os import gi import sys if os.geteuid() != 0: exit("You need to have root privileges to run this.") gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gio class MainWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self) self.set_bo...
[ "gi.require_version", "gi.repository.Gtk.main", "gi.repository.Gtk.ColorButton", "gi.repository.Gtk.Box", "gi.repository.Gtk.HeaderBar", "gi.repository.Gtk.Button", "os.path.exists", "gi.repository.Gio.ThemedIcon", "gi.repository.Gtk.Image.new_from_gicon", "gi.repository.Gtk.Grid", "os.geteuid",...
[((143, 175), 'gi.require_version', 'gi.require_version', (['"""Gtk"""', '"""3.0"""'], {}), "('Gtk', '3.0')\n", (161, 175), False, 'import gi\n'), ((5038, 5048), 'gi.repository.Gtk.main', 'Gtk.main', ([], {}), '()\n', (5046, 5048), False, 'from gi.repository import Gtk, Gio\n'), ((65, 77), 'os.geteuid', 'os.geteuid', (...
__author__ = 'team12' # This program uses Elasticsearch to retrieve data from couchdb and uses googlemap to get the suburb of the tweet. #The output file is used in data visualization section. # This program serves for the topic of racial issue import copy import json import time import googlemaps from elastics...
[ "elasticsearch.Elasticsearch", "googlemaps.Client", "copy.deepcopy", "json.loads", "json.dumps", "time.time" ]
[((697, 750), 'elasticsearch.Elasticsearch', 'Elasticsearch', (["[{'host': host_ip, 'port': host_port}]"], {}), "([{'host': host_ip, 'port': host_port}])\n", (710, 750), False, 'from elasticsearch import Elasticsearch\n'), ((843, 864), 'json.loads', 'json.loads', (['baseQuery'], {}), '(baseQuery)\n', (853, 864), False,...
# # Copyright (c) Contributors to the Open 3D Engine Project. # For complete copyright and license terms please see the LICENSE at the root of this distribution. # # SPDX-License-Identifier: Apache-2.0 OR MIT # # import argparse import fnmatch import os handled_file_patterns = [ '*.c', '*.cc', '*.cpp', '*.cxx', '...
[ "argparse.ArgumentParser", "os.path.basename", "os.path.isdir", "os.walk", "os.path.join", "fnmatch.fnmatch" ]
[((1279, 1406), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""This script replaces tabs with spaces"""', 'formatter_class': 'argparse.RawTextHelpFormatter'}), "(description='This script replaces tabs with spaces',\n formatter_class=argparse.RawTextHelpFormatter)\n", (1302, 1406), Fal...
from kivy.lang import Builder from kivymd.app import MDApp class SampleUpdater(MDApp): def build(self): kv = """ FloatLayout: MDFlatButton: id: chk_update_button text: "Check for Updates" pos_hint: {'center_x': 0.5, 'center_y': 0.5} on_release: self.text = "Checking......
[ "kivyappupdater.AppUpdater.Updater", "kivy.lang.Builder.load_string" ]
[((387, 410), 'kivy.lang.Builder.load_string', 'Builder.load_string', (['kv'], {}), '(kv)\n', (406, 410), False, 'from kivy.lang import Builder\n'), ((505, 525), 'kivyappupdater.AppUpdater.Updater', 'AppUpdater.Updater', ([], {}), '()\n', (523, 525), False, 'from kivyappupdater import AppUpdater\n')]
# Built in python libs import sys import os from typing import Dict, List # Additional libs import cv2 import numpy as np # Custom imports from .astar import * import matplotlib.pyplot as plt # Source for visualization functions: # https://www.analytics-link.com/post/2018/09/14/applying-the-a-path-finding-algorithm...
[ "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((413, 443), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {'figsize': '(12, 12)'}), '(figsize=(12, 12))\n', (425, 443), True, 'import matplotlib.pyplot as plt\n'), ((701, 711), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (709, 711), True, 'import matplotlib.pyplot as plt\n')]
"""Support for KNX scenes.""" from __future__ import annotations from typing import Any from xknx import XKNX from xknx.devices import Scene as XknxScene from homeassistant.components.scene import Scene from homeassistant.const import CONF_NAME from homeassistant.core import HomeAssistant from homeassistant.helpers....
[ "xknx.devices.Scene" ]
[((1357, 1487), 'xknx.devices.Scene', 'XknxScene', (['xknx'], {'name': 'config[CONF_NAME]', 'group_address': 'config[KNX_ADDRESS]', 'scene_number': 'config[SceneSchema.CONF_SCENE_NUMBER]'}), '(xknx, name=config[CONF_NAME], group_address=config[KNX_ADDRESS],\n scene_number=config[SceneSchema.CONF_SCENE_NUMBER])\n', (...
import serial import time import matplotlib.pyplot as plt import numpy as np from scipy import signal from scipy.fft import fft, ifft, fftfreq from math import pi from scipy.signal import butter, lfilter def avg(list): return sum(list)/len(list) def butter_bandpass(lowcut, highcut, fs, order=5): nyq = 0.5 * f...
[ "serial.Serial", "matplotlib.pyplot.title", "matplotlib.pyplot.show", "scipy.signal.welch", "matplotlib.pyplot.plot", "scipy.signal.lfilter", "time.sleep", "time.time", "matplotlib.pyplot.figure", "numpy.linspace", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.semilogy", "matplotlib.pyplot....
[((381, 421), 'scipy.signal.butter', 'butter', (['order', '[low, high]'], {'btype': '"""band"""'}), "(order, [low, high], btype='band')\n", (387, 421), False, 'from scipy.signal import butter, lfilter\n'), ((572, 591), 'scipy.signal.lfilter', 'lfilter', (['b', 'a', 'data'], {}), '(b, a, data)\n', (579, 591), False, 'fr...
import heapq class MaxHeap: """ Max heap """ def __init__(self, capacity): self.heap = [] self.capacity = capacity def add(self, score, term): item = (score, term) if len(self.heap) >= self.capacity: heapq.heappushpop(self.heap, item) else: ...
[ "heapq.heappush", "heapq.heapify", "heapq.heappushpop" ]
[((393, 417), 'heapq.heapify', 'heapq.heapify', (['self.heap'], {}), '(self.heap)\n', (406, 417), False, 'import heapq\n'), ((268, 302), 'heapq.heappushpop', 'heapq.heappushpop', (['self.heap', 'item'], {}), '(self.heap, item)\n', (285, 302), False, 'import heapq\n'), ((329, 360), 'heapq.heappush', 'heapq.heappush', ([...
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-09-30 21:58 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): replaces = [('ghu_main', '0003_toolkit'), ('ghu_main', '0004_auto_20170916_1857'), ('g...
[ "django.db.models.CharField", "django.db.models.PositiveIntegerField", "django.db.models.ForeignKey", "django.db.models.AutoField" ]
[((547, 640), '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", (563, 640), False, 'from django.db import migrations, models\...
from control import press def test_tutorial_screen(running_app, root_manager): from screens.tutorial import TutorialScreen screen = TutorialScreen() manager = screen.main_manager assert manager.current == 'welcome' assert manager.has_screen('start_test') assert manager.has_screen('tasks_to_sta...
[ "screens.activity.content.FilterPanel", "control.press", "screens.tutorial.TutorialScreen" ]
[((142, 158), 'screens.tutorial.TutorialScreen', 'TutorialScreen', ([], {}), '()\n', (156, 158), False, 'from screens.tutorial import TutorialScreen\n'), ((557, 593), 'control.press', 'press', (['start_test_screen.next_button'], {}), '(start_test_screen.next_button)\n', (562, 593), False, 'from control import press\n')...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('xblock_django', '0001_initial'), ] operations = [ migrations.AddField( model_name='xblockdisableconfig', name='disabled_create_blocks', field=models.Text...
[ "django.db.models.TextField" ]
[((309, 446), 'django.db.models.TextField', 'models.TextField', ([], {'default': '""""""', 'help_text': '"""Space-separated list of XBlock types whose creation to disable in Studio."""', 'blank': '(True)'}), "(default='', help_text=\n 'Space-separated list of XBlock types whose creation to disable in Studio.'\n ,...
# -*- coding: utf-8 -*- from findy.interface import Region, Provider, EntityType from findy.database.schema.misc.holder import HolderBase from findy.database.plugins.register import register_schema from findy.database.plugins.eastmoney.holder.top_ten_holder_recorder import * from findy.database.plugins.eastmoney.holder...
[ "findy.database.plugins.register.register_schema" ]
[((365, 488), 'findy.database.plugins.register.register_schema', 'register_schema', (['Region.CHN', 'Provider.EastMoney'], {'db_name': '"""holder"""', 'schema_base': 'HolderBase', 'entity_type': 'EntityType.Stock'}), "(Region.CHN, Provider.EastMoney, db_name='holder',\n schema_base=HolderBase, entity_type=EntityType...
#!/usr/bin/env python """ Scan process for COM classes """ import os import sys import lib_util import lib_common from lib_properties import pc import lib_com_type_lib from sources_types import CIM_Process from sources_types.CIM_Process import memory_regex_search SlowScript = True def Main(): cgiEnv = lib_common...
[ "lib_common.gUriGen.PidUri", "lib_common.CgiEnv", "lib_common.gUriGen.ComRegisteredTypeLibUri", "sys.exc_info", "sources_types.CIM_Process.memory_regex_search.GetRegexMatches", "lib_common.MakeProp" ]
[((310, 329), 'lib_common.CgiEnv', 'lib_common.CgiEnv', ([], {}), '()\n', (327, 329), False, 'import lib_common\n'), ((406, 439), 'lib_common.gUriGen.PidUri', 'lib_common.gUriGen.PidUri', (['pidint'], {}), '(pidint)\n', (431, 439), False, 'import lib_common\n'), ((547, 599), 'sources_types.CIM_Process.memory_regex_sear...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ "superset.key_value.utils.extract_key", "superset.db.session.add", "superset.db.session.commit", "uuid.UUID", "superset.key_value.exceptions.KeyValueCreateFailedError", "datetime.datetime.now", "superset.db.session.rollback", "logging.getLogger", "pickle.dumps" ]
[((1294, 1321), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1311, 1321), False, 'import logging\n'), ((3364, 3385), 'superset.db.session.add', 'db.session.add', (['entry'], {}), '(entry)\n', (3378, 3385), False, 'from superset import db\n'), ((3394, 3413), 'superset.db.session.commit'...
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-11-19 23:16 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('applications', '0004_empty_resume'), ] ...
[ "django.db.migrations.RenameField" ]
[((344, 438), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""application"""', 'old_name': '"""scholarship"""', 'new_name': '"""reimb"""'}), "(model_name='application', old_name='scholarship',\n new_name='reimb')\n", (366, 438), False, 'from django.db import migrations, models\n...
import discord from discord.ext import commands, tasks import requests from bs4 import BeautifulSoup import re text_channels = {} voice_channels = {} class CustomChannelCog(commands.Cog): def __init__(self, bot): self.bot = bot async def getVoiceChannel(self, ctx, user): role = next((role...
[ "discord.utils.get", "discord.ext.commands.command" ]
[((535, 587), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""createvoice"""', 'aliases': "['cv']"}), "(name='createvoice', aliases=['cv'])\n", (551, 587), False, 'from discord.ext import commands, tasks\n'), ((1397, 1448), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""limi...
import FWCore.ParameterSet.Config as cms ## baseline configuration in the class itself from EventFilter.CSCRawToDigi.cscPackerDef_cfi import cscPackerDef cscpacker = cscPackerDef.clone() ## In Run-2 common: update the format version for new OTMBs in ME1/1 ## Note: in the past, the packing with triggers and pretrigger...
[ "Configuration.Eras.Modifier_run2_common_cff.run2_common.toModify", "Configuration.Eras.Modifier_run3_GEM_cff.run3_GEM.toModify", "EventFilter.CSCRawToDigi.cscPackerDef_cfi.cscPackerDef.clone" ]
[((167, 187), 'EventFilter.CSCRawToDigi.cscPackerDef_cfi.cscPackerDef.clone', 'cscPackerDef.clone', ([], {}), '()\n', (185, 187), False, 'from EventFilter.CSCRawToDigi.cscPackerDef_cfi import cscPackerDef\n'), ((507, 558), 'Configuration.Eras.Modifier_run2_common_cff.run2_common.toModify', 'run2_common.toModify', (['cs...
from datetime import datetime from django.conf import settings from django.contrib.admin.sites import AdminSite from django.core.files.storage import default_storage from django.test import SimpleTestCase from django.utils.dateformat import format from .admin import BookmarkAdmin from . import forms from .models impo...
[ "django.core.files.storage.default_storage.exists", "datetime.datetime.today" ]
[((2743, 2791), 'django.core.files.storage.default_storage.exists', 'default_storage.exists', (['self.bookmark1.images[0]'], {}), '(self.bookmark1.images[0])\n', (2765, 2791), False, 'from django.core.files.storage import default_storage\n'), ((3188, 3237), 'django.core.files.storage.default_storage.exists', 'default_s...
import re from core.msfActionModule import msfActionModule from core.keystore import KeyStore as kb from core.utils import Utils class scan_msf_smbuserenum(msfActionModule): def __init__(self, config, display, lock): super(scan_msf_smbuserenum, self).__init__(config, display, lock) self.title = "...
[ "core.utils.Utils.getRandStr", "core.utils.Utils.writeFile", "core.keystore.KeyStore.get" ]
[((710, 743), 'core.keystore.KeyStore.get', 'kb.get', (['"""vuln/host/*/nullSession"""'], {}), "('vuln/host/*/nullSession')\n", (716, 743), True, 'from core.keystore import KeyStore as kb\n'), ((2545, 2577), 'core.utils.Utils.writeFile', 'Utils.writeFile', (['result', 'outfile'], {}), '(result, outfile)\n', (2560, 2577...
#!/usr/bin/python # # Exmaple program for TensorFlow # Author: <NAME> (https://github.com/yungshenglu) import tensorflow as tf hello = tf.constant("Hello world, TensorFlow!") sess = tf.Session() print(sess.run(hello))
[ "tensorflow.Session", "tensorflow.constant" ]
[((137, 176), 'tensorflow.constant', 'tf.constant', (['"""Hello world, TensorFlow!"""'], {}), "('Hello world, TensorFlow!')\n", (148, 176), True, 'import tensorflow as tf\n'), ((184, 196), 'tensorflow.Session', 'tf.Session', ([], {}), '()\n', (194, 196), True, 'import tensorflow as tf\n')]
import abc import requests import execjs import os class BasicMangaDownload: __metaclass__ = abc.ABCMeta def __init__(self): self.headers = { 'Accept': '*/*', 'Accept-Language': 'en-US,en;q=0.8', 'Cache-Control': 'max-age=0', 'User-Agent': '...
[ "requests.head", "os.makedirs", "os.getcwd", "os.path.exists", "requests.get" ]
[((1131, 1176), 'requests.get', 'requests.get', (['image_url'], {'headers': 'self.headers'}), '(image_url, headers=self.headers)\n', (1143, 1176), False, 'import requests\n'), ((953, 964), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (962, 964), False, 'import os\n'), ((1057, 1082), 'os.path.exists', 'os.path.exists', (...
# file findingaids/content/sitemaps.py # # Copyright 2012 Emory University Library # # 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....
[ "django.core.urlresolvers.reverse" ]
[((1180, 1208), 'django.core.urlresolvers.reverse', 'reverse', (["('content:%s' % page)"], {}), "('content:%s' % page)\n", (1187, 1208), False, 'from django.core.urlresolvers import reverse\n'), ((1262, 1283), 'django.core.urlresolvers.reverse', 'reverse', (['"""site-index"""'], {}), "('site-index')\n", (1269, 1283), F...
import heapq def kthSmallest(matrix: [[int]], k: int) -> int: n = len(matrix) p = [(matrix[i][0], i, 0) for i in range(n)] heapq.heapify(p) for i in range(k - 1): num, i, j = heapq.heappop(p) if j < n - 1: heapq.heappush(p, (matrix[i][j + 1], i, j + 1)) return heapq.heapp...
[ "heapq.heappush", "heapq.heapify", "heapq.heappop" ]
[((135, 151), 'heapq.heapify', 'heapq.heapify', (['p'], {}), '(p)\n', (148, 151), False, 'import heapq\n'), ((199, 215), 'heapq.heappop', 'heapq.heappop', (['p'], {}), '(p)\n', (212, 215), False, 'import heapq\n'), ((309, 325), 'heapq.heappop', 'heapq.heappop', (['p'], {}), '(p)\n', (322, 325), False, 'import heapq\n')...
from datetime import datetime import click import numpy as np import pandas import pyarrow import pyarrow.parquet as pq import yaml from cloudpathlib import AnyPath, CloudPath from deepdiff import DeepDiff from simple_term_menu import TerminalMenu from tqdm import tqdm import tempfile TYPE_MAPPINGS = {"numeric": "byt...
[ "yaml.dump", "click.option", "pyarrow.Table.from_pandas", "cloudpathlib.AnyPath", "pandas.read_sql", "pandas.set_option", "tempfile.TemporaryDirectory", "click.command", "pyarrow.uint64", "pyarrow.binary", "pyarrow.bool_", "datetime.datetime.now", "simple_term_menu.TerminalMenu", "tqdm.tqd...
[((414, 430), 'pyarrow.uint32', 'pyarrow.uint32', ([], {}), '()\n', (428, 430), False, 'import pyarrow\n'), ((10988, 11003), 'click.command', 'click.command', ([], {}), '()\n', (11001, 11003), False, 'import click\n'), ((11005, 11113), 'click.option', 'click.option', (['"""--subgraph-config"""'], {'help': '"""The confi...
from django.test import TestCase from shop.models import * from django.contrib.auth.models import User, Group class OrderTest(TestCase): def setUp(self): ProductClass.objects.create(name='коробка', slug='box') ProductClass.objects.create(name='шнур', slug='cord') Product.objects.create(nam...
[ "django.contrib.auth.models.User.objects.create", "django.contrib.auth.models.User.objects.get", "django.contrib.auth.models.Group.objects.get", "django.contrib.auth.models.Group.objects.create" ]
[((1118, 1195), 'django.contrib.auth.models.User.objects.create', 'User.objects.create', ([], {'username': '"""<EMAIL>"""', 'email': '"""<EMAIL>"""', 'password': '"""password"""'}), "(username='<EMAIL>', email='<EMAIL>', password='password')\n", (1137, 1195), False, 'from django.contrib.auth.models import User, Group\n...
# Copyright (C) 2016-present the asyncpg authors and contributors # <see AUTHORS file> # # This module is part of asyncpg and is released under # the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0 import os import subprocess import sys import unittest def find_root(): return os.path.dirname(os.pa...
[ "subprocess.run", "os.path.abspath", "os.path.exists", "unittest.SkipTest", "os.path.join" ]
[((480, 514), 'os.path.join', 'os.path.join', (['root_path', '""".flake8"""'], {}), "(root_path, '.flake8')\n", (492, 514), False, 'import os\n'), ((331, 356), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (346, 356), False, 'import os\n'), ((530, 557), 'os.path.exists', 'os.path.exists', ([...
""" Copyright Government of Canada 2020 Written by: <NAME> National Microbiology Laboratory, Public Health Agency of Canada Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License at: http://www.apache....
[ "os.path.isfile", "gzip.open", "re.match" ]
[((2734, 2763), 'os.path.isfile', 'os.path.isfile', (['file_location'], {}), '(file_location)\n', (2748, 2763), False, 'import os\n'), ((2911, 2946), 'gzip.open', 'gzip.open', (['file_location'], {'mode': '"""rt"""'}), "(file_location, mode='rt')\n", (2920, 2946), False, 'import gzip\n'), ((1627, 1649), 're.match', 're...
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2021-02-14 18:01 import os from typing import Dict, Any, Union, Iterable, Callable, Optional, Tuple import matplotlib.pyplot as plt import torch from elit.common.dataset import MultiTaskDataLoader from elit.components.mtl.gated.draw_attn import heatmap from elit.componen...
[ "torch.stack", "os.makedirs", "matplotlib.pyplot.clf", "torch.save", "transformers.optimization.get_linear_schedule_with_warmup", "elit.components.mtl.gated.history.HistoryWithSummary", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.gcf", "matplotlib.pyplot.xlabel", "elit.components.mtl.gated.gate...
[((5906, 5924), 'torch.stack', 'torch.stack', (['gates'], {}), '(gates)\n', (5917, 5924), False, 'import torch\n'), ((6280, 6308), 'elit.components.mtl.gated.history.HistoryWithSummary', 'HistoryWithSummary', (['save_dir'], {}), '(save_dir)\n', (6298, 6308), False, 'from elit.components.mtl.gated.history import History...
import pytest from django.urls import reverse from pontoon.checks.utils import bulk_run_checks from pontoon.test.factories import TranslationFactory, ProjectLocaleFactory @pytest.yield_fixture def batch_action(client, admin_client): """ Shortcut function to make API-call more readable in tests. """ ...
[ "pontoon.checks.utils.bulk_run_checks", "pontoon.test.factories.ProjectLocaleFactory.create", "django.urls.reverse", "pontoon.test.factories.TranslationFactory.create" ]
[((905, 1082), 'pontoon.test.factories.TranslationFactory.create', 'TranslationFactory.create', ([], {'string': '"""Test Translation"""', 'active': '(True)', 'approved': '(False)', 'entity__key': '"""test"""', 'entity__resource__format': '"""dtd"""', 'entity__resource__path': '"""test.dtd"""'}), "(string='Test Translat...
# -*- coding: utf-8 -*- import angus conn = angus.connect() service = conn.services.get_service('text_to_speech', version=1) job = service.process({'text': "Hi guys, how are you today?", 'lang' : "en-US"}) ### The output wav file is available as compressed (zlib), base64 string. sound = job.result["sound"]
[ "angus.connect" ]
[((45, 60), 'angus.connect', 'angus.connect', ([], {}), '()\n', (58, 60), False, 'import angus\n')]
from __future__ import absolute_import, division, print_function, unicode_literals version = '0.5.7' from os import path cwd = path.abspath(path.dirname(__file__)) _instance = None def instance(new=None): global _instance if new: _instance = new return _instance from . import yaml from .config i...
[ "os.path.dirname" ]
[((142, 164), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (154, 164), False, 'from os import path\n')]
import socket s = socket.socket() host = socket.gethostname() port = 12345 s.connect((host,port)) print(s.recv(1024)) s.close()
[ "socket.gethostname", "socket.socket" ]
[((18, 33), 'socket.socket', 'socket.socket', ([], {}), '()\n', (31, 33), False, 'import socket\n'), ((42, 62), 'socket.gethostname', 'socket.gethostname', ([], {}), '()\n', (60, 62), False, 'import socket\n')]
import re # unicodedata2 is the unicodedata backport to Python 2 try: import unicodedata2 as unicodedata except ImportError: import unicodedata import urlparse def clean_url(url): """Takes a user-supplied url and cleans bits out This removes: 1. nixes any non http/https/chrome/about urls 2....
[ "unicodedata.name", "urlparse.urlparse", "urlparse.urlunparse", "re.compile" ]
[((819, 848), 're.compile', 're.compile', (['u"""[𐀀-\U0010ffff]"""'], {}), "(u'[𐀀-\\U0010ffff]')\n", (829, 848), False, 'import re\n'), ((524, 546), 'urlparse.urlparse', 'urlparse.urlparse', (['url'], {}), '(url)\n', (541, 546), False, 'import urlparse\n'), ((767, 795), 'urlparse.urlunparse', 'urlparse.urlunparse', (...
""" Leetcode 1301 """ from collections import defaultdict import bisect class Solution: def isSubsequence(self, s: str, t: str) -> bool: if len(t) == 0: return False if len(s) == 0: return True i = 0 j = 0 while i < len(s) and j < len(t): ...
[ "collections.defaultdict", "bisect.bisect_left" ]
[((509, 526), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (520, 526), False, 'from collections import defaultdict\n'), ((970, 1005), 'bisect.bisect_left', 'bisect.bisect_left', (['store[c]', 'start'], {}), '(store[c], start)\n', (988, 1005), False, 'import bisect\n')]
from collections import defaultdict from tqdm import tqdm import numpy as np import gym import wandb import trueskill import torch from torch import nn from torch.nn.utils import rnn from ray import rllib from pdb import set_trace as TT import ray.rllib.agents.ppo.ppo as ppo import ray.rllib.agents.ppo.appo as appo...
[ "trueskill.setup", "torch.nn.Embedding", "gym.spaces.Discrete", "torch.cat", "collections.defaultdict", "neural_mmo.forge.ethyr.torch.policy.attention.DotReluBlock", "torch.nn.ModuleDict", "numpy.mean", "torch.nn.utils.rnn.pad_packed_sequence", "torch.arange", "neural_mmo.forge.blade.io.stimulus...
[((13444, 13532), 'gym.spaces.Box', 'gym.spaces.Box', ([], {'low': '(0)', 'high': 'config.N_AGENT_OBS', 'shape': '(1,)', 'dtype': 'DataType.DISCRETE'}), '(low=0, high=config.N_AGENT_OBS, shape=(1,), dtype=DataType.\n DISCRETE)\n', (13458, 13532), False, 'import gym\n'), ((1606, 1621), 'torch.nn.ModuleDict', 'nn.Modu...
""" """ import functools import xarray as xr from .utils import ( unzip, progbar, Timer, benchmark, Benchmarker, RunningStatistics, estimate_from_repeats, ) from .gen.combo_runner import ( combo_runner, combo_runner_to_ds, ) from .gen.case_runner import ( case_runner, find_u...
[ "xarray.register_dataarray_accessor", "xarray.register_dataset_accessor", "functools.wraps" ]
[((3153, 3178), 'functools.wraps', 'functools.wraps', (['LinePlot'], {}), '(LinePlot)\n', (3168, 3178), False, 'import functools\n'), ((3278, 3303), 'functools.wraps', 'functools.wraps', (['lineplot'], {}), '(lineplot)\n', (3293, 3303), False, 'import functools\n'), ((3403, 3427), 'functools.wraps', 'functools.wraps', ...
# -*- coding: utf-8 -*- # @Time : 2018/6/7 # @Author : geekspeng # @Email : <EMAIL> import os from shutil import move from flask import render_template, url_for, redirect, request, flash, current_app, send_from_directory from flask_login import login_required, current_user from flask_uploads import extension fro...
[ "flask.url_for", "app.models.books.Books.search_book", "app.main.forms.ConvertBookForm", "os.path.join", "app.models.books.Books.timestamp.desc", "flask.request.args.get", "flask.request.files.getlist", "app.utils.helper.resolve_folder_conflict", "flask_uploads.extension", "app.main.main.route", ...
[((565, 602), 'app.main.main.route', 'main.route', (['"""/"""'], {'defaults': "{'page': 1}"}), "('/', defaults={'page': 1})\n", (575, 602), False, 'from app.main import main\n'), ((604, 634), 'app.main.main.route', 'main.route', (['"""/page/<int:page>"""'], {}), "('/page/<int:page>')\n", (614, 634), False, 'from app.ma...
#!/usr/bin/env python import re from django.core.management.base import BaseCommand from django.utils.translation import ugettext as _ from onadata.apps.restservice.models import RestService from onadata.libs.utils.common_tags import TEXTIT class Command(BaseCommand): help = _("Migrate TextIt/RapidPro v1 URLS ...
[ "django.utils.translation.ugettext", "re.sub", "re.compile", "onadata.apps.restservice.models.RestService.objects.filter" ]
[((285, 333), 'django.utils.translation.ugettext', '_', (['"""Migrate TextIt/RapidPro v1 URLS to v2 URLS."""'], {}), "('Migrate TextIt/RapidPro v1 URLS to v2 URLS.')\n", (286, 333), True, 'from django.utils.translation import ugettext as _\n'), ((537, 576), 'onadata.apps.restservice.models.RestService.objects.filter', ...
from unittest import mock import graphene from django.utils.functional import SimpleLazyObject from freezegun import freeze_time from .....page.error_codes import PageErrorCode from .....page.models import PageType from .....webhook.event_types import WebhookEventAsyncType from .....webhook.payloads import generate_m...
[ "unittest.mock.patch", "freezegun.freeze_time", "django.utils.functional.SimpleLazyObject", "graphene.Node.to_global_id" ]
[((2118, 2152), 'freezegun.freeze_time', 'freeze_time', (['"""2022-05-12 12:00:00"""'], {}), "('2022-05-12 12:00:00')\n", (2129, 2152), False, 'from freezegun import freeze_time\n'), ((2154, 2220), 'unittest.mock.patch', 'mock.patch', (['"""saleor.plugins.webhook.plugin.get_webhooks_for_event"""'], {}), "('saleor.plugi...
#!/usr/bin/python #-*- coding:utf-8 -*- import sys import struct import numpy as np import tensorflow as tf def lrn_f32(): para_int = [] para_float = [] # init the input data and parameters batch = int(np.random.randint(1, high=4, size=1)) in_size_x = int(np.random.randint(16, high=32, size...
[ "numpy.random.uniform", "numpy.transpose", "tensorflow.nn.local_response_normalization", "tensorflow.Session", "numpy.random.randint", "numpy.random.normal" ]
[((819, 895), 'numpy.random.normal', 'np.random.normal', (['zero_point', 'std', '(batch, in_size_y, in_size_x, in_channel)'], {}), '(zero_point, std, (batch, in_size_y, in_size_x, in_channel))\n', (835, 895), True, 'import numpy as np\n'), ((953, 1028), 'tensorflow.nn.local_response_normalization', 'tf.nn.local_respons...
import aiohttp import asyncio from datetime import datetime async def main(): async with aiohttp.ClientSession() as client: html = await client.get('https://www.baidu.com/') print(html) loop = asyncio.get_event_loop() tasks = [] for i in range(100): task = loop.create_task(main()...
[ "aiohttp.ClientSession", "asyncio.get_event_loop", "datetime.datetime.now" ]
[((224, 248), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (246, 248), False, 'import asyncio\n'), ((357, 371), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (369, 371), False, 'from datetime import datetime\n'), ((416, 430), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n...
# Generated by Django 2.0.8 on 2018-11-21 23:49 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ticket', '0003_remove_ticket_price'), ] operations = [ migrations.AddField( model_name='ticket', ...
[ "django.db.models.CharField" ]
[((610, 701), 'django.db.models.CharField', 'models.CharField', ([], {'help_text': '"""Assento"""', 'max_length': '(50)', 'null': '(True)', 'verbose_name': '"""Assento"""'}), "(help_text='Assento', max_length=50, null=True,\n verbose_name='Assento')\n", (626, 701), False, 'from django.db import migrations, models\n'...
""" Test example snippets from the lldb 'help expression' output. """ from __future__ import print_function import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class Radar9673644TestCase(TestBase): mydir = TestBase.compute_mydir(__file_...
[ "lldbsuite.test.lldbutil.run_break_set_by_file_and_line" ]
[((792, 912), 'lldbsuite.test.lldbutil.run_break_set_by_file_and_line', 'lldbutil.run_break_set_by_file_and_line', (['self', 'self.main_source', 'self.line'], {'num_expected_locations': '(1)', 'loc_exact': '(True)'}), '(self, self.main_source, self.line,\n num_expected_locations=1, loc_exact=True)\n', (831, 912), Fa...
# -*- coding: utf-8 -*- # # parselglossy -- Generic input parsing library, speaking in tongues # Copyright (C) 2020 <NAME>, <NAME>, and contributors. # # This file is part of parselglossy. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation fi...
[ "hypothesis.strategies.sampled_from", "hypothesis.strategies.booleans", "hypothesis.strategies.complex_numbers", "collections.namedtuple", "hypothesis.strategies.text", "hypothesis.strategies.floats" ]
[((1550, 1593), 'collections.namedtuple', 'namedtuple', (['"""Strategy"""', "['string', 'value']"], {}), "('Strategy', ['string', 'value'])\n", (1560, 1593), False, 'from collections import namedtuple\n'), ((1819, 1867), 'hypothesis.strategies.floats', 'st.floats', ([], {'allow_nan': '(False)', 'allow_infinity': '(Fals...
from sklearn.model_selection import cross_val_score from sklearn.model_selection import train_test_split import pandas as pd import numpy as np import matplotlib.pyplot as plt from lightgbm import LGBMRegressor pd.options.display.max_columns = 50 pd.options.display.width = 1000 training_data = pd.read_csv('training_da...
[ "pandas.DataFrame", "matplotlib.pyplot.show", "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.model_selection.cross_val_score", "numpy.zeros", "numpy.random.random", "matplotlib.pyplot.subplots_adjust", "lightgbm.LGBMRegressor", "matplotlib.pyplot.subplots" ]
[((296, 363), 'pandas.read_csv', 'pd.read_csv', (['"""training_data/covid19_measure_assessment_dataset.csv"""'], {}), "('training_data/covid19_measure_assessment_dataset.csv')\n", (307, 363), True, 'import pandas as pd\n'), ((622, 689), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'y'], {'shuf...
# Copyright 2011 <NAME>. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the foll...
[ "whoosh.writing.SegmentWriter.cancel", "whoosh.compat.xrange", "whoosh.externalsort.imerge", "whoosh.writing.SegmentWriter", "whoosh.writing.SegmentWriter.commit", "whoosh.writing.SegmentWriter.__init__", "multiprocessing.Queue", "whoosh.codec.base.MultiPerDocumentReader", "multiprocessing.Process._...
[((2873, 2895), 'multiprocessing.Process.__init__', 'Process.__init__', (['self'], {}), '(self)\n', (2889, 2895), False, 'from multiprocessing import Process, Queue, cpu_count\n'), ((4443, 4486), 'whoosh.writing.SegmentWriter', 'SegmentWriter', (['ix'], {'_lk': '(False)'}), '(ix, _lk=False, **self.kwargs)\n', (4456, 44...
from abc import ABC, abstractmethod from datetime import datetime from enum import Enum from harvestmouseapp.mvc_model.model import MouseList, ColumnList class FilterType(Enum): """ This is the enumuration of the filter type which represents different method of filtering of mouse list """ GTE = 0 ...
[ "harvestmouseapp.mvc_model.model.MouseList", "datetime.datetime.strptime" ]
[((2586, 2597), 'harvestmouseapp.mvc_model.model.MouseList', 'MouseList', ([], {}), '()\n', (2595, 2597), False, 'from harvestmouseapp.mvc_model.model import MouseList, ColumnList\n'), ((2811, 2847), 'datetime.datetime.strptime', 'datetime.strptime', (['value', '"""%Y-%m-%d"""'], {}), "(value, '%Y-%m-%d')\n", (2828, 28...
from datetime import datetime import pandas as pd from airflow.models import Variable from airflow.operators.bash import BashOperator from airflow.operators.python_operator import PythonOperator from minio import Minio from airflow import DAG DEFAULT_ARGS = { "owner": "Airflow", "depends_on_past": False, ...
[ "airflow.DAG", "airflow.operators.bash.BashOperator", "minio.Minio", "airflow.operators.python_operator.PythonOperator", "airflow.models.Variable.get", "pandas.read_json", "datetime.datetime" ]
[((367, 463), 'airflow.DAG', 'DAG', (['"""etl_satisfaction_evaluation_att"""'], {'default_args': 'DEFAULT_ARGS', 'schedule_interval': '"""@once"""'}), "('etl_satisfaction_evaluation_att', default_args=DEFAULT_ARGS,\n schedule_interval='@once')\n", (370, 463), False, 'from airflow import DAG\n'), ((495, 527), 'airflo...
import tkinter as tk janela = tk.Tk() mensagem_para_usuario = "mensagem que pode ser util para um user" msg = tk.Message(janela, text= mensagem_para_usuario) msg.config(bg='#f5fffa',font=('times',24,'italic')) msg.pack() janela.mainloop()
[ "tkinter.Message", "tkinter.Tk" ]
[((30, 37), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (35, 37), True, 'import tkinter as tk\n'), ((110, 156), 'tkinter.Message', 'tk.Message', (['janela'], {'text': 'mensagem_para_usuario'}), '(janela, text=mensagem_para_usuario)\n', (120, 156), True, 'import tkinter as tk\n')]
"""Tests for loqusdb extension""" import subprocess import pytest from flask import Flask from scout.server.extensions.loqus_extension import LoqusDB def test_init_loqusextension(loqus_exe): """Test a init a loqus extension object""" # GIVEN a loqusdb binary # WHEN initialising a loqusdb extension l...
[ "scout.server.extensions.loqus_extension.LoqusDB", "pytest.raises", "flask.Flask" ]
[((331, 364), 'scout.server.extensions.loqus_extension.LoqusDB', 'LoqusDB', ([], {'loqusdb_binary': 'loqus_exe'}), '(loqusdb_binary=loqus_exe)\n', (338, 364), False, 'from scout.server.extensions.loqus_extension import LoqusDB\n'), ((954, 1010), 'scout.server.extensions.loqus_extension.LoqusDB', 'LoqusDB', ([], {'loqus...
#!/usr/bin/env python # -*- coding: utf-8 -*- from multiprocessing import Process from lattes.pages import Curriculum, Xml from lattes.config import BaseLogger logger = BaseLogger.from_file('simple_client', file_name='simple_client.log') ZIP_PATH = '/home/elodin/Workspace/Python/cnpq/xmls' def single_cored_example(...
[ "multiprocessing.Process", "lattes.config.BaseLogger.from_file", "lattes.pages.Curriculum", "lattes.pages.Xml" ]
[((171, 239), 'lattes.config.BaseLogger.from_file', 'BaseLogger.from_file', (['"""simple_client"""'], {'file_name': '"""simple_client.log"""'}), "('simple_client', file_name='simple_client.log')\n", (191, 239), False, 'from lattes.config import BaseLogger\n'), ((612, 654), 'multiprocessing.Process', 'Process', ([], {'t...
import datetime import os from clover.netcdf.utilities import get_fill_value_for_variable from clover.netcdf.variable import SpatialCoordinateVariable, SpatialCoordinateVariables, DateVariable import clover.netcdf.describe from netCDF4 import Dataset import datetime as dt import wx from vistas.core.gis.extent import ...
[ "netCDF4.Dataset", "clover.netcdf.utilities.get_fill_value_for_variable", "vistas.core.timeline.Timeline.app", "vistas.core.plugins.data.TemporalInfo", "vistas.ui.app.App.get", "vistas.core.gis.extent.Extent", "clover.netcdf.variable.DateVariable", "clover.netcdf.variable.SpatialCoordinateVariable", ...
[((1567, 1590), 'netCDF4.Dataset', 'Dataset', (['self.path', '"""r"""'], {}), "(self.path, 'r')\n", (1574, 1590), False, 'from netCDF4 import Dataset\n'), ((2492, 2506), 'vistas.core.plugins.data.TemporalInfo', 'TemporalInfo', ([], {}), '()\n', (2504, 2506), False, 'from vistas.core.plugins.data import RasterDataPlugin...
import tensorflow as tf from tensorflow.keras import layers from segmentation_models import PSPNet from segmentation_models.backbones.backbones_factory import Backbones from segmentation_models.models._utils import freeze_model, get_submodules_from_kwargs from segmentation_models.models.pspnet import SpatialContextBloc...
[ "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.Concatenate", "tensorflow.keras.layers.Conv1D", "tensorflow.keras.Model", "segmentation_models.models.pspnet.SpatialContextBlock", "segmentation_models.PSPNet", "segmentation_models.backbones.backbones_factory.Backbones.get_feature_layers", "t...
[((1520, 1542), 'private_models.models.utils.custom_layers.convblock', 'convblock', (['x', 'nfilters'], {}), '(x, nfilters)\n', (1529, 1542), False, 'from private_models.models.utils.custom_layers import convblock, atrous_convblock\n'), ((1795, 1824), 'private_models.models.utils.custom_layers.atrous_convblock', 'atrou...
from __future__ import print_function import numpy as np import tensorflow as tf import argparse import time import os from six.moves import cPickle from utils import TextLoader from model import Model from tkinter import * # directory where to load trained models from # save_Math_Final save_Math save_dir_arg = "s...
[ "tensorflow.global_variables_initializer", "model.Model", "tensorflow.Session", "tensorflow.global_variables", "six.moves.cPickle.load", "os.path.join", "tensorflow.train.get_checkpoint_state" ]
[((599, 622), 'model.Model', 'Model', (['saved_args', '(True)'], {}), '(saved_args, True)\n', (604, 622), False, 'from model import Model\n'), ((474, 489), 'six.moves.cPickle.load', 'cPickle.load', (['f'], {}), '(f)\n', (486, 489), False, 'from six.moves import cPickle\n'), ((575, 590), 'six.moves.cPickle.load', 'cPick...
from PyQt5.QtWidgets import * from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg from matplotlib.figure import Figure class mplw(QWidget): def __init__(self, parent=None): QWidget.__init__(self, parent) self.canvas = FigureCanvasQTAgg(Figure()) vertical_layout = QHBoxLayout()...
[ "matplotlib.figure.Figure" ]
[((271, 279), 'matplotlib.figure.Figure', 'Figure', ([], {}), '()\n', (277, 279), False, 'from matplotlib.figure import Figure\n')]
import sys import os import matplotlib.pyplot as plt from matplotlib.pyplot import figure import matplotlib as mpl import config def main(): if 1 < len(sys.argv) : diagram_path = sys.argv[1] else: diagram_path = "" fabricprov_label = config.make_label(config.ldb_prov_label) fabrics...
[ "matplotlib.pyplot.tight_layout", "config.make_label", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((268, 308), 'config.make_label', 'config.make_label', (['config.ldb_prov_label'], {}), '(config.ldb_prov_label)\n', (285, 308), False, 'import config\n'), ((333, 373), 'config.make_label', 'config.make_label', (['config.forkbase_label'], {}), '(config.forkbase_label)\n', (350, 373), False, 'import config\n'), ((1566,...
from rest_framework import status from rest_framework.reverse import reverse from api.tests.utils import CRUDMixin from users.tests.utils import make_user from .utils import create_default_roles class TestRoleAPI(CRUDMixin): @classmethod def setUpTestData(cls): create_default_roles() cls.user...
[ "rest_framework.reverse.reverse", "users.tests.utils.make_user" ]
[((323, 334), 'users.tests.utils.make_user', 'make_user', ([], {}), '()\n', (332, 334), False, 'from users.tests.utils import make_user\n'), ((353, 378), 'rest_framework.reverse.reverse', 'reverse', ([], {'viewname': '"""roles"""'}), "(viewname='roles')\n", (360, 378), False, 'from rest_framework.reverse import reverse...
#!/usr/bin/env python3 import h5py import numpy as np import pandas as pd import sys import os mtd_prefix = """ { "data_type": "matrix", "value_type": "double", """ mtd_suffix = """ "format": "csv", "header": false, "sep": "," } """ if len(sys.argv) < 3: print("usage: " + sys.argv[0] +...
[ "pandas.DataFrame", "h5py.File", "numpy.moveaxis", "numpy.mean", "numpy.array", "sys.exit" ]
[((810, 836), 'h5py.File', 'h5py.File', (['input_file', '"""r"""'], {}), "(input_file, 'r')\n", (819, 836), False, 'import h5py\n'), ((937, 959), 'numpy.array', 'np.array', (['fid[dataset]'], {}), '(fid[dataset])\n', (945, 959), True, 'import numpy as np\n'), ((1328, 1344), 'pandas.DataFrame', 'pd.DataFrame', (['ds'], ...
import riak from django.conf import settings RIAK_PORT = getattr(settings, 'RIAK_PORT', 8087) RIAK_TRANSPORT_CLASS = getattr(settings, 'RIAK_TRANSPORT_CLASS', riak.RiakPbcTransport) RIAK_BUCKET = getattr(settings, 'RIAK_BUCKET', 'django-riak-sessions') RIAK_HOST = getattr(settings, 'RIAK_HOST', '127.0.0.1') client = ...
[ "riak.RiakClient" ]
[((320, 410), 'riak.RiakClient', 'riak.RiakClient', ([], {'port': 'RIAK_PORT', 'host': 'RIAK_HOST', 'transport_class': 'RIAK_TRANSPORT_CLASS'}), '(port=RIAK_PORT, host=RIAK_HOST, transport_class=\n RIAK_TRANSPORT_CLASS)\n', (335, 410), False, 'import riak\n')]
from bottle import route, run, template @route('/') def index(): return "function readCookie(name) {" \ " var nameEQ = name + \"=\";"\ " var ca = document.cookie.split(';');"\ " for (var i = 0; i < ca.length; i++) {"\ " ...
[ "bottle.run", "bottle.route" ]
[((43, 53), 'bottle.route', 'route', (['"""/"""'], {}), "('/')\n", (48, 53), False, 'from bottle import route, run, template\n'), ((767, 794), 'bottle.route', 'route', (['"""/show/<cookie_val>"""'], {}), "('/show/<cookie_val>')\n", (772, 794), False, 'from bottle import route, run, template\n'), ((840, 875), 'bottle.ru...
# Minimal Flask Application. # See http://flask.pocoo.org/docs/0.12/quickstart/#a-minimal-application from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!"
[ "flask.Flask" ]
[((132, 147), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (137, 147), False, 'from flask import Flask\n')]
from io import IOBase, TextIOBase from multiprocessing import Process import os import sys import re import time import json import subprocess import random import logging logger = logging.getLogger(__name__) from paragen.utils.runtime import Environment SPACE_NORMALIZER = re.compile("\s+") TEMP_IO_SAVE_PATH = "" ...
[ "os.mkdir", "os.remove", "random.shuffle", "paragen.utils.runtime.Environment", "json.dumps", "os.close", "os.path.join", "json.loads", "os.path.exists", "re.sub", "subprocess.Popen", "os.open", "time.sleep", "os.getenv", "os.listdir", "re.compile", "subprocess.run", "os.getpid", ...
[((181, 208), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (198, 208), False, 'import logging\n'), ((277, 295), 're.compile', 're.compile', (['"""\\\\s+"""'], {}), "('\\\\s+')\n", (287, 295), False, 'import re\n'), ((933, 962), 'os.listdir', 'os.listdir', (['TEMP_IO_SAVE_PATH'], {}), '(...
# # cogs/optional/statbot/sql.py # # futaba - A Discord Mod bot for the Programming server # Copyright (c) 2017-2020 <NAME>, <NAME>, jackylam5 # # futaba is available free of charge under the terms of the MIT # License. You are free to redistribute and/or modify it under those # terms. It is distributed in the hopes th...
[ "sqlalchemy.create_engine", "sqlalchemy.sql.text", "logging.getLogger" ]
[((601, 628), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (618, 628), False, 'import logging\n'), ((777, 799), 'sqlalchemy.create_engine', 'create_engine', (['db_path'], {}), '(db_path)\n', (790, 799), False, 'from sqlalchemy import create_engine\n'), ((1469, 1823), 'sqlalchemy.sql.tex...
import inspect from typing import Union, Any, Callable, Iterable, Tuple, Sequence import torch import numpy as np def bifurcate(x: Iterable, lhs: Callable[[Any], bool]) -> Tuple[list, list]: """ Split an iterable into two lists depending on a condition. :param x: An iterable. :param lhs: A function...
[ "numpy.where", "torch.empty", "torch.cat", "inspect.signature" ]
[((2036, 2059), 'torch.cat', 'torch.cat', (['out', 'cat_dim'], {}), '(out, cat_dim)\n', (2045, 2059), False, 'import torch\n'), ((1807, 1825), 'torch.empty', 'torch.empty', (['shape'], {}), '(shape)\n', (1818, 1825), False, 'import torch\n'), ((2317, 2330), 'numpy.where', 'np.where', (['arr'], {}), '(arr)\n', (2325, 23...
import logging import asyncio from hbmqtt.client import MQTTClient, ConnectException from hbmqtt.mqtt.constants import QOS_0, QOS_1, QOS_2 # # This sample shows how to publish messages to broker using different QOS # Debug outputs shows the message flows logger = logging.getLogger(__name__) @asyncio.coroutine def ...
[ "asyncio.get_event_loop", "logging.basicConfig", "hbmqtt.client.MQTTClient", "asyncio.wait", "logging.getLogger" ]
[((268, 295), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (285, 295), False, 'import logging\n'), ((341, 353), 'hbmqtt.client.MQTTClient', 'MQTTClient', ([], {}), '()\n', (351, 353), False, 'from hbmqtt.client import MQTTClient, ConnectException\n'), ((775, 833), 'logging.basicConfig',...
import copy import os import numpy as np from hexrd.config.root import RootConfig from hexrd.config.material import MaterialConfig from hexrd.config.instrument import Instrument as InstrumentConfig from hexrd.ui.create_hedm_instrument import create_hedm_instrument from hexrd.ui.hexrd_config import HexrdConfig from h...
[ "hexrd.ui.create_hedm_instrument.create_hedm_instrument", "hexrd.config.material.MaterialConfig", "numpy.degrees", "os.getcwd", "hexrd.ui.utils.is_omega_imageseries", "hexrd.ui.hexrd_config.HexrdConfig", "hexrd.config.root.RootConfig", "hexrd.config.instrument.Instrument" ]
[((1227, 1254), 'hexrd.config.root.RootConfig', 'RootConfig', (['indexing_config'], {}), '(indexing_config)\n', (1237, 1254), False, 'from hexrd.config.root import RootConfig\n'), ((1309, 1333), 'hexrd.config.instrument.Instrument', 'InstrumentConfig', (['config'], {}), '(config)\n', (1325, 1333), True, 'from hexrd.con...
# Generated by Django 3.2.5 on 2021-07-13 04:10 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('resumes', '0023_educationdetails'), ] operations = [ migrations.RenameField( model_name='softskills', old_name='Soft_Skill_N...
[ "django.db.migrations.RenameField" ]
[((225, 331), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""softskills"""', 'old_name': '"""Soft_Skill_Name"""', 'new_name': '"""SoftSkill_Name"""'}), "(model_name='softskills', old_name='Soft_Skill_Name',\n new_name='SoftSkill_Name')\n", (247, 331), False, 'from django.db imp...
import functools import inspect import json import os import warnings # State numbers: # # 0: `state` is None. The stream has no more elements. `step` can't be called. # # 1: `state` is a function. Calling `step` with a 2-tuple of positional and # keyword arguments passes those arguments to the function, and th...
[ "json.dump", "os.path.abspath", "json.load", "builtins.open", "inspect.isgeneratorfunction", "functools.wraps", "warnings.warn" ]
[((12124, 12149), 'os.path.abspath', 'os.path.abspath', (['filename'], {}), '(filename)\n', (12139, 12149), False, 'import os\n'), ((10892, 10910), 'functools.wraps', 'functools.wraps', (['f'], {}), '(f)\n', (10907, 10910), False, 'import functools\n'), ((11784, 11808), 'builtins.open', 'file_open', (['filename', '"""r...
# Imports here import numpy as np import pandas as pd import time import argparse import torch from torch import nn from torch import optim import torch.nn.functional as F from torch.autograd import Variable from collections import OrderedDict import torchvision from torchvision import datasets, transforms, models impo...
[ "torch.nn.Dropout", "argparse.ArgumentParser", "torchvision.transforms.Normalize", "torch.no_grad", "torch.utils.data.DataLoader", "torchvision.transforms.RandomRotation", "torch.nn.Linear", "torchvision.transforms.CenterCrop", "torchvision.models.vgg16", "helper.validation", "torchvision.models...
[((399, 424), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (422, 424), False, 'import argparse\n'), ((2713, 2772), 'torchvision.datasets.ImageFolder', 'datasets.ImageFolder', (['train_dir'], {'transform': 'train_transforms'}), '(train_dir, transform=train_transforms)\n', (2733, 2772), False, ...
import utils from traceback import format_exc, print_exc from tempfile import gettempdir from linebot import LineBotApi, WebhookParser from linebot.exceptions import LineBotApiError, InvalidSignatureError from linebot.models import MessageEvent, TextMessage as _TextMessage, TextSendMessage, TemplateSendMessage, Templa...
[ "threading.Thread", "traceback.print_exc", "random.randint", "threading.Condition", "traceback.format_exc", "pyimgur.Imgur", "re.compile" ]
[((17576, 17606), 're.compile', 'compile', (['"""\\\\[Init1\\\\] ([^ ]+)"""'], {}), "('\\\\[Init1\\\\] ([^ ]+)')\n", (17583, 17606), False, 'from re import compile, DOTALL\n'), ((17624, 17654), 're.compile', 'compile', (['"""\\\\[Init3\\\\] ([^ ]+)"""'], {}), "('\\\\[Init3\\\\] ([^ ]+)')\n", (17631, 17654), False, 'fro...
import torch import torch.nn as nn """### DenseNet""" ####network class conv_blk(nn.Module): def __init__(self,in_channel,num_channel): super(conv_blk, self).__init__() self.blk=nn.Sequential(nn.BatchNorm2d(in_channel,eps=1e-3), nn.ReLU(), nn.Co...
[ "torch.ones", "torch.nn.ReLU", "torch.nn.Sequential", "torch.nn.Conv2d", "torch.cat", "torch.nn.BatchNorm2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.AvgPool2d" ]
[((764, 786), 'torch.nn.Sequential', 'nn.Sequential', (['*layers'], {}), '(*layers)\n', (777, 786), True, 'import torch.nn as nn\n'), ((986, 1023), 'torch.nn.BatchNorm2d', 'nn.BatchNorm2d', (['in_channel'], {'eps': '(0.001)'}), '(in_channel, eps=0.001)\n', (1000, 1023), True, 'import torch.nn as nn\n'), ((1045, 1054), ...
#!/usr/bin/python # @file check_code.py # @brief This program applies a flawfinder program to TrickHLA source code. # # This is a Python program used to check the TrickHLA source code using the # flawfinder utility. https://dwheeler.com/flawfinder/ # # @revs_title # @revs_begin # @rev_entry{ <NAME>, NASA ER6, TrickHLA,...
[ "subprocess.Popen", "argparse.ArgumentParser", "os.path.isdir", "subprocess.check_output", "time.sleep", "os.environ.get", "os.path.isfile", "os.chdir" ]
[((819, 994), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""find_code_flaws"""', 'formatter_class': 'argparse.RawDescriptionHelpFormatter', 'description': '"""Check the TrickHLA source code using flawfinder."""'}), "(prog='find_code_flaws', formatter_class=argparse.\n RawDescriptionHelpForm...
from django import forms class EmailForm(forms.Form): your_email = forms.CharField(label='Email', max_length=100)
[ "django.forms.CharField" ]
[((72, 118), 'django.forms.CharField', 'forms.CharField', ([], {'label': '"""Email"""', 'max_length': '(100)'}), "(label='Email', max_length=100)\n", (87, 118), False, 'from django import forms\n')]
import random class Dice: def __init__(self): pass def roll(self, num_dice): outcome = list() for i in range(num_dice): outcome.append(random.randrange(1,7)) return outcome
[ "random.randrange" ]
[((182, 204), 'random.randrange', 'random.randrange', (['(1)', '(7)'], {}), '(1, 7)\n', (198, 204), False, 'import random\n')]
#!/usr/bin/env python3 import sys import os def print_args(args): print(args[-1] + ' '+ '_'.join(args[:-1])) def main(argv): path = "%HHOMP/HHOMPDB" # If directory does not exist, print random stuff if not os.path.exists(path): print("foo bar") return args = [] with open(path, '...
[ "os.path.exists" ]
[((223, 243), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (237, 243), False, 'import os\n')]
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ "superset.db_engine_specs.presto.PrestoEngineSpec._get_full_name", "superset.db_engine_specs.presto.PrestoEngineSpec._get_fields", "superset.db_engine_specs.presto.PrestoEngineSpec.estimate_statement_cost", "superset.db_engine_specs.presto.PrestoEngineSpec.get_column_spec", "superset.db_engine_specs.presto....
[((1792, 1856), 'unittest.mock.patch', 'mock.patch', (['"""superset.db_engine_specs.presto.is_feature_enabled"""'], {}), "('superset.db_engine_specs.presto.is_feature_enabled')\n", (1802, 1856), False, 'from unittest import mock, skipUnless\n'), ((2655, 2719), 'unittest.mock.patch', 'mock.patch', (['"""superset.db_engi...
from flask import Flask from service import service from service_label import service_label from service_nodeselector import service_nodeselector from service_schedulehint import service_schedulehint from hpa import hpa from vpa import vpa from limitrange import limitrange from serviceinfo import serviceinfo from image...
[ "flask.Flask" ]
[((431, 473), 'flask.Flask', 'Flask', (['__name__'], {'static_url_path': '"""/static"""'}), "(__name__, static_url_path='/static')\n", (436, 473), False, 'from flask import Flask\n')]
import itertools from amara3.uxml.tree import treebuilder, element from amara3.util import coroutine doc = '<a>1<aa a="1">2<aaa>3</aaa>4<aab>5</aab>6</aa>7<ab a="2">8</ab></a>' tb = treebuilder() root = tb.parse(doc) def descendants(elem): for child in elem.xml_children: yield child if isinstance(...
[ "amara3.uxml.tree.treebuilder", "itertools.dropwhile", "re.compile" ]
[((183, 196), 'amara3.uxml.tree.treebuilder', 'treebuilder', ([], {}), '()\n', (194, 196), False, 'from amara3.uxml.tree import treebuilder, element\n'), ((980, 999), 're.compile', 're.compile', (['""".*b.*"""'], {}), "('.*b.*')\n", (990, 999), False, 'import re\n'), ((1827, 1891), 'itertools.dropwhile', 'itertools.dro...
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-02-28 20:19 from __future__ import unicode_literals import contentcuration.models from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion import django.utils.time...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField" ]
[((1434, 2271), 'django.db.models.CharField', 'models.CharField', ([], {'choices': "[(b'high_res_video', b'High Resolution'), (b'low_res_video',\n b'Low Resolution'), (b'video_thumbnail', b'Thumbnail'), (\n b'video_subtitle', b'Subtitle'), (b'video_dependency',\n b'Video (dependency)'), (b'audio', b'Audio'), (...
# Copyright 2015 <NAME> <<EMAIL>> # # 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 writ...
[ "json.dumps" ]
[((2295, 2311), 'json.dumps', 'json.dumps', (['data'], {}), '(data)\n', (2305, 2311), False, 'import json\n'), ((3307, 3323), 'json.dumps', 'json.dumps', (['data'], {}), '(data)\n', (3317, 3323), False, 'import json\n')]
# -*- coding: utf-8 -*- """ Created on Wed Apr 25 15:34:50 2018 @author: kncv078 """ def do_maths(assay, fp, j, m): print('CV Fold: {}'.format(j)) df = pd.read_csv(file_path.format(assay,assay,fp,j), sep='\t').sort_values('PredProb(A)', ascending=False).reset_index(drop=True) fpr1, tpr1, t...
[ "sklearn.metrics.roc_curve", "time.time", "sklearn.metrics.auc", "sklearn.metrics.cohen_kappa_score", "sklearn.metrics.matthews_corrcoef", "sklearn.metrics.confusion_matrix", "sklearn.metrics.precision_recall_fscore_support" ]
[((1307, 1318), 'time.time', 'time.time', ([], {}), '()\n', (1316, 1318), False, 'import time\n'), ((333, 397), 'sklearn.metrics.roc_curve', 'metrics.roc_curve', (["df['label']", "df['PredProb(A)']"], {'pos_label': '"""A"""'}), "(df['label'], df['PredProb(A)'], pos_label='A')\n", (350, 397), False, 'from sklearn import...
from django.contrib import admin from .email import EmailAdmin from .instrument import InstrumentAdmin from .request import RequestAdmin from .slot import SlotAdmin from .user import CustomUserAdmin, FacultyAdmin, StudentAdmin from .announcement import AnnouncementAdmin from ..models import (Announcement, CustomUser, ...
[ "django.contrib.admin.site.register" ]
[((457, 499), 'django.contrib.admin.site.register', 'admin.site.register', (['Student', 'StudentAdmin'], {}), '(Student, StudentAdmin)\n', (476, 499), False, 'from django.contrib import admin\n'), ((500, 542), 'django.contrib.admin.site.register', 'admin.site.register', (['Faculty', 'FacultyAdmin'], {}), '(Faculty, Fac...