gt
stringclasses
1 value
context
stringlengths
2.49k
119k
############################################################################## # Copyright 2016-2019 Rigetti Computing # # 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...
from __future__ import absolute_import, unicode_literals import io import os import sys from collections import defaultdict from functools import partial from importlib import import_module from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.extern.packaging.version import LegacyVersi...
""" Dispatcher's routing classes """ from zope.interface import implements from nodeset.core import interfaces, config from nodeset.common import log from nodeset.core.observer import Observer, ObserverCarousel class RREntrySet(list): """ Subclass of list for routing table entries. This class provides to add...
# -*- coding: utf-8 -*- # pylint: disable=invalid-name,missing-docstring,no-member,bad-continuation # # Copyright 2017 IBM RESEARCH. 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 ...
import re; #MD = markdown list_level = 0; block_tags_list = 0; # markdown_replacing_rules = # { # #Blocks: DONE # "h1": ["h1", r"^#[^#]+.*$",True], # "h2": ["h2", r"^##[^#]+.*$",True], # "h3": ["h3", r"^###[^#]+.*$",True], # "h4": ["h4", r"^####[^#]+.*$",True], # "h5": ["h4", r"^#####[^#]+.*$",True], # ...
from typing import Type, Mapping, Any, Iterable, TypeVar, Tuple, Callable, Generator import datetime from datapipelines import ( DataSource, DataSink, PipelineContext, validate_query, NotFoundError, ) from merakicommons.cache import Cache as CommonsCache from . import uniquekeys from ..core.static...
# -*- coding: utf-8 -*- from datetime import datetime import json, time, ntpath def loggedIn(func): def checkLogin(*args, **kwargs): if args[0].isLogin: return func(*args, **kwargs) else: args[0].callback.other('You want to call the function, you must login to LINE') ret...
import math from astropy.io import fits import numpy as np import math import matplotlib.pyplot as plt from matplotlib.patches import Ellipse from matplotlib.colors import LinearSegmentedColormap as LSC from scipy.ndimage.interpolation import shift c_kms = 2.99792458e5 # [km s^-1] def read_SMA(fname): hdu_list = ...
import gc import os import random import eventlet from eventlet import hubs, greenpool, event, pools from eventlet.support import greenlets as greenlet, six import tests def passthru(a): eventlet.sleep(0.01) return a def passthru2(a, b): eventlet.sleep(0.01) return a, b def raiser(exc): raise...
# 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 ...
# Copyright 2014 Cloudbase Solutions Srl # # 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 l...
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
#!/usr/bin/env python # import webapp2 import re from google.appengine.ext import ndb from google.appengine.ext import blobstore from google.appengine.api import users from google.appengine.ext.webapp import blobstore_handlers import logging import parsers import headers # This is the triple store api. # We have a n...
# -*- coding: utf-8 -*- """ sphinx.ext.viewcode ~~~~~~~~~~~~~~~~~~~ Add links to module code in Python object descriptions. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import traceback from six import iteritems, text_type from docu...
# Infinite push # # Copyright 2016 Facebook, Inc. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import import logging import os import time import warnings import mysql.connector from mercurial...
"""Test to verify that Home Assistant core works.""" # pylint: disable=protected-access import asyncio import functools import logging import os import unittest from unittest.mock import patch, MagicMock from datetime import datetime, timedelta from tempfile import TemporaryDirectory import voluptuous as vol import py...
#!python # coding=utf-8 import base64 import random import string import operator import itertools import simplejson as json import numpy as np import netCDF4 as nc4 from pyaxiom.urn import IoosUrn from pyaxiom import logger class DotDict(object): def __init__(self, *args, **kwargs): for k, v in kwargs....
import anyci.docker import ci_addons import os import py_compile import pytest import shutil import subprocess import sys try: from lxml import etree except ImportError: pass from . import captured_lines, format_args_for_display def test_home(): expected_home = os.path.abspath(os.path.dirname(__file__)...
# 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 # ...
from __future__ import unicode_literals import re from tempfile import NamedTemporaryFile from django.db import connection from django.contrib.gis import gdal from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.tests.utils import no_oracle, oracle, postgis, spatialite from django.core.management impo...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import uuid import traceback import time from threading import Lock import common import adm_server class Server(object): def __init__(self): self.admin = adm_server.task self.admin.server = self self.task = None self.task_lo...
# 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...
""" Utilities for the Neofelis Annotation Pipeline. """ """ Copyright 2010 Jarl Haggerty 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 r...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
# 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 ...
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. 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...
""" <Program> test_register.py <Started> 8/26/2009 <Author> Jason Chen jchen@cs.washington.edu <Purpose> Tests the registration function of the HTML frontend view. <Notes> We make use of the Django test client, which emulates a webclient and returns what django considers the final rendered result (in ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
# Copyright 2012 Tsutomu Uchino # # 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 ...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import matplotlib.pyplot as plt import numpy as np import os import datetime import matplotlib.dates as mdates import pan...
# -*- coding: UTF-8 -*- import os import pytest try: from unittest.mock import MagicMock, call except ImportError: from mock import MagicMock, call from implib2.imp_modules import Module, ModuleError class TestModule: def setup(self): self.serno = 31002 self.bus = MagicMock() s...
# coding: utf-8 # # Plot GeoTiffs # # # In this NoteBook the reader finds code to read a GeoTiff file, single- or multi-band, from HDFS. It reads the GeoTiff as a **ByteArray** and then stores the GeoTiff in memory using **MemFile** from **RasterIO** python package. The same package is then used to plot a GeoTiff's...
#!/usr/bin/python # # Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. # # 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/LICE...
""" scikit-learn copy of scipy/sparse/linalg/eigen/lobpcg/lobpcg.py v1.3.0 to be deleted after scipy 1.3.0 becomes a dependency in scikit-lean ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Locally Optimal Block Preconditioned Conjugate Gradient Method (LOBPCG). References ---------- .. [1] A...
# encoding: utf-8 from __future__ import absolute_import, print_function, unicode_literals import logging import os from datetime import timedelta from optparse import make_option from django import db from django.core.management.base import LabelCommand from django.db import reset_queries from haystack import conne...
import mock # noqa import pytest from django.db import transaction from awx.api.versioning import reverse from awx.main.models.rbac import Role, ROLE_SINGLETON_SYSTEM_ADMINISTRATOR def mock_feature_enabled(feature): return True #@mock.patch('awx.api.views.feature_enabled', new=mock_feature_enabled) @pytest.f...
# -*- coding: utf-8 -*- """ Newspaper uses a lot of python-goose's parsing code. View theirlicense: https://github.com/codelucas/newspaper/blob/master/GOOSE-LICENSE.txt Parser objects will only contain operations that manipulate or query an lxml or soup dom object generated from an article's html. """ import logging i...
from __future__ import unicode_literals import logging import re from django.contrib import auth from django.contrib.auth.models import User from django.core.exceptions import (ObjectDoesNotExist, PermissionDenied) from django.db.models import Q from django.utils import six from dj...
# Copyright 2011 Capirca Project 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 a whole load of stuff from System.IO import * from System.Drawing import * from System.Runtime.Remoting import * from System.Threading import * from System.Windows.Forms import * from System.Xml.Serialization import * from System import * from Analysis.EDM import * from DAQ.Environment import * from EDMConfig...
__doc__ = "Purpose: Various Zip Functions, like Zipping A Shapefile" __author__ = "Ian.Grasshoff@co.waupaca.wi.us, Waupaca County Land Information" import os import sys import zipfile class ShapefileZipper: def __init__(self): # conditional import of arcpy so it's not required to use this tool...but if av...
"""Utility meter from sensors providing raw data.""" import logging from decimal import Decimal, DecimalException import homeassistant.util.dt as dt_util from homeassistant.const import ( CONF_NAME, ATTR_UNIT_OF_MEASUREMENT, EVENT_HOMEASSISTANT_START, STATE_UNKNOWN, STATE_UNAVAILABLE) from homeassistant.core ...
from collections import defaultdict from logging import getLogger as get_logger from queryutils.query import QueryGroup from queryutils.session import Session logger = get_logger("queryutils") NEW_SESSION_THRESH_SECS = 30. * 60. class DataSource(object): """Represents a source of Splunk queries, users, and other...
from __future__ import absolute_import import zipfile from uuid import uuid4 from six import BytesIO, text_type from django.core.files.uploadedfile import SimpleUploadedFile from django.core.urlresolvers import reverse from sentry.testutils import APITestCase from sentry.models import ProjectDebugFile # This is obv...
# 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 python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multiwallet. Verify that a bitcoind node can load multiple wallet files """ import os import shutil f...
# -*- coding: utf-8 -*- """ Deployment settings All settings which are typically edited for a deployment should be done here Deployers shouldn't typically need to edit any other files. NOTE FOR DEVELOPERS: /models/000_config.py is NOT in the BZR repository, as this file will be changed during d...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'settings.ui' # # Created: Mon Jun 11 14:36:27 2012 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attrib...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> import urllib from copy import deepcopy from datetime import date from logging import getLogger from urlparse import urljoin from sqlalchemy import and_ from ggrc import db from ggrc import utils from ggr...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """ Syncs a database table to the `DocType` (metadata) .. note:: This module is only used internally """ import os import webnotes from webnotes.utils import cstr type_map ...
# -*- coding: utf-8 -*- # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception """ This module is responsible to generate 'index.html' for the report. The input for this step i...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (t...
import unittest from geneagrapher.graph import DuplicateNodeError, Graph, Node, Record class TestGraphMethods(unittest.TestCase): """Unit tests for the Graph class.""" def setUp(self): self.record1 = Record( "Carl Friedrich Gau\xdf", u"Universit\xe4t Helmstedt", 1799, 18231 ) ...
""" Copyright (c) 2014-2015, The University of Texas at Austin. All rights reserved. This file is part of BLASpy and is available under the 3-Clause BSD License, which can be found in the LICENSE file at the top-level directory or at http://opensource.org/licenses/BSD-3-Clause """ from blaspy im...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # # Copyright 2011, Piston Cloud Computing, Inc. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in ...
# Copyright 2014 OpenCore 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,...
#from django.utils.translation import ugettext as _ import datetime from django.db import models from django.db.models import Q from django.contrib.auth.models import User from model_utils.models import TimeStampedModel from django.utils.timezone import now from model_utils import Choices from django.utils import t...
# Copyright 2016 Capital One Services, 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...
""" handles the upload functions for all viable services """ import mmap import json import urlparse from ..security import security from .._abstract import abstract ######################################################################## class Uploads(abstract.BaseAGOLClass): """ handles the upload of the file...
"""Base implementation of event loop. The event loop can be broken up into a multiplexer (the part responsible for notifying us of I/O events) and the event loop proper, which wraps a multiplexer with functionality for scheduling callbacks, immediately or at a given time in the future. Whenever a public API takes a c...
# 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 (t...
# # catalog.py -- image and star catalog interfaces for Ginga # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import os.path import tempfile import re import time import warnings from urllib.request import Request, urlopen, urlretrieve from urllib.error im...
from sympify import sympify from basic import Atom, S, C from expr import Expr from cache import cacheit from sympy.logic.boolalg import Boolean import re class Symbol(Atom, Expr, Boolean): """ Assumptions:: commutative = True You can override the default assumptions in the constructor:: >>...
#!/usr/bin/env python # Copyright (C) 2015 Thomas Huang # # 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, version 2 of the License. # # This program is distributed in the hope that it will be us...
########################################################################## # # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # Copyright (c) 2012, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
# coding=utf-8 # Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, 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.or...
import datetime import json from io import StringIO from django.core import management from django.test import SimpleTestCase, TestCase from wagtail.contrib.search_promotions.models import SearchPromotion from wagtail.search import models from wagtail.search.query import And, Or, Phrase, PlainText from wagtail.search...
import pytest from natsort import natsorted from hypothesis import given, settings, HealthCheck #, assume from hypothesis import reproduce_failure # pylint: disable=unused-import import tempfile import subprocess # nosec from io import StringIO import numpy as np import pandas as pd from tests.helpers import as...
import datetime import random import mock from olympia import amo, core from olympia.amo.tests import addon_factory, collection_factory, TestCase from olympia.access.models import Group, GroupUser from olympia.activity.models import ActivityLog from olympia.addons.models import Addon from olympia.bandwagon.models imp...
import hashlib from optparse import make_option import os import re import shutil import time import urllib2 import uuid from subprocess import call, check_output, PIPE from django.conf import settings from django.core.management.base import BaseCommand, CommandError from jingo_minify.utils import get_media_root, get...
import functools import os import qtutil from PyQt4.QtCore import * from PyQt4.QtGui import * from . import project_functions as pfs from .mygraphicsview import MyGraphicsView from .custom_qt_items import ImageStackListView class PrimaryFunctionMissing(Exception): def __init__(self, message): self.messa...
################################################################################ # atd.py - The Unix at scheduler in Python ################ py2/3k version 0.2 # ################################################################################ # `at` is a command line utility, like cron, that schedules commands to be ru...
# Copyright 2019 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 (c) 2018 Doyub Kim I am making my contributions/submissions to this project solely in my personal capacity and am not conveying any rights to any intellectual property of any third parties. """ import pyjet from pytest import approx def test_vector2f_Init(): a = pyjet.Vector2F() assert a.x == ...
# Autoreloading launcher. # Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org). # Some taken from Ian Bicking's Paste (http://pythonpaste.org/). # # Portions copyright (c) 2004, CherryPy Team (team@cherrypy.org) # All rights reserved. # # Redistribution and use in source and binary forms, with ...
#!/usr/bin/python from subprocess import Popen from subprocess import PIPE import re import sys # Define which are the 'root' packages (form # which the dependency analysis starts) debian_pkgs = ['linux-image-2.6.32-5-xen-amd64', 'linux-image-2.6.32-5-amd64', 'initramfs-tools', 'bash', 'apt', 'apt-u...
# 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 ...
#!/usr/bin/env python import os, os.path as p import codecs import effess import fnmatch import platform import xml.etree.ElementTree from xml.etree.ElementTree import ElementTree def fix_path(path): return p.abspath(p.expanduser(p.normpath(path))) class App(object): def __init__(self, env, source_dir): self.env ...
import asyncio import collections import logging import random import time from itertools import chain import async_timeout from kafka.protocol.offset import OffsetRequest from kafka.protocol.fetch import FetchRequest import aiokafka.errors as Errors from aiokafka.errors import ( ConsumerStoppedError, RecordTooLa...
""" This module contains object representing the different options in an image. These objects are responsible for understanding different conditions around the use of these options. """ from harpoon.errors import BadImage, HarpoonError from harpoon.ship.context import ContextBuilder from harpoon.amazon import assumed...
import sys import os import operator import sys import math from enum import Enum import numpy as np class AcousticsIndex(Enum): time = 0 pitch = 1 RMS = 2 intensity = 3 loudness = 4 def readAcoustics(filename): data = [] in_file = open(filename, "rt") while True: in_line = in_...
#!/usr/bin/env python from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import ( assertGreaterEqual, expect_warnings, get_params, gettestcases, expe...
#!/usr/bin/env python __author__ = "Yaroslav Litvinov" __copyright__ = "Copyright 2016, Rackspace Inc." __email__ = "yaroslav.litvinov@rackspace.com" from logging import getLogger from collections import namedtuple from datetime import datetime from bson.json_util import loads # initial load completed --init-load-sa...
# 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 ...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
#!/usr/bin/python """ @package nilib @file nidtnmetadata.py @brief Encode and decode routines for RFC 5050 Bundle Protocol Metadata blocks. @version $Revision: 0.05 $ $Author: stephen $ @version Copyright (C) 2012 Trinity College Dublin and Folly Consulting Ltd This is an adjunct to the NI URI library developed as ...
#hgvm-builder directory.py: Represent a bunch of Toil files with filenames import os import os.path import logging import urlparse import shutil Logger = logging.getLogger("directory") class Directory(object): """ Represents a collection of Toil file IDs with assigned file names (which can have directori...
# -*- coding:utf-8 -*- import os import re from localeurl.models import patch_reverse patch_reverse() from satchless.contrib.pricing.cache import PricingCacheHandler from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ PROJECT_ROOT = os.path.dirname( __file__ ) DEBUG =...
''' ==================================================================== Copyright (c) 2003-2016 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ======================================================...
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2014 Ben Swartzlander. All rights reserved. # Copyright (c) 2014 Navneet Singh. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Bob Callaw...
#!/usr/bin/env python # # Electrum - Lightweight Bitcoin Client # Copyright (C) 2015 Thomas Voegtlin # # 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...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
from __future__ import division from collections import Counter from functools import partial from linear_algebra import dot import math, random import matplotlib import matplotlib.pyplot as plt def step_function(x): return 1 if x >= 0 else 0 def perceptron_output(weights, bias, x): """returns 1 if the percep...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: components/config/proto/project_config.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as ...
# Copyright 2018 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
from __future__ import absolute_import, division, print_function from weakref import WeakKeyDictionary from toolz import curry, concat, first, memoize from multipledispatch import MDNotImplementedError from ..expr import ( Distinct, ElemWise, Expr, Field, Head, Projection, Slice, Symb...
import numpy as np llf = np.array([-245.40783909604]) nobs = np.array([ 202]) k = np.array([ 5]) k_exog = np.array([ 1]) sigma = np.array([ .8100467417583]) chi2 = np.array([ 2153.20304012]) df_model = np.array([ 3]) k_ar = np.array([ 1]) k...
import base64 import hashlib import hmac import os import requests import selenium import sys from time import sleep from urllib import quote from selenium import webdriver class SalesforceOAuth2(object): authorization_url = '/services/oauth2/authorize' token_url = '/services/oauth2/token' revoke_url = '/s...
#!/usr/bin/env python """ 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");...
__copyright__ = 'Copyright 2014-2020, http://radical.rutgers.edu' __license__ = 'MIT' import threading import radical.utils as ru from string import punctuation from .constants import NAME_MESSAGE from . import exceptions as ree from .stage import Stage from . import states class Pipel...