gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- from django.db import models from south.db import db class Migration: def forwards(self, orm): # Adding model 'PayPalIPN' db.create_table('paypal_ipn', ( ('id', models.AutoField(primary_key=True)), ('business', models.CharField(max_length=127, blank=...
# Copyright 2021 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 la...
# 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 import sub...
# 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 Massachusetts Open Cloud # # 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...
# 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 ...
import re, inspect, textwrap, pydoc import sphinx from docscrape import NumpyDocString, FunctionDoc, ClassDoc class SphinxDocString(NumpyDocString): def __init__(self, docstring, config={}): self.use_plots = config.get('use_plots', False) NumpyDocString.__init__(self, docstring, config=config) ...
import numpy as np import os try: import netCDF4 as netCDF except: import netCDF3 as netCDF import matplotlib.pyplot as plt import time from datetime import datetime from matplotlib.dates import date2num, num2date import pyroms import pyroms_toolbox import _remapping class nctime(object): pass def remap_uv(s...
# -*- coding: utf-8 -*- # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
from __future__ import division, print_function, absolute_import from os.path import join, dirname import numpy as np from numpy.testing import assert_array_almost_equal, assert_equal import pytest from pytest import raises as assert_raises from scipy.fftpack.realtransforms import ( dct, idct, dst, idst, dctn, i...
import csv, cgi import json import dxr.plugins import dxr.schema import os, sys import re, urllib from dxr.languages import language_schema PLUGIN_NAME = 'clang' __all__ = dxr.plugins.indexer_exports() def pre_process(tree, env): # Setup environment variables for inspecting clang as runtime # We'll store...
from sympy import (pi, sin, cos, Symbol, Integral, Sum, sqrt, log, exp, Ne, oo, LambertW, I, meijerg, exp_polar, Max, Piecewise, And, real_root) from sympy.plotting import (plot, plot_parametric, plot3d_parametric_line, plot3d, plot3d_parametric_surface)...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import struct import gzip import itertools from pkg_resources import resource_filename, resource_exists try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen try: from cStringIO import StringIO except ImportError: ...
INV_URL = "https://inventory.mozilla.org/en-US/" import pdb import re INFO = 0 WARNING = 1 ERROR = 2 DEBUG = 3 BUILD = 4 def log(msg, level=0): """ 0 - Info 1 - Warning 2 - Error 3 - Debug 4 - Build """ do_info = True do_warning = True do_error = True do_debug = True do...
from __future__ import division, print_function, absolute_import import warnings import numpy as np from numpy import array from numpy.testing import (assert_array_almost_equal, assert_array_equal, run_module_suite, assert_raises, assert_allclose) from scipy import signal window_funcs = [ ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 vArmour Networks 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.apa...
import numpy as np import pytest import pandas.util._test_decorators as td from pandas import ( DataFrame, Series, date_range, ) import pandas._testing as tm def test_centered_axis_validation(): # ok Series(np.ones(10)).rolling(window=3, center=True, axis=0).mean() # bad axis msg = "No...
# -*- coding: utf-8 -*- """ Created on Thu Jun 23 10:45:10 2016 @author: Mathias Aschwanden (mathias.aschwanden@gmail.com) """ import unittest from unittest import TestCase import os import math import sys import copy import numpy as np import datetime from matplotlib import pyplot as plt if not os.path.abspath(...
#!/usr/bin/env python # Copyright (c) 2017 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. """Script that uploads the specified Skia Gerrit change to Android. This script does the following: * Downloads the repo tool. * I...
import copy from typing import List import dataproperty import typepy from mbstrdecoder import MultiByteStrDecoder from ...error import EmptyTableDataError from ...style import ReStructuredTextStyler, StylerInterface from .._table_writer import AbstractTableWriter from ._text_writer import IndentationTextTableWriter ...
from direct.gui.DirectGui import * from panda3d.core import * from panda3d.direct import * from panda3d.core import * from panda3d.direct import * from direct.interval.IntervalGlobal import * from toontown.toonbase.ToontownGlobals import * from toontown.toonbase import ToontownTimer from direct.distributed import Distr...
#!/usr/bin/env python from __future__ import print_function class FreelanCFGserver(object): """""" def __init__(self): self.defaults = { 'enabled': False, 'listen_on': '0.0.0.0:443', 'protocol': 'https', 'server_cer...
""" Fenced Code Extension for Python Markdown ========================================= This extension adds Fenced Code Blocks to Python-Markdown. >>> import markdown >>> text = ''' ... A paragraph before a fenced code block: ... ... ~~~ ... Fenced code block ... ~~~ ... ''' >>> ht...
import unittest from copy import deepcopy from mock import Mock import random from cellardoor.model import Model, Entity, Link, InverseLink, Text, ListOf, Integer, Float, Enum from cellardoor.api import API from cellardoor.api.methods import ALL, LIST, GET, CREATE from cellardoor.storage import Storage from cellardoor ...
#--------------------------------------------------------------------------- # Copyright 2013 The Open Source Electronic Health Record Agent # # 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 # ...
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
# Copyright 2015 IBM Corp. # # 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 t...
"""Support for the Amazon Polly text to speech service.""" import logging import voluptuous as vol from homeassistant.components.tts import PLATFORM_SCHEMA, Provider import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name__) CONF_REGION = "region_name" CONF_ACCESS_KEY_ID = "aws_acces...
#!/usr/bin/env python import os, sys, traceback import getpass from threading import Thread from subprocess import * if(sys.hexversion < 0x03000000): import Queue else: import queue as Queue # svmtrain and gnuplot executable is_win32 = (sys.platform == 'win32') if not is_win32: svmtrain_exe = "../svm-tr...
# Copyright 2014 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 ...
# # Copyright (c) 2013-2016 Quarkslab. # This file is part of IRMA project. # # 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 in the top-level directory # of this distribution and at: # # http:...
#################################### IMPORTS ################################### if __name__ == '__main__': import sys import os pkg_dir = os.path.split(os.path.abspath(__file__))[0] parent_dir, pkg_name = os.path.split(pkg_dir) is_pygame_pkg = (pkg_name == 'tests' and os.path....
from decimal import Decimal from datetime import date from django.test import ( TestCase, TransactionTestCase, skipUnlessDBFeature, ) from django.utils.html import strip_tags import tablib from import_export import resources from import_export import fields from import_export import w...
"""Objects representing Flow entities, like boards, topics, and posts.""" # # (C) Pywikibot team, 2015-2022 # # Distributed under the terms of the MIT license. # import abc import datetime import logging from typing import Any, Type, Union from urllib.parse import parse_qs, urlparse import pywikibot from pywikibot.bac...
# Copyright 2016 Huawei Technologies India Pvt. 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 # #...
from __future__ import division import numpy as np import scipy.sparse as sp from sklearn.base import clone from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_eq...
"""The tests for Climate device conditions.""" import pytest import voluptuous_serialize import homeassistant.components.automation as automation from homeassistant.components.climate import DOMAIN, const, device_condition from homeassistant.helpers import config_validation as cv, device_registry from homeassistant.se...
""" Python Character Mapping Codec iso8859_11 generated from 'MAPPINGS/ISO8859/8859-11.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
# Copyright 2011 Justin Santa Barbara # # 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...
import re from functools import reduce import sqlalchemy as sa from pyparsing import ParseException from sqlalchemy import event from sqlalchemy.dialects.postgresql.base import RESERVED_WORDS from sqlalchemy.schema import DDL from sqlalchemy_utils import TSVectorType from .parser import SearchQueryParser from .vector...
from __future__ import print_function, division import hashlib from copy import deepcopy import h5py import numpy as np from ..util.meshgrid import meshgrid_nd from ..util.functions import FreezableClass, is_numpy_array, monotonically_increasing, link_or_copy from astropy import log as logger from .grid_helpers impo...
# -*- test-case-name: twisted.application.runner.test.test_runner -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Twisted application runner. """ __all__ = [ "Runner", "RunnerOptions", ] from sys import stderr from signal import SIGTERM from os import getpid, kill from consta...
# -*-coding:utf-8 -* # Copyright (c) 2011-2015, Intel Corporation # 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, thi...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import collections import itertools import operator import types from .common import * # pylint: disable=redefined-builtin from .datastructures import Context from .exceptions import * from .undefined import Undefined from .util import ...
# Copyright 2014: 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...
"""HTTP wrapper for apitools. This library wraps the underlying http library we use, which is currently :mod:`httplib2`. """ import collections import contextlib import logging import socket import time import httplib2 import six from six.moves import http_client from six.moves.urllib import parse from gcloud.strea...
# 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 (c), 2016-2021, 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@...
import json import logging import os import shutil import sys import time import urllib2 import warnings # Dropping a table inexplicably produces a warning despite # the 'IF EXISTS' clause. Squelch these warnings. warnings.simplefilter('ignore') import MySQLdb import environment import utils from mysql_flavor import ...
from wq.build import wq import click import os import json import logging from wq.build.commands.collect import readfiles @wq.command() @wq.pass_config def optimize(config): """ (DEPRECATED) Use r.js to optimize JS and CSS. This command requires an "optimize" section in your configuration file, which wil...
# Copyright 2014 Netflix, 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...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from __future__ import division from builtins import map from builtins import zip from builtins import range import ROOT from collections import defaultdict from operator import itemgetter from PyAnalysisTools.base import InvalidInputError, _logger from PyAnalysisTools.PlottingUtils import Formatting as fm from PyAnaly...
#!/usr/bin/env python """ analyze.py Analyze web access logs from generated by Confluence. Reference: https://confluence.atlassian.com/display/CONFKB/How+to+Enable+User+Access+Logging Conversion Pattern used in Log4j is explained here: http://www.tutorialspoint.com/log4j/log4j_patternlayout.htm Here is configuration...
""" Python job scheduling for humans. An in-process scheduler for periodic jobs that uses the builder pattern for configuration. Schedule lets you run Python functions (or any other callable) periodically at pre-determined intervals using a simple, human-friendly syntax. Inspired by Addam Wiggins' article "Rethinking...
#!/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 l...
#! /usr/bin/python # -*- coding: utf-8 -*- import numpy as np import tensorflow as tf import tensorlayer as tl from tensorlayer.layers import Dense, Dropout, Input from tensorlayer.layers.core import Layer from tensorlayer.models import Model __all__ = ['Seq2seqLuongAttention'] class Encoder(Layer): def __ini...
# -*- coding: utf-8 -*- # Copyright 2022 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...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Base classes representing defects. """ import logging import numpy as np from abc import ABCMeta, abstractmethod from monty.json import MSONable, MontyDecoder from functools import lru_cache from pymatg...
import json import logging import threading from urllib.parse import urljoin, urlparse from http.server import SimpleHTTPRequestHandler, HTTPServer import ray.cloudpickle as cloudpickle from ray.tune import TuneError from ray.tune.suggest import BasicVariantGenerator from ray._private.utils import binary_to_hex, hex_...
import os import base64 from datetime import datetime from xos.config import Config from xos.logger import Logger, logging from synchronizers.base.steps import * from django.db.models import F, Q from django.utils import timezone from core.models import * from django.db import reset_queries import json import time imp...
# This file is part of the ISIS IBEX application. # Copyright (C) 2017 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 v1.0...
# PYTHON_ARGCOMPLETE_OK """cli. Desc: Command-line tool for listing Python packages installed by setuptools, package metadata, package dependencies, and querying The Cheese Shop (PyPI) for Python package release information such as which installed packages have updates available. Author: Rob Cakebr...
# Copyright 2013 dotCloud 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 t...
# 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 ...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Copyright (c) 2014-2019 The DigiByte Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet backup features. Test case is: ...
# ============================================================================== # Copyright 2019 - Philip Paquette # # NOTICE: 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 rest...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Fabrice Laporte. # # 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 ...
import os import re import sys import traceback import pygmi from pygmi.util import prop from pygmi import monitor, client, curry, call, program_list, _ __all__ = ('keys', 'events', 'Match') class Match(object): """ A class used for matching events based on simple patterns. """ def __init__(self, *ar...
#!/usr/bin/python # # Copyright 2013 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...
import numpy as np import scipy as sp from scipy.fft import fft from scipy.fftpack import fftshift class Operation(object): def __init__(): self.name = "Empty Operation" class LeftShift(Operation): def __init__(self, shiftPoints): self.name = "Left Shift" self.shiftPoints = shiftPo...
import numpy import six from chainer import cuda from chainer import function from chainer.utils import type_check def _mat_ptrs(a): """Creates an array of pointers to matrices Args: a: A batch of matrices on GPU Returns: GPU array of pointers to matrices """ if a.shape[0] == 1: ...
# Copyright 2014 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.apache.org/licenses/LICENSE-2.0 # # Unless r...
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
# Licensed under a 3-clause BSD style license - see PYFITS.rst """ Convenience functions ===================== The functions in this module provide shortcuts for some of the most basic operations on FITS files, such as reading and updating the header. They are included directly in the 'astropy.io.fits' namespace so ...
"""The test for the data filter sensor platform.""" from datetime import timedelta import unittest from unittest.mock import patch from homeassistant.components.filter.sensor import ( LowPassFilter, OutlierFilter, ThrottleFilter, TimeSMAFilter, RangeFilter, TimeThrottleFilter) import homeassistant.util.dt as d...
# -*- coding: utf-8 -*- """ Contains class that orchestrates processing """ import re import json from os import listdir, stat, rename from os.path import join, expanduser, isfile from collections import OrderedDict import tracktotrip as tt from tracktotrip.utils import pairwise, estimate_meters_to_deg from tracktotrip...
import json import logging from testfixtures import LogCapture from twisted.internet import defer from twisted.trial.unittest import TestCase from scrapy.http import Request from scrapy.crawler import CrawlerRunner from scrapy.utils.python import to_unicode from tests.spiders import FollowAllSpider, DelaySpider, Simp...
#!/usr/bin/env python # # Use the raw transactions API to spend bitcoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a bitcoind or Bit...
from hearthbreaker.cards.base import MinionCard from hearthbreaker.cards.heroes import Jaraxxus from hearthbreaker.cards.weapons.warlock import BloodFury from hearthbreaker.constants import CHARACTER_CLASS, CARD_RARITY, MINION_TYPE from hearthbreaker.game_objects import Minion from hearthbreaker.tags.action import Summ...
import sys import petsc4py petsc4py.init(sys.argv) # from scipy.io import savemat, loadmat # from src.ref_solution import * # import warnings # from memory_profiler import profile # from time import time import pickle from src.myio import * # from src.objComposite import * from src.StokesFlowMethod import * from src....
#!/usr/bin/env python # Copyright 2015 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 logging import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common')) import models import pres...
# -*- coding: utf-8 -*- """Random agreement Fuzzy Pattern Classifier method. The module structure is the following: - The "RandomAgreementFuzzyPatternClassifier" implements the model learning using the [1] algorithm. References: [1] Davidsen, 2014. """ import logging import numpy as np import scipy.stats as stats ...
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, print_function, division, absolute_import) import asyncore import asynchat import socket class Request(object): def __init__(self, command, *args): self.command = command self.args = args @property ...
# -*- coding: utf-8 -*- """ sphinx.ext.graphviz ~~~~~~~~~~~~~~~~~~~ Allow graphviz-formatted graphs to be included in Sphinx-generated documents inline. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import codecs import ...
# 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...
# Copyright 2014 PerfKitBenchmarker 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 appli...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 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 cop...
# Authors: # Trevor Perrin # Dave Baggett (Arcode Corporation) - cleanup handling of constants # Yngve Pettersen (ported by Paul Sokolovsky) - TLS 1.2 # # See the LICENSE file for legal information regarding use of this file. """Class for setting handshake parameters.""" from .constants import CertificateType ...
#!/usr/bin/env python """ Copyright (c) 2021 Alex Forencich 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, merg...
# 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 unittest from mock import patch from quickbooks.exceptions import QuickbooksException, SevereException from quickbooks import client from quickbooks.objects.salesreceipt import SalesReceipt class ClientTest(unittest.TestCase): def setUp(self): """ Use a consistent set of defaults. ...
# coding=utf-8 # Copyright 2019 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 ...
#----------- ArgoJob Transitions --------------- import multiprocessing,sys,logging logger = logging.getLogger(__name__) from django.db import utils,connections,DEFAULT_DB_ALIAS,models from django.core.exceptions import ObjectDoesNotExist from django.conf import settings from django.core.validators import validate_...
#!/usr/bin/python ''' This script generates a WebSocket frame in the form of a C array declaration that can be pasted directly into a C source file. Example output: byte data0[] = { 0x81, 0x84, 0x4b, 0xfc, 0xec, 0x7b, 0x2a, 0x9e, 0x8f, 0x71 }; Usage: makewsmessage.py [options] Options: -h, --help ...
# 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...
"""The WaveBlocks Project This file contains the class for representing the simplex basis shape which is a special type of sparse basis set. @author: R. Bourquin @copyright: Copyright (C) 2015 R. Bourquin @license: Modified BSD License """ from numpy import eye, vstack, integer from WaveBlocksND.BasisShape import B...
#!/usr/bin/env python # -*- coding: utf-8 # Copyright 2017-2019 The FIAAS 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 # # Unle...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import os import random import unittest import warnings from pathlib import Path import pytest # type: ignore import numpy as np from monty.os.path import which from pymatgen.core.composition import Composit...