repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
trondhindenes/ansible
test/units/modules/network/dellos9/test_dellos9_facts.py
56
4619
# (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 # (at your option) any later version. # # Ansible is dis...
gpl-3.0
terranodo/eventkit-cloud
eventkit_cloud/utils/pbf.py
2
2735
# -*- coding: utf-8 -*- import argparse import logging import os import subprocess from string import Template from eventkit_cloud.tasks.task_process import TaskProcess logger = logging.getLogger(__name__) class OSMToPBF(object): """ Convert OSM to PBF. """ def __init__(self, osm=None, pbffile=No...
bsd-3-clause
facebookexperimental/eden
eden/integration/snapshot/verify.py
1
9902
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. # pyre-strict import abc import os import stat as stat_mod import typing from pathlib import Path from typing import Dict, Itera...
gpl-2.0
probablytom/tomwallis.net
venv/lib/python2.7/site-packages/docutils/transforms/components.py
196
1993
# $Id: components.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Docutils component-related transforms. """ __docformat__ = 'reStructuredText' import sys import os import re import time from docutils import nodes,...
artistic-2.0
codelv/enaml-native
src/enamlnative/widgets/popup_window.py
1
4574
""" Copyright (c) 2017, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on Mar 17, 2018 @author: jrm """ from atom.api import ( Typed, ForwardTyped, Str, Float, Coerced, Bool, Enum, observe, ) from enaml.core.declar...
mit
mgaio/parameter-framework
test/functional-tests-legacy/PfwTestCase/Types/tFP16_Q0_15.py
8
10680
# -*-coding:utf-8 -* # Copyright (c) 2011-2015, Intel Corporation # 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, thi...
bsd-3-clause
jfdsmabalot/kernel_moto-g
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
gst/alignak
alignak/macroresolver.py
2
23875
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak 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, eit...
agpl-3.0
angdraug/nova
nova/api/metadata/vendordata_json.py
4
2121
# Copyright 2013 Canonical Ltd # 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...
apache-2.0
armersong/letsencrypt
acme/acme/other_test.py
51
3247
"""Tests for acme.sig.""" import unittest from acme import jose from acme import test_util KEY = test_util.load_rsa_private_key('rsa512_key.pem') class SignatureTest(unittest.TestCase): # pylint: disable=too-many-instance-attributes """Tests for acme.sig.Signature.""" def setUp(self): self.msg...
apache-2.0
v-iam/azure-sdk-for-python
azure-mgmt-servicebus/azure/mgmt/servicebus/models/service_bus_management_client_enums.py
2
1549
# 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
redstorm45/factory-maker
graphics/text.py
1
1178
''' Copyright 2014 Pierre Cadart This file is part of Factory Maker. Factory Maker 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) a...
gpl-3.0
vitormazzi/django-jython
doj/backends/zxjdbc/oracle/query.py
1
6130
""" Custom Query class for Oracle. Derived from: django.db.models.sql.query.Query """ import datetime from django.db.backends import util # Cache. Maps default query class to new Oracle query class. _classes = {} def query_class(QueryClass, Database): """ Returns a custom django.db.models.sql.query.Query su...
bsd-3-clause
MrNuggles/HeyBoet-Telegram-Bot
temboo/Library/Google/Contacts/DeleteContact.py
5
4655
# -*- coding: utf-8 -*- ############################################################################### # # DeleteContact # Deletes a specified contact. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file exce...
gpl-3.0
johankaito/fufuka
microblog/old-flask/lib/python2.7/site-packages/whoosh/lang/morph_en.py
52
48468
""" Contains the variations() function for expanding an English word into multiple variations by programatically adding and removing suffixes. Translated to Python from the ``com.sun.labs.minion.lexmorph.LiteMorph_en`` class of Sun's `Minion search engine <https://minion.dev.java.net/>`_. """ import re from whoosh.c...
apache-2.0
LUTAN/tensorflow
tensorflow/python/util/lazy_loader.py
20
2006
# 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...
apache-2.0
simplegeo/sqlalchemy
lib/sqlalchemy/dialects/mssql/base.py
1
48621
# mssql.py """Support for the Microsoft SQL Server database. Connecting ---------- See the individual driver sections below for details on connecting. Auto Increment Behavior ----------------------- ``IDENTITY`` columns are supported by using SQLAlchemy ``schema.Sequence()`` objects. In other words:: Table('t...
mit
171121130/SWI
venv/Lib/site-packages/sqlalchemy/util/queue.py
33
6548
# util/queue.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """An adaptation of Py2.3/2.4's Queue module which supports reentrant behavior, using ...
mit
benthomasson/ansible
lib/ansible/vars/unsafe_proxy.py
51
1219
# (c) 2017, 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 # (at your option) any later...
gpl-3.0
rdeheele/odoo
openerp/service/common.py
86
1963
# -*- coding: utf-8 -*- import logging import openerp.release import openerp.tools import security _logger = logging.getLogger(__name__) RPC_VERSION_1 = { 'server_version': openerp.release.version, 'server_version_info': openerp.release.version_info, 'server_serie': openerp.release.serie, ...
agpl-3.0
edry/edx-platform
cms/djangoapps/contentstore/features/common.py
42
12769
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name import os from lettuce import world, step from nose.tools import assert_true, assert_in # pylint: disable=no-name-in-module from django.conf import settings from student.roles import CourseStaffRole, CourseInstructorRole, GlobalStaff from stu...
agpl-3.0
ravindrapanda/tensorflow
tensorflow/contrib/slim/nets.py
191
1609
# 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 applicable ...
apache-2.0
ezequielpereira/Time-Line
libs/wx/tools/Editra/setup.py
2
20538
#!/usr/bin/env python ############################################################################### # Name: setup.py # # Purpose: Setup/build script for Editra # # Author: Cody Precord <cprecord@editra.org> ...
gpl-3.0
devoid/nova
nova/tests/integrated/v3/test_instance_actions.py
12
3614
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # 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...
apache-2.0
koparasy/faultinjection-gem5
src/mem/slicc/ast/TypeFieldAST.py
92
1754
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
bsd-3-clause
pmuller/ipkg
ipkg/versions.py
1
1177
import __builtin__ # because we override sorted in this module import pkg_resources def compare(a, b): if a < b: return -1 elif a == b: return 0 else: # a > b return 1 def extract(item): if isinstance(item, dict): version = item['version'] revision = item['...
mit
thuo/bc-6-matlabette
matlabette/operators.py
1
3521
""" Operators """ from errors import InvalidArgumentsForOperator, MatlabetteRuntimeError import numpy class Operators(object): @staticmethod def add(lhs, rhs): if isinstance(lhs, float): if isinstance(rhs, float): return lhs + rhs if isinstance(rhs, list): ...
mit
yury-s/v8-inspector
Source/chrome/tools/perf/page_sets/tough_webgl_cases.py
5
2263
# 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. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module from page_sets import webgl_supported_shared_state c...
bsd-3-clause
jacquev6/LowVoltage
LowVoltage/actions/tests/integ/test_create_table.py
1
7338
# coding: utf8 # Copyright 2014-2015 Vincent Jacques <vincent@vincent-jacques.net> import datetime import LowVoltage as _lv import LowVoltage.testing as _tst class CreateTableLocalIntegTests(_tst.LocalIntegTests): def tearDown(self): self.connection(_lv.DeleteTable("Aaa")) super(CreateTableLoca...
mit
caotianwei/django
tests/one_to_one/tests.py
90
19540
from __future__ import unicode_literals from django.db import IntegrityError, connection, transaction from django.test import TestCase from .models import ( Bar, Director, Favorites, HiddenPointer, ManualPrimaryKey, MultiModel, Place, Pointer, RelatedModel, Restaurant, School, Target, UndergroundBar, Wait...
bsd-3-clause
roadmapper/ansible
lib/ansible/modules/network/fortimanager/fmgr_secprof_voip.py
38
47839
#!/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
karllessard/tensorflow
tensorflow/python/debug/examples/v2/debug_mnist_v2.py
14
8072
# 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...
apache-2.0
philippebeaudoin/mmomie
third_party/Paste/paste/cgitb_catcher.py
50
3916
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ WSGI middleware Captures any exceptions and prints a pretty report. See the `cgitb documentation <http://python.org/doc/current/lib/module-cgitb...
apache-2.0
balloob/home-assistant
tests/components/openalpr_local/test_image_processing.py
13
5024
"""The tests for the openalpr local platform.""" import homeassistant.components.image_processing as ip from homeassistant.const import ATTR_ENTITY_PICTURE from homeassistant.core import callback from homeassistant.setup import setup_component from tests.async_mock import MagicMock, PropertyMock, patch from tests.comm...
apache-2.0
tienjunhsu/trading-with-python
sandbox/spreadCalculations.py
78
1496
''' Created on 28 okt 2011 @author: jev ''' from tradingWithPython import estimateBeta, Spread, returns, Portfolio, readBiggerScreener from tradingWithPython.lib import yahooFinance from pandas import DataFrame, Series import numpy as np import matplotlib.pyplot as plt import os symbols = ['SPY','...
bsd-3-clause
benschmaus/catapult
third_party/google-endpoints/Crypto/Hash/SHA384.py
124
2853
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
bsd-3-clause
pmdp/GIW
mongodb-1/consultas.py
1
10427
# -*- coding: utf-8 -*- from bottle import run, get, request, template from pymongo import MongoClient from os import linesep mongoclient = MongoClient() db = mongoclient.giw #Columnas para las tablas de los ejercicios 2, 3, 4, 5 y 7 all_table_data = ['Nombre de usuario', 'e-mail', 'Página web', 'Tarjeta de crédito'...
gpl-3.0
Dark-Hacker/horizon
openstack_dashboard/test/integration_tests/config.py
26
3298
# 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
TakashiSasaki/ns-3-nat
src/tap-bridge/bindings/modulegen__gcc_LP64.py
12
248275
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
geodrinx/gearthview
ext-libs/twisted/cred/credentials.py
30
15450
# -*- test-case-name: twisted.test.test_newcred-*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from zope.interface import implements, Interface import hmac, time, random from twisted.python.hashlib import md5 from twisted.python.randbytes import secureRandom from twisted.cred._digest imp...
gpl-3.0
kklmn/xrt
xrt/backends/raycing/physconsts.py
1
1057
# -*- coding: utf-8 -*- __author__ = "Konstantin Klementiev", "Roman Chernikov" __date__ = "07 Jan 2016" PI = 3.1415926535897932384626433832795 PI2 = 6.283185307179586476925286766559 SQRT2PI = PI2**0.5 # =2.5066282746310002 SQ3 = 1.7320508075688772935274463415059 SQ2 = 2**0.5 # =1.4142135623730951 SQPI = PI**0.5 # ...
mit
OpenCode/purchase-workflow
__unported__/mrp_smart_purchase/__openerp__.py
20
1504
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2012 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 # publi...
agpl-3.0
keras-team/keras-contrib
keras_contrib/optimizers/lars.py
2
4499
from keras import backend as K from keras.optimizers import Optimizer class LARS(Optimizer): """Layer-wise Adaptive Rate Scaling for large batch training. Introduced by "Large Batch Training of Convolutional Networks" by Y. You, I. Gitman, and B. Ginsburg. (https://arxiv.org/abs/1708.03888) Implements...
mit
tuxfux-hlp-notes/python-batches
archieves/Batch-63/12-Logging/seventh.py
1
2105
#!/usr/bin/python # logging.basicConfig? # logging.Formatter? # man data or time.strftime(). # https://docs.python.org/2/library/subprocess.html # cronjob or scheduler # import logging.handlers for rest all handlers. from subprocess import Popen,PIPE from logging.handlers import SysLogHandler import logging #logging....
gpl-3.0
glaubitz/fs-uae-debian
launcher/OpenGL/GLES2/OES/texture_3D.py
8
1479
'''OpenGL extension OES.texture_3D This module customises the behaviour of the OpenGL.raw.GLES2.OES.texture_3D to provide a more Python-friendly API The official definition of this extension is available here: http://www.opengl.org/registry/specs/OES/texture_3D.txt ''' from OpenGL import platform, constant, arrays ...
gpl-2.0
KristianJensen/cameo
cameo/network_analysis/networkx_based.py
1
3295
# Copyright 2015 Novo Nordisk Foundation Center for Biosustainability, DTU. # # 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 requi...
apache-2.0
chand3040/cloud_that
lms/djangoapps/shoppingcart/processors/PayPal.py
1
21754
""" Implementation the PayPal processor. To enable this implementation, add the following to lms.auth.json: CC_PROCESSOR_NAME = "PayPal" CC_PROCESSOR = { "PayPal": { "PURCHASE_ENDPOINT": "sandbox or live url of paypal", "CLIENT_ID": "<paypal client_id>", "CLIENT_SEC...
agpl-3.0
hernad/erpnext
erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.py
64
2651
# 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 from frappe import _ from frappe.utils import flt def execute(filters=None): if not filters: filters = {} elif filters.get("from_date...
agpl-3.0
ic-labs/django-icekit
glamkit_collections/contrib/work_creator/plugins/links/migrations/0001_initial.py
2
2511
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import icekit.fields class Migration(migrations.Migration): dependencies = [ ('fluent_contents', '0001_initial'), ('gk_collections_work_creator', '0008_auto_20161114_1240'), ] operat...
mit
MatthewWilkes/django
tests/auth_tests/test_templates.py
328
2785
from django.contrib.auth import authenticate from django.contrib.auth.models import User from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.contrib.auth.views import ( password_change, password_change_done, password_reset, password_reset_complete, password_reset_confirm, password_res...
bsd-3-clause
crotsos/ns-3
src/visualizer/visualizer/base.py
160
3799
import ns.point_to_point import ns.csma import ns.wifi import ns.bridge import ns.internet import ns.mesh import ns.wimax import ns.wimax import ns.lte import gobject import os.path import sys PIXELS_PER_METER = 3.0 # pixels-per-meter, at 100% zoom level class PyVizObject(gobject.GObject): __gtype_name__ = "PyVi...
gpl-2.0
echanna/EdxNotAFork
lms/djangoapps/course_wiki/plugins/markdownedx/mdx_circuit.py
158
2645
#!/usr/bin/env python ''' Image Circuit Extension for Python-Markdown ====================================== Any single line beginning with circuit-schematic: and followed by data (which should be json data, but this is not enforced at this level) will be displayed as a circuit schematic. This is simply an input elem...
agpl-3.0
Arno-Nymous/pyload
module/lib/thrift/protocol/TBinaryProtocol.py
83
6501
# # 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...
gpl-3.0
u7702045/sanji-cellular
tests/test_e2e/view_cellular.py
1
2045
#!/usr/bin/env python # -*- coding: UTF-8 -*- import logging from sanji.core import Sanji from sanji.connection.mqtt import Mqtt REQ_RESOURCE = "/network/cellulars" class View(Sanji): # This function will be executed after registered. def run(self): print "Go Test 1" res = self.publish.g...
gpl-2.0
morpheby/levelup-by
common/lib/supertrace.py
74
1646
""" A handy util to print a django-debug-screen-like stack trace with values of local variables. """ import sys import traceback from django.utils.encoding import smart_unicode def supertrace(max_len=160): """ Print the usual traceback information, followed by a listing of all the local variables in each...
agpl-3.0
liangazhou/django-rdp
packages/PyDev/plugins/org.python.pydev.jython_4.4.0.201510052309/Lib/readline.py
11
6233
from __future__ import with_statement import os.path import sys from warnings import warn import java.lang.reflect.Array __all__ = ['add_history', 'clear_history', 'get_begidx', 'get_completer', 'get_completer_delims', 'get_current_history_length', 'get_endidx', 'get_history_item', 'get_history_...
apache-2.0
joerocklin/gem5
util/stats/db.py
90
14018
# Copyright (c) 2003-2004 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 ...
bsd-3-clause
lowitty/server
libsLinux/setuptools/command/install.py
496
4685
from distutils.errors import DistutilsArgError import inspect import glob import warnings import platform import distutils.command.install as orig import setuptools # Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for # now. See https://bitbucket.org/pypa/setuptools/issue/199/ _install = orig....
mit
gimler/techism2
techism2/ical/views.py
1
3450
#!/usr/local/bin/python # -*- coding: utf-8 -*- from django.http import HttpResponse from django.core.urlresolvers import reverse from techism2 import service from datetime import datetime, timedelta import icalendar import time def ical(request): ninety_days = datetime.utcnow() + timedelta(days=90) event_lis...
apache-2.0
rminnich/u-root
cmds/elvish/parse/boilerplate.py
4
3952
#!/usr/bin/python2.7 """ Generate helper functions for node types. For every node type T, it generates the following: * A IsT func that determines whether a Node is actually of type *T. * A GetT func that takes Node and returns *T. It examines whether the Node is actually of type *T, and if it is, returns it; othe...
bsd-3-clause
infobip/infobip-api-python-client
infobip/api/model/nc/notify/NumberContextResponse.py
1
1285
# -*- coding: utf-8 -*- """This is a generated class and is not intended for modification! """ from datetime import datetime from infobip.util.models import DefaultObject, serializable from infobip.api.model.nc.notify.NumberContextResponseDetails import NumberContextResponseDetails class NumberContextResponse(Defau...
apache-2.0
skoppisetty/secret-bugfixes
lib/sqlalchemy/ext/associationproxy.py
15
31482
# ext/associationproxy.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Contain the ``AssociationProxy`` class. The ``AssociationProxy`` is a Pyth...
gpl-3.0
shaufi10/odoo
addons/l10n_lu/__openerp__.py
197
2804
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2011 Thamini S.à.R.L (<http://www.thamini.com>) # Copyright (C) 2011 ADN Consultants S.à...
agpl-3.0
ELNOGAL/CMNT_00040_2016_ELN_addons
budget/report/parser_report_budget.py
2
21476
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2012 Pexego Sistemas Informáticos All Rights Reserved # $Marta Vázquez Rodríguez$ <marta@pexego.es> # # Copyright (C) 2015- Comunitea Servicios Tecnologicos All Rights Reserved # $Ki...
agpl-3.0
xindus40223115/w17_test
static/Brython3.1.3-20150514-095342/Lib/multiprocessing/process.py
694
2304
# # Module providing the `Process` class which emulates `threading.Thread` # # multiprocessing/process.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # __all__ = ['Process', 'current_process', 'active_children'] # # Imports # import os import sys import signal import itert...
gpl-3.0
glenc/sp.py
src/sp/utils.py
1
3239
# Set up References import clr clr.AddReference("System") clr.AddReference("Microsoft.SharePoint") from System import Uri from Microsoft.SharePoint import * from Microsoft.SharePoint.Administration import SPWebApplication # Enumeration # These are simple enumeration methods for walking over various SharePoint # objec...
bsd-3-clause
aurelijusb/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32/scripts/VersionStamp/bulkstamp.py
21
3709
# # bulkstamp.py: # Stamp versions on all files that can be found in a given tree. # # USAGE: python bulkstamp.py <version> <root directory> <descriptions> # # Example: python bulkstamp.py 103 ..\win32\Build\ desc.txt # # <version> corresponds to the build number. It will be concatenated with # the major and minor v...
apache-2.0
dukhlov/oslo.messaging
oslo_messaging/_drivers/zmq_driver/server/consumers/zmq_router_consumer.py
1
3834
# Copyright 2015 Mirantis, 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 ...
apache-2.0
di0spyr0s/pants
src/python/pants/backend/core/tasks/builddictionary.py
12
5090
# 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 import re ...
apache-2.0
TaskEvolution/Task-Coach-Evolution
taskcoach/taskcoachlib/thirdparty/chardet/big5freq.py
323
82588
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights ...
gpl-3.0
DanWBR/dwsim5
DWSIM/Lib/encodings/cp1254.py
593
13758
""" Python Character Mapping Codec cp1254 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1254.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
gpl-3.0
start-jsk/jsk_apc
demos/instance_occlsegm/instance_occlsegm_lib/contrib/instance_occlsegm/datasets/panoptic_occlusion_segmentation.py
2
4620
import glob import os import os.path as osp import chainer import numpy as np import instance_occlsegm_lib from instance_occlsegm_lib.contrib.synthetic2d.datasets.arc2017_occlusion \ import _load_npz def transform_to_panoptic(in_data, class_names): img, bboxes, labels, masks = in_data height, width = i...
bsd-3-clause
lnielsen/invenio
invenio/modules/annotations/receivers.py
4
1241
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) a...
gpl-2.0
Pexego/odoo
addons/l10n_br/account.py
340
10565
# -*- encoding: utf-8 -*- ################################################################################# # # # Copyright (C) 2009 Renato Lima - Akretion # # ...
agpl-3.0
4rado/RepositoryForProject
Lib/email/utils.py
114
9860
# Copyright (C) 2001-2010 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Miscellaneous utilities.""" __all__ = [ 'collapse_rfc2231_value', 'decode_params', 'decode_rfc2231', 'encode_rfc2231', 'formataddr', 'formatdate', 'getaddresses', 'make_msgid'...
gpl-3.0
stormi/tsunami
src/primaires/objet/commandes/remplir/__init__.py
1
4652
# -*-coding:Utf-8 -* # Copyright (c) 2010 LE GOFF Vincent # 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 # l...
bsd-3-clause
DTOcean/dtocean-core
tests/test_data_definitions_timetable.py
1
7507
import pytest from datetime import datetime, timedelta import numpy as np import pandas as pd import matplotlib.pyplot as plt from aneris.control.factory import InterfaceFactory from dtocean_core.core import (AutoFileInput, AutoFileOutput, AutoPlot, ...
gpl-3.0
bcl/anaconda
pyanaconda/ui/gui/spokes/software.py
2
20494
# Software selection spoke classes # # Copyright (C) 2011-2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is...
gpl-2.0
krez13/scikit-learn
sklearn/ensemble/bagging.py
14
36416
"""Bagging meta-estimator.""" # Author: Gilles Louppe <g.louppe@gmail.com> # License: BSD 3 clause from __future__ import division import itertools import numbers import numpy as np from warnings import warn from abc import ABCMeta, abstractmethod from ..base import ClassifierMixin, RegressorMixin from ..externals....
bsd-3-clause
FFMG/myoddweb.piger
gtest/gtest-1.7.0/test/gtest_catch_exceptions_test.py
2139
9901
#!/usr/bin/env python # # Copyright 2010 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 o...
gpl-2.0
techkang/flasky
app/api_1_0/posts.py
122
1737
from flask import jsonify, request, g, abort, url_for, current_app from .. import db from ..models import Post, Permission from . import api from .decorators import permission_required from .errors import forbidden @api.route('/posts/') def get_posts(): page = request.args.get('page', 1, type=int) pagination ...
mit
lydonchandra/omim
3party/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
salivatears/ansible
lib/ansible/utils/module_docs_fragments/validate.py
366
1146
# Copyright (c) 2015 Ansible, Inc # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansi...
gpl-3.0
kevinyu98/spark
python/pyspark/sql/tests/test_pandas_map.py
8
4346
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
taknevski/tensorflow-xsmm
tensorflow/python/kernel_tests/segment_reduction_ops_test.py
15
25352
# 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...
apache-2.0
SVilgelm/CloudFerry
cloudferry/lib/base/action/is_end_iter.py
1
1174
# Copyright (c) 2014 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
apache-2.0
sbbic/core
wizards/com/sun/star/wizards/web/FTPDialogResources.py
7
3303
# # This file is part of the LibreOffice project. # # 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/. # # This file incorporates work covered by the following license noti...
gpl-3.0
LinkHS/incubator-mxnet
python/mxnet/gluon/data/dataloader.py
8
8412
# 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
gmacchi93/serverInfoParaguay
apps/venv/lib/python2.7/site-packages/django/test/client.py
106
26068
from __future__ import unicode_literals import mimetypes import os import re import sys from copy import copy from importlib import import_module from io import BytesIO from django.apps import apps from django.conf import settings from django.core import urlresolvers from django.core.handlers.base import BaseHandler ...
apache-2.0
xinjiguaike/edx-platform
common/djangoapps/django_locale/trans_real.py
81
5165
"""Translation helper functions.""" # Imported from Django 1.8 # pylint: disable=invalid-name import re from django.conf import settings from django.conf.locale import LANG_INFO from django.utils import translation # Format of Accept-Language header values. From RFC 2616, section 14.4 and 3.9. # and RFC 3066, section...
agpl-3.0
Sweetgrassbuffalo/ReactionSweeGrass-v2
.meteor/local/dev_bundle/python/Lib/test/test_class.py
86
18371
"Test the functionality of Python classes implementing operators." import unittest from test import test_support testmeths = [ # Binary operations "add", "radd", "sub", "rsub", "mul", "rmul", "div", "rdiv", "mod", "rmod", "divmod", "rdivmod", "pow", "rpow", ...
gpl-3.0
yiliaofan/flatbuffers
tests/MyGame/Example/Vec3.py
43
1560
# automatically generated, do not modify # namespace: Example import flatbuffers class Vec3(object): __slots__ = ['_tab'] # Vec3 def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) # Vec3 def X(self): return self._tab.Get(flatbuffers.number_types.Float32Flags, self._...
apache-2.0
jamielennox/tempest
tempest/api/object_storage/test_account_quotas_negative.py
3
4001
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Joe H. Rahme <joe.hakim.rahme@enovance.com> # # 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.o...
apache-2.0
christianwgd/mezzanine
mezzanine/galleries/models.py
7
6176
from __future__ import unicode_literals from future.builtins import str from future.utils import native from io import BytesIO import os from string import punctuation from zipfile import ZipFile from chardet import detect as charsetdetect from django.core.files.base import ContentFile from django.core.files.storage ...
bsd-2-clause
pacificIT/linux-2.6.36
modules/wifi/ar6302/AR6K_SDK_ISC.build_3.1_RC.329/host/tools/athbtfilter/bluez/testscripts/bthmonoheadset.py
185
1768
#!/usr/bin/python import dbus import os import sys def printusage(): print 'bthmonoheadset.py <options>' print ' create - create a mono headset' print ' start - connect and play ' print ' stop - stop and disconnect' return headsetAddress = os.getenv("BTMONO_HEADSET") print 'BT Mono Headset Is : =>...
gpl-2.0
Endika/c2c-rd-addons
c2c_reporting_tools_chricar/__openerp__.py
4
2567
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) Camptocamp SA # Author: Arnaud WÃŒst # # # This file is part of the c2c_report_tools module. # # # WARNING: This program as such is intended to be used by professional # programmers who take the w...
agpl-3.0
ghtmtt/QGIS
tests/src/python/test_qgssvgcache.py
31
8162
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsSvgCache. .. note:: 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. """ __aut...
gpl-2.0
21E14/bitcoin
test/functional/assumevalid.py
3
8351
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test logic for skipping signature validation on old blocks. Test logic for skipping signature validati...
mit
MADindustries/WhatManager2
books/models.py
4
3686
from django import forms from django.core.validators import MinLengthValidator, MinValueValidator, MaxValueValidator, \ RegexValidator from django.db import models from django.forms.models import ModelForm import pyquery from books.utils import isbn_regex import what_transcode.utils from books import utils class...
mit
ESTUDIANTEGIT/tuconsejocomunal
usuarios_venezuela/modelos/usuarios_venezuela.py
4
3179
# -*- 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...
gpl-3.0