gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# 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...
from pyswagger import App from pyswagger.getter import UrlGetter, DictGetter, SimpleGetter from pyswagger.resolve import Resolver from pyswagger.utils import _diff_ from .utils import get_test_data_folder import unittest import os import json class _MyCustomException(Exception): pass def _my_custom_load(path): ...
# 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, ...
#!/usr/bin/env python # # Copyright 2016 The Android Open Source Project. 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....
#!/usr/bin/env python3 # # Copyright 2013 Simone Campagna # # 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 ...
import logging from typing import List from unittest import mock import pandas as pd import pytest import great_expectations.exceptions as ge_exceptions from great_expectations import DataContext from great_expectations.core import ( ExpectationConfiguration, ExpectationSuite, ExpectationSuiteValidationRe...
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
"""Checkpointable data structures.""" # 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/LICE...
# Copyright 2018 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
"""Tests for media.models.""" # pylint: disable=maybe-no-member, too-many-instance-attributes from base64 import urlsafe_b64encode from unittest import skipIf import hashlib import os import re from django.core.files import File from django.core.urlresolvers import reverse from django.test import TestCase, Client from...
#!/usr/bin/env python ##===-----------------------------------------------------------------------------*- Python -*-===## ## _ ## | | ## __| | __ ___ ___ ___ ## / _` |/ _` \ \ /\ / / '_ | ## | (_| | (...
import numbers import numpy as np from scipy.stats.distributions import randint from scipy.stats.distributions import rv_discrete from scipy.stats.distributions import uniform from sklearn.preprocessing import LabelBinarizer from sklearn.utils import check_random_state from sklearn.utils.fixes import sp_version cla...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import re import os import warnings import functools import keyring import numpy as np import astropy.units as u import astropy.io.votable as votable from astropy import coordinates import six from astropy.table import Table from astroquery import log f...
""" sentry.models.project ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import logging import warnings from django.conf import settings from django.core.urlresol...
""" Model test set """ import unittest from datetime import date from math import sqrt from tr55.tablelookup import lookup_ki, is_built_type from tr55.model import runoff_nrcs, simulate_tile, simulate_all_tiles from tr55.model import simulate_year # These data are taken directly from Table 2-1 of the revised (1986) #...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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 # # Unless required ...
from __future__ import division, print_function, absolute_import from warnings import warn import numpy as np from numpy import asarray, empty, ravel, nonzero from scipy.sparse import (isspmatrix_csc, isspmatrix_csr, isspmatrix, SparseEfficiencyWarning, csc_matrix) from . import _superlu n...
"""This module contains a collection of unit tests which validate ..main """ from ConfigParser import ConfigParser import logging import os import sys import tempfile import unittest import mock import tornado.httpserver from ..main import Main from .. import async_docker_remote_api class Patcher(object): """A...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Tests tod world + script, notably for batching, by comparing saved script logs to the data that should have been gen...
# encoding: utf-8 import 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 'Group.resolved_at' db.add_column('sentry_groupedmessage', 'resolved_at', self.gf('django.db.models...
# 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 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 -*- import copy import datetime import functools import json import logging import random import re from contextlib import nested import celery import httpretty import mock # noqa from django.utils import timezone from mock import call from modularodm import Q from modularodm.exceptions import KeyE...
""" This is a subfile for IsyClass.py These funtions are accessable via the Isy class opj """ __author__ = 'Peter Shipley <peter.shipley@gmail.com>' __copyright__ = "Copyright (C) 2015 Peter Shipley" __license__ = "BSD" from ISY.IsyNodeClass import IsyNode, IsyScene, IsyNodeFolder#, _IsyNodeBase from ISY.IsyUtilCla...
from __future__ import unicode_literals import logging from django import forms from django.contrib import messages from django.forms import widgets from django.utils.datastructures import SortedDict from django.utils.translation import ugettext_lazy as _ from djblets.forms.fields import TimeZoneField from djblets.si...
# # io_fits.py -- Module wrapper for loading FITS files. # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # """ There are two possible choices for a python FITS file reading package compatible with Ginga: astropy/pyfits and fitsio. Both are based on the CFIT...
# Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
#!/usr/bin/env python """ esptool.py "unit" tests (really integration tests). Uses a device connected to the serial port. WILL MESS UP THE DEVICE'S SPI FLASH CONTENTS Chip name & serial port are passed in as arguments to test. Same test suite runs on esp8266 & esp32 (some addresses will change, see below.) """ impor...
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. from iptest.assert_util import * skiptest("win32") from iptest.console_util import IronPythonInstance remove_...
"""numpy.distutils.fcompiler Contains FCompiler, an abstract base class that defines the interface for the numpy.distutils Fortran compiler abstraction model. Terminology: To be consistent, where the term 'executable' is used, it means the single file, like 'gcc', that is executed, and should be a string. In contras...
#!/usr/bin/env python # Copyright (c) 2011 Stanford University # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND ...
"""Compatibility fixes for older version of python, numpy and scipy If you add content to this file, please give the version of the package at which the fixe is no longer needed. """ # Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoquaux <gael.varoquaux@normalesup.org> # ...
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging import os import shutil from collections import defaultdict from textwrap import dedent from pex.interpreter import PythonInterpreter from pants.backend.python.targets.pyt...
import sys from alembic.testing import TestBase from sqlalchemy import MetaData, Column, Table, Integer, String, \ ForeignKeyConstraint from alembic.testing import eq_ py3k = sys.version_info >= (3, ) from ._autogen_fixtures import AutogenFixtureTest class AutogenerateForeignKeysTest(AutogenFixtureTest, TestBa...
from django.test import TestCase from django.conf import settings from restclients.nws import NWS from restclients.exceptions import DataFailureException, InvalidUUID, InvalidNetID from vm.v1.viewmodels import Channel, Endpoint, Subscription from unittest2 import skipIf class NWSTestSubscription(TestCase): def te...
# Copyright (c) 2015 Clinton Knight. 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...
# -*- coding: utf-8 -*- """ Created on Wed Mar 26 16:36:42 2014 @author: Ninja """ #-----------------------------------------------------------------------------# # Import Librairies # #--------------------------------------------------------------------------...
# Copyright 2013 Donald Stufft # # 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, so...
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """The data layer used during training to train a Fast R-CNN network. ...
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 Nebula, Inc. # Copyright 2013 Alessio Ababilov # Copyright 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 # ...
# -*- coding: utf-8 -*- """ Django settings for crakins project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: os.pat...
#!/usr/bin/env python # Copyright (c) 2014 Intel Corporation. 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 re from string import Template from java_class_component import Enum, Field from java_method import Method class ...
__author__ = "Radical.Utils Development Team (Andre Merzky, Ole Weidner)" __copyright__ = "Copyright 2013, RADICAL@Rutgers" __license__ = "MIT" import os import contrib.urlparse25 as urlparse import signatures as rus # ------------------------------------------------------------------------------ # c...
# # CORE # Copyright (c)2012 the Boeing Company. # See the LICENSE file included in this distribution. # # authors: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> # ''' conf.py: common support for configurable objects ''' import string from core.api import coreapi class ConfigurableManager(object): ''' A generic ...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) >>> datadir = os.path.realpath(os.path.join(filepath,...
""" Get the normalized best template to do flux calibration. """ #- TODO: refactor algorithmic code into a separate module/function import argparse import sys import numpy as np from astropy.io import fits from astropy import units from astropy.table import Table import astropy.coordinates as acoo import desispec...
#! /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 "Lic...
# 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...
"""A module for representing universal morphosyntactic feature bundles.""" from typing import Dict, List, Optional, Tuple, Type, Union from cltk.core.exceptions import CLTKException from cltk.morphology.universal_dependencies_features import * __author__ = ["John Stewart <free-variation>"] class MorphosyntacticFea...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2014 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...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import division, print_function import sys import signal import zmq import conf import logging import atexit import random import json from time import sleep from math import sqrt from colorsys import rgb_to_hsv from urllib import urlencode from urllib2 import...
# -*- coding: utf-8 -*- import json import logging import uuid from django.conf import settings from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.exceptions import ObjectDoesNotExist from django.core.mail import EmailMessage, get_connection from django.core.mail....
import datetime import os from collections import defaultdict from django import forms from django.conf import settings from django.utils.safestring import mark_safe import basket import happyforms from tower import ugettext as _, ugettext_lazy as _lazy import mkt from mkt.comm.utils import create_comm_note from mkt...
__author__ = 'Jonathan Brodie' import asyncore, socket,asynchat,time,threading,struct,util.util,util.encode,Queue,sys,select from clientmessage import AuthenticationMessage from clientmessage import ClientMessage from hzclient.codec import clientcodec class ConnectionManager(object): def __init__(self,config,smar...
import time import logging import pickle import functools import warnings from packaging import version from typing import Any, Callable, Dict, List, Optional, Tuple, Union from ray.tune.result import DEFAULT_METRIC, TRAINING_ITERATION from ray.tune.sample import ( Categorical, Domain, Float, Integer, ...
# Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# 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 ...
import glob import logging import os import sys from urlparse import urljoin import requests from requests.exceptions import ConnectionError from invoke import ctask as task, Collection from invocations.testing import test from tessera import app, db, config from tessera_client.api.model import Section from tessera....
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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.apac...
"""Module containing the ShearSplink pipelines.""" import logging from pathlib import Path from cutadapt import seqio import pandas as pd import pysam from pyim.external.cutadapt import cutadapt, cutadapt_summary from pyim.external.bowtie2 import bowtie2 from pyim.external.util import flatten_arguments from pyim.mod...
# 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 # # Unless required by applicable law or agr...
import json from math import log # Make an Expectation Maximization answer for a task def make_em_answer(task_obj, model_spec): example_to_worker_label = {} worker_to_example_label = {} label_set = [] answers = [] # Label set label_set = [] # Build up initial variables for em all_re...
# Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Clinton Knight. 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://w...
# Copyright 2012 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 # notice, this list of conditi...
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
import mock from osf.models import AdminLogEntry, OSFUser, Node, NodeLog from admin.nodes.views import ( NodeDeleteView, NodeRemoveContributorView, NodeView, NodeReindexShare, NodeReindexElastic, NodeFlaggedSpamList, NodeKnownSpamList, NodeKnownHamList, ) from admin_tests.utilities impo...
import unittest from django.test import TransactionTestCase from django.conf import settings from django.utils import timezone from datetime import timedelta, datetime import sys if sys.version_info >= (3, 0): unicode = str from background_task.tasks import tasks, TaskSchedule, TaskProxy from background_task.mod...
# -*- coding: utf-8 -*- """ Django settings for {{ cookiecutter.project_name }} project. Generated by 'django-admin startproject' using Django 1.8.3. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangop...
# -*- coding: utf-8 -*- # # 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 ...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# =============================================================================== # Copyright 2011 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/licens...
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Run Regression Test Suite This module calls down into individual test cases via subprocess. It will ...
"""Support for Xiaomi Miio.""" from __future__ import annotations from dataclasses import dataclass from datetime import timedelta import logging import async_timeout from miio import ( AirFresh, AirFreshA1, AirFreshT2017, AirHumidifier, AirHumidifierMiot, AirHumidifierMjjsq, AirPurifier, ...
# 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 2014 Cisco Systems, 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 requir...
from casexml.apps.stock.models import StockTransaction from corehq.apps.commtrack.models import StockState from corehq.apps.sms.api import incoming from corehq.util.translation import localize from custom.ilsgateway.models import SupplyPointStatus, SupplyPointStatusTypes, SupplyPointStatusValues from custom.ilsgateway....
# # Copyright 2009-2015 Oktie Hassanzadeh # # 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 ...
"""This module implements a generic object wrapper for use in performing monkey patching, helper functions to perform monkey patching and general purpose decorators and wrapper functions for various basic tasks one can make use of when doing monkey patching. """ import sys import inspect import functools from ..pack...
# -*- 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): # Removing unique constraint on 'AlertRelatedGroup', fields ['group', 'alert'] ...
#!/usr/bin/env python2.5 # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 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 the RBF code.""" from test_framework.test_framework import BitcoinTestFramework from test_framewo...
"""Support for Konnected devices.""" import asyncio import copy import hmac import json import logging from aiohttp.hdrs import AUTHORIZATION from aiohttp.web import Request, Response import voluptuous as vol from homeassistant import config_entries from homeassistant.components.binary_sensor import DEVICE_CLASSES_SC...
#!/usr/bin/env python # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
# -*- 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 'ApiKey.allowed_origins' db.add_column('sentry_apikey', 'a...
#!/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. """End to end tests for ChromeDriver.""" import base64 import json import math import optparse import os import shutil import socket i...
"""Object-oriented interface to sparse polynomial representation. """ from sympy.polys.polyclasses import GenericPoly class SparsePoly(GenericPoly): """Sparse polynomial over an arbitrary domain. """ __slots__ = ['rep', 'lev', 'ord', 'dom', '_hash'] def __init__(self, rep, ord, dom, lev=None): i...
""" GANs for the super-resolution application. - Example data is MNIST. - Input is subsampled MNIST data - Target is recovered high-resolution MNIST data """ from keras.models import Sequential from keras.layers import Dense from keras.layers import Reshape from keras.layers.normalization import BatchNormalizat...
# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011 Isaku Yamahata <yamahata at valinux co jp> # # 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 # # h...
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 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: # # 1. Redistributions of source code must retain the above ...
#!/bin/bash/env python """ The MIT License Copyright (c) 2014 Dennis Hoppe 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...
# coding=utf-8 # Copyright {{cookiecutter.authors}} and The HuggingFace Inc. team. 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/...
# Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Suppressions for V8 correctness fuzzer failures. We support three types of suppressions: 1. Ignore test case by pattern. Map a regular expression to a...
#!/usr/bin/env python """ <Program Name> test_util.py <Author> Konstantin Andrianov. <Started> February 1, 2013. <Copyright> See LICENSE for licensing information. <Purpose> Unit test for 'util.py' """ import os import sys import shutil import logging import tempfile import unittest import timeit impor...
# Copyright 2008-2014 Software freedom conservancy # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# -*- coding: utf-8 -*- ''' Management of the Salt scheduler ============================================== .. code-block:: yaml job3: schedule.present: - function: test.ping - seconds: 3600 - splay: 10 This will schedule the command: test.ping every 3600 seconds (every hour...
from __future__ import annotations from collections import defaultdict import csv import datetime from enum import Enum import itertools from typing import ( Any, Callable, DefaultDict, Iterable, Sequence, cast, ) import warnings import numpy as np import pandas._libs.lib as lib import pandas...
#!/usr/bin/python # -*- coding: utf-8 -*- class IsiFieldofstudy(): ''' Maps the MAG field of studies to the ISI field of studies ''' mappingLevel0 = { 'Engineering': 'Engineering', 'History': 'Social Sciences, general', 'Environmental science': 'Environment/Ecology', 'Ps...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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 # # Unle...
import datetime from django.db import models class Place(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=80) class Meta: ordering = ('name',) def __str__(self): return "%s the place" % self.name class Restaurant(Place): serves_hot_do...
# Copyright 2012-2017 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agree...