code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from rest_framework import generics from rest_framework.permissions import AllowAny from server.fundraisers.serializers import FundraiserSerializer from server.fundraisers.models import Fundraiser class FundraisersList(generics.ListAPIView): model = Fundraiser queryset = Fundraiser.objects.filter(pageStatus=...
[ "server.fundraisers.models.Fundraiser.objects.filter" ]
[((283, 325), 'server.fundraisers.models.Fundraiser.objects.filter', 'Fundraiser.objects.filter', ([], {'pageStatus': '(True)'}), '(pageStatus=True)\n', (308, 325), False, 'from server.fundraisers.models import Fundraiser\n')]
import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import numpy as np import matplotlib.dates as mdates from matplotlib.dates import DateFormatter, num2date from matplotlib import patches import matplotlib.patches as mpatches from matplotlib import ticker, cm, colors import sys sys.path.insert(0, ...
[ "sys.path.insert", "matplotlib.use", "matplotlib.pyplot.figure", "numpy.linspace", "matplotlib.ticker.LogFormatterSciNotation", "numpy.meshgrid", "numpy.nansum", "numpy.load", "numpy.arange", "matplotlib.colors.LogNorm" ]
[((18, 39), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (32, 39), False, 'import matplotlib\n'), ((301, 325), 'sys.path.insert', 'sys.path.insert', (['(0)', '""".."""'], {}), "(0, '..')\n", (316, 325), False, 'import sys\n'), ((326, 361), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../u...
# -*- coding: utf-8 -*- """ MIT License Copyright (c) 2020 <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 the rights to use, copy, modify,...
[ "cv2.rectangle", "cv2.seamlessClone", "cv2.imshow", "numpy.array", "cv2.destroyAllWindows", "copy.deepcopy", "scripts.Traditional.forwardwarping.forward.for_warping", "imutils.face_utils.rect_to_bb", "scripts.Traditional.InverseWarping.inverse.inv_warping", "dlib.shape_predictor", "sys.path.remo...
[((1314, 1377), 'sys.path.remove', 'sys.path.remove', (['"""/opt/ros/kinetic/lib/python2.7/dist-packages"""'], {}), "('/opt/ros/kinetic/lib/python2.7/dist-packages')\n", (1329, 1377), False, 'import sys\n'), ((2697, 2726), 'cv2.boundingRect', 'cv2.boundingRect', (['convex_hull'], {}), '(convex_hull)\n', (2713, 2726), F...
#################################################################################################### # # Project: Embedded Learning Library (ELL) # File: darknet_to_ell_impporter_test.py (importers) # Authors: <NAME> # # Requires: Python 3.x # ######################################################################...
[ "logging.getLogger", "logging.basicConfig", "numpy.testing.assert_array_almost_equal", "numpy.flipud", "ell.neural.utilities.ell_map_from_float_predictor", "darknet_to_ell.predictor_from_darknet_model", "os.path.join", "unittest.main", "sys.exc_info", "os.path.abspath", "numpy.arange" ]
[((524, 551), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (541, 551), False, 'import logging\n'), ((552, 613), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""%(message)s"""'}), "(level=logging.INFO, format='%(message)s')\n", (571, 613), False...
from django.forms import ModelForm, BooleanField, HiddenInput, CharField from .models import Participant class ParticipantForm(ModelForm): gave_consent = BooleanField(required=True) form_name = CharField(widget=HiddenInput(), initial=Participant.PARTICIPANT_FORM_NAME) class Meta: model = Particip...
[ "django.forms.HiddenInput", "django.forms.BooleanField" ]
[((160, 187), 'django.forms.BooleanField', 'BooleanField', ([], {'required': '(True)'}), '(required=True)\n', (172, 187), False, 'from django.forms import ModelForm, BooleanField, HiddenInput, CharField\n'), ((221, 234), 'django.forms.HiddenInput', 'HiddenInput', ([], {}), '()\n', (232, 234), False, 'from django.forms ...
# -*- coding: utf-8 -*- import theano import theano.tensor as T from theano.tensor.signal import downsample from .. import activations, initializations from ..utils.theano_utils import shared_zeros from ..layers.core import Layer # class Convolution1D(Layer): TODO # class MaxPooling1D(Layer): TODO class Convoluti...
[ "theano.tensor.tensor4", "theano.tensor.nnet.conv.conv2d", "theano.tensor.signal.downsample.max_pool_2d" ]
[((765, 776), 'theano.tensor.tensor4', 'T.tensor4', ([], {}), '()\n', (774, 776), True, 'import theano.tensor as T\n'), ((1120, 1251), 'theano.tensor.nnet.conv.conv2d', 'theano.tensor.nnet.conv.conv2d', (['X', 'self.W'], {'border_mode': 'self.border_mode', 'subsample': 'self.subsample', 'image_shape': 'self.image_shape...
########################################################################### # # # physical_validation, # # a python package to test the physical validity of MD results # # ...
[ "numpy.array", "numpy.round" ]
[((1657, 1672), 'numpy.array', 'np.array', (['bonds'], {}), '(bonds)\n', (1665, 1672), True, 'import numpy as np\n'), ((1750, 1769), 'numpy.array', 'np.array', (['positions'], {}), '(positions)\n', (1758, 1769), True, 'import numpy as np\n'), ((4541, 4556), 'numpy.array', 'np.array', (['value'], {}), '(value)\n', (4549...
# Python import os import sys import traceback # Pycompss from pycompss.api.task import task from pycompss.api.parameter import FILE_IN, FILE_OUT # Adapters commons pycompss from biobb_adapters.pycompss.biobb_commons import task_config # Wrapped Biobb from biobb_structure_utils.utils.extract_heteroatoms import ExtractH...
[ "os.path.exists", "biobb_structure_utils.utils.extract_heteroatoms.ExtractHeteroAtoms", "sys.stderr.flush", "os.environ.get", "biobb_adapters.pycompss.biobb_commons.task_config.pop_pmi", "pycompss.api.task.task", "sys.stdout.flush", "traceback.print_exc" ]
[((452, 568), 'pycompss.api.task.task', 'task', ([], {'input_structure_path': 'FILE_IN', 'output_heteroatom_path': 'FILE_OUT', 'on_failure': '"""IGNORE"""', 'time_out': 'task_time_out'}), "(input_structure_path=FILE_IN, output_heteroatom_path=FILE_OUT,\n on_failure='IGNORE', time_out=task_time_out)\n", (456, 568), F...
# Copyright 2021 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
[ "flaskr.db.init_app", "os.makedirs", "flask.Flask" ]
[((694, 740), 'flask.Flask', 'Flask', (['__name__'], {'instance_relative_config': '(True)'}), '(__name__, instance_relative_config=True)\n', (699, 740), False, 'from flask import Flask\n'), ((1332, 1348), 'flaskr.db.init_app', 'db.init_app', (['app'], {}), '(app)\n', (1343, 1348), False, 'from flaskr import db\n'), ((1...
import os import sys import getopt """ Extracts the audio from our game videos. This script expects that ffmpeg is installed and in the PYTHONPATH. Usage: python extract_wav.py -i <path_to_folder_where_mp4_files_are> """ def parse_arguments(argv): input_path = '' try: opts, args = getopt.getop...
[ "getopt.getopt", "os.listdir", "os.path.join", "os.path.splitext", "sys.exit" ]
[((801, 823), 'os.listdir', 'os.listdir', (['input_path'], {}), '(input_path)\n', (811, 823), False, 'import os\n'), ((308, 346), 'getopt.getopt', 'getopt.getopt', (['argv', '"""hi:"""', "['ifile=']"], {}), "(argv, 'hi:', ['ifile='])\n", (321, 346), False, 'import getopt\n'), ((525, 536), 'sys.exit', 'sys.exit', (['(2)...
"""CLI to run hosting capacity analysis on results for a feeder.""" import logging import os import sys import click from jade.common import OUTPUT_DIR from jade.events import StructuredErrorLogEvent, EVENT_CATEGORY_ERROR, EVENT_NAME_UNHANDLED_ERROR from jade.loggers import log_event, setup_logging, setup_event_logg...
[ "click.argument", "jade.utils.utils.load_data", "os.makedirs", "jade.exceptions.InvalidExtension", "click.option", "jade.extensions.registry.Registry", "jade.loggers.setup_logging", "jade.loggers.log_event", "os.path.join", "jade.events.StructuredErrorLogEvent", "jade.utils.utils.get_cli_string"...
[((547, 574), 'click.argument', 'click.argument', (['"""extension"""'], {}), "('extension')\n", (561, 574), False, 'import click\n'), ((576, 681), 'click.option', 'click.option', (['"""-n"""', '"""--name"""'], {'required': '(True)', 'type': 'str', 'help': '"""The name of the job that needs to run."""'}), "('-n', '--nam...
from django.db import models from django_resized import ResizedImageField from src.accounts.models import Wallet """ GENERAL """ class Country(models.Model): name = models.CharField(max_length=255, unique=True) short_code = models.CharField(max_length=2, unique=True) phone_code = models.CharField(max_l...
[ "django.db.models.FloatField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django_resized.ResizedImageField", "django.db.models.PositiveIntegerField", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((174, 219), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)', 'unique': '(True)'}), '(max_length=255, unique=True)\n', (190, 219), False, 'from django.db import models\n'), ((237, 280), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(2)', 'unique': '(True)'}), '(ma...
import re import unittest class Porter: # Helper regex strings. _vowel = "[аеиоуыэюя]" _non_vowel = "[^аеиоуыэюя]" # Word regions. _re_rv = re.compile(_vowel) _re_r1 = re.compile(_vowel + _non_vowel) # Endings. _re_perfective_gerund = re.compile( r"(((?P<ignore>[ая])(в|вши|вш...
[ "re.compile" ]
[((163, 181), 're.compile', 're.compile', (['_vowel'], {}), '(_vowel)\n', (173, 181), False, 'import re\n'), ((195, 226), 're.compile', 're.compile', (['(_vowel + _non_vowel)'], {}), '(_vowel + _non_vowel)\n', (205, 226), False, 'import re\n'), ((271, 356), 're.compile', 're.compile', (['"""(((?P<ignore>[ая])(в|вши|вши...
# Open3D: www.open3d.org # The MIT License (MIT) # See license file or visit www.open3d.org for details # examples/Python/Basic/solution.py import numpy as np import os import open3d as o3d import sys results_file = "" ply_path = "" if len(sys.argv) > 2 and len(sys.argv) < 4 : ply_path = sys.argv[1] results...
[ "os.path.realpath", "open3d.io.read_triangle_mesh", "os.path.join" ]
[((610, 645), 'open3d.io.read_triangle_mesh', 'o3d.io.read_triangle_mesh', (['ply_path'], {}), '(ply_path)\n', (635, 645), True, 'import open3d as o3d\n'), ((416, 490), 'os.path.join', 'os.path.join', (['pwd', 'os.pardir', 'os.pardir', 'os.pardir', '"""examples"""', '"""TestData"""'], {}), "(pwd, os.pardir, os.pardir, ...
import setuptools with open("README.md", "r") as f: long_description = f.read() setuptools.setup( name="access_parser", version="0.0.3", author="<NAME>", author_email="<EMAIL>", description="Access database (*.mdb, *.accdb) parser", long_description=long_description, long_description_c...
[ "setuptools.find_packages" ]
[((417, 443), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (441, 443), False, 'import setuptools\n')]
import pickle import pytest from taxi import projects def test_legacy_projects_db(tmpdir): projects_db_file = tmpdir.join(projects.ProjectsDb.PROJECTS_FILE) local_projects_db = projects.LocalProjectsDb() foo = pickle.dumps(local_projects_db) with projects_db_file.open(mode='wb') as f: f.wri...
[ "pickle.dumps", "taxi.projects.ProjectsDb", "taxi.projects.LocalProjectsDb", "pytest.raises" ]
[((189, 215), 'taxi.projects.LocalProjectsDb', 'projects.LocalProjectsDb', ([], {}), '()\n', (213, 215), False, 'from taxi import projects\n'), ((226, 257), 'pickle.dumps', 'pickle.dumps', (['local_projects_db'], {}), '(local_projects_db)\n', (238, 257), False, 'import pickle\n'), ((337, 372), 'taxi.projects.ProjectsDb...
import sys import yaml server_uuid = server.get_param('server')['uuid'] sys.stdout.push_filter(server_uuid, '<server uuid>') cluster_uuid = yaml.load(server.admin('box.space._schema:get("cluster")', silent = True))[0][1] sys.stdout.push_filter(cluster_uuid, '<cluster uuid>') sys.stdout.push_filter(server.sourcedi...
[ "sys.stdout.push_filter", "sys.stdout.pop_filter" ]
[((74, 126), 'sys.stdout.push_filter', 'sys.stdout.push_filter', (['server_uuid', '"""<server uuid>"""'], {}), "(server_uuid, '<server uuid>')\n", (96, 126), False, 'import sys\n'), ((227, 281), 'sys.stdout.push_filter', 'sys.stdout.push_filter', (['cluster_uuid', '"""<cluster uuid>"""'], {}), "(cluster_uuid, '<cluster...
import sys sys.path.append('..') from troup.client import CommandAPI, client_to_local_node, ChannelClient #cc = ChannelClient(nodes_specs=['RPI:ws://192.168.2.128:7000']) cc = client_to_local_node() cmd = CommandAPI(channel_client=cc) promise = cmd.send(CommandAPI.command('info', {})) print(promise) print('cmd sen...
[ "troup.client.CommandAPI", "troup.client.client_to_local_node", "sys.path.append", "troup.client.CommandAPI.command" ]
[((12, 33), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (27, 33), False, 'import sys\n'), ((179, 201), 'troup.client.client_to_local_node', 'client_to_local_node', ([], {}), '()\n', (199, 201), False, 'from troup.client import CommandAPI, client_to_local_node, ChannelClient\n'), ((209, 238), '...
import h5py import numpy as np file = h5py.File('/data2/wt/openimages/vc_feature/1coco_train_all_bu_2.hdf5', 'r') for keys in file: feature = file[keys]['feature'][:] np.save('/data2/wt/openimages/vc_feature/coco_vc_all_bu/'+keys+'.npy', feature)
[ "numpy.save", "h5py.File" ]
[((42, 117), 'h5py.File', 'h5py.File', (['"""/data2/wt/openimages/vc_feature/1coco_train_all_bu_2.hdf5"""', '"""r"""'], {}), "('/data2/wt/openimages/vc_feature/1coco_train_all_bu_2.hdf5', 'r')\n", (51, 117), False, 'import h5py\n'), ((182, 269), 'numpy.save', 'np.save', (["('/data2/wt/openimages/vc_feature/coco_vc_all_...
#!/usr/bin/env python # Copyright (c) 2011, <NAME>, TU Darmstadt # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # not...
[ "python_qt_binding.QtGui.QIcon.fromTheme", "python_qt_binding.QtWidgets.QMenu", "python_qt_binding.QtGui.QDrag", "python_qt_binding.QtCore.Slot", "python_qt_binding.QtCore.QModelIndex", "python_qt_binding.QtCore.QMimeData", "python_qt_binding.QtCore.qWarning" ]
[((3411, 3425), 'python_qt_binding.QtCore.Slot', 'Slot', (['"""QPoint"""'], {}), "('QPoint')\n", (3415, 3425), False, 'from python_qt_binding.QtCore import Slot, QMimeData, QModelIndex, Qt, qWarning\n'), ((4357, 4371), 'python_qt_binding.QtCore.Slot', 'Slot', (['"""QPoint"""'], {}), "('QPoint')\n", (4361, 4371), False,...
#!/usr/bin/env python3 """Tools to generate a Snakemake-based BIDS app.""" import os import pathlib import subprocess import argparse import logging import sys import yaml import bids import snakemake from snakemake.io import load_configfile # We define Path here in addition to pathlib to put both variables in globa...
[ "logging.basicConfig", "argparse.ArgumentParser", "yaml.add_representer", "subprocess.Popen", "logging.Logger", "snakemake.get_argument_parser", "sys.exit", "bids.config.set_option", "hashlib.sha1", "time.time", "json.dump" ]
[((451, 504), 'bids.config.set_option', 'bids.config.set_option', (['"""extension_initial_dot"""', '(True)'], {}), "('extension_initial_dot', True)\n", (473, 504), False, 'import bids\n'), ((514, 538), 'logging.Logger', 'logging.Logger', (['__name__'], {}), '(__name__)\n', (528, 538), False, 'import logging\n'), ((1793...
from .models import ChartTransactions from .models import ChartVolume from .models import Transaction from .models import Address from .models import Balance from .models import Output from .models import Input from .models import Token from .models import Block from .models import Index from pony import orm class Ind...
[ "pony.orm.count", "pony.orm.select", "pony.orm.desc" ]
[((3477, 3527), 'pony.orm.select', 'orm.select', (['((b.address, b.amount) for b in Balance)'], {}), '((b.address, b.amount) for b in Balance)\n', (3487, 3527), False, 'from pony import orm\n'), ((4492, 4515), 'pony.orm.desc', 'orm.desc', (['Token.created'], {}), '(Token.created)\n', (4500, 4515), False, 'from pony imp...
import numpy as np import os import scipy.io.wavfile as sp_wr import random random.seed(0) def load_data(): speech_path=os.path.join('speech-command/') path =[speech_path+"zero/", speech_path+"one/", speech_path+"two/", speech_path+"three/", speec...
[ "numpy.mean", "numpy.savez", "os.listdir", "random.sample", "random.shuffle", "os.path.join", "random.seed", "numpy.array", "numpy.zeros", "scipy.io.wavfile.read", "numpy.vstack", "numpy.std", "numpy.arange" ]
[((84, 98), 'random.seed', 'random.seed', (['(0)'], {}), '(0)\n', (95, 98), False, 'import random\n'), ((2423, 2556), 'numpy.savez', 'np.savez', (['"""Dspeech-command/numbers.npz"""'], {'x_train': 'x_train', 'y_train': 'y_train', 'x_val': 'x_val', 'y_val': 'y_val', 'x_test': 'x_test', 'y_test': 'y_test'}), "('Dspeech-c...
# @l2g 978 python3 # [978] Longest Turbulent Subarray # Difficulty: Medium # https://leetcode.com/problems/longest-turbulent-subarray # # Given an integer array arr, return the length of a maximum size turbulent subarray of arr. # A subarray is turbulent if the comparison sign flips between each adjacent pair of elemen...
[ "os.path.join" ]
[((1844, 1880), 'os.path.join', 'os.path.join', (['"""tests"""', '"""test_978.py"""'], {}), "('tests', 'test_978.py')\n", (1856, 1880), False, 'import os\n')]
__version__ = '0.1.0' from config import config from flask import Flask def create_app(config_name): """Application factory, used to create application """ app = Flask(__name__) app.config.from_object(config[config_name]) config[config_name].init_app(app) from .api import api_v1 as api_blu...
[ "flask.Flask" ]
[((179, 194), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (184, 194), False, 'from flask import Flask\n')]
from main import entrypoint, brefv_rudder, brefv_propeller from pathlib import Path from unittest.mock import MagicMock from pycluon import Envelope from pycluon.importer import import_odvd ## Import and generate code for message specifications THIS_DIR = Path(__file__).parent.parent memo = import_odvd(THIS_DIR / "me...
[ "main.brefv_rudder.sink", "pathlib.Path", "unittest.mock.MagicMock", "pycluon.importer.import_odvd", "pycluon.Envelope", "main.brefv_propeller.sink" ]
[((294, 338), 'pycluon.importer.import_odvd', 'import_odvd', (["(THIS_DIR / 'memo' / 'memo.odvd')"], {}), "(THIS_DIR / 'memo' / 'memo.odvd')\n", (305, 338), False, 'from pycluon.importer import import_odvd\n'), ((454, 464), 'pycluon.Envelope', 'Envelope', ([], {}), '()\n', (462, 464), False, 'from pycluon import Envelo...
''' a simple prediction router. ''' import traceback import argparse import os import requests from typing import List, Optional, Union, Text, Any import json from datetime import datetime import uvicorn import validators import pika import numpy as np from fastapi import APIRouter from fastapi import HTTPException fr...
[ "traceback.format_exc", "config.config.InternalConfig", "dependencies.LoadDependency", "_backend.RedisDB", "os.path.join", "logger.AppLogger", "predict.builder.InfereBuilder", "fastapi.APIRouter", "loader.ModelLoader", "handlers.ModelException" ]
[((926, 937), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (935, 937), False, 'from fastapi import APIRouter\n'), ((951, 970), 'logger.AppLogger', 'AppLogger', (['__name__'], {}), '(__name__)\n', (960, 970), False, 'from logger import AppLogger\n'), ((1575, 1591), 'config.config.InternalConfig', 'InternalConfig'...
# vim:fileencoding=utf-8:noet _log = [] vars = {} vvars = {'version': 703} _tabpage = 0 _mode = 'n' _buf_purge_events = set() options = { 'paste': 0, 'ambiwidth': 'single', 'columns': 80, 'encoding': 'utf-8', } _last_bufnr = 0 _highlights = {} from collections import defaultdict as _defaultdict _environ = _defaultd...
[ "threading.current_thread", "re.compile", "re.match", "functools.wraps", "os.path.dirname", "collections.defaultdict", "os.path.basename", "os.sep.encode", "os.path.abspath", "copy.copy", "powerline.lib.unicode.u", "os.path.relpath" ]
[((311, 336), 'collections.defaultdict', '_defaultdict', (["(lambda : '')"], {}), "(lambda : '')\n", (323, 336), True, 'from collections import defaultdict as _defaultdict\n'), ((713, 724), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (718, 724), False, 'from functools import wraps\n'), ((1078, 1089), 'funct...
from conans import ConanFile, CMake, tools import os class RabbitmqCConan(ConanFile): name = 'rabbitmq-c' version = '0.10.0' license = 'MIT' homepage = 'https://github.com/alanxz/rabbitmq-c' description = 'RabbitMQ C AMQP client library' author = '<NAME> <<EMAIL>>' url = 'https://github.co...
[ "conans.tools.collect_libs", "os.rename", "conans.CMake" ]
[((928, 986), 'os.rename', 'os.rename', (['self._archive_subfolder', 'self._source_subfolder'], {}), '(self._archive_subfolder, self._source_subfolder)\n', (937, 986), False, 'import os\n'), ((1177, 1188), 'conans.CMake', 'CMake', (['self'], {}), '(self)\n', (1182, 1188), False, 'from conans import ConanFile, CMake, to...
#!/opt/miniconda3/envs/flask/bin/python # -*- coding: utf-8 -*- """Example how to offer defaulted (red) loans on bondora's secondary market.""" import os import sys import inspect import configparser from datetime import datetime, timedelta currentdir = os.path.dirname( os.path.abspath(inspect.getfile(inspect.cur...
[ "sys.path.insert", "sys.exit", "configparser.ConfigParser", "inspect.currentframe", "os.path.dirname", "datetime.datetime.now", "setup_logger.logger.critical", "trading.bondora_trading.BondoraTrading", "datetime.timedelta" ]
[((347, 374), 'os.path.dirname', 'os.path.dirname', (['currentdir'], {}), '(currentdir)\n', (362, 374), False, 'import os\n'), ((375, 404), 'sys.path.insert', 'sys.path.insert', (['(0)', 'parentdir'], {}), '(0, parentdir)\n', (390, 404), False, 'import sys\n'), ((695, 722), 'configparser.ConfigParser', 'configparser.Co...
import functools import inspect import types from arrowhead.core import ErrorArrow from arrowhead.core import NormalArrow from arrowhead.core import Step from arrowhead.core import ValueArrow def step(func_or_label=None, **kwargs): """ Decorator for converting functions to steps. This decorator can be a...
[ "arrowhead.core.ValueArrow", "arrowhead.core.NormalArrow", "functools.wraps", "inspect.getargspec", "arrowhead.core.ErrorArrow" ]
[((2309, 2339), 'functools.wraps', 'functools.wraps', (['func_or_label'], {}), '(func_or_label)\n', (2324, 2339), False, 'import functools\n'), ((4390, 4415), 'arrowhead.core.ValueArrow', 'ValueArrow', (['target', 'value'], {}), '(target, value)\n', (4400, 4415), False, 'from arrowhead.core import ValueArrow\n'), ((449...
import asyncio import unittest from azure.storage.table import TableService, Entity from tests import ACCOUNT_KEY, ACCOUNT_NAME import logging logging.basicConfig(format='%(asctime)s %(name)-20s %(levelname)-5s %(message)s', level=logging.INFO) TEST_CONTAINER_PREFIX = 'tests' class TestContainers(unittest.TestCas...
[ "logging.basicConfig", "asyncio.get_event_loop", "azure.storage.table.Entity", "azure.storage.table.TableService" ]
[((145, 251), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s %(name)-20s %(levelname)-5s %(message)s"""', 'level': 'logging.INFO'}), "(format=\n '%(asctime)s %(name)-20s %(levelname)-5s %(message)s', level=logging.INFO)\n", (164, 251), False, 'import logging\n'), ((366, 390), 'asyncio....
# @Time : 8/20/21 18:00 PM # @Author : <NAME> # @Affiliation : Nanyang Technological University # @Email : <EMAIL> # @File : download_and_extract_noise_file.py """ dataset: MUSAN noise subdataset Usage: python download_and_extract_noise_file.py \ --data_root <absolute path to where the data should be st...
[ "os.path.exists", "os.listdir", "tarfile.open", "argparse.ArgumentParser", "os.rename", "os.path.join", "os.path.splitext", "os.chdir", "shutil.copyfile", "os.mkdir", "logging.info", "os.walk" ]
[((1447, 1506), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""MUSAN noise download"""'}), "(description='MUSAN noise download')\n", (1470, 1506), False, 'import argparse\n'), ((1812, 1857), 'os.path.join', 'os.path.join', (['data_root', "(data_set + '.tar.gz')"], {}), "(data_root, data_...
import matplot.pyplot as plt from gan4hep import gnn_gnn_gan as toGan from gan4hep.gan_base import GANOptimizer from gan4hep.graph import loop_dataset from gan4hep.graph import read_dataset def load_gnn_GAN(noise_dim, batch_size, ckpt_dir): gan = toGan.GAN(noise_dim, batch_size) optimizer = GANOptimizer(gan) ...
[ "matplot.pyplot.subplots", "more_itertools.pairwise", "gan4hep.gan_base.GANOptimizer", "gan4hep.gnn_gnn_gan.GAN" ]
[((253, 285), 'gan4hep.gnn_gnn_gan.GAN', 'toGan.GAN', (['noise_dim', 'batch_size'], {}), '(noise_dim, batch_size)\n', (262, 285), True, 'from gan4hep import gnn_gnn_gan as toGan\n'), ((302, 319), 'gan4hep.gan_base.GANOptimizer', 'GANOptimizer', (['gan'], {}), '(gan)\n', (314, 319), False, 'from gan4hep.gan_base import ...
# # Copyright (C) 2014-2016 UAVCAN Development Team <uavcan.org> # # This software is distributed under the terms of the MIT License. # # Author: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # from __future__ import division, absolute_import, print_function, unicode_literals import os import dronecan from dronecan.tr...
[ "dronecan.switch_union_field", "dronecan.uavcan.protocol.AccessCommandShell.Response", "dronecan.uavcan.protocol.param.ExecuteOpcode.Request", "dronecan.is_request", "dronecan.uavcan.equipment.indication.LightsCommand", "StringIO.StringIO", "dronecan.uavcan.protocol.GetNodeInfo.Response", "dronecan.ua...
[((3857, 3867), 'StringIO.StringIO', 'StringIO', ([], {}), '()\n', (3865, 3867), False, 'from StringIO import StringIO\n'), ((8847, 8886), 'dronecan.get_dronecan_data_type', 'dronecan.get_dronecan_data_type', (['struct'], {}), '(struct)\n', (8878, 8886), False, 'import dronecan\n'), ((8894, 8921), 'dronecan.is_request'...
''' a set of utilities to create matrix representations (Laplacians) of graphs ''' import numpy as np def complete_gl(n): """ return the Laplacian of a complete graph (all nodes are connected to all edges) Parameters ---------- n : int number of nodes in the graph Examples --...
[ "numpy.eye", "numpy.ones", "numpy.diag", "numpy.zeros", "numpy.random.randint", "numpy.triu" ]
[((2031, 2047), 'numpy.zeros', 'np.zeros', (['(v, v)'], {}), '((v, v))\n', (2039, 2047), True, 'import numpy as np\n'), ((3510, 3526), 'numpy.zeros', 'np.zeros', (['(v, v)'], {}), '((v, v))\n', (3518, 3526), True, 'import numpy as np\n'), ((568, 583), 'numpy.ones', 'np.ones', (['(n, n)'], {}), '((n, n))\n', (575, 583),...
#!/usr/bin/env python3 """Python implementation of the SPHINCS signature scheme Usage: SPHINCS.py keygen [--secret-key FILE] [--public-key FILE] SPHINCS.py sign [-m FILE|--message FILE] [--secret-key FILE] [-s FILE|--signature FILE] SPHINCS.py verify [-m FILE|--message FILE] [-s FILE|--signature FILE] [--p...
[ "trees.auth_path", "WOTSplus.WOTSplus", "os.urandom", "bytes_utils.xor", "blake.BLAKE", "HORST.HORST", "trees.hash_tree", "ChaCha.ChaCha", "math.log", "trees.root", "trees.construct_root", "trees.l_tree", "docopt.docopt" ]
[((7458, 7480), 'docopt.docopt', 'docopt.docopt', (['__doc__'], {}), '(__doc__)\n', (7471, 7480), False, 'import docopt\n'), ((2249, 2294), 'WOTSplus.WOTSplus', 'WOTSplus', ([], {'n': 'n', 'w': 'w', 'F': 'self.F', 'Gl': 'self.Glambda'}), '(n=n, w=w, F=self.F, Gl=self.Glambda)\n', (2257, 2294), False, 'from WOTSplus imp...
# coding: utf-8 """ DocuSign Rooms API - v2 An API for an integrator to access the features of DocuSign Rooms # noqa: E501 OpenAPI spec version: v2 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os...
[ "six.iteritems" ]
[((4541, 4568), 'six.iteritems', 'iteritems', (["params['kwargs']"], {}), "(params['kwargs'])\n", (4550, 4568), False, 'from six import iteritems\n')]
# flake8: noqa # Copyright (c) 2017 <NAME> # Copyright (c) 2016-2017 The pytsrepr Developers # <https://github.com/holgern/pytsrepr> # See LICENSE for license details. from __future__ import division, print_function, absolute_import from .paa import * from . import data from pytsrepr.versio...
[ "numpy.testing.Tester" ]
[((635, 643), 'numpy.testing.Tester', 'Tester', ([], {}), '()\n', (641, 643), False, 'from numpy.testing import Tester\n')]
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ "tensorflow.python.framework.tensor_shape.scalar", "tensorflow.python.ops.gen_linalg_ops.batch_matrix_solve_ls", "tensorflow.python.framework.tensor_shape.unknown_shape", "tensorflow.python.ops.gen_linalg_ops.matrix_solve_ls", "tensorflow.python.framework.ops.RegisterShape", "tensorflow.python.framework.t...
[((1116, 1145), 'tensorflow.python.framework.ops.RegisterShape', 'ops.RegisterShape', (['"""Cholesky"""'], {}), "('Cholesky')\n", (1133, 1145), False, 'from tensorflow.python.framework import ops\n'), ((1147, 1181), 'tensorflow.python.framework.ops.RegisterShape', 'ops.RegisterShape', (['"""MatrixInverse"""'], {}), "('...
#!/usr/bin/env python3 import os import time import unittest from iron.util.log import get_logger from iron.model import db from iron.model.file import FileOperator from iron.service.chunk_server import ChunkServer from iron.service.chunk_service import ChunkService class MockChunkServer(ChunkServer): def __init...
[ "iron.util.log.get_logger", "iron.model.db.drop_all", "iron.model.db.create_all", "iron.model.file.FileOperator.create", "iron.service.chunk_service.ChunkService", "os.path.join", "time.sleep", "iron.model.db.session.add", "iron.model.db.session.commit" ]
[((426, 446), 'iron.util.log.get_logger', 'get_logger', (['__name__'], {}), '(__name__)\n', (436, 446), False, 'from iron.util.log import get_logger\n'), ((502, 537), 'os.path.join', 'os.path.join', (['self.workspace', 'chunk'], {}), '(self.workspace, chunk)\n', (514, 537), False, 'import os\n'), ((606, 621), 'time.sle...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('queue', '0005_queue_node_required'), ] operations = [ migrations.RemoveField( model_name='queuedepthbyjobtype', ...
[ "django.db.migrations.DeleteModel", "django.db.migrations.RemoveField" ]
[((250, 323), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""queuedepthbyjobtype"""', 'name': '"""job_type"""'}), "(model_name='queuedepthbyjobtype', name='job_type')\n", (272, 323), False, 'from django.db import models, migrations\n'), ((368, 418), 'django.db.migrations.DeleteMod...
from FrameLibDocs.utils import write_json from FrameLibDocs.classes import dParseAndBuild, Documentation def main(docs): """ A simplified version of the qlookup used to display information about specific objects when hovered over in the umenu. """ docs.interfaces_dir.mkdir(exist_ok=True) obj_looku...
[ "FrameLibDocs.classes.dParseAndBuild", "FrameLibDocs.utils.write_json", "FrameLibDocs.classes.Documentation" ]
[((388, 404), 'FrameLibDocs.classes.dParseAndBuild', 'dParseAndBuild', ([], {}), '()\n', (402, 404), False, 'from FrameLibDocs.classes import dParseAndBuild, Documentation\n'), ((542, 586), 'FrameLibDocs.utils.write_json', 'write_json', (['obj_lookup', 'worker.d_master_dict'], {}), '(obj_lookup, worker.d_master_dict)\n...
from joern.shelltool.TraversalTool import TraversalTool from py2neo import neo4j DEFAULT_TAGNAME = 'tag' BATCH_SIZE = 1000 class JoernTag(TraversalTool): def __init__(self, DESCRIPTION): TraversalTool.__init__(self, DESCRIPTION) self.argParser.add_argument("-t", "--tag", default = D...
[ "joern.shelltool.TraversalTool.TraversalTool.__init__", "py2neo.neo4j.Node", "py2neo.neo4j.WriteBatch" ]
[((207, 248), 'joern.shelltool.TraversalTool.TraversalTool.__init__', 'TraversalTool.__init__', (['self', 'DESCRIPTION'], {}), '(self, DESCRIPTION)\n', (229, 248), False, 'from joern.shelltool.TraversalTool import TraversalTool\n'), ((847, 891), 'py2neo.neo4j.WriteBatch', 'neo4j.WriteBatch', (['self.dbInterface.j.graph...
from cryptography.fernet import Fernet with open("keys/master_pwd.key", "wb") as f: global key key = Fernet.generate_key() f.write(key) k = Fernet(key) with open("../pwds/master.pwd", "rb") as f: global data data = f.read() global token token = k.encrypt(data) with open("../pwds/master.pw...
[ "cryptography.fernet.Fernet", "cryptography.fernet.Fernet.generate_key" ]
[((154, 165), 'cryptography.fernet.Fernet', 'Fernet', (['key'], {}), '(key)\n', (160, 165), False, 'from cryptography.fernet import Fernet\n'), ((110, 131), 'cryptography.fernet.Fernet.generate_key', 'Fernet.generate_key', ([], {}), '()\n', (129, 131), False, 'from cryptography.fernet import Fernet\n')]
import RLlib as RL import numpy as np import matplotlib.pyplot as plt import torch testName = "Testkladd" simName = "TestkladdSim" #critic = torch.load("Models\Success4_v4\model.pt") critic = torch.load("Models/{0}/model.pt".format(testName)) actor = RL.Agents.OptimalControl(critic) disturber = RL.Agents.OptimalDist...
[ "RLlib.Agents.OptimalControl", "RLlib.Agents.OptimalDisturber", "RLlib.Graphics.generatePlots", "matplotlib.pyplot.show" ]
[((254, 286), 'RLlib.Agents.OptimalControl', 'RL.Agents.OptimalControl', (['critic'], {}), '(critic)\n', (278, 286), True, 'import RLlib as RL\n'), ((299, 333), 'RLlib.Agents.OptimalDisturber', 'RL.Agents.OptimalDisturber', (['critic'], {}), '(critic)\n', (325, 333), True, 'import RLlib as RL\n'), ((545, 622), 'RLlib.G...
# import necessary libraries: # Browser from splinter # BeautifulSoup from bs4 from splinter import Browser from bs4 import BeautifulSoup # --------------------------------------------------------- # Define a function called "init_browser" to initialize your browser def init_browser(): # Create a Browser instanc...
[ "bs4.BeautifulSoup", "splinter.Browser" ]
[((634, 686), 'splinter.Browser', 'Browser', (['"""chrome"""'], {'headless': '(False)'}), "('chrome', **executable_path, headless=False)\n", (641, 686), False, 'from splinter import Browser\n'), ((1281, 1315), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""html.parser"""'], {}), "(html, 'html.parser')\n", (1294, 1...
from DesignPatterns.Factory.Sedan import Sedan from DesignPatterns.Factory.SUV import SUV from DesignPatterns.Factory.Hatchback import Hatchback class VehicleFactory: def generate(self, vehicle_type): if vehicle_type is 'Sedan': return Sedan().produce_vehicle() elif vehicle_type is 'S...
[ "DesignPatterns.Factory.Hatchback.Hatchback", "DesignPatterns.Factory.Sedan.Sedan", "DesignPatterns.Factory.SUV.SUV" ]
[((263, 270), 'DesignPatterns.Factory.Sedan.Sedan', 'Sedan', ([], {}), '()\n', (268, 270), False, 'from DesignPatterns.Factory.Sedan import Sedan\n'), ((344, 349), 'DesignPatterns.Factory.SUV.SUV', 'SUV', ([], {}), '()\n', (347, 349), False, 'from DesignPatterns.Factory.SUV import SUV\n'), ((429, 440), 'DesignPatterns....
import sys from flask import request, url_for def test_valid_user(client): print('url_for: {}'.format(url_for('user', id=1))) resp = client.get(url_for('user',id=1)) print('resp: {}'.format(dir(resp))) assert resp.status_code == 200
[ "flask.url_for" ]
[((154, 175), 'flask.url_for', 'url_for', (['"""user"""'], {'id': '(1)'}), "('user', id=1)\n", (161, 175), False, 'from flask import request, url_for\n'), ((108, 129), 'flask.url_for', 'url_for', (['"""user"""'], {'id': '(1)'}), "('user', id=1)\n", (115, 129), False, 'from flask import request, url_for\n')]
# -------------- # Using Numpy print('Using Numpy') import numpy as np # Not every data format will be in csv there are other file formats also. # This exercise will help you deal with other file formats and how toa read it. data_ipl = np.genfromtxt(path, delimiter=',',dtype='str' ,skip_header=True) # How many matche...
[ "collections.Counter", "numpy.genfromtxt", "pandas.read_csv" ]
[((237, 302), 'numpy.genfromtxt', 'np.genfromtxt', (['path'], {'delimiter': '""","""', 'dtype': '"""str"""', 'skip_header': '(True)'}), "(path, delimiter=',', dtype='str', skip_header=True)\n", (250, 302), True, 'import numpy as np\n'), ((1654, 1692), 'collections.Counter', 'Counter', (['records_with_six_runs[:, -10]']...
#!/usr/bin/env python from __future__ import absolute_import, division, print_function import os import sys import subprocess import argparse from functools import reduce from itertools import chain from pyHIPIFY import hipify_python parser = argparse.ArgumentParser(description='Top-level script for HIPifying, filli...
[ "argparse.ArgumentParser", "pyHIPIFY.hipify_python.hipify", "os.path.join", "os.path.realpath", "os.path.dirname" ]
[((246, 355), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Top-level script for HIPifying, filling in most common parameters"""'}), "(description=\n 'Top-level script for HIPifying, filling in most common parameters')\n", (269, 355), False, 'import argparse\n'), ((1439, 1617), 'pyHI...
import pytest from flask_pyoidc.redirect_uri_config import RedirectUriConfig class TestRedirectUriConfig(object): LEGACY_CONFIG = {'SERVER_NAME': 'example.com', 'PREFERRED_URL_SCHEME': 'http'} def test_legacy_config_defaults(self): config = RedirectUriConfig.from_config(self.LEGACY_CONFIG) as...
[ "flask_pyoidc.redirect_uri_config.RedirectUriConfig.from_config", "pytest.raises" ]
[((260, 309), 'flask_pyoidc.redirect_uri_config.RedirectUriConfig.from_config', 'RedirectUriConfig.from_config', (['self.LEGACY_CONFIG'], {}), '(self.LEGACY_CONFIG)\n', (289, 309), False, 'from flask_pyoidc.redirect_uri_config import RedirectUriConfig\n'), ((488, 580), 'flask_pyoidc.redirect_uri_config.RedirectUriConfi...
import os import pathlib def model_path(config, root="./saved"): root = pathlib.Path(root) filename = "{}".format(config.dataset) # Dataset-specific keys if config.dataset in ["CIFAR10"]: filename += "_augm_{}".format( config.augment, ) # Model-specific keys file...
[ "os.makedirs", "pathlib.Path" ]
[((79, 97), 'pathlib.Path', 'pathlib.Path', (['root'], {}), '(root)\n', (91, 97), False, 'import pathlib\n'), ((1734, 1766), 'os.makedirs', 'os.makedirs', (['root'], {'exist_ok': '(True)'}), '(root, exist_ok=True)\n', (1745, 1766), False, 'import os\n')]
# GBR regression # Part 1 Preparing the data # Import libraries import numpy as np import pandas as pd from sklearn import metrics from sklearn.ensemble import GradientBoostingRegressor # Import of boston housing data set: from sklearn.datasets import load_boston boston = load_boston() X=boston.data y=bost...
[ "seaborn.set", "matplotlib.pyplot.savefig", "sklearn.metrics.r2_score", "matplotlib.pyplot.ylabel", "sklearn.model_selection.train_test_split", "matplotlib.pyplot.xlabel", "sklearn.datasets.load_boston", "sklearn.metrics.mean_squared_error", "matplotlib.pyplot.close", "seaborn.scatterplot", "pan...
[((284, 297), 'sklearn.datasets.load_boston', 'load_boston', ([], {}), '()\n', (295, 297), False, 'from sklearn.datasets import load_boston\n'), ((359, 374), 'pandas.DataFrame', 'pd.DataFrame', (['X'], {}), '(X)\n', (371, 374), True, 'import pandas as pd\n'), ((547, 601), 'sklearn.model_selection.train_test_split', 'tr...
from __main__ import app import json from pypsrp.client import Client from flask import request, Response @app.route('/api/powershell', methods=['GET', 'POST']) def remotePowershell(): data = json.loads(request.data) try: with Client(data["host"], ssl=False, username=data["username"], password=data["pa...
[ "json.loads", "pypsrp.client.Client", "flask.Response", "__main__.app.route" ]
[((108, 161), '__main__.app.route', 'app.route', (['"""/api/powershell"""'], {'methods': "['GET', 'POST']"}), "('/api/powershell', methods=['GET', 'POST'])\n", (117, 161), False, 'from __main__ import app\n'), ((197, 221), 'json.loads', 'json.loads', (['request.data'], {}), '(request.data)\n', (207, 221), False, 'impor...
import time import requests from src import * from src.helper import log, env from src.helper.response import get def get_basic_user_information(username): for attempt in range(0, GITHUB_API_RETRIES): try: endpoint = GITHUB_SINGLE_USER_ENDPOINT.format(username=username) params = d...
[ "src.helper.env.get_github_client_id", "time.sleep", "requests.get", "src.helper.log.warn", "src.helper.response.get", "src.helper.env.get_github_client_secret", "src.helper.log.error" ]
[((431, 496), 'requests.get', 'requests.get', (['endpoint'], {'params': 'params', 'timeout': 'GITHUB_API_TIMEOUT'}), '(endpoint, params=params, timeout=GITHUB_API_TIMEOUT)\n', (443, 496), False, 'import requests\n'), ((2493, 2558), 'requests.get', 'requests.get', (['endpoint'], {'params': 'params', 'timeout': 'GITHUB_A...
# Copyright 2019 Red Hat # # 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 ...
[ "tobiko.reset_fixture", "tobiko.get_fixture", "tobiko.openstack.heat._template.heat_template", "time.sleep", "tobiko.config.get_bool_env", "tobiko.openstack.heat._client.heat_client", "tobiko.setup_fixture", "tobiko.fixture_property", "tobiko.check_valid_type", "oslo_log.log.getLogger" ]
[((880, 903), 'oslo_log.log.getLogger', 'log.getLogger', (['__name__'], {}), '(__name__)\n', (893, 903), False, 'from oslo_log import log\n'), ((1574, 1637), 'tobiko.check_valid_type', 'tobiko.check_valid_type', (['parameters', 'HeatStackParametersFixture'], {}), '(parameters, HeatStackParametersFixture)\n', (1597, 163...
from typing import Dict, Any, Optional from django.utils.module_loading import import_string from django.utils.translation import gettext_lazy as _ from django.db import models from django.http.request import HttpRequest from django.http import HttpResponseRedirect from django.utils.functional import cached_property f...
[ "django.http.HttpResponseRedirect", "wagtail.admin.edit_handlers.TabbedInterface", "wagtail.images.edit_handlers.ImageChooserPanel", "django.http.JsonResponse", "wagtail.admin.edit_handlers.FieldPanel", "django.utils.translation.gettext_lazy", "django.utils.module_loading.import_string", "django.db.mo...
[((6506, 6545), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), '(auto_now_add=True)\n', (6526, 6545), False, 'from django.db import models\n'), ((6560, 6595), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now': '(True)'}), '(auto_now=True)\n', (6580, ...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from collections import defaultdict from flask import session fr...
[ "indico.web.util.jsonify_template", "indico.modules.events.registration.util.get_registered_event_persons", "indico.modules.events.util.check_event_locked", "indico.util.i18n._", "indico.modules.events.contributions.models.subcontributions.SubContribution.contribution.has", "collections.defaultdict", "i...
[((1316, 1352), 'indico.modules.events.util.check_event_locked', 'check_event_locked', (['self', 'self.event'], {}), '(self, self.event)\n', (1334, 1352), False, 'from indico.modules.events.util import check_event_locked\n'), ((2326, 2366), 'indico.modules.events.registration.util.get_registered_event_persons', 'get_re...
"Module containes Rule class" import re from bobot.Errors import RuleNameError from bobot.utils import execValue, isFn, instanceof, someOf from bobot.Response import Response, Message def isResponseClass(i): """ Checks is item is response class (one of Response and Message) @param {*} i @ret...
[ "re.compile", "bobot.Response.Response", "bobot.utils.isFn", "bobot.utils.instanceof", "bobot.utils.execValue" ]
[((350, 384), 'bobot.utils.instanceof', 'instanceof', (['i', '[Response, Message]'], {}), '(i, [Response, Message])\n', (360, 384), False, 'from bobot.utils import execValue, isFn, instanceof, someOf\n'), ((402, 418), 're.compile', 're.compile', (['"""re"""'], {}), "('re')\n", (412, 418), False, 'import re\n'), ((959, ...
import can bus1 = can.interface.Bus('can0', bustype='virtual') bus2 = can.interface.Bus('can0', bustype='virtual') msg1 = can.Message(arbitration_id=0xabcde, data=[1,2,3]) bus1.send(msg1) msg2 = bus2.recv() print(hex(msg1.arbitration_id)) print(hex(msg2.arbitration_id)) assert msg1.arbitration_id == msg2.arbitration...
[ "can.interface.Bus", "can.Message" ]
[((19, 63), 'can.interface.Bus', 'can.interface.Bus', (['"""can0"""'], {'bustype': '"""virtual"""'}), "('can0', bustype='virtual')\n", (36, 63), False, 'import can\n'), ((71, 115), 'can.interface.Bus', 'can.interface.Bus', (['"""can0"""'], {'bustype': '"""virtual"""'}), "('can0', bustype='virtual')\n", (88, 115), False...
import unittest import torch import torch_testing as tt class TestAssertAllclose(unittest.TestCase): def test_with_allclose_tensors(self): a = torch.tensor([1, 2, 23.65799, 0]) b = torch.tensor([1, 2, 23.657989, 0]) tt.assert_allclose(a, b) def test_with_not_allclose_tensors(self): ...
[ "unittest.main", "torch.tensor", "torch_testing.assert_allclose" ]
[((991, 1006), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1004, 1006), False, 'import unittest\n'), ((158, 191), 'torch.tensor', 'torch.tensor', (['[1, 2, 23.65799, 0]'], {}), '([1, 2, 23.65799, 0])\n', (170, 191), False, 'import torch\n'), ((204, 238), 'torch.tensor', 'torch.tensor', (['[1, 2, 23.657989, 0]'...
import enum import os DEFAULT_ORDER = 'CDHS' SUITS_FRENCH = {'C': 'Clubs', 'D': 'Diamonds', 'H': 'Hearts', 'S': 'Spades'} SUITS_GERMAN = {'E': 'Eichel', 'S': 'Schellen', 'H': 'Herz', 'L': 'Laub'} class SuitOrder: def __init__(self, order=DEFAULT_ORDER, name_hint=None): self.order = list(order) # Copy ...
[ "os.environ.get" ]
[((1654, 1702), 'os.environ.get', 'os.environ.get', (['"""SOLITAIRE_ORDER"""', 'DEFAULT_ORDER'], {}), "('SOLITAIRE_ORDER', DEFAULT_ORDER)\n", (1668, 1702), False, 'import os\n')]
# -*- coding: utf-8 -*- """ICU (LEGO Island Configuration Utility). Created 2015 Triangle717 <http://le717.github.io/> Licensed under The MIT License <http://opensource.org/licenses/MIT/> """ import ctypes import logging import subprocess __all__ = ("Utils") class Utils: """Utility methods.""" @stati...
[ "ctypes.windll.shell32.IsUserAnAdmin", "logging.shutdown", "logging.info", "subprocess.call" ]
[((901, 943), 'logging.info', 'logging.info', (['"""Reloading using RunAsAdmin"""'], {}), "('Reloading using RunAsAdmin')\n", (913, 943), False, 'import logging\n'), ((952, 970), 'logging.shutdown', 'logging.shutdown', ([], {}), '()\n', (968, 970), False, 'import logging\n'), ((979, 1012), 'subprocess.call', 'subproces...
#!/usr/bin/env python # Copyright (c) 2012 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 os import subprocess import pyauto_functional import pyauto import webrtc_test_base class MissingRequiredBinaryException(E...
[ "os.path.exists", "pyauto_functional.Main", "pyauto.PyUITest.tearDown", "subprocess.Popen", "pyauto.GURL", "pyauto.PyUITest.setUp", "pyauto.PyUITest.ExtraChromeFlags" ]
[((7890, 7914), 'pyauto_functional.Main', 'pyauto_functional.Main', ([], {}), '()\n', (7912, 7914), False, 'import pyauto_functional\n'), ((1212, 1239), 'pyauto.PyUITest.setUp', 'pyauto.PyUITest.setUp', (['self'], {}), '(self)\n', (1233, 1239), False, 'import pyauto\n'), ((1825, 1854), 'subprocess.Popen', 'subprocess.P...
#!/usr/bin/python3 # Power demand scheduler for a loadbank # Copyright (C) 2014 <NAME> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # ...
[ "time.time" ]
[((1113, 1124), 'time.time', 'time.time', ([], {}), '()\n', (1122, 1124), False, 'import time\n'), ((3701, 3712), 'time.time', 'time.time', ([], {}), '()\n', (3710, 3712), False, 'import time\n'), ((1941, 1952), 'time.time', 'time.time', ([], {}), '()\n', (1950, 1952), False, 'import time\n')]
# -*- encoding: utf-8 -*- try: from django.conf.urls import patterns, url, include except ImportError: from django.conf.urls.defaults import patterns, url, include from django.views.generic.base import TemplateView url_prefix = 'tinymce/images/' urlpatterns = patterns('tinymce_images.views', #ur...
[ "django.conf.urls.defaults.url", "django.conf.urls.defaults.include" ]
[((398, 494), 'django.conf.urls.defaults.url', 'url', (['"""^new_folder/(?P<name>\\\\w+)/(?P<path>[a-zA-Z0-9_/]*)$"""', '"""new_folder"""', '{}', '"""new_folder"""'], {}), "('^new_folder/(?P<name>\\\\w+)/(?P<path>[a-zA-Z0-9_/]*)$', 'new_folder', {\n }, 'new_folder')\n", (401, 494), False, 'from django.conf.urls.defa...
import os import Chamaeleo from Chamaeleo.methods.default import BaseCodingAlgorithm from Chamaeleo.methods.ecc import Hamming, ReedSolomon from Chamaeleo.methods.fixed import Church from Chamaeleo.utils.pipelines import RobustnessPipeline if __name__ == "__main__": root_path = os.path.dirname(Chamaeleo....
[ "Chamaeleo.utils.pipelines.RobustnessPipeline", "Chamaeleo.methods.ecc.ReedSolomon", "os.path.join", "Chamaeleo.methods.fixed.Church", "Chamaeleo.methods.ecc.Hamming", "os.path.dirname", "Chamaeleo.methods.default.BaseCodingAlgorithm" ]
[((294, 329), 'os.path.dirname', 'os.path.dirname', (['Chamaeleo.__file__'], {}), '(Chamaeleo.__file__)\n', (309, 329), False, 'import os\n'), ((718, 1045), 'Chamaeleo.utils.pipelines.RobustnessPipeline', 'RobustnessPipeline', ([], {'coding_schemes': 'coding_schemes', 'error_corrections': 'error_corrections', 'needed_i...
import doctest import encode import decode doctest.testmod(encode) doctest.testmod(decode)
[ "doctest.testmod" ]
[((45, 68), 'doctest.testmod', 'doctest.testmod', (['encode'], {}), '(encode)\n', (60, 68), False, 'import doctest\n'), ((69, 92), 'doctest.testmod', 'doctest.testmod', (['decode'], {}), '(decode)\n', (84, 92), False, 'import doctest\n')]
""" Tests for inequality.py """ import numpy as np from numpy.testing import assert_allclose, assert_raises from scipy.stats import linregress from quantecon import lorenz_curve, gini_coefficient, \ shorrocks_index, rank_size def test_lorenz_curve(): """ Tests `lorenz` function, which calculates the l...
[ "numpy.random.normal", "quantecon.lorenz_curve", "quantecon.shorrocks_index", "numpy.repeat", "numpy.testing.assert_allclose", "numpy.log", "numpy.testing.assert_raises", "numpy.random.exponential", "numpy.random.pareto", "numpy.exp", "numpy.random.randint", "numpy.random.weibull", "numpy.ra...
[((727, 742), 'quantecon.lorenz_curve', 'lorenz_curve', (['y'], {}), '(y)\n', (739, 742), False, 'from quantecon import lorenz_curve, gini_coefficient, shorrocks_index, rank_size\n'), ((747, 798), 'numpy.testing.assert_allclose', 'assert_allclose', (['cum_people', 'cum_income'], {'rtol': '(0.001)'}), '(cum_people, cum_...
#!/usr/bin/env python2 import numpy as np import cPickle from numpy.linalg import norm from numpy import exp, sqrt, sum, square NUCLEAR_CHARGE = dict() NUCLEAR_CHARGE["H"] = 1.0 NUCLEAR_CHARGE["C"] = 6.0 NUCLEAR_CHARGE["N"] = 7.0 NUCLEAR_CHARGE["O"] = 8.0 NUCLEAR_CHARGE["S"] = 16.0 COULOMB_MATRIX_SIZE = 23 HOF_DFTB...
[ "numpy.array", "numpy.zeros", "cPickle.load", "numpy.linalg.norm" ]
[((3210, 3262), 'numpy.zeros', 'np.zeros', (['(COULOMB_MATRIX_SIZE, COULOMB_MATRIX_SIZE)'], {}), '((COULOMB_MATRIX_SIZE, COULOMB_MATRIX_SIZE))\n', (3218, 3262), True, 'import numpy as np\n'), ((3826, 3841), 'cPickle.load', 'cPickle.load', (['f'], {}), '(f)\n', (3838, 3841), False, 'import cPickle\n'), ((2014, 2033), 'n...
import torch import torch.nn as nn import torch.nn.functional class MLP_three_layered(nn.Module): def __init__(self): super(three_layered, self).__init__() self.fc1 = nn.Linear(28*28, 512) self.fc2 = nn.Linear(512, 512) self.fc3 = nn.Linear(512, 10) self.droput = nn.Dropout...
[ "torch.cuda.is_available", "torch.nn.Dropout", "torch.nn.Linear", "torch.device" ]
[((189, 212), 'torch.nn.Linear', 'nn.Linear', (['(28 * 28)', '(512)'], {}), '(28 * 28, 512)\n', (198, 212), True, 'import torch.nn as nn\n'), ((230, 249), 'torch.nn.Linear', 'nn.Linear', (['(512)', '(512)'], {}), '(512, 512)\n', (239, 249), True, 'import torch.nn as nn\n'), ((269, 287), 'torch.nn.Linear', 'nn.Linear', ...
import logging from cloudfoundry_client.client import CloudFoundryClient from cloudfoundry_client.errors import InvalidStatusCode logger = logging.getLogger(__name__) def get_cf_client(config): # "why is this a function, and the rest of these are static?" # good question. The __init__ on this immediately pro...
[ "logging.getLogger", "cloudfoundry_client.client.CloudFoundryClient" ]
[((140, 167), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (157, 167), False, 'import logging\n'), ((635, 677), 'cloudfoundry_client.client.CloudFoundryClient', 'CloudFoundryClient', (['config.CF_API_ENDPOINT'], {}), '(config.CF_API_ENDPOINT)\n', (653, 677), False, 'from cloudfoundry_cl...
# Copyright 2020 The FedLearner Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ "tensorflow.compat.v1.train.Features", "logging.debug", "tensorflow.compat.v1.gfile.Exists", "psutil.Process", "tensorflow.compat.v1.train.BytesList", "tensorflow.compat.v1.train.Int64List", "guppy.hpy", "threading.Lock", "tensorflow.compat.v1.io.tf_record_iterator", "collections.OrderedDict", "...
[((3789, 3834), 'os.path.join', 'os.path.join', (['"""data_source"""', 'data_source_name'], {}), "('data_source', data_source_name)\n", (3801, 3834), False, 'import os\n'), ((7748, 7761), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (7759, 7761), False, 'from collections import OrderedDict\n'), ((8870, 8...
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ "googlecloudsdk.core.util.platforms.OperatingSystem.Current", "googlecloudsdk.api_lib.emulators.util.EnsureComponentIsInstalled" ]
[((1343, 1378), 'googlecloudsdk.core.util.platforms.OperatingSystem.Current', 'platforms.OperatingSystem.Current', ([], {}), '()\n', (1376, 1378), False, 'from googlecloudsdk.core.util import platforms\n'), ((1552, 1642), 'googlecloudsdk.api_lib.emulators.util.EnsureComponentIsInstalled', 'util.EnsureComponentIsInstall...
import os from dodo_commands.dependencies import (yaml_round_trip_dump, yaml_round_trip_load) from dodo_commands.framework.config import merge_into_config from dodo_commands.framework.paths import Paths def create_config_dir(config_dir): """Install the dir with dodo_comman...
[ "os.path.exists", "dodo_commands.dependencies.yaml_round_trip_dump", "os.makedirs", "os.path.join", "dodo_commands.framework.paths.Paths", "dodo_commands.framework.config.merge_into_config" ]
[((341, 364), 'os.makedirs', 'os.makedirs', (['config_dir'], {}), '(config_dir)\n', (352, 364), False, 'import os\n'), ((387, 426), 'os.path.join', 'os.path.join', (['config_dir', '"""config.yaml"""'], {}), "(config_dir, 'config.yaml')\n", (399, 426), False, 'import os\n'), ((727, 772), 'os.path.exists', 'os.path.exist...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) <NAME> (2018) # # This file is part of the gravityspytools django webapp. """Setup the gravityspytools package """ from __future__ import print_function import sys if sys.version < '2.6': raise ImportError("Python versions older than 2.6 are not suppo...
[ "versioneer.get_cmdclass", "setuptools.find_packages", "setuptools.setup", "versioneer.get_version" ]
[((684, 708), 'versioneer.get_version', 'versioneer.get_version', ([], {}), '()\n', (706, 708), False, 'import versioneer\n'), ((1160, 1175), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (1173, 1175), False, 'from setuptools import setup, find_packages\n'), ((1177, 2404), 'setuptools.setup', 'setup', ...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. ### importing OGB-LSC from ogb.lsc import PCQM4MEvaluator from ogb.lsc.pcqm4m_pyg import PygPCQM4MDataset import torch import torch.optim as optim from torch.utils.tensorboard import SummaryWriter from torch.optim.lr_scheduler import StepLR fro...
[ "numpy.hstack", "torch.nn.L1Loss", "torch.cuda.is_available", "sklearn.model_selection.KFold", "ogb.lsc.pcqm4m_pyg.PygPCQM4MDataset", "sys.path.append", "torch.utils.tensorboard.SummaryWriter", "torch_geometric.data.dataloader.DataLoader", "ogb.lsc.PCQM4MEvaluator", "utils.config.get_args", "num...
[((428, 448), 'sys.path.append', 'sys.path.append', (['"""."""'], {}), "('.')\n", (443, 448), False, 'import sys\n'), ((583, 600), 'torch.nn.L1Loss', 'torch.nn.L1Loss', ([], {}), '()\n', (598, 600), False, 'import torch\n'), ((1350, 1374), 'torch.cat', 'torch.cat', (['y_true'], {'dim': '(0)'}), '(y_true, dim=0)\n', (13...
# Implementation of analyze_md command, not used for actual data import # # This will report some statistics used to understand common field values as # well as the dataset facts used on the Maryland landing page. import logging import pandas as pd from tsdata.utils import download_and_unzip_data, get_datafile_path ...
[ "logging.getLogger", "tsdata.utils.get_datafile_path", "tsdata.utils.download_and_unzip_data", "md.data.importer.load_xls", "md.data.importer.process_raw_data" ]
[((386, 413), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (403, 413), False, 'import logging\n'), ((2667, 2708), 'tsdata.utils.download_and_unzip_data', 'download_and_unzip_data', (['url', 'destination'], {}), '(url, destination)\n', (2690, 2708), False, 'from tsdata.utils import downl...
# -*- coding: utf-8 -*- """ Copyright (C) 2014-2016 bromix (plugin.video.youtube) Copyright (C) 2016-2018 plugin.video.youtube SPDX-License-Identifier: GPL-2.0-only See LICENSES/GPL-2.0-only for more information. """ from six.moves import range import copy import json import time from ...youtube.you...
[ "json.dumps", "six.moves.range", "time.time", "copy.deepcopy" ]
[((2811, 2823), 'six.moves.range', 'range', (['steps'], {}), '(steps)\n', (2816, 2823), False, 'from six.moves import range\n'), ((3050, 3074), 'copy.deepcopy', 'copy.deepcopy', (['json_data'], {}), '(json_data)\n', (3063, 3074), False, 'import copy\n'), ((3339, 3359), 'json.dumps', 'json.dumps', (['log_data'], {}), '(...
"""Preprocess.py This module takes AviationData.xml and provides a series of function for data cleaning and preprocessing.""" try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET import pandas as pd import os PATH = os.path.dirname(os.path.abspath(__file__)) FILENAME ...
[ "pandas.read_csv", "pandas.DataFrame.from_dict", "os.path.isfile", "xml.etree.ElementTree.ElementTree", "os.path.abspath" ]
[((284, 309), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (299, 309), False, 'import os\n'), ((558, 612), 'xml.etree.ElementTree.ElementTree', 'ET.ElementTree', ([], {'file': "(input_path + '/data/' + file_name)"}), "(file=input_path + '/data/' + file_name)\n", (572, 612), True, 'import xm...
import random import os import google.auth from googleapiclient import discovery from google.cloud import storage from core.framework import levels from core.framework.cloudhelpers import deployments, iam, gcstorage, cloudfunctions LEVEL_PATH = 'thunder/lab5ssrf' FLAG_PATH = 'core/levels/thunder/lab5ssrf' SCRIPTS_P...
[ "google.cloud.storage.Client", "core.framework.cloudhelpers.iam.generate_service_account_key", "core.framework.cloudhelpers.deployments.delete", "core.framework.levels.delete_start_files", "google.cloud.storage.Blob", "core.framework.cloudhelpers.deployments.insert", "random.randint" ]
[((1340, 1448), 'core.framework.cloudhelpers.deployments.insert', 'deployments.insert', (['LEVEL_PATH'], {'template_files': 'template_files', 'config_template_args': 'config_template_args'}), '(LEVEL_PATH, template_files=template_files,\n config_template_args=config_template_args)\n', (1358, 1448), False, 'from core...
import json import os import os.path import cv2 import numpy as np import torch import torch.utils.data as data_utl from tqdm import tqdm from dataset.vidor import VidOR from frames import extract_all_frames def video_to_tensor(pic): """Convert a ``numpy.ndarray`` to tensor. Converts a numpy.ndarray (T x H ...
[ "os.path.exists", "argparse.ArgumentParser", "videotransforms.CenterCrop", "dataset.vidor.VidOR", "numpy.asarray", "os.path.join", "torch.from_numpy", "videotransforms.RandomCrop", "torch.utils.data.DataLoader", "json.load", "cv2.resize", "cv2.imread", "frames.extract_all_frames", "videotr...
[((997, 1071), 'os.path.join', 'os.path.join', (['image_dir', 'video_path_splits[-2]', 'video_path_splits[-1][:-4]'], {}), '(image_dir, video_path_splits[-2], video_path_splits[-1][:-4])\n', (1009, 1071), False, 'import os\n'), ((1915, 1951), 'numpy.asarray', 'np.asarray', (['frames'], {'dtype': 'np.float32'}), '(frame...
from django import forms from crispy_forms.helper import FormHelper, Layout from crispy_forms.layout import Field, Submit from django.forms import formset_factory from .models import Purchase from products .models import Product from people.models import Supplier class PurchaseForm(forms.ModelForm): def __init__...
[ "products.models.Product.objects.all", "crispy_forms.layout.Submit", "crispy_forms.helper.FormHelper", "django.forms.Select", "django.forms.NumberInput", "crispy_forms.layout.Field", "django.forms.formset_factory", "django.forms.TextInput", "people.models.Supplier.objects.all" ]
[((2400, 2445), 'django.forms.formset_factory', 'formset_factory', (['ProductPurchaseForm'], {'extra': '(1)'}), '(ProductPurchaseForm, extra=1)\n', (2415, 2445), False, 'from django.forms import formset_factory\n'), ((367, 379), 'crispy_forms.helper.FormHelper', 'FormHelper', ([], {}), '()\n', (377, 379), False, 'from ...
# # Copyright (C) [2020] Futurewei Technologies, Inc. # # FORCE-RISCV is 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 # # THIS SOFTWARE IS PR...
[ "common.msg_utils.Msg.flush", "common.sys_utils.SysUtils.exec_process", "common.path_utils.PathUtils.check_file", "common.msg_utils.Msg.user" ]
[((1386, 1437), 'common.msg_utils.Msg.user', 'Msg.user', (['"""[FrunToCtrlExecutor::skip] not skipping"""'], {}), "('[FrunToCtrlExecutor::skip] not skipping')\n", (1394, 1437), False, 'from common.msg_utils import Msg\n'), ((1932, 1943), 'common.msg_utils.Msg.flush', 'Msg.flush', ([], {}), '()\n', (1941, 1943), False, ...
import datetime from collections import Iterable from dateutil import tz from atpy.data.iqfeed.iqfeed_level_1_provider import get_splits_dividends from atpy.data.iqfeed.util import * from atpy.data.splits_dividends import adjust_df from pyevents.events import EventFilter class IQFeedBarDataListener(iq.SilentBarList...
[ "dateutil.tz.gettz", "datetime.datetime.min.time", "pyevents.events.EventFilter", "atpy.data.iqfeed.iqfeed_level_1_provider.get_splits_dividends" ]
[((6346, 6630), 'pyevents.events.EventFilter', 'EventFilter', ([], {'listeners': 'self.listeners', 'event_filter': "(lambda e: True if 'type' in e and e['type'] == 'latest_bar_update' and e[\n 'interval_type'] == self.interval_type and e['interval_len'] == self.\n interval_len else False)", 'event_transformer': "...
import io import dash import dash_html_components as html import dash_core_components as dcc import dash_bootstrap_components as dbc from dash_extensions.enrich import Dash, ServersideOutput, Output, Input, State, Trigger from dash.exceptions import PreventUpdate import plotly.graph_objs as go import pandas a...
[ "dash_extensions.enrich.Input", "numpy.hstack", "dash_core_components.Input", "io.BytesIO", "numpy.column_stack", "plotly.graph_objs.Scatter", "dash_core_components.Store", "numpy.array", "utils.convert_latex", "dash_bootstrap_components.Input", "dash_core_components.send_data_frame", "dash_bo...
[((927, 1133), 'dash_core_components.Dropdown', 'dcc.Dropdown', ([], {'options': "[{'label': 'Analytical Model', 'value': 'analytical'}, {'label':\n 'Offline Model', 'value': 'offline'}]", 'className': '"""m-1"""', 'id': '"""model_select"""', 'value': '"""analytical"""', 'clearable': '(False)'}), "(options=[{'label'...
# Generated by Django 2.2.1 on 2019-07-19 10:12 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('app', '0001_initial'), ] operations = [ migrations.CreateModel( na...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((378, 471), '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", (394, 471), False, 'from django.db import migrations, models\...
#-*- coding:utf-8 -*- import re import ocr import time import sys import json import numpy as np from PIL import Image reload(sys) sys.setdefaultencoding('utf-8') def str2date(s): try: year = s.split('年')[0] month = s.split('年')[1].split('月')[0] day = s.split('年')[1].split('月')[1].split('日')...
[ "flask.request.args.get", "sys.setdefaultencoding", "PIL.Image.open", "flask.Flask", "re.sub", "re.findall", "time.time", "ocr.model" ]
[((131, 162), 'sys.setdefaultencoding', 'sys.setdefaultencoding', (['"""utf-8"""'], {}), "('utf-8')\n", (153, 162), False, 'import sys\n'), ((24430, 24445), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (24435, 24445), False, 'from flask import Flask, request\n'), ((19958, 19969), 'time.time', 'time.time'...
#!/usr/bin/env python from agate.aggregations.base import Aggregation from agate.aggregations.has_nulls import HasNulls from agate.aggregations.percentiles import Percentiles from agate.data_types import Number from agate.exceptions import DataTypeError from agate.utils import Quantiles from agate.warns import warn_nu...
[ "agate.warns.warn_null_calculation", "agate.aggregations.has_nulls.HasNulls", "agate.exceptions.DataTypeError", "agate.aggregations.percentiles.Percentiles" ]
[((1073, 1152), 'agate.exceptions.DataTypeError', 'DataTypeError', (['"""Deciles can only be applied to columns containing Number data."""'], {}), "('Deciles can only be applied to columns containing Number data.')\n", (1086, 1152), False, 'from agate.exceptions import DataTypeError\n'), ((1248, 1283), 'agate.warns.war...
import torch from PIL import Image class BaseDataset: """ Base class of person search dataset. """ def __init__(self, root, transforms, split): self.root = root self.transforms = transforms self.split = split assert self.split in ("train", "gallery", "query") s...
[ "torch.as_tensor", "PIL.Image.open" ]
[((984, 1035), 'torch.as_tensor', 'torch.as_tensor', (["anno['boxes']"], {'dtype': 'torch.float32'}), "(anno['boxes'], dtype=torch.float32)\n", (999, 1035), False, 'import torch\n'), ((1053, 1101), 'torch.as_tensor', 'torch.as_tensor', (["anno['pids']"], {'dtype': 'torch.int64'}), "(anno['pids'], dtype=torch.int64)\n",...
# Generated by Django 3.0.5 on 2020-04-25 20:00 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('critters', '0006_auto_20200419_1200'), ] operations = [ migrations.AddField( model_name='bug', ...
[ "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((372, 415), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)', 'null': '(True)'}), '(max_length=200, null=True)\n', (388, 415), False, 'from django.db import migrations, models\n'), ((540, 583), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)', 'null': '(True)'...
"""Utility module; various helper functions are implemented.""" import os as _os import os.path as _path import random as _random import logging as _logging from importlib import import_module as _import_module import yaml as _yaml import tensorflow as _tf import soundfile as _sf import utils.hangul as _hangul CONFI...
[ "logging.getLogger", "importlib.import_module", "logging.exception", "os.path.isdir", "tensorflow.contrib.training.HParams", "soundfile.read", "os.remove" ]
[((324, 354), 'tensorflow.contrib.training.HParams', '_tf.contrib.training.HParams', ([], {}), '()\n', (352, 354), True, 'import tensorflow as _tf\n'), ((2332, 2360), 'logging.getLogger', '_logging.getLogger', (['__name__'], {}), '(__name__)\n', (2350, 2360), True, 'import logging as _logging\n'), ((6542, 6570), 'os.pa...
from beluga.visualization import BelugaPlot from beluga.visualization.datasources import Dill # plots = BelugaPlot('./data.dill',default_sol=-1,default_step=-1) ds = Dill('./data.dill') # ds2 = Dill('./phu_2k5_eps4.dill') plots = BelugaPlot(datasource=ds,default_sol=-1,default_step=-1, renderer='matplotlib') # plots =...
[ "beluga.visualization.BelugaPlot", "beluga.visualization.datasources.Dill" ]
[((167, 186), 'beluga.visualization.datasources.Dill', 'Dill', (['"""./data.dill"""'], {}), "('./data.dill')\n", (171, 186), False, 'from beluga.visualization.datasources import Dill\n'), ((231, 317), 'beluga.visualization.BelugaPlot', 'BelugaPlot', ([], {'datasource': 'ds', 'default_sol': '(-1)', 'default_step': '(-1)...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
[ "pulumi.getter", "pulumi.set", "pulumi.ResourceOptions", "pulumi.get" ]
[((2373, 2415), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""capacityCommitmentId"""'}), "(name='capacityCommitmentId')\n", (2386, 2415), False, 'import pulumi\n'), ((2731, 2784), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""enforceSingleAdminProjectPerOrg"""'}), "(name='enforceSingleAdminProjectPerOrg')\...
from django import VERSION from django.conf.urls import url from .views import GetPopupView """ In django 1.10 JavaScriptCatalog is new so for older version django import view as function and for django >= 1.10 I use view class """ if VERSION < (1, 10): from django.views.i18n import javascript_catalog else: ...
[ "django.views.i18n.JavaScriptCatalog.as_view", "django.conf.urls.url" ]
[((458, 521), 'django.conf.urls.url', 'url', (['"""^jsi18n/$"""', 'javascript_catalog'], {'name': '"""javascript-catalog"""'}), "('^jsi18n/$', javascript_catalog, name='javascript-catalog')\n", (461, 521), False, 'from django.conf.urls import url\n'), ((607, 634), 'django.views.i18n.JavaScriptCatalog.as_view', 'JavaScr...
from django.db import models class Post(models.Model): pub_date = models.DateTimeField(auto_now=True) text = models.TextField() short = models.TextField(max_length=280) title = models.CharField(max_length=200)
[ "django.db.models.DateTimeField", "django.db.models.TextField", "django.db.models.CharField" ]
[((71, 106), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now': '(True)'}), '(auto_now=True)\n', (91, 106), False, 'from django.db import models\n'), ((118, 136), 'django.db.models.TextField', 'models.TextField', ([], {}), '()\n', (134, 136), False, 'from django.db import models\n'), ((149, 181...
import asyncio from bs4 import BeautifulSoup from urllib.parse import urlencode, urljoin from re import compile as re_compile, IGNORECASE, escape from mite import MiteError, ensure_fixed_separation import mite_http EMBEDDED_URL_REGEX = re_compile("url\(\s*[\"'](.*)[\"']\s*\)", IGNORECASE) class OptionError(MiteError)...
[ "re.compile", "mite.ensure_fixed_separation", "bs4.BeautifulSoup", "mite_http.get_session_pool", "urllib.parse.urljoin", "urllib.parse.urlencode" ]
[((237, 294), 're.compile', 're_compile', (['"""url\\\\(\\\\s*["\'](.*)["\']\\\\s*\\\\)"""', 'IGNORECASE'], {}), '(\'url\\\\(\\\\s*["\\\'](.*)["\\\']\\\\s*\\\\)\', IGNORECASE)\n', (247, 294), True, 'from re import compile as re_compile, IGNORECASE, escape\n'), ((858, 875), 'urllib.parse.urljoin', 'urljoin', (['url', 'a...
#!/usr/bin/python # encoding: utf-8 import tarsLog import shutil import os import sys import stat from tarsUtil import * log = tarsLog.getLogger() tarsDeploy = "/usr/local/app/tars" tarsDeployFrameBasicServerList = ["tarsregistry", "tarsnode", "tarsAdminRegistry", "tarspatch","tarsconfig"] tarsDeployFrameCommServerList...
[ "os.path.exists", "os.makedirs", "tarsLog.getLogger", "os.chmod", "shutil.copy" ]
[((127, 146), 'tarsLog.getLogger', 'tarsLog.getLogger', ([], {}), '()\n', (144, 146), False, 'import tarsLog\n'), ((1348, 1397), 'os.chmod', 'os.chmod', (["(dstDir + '/util/start.sh')", 'stat.S_IXGRP'], {}), "(dstDir + '/util/start.sh', stat.S_IXGRP)\n", (1356, 1397), False, 'import os\n'), ((2031, 2091), 'shutil.copy'...
import numpy as np import pandas as pd __base32 = '0123456789bcdefghjkmnpqrstuvwxyz' __decodemap = { } for i in range(len(__base32)): __decodemap[__base32[i]] = i del i def decode_exactly(geohash): lat_interval, lon_interval = (-90.0, 90.0), (-180.0, 180.0) lat_err, lon_err = 90.0, 180.0 is_even = True...
[ "pandas.DataFrame", "shapely.geometry.Polygon", "numpy.log10" ]
[((2748, 2762), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (2760, 2762), True, 'import pandas as pd\n'), ((3660, 3838), 'shapely.geometry.Polygon', 'Polygon', (['[[lon - lon_err, lat - lat_err], [lon - lon_err, lat + lat_err], [lon +\n lon_err, lat + lat_err], [lon + lon_err, lat - lat_err], [lon - lon_er...