repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
felipeacsi/python-acoustics
tests/standards/test_iec_61672_1_2013.py
2
2692
import pytest import numpy as np from acoustics.standards.iec_61672_1_2013 import * from scipy.signal import freqresp def signal_fs(): fs = 4000.0 f = 400.0 duration = 3.0 samples = int(duration * fs) t = np.arange(samples) / fs x = np.sin(2.0 * np.pi * f * t) return x, fs def test_fast...
bsd-3-clause
wzbozon/scikit-learn
sklearn/cluster/tests/test_spectral.py
262
7954
"""Testing for Spectral Clustering methods""" from sklearn.externals.six.moves import cPickle dumps, loads = cPickle.dumps, cPickle.loads import numpy as np from scipy import sparse from sklearn.utils import check_random_state from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_a...
bsd-3-clause
matthaywardwebdesign/rethinkdb
external/v8_3.30.33.16/tools/testrunner/local/commands.py
65
5069
# Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
agpl-3.0
udayinfy/openerp-7.0
gap_analysis_project_long_term/gap_analysis_project_long_term.py
4
10840
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010-2013 Elico Corp. All Rights Reserved. # Author: Yannick Gouin <yannick.gouin@elico-corp.com> # # This program is free software: you c...
agpl-3.0
2ndQuadrant/ansible
lib/ansible/modules/system/facter.py
125
1321
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012, Michael DeHaan <michael.dehaan@gmail.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_v...
gpl-3.0
yask123/django
tests/test_client_regress/views.py
143
5161
import json from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.serializers.json import DjangoJSONEncoder from django.http import HttpResponse, HttpResponseRedirect, JsonResponse from django.shortcuts import render_to_response from django.template import RequestC...
bsd-3-clause
amite/ghostblog
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/formatters/latex.py
96
13931
# -*- coding: utf-8 -*- """ pygments.formatters.latex ~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for LaTeX fancyvrb output. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments.token import T...
mit
zverevalexei/trex-http-proxy
trex_client/external_libs/pyzmq-14.5.0/python3/cel59/64bit/zmq/tests/test_z85.py
43
2232
# -*- coding: utf8 -*- """Test Z85 encoding confirm values and roundtrip with test values from the reference implementation. """ # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. from unittest import TestCase from zmq.utils import z85 class TestZ85(TestCase): def ...
mit
liuyi1112/flask
tests/test_blueprints.py
143
18147
# -*- coding: utf-8 -*- """ tests.blueprints ~~~~~~~~~~~~~~~~ Blueprints (and currently modules) :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import pytest import flask from flask._compat import text_type from werkzeug.http import parse_cache_control_...
bsd-3-clause
richardcs/ansible
lib/ansible/modules/cloud/linode/linode_v4.py
12
8497
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 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', '...
gpl-3.0
jjas0nn/solvem
tensorflow/lib/python2.7/site-packages/tensorflow/contrib/quantization/python/array_ops.py
178
1156
# 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...
mit
edensparkles/FIRSTAID
FIRST_AID/venv/Lib/site-packages/click/_compat.py
66
20706
import re import io import os import sys import codecs from weakref import WeakKeyDictionary PY2 = sys.version_info[0] == 2 WIN = sys.platform.startswith('win') DEFAULT_COLUMNS = 80 _ansi_re = re.compile('\033\[((?:\d|;)*)([a-zA-Z])') def get_filesystem_encoding(): return sys.getfilesystemencoding() or sys.ge...
mit
Dawny33/luigi
test/contrib/hadoop_jar_test.py
6
3207
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
apache-2.0
Alex-Diez/python-tdd-katas
old-katas/prime-factors/day-9.py
1
1042
# -*- codeing: utf-8 -*- class PrimeFactor(object): def generate(self, n): primes = [] candidate = 2 while n > 1: while n % candidate == 0: primes.append(candidate) n /= candidate candidate += 1 return primes import unittest ...
mit
piffey/ansible
test/units/plugins/lookup/test_ini.py
119
2642
# -*- coding: utf-8 -*- # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.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 Foundation, either version 3 of the License, or # (a...
gpl-3.0
wwitzel3/awx
awx/main/tests/functional/test_session.py
1
4484
from importlib import import_module import pytest import re from django.conf import settings from django.test.utils import override_settings from django.contrib.sessions.middleware import SessionMiddleware from django.contrib.sessions.models import Session from django.contrib.auth import SESSION_KEY import mock from ...
apache-2.0
shakamunyi/nova
nova/api/openstack/compute/plugins/v3/deferred_delete.py
7
2997
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
rkibria/yapyg
demo/demo_squares.py
1
5627
# Copyright (c) 2015 Raihan Kibria # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distr...
mit
ArcherSys/ArcherSys
eclipse/plugins/org.python.pydev.jython_4.5.5.201603221110/Lib/xml/dom/pulldom.py
109
11972
import xml.sax import xml.sax.handler import types try: _StringTypes = [types.StringType, types.UnicodeType] except AttributeError: _StringTypes = [types.StringType] START_ELEMENT = "START_ELEMENT" END_ELEMENT = "END_ELEMENT" COMMENT = "COMMENT" START_DOCUMENT = "START_DOCUMENT" END_DOCUMENT = "END_DOCUMENT" ...
mit
mariopro/youtube-dl
youtube_dl/extractor/washingtonpost.py
79
5626
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, strip_jsonp, ) class WashingtonPostIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?washingtonpost\.com/.*?/(?P<id>[^/]+)/(?:$|[?#])' _TESTS = [{ 'url': ...
unlicense
vegarang/devilry-django
devilry/apps/core/models/subject.py
1
2912
from datetime import datetime from django.utils.translation import ugettext as _ from django.db.models import Q from django.contrib.auth.models import User from django.db import models from abstract_is_examiner import AbstractIsExaminer from abstract_is_candidate import AbstractIsCandidate from custom_db_fields impor...
bsd-3-clause
willprice/weboob
modules/googletranslate/browser.py
7
1772
# -*- coding: utf-8 -*- # Copyright(C) 2012 Lucien Loiseau # # 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...
agpl-3.0
Triv90/Nova
nova/tests/api/openstack/common.py
25
1734
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apach...
apache-2.0
UBERMALLOW/kernel_htc_flounder
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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. # # This program i...
gpl-2.0
pedro2d10/SickRage-FR
lib/hachoir_metadata/program.py
94
3646
from hachoir_metadata.metadata import RootMetadata, registerExtractor from hachoir_parser.program import ExeFile from hachoir_metadata.safe import fault_tolerant, getValue class ExeMetadata(RootMetadata): KEY_TO_ATTR = { u"ProductName": "title", u"LegalCopyright": "copyright", u"LegalTradem...
gpl-3.0
kthordarson/youtube-dl-ruv
youtube_dl/extractor/musicvault.py
28
3071
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( parse_duration, unified_strdate, ) class MusicVaultIE(InfoExtractor): _VALID_URL = r'https?://www\.musicvault\.com/(?P<uploader_id>[^/?#]*)/video/(?P<display_id>[^/?#]*)_(?P<id>[0-9]+)\.html' _T...
unlicense
jehutting/kivy
examples/canvas/multitexture.py
60
3061
''' Multitexture Example ==================== This example blends two textures: the image mtexture1.png of the letter K and the image mtexture2.png of an orange circle. You should see an orange K clipped to a circle. It uses a custom shader, written in glsl (OpenGL Shading Language), stored in a local string. Note th...
mit
iglpdc/nipype
nipype/interfaces/semtools/diffusion/tests/test_auto_gtractFastMarchingTracking.py
12
1948
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from .....testing import assert_equal from ..gtract import gtractFastMarchingTracking def test_gtractFastMarchingTracking_inputs(): input_map = dict(args=dict(argstr='%s', ), costStepSize=dict(argstr='--costStepSize %f', ), environ=dict(nohash=...
bsd-3-clause
Communities-Communications/cc-odoo
addons/l10n_pa/__openerp__.py
260
1737
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the...
agpl-3.0
hacpai/show-me-the-code
Python/0066/Card.py
19
3189
"""This module contains code from Think Python by Allen B. Downey http://thinkpython.com Copyright 2012 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ import random class Card(object): """Represents a standard playing card. Attributes: suit: integer 0-3 rank: i...
gpl-2.0
at1as/Media-Database
tests/test_scraper_imdb.py
2
2927
#-*- encoding:utf8 -*- from __future__ import unicode_literals import codecs import lxml from src.scraper import Scraper import unittest import sys reload(sys) sys.setdefaultencoding('utf8') class TestScraper(unittest.TestCase): def setUp(self): self.scraper = Scraper("IMDB") with codecs.open("./t...
mit
maryklayne/Funcao
sympy/polys/tests/test_densebasic.py
21
21527
"""Tests for dense recursive polynomials' basic tools. """ from sympy.polys.densebasic import ( dup_LC, dmp_LC, dup_TC, dmp_TC, dmp_ground_LC, dmp_ground_TC, dmp_true_LT, dup_degree, dmp_degree, dmp_degree_in, dmp_degree_list, dup_strip, dmp_strip, dmp_validate, dup_reverse, dup...
bsd-3-clause
Aloomaio/googleads-python-lib
examples/ad_manager/v201808/proposal_line_item_service/update_proposal_line_items.py
1
2579
#!/usr/bin/env python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
azverkan/scons
src/engine/SCons/Tool/dvips.py
2
3355
"""SCons.Tool.dvips Tool-specific initialization for dvips. 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__ # # Permission is hereby granted, free of charge, to any person obtaining # a cop...
mit
fitermay/intellij-community
python/lib/Lib/string.py
92
16675
"""A collection of string operations (most are no longer used). Warning: most of the code you see here isn't normally used nowadays. Beginning with Python 1.6, many of these functions are implemented as methods on the standard string object. They used to be implemented by a built-in module called strop, but strop is n...
apache-2.0
Lw-Cui/RedBlackBST
lib/gtest/test/gtest_throw_on_failure_test.py
363
5767
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
mit
zhangh43/incubator-hawq
src/backend/catalog/core/catheader.py
9
6232
#!/usr/bin/env python import re import os class PgCatalogHeader(object): """This class is a base class for catalog header parser class, and provides basic methods to parse header files by regular expressions. The result will be in self.tuplist. To extend this class, set these three class values. ...
apache-2.0
xinst/NoahGameFrame
Dependencies/protobuf/gtest/test/gtest_list_tests_unittest.py
1068
5415
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
apache-2.0
javatlacati/codecombat
scripts/devSetup/systemConfiguration.py
77
1375
from __future__ import division __author__ = u'schmatz' import sys import os from errors import NotSupportedError class SystemConfiguration(object): def __init__(self): self.operating_system = self.get_operating_system() self.virtual_memory_address_width = self.get_virtual_memory_address_width() ...
mit
bakhtout/odoo-educ
addons/purchase/edi/purchase_order.py
439
9703
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
atuljain/odoo
addons/account_analytic_plans/account_analytic_plans.py
30
23439
# -*- 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...
agpl-3.0
gautamMalu/rootfs_xen_arndale
usr/lib/python3.4/bz2.py
83
18839
"""Interface to the libbzip2 compression library. This module provides a file interface, classes for incremental (de)compression, and functions for one-shot (de)compression. """ __all__ = ["BZ2File", "BZ2Compressor", "BZ2Decompressor", "open", "compress", "decompress"] __author__ = "Nadeem Vawda <nadeem.v...
gpl-2.0
studio666/gnuradio
gr-filter/python/filter/qa_pm_remez.py
57
5876
#!/usr/bin/env python # # Copyright 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) # ...
gpl-3.0
gladsonvm/haystackdemo
lib/python2.7/site-packages/django/core/management/commands/syncdb.py
76
8080
from optparse import make_option import sys import traceback from django.conf import settings from django.core.management.base import NoArgsCommand from django.core.management.color import no_style from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal from django.db import connections, rou...
mit
mkaluza/external_chromium_org
ppapi/native_client/tools/browser_tester/browsertester/server.py
126
10676
# 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. import BaseHTTPServer import cgi import mimetypes import os import os.path import posixpath import SimpleHTTPServer import SocketServer import threading ...
bsd-3-clause
2014cdag5/2014cdag5
wsgi/static/Brython2.1.0-20140419-113919/Lib/keyword.py
761
2049
#! /usr/bin/env python3 """Keywords (from "graminit.c") This file is automatically generated; please don't muck it up! To update the symbols in this file, 'cd' to the top directory of the python source tree after building the interpreter and run: ./python Lib/keyword.py """ __all__ = ["iskeyword", "kwlist"] k...
gpl-2.0
crazy-canux/django
tests/defer/tests.py
338
11262
from __future__ import unicode_literals from django.db.models.query_utils import DeferredAttribute, InvalidQuery from django.test import TestCase from .models import ( BigChild, Child, ChildProxy, Primary, RefreshPrimaryProxy, Secondary, ) class AssertionMixin(object): def assert_delayed(self, obj, num): ...
bsd-3-clause
gregswift/ansible-modules-extras
network/a10/a10_virtual_server.py
11
11543
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to manage A10 Networks slb virtual server objects (c) 2014, Mischa Peters <mpeters@a10networks.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 publish...
gpl-3.0
shaon/eutester
testcases/cloud_user/s3/object_tests.py
5
49627
#!/usr/bin/env python # ############################################ # # # objectstorage/S3 Object Test Cases # # # ############################################ #Author: Zach Hill <zach@eucalyptus.com> #Author: Vic Iglesias <vic@...
bsd-2-clause
kevclarx/ansible
lib/ansible/modules/cloud/ovirt/ovirt_snapshots_facts.py
45
4381
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 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 #...
gpl-3.0
LeetCoinTeam/lc_tactoe
jinja2/exceptions.py
398
4530
# -*- coding: utf-8 -*- """ jinja2.exceptions ~~~~~~~~~~~~~~~~~ Jinja exceptions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ class TemplateError(Exception): """Baseclass for all template errors.""" def __init__(self, message=None): i...
apache-2.0
jeremyfix/pylearn2
pylearn2/sandbox/cuda_convnet/tests/test_filter_acts_strided.py
44
5625
from __future__ import print_function __authors__ = "Heng Luo" from pylearn2.testing.skip import skip_if_no_gpu skip_if_no_gpu() import numpy as np from theano.compat.six.moves import xrange from theano import shared from theano.tensor import grad, constant from pylearn2.sandbox.cuda_convnet.filter_acts import Filte...
bsd-3-clause
wkschwartz/django
tests/nested_foreign_keys/tests.py
62
9495
from django.test import TestCase from .models import ( Event, Movie, Package, PackageNullFK, Person, Screening, ScreeningNullFK, ) # These are tests for #16715. The basic scheme is always the same: 3 models with # 2 relations. The first relation may be null, while the second is non-nullable. # In some cases, Dja...
bsd-3-clause
vit2/vit-e2
lib/python/Plugins/Extensions/MediaPlayer/settings.py
9
4987
from Screens.Screen import Screen from Screens.HelpMenu import HelpableScreen from Components.FileList import FileList from Components.Sources.StaticText import StaticText from Components.MediaPlayer import PlayList from Components.config import config, getConfigListEntry, ConfigSubsection, configfile, ConfigText, Conf...
gpl-2.0
danieljaouen/ansible
lib/ansible/modules/cloud/google/gcp_pubsub_topic.py
12
6369
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
JamesGuthrie/libcloud
libcloud/storage/drivers/dummy.py
46
18778
# 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 ...
apache-2.0
sourcesimian/MailSort
mailsort/resources/__init__.py
1
1273
def write_resource(resource, filename): from pkg_resources import Requirement, resource_stream with open(filename, 'wt') as fh: file = resource_stream(Requirement.parse("mailsort"), resource) fh.write(file.read()) def setup_user(): import os did_setup = False config_root = os.p...
mit
CMUSV-VisTrails/WorkflowRecommendation
vistrails/core/mashup/alias.py
1
6306
############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or without ## modification, ...
bsd-3-clause
SartoNess/BitcoinUnlimited
qa/rpc-tests/mempool_limit.py
2
2341
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Copyright (c) 2015-2016 The Bitcoin Unlimited developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test mempool limiting together/eviction with...
mit
clumsy/intellij-community
python/helpers/profiler/profilerpy3/ttypes.py
45
19680
# # Autogenerated by Thrift Compiler (1.0.0-dev) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thriftpy3.Thrift import TType, TMessageType, TException, TApplicationException from thriftpy3.transport import TTransport from thriftpy3.protocol import TBinaryProtocol,...
apache-2.0
ontana/Plan-job
plan/exceptions.py
5
1317
# -*- coding: utf-8 -*- """ plan.exceptions ~~~~~~~~~~~~~~~ Plan exceptions. :copyright: (c) 2014 by Shipeng Feng. :license: BSD, see LICENSE for more details. """ from ._compat import text_type, PY2 class BaseError(Exception): """Baseclass for all Plan errors.""" if PY2: def __...
bsd-3-clause
kanghtta/zerorpc-python
zerorpc/core.py
53
15303
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
mit
xfournet/intellij-community
plugins/hg4idea/testData/bin/hgext/factotum.py
91
4221
# factotum.py - Plan 9 factotum integration for Mercurial # # Copyright (C) 2012 Steven Stallion <sstallion@gmail.com> # # 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 L...
apache-2.0
nasirali1/CerebralCortex
cerebralcortex/data_processor/cStress.py
1
6648
# Copyright (c) 2016, MD2K Center of Excellence # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditio...
bsd-2-clause
Vishluck/sympy
sympy/combinatorics/partitions.py
82
19983
from __future__ import print_function, division from sympy.core import Basic, Dict, sympify from sympy.core.compatibility import as_int, default_sort_key, range from sympy.functions.combinatorial.numbers import bell from sympy.matrices import zeros from sympy.sets.sets import FiniteSet from sympy.utilities.iterables i...
bsd-3-clause
pschorf/gcc-races
contrib/testsuite-management/validate_failures.py
23
18811
#!/usr/bin/python # Script to compare testsuite failures against a list of known-to-fail # tests. # # NOTE: This script is used in installations that are running Python 2.4. # Please stick to syntax features available in 2.4 and earlier # versions. # Contributed by Diego Novillo <dnovillo@google.com> # # ...
gpl-2.0
alex/warehouse
tests/unit/cache/origin/test_init.py
3
8664
# 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 # distributed under the Li...
apache-2.0
galtys/odoo
addons/hr_expense/report/hr_expense_report.py
29
6423
# -*- 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...
agpl-3.0
GdZ/scriptfile
software/googleAppEngine/google/storage/speckle/python/django/backend/base.py
2
8620
#!/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...
mit
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/third_party/webdriver/pylib/selenium/webdriver/ie/webdriver.py
10
2039
#!/usr/bin/python # # Copyright 2008-2010 WebDriver committers # Copyright 2008-2010 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/license...
mit
aral/isvat
django/conf/locale/fr/formats.py
107
1315
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'H:i:s' DATE...
mit
ivandevp/django
django/contrib/auth/forms.py
100
14241
from __future__ import unicode_literals from django import forms from django.contrib.auth import ( authenticate, get_user_model, password_validation, ) from django.contrib.auth.hashers import ( UNUSABLE_PASSWORD_PREFIX, identify_hasher, ) from django.contrib.auth.models import User from django.contrib.auth.tok...
bsd-3-clause
js0701/chromium-crosswalk
tools/coverity/coverity.py
179
11670
#!/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. """ Runs Coverity Prevent on a build of Chromium. This script should be run in a Visual Studio Command Prompt, so that the INCLUDE...
bsd-3-clause
RackSec/ansible
lib/ansible/parsing/quoting.py
241
1141
# (c) 2014 James Cammarata, <jcammarata@ansible.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 Foundation, either version 3 of the License, or # (at your option) any late...
gpl-3.0
Samuel789/MediPi
MedManagementWeb/env/lib/python3.5/site-packages/django/contrib/gis/geoip/base.py
334
11859
import os import re import warnings from ctypes import c_char_p from django.contrib.gis.geoip.libgeoip import GEOIP_SETTINGS from django.contrib.gis.geoip.prototypes import ( GeoIP_country_code_by_addr, GeoIP_country_code_by_name, GeoIP_country_name_by_addr, GeoIP_country_name_by_name, GeoIP_database_info,...
apache-2.0
alexus37/AugmentedRealityChess
pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGL/raw/GLES2/EXT/disjoint_timer_query.py
8
1931
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLES2 import _types as _cs # End users want this... from OpenGL.raw.GLES2._types import * from OpenGL.raw.GLES2 import _errors from OpenGL.constant import Constant as _C import...
mit
ryfeus/lambda-packs
Spacy/source2.7/spacy/lang/hi/stop_words.py
3
2877
# coding: utf8 from __future__ import unicode_literals # Source: https://github.com/taranjeet/hindi-tokenizer/blob/master/stopwords.txt STOP_WORDS = set(""" अंदर अत अदि अप अपना अपनि अपनी अपने अभि अभी अंदर आदि आप इंहिं इंहें इंहों इतयादि इत्यादि इन इनका इन्हीं इन्हें इन्हों इस इसका इसकि इसकी इसके इसमें इसि इसी इसे उं...
mit
GoogleCloudPlatform/mlops-on-gcp
on_demand/kfp-caip-sklearn/lab-03-kfp-cicd/pipeline/covertype_training_pipeline.py
6
7511
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
jocave/snapcraft
snapcraft/tests/fixture_setup.py
1
8063
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015, 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...
gpl-3.0
qsnake/gpaw
gpaw/test/diamond_absorption.py
1
1342
import numpy as np import sys import time from ase.units import Bohr from ase.structure import bulk from gpaw import GPAW, FermiDirac from gpaw.atom.basis import BasisMaker from gpaw.response.df import DF from gpaw.mpi import serial_comm, rank, size from gpaw.utilities import devnull if rank != 0: sys.stdout = dev...
gpl-3.0
pyecs/servo
tests/wpt/update/github.py
197
5152
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json from urlparse import urljoin requests = None class GitHubError(Exception): def __init__(self, status, d...
mpl-2.0
kalikaneko/pyzqm-deb
docs/sphinxext/ipython_console_highlighting.py
112
4183
"""reST directive for syntax-highlighting ipython interactive sessions. XXX - See what improvements can be made based on the new (as of Sept 2009) 'pycon' lexer for the python console. At the very least it will give better highlighted tracebacks. """ #-----------------------------------------------------------------...
lgpl-3.0
ME-ICA/me-ica
gooey/gui/widgets/components.py
1
7202
from functools import partial import wx from gooey.gui.util import wx_util from gooey.gui.widgets import widget_pack class BaseGuiComponent(object): widget_class = None def __init__(self, parent, title, msg, choices=None): ''' :param data: field info (title, help, etc..) :param widg...
lgpl-2.1
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/django/contrib/contenttypes/generic.py
86
20290
""" Classes allowing "generic" relations through ContentType and object-id fields. """ from collections import defaultdict from functools import partial from operator import attrgetter from django.core.exceptions import ObjectDoesNotExist from django.db import connection from django.db.models import signals from djan...
agpl-3.0
cabincode/django-djembe
djembe/tests/data.py
2
6487
RECIPIENT1_KEY = """-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEA0JLAp80Qa/AhjwK17UaM37J5ddQg87B163ImY8mMPSruNk0u dUc7WFoTtQ90uGhCm8C6VZx7RDji5tzPeVJTAPOQO1IZaGvgJI1e1fayzyvX1Mbj MSOnEBoZRWLSJIndL4jrkfDGpUL0ifJlVg+KzAK42b5Jvdd0fdPeFJuqtaP/Pknh G2jB9cNOuQTU4fU0hguOJViyTov4Nht9zSEd8/W3jnT/tWSaltfHG9a8QoN89Tnq e4tppia1...
cc0-1.0
schubergphilis/MCT-shared
ci/ci-setup-infra.py
3
1306
#!/usr/bin/env python import sys import click from Cosmic.CI import CI from Cosmic.NSX import NSX @click.command() @click.option('--marvin-config', '-m', help='Marvin config file', required=True) @click.option('--cloudstack', '-c', help='Cloudstack deploy mode', default=False, is_flag=True, required=False) @click.op...
apache-2.0
bjorand/django-allauth
allauth/socialaccount/providers/vk/tests.py
3
1215
from __future__ import absolute_import from allauth.socialaccount.tests import OAuth2TestsMixin from allauth.tests import MockedResponse, TestCase from .provider import VKProvider class VKTests(OAuth2TestsMixin, TestCase): provider_id = VKProvider.id def get_mocked_response(self, verified_email=True): ...
mit
AutorestCI/azure-sdk-for-python
azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/__init__.py
2
2821
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
betoesquivel/PLYpractice
env/lib/python2.7/site-packages/pip/operations/freeze.py
84
3860
from __future__ import absolute_import import logging import re import pip from pip.compat import stdlib_pkgs from pip.req import InstallRequirement from pip.utils import get_installed_distributions from pip._vendor import pkg_resources logger = logging.getLogger(__name__) # packages to exclude from freeze output ...
mit
eaas-framework/virtualbox
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/GenFds/Vtf.py
11
7215
## @file # process VTF generation # # Copyright (c) 2007, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found ...
gpl-2.0
wangjun/pyload
module/plugins/hoster/PornhubCom.py
3
2495
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from module.plugins.Hoster import Hoster class PornhubCom(Hoster): __name__ = "PornhubCom" __type__ = "hoster" __pattern__ = r'http://[\w\.]*?pornhub\.com/view_video\.php\?viewkey=[\w\d]+' __version__ = "0.5" __description__ = """Pornhub.com...
gpl-3.0
iulian787/spack
var/spack/repos/builtin/packages/pnmpi/package.py
5
1762
# Copyright 2013-2020 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 Pnmpi(CMakePackage): """PnMPI is a dynamic MPI tool infrastructure that builds on top of ...
lgpl-2.1
sigma-random/androguard
androguard/decompiler/dad/util.py
9
5858
# This file is part of Androguard. # # Copyright (c) 2012 Geoffroy Gueguen <geoffroy.gueguen@gmail.com> # 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://...
apache-2.0
hyperized/ansible
test/units/modules/network/f5/test_bigip_qkview.py
38
5656
# -*- coding: utf-8 -*- # # Copyright (c) 2017 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, ...
gpl-3.0
thnee/ansible
lib/ansible/modules/network/cloudengine/ce_vrf_interface.py
13
15784
#!/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...
gpl-3.0
alexus37/AugmentedRealityChess
pythonAnimations/pyOpenGLChess/engineDirectory/oglc-env/lib/python2.7/site-packages/OpenGL/GL/SUNX/constant_data.py
9
1094
'''OpenGL extension SUNX.constant_data This module customises the behaviour of the OpenGL.raw.GL.SUNX.constant_data to provide a more Python-friendly API Overview (from the spec) This extension allows the pixel data specified by the application to be used internally without making a second copy. This extension...
mit
wangqiang8511/troposphere
examples/RDS_VPC.py
30
3676
# Converted from RDS_VPC.template located at: # http://aws.amazon.com/cloudformation/aws-cloudformation-templates/ from troposphere import GetAtt, Join, Output, Parameter, Ref, Template from troposphere.ec2 import SecurityGroup from troposphere.rds import DBInstance, DBSubnetGroup t = Template() t.add_description( ...
bsd-2-clause
joisig/grit-i18n
grit/tool/build_unittest.py
16
13283
#!/usr/bin/env python # 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. '''Unit tests for the 'grit build' tool. ''' import codecs import os import sys import tempfile if __name__ == '__main__': sys.p...
bsd-2-clause
sjug/origin
vendor/github.com/heketi/heketi/extras/tools/comparison.py
8
10218
#!/usr/bin/env python # # Copyright (c) 2018 The heketi Authors # # This file is licensed to you under your choice of the GNU Lesser # General Public License, version 3 or any later version (LGPLv3 or # later), or the GNU General Public License, version 2 (GPLv2), in all # cases as published by the Free Software Founda...
apache-2.0
Orav/kbengine
kbe/res/scripts/common/Lib/test/test_netrc.py
2
4737
import netrc, os, unittest, sys, textwrap from test import support temp_filename = support.TESTFN class NetrcTestCase(unittest.TestCase): def make_nrc(self, test_data): test_data = textwrap.dedent(test_data) mode = 'w' if sys.platform != 'cygwin': mode += 't' ...
lgpl-3.0