gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# -*- coding: utf-8 -*-
"""
continuity.services.github
~~~~~~~~~~~~~~~~~~~~~~~~~~
GitHub API.
:copyright: 2015 by Jonathan Zempel.
:license: BSD, see LICENSE for more details.
"""
from __future__ import division
from .commons import DataObject, IDObject, RemoteService, ServiceException
from .util... | |
###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org
#
import unittest
from ...compatibility import StringIO
from ...worksheet import Worksheet
class TestWriteAutoFilter(unittest.TestCase):
"""
... | |
import itertools
import logging
from typing import Iterator, Any, List, Dict, Union, Optional
from PyQt5 import QtCore, QtGui
from .motor import Motor, MotorRole, MotorDirection
from ..auth import Privilege, needsprivilege
from ..component import Component
from ....devices.motor.generic.frontend import MotorControlle... | |
"""Functions that alter the matplotlib rc dictionary on the fly."""
import numpy as np
import matplotlib as mpl
from . import palettes
_style_keys = (
"axes.facecolor",
"axes.edgecolor",
"axes.grid",
"axes.axisbelow",
"axes.linewidth",
"axes.labelcolor",
"figure.facecolor",
"grid.c... | |
# See LICENSE for licensing information
"""
This module has low-level functionality for parsing bridges and arranging
them in rings.
"""
import binascii
import bisect
import hmac
import logging
import re
import sha
import socket
import time
import ipaddr
import random
import bridgedb.Storage
import bridgedb.Bucket
... | |
# Copyright (c) 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | |
'''Parser for CODA IDL files.'''
import ply.lex as lex
import ply.yacc as yacc
from coda.compiler import ast, errors
__all__ = [ 'Lexer', 'Parser' ]
# ============================================================================
# Lexer
# ============================================================================
c... | |
#! /usr/bin/env python
# Copyright (C) 2011-2019 Free Software Foundation, Inc.
#
# This file is part of GDB.
#
# 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, ... | |
##########################################################################
#
# Copyright (c) 2014, Esteban Tovagliari. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistribution... | |
# -*- coding: utf-8 -*-
import txtarantool as tnt
from twisted.internet import base
from twisted.internet import defer
from twisted.trial import unittest
from random import randint, choice
import config
base.DelayedCall.debug = False
tnt_host = config.host
tnt_port = config.port
space_no0 = config.space_no0
space_... | |
import itertools
from datetime import datetime
from logging import Logger
import mock
import pytest
from freezegun import freeze_time
from flask import json
from sqlalchemy.exc import DataError, IntegrityError
from app import db, encryption
from app.models import User, Supplier, BuyerEmailDomain, AuditEvent
from test... | |
#!/usr/bin/env python
# Copyright (C) 2014 The Android Open Source Project
#
# 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 requ... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import functools
import itertools
import operator
from decimal import Decimal
from datetime import timedelta
import pytest
import numpy as np
from astropy.time import (
Time, TimeDelta, OperandTypeError, ScaleValueError, TIME_SCALES,
STANDARD_TIM... | |
"""Objects representing users, their passwords, roles and groups
The objects defined in this file used in conjunction with authentication,
authorization and permission objects form a complete user management system.
However, there is no requirement to use this user management API at all. If you
define your own authen... | |
import logging
import ray
from ray.rllib.policy.torch_policy_template import build_torch_policy
from ray.rllib.agents.a3c.a3c_torch_policy import apply_grad_clipping
from ray.rllib.utils.framework import try_import_torch
from ray.rllib.models.catalog import ModelCatalog
from ray.rllib.agents.dreamer.utils import Freez... | |
import numpy as np
from landlab.components.erosion_deposition.generalized_erosion_deposition import (
DEFAULT_MINIMUM_TIME_STEP,
_GeneralizedErosionDeposition,
)
from landlab.utils.return_array import return_array_at_node
from .cfuncs import calculate_qs_in
ROOT2 = np.sqrt(2.0) # syntactic sugar for precalc... | |
#
# 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
# ... | |
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import logging
impor... | |
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
# Database Module
# --------------------
from __future__ import unicode_literals
import MySQLdb
from markdown2 import UnicodeWithAttrs
import warnings
import datetime
import frappe
import re
import frappe.model.meta... | |
# -*- coding:utf-8 -*-
# --
# Copyright (c) 2012-2014 Net-ng.
# All rights reserved.
#
# This software is licensed under the BSD License, as described in
# the file LICENSE.txt, which you should have received as part of
# this distribution.
# --
import dateutil.parser
from nagare import component, log, security
from ... | |
######################################################################
#
# Copyright (C) 2013
# Associated Universities, Inc. Washington DC, USA,
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Library General Public License as published by
# the Free Software Fo... | |
#!/usr/bin/python
# Copyright (C) 2013 Google Inc. 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
# notice, this list of c... | |
'''
Copyright (c) 2011-2017, Agora Games, LLC All rights reserved.
https://github.com/agoragames/chai/blob/master/LICENSE.txt
'''
import inspect
import types
import sys
import gc
from .expectation import Expectation
from .spy import Spy
from .exception import *
from ._termcolor import colored
# For clarity here and ... | |
########################################################################
# MCU Gear(R) system Sample Code
# Auther:y.kou.
# web site: http://www.milletool.com/
# Date : 8/OCT/2016
#
########################################################################
#Revision Information
#
#########################################... | |
# -*- coding: utf-8 -*-
'''
Take data from salt and "return" it into a carbon receiver
Add the following configuration to the minion configuration file:
.. code-block:: yaml
carbon.host: <server ip address>
carbon.port: 2003
Errors when trying to convert data to numbers may be ignored by setting
``carbon.sk... | |
"""
@author Thomas Lehmann
@file Learn2Calc.py
@brief Tools to train yourself in calculation
Training on regularly base is something that really helps
you to improve your calculations. Two main criteria are of
importance: speed and accuracy.
The basic statistic at the beginning an... | |
# 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 ... | |
#
# 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... | |
import sys
import os
from StringIO import StringIO
import textwrap
from distutils.core import Extension, Distribution
from distutils.command.build_ext import build_ext
from distutils import sysconfig
from distutils.tests import support
from distutils.errors import (DistutilsSetupError, CompileError,
... | |
"""scs.presence"""
from __future__ import absolute_import, with_statement
import warnings
from collections import defaultdict
from contextlib import contextmanager
from functools import wraps
from random import shuffle
from time import time, sleep
from kombu import Exchange, Queue
from kombu.common import ipublish
... | |
#!/usr/bin/env python
# Copyright 2014, Rackspace US, 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... | |
# 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... | |
# 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.
import re
from flask import flash, redirect, request, session
from werkzeug.exceptions import BadRequest,... | |
from bs4 import BeautifulSoup
from bs4.element import Tag
from .formatters import pretty_html, pretty_spec
class MatcherResult(object):
""" Pass/fail result for an attempted match, along with debugging information. """
def __init__(self, spec, html_src, root_element, passed=True, element_defs_not_found=None... | |
import os
import PIL
import numpy as np
import scipy.sparse
import subprocess
import cPickle
import math
from .imdb import imdb
from .imdb import ROOT_DIR
from ..utils.cython_bbox import bbox_overlaps
from ..utils.boxes_grid import get_boxes_grid
# TODO: make fast_rcnn irrelevant
# >>>> obsolete, because it depends ... | |
# mako/lookup.py
# Copyright 2006-2021 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import os
import posixpath
import re
import stat
import threading
from mako import exceptions
from mak... | |
"""
This module handles the selection of borehole data from the DOV webservice.
Its development was made possible by the financing of Vlaio (Flanders,
Belgium) and AGT n.v (www.agt.be).
"""
__author__ = ['Pieter Jan Haest']
__copyright__ = 'Copyright 2017, DOV-Vlaanderen'
__credits__ = ["Stijn Van Hoey", "Johan Van de... | |
# Copyright 2020 The TensorFlow Probability 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 applicable law o... | |
# -*- coding: utf-8 -*-
"""
Dew point routines.
"""
import numpy as np
import scipy.optimize as opt
import warnings
from clausius.utils import (MAX_ITER, ERROR_TOL, psatguess, tsatguess,
bounds_search, SearchError, Prcrit, Trcrit)
__all__ = ['dewpoint']
def dewpoint(model, mixture, temp... | |
# Copyright (C) 2016 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Factories for ggrc models.
These are factories for generating regular ggrc models. The factories create a
model and log a post event with the model revision. These do not however
trigger signals. For tes... | |
#!/usr/bin/env python
"""
conference.py -- Udacity conference server-side Python App Engine API;
uses Google Cloud Endpoints
$Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $
created by wesc on 2014 apr 21
"""
__author__ = 'wesc+api@google.com (Wesley Chun)'
from datetime import datetime
import ... | |
import logging
_logger = logging.getLogger(__name__)
from sys import stdout
import os.path
import pytest
PLOTS_DIR = os.path.join(os.path.dirname(__file__), 'plots')
SCREENSHOTS_DIR = os.path.join(os.path.dirname(__file__), 'screenshots')
logging.getLogger('matplotlib').setLevel(logging.WARNING)
def pytest_addoptio... | |
# 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.
# libcloud.org licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not... | |
from json.decoder import JSONDecodeError
import demistomock as demisto
from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import
import requests
import traceback
from typing import Dict
# Disable insecure warnings
requests.packages.urllib3.disable_warnings() # pylint: disable=no-member
'''... | |
import github3
from github3.issues.comment import IssueComment
from github3.issues.event import IssueEvent
from github3.issues.label import Label
from github3.issues.milestone import Milestone
from github3.issues import Issue
import datetime
from tests.utils import BaseCase, load, mock
class TestLabel(BaseCase):
... | |
"""
eve_mongoengine.datalayer
~~~~~~~~~~~~~~~~~~~~~~~~~
This module implements eve's data layer which uses mongoengine models
instead of direct pymongo access.
:copyright: (c) 2014 by Stanislav Heller.
:license: BSD, see LICENSE for more details.
"""
# builtin
import sys
import ast
import js... | |
# Copyright (c) 2010-2012 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 agree... | |
# Copyright 2017 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... | |
import gzip
import ujson
from string import punctuation, digits
import os
punctuation = set(punctuation) - set("'-")
max_w = 20.0
directory = os.path.abspath(os.path.join(os.path.dirname(__file__)))
#Counts from proceesing all of wikipedia
_idf = None
def idf():
global _idf
if not _idf:
name = di... | |
#!/usr/bin/python
#
# An ansible module for manipulating ssh keys using
# [Packet's API](https://www.packet.net/resources/docs/)
#
# Copyright (c) 2016 Niels Grewe
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | |
# Copyright 2016 Hewlett Packard Enterprise Development, LP
#
# 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/LICENS... | |
# Copyright 2016 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... | |
"""
Provides an asynchronous, crypto and compression aware socket for connecting to
servers and processing incoming packet data.
Coordinates with the Timers plugin to honor wall-clock timers
"""
import logging
import socket
import time
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.... | |
#
# Copyright 2012-2013 SAS Institute
#
# 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 t... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Stardust Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test replace by fee code
#
from test_framework.test_framework import StardustTestFramework
from tes... | |
# coding=utf-8
import logging
logger = logging.getLogger("dialogs")
from dialogs.helpers.helpers import colored_print
from dialogs.helpers.printers import level_marker
from dialogs.interpretation.resolution import Resolver
from dialogs.interpretation.statements_builder import *
from dialogs.sentence import *
from di... | |
""" Python Character Mapping Codec cp1251 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,in... | |
"""Tests for the Hyperion config flow."""
from __future__ import annotations
import asyncio
from typing import Any
from unittest.mock import AsyncMock, Mock, patch
from hyperion import const
from homeassistant import data_entry_flow
from homeassistant.components.hyperion.const import (
CONF_AUTH_ID,
CONF_CRE... | |
"""
Tools for downloading and stitching DEM rasters from OpenTopography holdings
"""
import os, sys, shutil
import numpy as np
import requests
import urllib
from urllib2 import Request
from bs4 import BeautifulSoup
from osgeo import gdal, ogr, osr
from copy import copy
sys.path.append('/usr/bin')
import gdal_merg... | |
# 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
# distribu... | |
# -*- coding: utf-8 -*-
# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
# (mostly translation, see implementation details)
# Licence: BSD 3 clause
from __future__ import print_function
import numpy as np
from scipy import linalg, optimize
from ..base import BaseEstimator, RegressorMixin
from ..metrics... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2013-2015 clowwindy
#
# 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 requi... | |
"""
This is your project's main settings file that can be committed to your
repo. If you need to override a setting locally, use local.py
"""
import os
import logging
# Normally you should not import ANYTHING from Django directly
# into your settings, but ImproperlyConfigured is an exception.
from django.core.excepti... | |
#! /usr/bin/env python
# @author wtie@cisco.com
import logging
import os
import time
import itertools
import ansible.runner
from logging.handlers import SysLogHandler
from neutronclient.common.exceptions import NeutronClientException
from neutronclient.v2_0 import client
LOG = logging.getLogger('neutron-l3-evacuate')... | |
from test.lib.testing import eq_, assert_raises, assert_raises_message, config
import re
from test.lib.util import picklers
from sqlalchemy.interfaces import ConnectionProxy
from sqlalchemy import MetaData, Integer, String, INT, VARCHAR, func, \
bindparam, select, event, TypeDecorator, create_engine, Sequence
from ... | |
# coding=utf-8
# Copyright 2022 The Google Research 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... | |
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# This file is in the public domain
### END LICENSE
### DO NOT EDIT THIS FILE ###
'''Enhances builder connections, provides object to access glade objects'''
from gi.repository import GObject, Gtk # pylint: disable=E0611
im... | |
# -*- coding: utf-8 -*-
from collections import namedtuple
from spf import SanicPlugin
from spf.plugin import FutureRoute, FutureWebsocket, FutureMiddleware
ContextualizeAssociatedTuple = namedtuple('ContextualizeAssociatedTuple',
['plugin', 'reg'])
class ContextualizeAssoci... | |
import webapp2
import webtest
import unittest2
import copy
import urllib
import logging
from google.appengine.ext import testbed
from google.appengine.ext import db
from webapp2_extras import json
from webapp2_extras.appengine.auth import models as users
import app
import settings
import handlers
from core import mod... | |
#!/usr/bin/python
from __future__ import division, print_function, absolute_import
from os import getuid, getgid
from os.path import sep
from threading import Lock
import errno
import logging
import stat
import time
import llfuse
logging.basicConfig(level=logging.DEBUG)
class InodeLibrary(object):
inode_index... | |
#!/usr/bin/python
import unittest
import os
import random
import numpy as np
from pymatgen.core.structure import Structure
from pymatgen.core.lattice import Lattice
from pymatgen.core.surface import Slab, SlabGenerator, generate_all_slabs, \
get_symmetrically_distinct_miller_indices
from pymatgen.symmetry.group... | |
import json
from _testcapi import raise_exception
from itertools import chain
import requests
from django.contrib.auth.models import User
from django.core import exceptions as django_exceptions
from django.http import QueryDict
from django.shortcuts import get_object_or_404
from requests.auth import HTTPBasicAuth
from ... | |
# Copyright 2011-2015 Zuse Institute Berlin
#
# 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... | |
#!/usr/bin/python2
# 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 os
import subprocess
import sys
python2 = sys.executable
BOT_ASSIGNMENT = {
#######################################... | |
"""Download interface for ISU-SM data."""
import datetime
from io import StringIO, BytesIO
import pandas as pd
import psycopg2.extras
from paste.request import parse_formvars
from pyiem.util import get_dbconn, c2f, mm2inch
EXL = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
MISSING = {"", "M", "... | |
import pytest
from collections import namedtuple
import numpy as np
from numpy.testing import assert_array_equal, assert_equal
from sklearn.model_selection import train_test_split
from sklearn.exceptions import DataConversionWarning
from sklearn.utils import check_random_state, shuffle
from sklearn.utils.testing import... | |
"""This module implements a loader and dumper for the svmlight format
This format is a text-based format, with one sample per line. It does
not store zero valued features hence is suitable for sparse dataset.
The first element of each line can be used to store a target variable to
predict.
This format is used as the... | |
# Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# 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... | |
import sys
import os
import yaml
# ===========================
# = Directory Declaractions =
# ===========================
SETTINGS_DIR = os.path.dirname(__file__)
NEWSBLUR_DIR = os.path.join(SETTINGS_DIR, "../")
MEDIA_ROOT = os.path.join(NEWSBLUR_DIR, 'media')
STATIC_ROOT = os.path.join(NEWSBLUR_DIR, 'static... | |
#!/usr/bin/python
import sys,os
import re
import pprint
import time
import base64
import datetime
import time
import simplejson
import jsonpickle
from functools import wraps
from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash, make_response, jsonify, Markup, Response, ... | |
"""
Tuple-related functions.
The functions handle tuples up to the length of five, as this is approximately
the point at which referring to elements by number ceases to be readable.
(There are only few quintuples in the Python standard library, for example,
with ``sys.version_info`` being perhaps the most well known ... | |
# Copyright (c) 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | |
# Authors: Olivier Grisel <olivier.grisel@ensta.org>
# Mathieu Blondel <mathieu@mblondel.org>
# Denis Engemann <d.engemann@fz-juelich.de>
#
# License: BSD 3 clause
import numpy as np
from scipy import sparse
from scipy import linalg
from scipy import stats
from sklearn.utils.testing import assert_eq... | |
import csv, itertools, copy, time, re, math, shutil
from collections import Counter
"""
Constraints:
1) 2 Pitchers, 1 Catcher, 1 FirstBaseman, 1 Secondbaseman, 1 Thirdbaseman, 1 Shortstop, 3 Outfielders
2) Total lineup salary cannot exceed $200
3) Can not have more than 6 players from the same MLB team in lineup
4) Mu... | |
# coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import logging
impor... | |
from autosar.element import Element
import autosar.constant
from autosar.base import hasAdminData,parseAdminDataNode
from autosar.parser.parser_base import ElementParser
class ConstantParser(ElementParser):
"""
Constant package parser
"""
def __init__(self,version=3.0):
super().__init__(version... | |
#! /usr/bin/env python
#
# example2_gtk.py -- Simple, configurable FITS viewer.
#
# Eric Jeschke (eric@naoj.org)
#
# 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
im... | |
#!/usr/bin/env python
# Copyright 2015 The Kubernetes 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 appli... | |
"""
Classes of equations composed of terms.
"""
import time
from copy import copy
import numpy as nm
import scipy.sparse as sp
from sfepy.base.base import output, assert_, get_default, iter_dict_of_lists
from sfepy.base.base import OneTypeList, Container, Struct
from sfepy.discrete import Materials, Variables, create... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'priska'
"""
Prepare sensim data for clustering.
Depending on the clustering algorithm you want to use, choose one of the matrix
format options and MatrixMarket header if needed. Possible options so far are
--matrix=cw for Chinese Whispers [1],
--matrix=s... | |
# Copyright (c) 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | |
#
# 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... | |
"""
@package mi.dataset.parser.test
@file marine-integrations/mi/dataset/parser/test/test_dosta_abcdjm_cspp.py
@author Mark Worden
@brief Test code for a dosta_abcdjm_cspp data parser
"""
import os
from nose.plugins.attrib import attr
from mi.core.log import get_logger
from mi.core.exceptions import RecoverableSamp... | |
import uuid
from contextlib import contextmanager
from unittest.mock import patch
from django.test import SimpleTestCase, TestCase
from django.utils.dateparse import parse_datetime
from celery import states
from celery.exceptions import Ignore
from casexml.apps.case.mock import CaseFactory, CaseStructure
from casexm... | |
"""Test to verify that Home Assistant core works."""
# pylint: disable=protected-access,too-many-public-methods
# pylint: disable=too-few-public-methods
import os
import signal
import unittest
import time
import threading
from datetime import datetime, timedelta
try:
from unittest import mock
except ImportError:
... | |
"""
.. _ensemble-tutorial:
Advanced features tutorial
==========================
The following tutorials highlight advanced functionality and provide in-depth
material on ensemble APIs.
=============================== ==============================================
Tutorial Content
==========... | |
"""
Class for mass-univariate classification
"""
from numpy import in1d, zeros, array, size, float64, asarray
from thunder.rdds.series import Series
class MassUnivariateClassifier(object):
"""
Base class for performing classification.
Assumes a Series with array data such that each entry belongs to one... | |
from decimal import Decimal
from django.contrib.auth import get_user_model
from django.db import transaction
from openslides.core.config import config
from openslides.poll.views import BaseOptionViewSet, BasePollViewSet, BaseVoteViewSet
from openslides.utils.auth import has_perm
from openslides.utils.autoupdate impor... | |
"""A text based UI, implemented with cmd2: https://bitbucket.org/catherinedevlin/cmd2
BeamAnalyzer v0.4.0
Copyright 2014 Evan Murawski
License: MIT
"""
__author__ = 'Evan Murawski'
from backend.beam import Beam
from backend.interactions import InteractionLocationError, Interaction, Force, Moment, Dist_Force
import cm... | |
# Copyright:: 2015, InferLink, Corp. <developers@inferlink.com>
#
# 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 appli... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.