gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Bitcoin test...
"""Support for LCN devices.""" from __future__ import annotations from collections.abc import Callable import logging import pypck from homeassistant import config_entries from homeassistant.const import ( CONF_ADDRESS, CONF_DOMAIN, CONF_IP_ADDRESS, CONF_NAME, CONF_PASSWORD, CONF_PORT, CO...
# -*- coding: utf-8 -*- # # pymunk documentation build configuration file, created by # sphinx-quickstart on Sun Jun 03 03:50:06 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import datetime from oauthlib import common from oauthlib.oauth2 import Client, InsecureTransportError from oauthlib.oauth2.rfc6749 import utils from oauthlib.oauth2.rfc6749.clients import AUTH_HEADER, BODY, URI_QUERY from ....unittest ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cloudbase Solutions Srl # 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.ap...
from settings import * def loadXMLAttributes(d, attributes): for attr in attributes.keys(): sattr = str(attr) val = attributes[attr].value try: sval = str(val) if sval.isdigit(): d[sattr] = int(sval) else: d[sattr] = sval ...
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2018, Ilya Etingof <etingof@gmail.com> # License: http://snmplabs.com/pyasn1/license.html # import sys from pyasn1 import error from pyasn1.compat import calling from pyasn1.type import constraint from pyasn1.type import tag from pyasn1.type import tagma...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This script fetches and prepares an SDK chroot. """ import os import sys import urlparse from chromite.buildbot import cons...
import logging import config as config import cPickle as json from urllib import * from profiling import profile from PySide.QtCore import * from PySide.QtGui import * import PySide.QtGui as QtGui import PySide.QtCore as QtCore import os class Mock(object): def __init__(self, dictCopy=None, **kwargs): s...
"""Support for AVM FRITZ!SmartHome thermostate devices.""" from __future__ import annotations from typing import Any from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( ATTR_HVAC_MODE, HVAC_MODE_HEAT, HVAC_MODE_OFF, PRESET_COMFORT, PRESET...
# Copyright (c) 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 or agreed to ...
from __future__ import unicode_literals import sys import time import heapq import ctypes import platform import traceback import threading from warnings import warn from threading import Thread, Timer, Event, Lock import six from six.moves.queue import Queue, Empty from sideboard.lib import log, config, on_startup, ...
from itertools import repeat from .helper import _do_test, MockXPI from validator.errorbundler import ErrorBundle from validator.testcases import packagelayout def test_blacklisted_files(): """Tests that the validator will throw warnings on extensions containing files that have extensions which are not cons...
""" Return/control aspects of the grains data """ import copy import math from collections.abc import Mapping import salt.utils.data import salt.utils.dictupdate import salt.utils.json from salt.defaults import DEFAULT_TARGET_DELIM from salt.exceptions import SaltException # Seed the grains dict so cython will buil...
"""The tests for the MQTT switch platform.""" import json from unittest.mock import ANY from asynctest import patch import pytest from homeassistant.components import mqtt, switch from homeassistant.components.mqtt.discovery import async_start from homeassistant.const import ( ATTR_ASSUMED_STATE, STATE_OFF, ...
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
# Copyright (c) 2015 The Johns Hopkins University/Applied Physics Laboratory # 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/LICEN...
# 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 agreed to in writing, ...
# coding: utf-8 from __future__ import unicode_literals from collections import OrderedDict from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.db.models import Manager from django.db.models.query import QuerySet from django.utils import six from django.utils.encoding import python...
from ..core import asyncio, Unit, inport, outport, coroutine from ..ext import param, Paramed from .read.ressource import LocateByTime from pathlib import Path from tempfile import NamedTemporaryFile import re from contextlib import contextmanager from pyadds.logging import log, logging from pyadds.annotate import ...
# coding=utf-8 # Copyright 2022 The Uncertainty Baselines Authors. # # 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 ap...
# coding=utf-8 # Copyright 2022 The ML Fairness Gym Authors. # # 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 applicab...
#!/usr/bin/env python3 import argparse import sys import os import glob import simu import error import json from pprint import pprint ROOT_DIR = './' TEST_DIR = ROOT_DIR + 'tests' TMP_DIR = ROOT_DIR + '.tmp' DIRS = ( 'expr', 'typing', 'if', 'loop', 'return', 'list', 'tuple', 'scope'...
# Author: Jim Klo jim.klo[at]sri[dot]com # # LICENSE # Copyright 2013 SRI International # 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 # Un...
# -*- encoding: utf-8 *-* '''These are tests for client.py and server.py''' import pytest from server import response_ok, response_deconstructor,\ request_deconstructor, parse_req, response_decision, resolve_uri,\ generate_response from client import client REQUEST_GOOD = [ b'GET / HTTP/1.1\r\n' b'Host: 12...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
# -*- coding: utf-8 -*- """ Objects used with ProofreadPage Extension. The extension is supported by MW 1.21+. This module includes objects: * ProofreadPage(Page) * FullHeader * IndexPage(Page) OCR support of page scans via: - https://tools.wmflabs.org/phetools/hocr_cgi.py - https://tools.wmflabs.org/phetools/ocr....
# This is your project's main settings file that can be committed to your # repo. If you need to override a setting locally, use settings_local.py from funfactory.settings_base import * # Name of the top-level module where you put all your apps. # If you did not install Playdoh with the funfactory installer script # ...
# -*- coding: utf-8 -*- # # form.py # The collection of forms, the class holds fields or forms themselves. # # Copyright 2010 Atsushi Shibata # """ The collection of fields definitions for aha $Id: form.py 655 2010-08-23 02:02:23Z ats $ """ __author__ = 'Atsushi Shibata <shibata@webcore.co.jp>' __docformat__ = 'p...
""" mfoc module. Contains the ModflowOc class. Note that the user can access the ModflowOc class as `flopy.modflow.ModflowOc`. Additional information for this MODFLOW package can be found at the `Online MODFLOW Guide <http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/index.html?oc.htm>`_. """ import os import sys...
# -*- coding: utf-8 -*- ''' Production Configurations - Use djangosecure - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis on Heroku - Use opbeat for error reporting ''' from __future__ import absolute_import, unicode_literals from boto.s3.connection import Ordi...
# # Copyright (c) 2001-2014, Scott D. Peckham # # Sep 2014. Cleanup and testing. # Own versions of input file routines, at end. # Aug 2014. Customized initialize_computed_vars(). # Updates to standard names and BMI. # Nov 2013. Converted TopoFlow to Python package. # Jan 2013. Revised ...
# vim: set sw=4 expandtab : # # Copyright 2004 Apache Software 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 # #...
""" Test Iterator Length Transparency Some functions or methods which accept general iterable arguments have optional, more efficient code paths if they know how many items to expect. For instance, map(func, iterable), will pre-allocate the exact amount of space required whenever the iterable can report its length. T...
from __future__ import absolute_import, print_function import argparse import io import os import sys from configparser import SafeConfigParser try: # Skipping patched_main since we shouldn't need the two patches it applies. # At time of writing, these are multiprocessing.freeze_support() and # forcing cl...
import hashlib import os import re import time import uuid import subprocess from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.contrib.staticfiles.finders import find as find_static_path from olympia.lib.jingo_minify_helpers import ensure_path_exists def...
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
from math import fabs, ceil from shlex import quote from datetime import timedelta import os import re import shutil import subprocess import tempfile import click class FFmpeg(object): """Class used for video conversions to WebM. Uses the instance variables to generate ffmpeg arguments to run and matches the...
# 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 ...
from __future__ import annotations from collections.abc import Callable # noqa: PDF001 import re from typing import ( TYPE_CHECKING, Any, Union, cast, overload, ) import numpy as np from pandas._libs import ( lib, missing as libmissing, ) from pandas._typing import ( Dtype, NpDty...
import json import random from collections import defaultdict from flask import current_app, session, redirect, url_for, render_template, Blueprint, abort, request from sqlalchemy import func import database as db from database.model import Team, Members, RoundAssignment from planning.rounds import round_data, assign_d...
# -*- coding: utf-8 -*- """ S3 Synchronization: Peer Repository Adapter @copyright: 2011-15 (c) Sahana Software Foundation @license: MIT 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 th...
# 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...
# # # Copyright 2012-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (ht...
#!/usr/bin/env python __author__ = 'Adam R. Smith,Luke' import gevent import os import fcntl from gevent.event import Event from collections import Iterable from functools import wraps import time from pyon.util.threading import Queue, get_pythread, get_pytime spawn = gevent.spawn def spawnf(f): """ Decorator ...
# Copyright (c) 2011 OpenStack, 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 requir...
from cardboard import types from cardboard.ability import ( AbilityNotImplemented, spell, activated, triggered, static ) from cardboard.cards import card, common, keywords, match @card("Battlefield Scrounger") def battlefield_scrounger(card, abilities): def battlefield_scrounger(): return AbilityNotI...
from __future__ import division, unicode_literals from future.builtins import range, zip from datetime import timedelta from decimal import Decimal from operator import mul from functools import reduce from django.core.urlresolvers import reverse from django.test import TestCase from django.test.client import Reques...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models from django.contrib.contenttypes.models import ContentType from src.utils.utils import to_str from src.utils.dbserialize import to_pickle try: import cPickle as pickle except ImportError...
import numpy import chainer from chainer import backend from chainer.backends import cuda from chainer.functions.activation import lstm from chainer.functions.array import reshape from chainer.functions.array import stack from chainer.functions.connection import linear from chainer.functions.connection import n_step_r...
# 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 ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Red Hat, 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 # #...
from .common import EventBuilder, EventCommon, name_inner_event from .. import utils from ..tl import types, functions @name_inner_event class ChatAction(EventBuilder): """ Occurs on certain chat actions: * Whenever a new chat is created. * Whenever a chat's title or photo is changed or removed. ...
# 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 # d...
# Copyright 2013 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. """Contains common helpers for GN action()s.""" import atexit import collections import contextlib import filecmp import fnmatch import json import logging ...
# The MIT License (MIT) # # Copyright (c) 2016 Adafruit Industries # # 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, cop...
from __future__ import absolute_import from __future__ import division from __future__ import print_function # this interferes with ServiceRouter/SWIG # @lint-avoid-python-3-compatibility-imports #from __future__ import unicode_literals import multiprocessing import sys import threading import time from fb303.Context...
#!/usr/bin/env python # Copyright 2013 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. """Generates a syntax tree from a Mojo IDL file.""" import sys import os.path # Try to load the ply module, if not, then assume it i...
# BEGIN_COPYRIGHT # # Copyright 2009-2015 CRS4. # # 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 ...
"""Provide pre-made queries on top of the recorder component.""" from __future__ import annotations from collections.abc import Iterable from datetime import datetime as dt, timedelta from http import HTTPStatus import logging import time from typing import cast from aiohttp import web from sqlalchemy import not_, or...
#!/usr/bin/python """ atomicCI.py Program for calculating the one-particle reduced density matrix (1-RDM) of small atomic systems. It makes use of the PyQuante library by Rick Muller (which you should download separately). To execute it simply run the associated Bash script, or execute the pro...
from django.conf import settings from django.core.files.storage import default_storage from django.utils.translation import gettext from rest_framework import serializers import olympia.core.logger from olympia import amo from olympia.access import acl from olympia.access.models import Group from olympia.amo.templat...
from __future__ import print_function import types import warnings import sys import traceback import inspect import pickle from copy import deepcopy import numpy as np from scipy import sparse import struct from sklearn.externals.six.moves import zip from sklearn.externals.joblib import hash, Memory from sklearn.ut...
# Copyright 2015 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...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#!/usr/bin/env python # # Copyright 2006-2008 the V8 project authors. 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 # ...
# Copyright (c) 2009-2010 Aldo Cortesi # Copyright (c) 2010 Lee McCuller # Copyright (c) 2010 matt # Copyright (c) 2010, 2014 dequis # Copyright (c) 2010, 2012, 2014 roger # Copyright (c) 2011 Florian Mounier # Copyright (c) 2011 Kenji_Takahashi # Copyright (c) 2011 Paul Colomiets # Copyright (c) 2011 Tzbob # Copyright...
# # 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...
from django.utils.translation import ugettext_lazy as _ from summary.parsers.technologies_2015 import Technology2015Parser from summary.renderers.summary import GlobalValuesMixin, SummaryRenderer class Technology2015FullSummaryRenderer(GlobalValuesMixin, SummaryRenderer): """ Configuration for 'full' technol...
# =============================================================================== # Copyright 2014 Jake Ross # # 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...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from math import floor from django import template from django.contrib.messages import constants as message_constants from django.template import Context from django.utils.html import conditional_escape from django.utils.safestring import mark_...
""" .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ import json import pytest from subprocrunner import SubprocessRunner from tcconfig._const import Tc from tcconfig.traffic_control import delete_all_rules from .common import print_test_result, runner_helper @pytest.fixture def device_value(re...
#! /usr/bin/env python import random, pygame, math class Star: """ Star is a crippled particle class - it can draw itself, keep track of its speed, position and direction, color and size. """ def __init__(self, position_x, position_y, distance, angle, speed, size, color): sel...
# Do not import this file directly. Use # # from dials.array_family import flex # from __future__ import annotations import collections import copy import functools import itertools import logging import operator import os import pickle from typing import List, Tuple import numpy as np import pandas as pd from ann...
from pyramidapp.forms import * from pyramid.httpexceptions import HTTPNotFound, HTTPFound from pyramid.response import Response from pyramid.security import remember, forget, authenticated_userid from pyramid.view import view_config from pyramidapp.permissions import * from sqlalchemy.exc import DBAPIError from sqlalch...
# -*- coding: utf-8 -*- ''' Connection module for Amazon S3 :configuration: This module accepts explicit s3 credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessa...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
from __future__ import absolute_import from collections import defaultdict from itertools import chain import logging import os from pip._vendor import pkg_resources from pip._vendor import requests from pip.compat import expanduser from pip.download import (is_file_url, is_dir_url, is_vcs_url, url_to_path, ...
from webWrapper import RestWrapper, SynchronousRestWrapper import json import logging import datetime import pytz import copy from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_DOWN _logger = logging.getLogger() class OttoBroker(): STATUS_KEY = 'status' MESSAGE_KEY = 'message' STATUS_SUCCESS = 'succ...
# 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...
# -*- python -*- # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import optparse import os import re import socket import subprocess import sys def AssertEquals(x, y): if x != y: ...
""" Global configuration of the project. All configurable parameters are stored in the global variable CONFIG, the only variable which is exported from the module. Default values of all configuration parameters are specified in the `_CONFIG` dictionary. Those parameters can be overridden by three means: * config ...
# Copyright 2015 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 python # # Copyright 2013, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. """This module contains a base class and utility functions for sharding tests. """ import struct import logging from vtdb import keyrange_c...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012 Red Hat, Inc. # Copyright 2013 Nicira, Inc. # All Rights Reserved # # Licen...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'AuthProvider.flags' db.add_column( 'sentry_aut...
#! /usr/bin/python """GENETIC ALGORITHM TEST functions Logan Halstrom CREATED: 25 JUL 2016 MODIFIED: 25 JUL 2016 DESCRIPTION: Optimization functions to test functionality of genetic algorithm """ import numpy as np import pandas as pd import sys import os #IMPORT UTILITIES from globalVars import * #ADDITIONAL PAC...
""" <Program Name> Overlord Deployment and Monitoring Library <Author> Evan Meagher Alan Loh <Date Started> May 1, 2010 <Description> A class for deploying an arbitrary repy program on a number of vessels. Built on top of the Experiment Library, Overlord persistently manages a user-defined number of ve...
#---------------------------------------------------------------------- # Copyright (c) 2013-2016 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
import numpy as np # type: ignore import pandas as pd # type: ignore import matplotlib.pyplot as plt # type: ignore from matplotlib.axis import Axes # type: ignore from matplotlib.figure import Figure # type: ignore import matplotlib._color_data as mcd # type: ignore from typing import Optional, List, Union, Dict...
import decimal import uuid from collections import UserDict, UserList import pytest from rohrpost.message import TolerantJSONEncoder, send_error, send_message, send_success def test_send_error(consumer): send_error( consumer=consumer, message_id=1, handler="some_handler", error="error_message" ) ...
# -*- coding: utf-8 -*- # Copyright (c) 2012 Roberto Alsina y otros. # 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, ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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/li...
import math import random import re import datetime from collections import defaultdict, Counter from functools import partial from .naive_bayes import tokenize def word_count_old(documents): """word count not using MapReduce""" return Counter(word for document in documents ...
# 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 # # http://www.apache.org/licenses/LICENSE-2...
# -*- coding: utf-8 -*- from pandas import compat import pytest from distutils.version import LooseVersion from numpy import nan import numpy as np from pandas import (Series, date_range, NaT) from pandas.compat import product from pandas.util.testing import assert_series_equal import pandas.util.testing as tm from...
""" Extract reference documentation from the NumPy source tree. """ import inspect import textwrap import re import pydoc from StringIO import StringIO class Reader(object): """ A line-based string reader. """ def __init__(self, data): """ Parameters ---------- data : ...
################################################################################ # Copyright (C) 2013-2014 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ import numpy as np import matplotlib.pyplot as plt from bayespy....
""" Topographica Bitmap Class. Encapsulates the PIL Image class so that an input matrix can be displayed as a bitmap image without needing to know about PIL proper. There are three different base image Classes which inherit Bitmap: PaletteBitmap - 1 2D Matrix, 1 1D Color Map HSVBitmap - 3 2D Matrices, Color (H),...