gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2016 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...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
""" ====================================================================== Repeated measures ANOVA on source data with spatio-temporal clustering ====================================================================== This example illustrates how to make use of the clustering functions for arbitrary, self-defined contr...
import time import threading from timeit import default_timer as timer import lazylights import colorsys try: import Tkinter as tk import Queue as queue except ImportError: import tkinter as tk import queue as queue LIFX_CONNECT = True global top global LAST_UPDATE MIN_REFRESH_INTERVAL = 0.5 LAST_UPDATE...
# 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 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
# Copyright 2013 Google Inc. All Rights Reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. """A simple, direct connection to the vtgate proxy server, using gRPC. """ import logging import re from urlparse import urlparse from vtdb import prefer_vtroot_impo...
# 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. '''A gatherer for the TotalRecall brand of HTML templates with replaceable portions. We wanted to reuse extern.tclib.api.handlers.html.TCHTMLParser but ...
# Copyright 2014 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , import os import subprocess import tempfile import logging import hgapi import errno # fsutils, , misc filesystem utils, internal import fsutils git_logger = logging.getLogg...
import ini import var import irc from tools import is_identified, is_number from tools import trim, nsfw_check # Action strings lists. add_strings = [ "-a", "-add", "--add", "-s", "-set", "--set" ] del_strings = [ "-rm", "-remove", "--remove", "-del", "-delete", "--delete" ] rep_strings = [ "-re", ...
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
#!/usr/bin/env python """Test of "New Hunt" wizard.""" from grr.gui import runtests_test from grr.lib import access_control from grr.lib import aff4 from grr.lib import data_store from grr.lib import flags from grr.lib import output_plugin from grr.lib import test_lib from grr.lib.flows.general import processes fro...
r"""Functions for exclusive $B\to P\ell^+\ell^-$ decays.""" import flavio from math import sqrt,pi from flavio.physics.bdecays.common import lambda_K, beta_l, meson_quark, meson_ff from flavio.physics import ckm from flavio.classes import AuxiliaryQuantity from flavio.config import config from flavio.physics.running i...
import locale from dialog import Dialog locale.setlocale(locale.LC_ALL, '') import sys, os import glob import re import subprocess from time import sleep import shutil import configparser import logging import logging.handlers from .interface import * from .mount import * from .wimlib import wiminfo logger = loggi...
# # Copyright (C) 2017 Dominik Murzynowski # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. # from unittest.mock import patch from pycnic.errors import HTTP_400, HTTP_404 from api.entity_type import EntityTypeHandler from api.meta_attribute imp...
# 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 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
# Copyright (c) 2008-2009 Aryeh Leib Taurog, http://www.aryehleib.com # All rights reserved. # # Modified from original contribution by Aryeh Leib Taurog, which was # released under the New BSD license. import unittest from django.contrib.gis.geos.mutable_list import ListMixin class UserListA(ListMixin): _mytyp...
import logging from pathlib import Path from io import StringIO from traitlets.config import Config from traitlets.config.manager import BaseJSONConfigManager from traitlets.traitlets import Bool, Unicode, List, Dict, Tuple, default from nbconvert.nbconvertapp import NbConvertApp from nbconvert.exporters import export...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import itertools import re from recipe_engine import recipe_api class GitApi(recipe_api.RecipeApi): _GIT_HASH_RE = re.compile('[0-9a-f]{40}', re.IGNORECA...
from sympy import (Symbol, Rational, Order, exp, ln, log, nan, oo, O, pi, I, S, Integral, sin, cos, sqrt, conjugate, expand, transpose, symbols, Function, Add) from sympy.utilities.pytest import raises from sympy.abc import w, x, y, z def test_caching_bug(): #needs to be a first test, so that all caches a...
# Copyright (C) 2018 and later: Unicode, Inc. and others. # License & terms of use: http://www.unicode.org/copyright.html # Python 2/3 Compatibility (ICU-20299) # TODO(ICU-20301): Remove this. from __future__ import print_function from . import * from .. import * from .. import utils from ..request_types import * de...
class CodeConstructor: """Contains lists of variables and expressions to be written as code. `CodeConstructor` objects contain: 1) An ordered list of atoms for the code to use 2) A PNCollection of PNSymbol objects 3) A PNCollection of expressions to be calculated Once the `CodeConstructo...
from abc import ABCMeta from abonapp.models import Abon from accounts_app.models import UserProfile from django.conf import settings from django.shortcuts import resolve_url from django.test import TestCase, override_settings from group_app.models import Group from gw_app.models import NASModel from gw_app.nas_manager...
# Lint as: python3 # Copyright 2020 Google LLC. 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 ...
#!/usr/bin/python import sys, struct, codecs sys.stdout = codecs.getwriter('utf-8')(sys.stdout) STRING_TABLE = 0x6F80 # FaithX STRING_TABLE = 0x10b60 # Original #STRING_TABLE = 0x108e0 + 12 # No idea STRING_TABLE = 0x10b30 # Mine? storage_map = {} FORMS = [ ("Exit", 0xC600), #('Exit', 0xc640), #('Bo...
# Schema definitions for RNA browser database. # @author Matthew Norris <matthew.norris@jic.ac.uk from sqlalchemy import Column, Integer, String, Text, Enum, Float, ForeignKey, ForeignKeyConstraint from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from flask_sqlalchemy import SQLAlchemy from flask_migrate im...
# coding=utf-8 # # Copyright 2014 Red Hat, Inc. # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # ...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'GroupMeta' db.create_table( 'sentry_groupmeta', ( ( ...
###################################################################### # CliNER - documents.py # # # # Willie Boag wboag@cs.uml.edu # # ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """An extensible ASCII table reader and writer. ui.py: Provides the main user functions for reading and writing tables. :Copyright: Smithsonian Astrophysical Observatory (2010) :Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu) """ import re impor...
import os import re from runpy import run_path import sys import warnings import click try: from pygments import highlight from pygments.lexers import PythonLexer from pygments.formatters import TerminalFormatter PYGMENTS = True except: PYGMENTS = False from toolz import valfilter, concatv from zi...
# 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...
from __future__ import absolute_import, print_function, division import os import urwid import urwid.util import six import netlib from mitmproxy import utils from mitmproxy.console import signals from mitmproxy.flow import export from netlib import human try: import pyperclip except: pyperclip = False VI...
# 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...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
from sympy import Symbol, Wild, sin, cos, exp, sqrt, pi, Function, Derivative,\ abc, Integer, Eq, symbols, Add, I, Real, log, Rational, Lambda, atan2 def test_subs(): n3=Rational(3) n2=Rational(2) n6=Rational(6) x=Symbol("x") c=Symbol("c") e=x e=e.subs(x,n3) assert e == Rational...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Section.version_parent_pk' db.add_column('repchantest_section', 'version_parent_pk', ...
import urllib.request import urllib.parse import xml.dom.minidom def test_latest(name, **query): revision = get_revision(name) output = get_output(name, revision, query) return output def get_output(name, revision, query): string = run_utility('xml', name, revision, query) middle = string.split('<...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2014 PressLabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# -*- coding: utf-8 -*- """ sphinx.writers.manpage ~~~~~~~~~~~~~~~~~~~~~~ Manual page writer, extended for Sphinx custom nodes. :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from docutils import nodes try: from docutils.writers.ma...
"""Support for Australian BOM (Bureau of Meteorology) weather service.""" import datetime import ftplib import gzip import io import json import logging import os import re import zipfile import requests import voluptuous as vol import homeassistant.helpers.config_validation as cv import homeassistant.util.dt as dt_u...
# -*- coding: utf-8 -*- ''' Module to provide MS SQL Server compatibility to salt. :depends: - FreeTDS - pymssql Python module :configuration: In order to connect to MS SQL Server, certain configuration is required in minion configs/pillars on the relevant minions. Some sample pillars might look...
# 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 logging import os import shutil from hashlib import sha256 class FileStore: """ A file based implementation of a key value store. """ def __init__(self, dbDir, dbName, isLineNoKey: bool=False, storeContentHash: bool=True, ...
"""Debug Plugin for EasyEngine""" from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from ee.core.shellexec import * from ee.core.mysql import EEMysql from ee.core.services import EEService from ee.core.logging import Log from ee.cli.plugins.site_functions import logw...
# Copyright (c) 2001, Stanford University # All rights reserved. # # See the file LICENSE.txt for information on redistributing this software. import sys sys.path.append( '../packer' ) sys.path.append( '../glapi_parser' ) from pack_currenttypes import * import apiutil apiutil.CopyrightC() print ''' #include "state/...
#!/usr/bin/python # # Copyright (C) 2012, 2013 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 l...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
"""Support for interface with a Gree climate systems.""" from __future__ import annotations import logging from greeclimate.device import ( TEMP_MAX, TEMP_MAX_F, TEMP_MIN, TEMP_MIN_F, FanSpeed, HorizontalSwing, Mode, TemperatureUnits, VerticalSwing, ) from homeassistant.components...
"""Let's Encrypt main entry point.""" from __future__ import print_function import atexit import functools import logging.handlers import os import sys import time import traceback import zope.component from acme import jose import letsencrypt from letsencrypt import account from letsencrypt import client from lets...
# -*- coding: utf-8 -*- from subprocess import Popen, PIPE from os.path import join, isfile from re import search, DOTALL from tests.functional_tests import isolate, run_tuttle_file, tuttle_invalidate from tuttle.invalidation import BROTHER_INVALID class TestCommands: @isolate(['A']) def test_command_invali...
'''Tokens and tokenization Created on 24 august 2012 @author: F. Peschanski ''' from copy import deepcopy from collections import defaultdict from popparser.llparser import ParsePosition class Token: def __init__(self, token_type, value, start_pos, end_pos): self.token_type = token_type self.v...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
# 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
# -*- coding: utf-8 -*- from __future__ import print_function import boto3 import botocore from builtins import input import click import prettytable import sys # All ebs image, not instance-store. All latest ubuntu 12.04, but version not # specified. Maybe need to get from amazon images = { 'ap-southeast-1': {'u...
# 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 os import unittest from telemetry import decorators from telemetry.internal.platform.tracing_agent import ( chrome_devtools_tracing_backend) from...
from JumpScale import j from JumpScale.servers.serverbase import returnCodes from JumpScale.core.errorhandling.JSExceptions import BaseJSException import inspect import time class Session: def __init__(self, ddict): self.__dict__ = ddict if not hasattr(self, 'nid'): self.nid = None ...
# 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 (c) 2009, Joseph Lisee # 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 conditions an...
from __future__ import print_function, division, absolute_import import sys # unittest only added in 3.4 self.subTest() if sys.version_info[0] < 3 or sys.version_info[1] < 4: import unittest2 as unittest else: import unittest # unittest.mock is not available in 2.7 (though unittest2 might contain it?) try: ...
#!/usr/bin/env python ''' Oryol texture export functions ''' import sys import os import platform import subprocess import tempfile ProjectDirectory = os.path.dirname(os.path.abspath(__file__)) + '/..' TexSrcDirectory = ProjectDirectory + '/data' TexDstDirectory = ProjectDirectory + '/build/webpage' # NOTE: PVRTexToo...
import math import json import scoresheetsHtml import pickle import csv ################################################################################ # Printing Instructions def printIntro(): ''' Prints program name and instructions for the user ''' print('CubeToaster - Heat Generator') print('...
"""Config flow to configure homekit_controller.""" import os import json import logging import voluptuous as vol from homeassistant import config_entries from homeassistant.core import callback from .const import DOMAIN, KNOWN_DEVICES from .connection import get_bridge_information, get_accessory_name HOMEKIT_IGNOR...
import pickle from collections import Counter import shutil import tempfile import copy import numpy as np import os import sys import time import unittest from unittest.mock import patch import ray from ray.rllib import _register_all from ray import tune from ray.tune import (DurableTrainable, Trainable, TuneError, ...
###################################################################### # # File: bstat.py # # Copyright 2013 Brian Beach, All Rights Reserved. # ###################################################################### import itertools import math import scipy.special import scipy.stats import unittest def percentile...
#!/usr/bin/python # Copyright (c) 2009 Las Cumbres Observatory (www.lcogt.net) # # 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 #...
# -*- coding: utf-8 -*- ''' Support for Opkg .. important:: If you feel that Salt should be using this module to manage packages on a minion, and it is using a different module (or gives an error similar to *'pkg.install' is not available*), see :ref:`here <module-provider-override>`. .. versionadded:...
from __future__ import unicode_literals import hashlib import json import time import warnings from django import forms from django.conf import settings from django.contrib import messages from django.contrib.auth import ( authenticate, get_backends, login as django_login, logout as django_logout, ) f...
# Copyright (c) 2015 Mellanox 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 # # U...
# Copyright 2017-2018 Capital One Services, 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 ...
import textwrap from collections import defaultdict from .annotation import Measure try: keys = dict.viewkeys except Exception: # Py3k keys = dict.keys MEASURES = { # Mention evaluation measures 'strong_mention_match': Measure(['span']), 'strong_typed_mention_match': Measure(['span'...
# -*- coding: utf-8 -*- import os import time import socket import tempfile import pytz from requests import codes from datetime import datetime from django.test import TestCase from mailme.exceptions import FeedCriticalError, TimeoutError, FeedNotFoundError from mailme.services.feed import FeedService from mailme.mod...
# -*- encoding: utf-8 -*- # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. ''' Inherit stock for endicia API ''' from decimal import Decimal, ROUND_UP import base64 import math import logging from endicia import ShippingLab...
# 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...
import csv from datetime import datetime class usageBlob(object): """ A collection of usage data from findr_reduce. """ def __init__(self): self.ids = [] self.commands = [] self.starts = [] self.ends = [] self.exit_statuses = [] self.cpu_times = [] ...
from .bits import Bits from ..ast.base import Base, _make_name class BV(Bits): # TODO: do these go on Bits or BV? def chop(self, bits=1): ''' Chops an AST into ASTs of size 'bits'. Obviously, the length of the AST must be a multiple of bits. ''' s = len(self) if...
""" Provide authentication using local files .. versionadded:: 2018.3.0 The `file` auth module allows simple authentication via local files. Different filetypes are supported, including: 1. Text files, with passwords in plaintext or hashed 2. Apache-style htpasswd files 3. Apache-style htdigest files .. note:...
from bitcoin.main import hash_to_int, fast_multiply, inv, ecdsa_raw_recover from bitcoin.main import G, N, decode_privkey, get_privkey_format, privtopub from bitcoin.main import encode_pubkey, ecdsa_raw_verify from os import urandom from hashlib import sha256 from binascii import hexlify, unhexlify from sha3 import kec...
#! /usr/bin/python # -*- coding: UTF-8 -*- # Copyright 2011-2017 Olivier Renault, Luiko Czub, TestLink-API-Python-client developers # # 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) 2011 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 of conditions and the ...
# -*- coding: UTF-8 -*- import wx from directActions import * from classActions import * from time import localtime from caid.field import field from global_vars import strtoArray from scripture import scripture from PythonEditor import Editor as PythonEditor class Preferences(): def __init__(self, wk): se...
# 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 req...
import os import pickle import random import sys from random import shuffle import numpy as np from Global import get_word_vect from RAE_adam_herical import rae_trainning_normal from utility1 import get_words_id, get_parents, get_dep, pdep_2_deporder_dep, dep_2_hid_var, save2pickle, get_weight_matrices, init_weight, ...
import os import struct import tracer import random import logging from itertools import groupby import binascii import claripy import angr from angr.state_plugins.trace_additions import ChallRespInfo, ZenPlugin from angr.state_plugins.preconstrainer import SimStatePreconstrainer from angr.state_plugins.posix import ...
from django.db import models from django.db.models.signals import post_save, post_delete from django.dispatch import receiver from django.urls import reverse from corehq.apps.accounting.models import BillingAccount, Subscription from corehq.apps.sso import certificates from corehq.apps.sso.exceptions import ServicePro...
"""Module to help with parsing and generating configuration files.""" import asyncio from collections import OrderedDict import logging import os import re import shutil import sys # pylint: disable=unused-import from typing import Any, List, Tuple # NOQA import voluptuous as vol from voluptuous.humanize import human...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 OpenStack Foundation # Copyright 2012 Nebula, Inc. # Copyright (c) 2012 X.commerce, a business unit of eBay Inc. # # Licensed under the Apach...
""" sentry.interfaces.http ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import __all__ = ('Http',) from django.conf import settings from django.utils.translation import ugettext as ...
# Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, 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 (c) 2012-2017 The ANTLR Project. All rights reserved. # Use of this file is governed by the BSD 3-clause license that # can be found in the LICENSE.txt file in the project root. # from io import StringIO from antlr4.Token import Token from antlr4.CommonTokenStream import CommonTokenStream class TokenS...
# mako/runtime.py # Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """provides runtime services for templates, including Context, Namespace, and various helper funct...
import datetime import webbrowser from operator import itemgetter from PySide.QtCore import QRect, QSize, Qt, Signal, Slot from PySide.QtGui import * from .Searching import SortingEnum from ._paths import * DEFAULT_DATE = '19800101' MAX_DESCRIPTION_LEN = 400 THUMB_SIZE = 200 class VideoItem(QFrame): def __init...
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
import collections import itertools from typing import Iterable, List, NamedTuple, Optional, Tuple from data import max_heap from data.alphabets import morse from puzzle.problems import problem from puzzle.steps import generate_solutions _IGNORE_DELIMITER = 'ignored' _CHARACTER_DELIMITER = 'character delimiter' _WORD...
#!/usr/bin/python # -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (c) 2015 Tintri, 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 withou...
# Copyright (C) 2002-2007 Python Software Foundation # Contact: email-sig@python.org """Email address parsing code. Lifted directly from rfc822.py. This should eventually be rewritten. """ __all__ = [ 'mktime_tz', 'parsedate', 'parsedate_tz', 'quote', ] import time SPACE = ' ' EMPTYSTRING = ''...
# -*- coding: utf-8 -*- """Test GUI component.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ #from contextlib import contextmanager from pytest import yield_fixture, fixture import numpy as...
""" report test results in JUnit-XML format, for use with Hudson and build integration servers. Based on initial code from Ross Lawley. """ import py import os import re import sys import time # Python 2.X and 3.X compatibility if sys.version_info[0] < 3: from codecs import open else: unichr = chr unicode...