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
madphysicist/numpy
numpy/distutils/tests/test_fcompiler_intel.py
17
1058
import numpy.distutils.fcompiler from numpy.testing import assert_ intel_32bit_version_strings = [ ("Intel(R) Fortran Intel(R) 32-bit Compiler Professional for applications" "running on Intel(R) 32, Version 11.1", '11.1'), ] intel_64bit_version_strings = [ ("Intel(R) Fortran IA-64 Compiler Professional ...
bsd-3-clause
Xhuis/-tg-station
tools/linux_build.py
82
2665
#!/usr/bin/env python import subprocess import os import sys import argparse import time from subprocess import PIPE, STDOUT null = open("/dev/null", "wb") def wait(p): rc = p.wait() if rc != 0: p = play("sound/misc/compiler-failure.ogg") p.wait() assert p.returncode == 0 sys....
agpl-3.0
klunwebale/odoo
addons/hw_posbox_homepage/__openerp__.py
313
1691
# -*- 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
UXE/local-edx
common/djangoapps/student/auth.py
3
3996
""" The application interface to roles which checks whether any user trying to change authorization has authorization to do so, which infers authorization via role hierarchy (GlobalStaff is superset of auths of course instructor, ...), which consults the config to decide whether to check course creator role, and other ...
agpl-3.0
guozhangwang/kafka
tests/kafkatest/tests/streams/streams_application_upgrade_test.py
3
15764
# 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
ax003d/openerp
openerp/addons/hr_recruitment/__init__.py
433
1145
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
bkendzior/scipy
scipy/signal/__init__.py
2
12650
""" ======================================= Signal processing (:mod:`scipy.signal`) ======================================= Convolution =========== .. autosummary:: :toctree: generated/ convolve -- N-dimensional convolution. correlate -- N-dimensional correlation. fftconvolve --...
bsd-3-clause
ChristophTWeinmann/GDB
gdb/python/lib/gdb/frames.py
11
7973
# Frame-filter commands. # Copyright (C) 2013 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 Free Software Foundation; either version 3 of the License, or # (at your option) any later ver...
gpl-2.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.2/Lib/copy.py
1
9316
"""Generic (shallow and deep) copying operations. Interface summary: import copy x = copy.copy(y) # make a shallow copy of y x = copy.deepcopy(y) # make a deep copy of y For module specific errors, copy.error is raised. The difference between shallow and deep copying is only relev...
mit
moijes12/oh-mainline
vendor/packages/Django/django/contrib/localflavor/za/forms.py
109
1977
""" South Africa-specific Form helpers """ from __future__ import unicode_literals from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import CharField, RegexField from django.utils.checksums import luhn from django.utils.translation import gettext as _ imp...
agpl-3.0
boundarydevices/android_external_chromium_org
tools/perf/benchmarks/browsermark.py
9
2240
# 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. """Runs Browsermark CSS, DOM, WebGL, JS, resize and page load benchmarks. Browsermark benchmark suite have five test groups: a) CSS group: measures your bro...
bsd-3-clause
cloudbau/cinder
cinder/exception.py
1
17677
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
rynomster/django
django/db/models/__init__.py
2
1624
from functools import wraps from django.core.exceptions import ObjectDoesNotExist # NOQA from django.db.models import signals # NOQA from django.db.models.aggregates import * # NOQA from django.db.models.deletion import ( # NOQA CASCADE, DO_NOTHING, PROTECT, SET, SET_DEFAULT, SET_NULL, ProtectedError, ) from d...
bsd-3-clause
loolwv7/scripts
Linux_Tricks/Mutt_how_to.py
1
3730
= MUTT = == Exchange Mail Server == {{{ layman -a sabayon echo net-mail/davmail-bin ~amd64 >> /etc/portage/package.accept_keywords emerge davmail-bin }}} davmail.sh {{{ https://wiki.debian.org/Mutt http://blog.johanv.org/posts/old/node-206.html http://www.emperor-it.com/techreviews/72-offlineimap-synchronisation-...
gpl-3.0
bkirui/odoo
addons/website_sale/models/payment.py
137
1364
# -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.osv import orm, fields class PaymentTransaction(orm.Model): _inherit = 'payment.transaction' _columns = { # link with the sale order 'sale_order_id': fields.many2one('sale.order', 'Sale Order'), } def form_feedbac...
agpl-3.0
blighli/SublimeHighlight
pygments/lexers/__init__.py
4
7899
# -*- coding: utf-8 -*- """ pygments.lexers ~~~~~~~~~~~~~~~ Pygments lexers. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys import types import fnmatch from os.path import basename from pygments.lexers._mapping import LEX...
mit
RouxRC/weboob
modules/ina/browser.py
7
1551
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Christophe Benz # # 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 yo...
agpl-3.0
django-blog-zinnia/zinnia-url-shortener-hashids
demo_zinnia_hashids/urls.py
1
1634
"""Urls for the zinnia-hashids demo""" from django.conf import settings from django.contrib import admin from django.conf.urls import url from django.conf.urls import include from django.conf.urls import patterns from django.views.generic.base import RedirectView from zinnia.sitemaps import TagSitemap from zinnia.site...
bsd-3-clause
knone1/pinaslang-zenfone5-kernel
tools/perf/util/setup.py
2079
1438
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
adviti/melange
app/gdata/auth.py
190
37921
#!/usr/bin/python # # Copyright (C) 2007 - 2009 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 applicab...
apache-2.0
michelts/lettuce
tests/integration/lib/Django-1.2.5/django/contrib/gis/admin/options.py
45
5095
from django.conf import settings from django.contrib.admin import ModelAdmin from django.contrib.gis.admin.widgets import OpenLayersWidget from django.contrib.gis.gdal import OGRGeomType from django.contrib.gis.db import models class GeoModelAdmin(ModelAdmin): """ The administration options class for Geographi...
gpl-3.0
briend/mypaint
gui/mvp.py
1
11688
# This file is part of MyPaint. # -*- coding: utf-8 -*- # Copyright (C) 2017 by the MyPaint Development Team. # # 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, o...
gpl-2.0
berrzebb/berrzebbkernel-sgs3
tools/perf/scripts/python/sched-migration.py
11215
11670
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
gpl-2.0
kennethreitz/pipenv
pipenv/patched/notpip/_vendor/webencodings/mklabels.py
512
1305
""" webencodings.mklabels ~~~~~~~~~~~~~~~~~~~~~ Regenarate the webencodings.labels module. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. """ import json try: from urllib import urlopen except ImportError: from urllib.request import urlopen def asser...
mit
prarthitm/edxplatform
common/djangoapps/student/middleware.py
172
1450
""" Middleware that checks user standing for the purpose of keeping users with disabled accounts from accessing the site. """ from django.http import HttpResponseForbidden from django.utils.translation import ugettext as _ from django.conf import settings from student.models import UserStanding class UserStandingMidd...
agpl-3.0
kayframework/kay-framework
kay/auth/models.py
5
7246
# -*- coding: utf-8 -*- """ Kay authentication models. :Copyright: (c) 2009 Accense Technology, Inc. Takashi Matsuo <tmatsuo@candit.jp>, Ian Lewis <IanMLewis@gmail.com> All rights reserved. :license: BSD, see LICENSE for more details. """ from google.ap...
bsd-3-clause
thepiper/standoff
venv/lib/python2.7/site-packages/pip/wheel.py
187
30186
""" Support for installing and building the "wheel" binary package format. """ from __future__ import absolute_import import compileall import csv import errno import functools import hashlib import logging import os import os.path import re import shutil import stat import sys import tempfile import warnings from ba...
gpl-3.0
Just-D/chromium-1
chrome/common/extensions/docs/server2/branch_utility_test.py
77
7693
#!/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. import os import sys import unittest from branch_utility import BranchUtility, ChannelInfo from fake_url_fetcher import FakeUrlFet...
bsd-3-clause
psb-seclab/MAdKiller
pywebsocket-0.7.9/src/test/test_handshake_hybi.py
1
22956
#!/usr/bin/env python # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
gpl-2.0
IRC-SPHERE/HyperStream
hyperstream/tools/asset_splitter/__init__.py
51
1144
# The MIT License (MIT) # Copyright (c) 2014-2017 University of Bristol # # 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...
mit
TAXIIProject/libtaxii
libtaxii/test/clients_test.py
1
1589
# Copyright (c) 2017, The MITRE Corporation # For license information, see the LICENSE.txt file import datetime from dateutil.tz import tzutc import libtaxii as t import libtaxii.clients as tc import libtaxii.messages as tm from libtaxii.constants import * # NOTE: This cannot currently be run as a unit test because...
bsd-3-clause
mjescobar/RF_Estimation
Utils/Scripts_Gratings/Process_Gratings.py
1
7579
import numpy as np import matplotlib.pylab as plt ##125 ### V2 value_E11a_v2=[0.0472727273,0.0113636364,0.0140909091,0.0477272727,0.0259090909,0.0186363636,0.0254545455,0.0227272727,0.0472727273] value_E7a_v2=[0.1340909091,0.125,0.145,0.1086363636,0.0840909091,0.1022727273,0.1127272727,0.1186363636,0.1340909091] val...
gpl-2.0
vishnugonela/boto
boto/route53/exception.py
151
1239
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # withou...
mit
WoLpH/EventGhost
eg/Classes/IrDecoder/Rc6.py
1
3636
# -*- coding: utf-8 -*- # # This file is part of EventGhost. # Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/> # # EventGhost 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 versio...
gpl-2.0
JohnDenker/brython
www/src/Lib/test/test_code.py
29
3590
"""This module includes tests of the code object representation. >>> def f(x): ... def g(y): ... return x + y ... return g ... >>> dump(f.__code__) name: f argcount: 1 kwonlyargcount: 0 names: () varnames: ('x', 'g') cellvars: ('x',) freevars: () nlocals: 2 flags: 3 consts: ('None', '<code object g>',...
bsd-3-clause
rooshilp/CMPUT410W15-project
testenv/lib/python2.7/site-packages/django/contrib/gis/db/models/manager.py
83
3548
from django.db.models.manager import Manager from django.contrib.gis.db.models.query import GeoQuerySet class GeoManager(Manager): "Overrides Manager to return Geographic QuerySets." # This manager should be used for queries on related fields # so that geometry columns on Oracle and MySQL are selected ...
gpl-2.0
zpace/MaNGA-fitting
ppxf_util.py
1
12458
####################################################################### # # Copyright (C) 2001-2014, Michele Cappellari # E-mail: cappellari_at_astro.ox.ac.uk # # This software is provided as is without any warranty whatsoever. # Permission to use, for non-commercial purposes is granted. # Permission to modify for pers...
mit
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.4/Lib/markupbase.py
1
14078
"""Shared support for scanning document type declarations in HTML and XHTML.""" import re _declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*').match _declstringlit_match = re.compile(r'(\'[^\']*\'|"[^"]*")\s*').match _commentclose = re.compile(r'--\s*>') _markedsectionclose = re.compile(r']\s*]\s*>') # An ana...
mit
colin2k/VVS
lib/werkzeug/contrib/securecookie.py
318
12204
# -*- coding: utf-8 -*- r""" werkzeug.contrib.securecookie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements a cookie that is not alterable from the client because it adds a checksum the server checks for. You can use it as session replacement if all you have is a user id or something to mark ...
apache-2.0
legacysurvey/obiwan
py/obiwan/qa/number_finished_by_slurm.py
1
1248
""" Given a qdo slurm log file, this computes the fraction of launched bricks that resulted in a tractor table to the total number of launched bricksself. This is a useful test of scaling. More nodes with more time should create more tractor catalogues than less nodes with less time. """ import pandas as pd import os...
bsd-3-clause
DataDog/integrations-core
datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/jmx.py
1
1364
# (C) Datadog, Inc. 2020-present # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import click from ..console import CONTEXT_SETTINGS @click.group(context_settings=CONTEXT_SETTINGS, short_help='JMX utilities') def jmx(): pass @jmx.command(context_settings=CONTEXT_SETTINGS, short_hel...
bsd-3-clause
flyher/pymo
symbian/PythonForS60/module-repo/standard-modules/difflib.py
4
80831
#! /usr/bin/env python # Portions Copyright (c) 2008 Nokia Corporation """ Module difflib -- helpers for computing deltas between objects. Function get_close_matches(word, possibilities, n=3, cutoff=0.6): Use SequenceMatcher to return list of the best "good enough" matches. Function context_diff(a, b): For tw...
mit
40223202/test
static/Brython3.1.3-20150514-095342/Lib/markdown2.py
669
8143
import browser.html import re class URL: def __init__(self,src): elts = src.split(maxsplit=1) self.href = elts[0] self.alt = '' if len(elts)==2: alt = elts[1] if alt[0]=='"' and alt[-1]=='"':self.alt=alt[1:-1] elif alt[0]=="'" and alt[-1]=="'":sel...
agpl-3.0
cogmission/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/backends/backend_gtkcairo.py
69
2207
""" GTK+ Matplotlib interface using cairo (not GDK) drawing operations. Author: Steve Chaplin """ import gtk if gtk.pygtk_version < (2,7,0): import cairo.gtk from matplotlib.backends import backend_cairo from matplotlib.backends.backend_gtk import * backend_version = 'PyGTK(%d.%d.%d) ' % gtk.pygtk_version + \ ...
agpl-3.0
Salat-Cx65/python-for-android
python3-alpha/python3-src/Lib/test/test_cmd_line_script.py
51
12306
# tests command line execution of scripts import unittest import sys import os import os.path import py_compile from test import support from test.script_helper import ( make_pkg, make_script, make_zip_pkg, make_zip_script, assert_python_ok, assert_python_failure, temp_dir) verbose = support.verbose test_so...
apache-2.0
Vishluck/sympy
sympy/functions/elementary/tests/test_miscellaneous.py
38
9401
from sympy.core.function import Function from sympy.core.numbers import I, oo, Rational from sympy.core.singleton import S from sympy.core.symbol import Symbol from sympy.functions.elementary.miscellaneous import (sqrt, cbrt, root, Min, Max, real_root) from sympy.fu...
bsd-3-clause
simbs/edx-platform
common/djangoapps/util/file.py
114
6925
""" Utility methods related to file handling. """ from datetime import datetime import os from pytz import UTC from django.core.exceptions import PermissionDenied from django.core.files.storage import DefaultStorage, get_valid_filename from django.utils.translation import ugettext as _ from django.utils.translation i...
agpl-3.0
tastynoodle/django
tests/admin_changelist/tests.py
3
30161
from __future__ import unicode_literals import datetime from django.contrib import admin from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.templatetags.admin_list import pagination from django.contrib.admin.views.main import ChangeList, SEARCH_VAR, ALL_VAR from django.contri...
bsd-3-clause
ericzolf/ansible
lib/ansible/plugins/become/sudo.py
29
3467
# -*- coding: utf-8 -*- # Copyright: (c) 2018, 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 DOCUMENTATION = """ name: sudo short_description: Substitute User D...
gpl-3.0
FGtatsuro/flask-boilerplate
tests/test_boilerplate_commands.py
1
1669
#!/usr/bin/env python # -*- coding: utf-8 -*- from contextlib import contextmanager import os import os.path from shutil import copy2 from subprocess import Popen, PIPE from tempfile import mkdtemp @contextmanager def cd(new): old = os.getcwd() try: os.chdir(new) yield finally: os....
mit
arshadmohammad/zookeeper
zookeeper-contrib/zookeeper-contrib-zkpython/src/test/async_test.py
5
1288
#!/usr/bin/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 # "Lic...
apache-2.0
Castronova/ODM2PythonAPI
tests/test_odm1/test_odmservices/test_series_service.py
1
12538
from odmtools.odmdata import * from odmtools.odmservices import SeriesService from tests import test_util class TestSeriesService: def setup(self): self.connection_string = "sqlite:///:memory:" self.series_service = SeriesService(self.connection_string, debug=False) self.session = self.se...
bsd-3-clause
rvs/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/lib/dbstate.py
4
3081
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
apache-2.0
priseborough/ardupilot
Tools/ardupilotwaf/ap_library.py
21
6948
# Copyright (C) 2016 Intel Corporation. All rights reserved. # # This file 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 fi...
gpl-3.0
muawijhe/ccnavio
ext/navio/Utilities/3DIMU/3Dimu.py
2
4563
# This code is provided under the BSD license. # Copyright (c) 2014, Emlid Limited. All rights reserved. # Written by Mikhail Avkhimenia (mikhail.avkhimenia@emlid.com) # twitter.com/emlidtech || www.emlid.com || info@emlid.com # # This application visualizes Navio's IMU data. Tested to work under Ubuntu and # Mac OS X...
mit
rosmo/ansible
lib/ansible/modules/packaging/language/maven_artifact.py
15
23199
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2014, Chris Schmidt <chris.schmidt () contrastsecurity.com> # # Built using https://github.com/hamnis/useful-scripts/blob/master/python/download-maven-artifact # as a reference and starting point. # # GNU General Public License v3.0+ (see COPYING or https://www...
gpl-3.0
jamesls/boto
boto/mws/exception.py
31
2547
# Copyright (c) 2012 Andy Davidoff http://www.disruptek.com/ # # 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, mod...
mit
aaltinisik/OCBAltinkaya
addons/l10n_be_coda/__openerp__.py
260
3869
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
orestkreminskyi/taf
utils/iperflexer/finder.py
2
3952
""" Copyright (c) 2014 Russell Nakamura 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, distribut...
apache-2.0
blablack/beatslash-lv2
waflib/extras/codelite.py
55
33888
#! /usr/bin/env python # encoding: utf-8 # CodeLite Project # Christian Klein (chrikle@berlios.de) # Created: Jan 2012 # As templete for this file I used the msvs.py # I hope this template will work proper """ Redistribution and use in source and binary forms, with or without modification, are permitted provided that ...
gpl-3.0
hfp/tensorflow-xsmm
tensorflow/python/ops/check_ops.py
7
64743
# 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...
apache-2.0
labsanmartin/Bika-LIMS
bika/lims/browser/supplyorder.py
2
5192
from Products.CMFPlone.utils import _createObjectByType from zope import event from Products.CMFCore.utils import getToolByName from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from operator import itemgetter, methodcaller from bika.lims import bikaMessageFactory as _ from bika.lims.browser imp...
agpl-3.0
Lekanich/intellij-community
python/helpers/profiler/thriftpy3/transport/TSocket.py
51
5735
# # 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...
apache-2.0
leki75/ansible
lib/ansible/modules/network/f5/bigip_hostname.py
26
5767
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016 F5 Networks 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
landonb/argcomplete
test/test.py
2
19764
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import os import shutil import sys from tempfile import TemporaryFile, mkdtemp sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from argparse import Argu...
apache-2.0
17zuoye/jieba
jieba/analyse/analyzer.py
6
1426
#encoding=utf-8 from whoosh.analysis import RegexAnalyzer,LowercaseFilter,StopFilter,StemFilter from whoosh.analysis import Tokenizer,Token from whoosh.lang.porter import stem import jieba import re STOP_WORDS = frozenset(('a', 'an', 'and', 'are', 'as', 'at', 'be', 'by', 'can', 'for', 'from',...
mit
DolphinDream/sverchok
nodes/surface/apply_field_to_surface.py
2
4106
import numpy as np import bpy from bpy.props import FloatProperty, EnumProperty, BoolProperty, IntProperty from sverchok.node_tree import SverchCustomTreeNode from sverchok.data_structure import updateNode, zip_long_repeat from sverchok.utils.surface.algorithms import SvDeformedByFieldSurface, PROJECT, COPROJECT fro...
gpl-3.0
VarunRaval48/SignCode
java.sign/TestScripts/Invalid/python/createAndProcessPython.py
1
2823
# **************************************************************************** # Copyright (c) 2015 UT-Battelle, LLC. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available a...
gpl-3.0
alexei-matveev/ase-local
ase/cluster/cluster.py
6
4165
import os import math import numpy as np import cPickle as pickle from ase import Atoms from ase.data import chemical_symbols from ase.cluster.base import ClusterBase class Cluster(Atoms, ClusterBase): symmetry = None surfaces = None lattice_basis = None resiproc_basis = None atomic_basis = None ...
gpl-2.0
Parsely/birding
docs/conf.py
1
11580
# -*- coding: utf-8 -*- # # birding documentation build configuration file, created by # sphinx-quickstart on Mon Aug 24 11:23:00 2015. # # 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. # # A...
apache-2.0
marctc/django
tests/m2m_regress/tests.py
273
4695
from __future__ import unicode_literals from django.core.exceptions import FieldError from django.test import TestCase from django.utils import six from .models import ( Entry, Line, Post, RegressionModelSplit, SelfRefer, SelfReferChild, SelfReferChildSibling, Tag, TagCollection, Worksheet, ) class M2MRegre...
bsd-3-clause
vicky2135/lucious
oscar/lib/python2.7/site-packages/whoosh/filedb/filestore.py
22
21584
# Copyright 2009 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
bsd-3-clause
topfs2/heimdall
src/heimdall/demands.py
1
2973
import types import re from utils import Enum match = Enum([ "NEVER", "NO", "YES" ]) class demand(object): """ Base class for what a task may demand """ def matches(self, subject): raise NotImplementedError("Need must implement matches") class predicateObjectDemand(demand): """ Base ...
gpl-2.0
arasuarun/shogun
examples/undocumented/python_modular/classifier_featureblock_logistic_regression.py
17
1312
#!/usr/bin/env python from numpy import array,hstack from numpy.random import seed, rand from tools.load import LoadMatrix lm=LoadMatrix() traindat = lm.load_numbers('../data/fm_train_real.dat') testdat = lm.load_numbers('../data/fm_test_real.dat') label_traindat = lm.load_labels('../data/label_train_twoclass.dat') p...
gpl-3.0
tudorvio/nova
nova/virt/disk/api.py
35
25175
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # # Copyright 2011, Piston Cloud Computing, Inc. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in ...
apache-2.0
ed-/solum
solum/tests/objects/test_extension.py
7
2334
# 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 th...
apache-2.0
imwiththou/GoAgent
local/gevent-1.0rc2/greentest/2.6/test_wsgiref.py
5
18126
from __future__ import nested_scopes # Backward compat for 2.1 from unittest import TestCase from wsgiref.util import setup_testing_defaults from wsgiref.headers import Headers from wsgiref.handlers import BaseHandler, BaseCGIHandler from wsgiref import util from wsgiref.validate import validator from wsgiref.simple...
mit
timokoola/lambdabot
requests/requests/packages/urllib3/request.py
714
5988
from __future__ import absolute_import try: from urllib.parse import urlencode except ImportError: from urllib import urlencode from .filepost import encode_multipart_formdata __all__ = ['RequestMethods'] class RequestMethods(object): """ Convenience mixin for classes who implement a :meth:`urlopen...
gpl-2.0
vulcansteel/autorest
AutoRest/Generators/Python/Python.Tests/AcceptanceTests/complex_tests.py
1
14821
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""),...
mit
haridas/image_uploader_py
uploader/views.py
1
5548
""" @date: 27/Nov/2014 @author: Haridas N<haridas.nss@gmail.com> """ import json import tempfile import logging from django.views.generic import View from django.http import HttpResponse from django.contrib.auth.models import User from django.core.files import File from django.utils.module_loading import import_strin...
mit
nvie/python-mode
pymode/libs/pylama/lint/pylama_pylint/pylint/config.py
17
5645
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). # 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...
lgpl-3.0
uyaly/test
testcase/1_del/Case15_league_del.py
1
2773
# coding:utf-8 import time import unittest import ddt from pageobject.account.Page_Account import Page_Account from selenium import webdriver from pageobject.Page_Login import Page_Login from utils.config import Config from utils.log1 import Log from pageobject.account.Page_Account_league_ADD import Page_Account_league...
gpl-2.0
wang1352083/pythontool
python-2.7.12-lib/test/test_string.py
8
18637
import unittest import string from string import Template from test import test_support, string_tests from UserList import UserList class StringTest( string_tests.CommonTest, string_tests.MixinStrStringUserStringTest ): type2test = str def checkequal(self, result, object, methodname, *args): ...
mit
hyu754/hyu754.github.io
model_1/tutorials/examples/animation_deforming_heart/animation_deforming_heart_ui.py
2
3767
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'deforming_heart.ui' # # Created: Mon Sep 30 11:52:34 2013 # by: PyQt4 UI code generator 4.10.3 # # WARNING! All changes made in this file will be lost! try: from PySide import QtCore, QtGui except ImportError: from PyQt4 import...
mit
NicovincX2/Python-3.5
Divers/Mastermind/mastermind_tkinter.py
1
7556
# -*- coding: utf-8 -*- import os from tkinter import * from tkinter.messagebox import * import random def fac(n): if n == 0: return 1 else: return (fac(n - 1) * n) def permutations(items): n = len(items) if n == 0: yield [] else: for i in range(len(items)): ...
gpl-3.0
pengdonglin137/linux-4.9
Documentation/sphinx/kernel_include.py
949
8570
#!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- # pylint: disable=R0903, C0330, R0914, R0912, E0401 u""" kernel-include ~~~~~~~~~~~~~~ Implementation of the ``kernel-include`` reST-directive. :copyright: Copyright (C) 2016 Markus Heiser :license: GPL Version 2, June 1991 see lin...
gpl-2.0
aspose-pdf/Aspose.Pdf-for-Cloud
SDKs/Aspose.Pdf-Cloud-SDK-for-Python/tests/test_PdfApi.py
2
40224
import unittest import os.path import json import inspect import requests import asposepdfcloud from asposepdfcloud.PdfApi import PdfApi from asposepdfcloud.PdfApi import ApiException from asposepdfcloud.models import AnnotationResponse from asposepdfcloud.models import AnnotationsResponse from asposepdfcloud.models i...
mit
BadSingleton/pyside2
tests/QtCore/qdatastream_test.py
3
10324
#!/usr/bin/python '''Unit tests for QDataStream''' import unittest import py3kcompat as py3k from PySide2.QtCore import QBitArray, QByteArray, QIODevice, QDataStream, QDate, QTime, QDateTime def create_bitarray(string): array = QBitArray(len(string)) for i, char in enumerate(string): array.setBit(i, ...
lgpl-2.1
mitar/django
tests/regressiontests/localflavor/se/tests.py
33
6441
# -*- coding: utf-8 -*- from django.contrib.localflavor.se.forms import (SECountySelect, SEOrganisationNumberField, SEPersonalIdentityNumberField, SEPostalCodeField) import datetime from django.test import SimpleTestCase class SELocalFlavorTests(SimpleTestCase): def setUp(self): # Mocking dateti...
bsd-3-clause
anisku11/sublimeku
Packages/CodeComplice/libs/codeintel2/css_linter.py
10
66355
#!python # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (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.mozilla.org/MPL/ #...
mit
loljoho-old/ainu
pyaib/triggers.py
2
6364
#!/usr/bin/env python # # Copyright 2013 Facebook # # 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 agree...
apache-2.0
riklaunim/django-custom-multisite
django/utils/ipv6.py
99
7871
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/ # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError def clean_ipv6_address(ip_str, unpack_ipv4=False, error_message="This is not a valid IP...
bsd-3-clause
nuuuboo/odoo
addons/purchase_analytic_plans/purchase_analytic_plans.py
378
1667
# -*- 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
alexhenrie/poedit
deps/boost/tools/build/test/project_root_constants.py
51
1399
#!/usr/bin/python # Copyright 2003, 2004, 2005 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import BoostBuild # Create a temporary working directory. t = BoostBuild.Tester() # Create the needed ...
mit
natebeacham/saml2
tests/restrictive_idp_conf.py
1
1532
from saml2 import BINDING_SOAP, BINDING_HTTP_REDIRECT from saml2.saml import NAME_FORMAT_URI BASE = "http://localhost:8089/" try: from saml2.sigver import get_xmlsec_binary xmlsec_path = get_xmlsec_binary(["/opt/local/bin"]) except ImportError: xmlsec_path = '/usr/bin/xmlsec1' CONFIG = { "entityid" :...
bsd-2-clause
PegasusWang/tornado-cn-auth
examples/weibo-test.py
4
1045
import tornado.ioloop import tornado.web import tornadocnauth.Weibo from tornado import gen class AuthHandler(tornado.web.RequestHandler, tornadocnauth.Weibo.WeiboMixin): @tornado.web.asynchronous @gen.coroutine def get(self): if self.get_argument('code', None): user = yield self.get_a...
mit
askeing/servo
etc/ci/performance/set_s3_policy.py
22
1108
#!/usr/bin/env python3 # 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 argparse import boto3 def main(): parser = argparse.ArgumentParser( descrip...
mpl-2.0
shenyy/lily2-gem5
src/arch/x86/isa/insts/romutil.py
65
7401
# Copyright (c) 2008 The Regents of The University of Michigan # 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 ...
bsd-3-clause
hefen1/chromium
tools/cr/cr/base/arch.py
113
1544
# 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. """A module for the basic architectures supported by cr.""" import cr DEFAULT = cr.Config.From( CR_ENVSETUP_ARCH='{CR_ARCH}', ) class Arch(cr.Plugin,...
bsd-3-clause
ldirer/scikit-learn
sklearn/svm/tests/test_sparse.py
63
13366
import numpy as np from scipy import sparse from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_equal) from sklearn import datasets, svm, linear_model, base from sklearn.datasets import make_classification, load_digits, make_blobs from sklearn.svm.tests import te...
bsd-3-clause