repo_name
stringlengths
5
104
path
stringlengths
4
248
content
stringlengths
102
99.9k
quattor/aquilon
upgrade/1.4.5/aquilon/aqdb/model/network.py
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2013 Contributor # # 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 Li...
humdings/zipline
zipline/pipeline/loaders/equity_pricing_loader.py
# Copyright 2015 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
gquirozbogner/contentbox-master
third_party/unidecode/x0c7.py
data = ( 'wek', # 0x00 'wet', # 0x01 'wep', # 0x02 'weh', # 0x03 'wi', # 0x04 'wig', # 0x05 'wigg', # 0x06 'wigs', # 0x07 'win', # 0x08 'winj', # 0x09 'winh', # 0x0a 'wid', # 0x0b 'wil', # 0x0c 'wilg', # 0x0d 'wilm', # 0x0e 'wilb', # 0x0f 'wils', # 0x1...
Brocade-OpenSource/OpenStack-DNRM-Nova
nova/tests/api/openstack/compute/contrib/test_volumes.py
# Copyright 2013 Josh Durgin # 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 a...
dims/heat
heat_integrationtests/functional/test_stack_outputs.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 # d...
jboeuf/grpc
tools/interop_matrix/create_matrix_images.py
#!/usr/bin/env python2.7 # Copyright 2017 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 la...
google/copr-sundry
third_party/subtrees/python-pycparser/pycparser-0.91.1-remove-relative-sys-path.py
#!/usr/bin/env python ''' pycparser examples all contain the following boiler plate code for running in tree. This script removes them: # This is not required if you've installed pycparser into # your site-packages/ with setup.py # sys.path.extend(['.', '..']) ''' import sys import os boiler_plate = "sys.path.exten...
alfasin/st2
st2api/st2api/controllers/v1/traces.py
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
stuarthodgson/cocotb
cocotb/generators/__init__.py
''' Copyright (c) 2013 Potential Ventures Ltd Copyright (c) 2013 SolarFlare Communications 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 c...
modulexcite/catapult
dashboard/dashboard/edit_site_config_test.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 import webapp2 import webtest from google.appengine.api import users from dashboard import edit_site_config from dashboard import namespac...
aaryani/CoreTardis
tardis/apps/microtardis/setup.py
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'docs/changes.rst')).read() setup( name="MyTARDIS", version="1.99", url='http://code.google.com/p/mytardis/', ...
akshayaurora/kivy
kivy/core/window/window_egl_rpi.py
''' EGL Rpi Window: EGL Window provider, specialized for the Pi Inspired by: rpi_vid_core + JF002 rpi kivy repo ''' __all__ = ('WindowEglRpi', ) from kivy.logger import Logger from kivy.core.window import WindowBase from kivy.base import EventLoop, ExceptionManager, stopTouchApp from kivy.lib.vidcore_lite import bc...
mpatacchiola/naogui
zpgc_2016c/include/pynaoqi-python2.7-2.1.3.3-linux64/qi/translator.py
## ## Copyright (C) 2014 Aldebaran Robotics ## from _qi import Translator import os from .logging import warning globTranslator = None def defaultTranslator(name): global globTranslator if globTranslator: return globTranslator globTranslator = Translator(name) return globTranslator def tr(m...
jkonecny12/anaconda
pyanaconda/isys/__init__.py
# # isys.py - installer utility functions and glue for C module # # Copyright (C) 2001-2013 Red Hat, Inc. # All rights reserved. # # 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...
nullishzero/Portage
pym/portage/_sets/files.py
# Copyright 2007-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import errno import re from itertools import chain from portage import os from portage import _encodings from portage import _unicode_decode from portage import _unicode_encode from portage.util import grabfile,...
israeltobias/DownMedia
youtube-dl/test/test_aes.py
#!/usr/bin/env python from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from youtube_dl.aes import aes_decrypt, aes_encrypt, aes_cbc_decrypt, aes_decrypt_text from youtube_dl.utils impo...
larsbergstrom/servo
tests/wpt/web-platform-tests/tools/wpt/android.py
import argparse import os import platform import shutil import subprocess import requests android_device = None here = os.path.abspath(os.path.dirname(__file__)) wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir)) def do_delayed_imports(): global android_device from mozrunner.devices impor...
wlach/treeherder
treeherder/webapp/api/runnable_jobs.py
import datetime from rest_framework import viewsets from rest_framework.response import Response from treeherder.model import models class RunnableJobsViewSet(viewsets.ViewSet): """ This viewset is responsible for the runnable_jobs endpoint. """ def list(self, request, project): """ ...
ahmedaljazzar/edx-platform
common/test/acceptance/tests/studio/test_studio_components.py
""" Acceptance tests for adding components in Studio. """ import ddt from common.test.acceptance.fixtures.course import XBlockFixtureDesc from common.test.acceptance.pages.studio.container import ContainerPage from common.test.acceptance.pages.studio.settings_advanced import AdvancedSettingsPage from common.test.accep...
EmreAtes/spack
var/spack/repos/builtin/packages/py-pyparsing/package.py
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
EmreAtes/spack
var/spack/repos/builtin/packages/slurm/package.py
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
tylertian/Openstack
openstack F/glance/glance/image_cache/pruner.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack 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/...
hybrid-storage-dev/cinder-fs-111t-hybrid-cherry
openstack/common/loopingcall.py
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
prasannav7/ggrc-core
src/ggrc/services/search.py
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: david@reciprocitylabs.com # Maintained By: david@reciprocitylabs.com import json from flask import request, current_app from ggrc.fulltext import g...
jordanemedlock/psychtruths
temboo/core/Library/Facebook/Actions/Video/Rates/CreateRating.py
# -*- coding: utf-8 -*- ############################################################################### # # CreateRating # Creates an action that represents a user rating a movie, TV show, episode, or other video content. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache L...
tensorflow/tensorflow
tensorflow/python/saved_model/save_test.py
# 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...
jordanemedlock/psychtruths
temboo/core/Library/Zoho/CRM/GetMyRecords.py
# -*- coding: utf-8 -*- ############################################################################### # # GetMyRecords # Retrieves data by owner of the authentication token specified. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License");...
AllanYangZhou/oppia
core/controllers/recent_commits.py
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
mxm/incubator-beam
sdks/python/apache_beam/transforms/core.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...
tchellomello/home-assistant
tests/components/plugwise/test_sensor.py
"""Tests for the Plugwise Sensor integration.""" from homeassistant.config_entries import ENTRY_STATE_LOADED from tests.components.plugwise.common import async_init_integration async def test_adam_climate_sensor_entities(hass, mock_smile_adam): """Test creation of climate related sensor entities.""" entry =...
laurenrevere/osf.io
api/metaschemas/views.py
from rest_framework import generics, permissions as drf_permissions from framework.auth.oauth_scopes import CoreScopes from website.project.metadata.schemas import LATEST_SCHEMA_VERSION from api.base import permissions as base_permissions from api.base.views import JSONAPIBaseView from api.base.utils import get_objec...
dud225/incubator-airflow
airflow/operators/hive_operator.py
import logging import re from airflow.hooks import HiveCliHook from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults class HiveOperator(BaseOperator): """ Executes hql code in a specific Hive database. :param hql: the hql to be executed :type hql: string :pa...
mozilla/moztrap
tests/view/results/results/test_views.py
""" Tests for results-list view. """ from django.core.urlresolvers import reverse from tests import case class ResultsViewTest(case.view.ListViewTestCase, case.view.ListFinderTests, ): """Tests for results-list view.""" name_attr = "tester__username" def se...
SaschaMester/delicium
tools/telemetry/telemetry/internal/browser/browser.py
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os from telemetry.core import exceptions from telemetry.core import local_server from telemetry.core import memory_cache_http_server from telemetry.c...
11craft/django-cms
cms/tests/check.py
# -*- coding: utf-8 -*- from __future__ import with_statement import unittest from cms.test_utils.util.context_managers import SettingsOverride from cms.utils.check import FileOutputWrapper, check, FileSectionWrapper from cms.models.pluginmodel import CMSPlugin from cms.models.placeholdermodel import Placeholder from d...
beckastar/django
django/forms/models.py
""" Helper functions for creating Form classes from Django models and database field objects. """ from __future__ import unicode_literals from collections import OrderedDict import warnings from django.core.exceptions import ValidationError, NON_FIELD_ERRORS, FieldError from django.forms.fields import Field, ChoiceF...
twidi/satchmo
satchmo/apps/payment/modules/dummy/config.py
from livesettings import * from django.utils.translation import ugettext_lazy as _ # this is so that the translation utility will pick up the string gettext = lambda s: s PAYMENT_GROUP = ConfigurationGroup('PAYMENT_DUMMY', _('Payment Test Module Settings'), ordering = 100) config_register_list( BooleanVa...
hradec/gaffer
python/GafferDispatchTest/PythonCommandTest.py
########################################################################## # # Copyright (c) 2015, John Haddon. 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 so...
abalkin/numpy
numpy/core/tests/test_memmap.py
import sys import os import shutil import mmap import pytest from pathlib import Path from tempfile import NamedTemporaryFile, TemporaryFile, mktemp, mkdtemp from numpy import ( memmap, sum, average, product, ndarray, isscalar, add, subtract, multiply) from numpy import arange, allclose, asarray from numpy.testin...
mikaelboman/home-assistant
homeassistant/components/sensor/bloomsky.py
""" Support the sensor of a BloomSky weather station. For more details about this component, please refer to the documentation at https://home-assistant.io/components/sensor.bloomsky/ """ import logging from homeassistant.const import TEMP_FAHRENHEIT from homeassistant.helpers.entity import Entity from homeassistant....
lthurlow/Network-Grapher
proj/external/matplotlib-1.2.1/lib/mpl_examples/widgets/check_buttons.py
import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import CheckButtons t = np.arange(0.0, 2.0, 0.01) s0 = np.sin(2*np.pi*t) s1 = np.sin(4*np.pi*t) s2 = np.sin(6*np.pi*t) ax = plt.subplot(111) l0, = ax.plot(t, s0, visible=False, lw=2) l1, = ax.plot(t, s1, lw=2) l2, = ax.plot(t, s2, lw=2) plt.su...
sadanandb/pmt
src/pyasm/prod/service/tactic_slave.py
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
sanjayankur31/nest-simulator
testsuite/pytests/test_spatial/test_connect_sliced.py
# -*- coding: utf-8 -*- # # test_connect_sliced.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 Lic...
AlbertoPeon/invenio
modules/bibauthorid/lib/bibauthorid_frontinterface.py
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011, 2012 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 opt...
renatofb/weblate
weblate/settings_openshift.py
# -*- coding: utf-8 -*- # # Copyright © 2015 Daniel Tschan <tschan@puzzle.ch> # # This file is part of Weblate <http://weblate.org/> # # 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 vers...
keelhaule/alfanous
src/alfanous/Support/whoosh/filedb/filewriting.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...
vrsys/avangong
avango-utils/tests/TestProximitySensor.py
# -*- Mode:Python -*- ########################################################################## # # # This file is part of AVANGO. # # ...
Venturi/oldcms
env/lib/python2.7/site-packages/cms/tests/menu_page_viewperm.py
# -*- coding: utf-8 -*- from __future__ import with_statement from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser, Group from django.contrib.sites.models import Site from django.test.utils import override_settings from cms.api import create_page from cms.menu import get...
vongazman/libcloud
libcloud/container/drivers/kubernetes.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 use ...
tchellomello/home-assistant
homeassistant/generated/ssdp.py
"""Automatically generated by hassfest. To update, run python3 -m script.hassfest """ # fmt: off SSDP = { "arcam_fmj": [ { "deviceType": "urn:schemas-upnp-org:device:MediaRenderer:1", "manufacturer": "ARCAM" } ], "control4": [ { "st": "c4:direct...
samsu/neutron
services/firewall/fwaas_plugin.py
# Copyright 2013 Big Switch 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.apache.org/licenses/LICENSE-2.0 # # Unless...
benschmaus/catapult
telemetry/telemetry/internal/actions/swipe.py
# 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. from telemetry.internal.actions import page_action from telemetry.internal.actions import utils from telemetry.util import js_template class SwipeAction(pa...
jnns/wagtail
wagtail/core/actions/convert_alias.py
from django.core.exceptions import PermissionDenied from wagtail.core.log_actions import log class ConvertAliasPageError(RuntimeError): """ Raised when the page to convert is not an alias. """ pass class ConvertAliasPagePermissionError(PermissionDenied): """ Raised when the alias page conv...
betaY/crawler
you-get-master/src/you_get/extractors/flickr.py
#!/usr/bin/env python __all__ = ['flickr_download'] from ..common import * def flickr_download(url, output_dir='.', merge=True, info_only=False, **kwargs): page = get_html(url) title = match1(page, r'<meta property="og:title" content="([^"]*)"') photo_id = match1(page, r'"id":"([0-9]+)"') try: # ext...
asnorkin/sentiment_analysis
site/lib/python2.7/site-packages/scipy/linalg/_solvers.py
"""Matrix equation solver routines""" # Author: Jeffrey Armstrong <jeff@approximatrix.com> # February 24, 2012 # Modified: Chad Fulton <ChadFulton@gmail.com> # June 19, 2014 # Modified: Ilhan Polat <ilhanpolat@gmail.com> # September 13, 2016 from __future__ import division, print_function, absolute_import import nu...
tejaswi2492/pmip6ns3.13new
doc/tutorial/source/conf.py
# -*- coding: utf-8 -*- # # ns-3 documentation build configuration file, created by # sphinx-quickstart on Tue Dec 14 09:00:39 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
tomkralidis/geonode
geonode/apps.py
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2018 OSGeo # # 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 ver...
kkreis/espressopp
src/FixedQuadrupleAngleList.py
# Copyright (C) 2012,2013,2015 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms...
stack-of-tasks/rbdlpy
tutorial/lib/python2.7/site-packages/OpenGL/raw/GL/ARB/transpose_matrix.py
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _...
mluo613/osf.io
api_tests/nodes/serializers/test_serializers.py
# -*- coding: utf-8 -*- from urlparse import urlparse from nose.tools import * # flake8: noqa from dateutil.parser import parse as parse_date from tests.base import DbTestCase, assert_datetime_equal from tests.utils import make_drf_request_with_version from osf_tests.factories import UserFactory, NodeFactory, Regist...
pombredanne/or-tools
examples/tests/issue46.py
# Copyright 2010-2014 Google # 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, so...
cyberbeast/pympler
tools/sphinx.py
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Run Sphinx, the Python documentation tool. First try running Sphinx installed in the current Python build. If that fails, try the standard ``sphinx-build`` command which may be installed in a different Python version. If that fails, punt. Originals at...
ghchinoy/tensorflow
tensorflow/python/ops/ragged/ragged_tensor_shape.py
# 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...
cpcloud/arrow
python/pyarrow/vendored/version.py
# Vendored from https://github.com/pypa/packaging, # changeset b5878c977206f60302536db969a8cef420853ade # This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of the # `packaging` repository for complete details. import collections impo...
krikru/tensorflow-opencl
tensorflow/contrib/bayesflow/python/kernel_tests/stochastic_tensor_test.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...
imjonsnooow/vivisect
vstruct/tests/tests_vstruct.py
import unittest import vstruct import vstruct.primitives as p class NNestedStruct(vstruct.VStruct): def __init__(self): vstruct.VStruct.__init__(self) self.alpha = p.v_uint64() self.beta = vstruct.VStruct() class NestedStruct(vstruct.VStruct): def __init__(self): vstruct.VStr...
chrsrds/scikit-learn
examples/model_selection/plot_grid_search_digits.py
""" ============================================================ Parameter estimation using grid search with cross-validation ============================================================ This examples shows how a classifier is optimized by cross-validation, which is done using the :class:`sklearn.model_selection.GridS...
WillisXChen/django-oscar
oscar/lib/python2.7/site-packages/IPython/terminal/console/completer.py
"""Adapt readline completer interface to make ZMQ request. """ # -*- coding: utf-8 -*- try: from queue import Empty # Py 3 except ImportError: from Queue import Empty # Py 2 from IPython.config import Configurable from IPython.core.completer import IPCompleter from IPython.utils.traitlets import Float import...
berkus/enso
enso/contrib/scriptotron/adapters.py
import types from enso.commands import CommandObject from enso.commands.factories import GenericPrefixFactory from enso.commands.factories import ArbitraryPostfixFactory from enso.contrib.scriptotron.tracebacks import safetyNetted ARG_REQUIRED_MSG = "An argument is required." class FuncCommand( CommandObject ): ...
ktan2020/legacy-automation
win/Lib/idlelib/HyperParser.py
""" HyperParser =========== This module defines the HyperParser class, which provides advanced parsing abilities for the ParenMatch and other extensions. The HyperParser uses PyParser. PyParser is intended mostly to give information on the proper indentation of code. HyperParser gives some information on the str...
pradyunsg/pip
src/pip/_vendor/pygments/scanner.py
""" pygments.scanner ~~~~~~~~~~~~~~~~ This library implements a regex based scanner. Some languages like Pascal are easy to parse but have some keywords that depend on the context. Because of this it's impossible to lex that just by using a regular expression lexer like the `RegexLexer`. ...
ByteMail/ByteMail
werkzeug/__init__.py
# -*- coding: utf-8 -*- """ werkzeug ~~~~~~~~ Werkzeug is the Swiss Army knife of Python web development. It provides useful classes and functions for any WSGI application to make the life of a python web developer much easier. All of the provided classes are independent from each other so yo...
0x0all/nupic
tests/unit/py2/nupic/frameworks/opf/opf_metrics_test.py
#!/usr/bin/env python # ---------------------------------------------------------------------- # 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 ...
cchurch/ansible-modules-core
cloud/amazon/iam.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 distributed...
odoomrp/odoomrp-wip
purchase_homologation/models/purchase_homologation.py
# -*- coding: utf-8 -*- ############################################################################## # # # OpenERP, Open Source Management Solution. # # ...
KAsante95/osf.io
website/addons/citations/provider.py
import abc import httplib as http from framework.exceptions import HTTPError from framework.exceptions import PermissionsError from website.oauth.models import ExternalAccount class CitationsProvider(object): __metaclass__ = abc.ABCMeta def __init__(self, provider_name): self.provider_name = provid...
Kazade/NeHe-Website
google_appengine/google/appengine/ext/bulkload/simplexml_connector.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...
ptonner/GPy
GPy/testing/gp_tests.py
''' Created on 4 Sep 2015 @author: maxz ''' import unittest import numpy as np, GPy from GPy.core.parameterization.variational import NormalPosterior class Test(unittest.TestCase): def setUp(self): np.random.seed(12345) self.N = 20 self.N_new = 50 self.D = 1 self.X = np.r...
crmccreary/openerp_server
openerp/addons/hr_payroll_account/__openerp__.py
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it ...
sunghan-chang/TizenRT
lib/libc/zoneinfo/mk_opt_tzrule.py
#!/usr/bin/env python ############################################################################ # # Copyright 2020 Samsung Electronics 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...
Vvucinic/Wander
venv_2_7/lib/python2.7/site-packages/pandas/tseries/tests/test_plotting.py
from datetime import datetime, timedelta, date, time import nose from pandas.compat import lrange, zip import numpy as np from numpy.testing.decorators import slow from pandas import Index, Series, DataFrame from pandas.tseries.index import date_range, bdate_range from pandas.tseries.offsets import DateOffset, Week...
GENI-NSF/geni-soil
src/vendor/geniv3rpc/ext/sfa/util/genicode.py
#---------------------------------------------------------------------- # Copyright (c) 2008 Board of Trustees, Princeton University # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, i...
scheib/chromium
third_party/blink/web_tests/http/tests/websocket/workers/resources/no-onmessage-in-sync-op_wsh.py
import six from mod_pywebsocket import handshake from mod_pywebsocket import msgutil def web_socket_do_extra_handshake(request): pass def web_socket_transfer_data(request): # Send three messages, and then wait for three messages. msgutil.send_message(request, '1') msgutil.send_message(request, '2')...
cypod/arsenalsuite
cpp/apps/bach/data_export/ui/LightroomUI.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'LightroomUI.ui' # # Created: Wed Aug 12 16:27:43 2009 # by: PyQt4 UI code generator 4.5-snapshot-20090412 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_LightroomImport(object): d...
odoousers2014/LibrERP
report_aeroo/ctt_languages/en_US/currencies/ltl.py
#!/usr/bin/python # -*- coding: utf8 -*- from report_aeroo.ctt_objects import ctt_currency class ltl(ctt_currency): def _init_currency(self): self.language = u'en_US' self.code = u'LTL' self.fractions = 100 self.cur_singular = u' Lithuanian litas' self.cur_plural = u' Lithu...
metaperl/behave
test/test_configuration.py
from __future__ import absolute_import, with_statement from unittest import TestCase import os.path import tempfile from nose.tools import * from behave import configuration from behave.configuration import Configuration, UserData # one entry of each kind handled TEST_CONFIG='''[behave] outfiles= /absolute/path1 ...
EmpireProject/Empire
lib/modules/powershell/credentials/credential_injection.py
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-CredentialInjection', 'Author': ['@JosephBialek'], 'Description': ("Runs PowerSploit's Invoke-CredentialInjection to " "cre...
Venturi/oldcms
env/lib/python2.7/site-packages/cmsplugin_filer_file/migrations/0001_initial.py
from south.db import db from django.db import models from cmsplugin_filer_file.models import * class Migration: depends_on = ( ("filer", "0008_polymorphic__del_field_file__file_type_plugin_name"), ("cms", "0039_auto__del_field_page_moderator_state"), ) def forwards(self, orm): ...
reminisce/mxnet
python/mxnet/gluon/model_zoo/vision/squeezenet.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...
srblum/server
tests/unit/test_datasets.py
""" Tests the datasets module """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import ga4gh.datamodel.datasets as datasets class TestDatasets(unittest.TestCase): """ Tests the datasets class """ def testToProtocolElemen...
npuichigo/ttsflow
third_party/tensorflow/tensorflow/contrib/tensor_forest/python/__init__.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...
denys-duchier/django
django/views/defaults.py
from django.http import ( HttpResponseBadRequest, HttpResponseForbidden, HttpResponseNotFound, HttpResponseServerError, ) from django.template import Context, Engine, TemplateDoesNotExist, loader from django.utils.encoding import force_text from django.views.decorators.csrf import requires_csrf_token ERROR_404...
sgiavasis/nipype
nipype/interfaces/semtools/diffusion/tests/test_auto_compareTractInclusion.py
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from .....testing import assert_equal from ..gtract import compareTractInclusion def test_compareTractInclusion_inputs(): input_map = dict(args=dict(argstr='%s', ), closeness=dict(argstr='--closeness %f', ), environ=dict(nohash=True, usedef...
vdt/SimpleCV
SimpleCV/Features/PlayingCards/TestScript.py
from SimpleCV import * #from FeatureUtils import * from CardUtil import * from PlayingCardFactory import * #import FeatureUtils import numpy as np def GetParallelSets(line_fs,parallel_thresh=25): result = [] sz = len(line_fs) #construct the pairwise cross product ignoring dupes for i in range(0,sz): ...
wolfram74/numerical_methods_iserles_notes
venv/lib/python2.7/site-packages/IPython/nbformat/v2/nbxml.py
"""Read and write notebook files as XML. Authors: * Brian Granger """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed a...
TheMOOCAgency/edx-platform
lms/djangoapps/bulk_email/tests/test_models.py
""" Unit tests for bulk-email-related models. """ from django.test import TestCase from django.core.management import call_command from student.tests.factories import UserFactory from mock import patch, Mock from nose.plugins.attrib import attr from bulk_email.models import ( CourseEmail, SEND_TO_COHORT, ...
mohamed-ali/PyTables
examples/tutorial3-2.py
"""A more complex example of do/undo capability with PyTables. Here, names has been assigned to the marks, and jumps are done between marks. """ import tables # Create an HDF5 file fileh = tables.open_file('tutorial3-2.h5', 'w', title='Undo/Redo demo 2') #'-**-**-**-**-**-**- enable undo/redo log -**-**-...
thaim/ansible
lib/ansible/modules/network/fortios/fortios_wireless_controller_vap_group.py
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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 3 of the Lic...
asnorkin/sentiment_analysis
site/lib/python2.7/site-packages/scipy/constants/__init__.py
r""" ================================== Constants (:mod:`scipy.constants`) ================================== .. currentmodule:: scipy.constants Physical and mathematical constants and units. Mathematical constants ====================== ================ ===========================================================...
chokribr/invenio
invenio/modules/annotations/receivers.py
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 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...