repo_name
stringlengths
5
104
path
stringlengths
4
248
content
stringlengths
102
99.9k
bob123bob/Sick-Beard
sickbeard/show_name_helpers.py
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 3 of the Lice...
eduNEXT/edx-platform
common/djangoapps/course_modes/migrations/0005_auto_20151217_0958.py
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course_modes', '0004_auto_20151113_1457'), ] operations = [ migrations.SeparateDatabaseAndState( database_operations=[], state_operations=[ migra...
ThomasMiconi/nupic.research
projects/sequence_prediction/discrete_sequences/plotPerturbExperiment.py
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
ProfessionalIT/professionalit-webiste
sdk/google_appengine/google/appengine/ext/mapreduce/model.py
#!/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...
rg3/youtube-dl
youtube_dl/extractor/toggle.py
# coding: utf-8 from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..utils import ( determine_ext, ExtractorError, float_or_none, int_or_none, parse_iso8601, strip_or_none, ) class ToggleIE(InfoExtractor): IE_NAME = 'toggle' _VALID_UR...
w1ll1am23/home-assistant
tests/components/smart_meter_texas/test_config_flow.py
"""Test the Smart Meter Texas config flow.""" import asyncio from unittest.mock import patch from aiohttp import ClientError import pytest from smart_meter_texas.exceptions import ( SmartMeterTexasAPIError, SmartMeterTexasAuthError, ) from homeassistant import config_entries, setup from homeassistant.componen...
pshchelo/heat
heat/tests/aws/test_instance_network.py
# # 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 # ...
MartinHjelmare/home-assistant
homeassistant/components/deconz/gateway.py
"""Representation of a deCONZ gateway.""" import asyncio import async_timeout from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.const import CONF_EVENT, CONF_HOST, CONF_ID from homeassistant.core import EventOrigin, callback from homeassistant.helpers import aiohttp_client from homeassistant....
prasannav7/ggrc-core
src/ggrc_workflows/migrations/versions/20140722203407_4b3316aa1acf_move_existing_workflows_to_new_contexts.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com """Move existing Workflows to new contexts Revision ID: 4b3316aa1acf Revises: ...
prasannav7/ggrc-core
src/ggrc/migrations/versions/20131113030336_3df9e3188977_remove_control_type_.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com """Remove Control.type, add Control assessors Revision ID: 3df9e3188977 Revise...
Canpio/Paddle
python/paddle/fluid/tests/unittests/test_array_read_write_op.py
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
frreiss/tensorflow-fred
tensorflow/python/eager/benchmarks/resnet50/resnet50_test.py
# 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...
leppa/home-assistant
homeassistant/components/statsd/__init__.py
"""Support for sending data to StatsD.""" import logging import statsd import voluptuous as vol from homeassistant.const import CONF_HOST, CONF_PORT, CONF_PREFIX, EVENT_STATE_CHANGED from homeassistant.helpers import state as state_helper import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogg...
mick-d/nipype
nipype/interfaces/spm/tests/test_auto_ApplyTransform.py
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..utils import ApplyTransform def test_ApplyTransform_inputs(): input_map = dict(ignore_exception=dict(nohash=True, usedefault=True, ), in_file=dict(copyfile=True, mandatory=True, ), mat=dict...
daj0ker/BinPy
BinPy/examples/source/ic/Series_7400/IC7440.py
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=2> # Usage of IC 7400 # <codecell> from __future__ import print_function from BinPy import * # <codecell> # Usage of IC 7440: ic = IC_7440() print(ic.__doc__) # <codecell> # The Pin configuration is: inp = {1: 1, 2: 0, 4: 0, 5: 0, 7: 0, ...
tshadley/examples
word_language_model_bptt_hsm/model.py
import torch.nn as nn from torch.autograd import Variable class RNNModel(nn.Module): """Container module with an encoder, a recurrent module, and a decoder.""" def __init__(self, rnn_type, ntoken, ninp, nhid, nlayers, dropout=0.5, tie_weights=False): super(RNNModel, self).__init__() self.drop ...
ramcn/demo3
venv/lib/python3.4/site-packages/compressor/tests/test_storages.py
from __future__ import with_statement, unicode_literals import errno import os from django.core.files.base import ContentFile from django.core.files.storage import get_storage_class from django.test import TestCase from django.utils.functional import LazyObject from compressor import storage from compressor.conf impo...
JeremyRubin/bitcoin
test/functional/p2p_leak.py
#!/usr/bin/env python3 # Copyright (c) 2017-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test message sending before handshake completion. Before receiving a VERACK, a node should not send an...
yesudeep/tisshrmlr
app/jinja2/tests/test_debug.py
# -*- coding: utf-8 -*- """ Test debug interface ~~~~~~~~~~~~~~~~~~~~ Tests the traceback rewriter. :copyright: (c) 2009 by the Jinja Team. :license: BSD. """ from jinja2 import Environment from test_loaders import filesystem_loader env = Environment(loader=filesystem_loader) def test_runtime_e...
LLNL/spack
var/spack/repos/builtin/packages/examl/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Examl(MakefilePackage): """ Exascale Maximum Likelihood (ExaML) code for phylogenetic ...
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGL/EGL/KHR/stream_producer_eglsurface.py
'''OpenGL extension KHR.stream_producer_eglsurface This module customises the behaviour of the OpenGL.raw.EGL.KHR.stream_producer_eglsurface to provide a more Python-friendly API The official definition of this extension is available here: http://www.opengl.org/registry/specs/KHR/stream_producer_eglsurface.txt ''' ...
luoyetx/mxnet
example/image-classification/common/fit.py
# 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...
tensorflow/tensorflow
tensorflow/python/client/timeline.py
# 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...
lukecwik/incubator-beam
sdks/python/apache_beam/runners/portability/spark_java_job_server_test.py
# # 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...
staslev/incubator-beam
sdks/python/apache_beam/metrics/metric_test.py
# # 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...
rhdedgar/openshift-tools
openshift_tools/monitoring/ocutil.py
#!/usr/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 """ Interface to OpenShift oc command """ # # Copyright 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 ...
h2oai/h2o-3
h2o-py/tests/testdir_utils/pyunit_typechecks.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- """Pyunit for h2o.utils.typechecks.""" from __future__ import absolute_import, division, print_function import math from h2o import H2OFrame from h2o.exceptions import H2OTypeError, H2OValueError from h2o.utils.typechecks import (U, I, NOT, Tuple, Dict, numeric, h2ofram...
hanlind/nova
nova/policies/security_groups.py
# Copyright 2016 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...
nadeemsyed/swift
test/unit/common/test_splice.py
# Copyright (c) 2014 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 or agreed to ...
orvi2014/kitsune
kitsune/wiki/tests/test_parser.py
import re from django.conf import settings from nose.tools import eq_ from pyquery import PyQuery as pq import kitsune.sumo.tests.test_parser from kitsune.gallery.models import Video from kitsune.gallery.tests import image, video from kitsune.sumo.tests import TestCase from kitsune.wiki.models import Document from k...
rs2/pandas
pandas/tests/reshape/concat/test_sort.py
import pandas as pd from pandas import DataFrame import pandas._testing as tm class TestConcatSort: def test_concat_sorts_columns(self, sort): # GH-4588 df1 = DataFrame({"a": [1, 2], "b": [1, 2]}, columns=["b", "a"]) df2 = DataFrame({"a": [3, 4], "c": [5, 6]}) # for sort=True/None...
sdoran35/hate-to-hugs
venv/lib/python3.6/site-packages/nltk/sem/cooper_storage.py
# Natural Language Toolkit: Cooper storage for Quantifier Ambiguity # # Copyright (C) 2001-2017 NLTK Project # Author: Ewan Klein <ewan@inf.ed.ac.uk> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import print_function from nltk.sem.logic import LambdaExpression, ApplicationExpres...
pombredanne/dxr
dxr/plugins/rust/menu.py
import os from functools import partial from warnings import warn from dxr.utils import browse_file_url, search_url def quote(qualname): """ Wrap qualname in quotes if it contains spaces """ if ' ' in qualname: qualname = '"' + qualname + '"' return qualname def truncate_value(value, typ=""): ...
MiLk/mineos
pam.py
# (c) 2007 Chris AtLee <chris@atlee.ca> # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license.php """ PAM module for python Provides an authenticate function that will allow the caller to authenticate a user against the Pluggable Authentication Modules (PAM) on the system. Implemented usi...
DreamSourceLab/DSView
libsigrokdecode4DSL/decoders/lpc/__init__.py
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> ## ## This program 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 Li...
rddim/Notepad-plus-plus
scintilla/scripts/ScintillaData.py
#!/usr/bin/env python3 # ScintillaData.py - implemented 2013 by Neil Hodgson neilh@scintilla.org # Released to the public domain. # Common code used by Scintilla and SciTE for source file regeneration. # The ScintillaData object exposes information about Scintilla as properties: # Version properties # versi...
sonaht/ansible
lib/ansible/modules/network/ios/ios_logging.py
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # Ansible 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 3 of the Li...
jmesteve/saas3
openerp/addons/mrp/wizard/mrp_product_produce.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
romain-intel/bcc
examples/networking/simple_tc.py
#!/usr/bin/python # Copyright (c) PLUMgrid, Inc. # Licensed under the Apache License, Version 2.0 (the "License") from bcc import BPF from pyroute2 import IPRoute ipr = IPRoute() text = """ int hello(struct __sk_buff *skb) { return 1; } """ try: b = BPF(text=text, debug=0) fn = b.load_func("hello", BPF.SC...
abergmeier-dsfishlabs/bazel
tools/android/merge_manifests.py
# Copyright 2015 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
rackn/container-networking-ansible
test/common/library/ec2_vpc_facts.py
#!/usr/bin/python # # Retrieve information on an existing VPC. # # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.ec2 import * import boto.vpc def main(): argument_spec = ec2_argument_spec() argument_spec.update(dict( resource_tags=dict(type='dict', require...
ar4s/django
tests/forms_tests/widget_tests/test_timeinput.py
from datetime import time from django.forms import TimeInput from django.utils import translation from .base import WidgetTest class TimeInputTest(WidgetTest): widget = TimeInput() def test_render_none(self): self.check_html(self.widget, 'time', None, html='<input type="text" name="time">') de...
sarahn/ganeti
test/py/ganeti.utils.io_unittest.py
#!/usr/bin/python # # Copyright (C) 2006, 2007, 2010, 2011 Google Inc. # # This program 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 # (at your option) any later version...
golismero/golismero
tools/sqlmap/waf/knownsec.py
#!/usr/bin/env python """ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from lib.core.settings import WAF_ATTACK_VECTORS __product__ = "KS-WAF (Knownsec)" def detect(get_page): retval = False for vector in WAF_ATTACK_VECTORS:...
PabloCastellano/nodeshot
nodeshot/ui/default/tests/selenium.py
from __future__ import absolute_import from time import sleep from django.core.urlresolvers import reverse from django.test import TestCase from nodeshot.core.base.tests import user_fixtures from nodeshot.core.nodes.models import Node from nodeshot.ui.default import settings as local_settings from selenium import we...
FabianKnapp/nexmon
buildtools/b43/debug/libb43.py
""" # b43 debugging library # # Copyright (C) 2008-2010 Michael Buesch <m@bues.ch> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 # as published by the Free Software Foundation. # # This program is distributed in the hope t...
Architektor/PySnip
venv/lib/python2.7/site-packages/twisted/internet/test/test_posixbase.py
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet.posixbase} and supporting code. """ from __future__ import division, absolute_import from twisted.trial.unittest import TestCase from twisted.internet.defer import Deferred from twisted.internet.posixbase import ...
snnn/tensorflow
tensorflow/python/data/experimental/kernel_tests/serialization/dataset_serialization_test_base.py
# 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...
russellmayhew/satchmo
satchmo/apps/payment/modules/purchaseorder/forms.py
from django import forms from django.core.exceptions import ImproperlyConfigured from payment import signals from payment.forms import SimplePayShipForm from payment.modules.purchaseorder.models import PurchaseOrder from satchmo_utils import app_enabled from signals_ahoy import signals class PurchaseorderPayShipForm(S...
moio/spacewalk
rel-eng/koji-missing-builds.py
#!/usr/bin/python try: import koji except: import brew as koji import os import string import sys from optparse import OptionParser import ConfigParser config = ConfigParser.RawConfigParser() config.read(["tito.props", "rel-eng/tito.props"]) usage = "usage: %prog [options] <tag to check>" parser = OptionPars...
pam-bot/SMSBeds
lib/jinja/constants.py
# -*- coding: utf-8 -*- """ jinja.constants ~~~~~~~~~~~~~~~ Various constants. :copyright: 2007 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ #: list of lorem ipsum words used by the lipsum() helper function LOREM_IPSUM_WORDS = u'''\ a ac accumsan ad adipiscing aenean aliqu...
elainenaomi/sciwonc-dataflow-examples
dissertation2017/Experiment 2/instances/11_2_wikiflow_1sh_1s_annot/sessioncompute_3/SessionCompute_3.py
#!/usr/bin/env python from sciwonc.dataflow.DataStoreClient import DataStoreClient import ConfigDB_SessionCompute_3 import pprint # connector and config client = DataStoreClient("mongodb", ConfigDB_SessionCompute_3) config = ConfigDB_SessionCompute_3 # according to config dataList = client.getData() # return an array...
thomazs/geraldo
site/newsite/django_1_0/django/core/cache/backends/base.py
"Base Cache class." from django.core.exceptions import ImproperlyConfigured class InvalidCacheBackendError(ImproperlyConfigured): pass class BaseCache(object): def __init__(self, params): timeout = params.get('timeout', 300) try: timeout = int(timeout) except (ValueError, ...
szha/mxnet
python/mxnet/gluon/contrib/data/vision/transforms/bbox/utils.py
# 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...
Gilbert88/mesos
src/python/cli_new/lib/cli/util.py
# 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...
rebost/django
django/conf/project_template/project_name/settings.py
# Django settings for {{ project_name }} project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '',...
carolFrohlich/nipype
nipype/pipeline/plugins/ipython.py
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Parallel workflow execution via IPython controller """ from __future__ import print_function, division, unicode_literals, absolute_import from future import standard_library stan...
chromium/chromium
third_party/blink/tools/blinkpy/web_tests/controllers/manager_unittest.py
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of so...
amrdraz/brython
www/tests/test_dict.py
d = {1:'Z','y':88} assert d.__class__ == dict assert isinstance(d,dict) assert str(d)=="{1: 'Z', 'y': 88}" x = dict([['a',1],['r',2],['bg',3],['Z',4]]) y = dict(zip(['a','r','Z','bg'],[1,2,4,3])) z = {'bg':3,'Z':4,'a':1,'r':2} assert x==y assert x==z assert y==z assert x['a']==1 assert x.get('a')==1 assert x.get('uio...
ContinuumIO/odo
odo/backends/bcolz.py
from __future__ import absolute_import, division, print_function import os from bcolz import ctable, carray import numpy as np from toolz import keyfilter import datashape from datashape import discover import shutil from ..numpy_dtype import dshape_to_numpy from ..append import append from ..convert import convert, o...
Techcable/pygit2
test/test_treebuilder.py
# -*- coding: utf-8 -*- # # Copyright 2010-2014 The pygit2 contributors # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # In addition to the permissions in the GNU General Public Li...
jtyr/ansible-modules-core
cloud/openstack/os_object.py
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Copyright (c) 2013, Benno Joy <benno@ansible.com> # # This module 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 vers...
suyashphadtare/vestasi-erp-1
erpnext/erpnext/accounts/report/gross_profit/gross_profit.py
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt from erpnext.stock.utils import get_buying_amount, get_sales_bom_buying_amount def execute(filters=None):...
kevin-coder/tensorflow-fork
tensorflow/python/data/experimental/ops/indexed_dataset_ops.py
# 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...
ibc/MediaSoup
worker/deps/gyp/test/mac/gyptest-app-assets-catalog.py
#!/usr/bin/env python # Copyright (c) 2012 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. """ Verifies that app bundles are built correctly. """ from __future__ import print_function import TestGyp import TestMac import os impo...
aubreyrjones/libesp
scons_local/scons-local-2.3.0/SCons/Tool/intelc.py
"""SCons.Tool.icl Tool-specific initialization for the Intel C/C++ compiler. Supports Linux and Windows compilers, v7 and up. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 200...
dannyperry571/theapprentice
script.module.pydevd/lib/interpreterInfo.py
''' This module was created to get information available in the interpreter, such as libraries, paths, etc. what is what: sys.builtin_module_names: contains the builtin modules embeeded in python (rigth now, we specify all manually). sys.prefix: A string giving the site-specific directory prefix where the platform ind...
adityacs/ansible
lib/ansible/modules/network/nxos/nxos_vtp_password.py
#!/usr/bin/python # # This file is part of Ansible # # Ansible 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 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
archatas/whoosh
whoosh/store.py
#=============================================================================== # Copyright 2007 Matt Chaput # # 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/li...
noroutine/ansible
lib/ansible/modules/network/cumulus/_cl_bond.py
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_versio...
stgraber/snapcraft
snapcraft/internal/states/__init__.py
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
XiaosongWei/chromium-crosswalk
tools/telemetry/telemetry/internal/results/story_run_unittest.py
# 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 unittest from telemetry.internal.results import story_run from telemetry.story import shared_state from telemetry.story import story_set from telemet...
akohlmey/lammps
lib/mesont/Install.py
#!/usr/bin/env python """ Install.py tool to do a generic build of a library soft linked to by many of the lib/Install.py files used to automate the steps described in the corresponding lib/README """ from __future__ import print_function import sys, os, subprocess from argparse import ArgumentParser sys.path.append...
ashang/calibre
src/calibre/web/feeds/recipes/model.py
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import copy, zipfile from PyQt5.Qt import QAbstractItemModel, Qt, QColor, QFont, QI...
ashang/calibre
src/calibre/ebooks/oeb/polish/tests/parsing.py
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' from functools import partial from lxml import etree from html5lib.constant...
gelab/mainr
tests/test_pooling.py
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
AsgerPetersen/QGIS
tests/src/python/qgscompositionchecker.py
# -*- coding: utf-8 -*- ''' qgscompositionchecker.py - check rendering of Qgscomposition against an expected image -------------------------------------- Date : 31 Juli 2012 Copyright : (C) 2012 by Dr. Horst Düster / Dr. Marco Hugentobler email : horst.duester@sourcepole...
ahmedaljazzar/edx-platform
openedx/core/djangoapps/zendesk_proxy/tests/test_utils.py
import ddt from django.test.utils import override_settings from mock import MagicMock, patch from openedx.core.djangoapps.zendesk_proxy.utils import create_zendesk_ticket from openedx.core.lib.api.test_utils import ApiTestCase @ddt.ddt @override_settings( ZENDESK_URL="https://www.superrealurlsthataredefinitelyno...
BehavioralInsightsTeam/edx-platform
openedx/features/enterprise_support/tests/test_signals.py
"""Tests of email marketing signal handlers.""" import logging import ddt from django.test import TestCase from mock import patch from student.tests.factories import UserFactory from openedx.features.enterprise_support.tests.factories import EnterpriseCustomerFactory, EnterpriseCustomerUserFactory log = logging.getLo...
nirmeshk/oh-mainline
mysite/profile/migrations/0097_auto__chg_field_unsubscribetoken_modified_date__del_field_citation_dis.py
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'UnsubscribeToken.modified_date' db.alter_column(u'prof...
vbannai/neutron
neutron/db/migration/alembic_migrations/versions/24c7ea5160d7_cisco_csr_vpnaas.py
# Copyright 2014 Cisco Systems, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
jmacmahon/invenio
modules/bibformat/lib/elements/bfe_year.py
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2007, 2008, 2009, 2010, 2011 CERN. # # Invenio 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 (a...
jkramarz/zuombot
cloudbot/event.py
import asyncio import enum import logging import concurrent.futures logger = logging.getLogger("cloudbot") @enum.unique class EventType(enum.Enum): message = 0 action = 1 # TODO: Do we actually want to have a 'notice' event type? Should the NOTICE command be a 'message' type? notice = 2 join = 3 ...
MediaSapiens/autonormix
django/forms/formsets.py
from forms import Form from django.core.exceptions import ValidationError from django.utils.encoding import StrAndUnicode from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from fields import IntegerField, BooleanField from widgets import Media, HiddenInput from util import...
Lilykos/invenio
invenio/testsuite/test_utils_pagination.py
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013 CERN. # # Invenio 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 (at your option) any later...
sechacking/MITMf
core/banners.py
# -*- coding: utf-8 -*- # Copyright (c) 2014-2016 Marcello Salvati # # This program 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 3 of the # License, or (at your option) any later version. # ...
elkingtonmcb/nupic
src/regions/PictureSensorExplorers/center.py
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
waseem18/oh-mainline
vendor/packages/twisted/twisted/internet/test/test_time.py
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for implementations of L{IReactorTime}. """ __metaclass__ = type from twisted.internet.test.reactormixins import ReactorBuilder class TimeTestsBuilder(ReactorBuilder): """ Builder for defining tests relating to L{IReactorTime...
noroutine/ansible
lib/ansible/modules/cloud/amazon/s3_lifecycle.py
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterf...
almarklein/flexx
examples/ui/box_performance.py
""" An example that defines two apps, one with a single hbox and one with hboxes in vboxes in hboxes. For performance testing """ import time import flexx from flexx import ui class MyApp1(ui.App): def init(self): with ui.VBox() as self.l1: ui.Button(text='Box A', flex=0) ...
mbayon/TFG-MachineLearning
venv/lib/python3.6/site-packages/sklearn/isotonic.py
# Authors: Fabian Pedregosa <fabian@fseoane.net> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Nelle Varoquaux <nelle.varoquaux@gmail.com> # License: BSD 3 clause import numpy as np from scipy import interpolate from scipy.stats import spearmanr from .base import BaseEstimator, TransformerMixi...
Jgarcia-IAS/Fidelizacion_odoo
openerp/addons/auth_ldap/users_ldap.py
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
js0701/chromium-crosswalk
tools/telemetry/telemetry/internal/actions/load_media.py
# 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. from telemetry.core import exceptions from telemetry.internal.actions import media_action from telemetry.internal.actions import page_action class LoadMedi...
webostin/django-btc
tests/update_only_fields/tests.py
from __future__ import unicode_literals from django.db.models.signals import pre_save, post_save from django.test import TestCase from .models import Person, Employee, ProxyEmployee, Profile, Account class UpdateOnlyFieldsTests(TestCase): def test_update_fields_basic(self): s = Person.objects.create(nam...
courtarro/gnuradio
gr-utils/python/modtool/gr-newmod/docs/doxygen/swig_doc.py
# # Copyright 2010-2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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 3, or (at your option) # any later version...
grevutiu-gabriel/sympy
sympy/printing/tests/test_str.py
from __future__ import division from sympy import (Abs, Catalan, cos, Derivative, E, EulerGamma, exp, factorial, factorial2, Function, GoldenRatio, I, Integer, Integral, Interval, Lambda, Limit, Matrix, nan, O, oo, pi, Rational, Float, Rel, S, sin, SparseMatrix, sqrt, summation, Sum, Symbol, symbols, Wild,...
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/monitoring/bigpanda.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
MicroTrustRepos/microkernel
src/l4/pkg/python/contrib/Doc/includes/tzinfo-examples.py
from datetime import tzinfo, timedelta, datetime ZERO = timedelta(0) HOUR = timedelta(hours=1) # A UTC class. class UTC(tzinfo): """UTC""" def utcoffset(self, dt): return ZERO def tzname(self, dt): return "UTC" def dst(self, dt): return ZERO utc = UTC() # A class building...
alxgu/ansible
lib/ansible/plugins/action/netconf.py
# # Copyright 2018 Red Hat Inc. # # This file is part of Ansible # # Ansible 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 3 of the License, or # (at your option) any later version. # # Ansibl...
kd0aij/matrixpilot_old
Tools/MAVLink/mavlink/pymavlink/generator/mavtemplate.py
#!/usr/bin/env python ''' simple templating system for mavlink generator Copyright Andrew Tridgell 2011 Released under GNU GPL version 3 or later ''' from mavparse import MAVParseError class MAVTemplate(object): '''simple templating system''' def __init__(self, start_var_token="...