gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Field classes. """ from __future__ import unicode_literals import copy import datetime import itertools import os import re import sys import uuid from decimal import Decimal, DecimalException from io import BytesIO from django.core import validators from django.core.exceptions import ValidationError # Provide t...
#! /usr/bin/env python3 # This was forked from https://github.com/rustyrussell/lightning-payencode/tree/acc16ec13a3fa1dc16c07af6ec67c261bd8aff23 import re import time from hashlib import sha256 from binascii import hexlify from decimal import Decimal from typing import Optional, TYPE_CHECKING, Type import random impo...
# -*- coding: utf-8 -*- # Copyright 2019 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Field handler classes. The field handlers are meant to parse information from or do some other generic action for a specific f...
# Copyright 2012 Nebula, Inc. # Copyright (c) 2012 X.commerce, a business unit of eBay 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...
from bisect import bisect_left import sys import numpy as np from PyQt4.QtCore import QSize, Qt, QTimer from PyQt4 import QtGui from PyQt4.QtGui import QApplication, QTableView, QStandardItemModel, \ QStandardItem from sklearn.neighbors import NearestNeighbors from sklearn.metrics import r2_score import Orange fr...
""" Pure Python implementation of the Argon2 password hash. If you can, use the `argon2_cffi' or `argon2' bindings. Bas Westerbaan <bas@westerbaan.name> """ import six from six.moves import range from six import BytesIO import struct import binascii import multiprocessing import multiprocessing.dummy __al...
#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess import os import csv import sys import datetime import tempfile import fileinput import shutil import gzip import ConfigParser # Config file Config = ConfigParser.ConfigParser() Config.read('cron.cfg') def ConfigSectionMap(section): dict1 = {} opt...
""" Definition of App class and the app manager. """ import os import time import inspect import logging import tornado.ioloop import tornado.web from ..util.icon import Icon from .. import webruntime from .. import react from .clientcode import clientCode, Exporter # global client code from .pair import Pair # C...
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Sylvain Afchain <sylvain.afchain@enovance.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apach...
import re from functools import update_wrapper import random from django.conf.urls import url, include from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe from django import http from django.utils.decorators import classonlymethod from . import views from . import options from ...
""" Robust location and covariance estimators. Here are implemented estimators that are resistant to outliers. """ # Author: Virgile Fritsch <virgile.fritsch@inria.fr> # # License: BSD 3 clause import warnings import numbers import numpy as np from scipy import linalg from scipy.stats import chi2 from . import empir...
# -*- coding: utf-8 -*- # This file is part of visvalingamwyatt. # https://github.com/fitnr/visvalingamwyatt # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2015, fitnr <contact@fakeisthenewreal.org> """visvalingamwyatt module tests""" import json import os import unit...
# Copyright 2015 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...
"""Sensor platform for the GitHub integratiom.""" from __future__ import annotations import asyncio from datetime import timedelta import logging from aiogithubapi import GitHubAPI, GitHubException import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.c...
from PySide import QtGui, QtCore from SearcherLite import * from ListDelegate import * if sys.platform not in ['win32','darwin']: from LinuxFileOpener import * import os, sys if getattr(sys, 'frozen', False): # frozen program_location = os.path.dirname(sys.executable) else: # unfrozen program_locat...
#!/usr/bin/env python from __future__ import print_function from mindmup_as_attack_trees import * import sys,json import re from collections import OrderedDict import math import argparse parser = argparse.ArgumentParser() parser.add_argument("--only-severities", action='store_true', help="only generate markdown for ...
#path hack. import sys import os sys.path.insert(0, os.path.abspath('..')) import unittest from cppstub import CppFile class CppStubHeaderParsingTestSuite(unittest.TestCase): def setUp(self): self.cpp_file = CppFile("TestSuite") def test_header_parse_namespace(self): self.cpp_file.parse_head...
"""diesel's async I/O event hub meets multiprocessing. Let's you run CPU intensive work in subprocesses and not block the event hub while doing so. """ import multiprocessing as mp import traceback from diesel import runtime from diesel import core from diesel.util.queue import Queue def spawn(func): """Spawn ...
from copy import deepcopy from unittest import TestCase from mock import patch from corehq.apps.es import filters from corehq.apps.es import forms, users from corehq.apps.es.es_query import HQESQuery from corehq.apps.es.tests.utils import ElasticTestMixin from corehq.elastic import SIZE_LIMIT class TestESQuery(Elast...
"""The IPython kernel implementation""" import getpass import sys import traceback from IPython.core import release from IPython.utils.py3compat import builtin_mod, PY3 from IPython.utils.tokenutil import token_at_cursor, line_at_cursor from IPython.utils.traitlets import Instance, Type, Any, List from IPython.utils....
# Copyright (c) 2011 - 2017, Intel Corporation. # # 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 agre...
""" The custom manager for Scripts. """ from django.db.models import Q from evennia.typeclasses.managers import TypedObjectManager, TypeclassManager from evennia.typeclasses.managers import returns_typeclass_list from evennia.utils.utils import make_iter __all__ = ("ScriptManager",) _GA = object.__getattribute__ VALI...
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils import timezone from model_utils import FieldTracker from fit4school.core.notifications import notify_tracker_changes from django.conf import settings import logging import pendulum logger = logging.getLogger(__nam...
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
from __future__ import absolute_import from sentry.utils.compat import zip __all__ = ( "TestCase", "TransactionTestCase", "APITestCase", "TwoFactorAPITestCase", "AuthProviderTestCase", "RuleTestCase", "PermissionTestCase", "PluginTestCase", "CliTestCase", "AcceptanceTestCase", ...
""" HTML Widget classes """ try: set # Only available in Python 2.4+ except NameError: from sets import Set as set # Python 2.3 fallback from itertools import chain from django.utils.datastructures import MultiValueDict from django.utils.html import escape from django.utils.translation import gettext from dja...
# Copyright (C) 2009-2014 Wander Lairson Costa # # The following terms apply to all files associated # with the software unless explicitly disclaimed in individual files. # # The authors hereby grant permission to use, copy, modify, distribute, # and license this software and its documentation for any purpose, provided...
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.golf.PhysicsWorldBase import sys if sys.platform != 'android': from panda3d.ode import OdeBody, OdeBoxGeom, OdeHingeJoint, OdeJoint, OdeJointGroup, OdeMass, OdePlaneGeom, OdeSimpleSpace, OdeSliderJoint, OdeSphereGeom, OdeTriMeshData, OdeTriMeshGeom...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import sys import inspect from django import template from django.conf import settings from django.utils.datastructures import SortedDict from django.utils.encoding import smart_str from django.utils.html import escape from django.utils.safestring import mark_safe, SafeData register = template.Library() # # {% chart ...
import json import os import random import time from contextlib import contextmanager from datetime import datetime, timedelta from decimal import Decimal from functools import partial from urlparse import SplitResult, urlsplit, urlunsplit from django import forms, test from django.conf import settings from django.con...
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
######################################################################### # Copyright 2011 Cloud Sidekick # # 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...
#!/usr/bin/env python3 import csv import ctypes import functools import os.path import numpy as np from scipy.integrate import odeint, ode import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties import system # ------------------------------------------------------------------------- # C...
#!/usr/bin/env python # -*- coding: utf-8 -*- ## @package TMS1mmX19Tuner # Human interface for tuning the Topmetal-S 1mm version chip x19 array # from __future__ import print_function from __future__ import division import math,sys,time,os,shutil from datetime import datetime import array,copy import ctypes import so...
from flask import Flask from passlib.hash import bcrypt from sixquiprend.config import * from sixquiprend.models.card import Card from sixquiprend.models.chosen_card import ChosenCard from sixquiprend.models.column import Column from sixquiprend.models.game import Game from sixquiprend.models.hand import Hand from sixq...
# =============================================================================== # Copyright 2016 dgketchum # # 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...
""" byceps.blueprints.admin.site.views ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations import dataclasses from typing import Iterable, Iterator from flask import abort, request from flask_babel...
# 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. import re class CSSChecker(object): def __init__(self, input_api, output_api, file_filter=None): self.input_api = input_api self.output_api = o...
''' Virtual Network Simulator POX Application. Author : Kausik Subramanian ''' from pox.core import core from collections import defaultdict import pox.openflow.libopenflow_01 as of import pox.lib.packet as pkt import pox.openflow.discovery import pox.openflow.spanning_tree from pox.lib.packet.ethernet import etherne...
# 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 # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# coding: utf-8 # In[1]: ########################################################################################################################### # In[2]: import tensorflow as tf import numpy as np from sklearn.metrics import mean_squared_error from sklearn.metrics import r2_score from sklearn import metrics...
"""Test Z-Wave climate devices.""" import pytest from homeassistant.components.climate.const import ( ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW, CURRENT_HVAC_COOL, CURRENT_HVAC_HEAT, HVAC_MODE_COOL, HVAC_MODE_HEAT, HVAC_MODE_HEAT_COOL, HVAC_MODE_OFF, HVAC_MODES, PRESET_AWAY, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Anatomical Reference -processing workflows. Originally coded by Craig Moodie. Refactored by the CRN Developers. """ import os.path as op from nipype.inte...
# -*- coding: UTF-8 -*- # Copyright 2009-2018 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) from builtins import str from django.conf import settings from django.db import models from django.utils.translation import gettext_lazy as _ from django.utils.translation import...
#!/usr/bin/env python3 # Copyright 2020 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
#!/usr/bin/env python3 # Copyright (c) 2015-2021 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 transaction signing using the signrawtransaction* RPCs.""" from test_framework.blocktools import ...
# Copyright 2010-2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
''' sphinxEvaluator processes the Sphinx language in the context of an XBRL DTS and instance. (c) Copyright 2013 Mark V Systems Limited, California US, All rights reserved. Mark V copyright applies to this software, which is licensed according to the terms of Arelle(r). Sphinx is a Rules Language for XBRL described...
import datetime import ujson from django.http import HttpResponse from mock import patch from typing import Any, Dict, List, Text, Union, Mapping from zerver.lib.actions import ( do_change_is_admin, do_set_realm_property, do_deactivate_realm, do_deactivate_stream, ) from zerver.lib.send_email import...
#!/usr/bin/env python """Usage: ghdecoy.py [ARGS] CMD ARGS: -h|--help : display this help message -k : do not delete generated repository and upload script -n : just create the decoy repo but don't push it to github -s : push over ssh instead of https -v|--version : print v...
# 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 __future__ import absolute_import import ast import os import pytest from ..api_crawler import api_crawler, differ sample_class = """ class SampleClass: def __init__(self): pass """ sample_function = """ def sample_function(self): pass """ sample_code = """ class SampleClass: def __init__...
""" Support for VirtualBox using the VBoxManage command .. versionadded:: 2016.3.0 If the ``vboxdrv`` kernel module is not loaded, this module can automatically load it by configuring ``autoload_vboxdrv`` in ``/etc/salt/minion``: .. code-block:: yaml autoload_vboxdrv: True The default for this setting is ``Fal...
""" Tools for dealing with ROMS model output See Octant project as well Created on Fri Mar 08 15:09:46 2013 @author: mrayson """ import numpy as np from netCDF4 import Dataset, MFDataset, num2date from datetime import datetime, timedelta import matplotlib.pyplot as plt from scipy import interpolate # Private module...
"""Main structure class for MathML formatting.""" import sys, contextmakers, measurers, generators from xml import sax from nodelocator import NodeLocator def isHighSurrogate(ch): """Tests whether a Unicode character is from the high surrogates range""" code = ord(ch) return (0xD800 <= code and code <= ...
# 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 # distributed under the...
""" Support for Cover devices. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/cover/ """ import asyncio from datetime import timedelta import functools as ft import logging import os import voluptuous as vol from homeassistant.config import load_yaml_c...
# 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 ...
""" Unit tests for the parser. """ import unittest class TestParser(unittest.TestCase): def setUp(self): self._parser_module = None def getParserModule(self): if self._parser_module is None: from bigrig import parser self._parser_module = parser return self._par...
#---------------------------------------------------------------------- # Copyright (c) 2011-2016 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
# 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...
# This file is part of the ISIS IBEX application. # Copyright (C) 2012-2016 Science & Technology Facilities Council. # All rights reserved. # # This program is distributed in the hope that it will be useful. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License...
import hashlib import binascii import random import time from Crypto.Cipher import AES from Crypto.Util import Counter rng = random.SystemRandom() def init_key_generation(keylengthbits): if keylengthbits < 8: keylengthbits = 8 elif keylengthbits % 8 != 0: keylengthbits += ( 8 - keylengt...
# -*- coding: utf-8 -*- '''Kaushik Tandon July 21 2018 - August 13 2018 This program scrapes Wikipedia articles related to Artificial Intelligence. The goal is to build a knowledge graph of topics related to AI and categorize them using The Brane's Knowledge Classification System of tags. This program succ...
# Copyright 2022 The Brax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the Partially Signed Transaction RPCs. """ import os import json from decimal import Decimal from test...
# Copyright (c) 2013 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 agreed to in writi...
# 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 ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
"""Tree structure and hierarchical divisive algorithm for spectral clustering Used in the paper: @article{Gaidon2014, author = {Gaidon, Adrien and Harchaoui, Zaid and Schmid, Cordelia}, title = {{Activity representation with motion hierarchies}}, journal = {IJCV}, year = {2014} } LICENSE: BSD Copyrights: Adrien Gai...
# Copyright 2015 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 requi...
import yacron.job import yacron.config import asyncio import pytest import aiosmtplib from unittest.mock import Mock, patch import tempfile import os @pytest.mark.parametrize( "save_limit, input_lines, output, expected_failure", [ ( 10, b"line1\nline2\nline3\nline4\n", ...
# -*- coding: utf-8 -*- import yaml import json import functools import operator import requests from flask import Blueprint, request, g, jsonify from rowboat.redis import rdb from rowboat.util.decos import authed from rowboat.models.guild import Guild, GuildConfigChange, GuildEmoji from rowboat.models.user import Us...
# # script.py # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # """Scripts Functionality to build scripts, as well as SignatureHash(). Script evaluation is in bitcoin.core.scripteval """ from __future__ import absolute_im...
##!/bin/env python '''farm.py - process data stream on cluster =========================================== Purpose ------- This script reads data from stdin and splits it into independent chunks to be executed on a cluster. Usage ----- As a basic, but not very useful example, the following command will take the in...
from math import log import numpy as np def aggregate_sum(input_thing, classes, universal_set): if type(input_thing) == list: return sum(input_thing) elif type(input_thing) == dict: output = {} for key in input_thing: output[key] = sum(input_thing[key]) return outpu...
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import logging from datetime import datetime, timedelta from sqlalchemy import Table, Column, Integer, Float, String, Unicode, Boolean, DateTime from sqlalchemy.schema import F...
# Copyright The PyTorch Lightning 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 agreed to i...
#!/usr/bin/python3 # # Copyright (C) 2009 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 copyright notice, # this list o...
#!/usr/bin/env python 'An interactive fiction system offering control over the narrative discourse.' __author__ = 'Nick Montfort' __copyright__ = 'Copyright 2011 Nick Montfort' __license__ = 'ISC' __version__ = '0.5.0.0' __status__ = 'Development' import sys import os import time import optparse import clarifier imp...
from DistributedMinigameAI import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM from direct.fsm import State from direct.actor import Actor import DivingGameGlobals import random import random import types class DistributedDivingGameAI(Dist...
from pandac.PandaModules import * from toontown.toonbase.ToontownGlobals import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * import random from otp.level import DistributedLevel from direct.directnotify import DirectNotifyGlobal import CountryClubRoomBase, CountryClubRoom i...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distr...
# -*- coding: utf-8 -*- from datetime import datetime import magento import logging import xmlrpclib import socket from trytond.pool import PoolMeta, Pool from trytond.transaction import Transaction from trytond.pyson import Eval from trytond.model import ModelView, ModelSQL, fields from .api import OrderConfig __met...
#!/usr/bin/env python """Helper functionality for gui testing.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import atexit import binascii import functools import logging import os import threading import time from absl import flags from future.built...
""" Dummy client runner This module implements a stand-alone launcher for stress-testing an Evennia game. It will launch any number of fake clients. These clients will log into the server and start doing random operations. Customizing and weighing these operations differently depends on which type of game is tested. T...
######## # Copyright (c) 2016 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...
""" Copyright 2015 Basho Technologies, Inc. This file is provided to you 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...
# -*- coding: utf-8 -*- import sys __all__ = ["ConflictLogBase", "ConflictLogXlsx", "ConflictLogExcel"] HAVE_EXCEL_API = False HAVE_XLSX_WRITER = False if sys.platform == "win32": try: from win32com.client import gencache from win32com.client import DispatchWithEvents HAVE_E...
""" Basic uniform mesh refinement functions. """ from __future__ import absolute_import import numpy as nm from sfepy.discrete.fem import Mesh from six.moves import range def refine_2_3(mesh_in): """ Refines mesh out of triangles by cutting cutting each edge in half and making 4 new finer triangles out of...
# Copyright 2013: Mirantis 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 b...
# 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 itertools from operator import attrgetter from telemetry.web_perf.metrics import rendering_frame # These are LatencyInfo component names indicating ...
# 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, ...
# Time-stamp: <2009-05-08 11:38:09 Tao Liu> """Module to read the motif scan data file which is in binary format. Copyright (c) 2007 Tao Liu <taoliu@jimmy.harvard.edu> This code is free software; you can redistribute it and/or modify it under the terms of the BSD License (see the file COPYING included with the distr...
# 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...
# -*- coding: utf-8 -*- """ checkout ~~~~~~~~~~~~ Python wrapper for the Checkout Finland API. Copyright (c) 2014 by Tuomas Blomqvist. Copyright (c) 2013 by Janne Vanhala. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permit...
import asyncio from collections import namedtuple import contextlib import os import subprocess import tempfile import textwrap import yaml from .async import create_subprocess_with_handle from . import cache from . import compat from .compat import makedirs from .error import PrintableError DEFAULT_PARALLEL_FETCH_L...
# 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 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...