repo_name
stringlengths
5
104
path
stringlengths
4
248
content
stringlengths
102
99.9k
lmcro/webserver
admin/plugins/common.py
# -*- coding: utf-8 -*- # # Cherokee-admin # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2001-2014 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free S...
krichter722/findutils
build-aux/src-sniff.py
#! /usr/bin/env python # src-sniff.py: checks source code for patterns that look like common errors. # Copyright (C) 2007, 2010, 2011 Free Software Foundation, 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 Fr...
karrtikr/ete
sdoc/face_grid.py
from ete3 import Tree, TextFace, NodeStyle, TreeStyle t = Tree("((a,b),c);") right_c0_r0 = TextFace("right_col0_row0") right_c0_r1 = TextFace("right_col0_row1") right_c1_r0 = TextFace("right_col1_row0") right_c1_r1 = TextFace("right_col1_row1") right_c1_r2 = TextFace("right_col1_row2") top_c0_r0 = TextFace("top_col0...
norayr/unisubs
apps/videos/migrations/0152_auto__add_field_action_new_language.py
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ("subtitles", "0015_auto__chg_field_subtitleversion_serialized_subtitles"), ) def forwards(self, orm): # Adding fie...
edx/edx-platform
openedx/core/djangoapps/video_config/migrations/0008_courseyoutubeblockedflag.py
# Generated by Django 1.11.23 on 2019-08-25 16:11 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import opaque_keys.edx.django.models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MO...
LLNL/spack
var/spack/repos/builtin/packages/gearshifft/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 Gearshifft(CMakePackage): """Benchmark Suite for Heterogenuous FFT Implementations""" ...
oneman/xmms2-oneman-old
wafadmin/Tools/cc.py
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006 (ita) "Base for c programs/libraries" import os import TaskGen, Build, Utils, Task from Logs import debug import ccroot from TaskGen import feature, before, extension, after g_cc_flag_vars = [ 'CCDEPS', 'FRAMEWORK', 'FRAMEWORKPATH', 'STATICLIB', 'LIB', 'LIB...
LLNL/spack
var/spack/repos/builtin/packages/r-bayesm/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 RBayesm(RPackage): """Bayesian Inference for Marketing/Micro-Econometrics Covers many...
AnshulYADAV007/Lean
Algorithm.Python/MarginCallEventsAlgorithm.py
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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...
roubert/python-phonenumbers
python/phonenumbers/data/region_KE.py
"""Auto-generated file, do not edit by hand. KE metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_KE = PhoneMetadata(id='KE', country_code=254, international_prefix='000', general_desc=PhoneNumberDesc(national_number_pattern='20\\d{6,7}|[4-9]\\d{6,9}', possible_num...
dongguangming/python-phonenumbers
python/tests/testtzdata/__init__.py
"""Per-prefix data, mapping each prefix to a name. Auto-generated file, do not edit by hand. """ from phonenumbers.util import u # Copyright (C) 2011-2015 The Libphonenumber Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. #...
chenjun0210/tensorflow
tensorflow/contrib/factorization/python/ops/factorization_ops.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...
JavaRabbit/CS496_capstone
bigquery/api/streaming.py
#!/usr/bin/env python # Copyright 2015, Google, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
annarev/tensorflow
tensorflow/compiler/mlir/tfr/integration/node_expansion_test.py
# Copyright 2019 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...
manhhomienbienthuy/scikit-learn
examples/covariance/plot_mahalanobis_distances.py
r""" ================================================================ Robust covariance estimation and Mahalanobis distances relevance ================================================================ This example shows covariance estimation with Mahalanobis distances on Gaussian distributed data. For Gaussian distrib...
clouserw/olympia
lib/misc/safe_signals.py
""" A monkeypatch for ``django.dispatch`` to send signals safely. Usage:: >>> import safe_signals >>> safe_signals.start_the_machine() ``django.dispatch.Signal.send`` is replaced with a safer function that catches and logs errors. It's like ``Signal.send_robust`` but with logging. """ import logging from ...
gangadhar-kadam/mic-wnframework
webnotes/tests/test_email.py
from __future__ import unicode_literals import os, sys sys.path.append('.') sys.path.append('lib/py') sys.path.append('erpnext') import unittest, webnotes from webnotes.test_runner import make_test_records make_test_records("Profile") class TestEmail(unittest.TestCase): def setUp(self): webnotes.conn.sql("""upda...
mverzett/rootpy
rootpy/utils/cinterface.py
# Copyright 2012 the rootpy developers # distributed under the terms of the GNU General Public License """ Functions useful for interfacing with C/C++ functions: * ``callback`` => Allows you to pass ctypes CFUNCTYPE objects as parameters to PyROOT functions * ``objectproxy_realaddress`` => Determine the ...
bastibl/gnuradio
gr-blocks/python/blocks/qa_add_mult_div_sub.py
#!/usr/bin/env python # # Copyright 2004,2007,2010,2012,2013 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...
urisimchoni/samba
python/samba/tests/password_hash_ldap.py
# Tests for Tests for source4/dsdb/samdb/ldb_modules/password_hash.c # # Copyright (C) Andrew Bartlett <abartlet@samba.org> 2017 # # 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 ...
hanselke/erpnext-1
erpnext/crm/doctype/opportunity/opportunity.py
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, json from frappe.utils import cstr, cint from frappe import msgprint, _ from frappe.model.mapper import get_mapped_doc from erpnext.setup...
LLNL/spack
var/spack/repos/builtin/packages/r-mlbench/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 RMlbench(RPackage): """A collection of artificial and real-world machine learning benchmar...
LLNL/spack
var/spack/repos/builtin/packages/py-aiohttp-cors/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) class PyAiohttpCors(PythonPackage): """aiohttp_cors library implements Cross Origin Resource Sharing (CORS) suppo...
tensorflow/tensorflow
tensorflow/python/platform/test.py
# 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...
taohungyang/cloud-custodian
tools/c7n_salactus/c7n_salactus/inventory.py
# Copyright 2017 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 to in...
TabbedOut/django-guardian
guardian/tests/core_test.py
from __future__ import unicode_literals from itertools import chain from django.conf import settings from django.contrib.auth import models as auth_app from django.contrib.auth.management import create_permissions from django.contrib.auth.models import Group, Permission, AnonymousUser from django.contrib.contenttypes....
iulianbute/labs
python/solutii/anda_ungureanu/from_icao.py
#!/usr/bin/env python # *-* coding: UTF-8 *-* """ Organizaţia Internaţională a Aviaţiei Civile propune un alfabet în care fiecărei litere îi este asignat un cuvânt pentru a evita problemele în înțelegerea mesajelor critice. Pentru a se păstra un istoric al conversațiilor s-a decis transcrierea lor conform următoarelor...
sdoran35/hate-to-hugs
venv/lib/python3.6/site-packages/nltk/translate/metrics.py
# Natural Language Toolkit: Translation metrics # # Copyright (C) 2001-2017 NLTK Project # Author: Will Zhang <wilzzha@gmail.com> # Guan Gui <ggui@student.unimelb.edu.au> # Steven Bird <stevenbird1@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import div...
deisi/home-assistant
homeassistant/components/light/lifx.py
""" Support for the LIFX platform that implements lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.lifx/ """ # pylint: disable=missing-docstring import colorsys import logging from homeassistant.components.light import ( ATTR_BRIGHTNESS...
wndias/bc.repository
plugin.video.playlistLoader/default.py
# -*- coding: utf-8 -*- # code by Avigdor (https://github.com/cubicle-vdo/xbmc-israel) import urllib, sys, xbmcplugin ,xbmcgui, xbmcaddon, xbmc, os, json AddonID = 'plugin.video.playlistLoader' Addon = xbmcaddon.Addon(AddonID) AddonName = Addon.getAddonInfo("name") icon = Addon.getAddonInfo('icon') addonDir = Addon.g...
mpenning/exscript
src/Exscript/protocols/Telnet.py
# Copyright (C) 2007-2010 Samuel Abels. # # This program 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. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANT...
billiob/papyon
papyon/msnp/challenge.py
# -*- coding: utf-8 -*- # # papyon - a python client library for Msn # # Copyright (C) 2005-2007 Ali Sabil <ali.sabil@gmail.com> # Copyright (C) 2005-2006 Ole André Vadla Ravnås <oleavr@gmail.com> # Copyright (C) 2007 Johann Prieur <johann.prieur@gmail.com> # # This program is free software; you can redistribute it and...
Zentyal/openchange
script/bug-analysis/buganalysis/mail.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) Enrique J. Hernández 2014 # 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 l...
PearsonIOKI/compose-forum
askbot/migrations/0093_auto__del_field_vote_content_type__del_field_vote_object_id__chg_field.py
# 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): # Removing unique constraint on 'Vote', fields ['object_id', 'content_type', 'user'] db.delete_unique(u'vo...
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/test/test_http_cookiejar.py
"""Tests for http/cookiejar.py.""" import os import re import test.support import time import unittest import urllib.request from http.cookiejar import (time2isoz, http2time, iso2time, time2netscape, parse_ns_headers, join_header_words, split_header_words, Cookie, CookieJar, DefaultCookiePolicy, LWPCookieJa...
sputnick-dev/weboob
modules/indeed/browser.py
# -*- coding: utf-8 -*- # Copyright(C) 2013 Bezleputh # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opt...
ywcui1990/nupic.research
projects/location_layer/single_layer_2d_experiment/runner.py
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2017, 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...
wolffcm/voltdb
lib/python/voltcli/cli.py
# This file is part of VoltDB. # Copyright (C) 2008-2015 VoltDB Inc. # # This file contains original code and/or modifications of original code. # Any modifications made by VoltDB Inc. are licensed under the following # terms and conditions: # # Permission is hereby granted, free of charge, to any person obtaining # a...
holygits/incubator-airflow
airflow/utils/dag_processing.py
# -*- coding: utf-8 -*- # # 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 ...
tpaszkowski/quantum
quantum/db/migration/alembic_migrations/versions/49332180ca96_ryu_plugin_update.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 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...
brainiak/brainiak
tests/funcalign/test_srm_distributed.py
# Copyright 2016 Intel Corporation # # 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...
jmuhlich/indra
models/rasmachine/twitter_client.py
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import tweepy def get_oauth_file(auth_file): try: fh = open(auth_file, 'rt') except IOError: print('Could not get Twitter credentials.') return None lines = [l.strip() for l in fh...
cmoutard/mne-python
tutorials/plot_spatio_temporal_cluster_stats_sensor.py
""" .. _stats_cluster_sensors_2samp_spatial: ===================================================== Spatiotemporal permutation F-test on full sensor data ===================================================== Tests for differential evoked responses in at least one condition using a permutation clustering test. The Fiel...
olafhauk/mne-python
mne/datasets/kiloword/kiloword.py
# License: BSD Style. from ...utils import verbose from ..utils import _data_path, _get_version, _version_doc @verbose def data_path(path=None, force_update=False, update_path=True, download=True, verbose=None): """ Get path to local copy of the kiloword dataset. This is the dataset from [...
anntzer/scikit-learn
sklearn/utils/tests/test_testing.py
import warnings import unittest import sys import os import atexit import numpy as np from scipy import sparse import pytest from sklearn.utils.deprecation import deprecated from sklearn.utils.metaestimators import if_delegate_has_method from sklearn.utils._testing import ( assert_raises, assert_warns, ...
tjlaboss/openmc
examples/pincell_depletion/run_depletion.py
from math import pi import openmc import openmc.deplete import matplotlib.pyplot as plt ############################################################################### # Define materials ############################################################################### # Instantiate some Ma...
dsiddharth/access-keys
keystone/contrib/oauth1/migrate_repo/versions/001_add_oauth_tables.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 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 # # Unle...
ted-ross/qpid-dispatch
tools/scraper/common.py
#!/usr/bin/env python # # 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 # ...
eadgarchen/tensorflow
tensorflow/contrib/boosted_trees/estimator_batch/custom_export_strategy.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...
Havate/havate-openstack
proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/dashboards/project/volumes/forms.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # All rights reserved. """ Views for managing volumes. """ from django.conf import settings # noqa from django.core.urlresolvers import reverse # noqa from django.forms import ValidationError # noqa from django.template.defaultfilters impor...
jvrsantacruz/XlsxWriter
xlsxwriter/test/comparison/test_optimize09.py
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest import sys from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTes...
jvrsantacruz/XlsxWriter
xlsxwriter/test/worksheet/test_worksheet08.py
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import Worksheet from ...shareds...
chromium/chromium
third_party/tflite_support/src/tensorflow_lite_support/python/task/processor/proto/classifications_pb2.py
# Copyright 2022 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...
TeamEOS/external_chromium_org
build/android/pylib/symbols/elf_symbolizer.py
# 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 collections import datetime import logging import multiprocessing import os import posixpath import Queue import re import subprocess import sys impor...
Anislav/Stream-Framework
stream_framework/tests/activity.py
import datetime from stream_framework.activity import Activity from stream_framework.activity import AggregatedActivity from stream_framework.activity import DehydratedActivity from stream_framework.tests.utils import Pin from stream_framework.verbs.base import Love as LoveVerb from stream_framework.aggregators.base im...
ULHPC/modules
easybuild/easybuild-easyblocks/easybuild/easyblocks/c/cp2k.py
## # Copyright 2009-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
zephyrplugins/zephyr
zephyr.plugin.jython/jython2.5.2rc3/Lib/test/test_xml_etree_c.py
# xml.etree test for cElementTree import doctest, sys from test import test_support from xml.etree import cElementTree as ET SAMPLE_XML = """ <body> <tag>text</tag> <tag /> <section> <tag>subtext</tag> </section> </body> """ SAMPLE_XML_NS = """ <body xmlns="http://effbot.org/ns"> <tag>text</tag> <t...
asljivo1/802.11ah-ns3
ns-3/.waf-1.8.12-f00e5b53f6bbeab1384a38c9cc5d51f7/waflib/Tools/compiler_cxx.py
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,sys,imp,types,re from waflib.Tools import ccroot from waflib import Utils,Configure from waflib.Logs import debug cxx_compiler={'win32':['msvc','g++','clang++'],'cygwin':['g++'],'darwin':['...
camradal/ansible
lib/ansible/modules/database/mysql/mysql_user.py
#!/usr/bin/python # (c) 2012, Mark Theunissen <mark.theunissen@gmail.com> # Sponsored by Four Kitchens http://fourkitchens.com. # # 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...
victortey/VEGL-Portal
scripts/postproc-h5.py
# -*- coding: utf-8 -*- """ Post processing.... take 1 Created on Thu Jan 17 14:32:06 2013 @author: ran110 """ ''' import subprocess subprocess.call(['pip', 'install', 'h5py']) ''' import h5py, os import numpy as np import fnmatch def findFiles(starting_dir='.', pattern='Temp*h5'): '''lo...
jawilson/home-assistant
homeassistant/components/adguard/sensor.py
"""Support for AdGuard Home sensors.""" from __future__ import annotations from datetime import timedelta from adguardhome import AdGuardHome, AdGuardHomeConnectionError from homeassistant.components.sensor import SensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import PERCE...
pratapvardhan/scikit-image
skimage/draw/tests/test_draw.py
from numpy.testing import assert_array_equal, assert_equal, assert_raises import numpy as np from skimage._shared.testing import test_parallel from skimage.draw import (set_color, line, line_aa, polygon, polygon_perimeter, circle, circle_perimeter, circle_perimeter_aa, ...
ahmedbodi/vertcoin
test/functional/test_framework/blocktools.py
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Utilities for manipulating blocks and transactions.""" from .address import ( key_to_p2sh_p2wpkh, ...
jdemel/gnuradio
gr-utils/blocktool/core/Constants.py
# # Copyright 2019 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # """ constants file """ # Kernel Namespace KERNEL = 'kernel' # I/O Signature (Symbols and constants) IO_SIGNATURE = 'io_signature::' SIGNATURE_LIST = ['makev', 'make3', 'make2', 'make'...
t3dev/odoo
addons/sale_timesheet/tests/test_project_billing.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.sale_timesheet.tests.common import TestCommonSaleTimesheetNoChart from odoo.exceptions import UserError class TestProjectBilling(TestCommonSaleTimesheetNoChart): """ This test suite provide checks ...
HwisooSo/gemV-update
util/hgstyle.py
#! /usr/bin/env python2 # Copyright (c) 2014 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementatio...
ofgulban/scikit-image
skimage/exposure/tests/test_exposure.py
import warnings import numpy as np from numpy.testing import assert_array_almost_equal as assert_close from numpy.testing import (assert_array_equal, assert_raises, assert_almost_equal) import skimage from skimage import data from skimage import exposure from skimage.exposure.exposure impor...
mit-crpg/openmc
tests/unit_tests/test_element_wo.py
#!/usr/bin/env python import os import sys import pytest from openmc import Material from openmc.data import NATURAL_ABUNDANCE, atomic_mass def test_element_wo(): # This test doesn't require an OpenMC run. We just need to make sure the # element.expand() method expands elements with the proper nuclide ...
BehavioralInsightsTeam/edx-platform
lms/djangoapps/verify_student/tests/fake_software_secure.py
""" Fake Software Secure page for use in acceptance tests. """ from django.conf import settings from django.contrib.auth.decorators import login_required from django.urls import reverse from django.utils.decorators import method_decorator from django.views.generic.base import View from edxmako.shortcuts import render...
tchellomello/home-assistant
homeassistant/components/ambient_station/config_flow.py
"""Config flow to configure the Ambient PWS component.""" from aioambient import Client from aioambient.errors import AmbientError import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_API_KEY from homeassistant.helpers import aiohttp_client from .const import CONF_APP...
rafasashi/userinfuser
serverside/signup.py
# Copyright (C) 2011, CloudCaptive # # 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. # # This program is distributed i...
jlspyaozhongkai/Uter
third_party_build/Python-2.7.9/lib/python2.7/test/test_urllib2.py
import unittest from test import test_support import os import socket import StringIO import urllib2 from urllib2 import Request, OpenerDirector try: import ssl except ImportError: ssl = None # XXX # Request # CacheFTPHandler (hard to write) # parse_keqv_list, parse_http_list, HTTPDigestAuthHandler class T...
carlos-lopez-garces/mapnik-trunk
scons/scons-local-1.2.0/SCons/Tool/javah.py
"""SCons.Tool.javah Tool-specific initialization for javah. 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, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation # # Permissio...
pombredanne/pants
src/python/pants/backend/jvm/tasks/jvm_dependency_check.py
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from colle...
sridevikoushik31/openstack
nova/db/sqlalchemy/migrate_repo/versions/154_add_shadow_tables.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Red Hat, Inc. # Copyright 2013 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://w...
sorgerlab/belpy
doc/ext/citations.py
import re from docutils import nodes, utils from docutils.parsers.rst import roles pubmed_uri_pattern = "http://www.ncbi.nlm.nih.gov/pubmed/%i" doi_uri_pattern = "http://dx.doi.org/%s" def pmid_reference_role(role, rawtext, text, lineno, inliner, options={}, content=[]): try: pmid...
jtyr/ansible-modules-core
network/nxos/nxos_nxapi.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...
hanhlh/hadoop-0.20.2_FatBTree
src/contrib/hod/support/logcondense.py
#!/bin/sh #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 ...
LePastis/pyload
module/plugins/hoster/BillionuploadsCom.py
# -*- coding: utf-8 -*- from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class BillionuploadsCom(DeadHoster): __name__ = "BillionuploadsCom" __type__ = "hoster" __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www\.)?billionuploads\.com/\w{12}...
boudewijnrempt/breakpad
src/tools/gyp/pylib/gyp/xcode_emulation.py
# 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. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """ import gyp.common import os.p...
Jorge-Rodriguez/ansible
lib/ansible/modules/network/f5/bigip_gtm_topology_record.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # 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', ...
code-google-com/cortex-vfx
test/IECoreNuke/StringUtilTest.py
########################################################################## # # Copyright (c) 2010, Image Engine Design 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: # # * Redistribu...
camilonova/django
django/contrib/auth/mixins.py
from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.views import redirect_to_login from django.core.exceptions import ImproperlyConfigured, PermissionDenied from django.utils.encoding import force_text class AccessMixin: """ Abstract CBV mixin that giv...
samsu/neutron
plugins/ml2/drivers/arista/exceptions.py
# Copyright (c) 2013 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 ...
beni55/edx-platform
common/lib/xmodule/xmodule/tests/test_peer_grading.py
import unittest import json import logging from mock import Mock, patch from webob.multidict import MultiDict from xblock.field_data import DictFieldData from xblock.fields import ScopeIds from opaque_keys.edx.locations import Location, SlashSeparatedCourseKey from xmodule.tests import get_test_system, get_test_descr...
vrenaville/stock-logistics-workflow
stock_transfer_split_multi/wizard/stock_transfer_split_multi.py
# -*- encoding: utf-8 -*- ############################################################################## # # Stock Transfer Split Multi module for Odoo # Copyright (C) 2014 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can...
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/lib/google-api-python-client/oauth2client/multistore_file.py
# Copyright 2011 Google Inc. All Rights Reserved. """Multi-credential file store with lock support. This module implements a JSON credential store where multiple credentials can be stored in one file. That file supports locking both in a single process and across processes. The credential themselves are keyed off o...
kvar/ansible
test/units/modules/network/f5/test_bigip_profile_analytics.py
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # 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 import os import json import pytest import sys if sys.version_info < (2...
damdam-s/sale-workflow
sale_payment_term_interest/model/sale_order.py
# -*- coding: utf-8 -*- # # # Authors: Guewen Baconnier # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # Licens...
paplorinc/intellij-community
python/testData/editing/pairedParenthesesMultipleCalls.after.py
import unittest class X(unittest.TestCase): def test1(self): self.assertEqual() def test2(self): self.assertEqual() def test3(self): self.assertEqual() def test4(self): self.assertEqual() def test5(self): self.assertEqual() def test6(self): s...
DirtyUnicorns/android_external_chromium-org
tools/json_schema_compiler/cpp_type_generator.py
# 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. from code import Code from model import PropertyType import cpp_util from json_parse import OrderedDict import schema_util class _TypeDependency(object)...
Teamxrtc/webrtc-streaming-node
third_party/depot_tools/testing_support/get_appengine.py
#!/usr/bin/env python # Copyright (c) 2011 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. """This script is copied from https://chromium.googlesource.com/infra/infra.git/+/master/bootstrap """ import datetime import logg...
hryamzik/ansible
lib/ansible/modules/cloud/amazon/ec2_elb_facts.py
#!/usr/bin/python # # This is a 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. # # This Ansible library is distributed in the hope that i...
ssgeejr/mitropm
mitro-core/tools/icons_crawler/build_update_list.py
# Reads a list of urls and an old list of services and outputs the list # of hostnames that are missing from the old list of services. # # List of urls can be generated from the mitro db using: # # psql -P tuples_only=on -c "select hostname from secrets" mitro # from collections import defaultdict import json import o...
laosiaudi/tensorflow
tensorflow/contrib/tensor_forest/hybrid/python/models/forest_to_data_then_nn_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...
hexlism/css_platform
sleepyenv/lib/python2.7/site-packages/Flask_Admin-1.2.0-py2.7.egg/flask_admin/contrib/sqla/fields.py
""" Useful form fields for use with SQLAlchemy ORM. """ import operator from wtforms import widgets from wtforms.fields import SelectFieldBase from wtforms.validators import ValidationError from .tools import get_primary_key from flask_admin._compat import text_type, string_types from flask_admin.form import Form...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/tensorflow/python/ops/array_grad.py
# 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...
AzamYahya/shogun
examples/undocumented/python_modular/converter_tdistributedstochasticneighborembedding_modular.py
#!/usr/bin/env python data = '../data/fm_train_real.dat' parameter_list = [[data]] def converter_tdistributedstochasticneighborembedding_modular(data_fname, seed=1): try: from modshogun import RealFeatures, TDistributedStochasticNeighborEmbedding from modshogun import Math_init_random, CSVFile # reproducible r...
musically-ut/statsmodels
tools/nbgenerate.py
#! /usr/bin/env python """ Script to generate notebooks with output from notebooks that don't have output. """ # prefer HTML over rST for now until nbconvert changes drop OUTPUT = "html" import os import io import sys import time import shutil SOURCE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."...
vmanoria/bluemix-hue-filebrowser
hue-3.8.1-bluemix/desktop/core/ext-py/lxml/src/lxml/tests/test_xmlschema.py
# -*- coding: utf-8 -*- """ Test cases related to XML Schema parsing and validation """ import unittest, sys, os.path this_dir = os.path.dirname(__file__) if this_dir not in sys.path: sys.path.insert(0, this_dir) # needed for Py3 from common_imports import etree, BytesIO, HelperTestCase, fileInTestDir from comm...