gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from __future__ import unicode_literals import os import re from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.geos import HAS_GEOS from django.test import TestCase, skipUnlessDBFeature from django.utils._os import upath if HAS_GEOS: from django.contrib.gis.db.mo...
import os from nose.tools import * class TempDir(object): 'temporary directory that is automatically deleted when object is released' def __init__(self): import tempfile self.path = tempfile.mkdtemp() def __str__(self): return self.path def __del__(self): 'recursively d...
#!/usr/bin/env python2 # Copyright (c) 2007-2014 Heikki Hokkanen <hoxu@users.sf.net> & others (see doc/AUTHOR) # GPLv2 / GPLv3 import datetime import getopt import glob import os import pickle import platform import re import shutil import subprocess import sys import time import zlib if sys.version_info < (2, 6): ...
from __future__ import unicode_literals from io import BytesIO from django.test import TestCase from mock import patch from dbbackup.db.exceptions import DumpError from dbbackup.db.postgresql import ( PgDumpBinaryConnector, PgDumpConnector, PgDumpGisConnector, ) @patch('dbbackup.db.postgresql.PgDumpCon...
#!/usr/bin/env python """ Unittests for wtforms.ext.appengine To run the tests, use NoseGAE: easy_install nose easy_install nose-gae nosetests --with-gae --without-sandbox """ import sys, os WTFORMS_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) sys.path.insert(0, WTFORMS_DIR) from unitt...
import re from dataclasses import dataclass from enum import Enum from textwrap import dedent from typing import Any, Dict, List, Optional, Type from pytest import mark, param, raises import tests from omegaconf import ( DictConfig, FloatNode, IntegerNode, ListConfig, OmegaConf, ReadonlyConfig...
from collections import OrderedDict from enum import Enum from types import MappingProxyType from .common import * acoach_value = 10000 apothecary_value = 50000 cheerleader_value = 10000 deck = Enum('deck', ( ('Miscellaneous Mayhem', 'Miscellaneous Mayhem'), ('MM', 'Miscellaneous Mayhem'), ('Specia...
#!/usr/bin/python3 # Creates DNS zone files for all of the domains of all of the mail users # and mail aliases and restarts nsd. ######################################################################## import os, os.path, urllib.parse, datetime, re, hashlib, base64 import ipaddress import rtyaml import dns.resolver ...
from __future__ import annotations import itertools import random import struct from abc import ABCMeta from math import cos, sin from pathlib import Path from typing import List, Optional, Union from PIL import Image import elma.packing from elma.constants import VERSION_ELMA from elma.render import LevelRenderer fr...
# coding: utf-8 from __future__ import unicode_literals, print_function from copy import deepcopy import oar.kao.scheduling from oar.lib import config from oar.lib.interval import (intersec, itvs_size, extract_n_scattered_block_itv, aggregate_itvs, ordered_ids2itvs) import pickle import o...
# 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...
"""My purpose in life is to harvest the WEPP env (erosion output) files The arguments to call me require the SCENARIO to be provided, but you can also do any of the following: # See usage python env2database.py -h """ import os import re import argparse import datetime from multiprocessing import Pool import ...
services = { "tcpmux": 1, "echo": 7, "discard": 9, "systat": 11, "daytime": 13, "netstat": 15, "qotd": 17, "msp": 18, "chargen": 19, "ftp-data": 20, "ftp": 21, "ssh": 22, "telnet": 23, "smtp": 25, "time": 37, "nameserver": 42, "whois": 43, "tacacs": 49, "re-mail-ck": 50, "domain": 53, "mtp": 57, "tacacs-ds": 65, "bootp...
from django import forms from model_utils import Choices from xyberville.apps.users.models import User from xyberville.apps.keluarga.models import Keluarga from xyberville.apps.profiles.models import Profile from xyberville.apps.pekerjaan.models import Pekerjaan from xyberville.core.utils import (generate_random_string...
#!/usr/bin/env python ''' script for filtering insertions vs. the human reference GRCh37/hg19 ''' ''' may be useful as a template for extension to other species ''' import pysam import sys import os import logging import argparse import align import numpy as np import subprocess from uuid import uuid4 ver...
from __future__ import absolute_import, division, print_function from collections import OrderedDict from enum import Enum import yaml import json from attr._make import fields try: from functools import singledispatch except ImportError: from singledispatch import singledispatch @singledispatch def to_di...
import pytest, py, os from _pytest.core import PluginManager from _pytest.core import MultiCall, HookRelay, varnames class TestBootstrapping: def test_consider_env_fails_to_import(self, monkeypatch): pluginmanager = PluginManager() monkeypatch.setenv('PYTEST_PLUGINS', 'nonexisting', prepend=",") ...
""" 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 collections import OrderedDict as dict import pandas as pd import numpy as np __all__ = ['CatalogueGroup', 'Catalogue'] class CatalogueGroup(object): """ CatalogueGroup class. This is basically a dictionary used by Catalogue class. The idea is to be able to store different types of ...
"""distutils.dir_util Utility functions for manipulating directories and directory trees.""" import os, sys import errno from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log # cache for by mkpath() -- in addition to cheapening redundant calls, # eliminates redundant "crea...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # name: website.py # author: Harold Bradley III # email: harold@bradleystudio.net # date: 11/11/2015 # # pylint: disable=line-too-long """ ww.website ~~~~~~~~~~ A class to manage websites """ from __future__ import...
# -*- coding: utf-8 -*- import inspect import functools import marshmallow as ma from marshmallow import validate, fields from sqlalchemy.dialects import postgresql, mysql, mssql import sqlalchemy as sa from .exceptions import ModelConversionError from .fields import Related def _is_field(value): return ( ...
"""Phonopy loader.""" # Copyright (C) 2018 Atsushi Togo # All rights reserved. # # This file is part of phonopy. # # 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 abo...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to manage the GIFT launchpad PPA and l2tbinaries.""" import argparse import csv import gzip import io import json import logging import os import platform import re import sys import zlib from xml.etree import ElementTree from l2tdevtools import projects from l...
# 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 2018 SAS Project Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
#!/usr/bin/python # Copyright (c) 2014 Quanta Research Cambridge, Inc # # 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, ...
"""Tokenization help for Python programs. tokenize(readline) is a generator that breaks a stream of bytes into Python tokens. It decodes the bytes according to PEP-0263 for determining source file encoding. It accepts a readline-like method which is called repeatedly to get the next line of input (or b"" for EOF). ...
## # Copyright (c) 2008-2017 Apple 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 l...
#!/usr/bin/env python2 # coding: utf-8 import thread import time import unittest from pykit import cacheable class TestLRU(unittest.TestCase): def _assert_lru_list(self, lru): size = lru.size item_head = lru.head item_tail = lru.tail for i in range(size): item_head ...
# Copyright 2021 The Oppia 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 applicable ...
''' Dts_Mesh.py Copyright (c) 2003 - 2007 James Urquhart(j_urquhart@btinternet.com) 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...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os import sys from collections import OrderedDict import numpy as np from .base import IORegistryError, _UnifiedIORegistryBase __all__ = ['UnifiedIORegistry', 'UnifiedInputRegistry', 'UnifiedOutputRegistry'] PATH_TYPES = (str, os.PathLike) # ...
# -*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding("utf-8") import rdflib from rdflib.namespace import RDF, FOAF, RDFS, OWL, DC, DCTERMS, SKOS from rdflib import URIRef, Literal, Namespace, XSD import json from mu.lib_unicode import UnicodeReader, UnicodeWriter from mu.lib_dbpedia import DbpediaApi ...
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749.parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains methods related to `Section 4`_ of the OAuth 2 RFC. .. _`Section 4`: https://tools.ietf.org/html/rfc6749#section-4 """ from __future__ import absolute_import, unicode_literals import json import os ...
# Copyright 2015-2022 The Matrix.org Foundation C.I.C. # # 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...
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals __license__ = 'Public Domain' import codecs import io import os import random import sys from .options import ( parseOpts, ) from .compat import ( compat_getpass, compat_shlex_split, workaround_optparse_bug9161, ) from .u...
#!/usr/bin/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 required b...
""" Interpolation methods. Originally, the base code for `interpolate`, `mix` and `steps` was ported from the https://colorjs.io project. Since that time, there has been significant modifications that add additional features etc. The base logic though is attributed to the original authors. In general, the logic mimic...
# -*- coding: utf-8 -*- from __future__ import with_statement import json import datetime from cms import api from cms.utils.urlutils import admin_reverse from djangocms_text_ckeditor.cms_plugins import TextPlugin from djangocms_text_ckeditor.models import Text from django.contrib import admin from django.contrib.admi...
"""The kraken integration.""" from __future__ import annotations import logging from homeassistant.components.sensor import SensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import device_registry from homeassistant.help...
#!/usr/bin/env python # # NED Policy Manager (a.k.a the online workflow manager) # # Dependencies: pip install json2xml dicttoxml termcolor # # Example usage: ./online_workflow_manager.py child child 195.235.93.146 130.192.1.102 testCoop import os import json import base64 import inspect import requests import dictto...
#!/usr/bin/env python """ Copyright 2010-2019 University Of Southern California Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appli...
# -*- 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 License, Version 2.0 (the #...
#Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. #Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. # #THE BSD LICENSE # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions #are met: # ...
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import re import pytest from indico.modules.events.abstracts.models.abstracts import Abstract, AbstractS...
from __future__ import absolute_import from collections import defaultdict import functools import itertools import logging import os from pip._vendor import pkg_resources from pip._vendor import requests from pip.download import (url_to_path, unpack_url) from pip.exceptions import (InstallationError, BestVersionAlr...
# -*- coding: utf-8 -*- """ flaskbb.user.models ~~~~~~~~~~~~~~~~~~~~ This module provides the models for the user. :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ from datetime import datetime from itsdangerous import TimedJSONWebSignatureSerializer as S...
from unittest import mock import pytest from opentrons import types from opentrons import hardware_control as hc from opentrons.config import robot_configs from opentrons.hardware_control.types import ( Axis, CriticalPoint, OutOfBoundsMove, MotionChecks) from opentrons.hardware_control.robot_calibration import ( ...
# Copyright 2015 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 # # https://aws.amazon.com/apache2.0/ # # or in the "license" file accomp...
# 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...
from ctrl_config import * import time def stop_actuator(actuators,stop_action): for actuator in actuators: actuator.stop(stop_action=stop_action) #moving motors A,D ## TURNING ############################################### def turn_18deg_step(actuator1,actuator2,speed_sp=SPEED_TURN,time_sp=TIME_TURN): ...
# 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...
""" A TiddlyWeb plugin for providing unauthed access to private resources using "unguessable" URIs. A URI at a uuid provides an id for a mapping to another URI, internal to the tiddlyweb server, with the active user being "faked". This works out okay because: * only GET is supported * there's no state that gets carri...
import os from os.path import join as pjoin import sys from distutils.sysconfig import get_config_var from numscons.core.utils import flatten from numscons.core.misc import get_numscons_toolpaths, get_pythonlib_name, \ is_f77_gnu, get_vs_version, built_with_mstools, \ isfortran, isf2py, scons_get_paths, buil...
"""RoboMaker component for creating a simulation job.""" # 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 ...
# # 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...
# -*- coding: utf-8 -*- """ Bridge to the pandas library. :copyright: Copyright 2014-2016 by the Elephant team, see `doc/authors.rst`. :license: Modified BSD, see LICENSE.txt for details. """ from __future__ import division, print_function, unicode_literals import numpy as np import pandas as pd import warnings impo...
from logging import getLogger from django.utils.translation import ugettext_lazy as _ from api.status import HTTP_201_CREATED from api.api_views import APIView from api.utils.db import get_object from api.utils.views import call_api_view from api.decorators import catch_api_exception from api.exceptions import Expect...
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2015 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 r...
"""Collections contain content documents and blueprints.""" from . import documents from . import messages from grow.common import structures from grow.common import utils from grow.pods import locales import json import operator import os _all = '__no-locale' class Error(Exception): pass class CollectionNotEmp...
import datetime import logging import os from typing import List, Optional from PyQt5 import QtWidgets, QtGui from .script import ScriptUI from .wizard.sequencewizard import SequenceWizard from .scripting_ui import Ui_Form from ...utils.filebrowsers import getOpenFile, getSaveFile from ....core2.instrument.components...
# # Copyright 2015 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 or agreed to in writing...
from __future__ import absolute_import import six from django.core.urlresolvers import reverse from sentry.models import Environment, Rule, RuleStatus from sentry.testutils import APITestCase class ProjectRuleDetailsTest(APITestCase): def test_simple(self): self.login_as(user=self.user) team =...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2011 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...
# Copyright 2008-2010 Neil Martinsen-Burrell # # 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, publ...
"""IEM Tracker Related Stuff.""" import datetime import smtplib from email.mime.text import MIMEText try: from zoneinfo import ZoneInfo except ImportError: from backports.zoneinfo import ZoneInfo from pyiem.util import get_dbconn class TrackerEngine: """A processing engine of tracking offline/online eve...
############################################################################## # Copyright 2016-2018 Rigetti Computing # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
from matplotlib.colors import ListedColormap from numpy import nan, inf # Used to reconstruct the colormap in pycam02ucs.cm.viscm parameters = {'xp': [16.121891585344997, 33.901145962549492, 5.5873058066040926, -14.703203914141397, -17.875928056390336, -5.3288735306278738], 'yp': [-2.5423728813559308, -...
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
import boto3 import json import os import shutil from botocore.stub import Stubber, ANY from datetime import date from django.conf import settings from django.core import management from django.test.testcases import TransactionTestCase from django.test.utils import override_settings from unittest import mock from o...
# # cbpro/order_book.py # David Caseria # # Live order book updated from the Coinbase Websocket Feed from sortedcontainers import SortedDict from decimal import Decimal import pickle from cbpro.public_client import PublicClient from cbpro.websocket_client import WebsocketClient class OrderBook(WebsocketClient): ...
from evennia import Command as BaseCommand from evennia import utils from evennia.commands.default.muxcommand import MuxCommand from world import rules from world import english_utils import time class Command(BaseCommand): """ Inherit from this if you want to create your own command styles from scratch. ...
import itertools from typing import List, Optional, Union import numpy as np import pandas._libs.algos as libalgos import pandas._libs.reshape as libreshape from pandas._libs.sparse import IntIndex from pandas.util._decorators import cache_readonly from pandas.core.dtypes.cast import maybe_promote from pandas.core.d...
#!/usr/bin/python -B __author__ = "Daniel Ralston" __copyright__ = "2012, Daniel Ralston" __version__ = "0.1.0" import hashlib import os import pickle import shutil import string import subprocess import sys # for platform from helpers import (get_called_script_dir, get_config_path, read_config,...
# Copyright (c) 2012 Intel Corporation. # 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 re...
# # Copyright (c), 2016-2020, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/licenses/MIT. # # @author Davide Brunato <brunato@...
""" This is a collection of classes for a general optimization problem. The Scorer function should be minimized by changing the input parameters that are inside the trial point class instance. The user can define different search algorithms that are suitable for the particular problem. Also there are set of solver sto...
""" Automatically package and test a Python project against configurable Python2 and Python3 based virtual environments. Environments are setup by using virtualenv. Configuration is generally done through an INI-style "tox.ini" file. """ from __future__ import print_function import os import re import shutil import su...
''' synbiochem (c) University of Manchester 2015 synbiochem is licensed under the MIT License. To view a copy of this license, visit <http://opensource.org/licenses/MIT/>. @author: neilswainston ''' # pylint: disable=broad-except # pylint: disable=invalid-name # pylint: disable=no-member # pylint: disable=protected...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class ShortCodeTestCase(Integra...
# This file is part of Scapy # Scapy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # any later version. # # Scapy is distributed in the hope that it will be useful, # but ...
import numpy as np import pytest import pandas as pd import pandas.util.testing as tm # ------------------------------------------------------------------ # Helper Functions def id_func(x): if isinstance(x, tuple): assert len(x) == 2 return x[0].__name__ + "-" + str(x[1]) else: retur...
# Copyright 2012 Tsutomu Uchino # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# -*- coding: utf-8 -*- # Copyright (C) 2014 Yahoo! 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...
# 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
from .helper import key_for_cypher, value_for_cypher from .elements import (EqualClauseElement, NotEqualClauseElement, SubsetClauseElement, NotSubsetClauseElement, NullClauseElement, NotNullClauseElement, InClauseElement, NotInClauseElement, GtClauseElement, GteClauseElemen...
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.config import ConfigValidationError from txircd.module_interface import Command, ICommand, IModuleData, ModuleData from zope.interface import implementer from typing import Any, Dict, List, Optional, Tuple irc.ERR_NOSUCHXINFO = "772...
# Test that parameters are preserved when written out and read in again from __future__ import print_function, division from itertools import product from numpy.testing import assert_equal from astropy.tests.helper import pytest from .. import OutputConf, RunConf, ImageConf, BinnedImageConf, PeeledImageConf from .....
import unittest from Vintageous.ex.parser.nodes import RangeNode from Vintageous.ex.parser.nodes import CommandLineNode from Vintageous.ex.parser.tokens import TokenDot from Vintageous.ex.parser.tokens import TokenDigits from Vintageous.ex.parser.tokens import TokenSearchForward from Vintageous.ex.parser.tokens import...
# -*- coding: utf-8 -*- """ F test for null hypothesis that coefficients in several regressions are the same * implemented by creating groupdummies*exog and testing appropriate contrast matrices * similar to test for structural change in all variables at predefined break points * allows only one group variable * cur...
#!/usr/bin/env python """ Copyright 2014 The Trustees of Princeton University 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 Unl...
# coding=utf-8 # Copyright 2022 The Uncertainty Baselines 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 ap...
from datetime import datetime from enum import Enum from uuid import UUID from flask import request # This is somewhat :( # # So we've already batched the database fetches for a bunch of sqlalchemy # objects together. These objects probably have joins/joinedloads, though, # which may also need to do data fetches (and/...
# -*- coding: utf-8 -*- ''' Wrap libsodium routines ''' # pylint: disable=C0103 # Import libnacl libs from libnacl.version import __version__ # Import python libs import ctypes import sys import os __SONAMES = (18, 17, 13, 10, 5, 4) def _get_nacl(): ''' Locate the nacl c libs to use ''' # Import libs...
# 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. from __future__ import print_function import fnmatch import imp import logging import os import sys import zipfile from telemetry.internal.util import comm...
# 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 ...
from __future__ import division def sublists_for_phys(slice_regressor_list, in_files): # no need to assume a sorted list slice_regressor_list.sort() nr_phys_regressors_per_file = len(slice_regressor_list) / len(in_files) slice_regressor_lists = [] if round(nr_phys_regressors_per_file) == nr_phys_re...