gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2018 The TensorFlow 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...
#!/usr/bin/env python3 """ Convert $1 -- a markdown file to an HTML file in `/tmp/vim/<parent>/<basename>.html`. """ # Standard Library from os.path import realpath, basename, isfile, isdir, dirname, abspath import os import shutil import subprocess import sys import re import logging from logging import Logger from t...
# coding=utf-8 from __future__ import absolute_import, unicode_literals, division import pathtools.patterns import termcolor import logging import shutil import time import re import os class TimedSet(set): __slots__ = ["updated"] def __init__(self, updated): self.updated = updated super(Tim...
# Copyright (c) 2014 Red Hat, 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 require...
"""Basal Area Simulation""" #pylint: disable=no-member # these functions can be improved because the increment is not # autoregressive, so we can calculate it as a vector operation using # the other arrays then the actual values are just the cumulative sums # TODO: change initial age to data age # TODO: change present...
''' Scratchpad for test-based development. LICENSING ------------------------------------------------- hypergolix: A python Golix client. Copyright (C) 2016 Muterra, Inc. Contributors ------------ Nick Badger [email protected] | [email protected] | nickbadger.com This library is free...
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # # Convert I2C host format to SVG import logging as log from collections import namedtuple import i2csvg.i2csvg_data as sdata # validating version of int(x, 0) # return...
from __future__ import absolute_import, unicode_literals import warnings from functools import wraps from itertools import count from django.db import connection try: from django.db import connections, router except ImportError: # pre-Django 1.2 connections = router = None # noqa from django.db import mod...
# -*- coding: utf-8 -*- from classytags.arguments import Argument, MultiValueArgument from classytags.core import Options, Tag from classytags.helpers import InclusionTag from classytags.parser import Parser from cms.models import Page from cms.plugin_rendering import render_plugins, render_placeholder from cms.plugins...
# -*- coding: utf-8 -*- # Copyright 2021 Google LLC # # 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 agr...
#SBaaS from .stage03_quantification_measuredData_io import stage03_quantification_measuredData_io from .stage03_quantification_simulation_query import stage03_quantification_simulation_query from SBaaS_quantification.stage01_quantification_averages_query import stage01_quantification_averages_query from SBaaS_physiolog...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
from hubcheck.pageobjects.basepagewidget import BasePageWidget from hubcheck.pageobjects.basepageelement import Link from hubcheck.pageobjects.basepageelement import TextReadOnly class GroupsMenu1(BasePageWidget): def __init__(self, owner, locatordict={}): super(GroupsMenu1,self).__init__(owner,locatordict...
# -*- coding: utf-8 -*- # Copyright (C) 2017 Borewit # Copyright (C) 2019-2020 Philipp Wolfer # # 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 2 of the License, or # (at your o...
# Copyright 2021 Google LLC. 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 o...
from collections import OrderedDict import datetime import operator from django.contrib.admin.utils import (lookup_field, lookup_needs_distinct, label_for_field) from django.contrib.admin.views.main import EMPTY_CHANGELIST_VALUE from django.core.exceptions import ImproperlyConfi...
""" Python variables relevant to the Cas9 mutants described by Klienstiver et al. (2015), Nature, doi:10.1038/nature14592 Contains the variables: PI_domain: string, WT PI domain (AA 1099-1368) from UniProt (http://www.uniprot.org/uniprot/Q99ZW2) + AAs 1097, 1098 PI_sec_structure: dict with format 'type_#' : (st...
""" The ActivityPlugin is the most powerful plugin for tracking changes of individual entities. If you use ActivityPlugin you probably don't need to use TransactionChanges nor TransactionMeta plugins. You can initalize the ActivityPlugin by adding it to versioning manager. :: activity_plugin = ActivityPlugin() ...
import os import re from dnload.common import file_is_ascii_text from dnload.common import is_listing from dnload.common import is_verbose from dnload.common import listify from dnload.common import locate from dnload.common import run_command from dnload.platform_var import PlatformVar ##############################...
import os import unittest import utils import time import string import json CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) FIXTURES_DIR = os.path.join(CURRENT_DIR, "fixtures", "debian", "kafka-connect") KAFKA_READY = "bash -c 'cub kafka-ready {brokers} 40 -z $KAFKA_ZOOKEEPER_CONNECT && echo PASS || echo FAI...
""" While a Controlfile is being read in MetaServices allow for substitutions to be made. All of the code is here instead of living in controlfile.py so you don't have to scroll past the Controlfile class """ from enum import Enum from random import randint import logging module_logger = logging.getLogger('control.su...
#!/usr/bin/env python #ripp'ed and adapted from: https://github.com/spesmilo/electrum/blob/master/lib/mnemonic.py import os import math import unicodedata import binascii #conversion between hex, int, and binary. Also for the crc32 thing import random as cryptorandom import zlib import Keccak, ed25519#in this library ...
import json import atexit import hashlib import os import re import shutil import subprocess import shlex import tempfile import types from contextlib import contextmanager from insights.config import CommandSpec from insights.config.static import get_config from insights.parsers.uname import rhel_release_map from ins...
"""Bridges between the `asyncio` module and Tornado IOLoop. .. versionadded:: 3.2 This module integrates Tornado with the ``asyncio`` module introduced in Python 3.4 (and available `as a separate download <https://pypi.python.org/pypi/asyncio>`_ for Python 3.3). This makes it possible to combine the two libraries on...
#!/usr/bin/env python ######################################################################################### # # Vertebral Disks Detection # # # --------------------------------------------------------------------------------------- # Copyright (c) 2013 Polytechnique Montreal <www.neuro.polymtl.ca> # Authors: Karun ...
# Copyright 2012 NetApp # 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 applic...
# -*- coding: utf-8 -*- from nose.tools import * # flake8: noqa from website.models import NodeLog from website.project.model import Auth from website.util import permissions from api.base.settings.defaults import API_BASE from tests.base import ApiTestCase from tests.factories import ( ProjectFactory, Auth...
# -*- coding: utf-8 -*- # BSD 3-Clause License # # Copyright (c) 2017, ColoredInsaneAsylums # 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...
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource from twilio.base.page i...
# Copyright 2021 DeepMind Technologies Limited. 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 ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
'''Works with Tesira models using the Tesira Text Protocol (TTP)''' # TODO: # - For Maxtrix Mixer blocks, only cross-point muting is done. TELNET_TCPPORT = 23 param_Disabled = Parameter({'schema': {'type': 'boolean'}}) param_IPAddress = Parameter({'title': 'IP address', 'schema': {'type': 'string'}}) # TODO REMOVE ...
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich 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...
"""Admin API.""" from django import http from django.contrib.contenttypes.models import ContentType from django.utils.translation import ugettext as _ from django_filters import rest_framework as dj_filters from drf_spectacular.utils import extend_schema, extend_schema_view from rest_framework import filters, rendere...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distr...
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# -*- coding: utf-8 -*- # See LICENSE file for copyright and license details ''' Test 'datatype' module. ''' import unittest from misery import ( misc, ast, datatype, ) class TestMarkOutDatatypes(unittest.TestCase): def test_simple_func_decl(self): input_ast = ast.Module( decl...
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
from packaging.version import Version import pickle import random import warnings import mxnet as mx import numpy as np import pytest from mxnet.gluon import Trainer from mxnet.gluon.data import Dataset, DataLoader from mxnet.gluon.nn import HybridSequential, Dense import mlflow import mlflow.gluon from mlflow.tracki...
from __future__ import absolute_import from contextlib import contextmanager import os import sys import re import textwrap import site import scripttest import virtualenv from tests.lib.path import Path, curdir, u DATA_DIR = Path(__file__).folder.folder.join("data").abspath SRC_DIR = Path(__file__).abspath.folder....
from lpoly import LPoly, Poly from sympy.polys.monomialtools import ( monomial_mul, monomial_div, monomial_lcm, monomial_lex_key as O_lex, monomial_grlex_key as O_grlex, monomial_grevlex_key as O_grevlex, ) from sympy.utilities import any, all def S_poly(tp1,tp2): """expv1,p1 = tp1 with ex...
import copy import re import django from django import forms from django.core.files.uploadedfile import InMemoryUploadedFile from django.forms.utils import flatatt from django.forms.widgets import FileInput from django.template.loader import render_to_string from django.utils import formats, six from django.utils.enco...
# Copyright 2021 Google LLC. 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 o...
""" Consul KV Endpoint Access """ from consulate.api import base from consulate import utils class KV(base.Endpoint): """The :py:class:`consul.api.KV` class implements a :py:class:`dict` like interface for working with the Key/Value service. Simply use items on the :py:class:`consulate.Session` like you ...
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
class GameData: """Information about Skyrim.""" NEW_CHAR_LEVEL_INFO = { "Breton": { "Illusion": 20, "Conjuration": 25, "Destruction": 15, "Restoration": 20, "Alteration": 20, "Enchanting": 15, "Smithing": 15, ...
# -*- coding: utf-8 -*- """ httpbin.helpers ~~~~~~~~~~~~~~~ This module provides helper functions for httpbin. """ import json import base64 from hashlib import md5 from werkzeug.http import parse_authorization_header from flask import request, make_response from six.moves.urllib.parse import urlparse, urlunparse ...
from __future__ import unicode_literals import base64 import binascii import hashlib from django.dispatch import receiver from django.conf import settings from django.test.signals import setting_changed from django.utils import importlib from django.utils.datastructures import SortedDict from django.utils.encoding im...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- # pylint: ...
# -*- coding: utf-8 -*- #***************************************************************************** # Copyright (C) 2003-2006 Gary Bishop. # Copyright (C) 2006 Jorgen Stenarson. <[email protected]> # # Distributed under the terms of the BSD License. The full license is in # the file COPYIN...
"""Test for RFlink light components. Test setup of rflink lights component/platform. State tracking and control of Rflink switch devices. """ import asyncio from homeassistant.components.light import ATTR_BRIGHTNESS from homeassistant.components.rflink import EVENT_BUTTON_PRESSED from homeassistant.const import ( ...
# -*- coding: UTF-8 -*- # Copyright 2016-2018 Luc Saffre # License: BSD (see file COPYING for details) """ Remove all tags except some when saving the content of a :class:`RichHtmlField <lino.core.fields.RichHtmlField>`. When copying rich text from other applications into Lino, the text can contain styles and other th...
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # 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...
# Copyright 2019 Objectif Libre # # 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 agr...
import cgi import urllib import time import random import urlparse import hmac import base64 VERSION = '1.0' # Hi Blaine! HTTP_METHOD = 'GET' SIGNATURE_METHOD = 'PLAINTEXT' # Generic exception class class OAuthError(RuntimeError): def __init__(self, message='OAuth error occured.'): RuntimeError.__init__(s...
""" Functions for Shapelet related operations """ import sys import numpy as np from scipy.misc import factorial from scipy import special #TODO: hermite 2d, round gaussian? #TODO: Fourier transform ######################################################### #def polar2cart(): # """Convert a set of polar coefficien...
#!/usr/bin/python -u import sys import os import subprocess import time import datetime import shutil import tempfile import hashlib import re debug = False ################ #### Telegraf Variables ################ # Packaging variables PACKAGE_NAME = "telegraf" INSTALL_ROOT_DIR = "/usr/bin" LOG_DIR = "/var/log/tel...
#!/usr/bin/python2.7 # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# -*- coding: utf-8 -*- """ Created on Sun Feb 12 00:35:12 2017 @author: abu """ import numpy as np np.random.seed(1989) import os import glob import datetime import pandas as pd import time import argparse #import warnings #warnings.filterwarnings("ignore") from sklearn.cross_validation import KFold from sklearn.m...
from django.db.models.query import QuerySet from django.db.models.lookups import Lookup from django.db.models.sql.where import SubqueryConstraint, WhereNode from django.utils.six import text_type from wagtail.wagtailsearch.index import class_is_indexed class FilterError(Exception): pass class FieldError(Excep...
# coding=utf-8 # # Copyright 2014 Red Hat, Inc. # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # ...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright 2013 Canonical Corp. # 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 # # htt...
# # 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 us...
# coding: utf-8 import inspect from . import registry from .exceptions import processing, DocumentStep from .fields import BaseField, DocumentField, DictField from .roles import DEFAULT_ROLE, Var, Scope, all_, construct_matcher, Resolvable, Resolution from .resolutionscope import ResolutionScope, EMPTY_SCOPE from ._co...
#! /usr/bin/env python # # example2.py -- Simple, configurable FITS viewer. # # Eric Jeschke ([email protected]) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from __future__ import print_function impor...
import sys import numpy as np import pdb class DependencyDecoder(): ''' Dependency decoder class ''' def __init__(self): self.verbose = False def parse_marginals_nonproj(self, scores): ''' Compute marginals and the log-partition function using the matrix-tree theorem ...
# Copyright 2013 OpenStack Foundation # # 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 ...
""" Generic utilities for testing txyoga. """ from functools import partial from StringIO import StringIO from twisted.internet import defer from twisted.web import http, http_headers, resource, server from txyoga.serializers import json BASE_URL = "http://localhost" correctAcceptHeaders = http_headers.Headers() co...
'''tzinfo timezone information for Asia/Magadan.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Magadan(DstTzInfo): '''Asia/Magadan timezone definition. See datetime.tzinfo for details''' zone = 'Asia/Magadan' _utc_...
## Automatically adapted for numpy.oldnumeric May 17, 2011 by -c # Natural Language Toolkit: Classifiers # # Copyright (C) 2001 University of Pennsylvania # Author: Edward Loper <[email protected]> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT # # $Id: __init__.py,v 1.2 2003/10/27...
# tools for accessing tables from the NASA Exoplanet Archive, # either by downloading them downloading or loading local tables # to-do: # [] implement filtering by the "where" keyword to the archive from ..imports import * class Downloader(Talker): expiration = 1.0 # anything special to know about reading ...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Fabrice Laporte, Yevgeny Bezman, and Adrian Sampson. # # 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 restrict...
"""The tests for the logbook component.""" # pylint: disable=protected-access,too-many-public-methods from datetime import timedelta import unittest from unittest.mock import patch from homeassistant.components import sun import homeassistant.core as ha from homeassistant.const import ( EVENT_STATE_CHANGED, EVENT_...
# Copyright The PyTorch Lightning team. # # 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 i...
# -*- coding: utf-8 -*- from PyQt4 import QtCore, QtGui from acq4.util.DataManager import * from acq4.util.debug import * import os class DirTreeWidget(QtGui.QTreeWidget): sigSelectionChanged = QtCore.Signal(object) ### something funny is happening with sigSelectionChanged and currentItemChanged; the signal...
"""Addins are the primary way of extending FeedPlatform the add additional aggregator functionality. You'll find a number of them in the builtin ``feedplatform.lib`` module, although custom addins can easily be created, and generally, when extended or specialized customization is required, creating an addin will be a ...
# 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...
""" Some JSON encoding and decoding utilities. """ from __future__ import absolute_import, division, print_function import json from datetime import date,datetime,time import base64 import zlib import logging logger = logging.getLogger('jsonUtil') class json_compressor: """Used for files and other large things ...
import ConfigParser from email import parser from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText from email.Utils import formatdate from getpass import getpass import logging import mimetypes import os import poplib import smtplib import sys import time log = logging.getLogger("mail") ...
#!/usr/bin/python # Copyright (c) 2010-2012 OpenStack, LLC. # # 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 applicabl...
import pdb import struct import sys import gzip from io import BufferedReader from collections import Counter, defaultdict import collections.abc from .gr import Gr, Entry MAX_LEN = 2**29-1 # As defined by max size supported by bai indexes. def bisect_left(a, x): lo = 0 hi = len(a) while lo < hi: ...
# 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 use ...
# Copyright 2013 by David Arenillas and Anthony Mathelier. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Provides read access to a JASPAR5 formatted database. This modules re...
from __future__ import division, absolute_import, print_function, unicode_literals import asyncore import socket import struct import threading import sys from collections import deque DEBUG = False PY3 = False if sys.version_info[0] == 3: import queue as Queue PY3 = True else: import Queue range = xran...
# transform() function is where you should start reading to understand this code. # transform() has to be called at the bottom of this file for things to work. from sys import * import re from importlib import import_module import importlib.util # functions: def transform(): file_name = argv[1] # so you can us...
from __future__ import absolute_import import logging import six from django.core.context_processors import csrf from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseNotFound, HttpResponseRedirect from django.middleware.csrf import CsrfViewMiddleware f...
# Copyright (c) 2010 Aldo Cortesi # Copyright (c) 2011 Florian Mounier # Copyright (c) 2011 oitel # Copyright (c) 2011 Kenji_Takahashi # Copyright (c) 2011 Paul Colomiets # Copyright (c) 2012, 2014 roger # Copyright (c) 2012 nullzion # Copyright (c) 2013 Tao Sauvage # Copyright (c) 2014-2015 Sean Vig # Copyright (c) 20...
from __future__ import division import csv import itertools import json import random import tempfile from django.conf import settings from dateutil.relativedelta import relativedelta from dateutil.parser import parse as parse_date from frontend import bq_schemas as schemas from gcutils.bigquery import Client cla...
import io from random import randint, choice from unittest import TestCase import api.scans.controllers as api_scans from api.common.errors import HTTPInvalidParam from mock import MagicMock, patch from api.scans.models import Scan, ScanEvents from api.scans.schemas import ScanSchema from api.files_ext.schemas import...
__author__ = 'sushil, abdullahS' import sys from pprint import pprint, pformat # NOQA from optparse import OptionParser import logging from sets import Set from hydra.lib import util from hydra.lib.h_analyser import HAnalyser from hydra.lib.hydrabase import HydraBase try: # Python 2.x from ConfigParser import...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
from datetime import date, datetime from inspect import isclass import six import sqlalchemy as sa __version__ = '0.4.4' class Column(sa.Column): def __init__(self, *args, **kwargs): kwargs.setdefault('info', {}) kwargs['info'].setdefault('choices', kwargs.pop('choices', None)) kwargs['...
from itertools import izip import numpy as np import geo2d.geometry as g # import matplotlib.pyplot as plt import math import random import time from walker import OdoListener class RobotPose(): point = g.Point(0, 0) direction = 0.0 distance = 100 weight = 0.0 def __init__(self, x, y, direct): ...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.23 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
#!/usr/bin/env python """peep ("prudently examine every package") verifies that packages conform to a trusted, locally stored hash and only then installs them:: peep install -r requirements.txt This makes your deployments verifiably repeatable without having to maintain a local PyPI mirror or use a vendor lib. Ju...
__author__ = 'jonathan' import logging import test.nova._fixtures as models from lib.rome.core.orm.query import Query from lib.rome.core.session.session import Session as Session def test_relationships_single_str(save_instance=True, save_info_cache=True, use_update=False, use_session=False): print("Ensure that ...
import sympy import tempfile import os from sympy import symbols, Eq from sympy.external import import_module from sympy.tensor import IndexedBase, Idx from sympy.utilities.autowrap import autowrap, ufuncify, CodeWrapError from sympy.utilities.pytest import skip numpy = import_module('numpy', min_module_version='1.6.1...
"""`Nanduri2012Model`, `Nanduri2012Spatial`, `Nanduri2012Temporal` [Nanduri2012]_""" import numpy as np from .base import Model, SpatialModel, TemporalModel from ._nanduri2012 import spatial_fast, temporal_fast from ..implants import ElectrodeArray, DiskElectrode from ..stimuli import Stimulus class Nanduri2012Spa...
# Standard library imports import string, pkgutil from xceptions import * # Third party imports #### netcdf --- currently support cdms2, python-netCDF4 and Scientific l = pkgutil.iter_modules() ll = map( lambda x: x[1], l ) supportedNetcdf = ['cdms2','netCDF4','Scientific','ncq3'] installedSupportedNetcdf = [] #...