gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from __future__ import unicode_literals import os import subprocess import sys import time from .common import AudioConversionError, PostProcessor from ..compat import ( compat_subprocess_get_DEVNULL, ) from ..utils import ( encodeArgument, encodeFilename, get_exe_version, is_outdated_version, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # 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 Lice...
import time import logging from sevenbridges.models.bulk import BulkRecord from sevenbridges.decorators import inplace_reload from sevenbridges.errors import ( SbgError, TaskValidationError ) from sevenbridges.meta.fields import ( HrefField, UuidField, StringField, CompoundField, DateTimeField, Boolea...
# pylint: disable=g-bad-file-header # Copyright 2017 The Bazel 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 ...
# Copyright 2020 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,...
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import os import re from abc import ABC, abstractmethod from textwrap import dedent from typing import Callable, ClassVar, Iterator, Optional, cast fro...
# engine/default.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Default implementations of per-dialect sqlalchemy.engine classes. These are semi...
# -*- coding: utf-8 -*- __all__ = ['Distribution'] import io import sys import re import os import warnings import numbers import distutils.log import distutils.core import distutils.cmd import distutils.dist from distutils.util import strtobool from distutils.debug import DEBUG from distutils.fancy_getopt import tran...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Translates a source file using a translation model. ''' import sys import numpy import json import os import logging from multiprocessing import Process, Queue from collections import defaultdict from Queue import Empty from util import load_dict, load_config, seqs2wo...
# Copyright (c) 2013 Dell Inc. # Copyright 2013 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
import gc import gzip import json from collections import Counter, OrderedDict from pathlib import Path import sys import pymysql from joblib import Memory import settings memory = Memory('cache/dataset', verbose=0) class Database: def __init__(self): self.connection = pymysql.connect(host=settings.DB_...
""" Module to provide Cisco UCS compatibility to Salt :codeauthor: ``Spencer Ervin <[email protected]>`` :maturity: new :depends: none :platform: unix Configuration ============= This module accepts connection configuration details either as parameters, or as configuration settings in pillar as a Salt...
from __future__ import unicode_literals import copy from typing import Any from typing import Dict from typing import Generator from typing import List from typing import Optional from typing import Tuple from typing import Union from ._compat import decode from ._utils import merge_dicts from .exceptions import Key...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.ap...
# 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 os from twit...
# 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 copy import matplotlib import networkx as nx import xlsxwriter as xlsxw from gat.dao import dao colors = ["DeepSkyBlue", "Gold", "ForestGreen", "Ivory", "DarkOrchid", "Coral", "DarkTurquoise", "DarkCyan", "Blue"] hexColors = {} for color in colors: rgbVal = matplotlib.colors.colorConverter.to_rgb(color) ...
from __future__ import print_function, division __version__ = "0.2.1" __author__ = "Matthew Pitkin ([email protected])" __copyright__ = "Copyright 2016 Matthew Pitkin, Ben Farr and Will Farr" import numpy as np import pandas as pd import scipy.stats as ss import math import matplotlib as mpl from matplotl...
import numpy as np from .crf import CRF from ..utils import expand_sym, compress_sym class GraphCRF(CRF): """Pairwise CRF on a general graph. Pairwise potentials the same for all edges, are symmetric by default (``directed=False``). This leads to n_classes parameters for unary potentials. If `...
# Copyright 2016 Andrew Bogott for the Wikimedia 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-...
# Copyright (c) 2008 Giorgos Verigakis <[email protected]> # # 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 THE...
from knowledge import settings import django from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings as django_settings from knowledge.managers import QuestionManager, ResponseManager from knowledge.signals import knowledge_post_save STATUSES = ( ('pu...
"""Support for KNX/IP lights.""" from xknx.devices import Light as XknxLight from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, ATTR_WHITE_VALUE, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, SUPPORT_WHITE_VALUE, LightEntity, ) fro...
#!/usr/bin/python # Copyright 2017-present Open Networking 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 ap...
""" convolutional nodes """ from __future__ import division, absolute_import from __future__ import print_function, unicode_literals import numpy as np import theano import theano.tensor as T from .. import core def conv_output_length(input_size, conv_size, stride, pad): """ calculates the output size alon...
# # 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...
from cStringIO import StringIO from datetime import datetime from functools import partial from itertools import chain, imap, izip from logging import StreamHandler import os from os import chdir from os.path import join, basename, split, dirname, relpath from sys import stderr from time import time from mimetypes impo...
""" Validators library """ import re from string import Template class ValidatorMetaclass(type): def __new__(cls, name, bases, classdict): error_code_map = {} error_messages = {} message_values = {} for base in reversed(bases): try: error_code_map.upda...
# # 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 # ...
""" utility functions for asteval Matthew Newville <[email protected]>, The University of Chicago """ import ast import io import math import numbers import re from sys import exc_info from tokenize import ENCODING as tk_ENCODING from tokenize import NAME as tk_NAME from tokenize import tokenize as gene...
# 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 2013 Cisco Systems, 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...
""" Gaudi Python script for extraction and analysis of BGV mdf data. """ from __future__ import print_function import pdb import logging import sys from argparse import (ArgumentParser, RawDescriptionHelpFormatter, ArgumentTypeError) from os.path import abspath, isfile from datetime import dateti...
""" Diffusion 2: jump diffusion, stochastic volatility, stochastic time Created on Tue Dec 08 15:03:49 2009 Author: josef-pktd following Meucci License: BSD contains: CIRSubordinatedBrownian Heston IG JumpDiffusionKou JumpDiffusionMerton NIG VG References ---------- Attilio Meucci, Review of Discrete and Contin...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division # standard library dependencies try: # prefer lxml as it supports XPath from lxml import etree except ImportError: import xml.etree.ElementTree as etree from operator import attrgetter import itertools from petl.comp...
import pytest from unittest import mock from awx.api.versioning import reverse from awx.main.utils import decrypt_field from awx.main.models.workflow import ( WorkflowJobTemplate, WorkflowJobTemplateNode, WorkflowApprovalTemplate ) from awx.main.models.jobs import JobTemplate from awx.main.tasks import deep_copy_m...
# -*- coding: utf-8 -*- """OSF mailing utilities. Email templates go in website/templates/emails Templates must end in ``.txt.mako`` for plaintext emails or``.html.mako`` for html emails. You can then create a `Mail` object given the basename of the template and the email subject. :: CONFIRM_EMAIL = Mail(tpl_pre...
import logbook from .log import Log, RedisPub log = Log(__name__) def guard(f, *args, **kargs): with logbook.NullHandler().applicationbound(): with RedisPub(): try: return f(*args, **kargs) except: log.exception('task {} failed', f.__name__) def ...
#this program corresponds to special.py from decimal import Decimal from numpy.testing import * import scipy.signal as signal from scipy.signal import lfilter from numpy import array, arange import numpy as np class TestConvolve(TestCase): def test_basic(self): a = [3,4,5,6,5,4] b = [1,2,3] ...
import Tkinter as tk from versionControl import greeting import AppKit import subprocess import threading import time import os import functions start_bt_ms = "Welcome! Think about the how you want to label tweets." count = -1 Mflag = False class App(tk.Frame): def __init__(self, master): tk.Frame.__init...
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ General gateway tests. @since: 0.1.0 """ import unittest import sys import pyamf from pyamf import remoting from pyamf.remoting import gateway, amf0 class TestService(object): def spam(self): return 'spam' def echo(self, x): ...
# Copyright (c) 2018 PaddlePaddle 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 app...
import datetime from urlparse import urlparse from utils import log as logging from django.shortcuts import get_object_or_404, render_to_response from django.views.decorators.http import condition from django.http import HttpResponseForbidden, HttpResponseRedirect, HttpResponse, Http404 from django.conf import settings...
""" Nagios notification module. Uses the curl protocol to push SFT notifications to a nagios server. On the nagios server site we recommend to install the NSCAweb (http://wiki.smetj.net/wiki/Nscaweb) module, as we will submit multi-line notifications, which will are fed to the message to the nagios.cmd pipe. The m...
import sys import pandas as pd from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import TfidfVectorizer from sklearn import svm from sklearn.metrics import classification_report from sklearn.multiclass import OneVsRestClassifier from sklearn.svm import SVC from sklearn.metrics im...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This sphinx extension adds two directives for summarizing the public members of a module or package. These directives are primarily for use with the `automodapi` extension, but can be used independently. ======================= `automodsumm` directiv...
""" Test basics of linux core file debugging. """ from __future__ import print_function import shutil import struct import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class LinuxCoreTestCase(TestBase): NO_DEBUG_INFO_TESTCASE = True ...
# 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 ...
"""Hierarchical Agglomerative Clustering These routines perform some hierachical agglomerative clustering of some input data. Currently, only Ward's algorithm is implemented. Authors : Vincent Michel, Bertrand Thirion, Alexandre Gramfort, Gael Varoquaux License: BSD 3 clause """ from heapq import heapify, h...
# -*- coding: utf-8 -*- import json import inspect from quixote.errors import TraversalError from quixote.errors import AccessError from vilya.libs.template import st, request from vilya.models.user import User from vilya.models.gist import Gist from vilya.models.gist_star import GistStar from vilya.models.gist_comme...
""" Room Typeclasses for the TutorialWorld. This defines special types of Rooms available in the tutorial. To keep everything in one place we define them together with the custom commands needed to control them. Those commands could also have been in a separate module (e.g. if they could have been re-used elsewhere.)...
""" Class definition for a Box shaped window. Inherets from """ from neus.window import Window import numpy as np import collections class Box(Window): """Class definition of Box which inherits from window. Implements the Box shaped basis function. """ def __init__(self, center, width, ref_center=None, ...
#! coding: utf-8 import re import os.path ### # Django related settings ### DEBUG = True TEMPLATE_DEBUG = DEBUG WILDCARD_USER_SUBDOMAINS_ENABLED = True ADMINS = ( # ('AloneRoad', '[email protected]'), ) MANAGERS = ADMINS # This stuff is always going to be the same for an App Engine instance DATABASE_ENGINE = ...
from contextlib import contextmanager import attr import socket import yaml import re import six @attr.s(frozen=True) class Job(object): """Structure holding a job returned from Beanstalk :ivar job_id: Opaque identifier for the job (to be passed to :func:`BeanstalkClient.release_job()` or :func:`Bea...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # File: xmlhandler.py # by Arzaroth Lekva # [email protected] # from __future__ import print_function, absolute_import, unicode_literals import rapidxml from collections import OrderedDict, defaultdict from six import add_metaclass from celestia.utility import PONY_LI...
import logging import os import sys import tempfile import time import requests from .cache import CachingSession, FileCache # noqa if sys.version_info[0] < 3: # pragma: no cover from urllib2 import urlopen as urllib_urlopen from urllib2 import URLError as urllib_URLError import urlparse im...
import inspect import enum import abc import collections from . import utils, errors from .helpnode import HelpNode from .enums import PrivilegeLevel from .servermodulewrapper import ServerModuleWrapper ########################################################################################### # UTILITY FUNCTIONS ###...
# -*- encoding: UTF-8 -*- import math # import almath as m # python's wrapping of almath import sys from naoqi import ALProxy def StiffnessOn(proxy): # We use the "Body" name to signify the collection of all joints pNames = "Body" pStiffnessLists = 1.0 pTimeLists = 1.0 proxy.stiffnessInterpolati...
""" Spike train statistics plots ---------------------------- .. autosummary:: :toctree: toctree/statistics/ plot_isi_histogram plot_time_histogram plot_instantaneous_rates_colormesh """ # Copyright 2017-2022 by the Viziphant team, see `doc/authors.rst`. # License: Modified BSD, see LICENSE.txt.txt f...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
""" Testing the funcionality of the reports and the reporting utils """ from datetime import datetime from django.test import TestCase from django.utils import timezone from django.db.models import Avg, Sum from django.core.urlresolvers import reverse from geoposition import Geoposition from seshdash.models import Da...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest asdf = pytest.importorskip('asdf') import numpy as np import astropy.units as u from astropy import table from astropy.time import Time, TimeDelta from astropy.coordinates import SkyCoord, EarthLocation from astrop...
# -*- coding: utf-8 -*- ''' The modules in this file are refered to https://github.com/Kyubyong/transformer ''' from __future__ import print_function import tensorflow as tf from load_data import * def normalize(inputs, epsilon = 1e-8, scope="ln", reuse=None): '''Applie...
from __future__ import print_function # Copyright (c) 2011, Roger Lew [see LICENSE.txt] # This software is funded in part by NIH Grant P20 RR016454. """ This module contains custom aggregators for sqlite3 sqlite has the following aggregate functions built-in: avg(X) count(X) count(*) group_concat(X) ...
import mock from olympia import amo from olympia.addons.models import Addon from olympia.amo import search from olympia.amo.tests import ESTestCaseWithAddons, TestCase from olympia.tags.models import Tag class TestESIndexing(ESTestCaseWithAddons): # This needs to be in its own class for data isolation. def ...
# -*- coding: utf-8 -*- # Copyright 2014 Rob Ruana # Licensed under the BSD License, see LICENSE file for details. """Tests for :mod:`sphinxcontrib.napoleon.docstring` module.""" import textwrap from sphinxcontrib.napoleon import Config from sphinxcontrib.napoleon.docstring import GoogleDocstring, NumpyDocstring from...
#!/usr/bin/python2.7 from time import sleep, gmtime from mocker import Mocker, ANY, MockerTestCase from unittest import main, TestCase import logging LOGGER_LOGFILE = "./LOGS/test_FS.log" logger = logging.getLogger() logger.setLevel( logging.CRITICAL ) #logger.setLevel( logging.DEBUG ) ch = logging.StreamHandler()...
from SPARQLWrapper import SPARQLWrapper, JSON import numpy as np import math import time from database_interface.data_interface.edge_query_result import EdgeQueryResult from database_interface.search_filters.prefix_filter import PrefixFilter class FreebaseInterface: endpoint = None prefix = None max_enti...
# # 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 # ...
# Global settings for core project. import os # PATH CONFIGURATION PROJECT_DIR = os.path.dirname(os.path.dirname(__file__)) PUBLIC_DIR = os.path.join(PROJECT_DIR, 'public') # Python dotted path to the WSGI application used by Django's runserver. WSGI_APPLICATION = 'plugin_manager.core.wsgi.application' # END PATH CON...
#!/usr/bin/env python # copyright 2013, y-p @ github """ Search the git history for all commits touching a named method You need the sh module to run this WARNING: this script uses git clean -f, running it on a repo with untracked files will probably erase them. Usage:: $ ./find_commits_touching_func.py (see arg...
# Copyright 2014 IBM Corp. # Copyright 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...
# Copyright (c) 2016 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...
# DEAP is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of # the License, or (at your option) any later version. # # DEAP is distributed in the hope that it will be usefu...
""" This module provides more sophisticated flow tracking and provides filtering and interception facilities. """ from __future__ import absolute_import from abc import abstractmethod, ABCMeta import hashlib import Cookie import cookielib import os import re from netlib import odict, wsgi, tcp import netlib.http fr...
""" Script to generate the MNIST+ dataset. The purpose of this dataset is to make a more challenging MNIST-like dataset, with multiple factors of variation. These factors can serve to evaluate a model's performance at learning invariant features, or its ability to disentangle factors of variation in a multi-task classi...
""" This module defines handlers for storing sessions when handles sessions of users connecting to the server. There are two similar but separate stores of sessions: ServerSessionHandler - this stores generic game sessions for the game. These sessions has no knowledge about how they are connected t...
from django.conf import settings from django.contrib import messages as django_messages from django.core.exceptions import ObjectDoesNotExist from django.http import Http404, HttpResponseRedirect from django.urls import reverse, reverse_lazy from django.views.generic import ( CreateView, DetailView, FormVie...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <[email protected]> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata...
# -*- coding: utf-8 -*- import logging import unittest from stalker import (db, Repository, Project, Structure, FilenameTemplate, Status, StatusList, Task, Version) from stalker.db import DBSession from anima.dcc.base import DCCBase logger = logging.getLogger(__name__) logger.setLevel(logging....
# Copyright 2014 Cloudera 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 agreed to in writing, so...
# -*- coding: 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 model 'ClassicRecipe' db.create_table('layerindex_classicrecipe', ( ('recipe_ptr', self...
import os, sys, random, math import numpy as np #from pybrain.datasets import SupervisedDataSet from time import sleep # Helper functions class obstacle(object): def __init__(self,xmin,xmax,ymin,ymax): self.xmin = xmin self.xmax = xmax self.ymin = ymin self.ymax = ymax def argmax(...
# 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 required by applicable law or a...
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from django.core.checks import Error, Warning as DjangoWarning from django.db import models from django.test.utils import override_settings from django.test.testcases import skipIfDBFeature from .base import IsolatedModelsTestCase class RelativeField...
# encoding: utf-8 # # This file was taken from webpyte (r179): # http://code.google.com/p/webpyte/source/browse/trunk/webpyte/email_validator.py # According to the docstring, it is licensed as 'public domain' # # Modifications: # * Wed Mar 25 2009 Felix Schwarz # - Removed 'from __future__ import absolute_import to st...
# coding=utf-8 # Copyright 2014-2017 F5 Networks 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 (c) 2012 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. from code import Code from model import PropertyType import any_helper import cpp_util import schema_util class CppTypeGenerator(object): """Manages t...
from datetime import date, datetime, timedelta import numpy as np import pytest import pytz from pandas._libs.tslibs import iNaT, period as libperiod from pandas._libs.tslibs.ccalendar import DAYS, MONTHS from pandas._libs.tslibs.frequencies import INVALID_FREQ_ERR_MSG from pandas._libs.tslibs.parsing import DatePars...
# Copyright (c) 2019, CRS4 # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribu...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # 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 Lice...
r""" Stokes equations for incompressible fluid flow. This example demonstrates fields defined on subdomains as well as use of periodic boundary conditions. Find :math:`\ul{u}`, :math:`p` such that: .. math:: \int_{Y_1 \cup Y_2} \nu\ \nabla \ul{v} : \nabla \ul{u} - \int_{Y_1 \cup Y_2} p\ \nabla \cdot \ul{v} ...
# python-3 # Author: Sreejith Menon ([email protected]) # Creation date: 5/23/16 ''' Script for getting all images without duplicates from the csv file. Date: May 23, 2016 The mapFlName referred to in the entire script is : ../data/imageGID_job_map_expt2_corrected.csv ''' import BuildConsolidatedFeaturesFile as Featu...
import random import string import os import logging import sys import parsing from parsing import flatten_dictionaries, lowercase_keys, safe_to_bool # Python 3 compatibility if sys.version_info[0] > 2: from builtins import range as xrange from past.builtins import basestring """ Collection of generators to b...
import errno import os import signal import socket from os.path import join, dirname, abspath import eventlet from mock import patch from textwrap import dedent import pytest from nameko.cli.main import setup_parser from nameko.cli.run import import_service, setup_backdoor, main, run from nameko.exceptions import Comm...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module tests some of the methods related to the ``ECSV`` reader/writer. Requires `pyyaml <http://pyyaml.org/>`_ to be installed. """ import os import copy import sys import pytest import numpy as np from ....table import Table, Column, QTable,...
from google.appengine.ext import db import string import soc.models.linkable class Tag(db.Model): """Google AppEngine model for store of tags. """ tag = db.StringProperty(required=True) "The actual string value of the tag." added = db.DateTimeProperty(auto_now_add=True) "The date and time that the tag w...
# Copyright 2012 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 requ...
#!/usr/bin/env python # Copyright 2014 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. import sys import string import json blink_protocol_path = sys.argv[1] browser_protocol_path = sys.argv[2] output_cc_path = sys.argv[3...