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
fdvarela/odoo8
addons/l10n_it/__init__.py
447
1161
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 # OpenERP Italian Community (<http://www.openerp-italia.org>) # Servabit srl # Agile Business Group sagl # Domsense srl # Albatos srl # # Copyright (C)...
agpl-3.0
bluevoda/BloggyBlog
lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escsm.py
2930
7839
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
gpl-3.0
Szkered/PACTT
authentication/views.py
1
2427
from rest_framework import permissions, viewsets, status, views from rest_framework.response import Response from authentication.models import Account from authentication.permissions import IsAccountOwner from authentication.serializers import AccountSerializer import json from django.contrib.auth import authenticat...
mit
klim-/pyplane
core/Toolbar.py
1
1723
# -*- coding: utf-8 -*- # Copyright (C) 2013 # by Klemens Fritzsche, pyplane@leckstrom.de # # 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 # ...
gpl-3.0
sbellem/django
django/core/management/commands/diffsettings.py
479
1565
from django.core.management.base import BaseCommand def module_to_dict(module, omittable=lambda k: k.startswith('_')): """Converts a module namespace to a Python dictionary.""" return {k: repr(v) for k, v in module.__dict__.items() if not omittable(k)} class Command(BaseCommand): help = """Displays diff...
bsd-3-clause
shineyear/catawampus
tr/vendor/bup/cmd/list-idx-cmd.py
10
1314
#!/usr/bin/env python import sys, os from bup import git, options from bup.helpers import * optspec = """ bup list-idx [--find=<prefix>] <idxfilenames...> -- find= display only objects that start with <prefix> """ o = options.Options(optspec) (opt, flags, extra) = o.parse(sys.argv[1:]) handle_ctrl_c() opt.find = op...
apache-2.0
BenjamenMeyer/stackInABox
stackinabox/util/responses/decorator.py
2
4117
""" Stack-In-A-Box: Responses Support via decorator """ try: import collections.abc as collections except ImportError: # Py2.7 Support import collections import functools import logging import re import types import responses import six from stackinabox.services.service import StackInABoxService from sta...
apache-2.0
VitalPet/c2c-rd-addons
chricar_application_columns/application_columns.py
4
4788
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################## # # ChriCar Beteiligungs- und Beratungs- GmbH # Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH # all rights reserved # created 2009-03-27 16:28:26+01 # # WARNING: This program as such is intended to be used by professiona...
agpl-3.0
drewwestrick/Repy-Web-Server
seattle_repy/nmresourcemath.py
2
7422
""" Author: Justin Cappos Module: Node Manager resource math. Helper routines to figure out how to add two vessels together and divide a vessel into two others. Start date: September 5th 2008 The design goals of this version are to be secure, simple, and reliable (in that order). This is where we wor...
gpl-2.0
Tranzystorek/servo
tests/wpt/css-tests/tools/html5lib/html5lib/tests/test_tokenizer.py
420
6544
from __future__ import absolute_import, division, unicode_literals import json import warnings import re from .support import get_data_files from html5lib.tokenizer import HTMLTokenizer from html5lib import constants class TokenizerTestParser(object): def __init__(self, initialState, lastStartTag=None): ...
mpl-2.0
oandrew/home-assistant
homeassistant/components/climate/mysensors.py
10
7483
""" mysensors platform that offers a Climate(MySensors-HVAC) component. For more details about this platform, please refer to the documentation https://home-assistant.io/components/climate.mysensors """ import logging from homeassistant.components import mysensors from homeassistant.components.climate import ( ST...
mit
ademuk/django-oscar
src/oscar/apps/dashboard/catalogue/forms.py
5
16311
from django import forms from django.core import exceptions from django.forms.models import inlineformset_factory from django.utils.translation import ugettext_lazy as _ from treebeard.forms import movenodeform_factory from oscar.core.loading import get_class, get_model from oscar.core.utils import slugify from oscar....
bsd-3-clause
Pagten/picamserver
moveimages.py
1
7472
#!/usr/bin/python3 import os import shutil import logging import re import hashlib import sys import functools import subprocess from logging.handlers import RotatingFileHandler from functools import partial LOG_FILE = 'moveimages.log' SOURCE_FOLDERS = ['/mnt/usb/timelapse/', '/mnt/sdcard/timelapse/'] TARGET_FOLDERS ...
gpl-3.0
apechimp/servo
tests/wpt/web-platform-tests/tools/manifest/manifest.py
10
12521
import json import os from collections import defaultdict from item import item_types, ManualTest, WebdriverSpecTest, Stub, RefTest, TestharnessTest from log import get_logger from sourcefile import SourceFile CURRENT_VERSION = 2 class ManifestError(Exception): pass class ManifestVersionMismatch(ManifestErro...
mpl-2.0
ddico/odoo
addons/payment/models/payment_acquirer.py
1
59190
# coding: utf-8 from collections import defaultdict import hashlib import hmac import logging from datetime import datetime from dateutil import relativedelta import pprint from odoo import api, exceptions, fields, models, _, SUPERUSER_ID from odoo.tools import consteq, float_round, image_process, ustr from odoo.excep...
agpl-3.0
lanbing510/GTDWeb
django/contrib/gis/gdal/prototypes/raster.py
67
3694
""" This module houses the ctypes function prototypes for GDAL DataSource (raster) related data structures. """ from ctypes import POINTER, c_char_p, c_double, c_int, c_void_p from functools import partial from django.contrib.gis.gdal.libgdal import std_call from django.contrib.gis.gdal.prototypes.generation import ( ...
gpl-2.0
daniponi/django
tests/template_tests/syntax_tests/test_if.py
13
24184
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import TestObj, setup class IfTagTests(SimpleTestCase): @setup({'if-tag01': '{% if foo %}yes{% else %}no{% endif %}'}) def test_if_tag01(self): output = self.engine.render_to_string('if-tag01', {'foo'...
bsd-3-clause
cosurgi/trunk
examples/HydroForceEngine/twoWayCoupling/sedimentTransportExample_1DRANSCoupling.py
2
13901
from __future__ import print_function ######################################################################################################################################################################### # Author: Raphael Maurin, raphael.maurin@imft.fr # 24/11/2017 # # Same as sedimentTransportExample but solving a...
gpl-2.0
City-of-Bloomington/green-rental
allauth/socialaccount/providers/openid/migrations/0003_auto__del_openidaccount.py
82
1958
# encoding: utf-8 from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'OpenIDAccount' db.delete_table('openid_openidaccount') def backwards(self, orm): # Adding model 'OpenIDAccount...
agpl-3.0
ltiao/scikit-learn
sklearn/decomposition/kernel_pca.py
4
9144
"""Kernel Principal Components Analysis""" # Author: Mathieu Blondel <mathieu@mblondel.org> # License: BSD 3 clause import numpy as np from scipy import linalg from ..utils.arpack import eigsh from ..utils.validation import check_is_fitted from ..exceptions import NotFittedError from ..base import BaseEstimator, Tra...
bsd-3-clause
rotofly/odoo
addons/account_asset/wizard/__init__.py
445
1122
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
adedayo/intellij-community
python/helpers/pydev/pydevd_save_locals.py
53
1523
""" Utility for saving locals. """ import sys import pydevd_vars def is_save_locals_available(): try: if '__pypy__' in sys.builtin_module_names: import __pypy__ save_locals = __pypy__.locals_to_fast return True except: pass try: import ctypes ...
apache-2.0
liorvh/infernal-twin
build/pip/build/lib.linux-i686-2.7/pip/_vendor/html5lib/inputstream.py
435
31665
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from pip._vendor.six.moves import http_client import codecs import re from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .constants import encodings, ReparseException from . import util...
gpl-3.0
glovebx/odoo
openerp/addons/base/ir/ir_cron.py
24
15115
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
frascoweb/frasco
frasco/users/__init__.py
1
10598
from frasco.ext import * from frasco.i18n import lazy_translate from frasco.utils import populate_obj, extract_unmatched_items from flask import render_template from flask_login import LoginManager, logout_user, login_required, login_url, login_fresh, confirm_login, fresh_login_required, user_logged_in import datetime ...
mit
bootandy/sqlalchemy
test/orm/test_update_delete.py
22
32553
from sqlalchemy.testing import eq_, assert_raises, assert_raises_message from sqlalchemy.testing import fixtures from sqlalchemy import Integer, String, ForeignKey, or_, exc, \ select, func, Boolean, case, text, column from sqlalchemy.orm import mapper, relationship, backref, Session, \ joinedload, synonym, que...
mit
maestrano/odoo
addons/decimal_precision/decimal_precision.py
27
3965
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
ewandor/home-assistant
tests/util/test_distance.py
42
3525
"""Test homeasssitant distance utility functions.""" import unittest import homeassistant.util.distance as distance_util from homeassistant.const import (LENGTH_KILOMETERS, LENGTH_METERS, LENGTH_FEET, LENGTH_MILES) INVALID_SYMBOL = 'bob' VALID_SYMBOL = LENGTH_KILOMETERS class TestDi...
apache-2.0
kevin-intel/scikit-learn
sklearn/preprocessing/tests/test_discretization.py
3
12009
import pytest import numpy as np import scipy.sparse as sp import warnings from sklearn.preprocessing import KBinsDiscretizer from sklearn.preprocessing import OneHotEncoder from sklearn.utils._testing import ( assert_array_almost_equal, assert_array_equal, assert_allclose_dense_sparse ) X = [[-2, 1.5, -...
bsd-3-clause
nrgaway/qubes-tools
builder-tools/libs/say-1.4.2/test/test_util.py
1
2680
""" Test separable utility functions used in say """ import six import sys from say.util import * import pytest def test_is_string(): assert is_string("") assert is_string("This") assert is_string(six.u("this")) assert stringify(six.u("a\u2014b")) assert not is_string(1) assert not is_string...
gpl-2.0
GabrielBrascher/cloudstack
python/incubation/cloud-web-ipallocator.py
4
4633
#! /usr/bin/python3 # 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 # "Lice...
apache-2.0
Manishearth/servo
tests/wpt/harness/wptrunner/update/state.py
196
4417
# 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 os import cPickle as pickle here = os.path.abspath(os.path.split(__file__)[0]) class State(object): filenam...
mpl-2.0
3dfxmadscientist/CBSS
addons/account_voucher/report/__init__.py
60
1135
# -*- 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
MarkWh1te/xueqiu_predict
p3_env/lib/python3.5/site-packages/pygments/lexers/jvm.py
21
66829
# -*- coding: utf-8 -*- """ pygments.lexers.jvm ~~~~~~~~~~~~~~~~~~~ Pygments lexers for JVM languages. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, ...
mit
tomchristie/django-rest-framework
tests/test_parsers.py
5
6745
import io import math import pytest from django import forms from django.core.files.uploadhandler import ( MemoryFileUploadHandler, TemporaryFileUploadHandler ) from django.http.request import RawPostDataException from django.test import TestCase from rest_framework.exceptions import ParseError from rest_framewor...
bsd-2-clause
cowlicks/numpy
tools/cythonize.py
86
6159
#!/usr/bin/env python """ cythonize Cythonize pyx files into C files as needed. Usage: cythonize [root_dir] Default [root_dir] is 'numpy'. Checks pyx files to see if they have been changed relative to their corresponding C files. If they have, then runs cython on these files to recreate the C files. The script th...
bsd-3-clause
moniqx4/bite-project
deps/gdata-python-client/src/gdata/tlslite/constants.py
279
7476
"""Constants used in various places.""" class CertificateType: x509 = 0 openpgp = 1 cryptoID = 2 class HandshakeType: hello_request = 0 client_hello = 1 server_hello = 2 certificate = 11 server_key_exchange = 12 certificate_request = 13 server_hello_done = 14 certificate_ve...
apache-2.0
Tan0/ironic
ironic/api/controllers/v1/types.py
1
8457
# coding: utf-8 # # Copyright 2013 Red Hat, 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 # # ...
apache-2.0
secretdataz/OpenKore-Src
src/scons-local-2.0.1/SCons/Tool/suncc.py
61
1980
"""SCons.Tool.suncc Tool-specific initialization for Sun Solaris (Forte) CC and cc. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010...
gpl-2.0
giggsey/SickRage
lib/sqlalchemy/sql/operators.py
78
21953
# sql/operators.py # Copyright (C) 2005-2014 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 # This module is part of SQLAlchemy and is released under # the MIT License: http://w...
gpl-3.0
DaVinci789/.emacs.d
elpa/elpy-20160131.118/elpy/tests/support.py
13
29235
# coding: utf-8 """Support classes and functions for the elpy test code. Elpy uses a bit of a peculiar test setup to avoid redundancy. For the tests of the two backends, we provide generic test cases for generic tests and for specific callback tests. These mixins can be included in the actual test classes. We can't ...
mit
patmcb/odoo
addons/payment_sips/controllers/main.py
153
1864
# -*- coding: utf-8 -*- try: import simplejson as json except ImportError: import json import logging import werkzeug from openerp import http from openerp.http import request _logger = logging.getLogger(__name__) class SipsController(http.Controller): _notify_url = '/payment/sips/ipn/' _return_url...
agpl-3.0
MrSurly/micropython-esp32
tests/float/string_format_modulo.py
24
1353
print("%s" % 1.0) print("%r" % 1.0) print("%d" % 1.0) print("%i" % 1.0) print("%u" % 1.0) # these 3 have different behaviour in Python 3.x versions # uPy raises a TypeError, following Python 3.5 (earlier versions don't) #print("%x" % 18.0) #print("%o" % 18.0) #print("%X" % 18.0) print("%e" % 1.23456) print("%E" % 1....
mit
jadonk/debexpo
debexpo/lib/utils.py
2
3365
# -*- coding: utf-8 -*- # # utils.py — Debexpo utility functions # # This file is part of debexpo - https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb <jonny@debian.org> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated ...
mit
4shadoww/usploit
core/lib/future/types/__init__.py
70
6842
""" This module contains backports the data types that were significantly changed in the transition from Python 2 to Python 3. - an implementation of Python 3's bytes object (pure Python subclass of Python 2's builtin 8-bit str type) - an implementation of Python 3's str object (pure Python subclass of Python 2's ...
mit
robin-lai/scikit-learn
sklearn/neighbors/unsupervised.py
117
4755
"""Unsupervised nearest neighbors learner""" from .base import NeighborsBase from .base import KNeighborsMixin from .base import RadiusNeighborsMixin from .base import UnsupervisedMixin class NearestNeighbors(NeighborsBase, KNeighborsMixin, RadiusNeighborsMixin, UnsupervisedMixin): """Unsu...
bsd-3-clause
davidzchen/tensorflow
tensorflow/python/keras/metrics.py
3
123088
# 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
gacarrillor/QGIS
python/plugins/processing/algs/qgis/ui/RasterCalculatorWidgets.py
25
11647
# -*- coding: utf-8 -*- """ *************************************************************************** RasterCalculatorWidgets.py --------------------- Date : November 2016 Copyright : (C) 2016 by Victor Olaya Email : volayaf at gmail dot com *************...
gpl-2.0
jjdmol/LOFAR
LCU/checkhardware/updatePVSS.py
1
21517
#!/usr/bin/python # # read last test log file (.csv) # and send test result to PVSS, # and write to PVSS log file # # P.Donker import sys import os from time import sleep libPath = '/opt/stationtest/lib' sys.path.insert(0, libPath) from general_lib import * from lofar_lib import * args = dict() logdir = "" logger...
gpl-3.0
jpshort/odoo
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
heeraj123/oh-mainline
vendor/packages/ghettoq/ghettoq/tests/test_redis.py
17
2267
import unittest from anyjson import serialize, deserialize from ghettoq.simple import Connection, Empty def create_connection(database): return Connection("redis", host="localhost", database=database) class TestRedisBackend(unittest.TestCase): def test_default_database_is_set_correctly(self): con...
agpl-3.0
yceruto/django-guardian
guardian/core.py
23
5160
from __future__ import unicode_literals from itertools import chain from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from guardian.utils import get_identity from guardian.utils import get_user_obj_perms_model from guardian.utils import get_group_obj_perms_m...
bsd-2-clause
mrshelly/openerp71313
openerp/tests/test_fields.py
28
5942
# # test cases for fields access, etc. # import common from openerp.osv import fields class TestRelatedField(common.TransactionCase): def setUp(self): super(TestRelatedField, self).setUp() self.partner = self.registry('res.partner') self.company = self.registry('res.company') def tes...
agpl-3.0
40223249-1/0622W17
static/Brython3.1.1-20150328-091302/Lib/string.py
734
9410
"""A collection of string constants. Public module variables: whitespace -- a string containing all ASCII whitespace ascii_lowercase -- a string containing all ASCII lowercase letters ascii_uppercase -- a string containing all ASCII uppercase letters ascii_letters -- a string containing all ASCII letters digits -- a ...
gpl-3.0
morreene/tradenews
venv/Lib/site-packages/sqlalchemy/ext/compiler.py
36
16257
# ext/compiler.py # Copyright (C) 2005-2016 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 """Provides an API for creation of custom ClauseElements and compilers. Synopsis ==...
bsd-3-clause
fragglet/omgifol
lump.py
1
11026
# Import the Python Imaging Library if it is available. On error, ignore # the problem and continue. PIL being absent should only affect the # graphic lump loading/saving methods and the user may not be interested # in installing PIL just to pass this line if not interested in using the # graphics functionality at all....
mit
shengzhou/onie
test/lib/test_utils.py
6
1110
# # Collection of useful test utility methods # # Copyright (C) 2013 Curt Brune <curt@cumulusnetworks.com> # # SPDX-License-Identifier: GPL-2.0 #------------------------------------------------------------------------------- # # Imports # try: import sys import os import re import io import...
gpl-2.0
gauravbose/digital-menu
django/core/management/commands/loaddata.py
77
12783
from __future__ import unicode_literals import glob import gzip import os import warnings import zipfile from itertools import product from django.apps import apps from django.conf import settings from django.core import serializers from django.core.exceptions import ImproperlyConfigured from django.core.management.b...
bsd-3-clause
kreatorkodi/repository.torrentbr
plugin.video.yatp/site-packages/hachoir_parser/archive/zlib.py
74
13744
"""Detailed ZLIB parser Author: Robert Xiao Creation date: July 9 2007 """ from hachoir_parser import Parser from hachoir_core.field import (Bit, Bits, Field, Int16, UInt32, Enum, FieldSet, GenericFieldSet, PaddingBits, ParserError, RawBytes) from hachoir_core.endian import LITTLE_ENDIAN from hachoir_core.te...
gpl-2.0
edgarli/proj8
env/lib/python3.4/site-packages/setuptools/command/setopt.py
458
5080
from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import distutils import os from setuptools import Command __all__ = ['config_file', 'edit_config', 'option_base', 'setopt'] def config_file(kind="local"): """Get the filename of the distutils, lo...
artistic-2.0
joshua0pang/bazel
third_party/py/mock/tests/_testwith.py
109
6077
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from __future__ import with_statement from tests.support import unittest2, is_instance from mock import MagicMock, Mock, patch, sentinel, mock_open, call from tests.suppo...
apache-2.0
eonezhang/thrift
lib/py/src/protocol/TCompactProtocol.py
106
10992
# # 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
IptvBrasilGroup/Cleitonleonelcreton.repository
plugin.video.iptvbrondemand.mobile/requestsX/packages/chardet/big5freq.py
3133
82594
######################## 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 R...
gpl-2.0
hunch/hunch-sample-app
django/utils/version.py
13
1403
import django import os.path import re def get_svn_revision(path=None): """ Returns the SVN revision in the form SVN-XXXX, where XXXX is the revision number. Returns SVN-unknown if anything goes wrong, such as an unexpected format of internal SVN files. If path is provided, it sho...
mit
victor-prado/broker-manager
environment/lib/python3.5/site-packages/pkg_resources/_vendor/packaging/requirements.py
454
4355
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import string import re from pkg_resources.extern.pyparsing import string...
mit
sudheerchintala/LearnEraPlatForm
common/lib/xmodule/xmodule/tests/test_video.py
18
24534
# -*- coding: utf-8 -*- # pylint: disable=W0212 """Test for Video Xmodule functional logic. These test data read from xml, not from mongo. We have a ModuleStoreTestCase class defined in common/lib/xmodule/xmodule/modulestore/tests/django_utils.py. You can search for usages of this in the cms and lms tests for examples...
agpl-3.0
chalasr/Flask-P2P
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py
2931
1675
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
mit
witwall/gyp
test/win/gyptest-link-defrelink.py
210
1683
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Make sure a relink is performed when a .def file is touched. """ import TestGyp import sys if sys.platform == 'win32': test = TestG...
bsd-3-clause
saurvs/servo
python/servo/bootstrapper/base.py
29
2033
# 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/. from __future__ import print_function, unicode_literals import distutils import subprocess class BaseBootstrapper(obj...
mpl-2.0
zverevalexei/trex-http-proxy
trex_client/stl/profiles/udp_1pkt_mpls_vm.py
3
1076
from trex_stl_lib.api import * from scapy.contrib.mpls import * # import from contrib folder of scapy class STLS1(object): def __init__ (self): pass; def create_stream (self): # 2 MPLS label the internal with s=1 (last one) pkt = Ether()/MPLS(label=17,cos=1,s=0,ttl=255)/MPLS(label...
mit
cga-harvard/cga-worldmap
geonode/contrib/dataverse_layer_metadata/layer_metadata_helper.py
1
7520
""" Convenience methods to: 1 - "check_for_existing_layer" using DataverseInfo 2 - "retrieve_dataverse_layer_metadata_by_kwargs_installation_and_file_id" - Retrieve a DataverseLayerMetadata object by DV installation and file_id 3 - add_dataverse_layer_metadata - Create a DataverseLayerMeta...
gpl-3.0
guedou/scapy-codecov
scapy/automaton.py
2
27965
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ Automata with states, transitions and actions. """ import types,itertools,time,os,sys,socket,traceback from select i...
gpl-2.0
zararah/memorial-page
submissions/admin.py
4
1784
from django.contrib import admin from models import Submission, Image, Link from django.core.exceptions import PermissionDenied from django_object_actions import DjangoObjectActions from django.contrib.admin import SimpleListFilter from datetime import datetime class ModerationFilter(SimpleListFilter): title = 'Ac...
mit
mixman/djangodev
django/conf/locale/en/formats.py
318
1637
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'N j, Y' TIME_FORMAT = 'P' DATETIME_FORMAT = 'N j, Y, P' YEAR_MONTH_FORMAT...
bsd-3-clause
jamesliu/mxnet
tests/python/quantization_gpu/test_quantization_gpu.py
18
1144
# 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
7fever/script.pseudotv.live
resources/lib/Globals.py
2
20378
# Copyright (C) 2013 Kevin S. Graer # # # This file is part of PseudoTV Live. # # PseudoTV Live 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
JakeLowey/HackRPI2
django/contrib/gis/gdal/prototypes/geom.py
91
4762
from ctypes import c_char_p, c_double, c_int, c_void_p, POINTER from django.contrib.gis.gdal.envelope import OGREnvelope from django.contrib.gis.gdal.libgdal import lgdal, GEOJSON from django.contrib.gis.gdal.prototypes.errcheck import check_bool, check_envelope from django.contrib.gis.gdal.prototypes.generation import...
mit
ryanj/origin
vendor/github.com/google/certificate-transparency/python/ct/client/db/sqlite_log_db.py
35
6703
import logging import sqlite3 import time from ct.client.db import log_db from ct.client.db import database from ct.proto import client_pb2 class SQLiteLogDB(log_db.LogDB): def __init__(self, connection_manager): """Initialize the database and tables. Args: connection_manager: an SQLit...
apache-2.0
scivey/mner
external/gmock-1.7.0/gtest/test/gtest_throw_on_failure_test.py
2917
5766
#!/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
felixjimenez/django
tests/model_inheritance/tests.py
40
13501
from __future__ import absolute_import, unicode_literals from operator import attrgetter from django.core.exceptions import FieldError from django.db import connection from django.test import TestCase from django.test.utils import CaptureQueriesContext from django.utils import six from .models import (Chef, CommonIn...
bsd-3-clause
numerigraphe/odoomrp-wip
mrp_product_variants/models/product.py
19
1629
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the...
agpl-3.0
mapsme/omim
tools/python/maps_generator/checks/logs/logs_reader.py
4
7172
import datetime import logging import os import re from collections import Counter from collections import namedtuple from enum import Enum from pathlib import Path from typing import List from typing import Tuple from typing import Union import maps_generator.generator.env as env from maps_generator.generator.stages ...
apache-2.0
jcpowermac/ansible
lib/ansible/module_utils/network/vyos/vyos.py
16
5304
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
web30s/odoo-9.0c-20160402
hello/templates/openerp/addons/website_sale_options/models/sale_order.py
39
3118
# -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.osv import osv, orm, fields from openerp.tools.translate import _ class sale_order_line(osv.Model): _inherit = "sale.order.line" _columns = { 'linked_line_id': fields.many2one('sale.order.line', 'Linked Order Line', domain="[('orde...
gpl-3.0
ktdreyer/teuthology
scripts/report.py
13
1704
import docopt import teuthology.report doc = """ usage: teuthology-report -h teuthology-report [-v] [-R] [-n] [-s SERVER] [-a ARCHIVE] [-D] -r RUN ... teuthology-report [-v] [-s SERVER] [-a ARCHIVE] [-D] -r RUN -j JOB ... teuthology-report [-v] [-R] [-n] [-s SERVER] [-a ARCHIVE] --all-runs Submit tes...
mit
Michagogo/bitcoin
qa/rpc-tests/abandonconflict.py
53
7752
#!/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. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import ...
mit
TomoakiNagahara/wakatime-unity
Editor/WakaTime/client/wakatime/packages/requests/models.py
4
28443
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth ...
cc0-1.0
thinkasoft/ProyectoRD-dev
l10n_ve_sale_purchase/model/stock.py
1
2883
#!/usr/bin/python # -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). # All Rights Reserved ###############Credits##########################...
agpl-3.0
cfriedt/gnuradio
gr-blocks/python/blocks/qa_tag_share.py
12
2402
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2017 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 versio...
gpl-3.0
kou/zulip
analytics/management/commands/stream_stats.py
3
2358
from argparse import ArgumentParser from typing import Any from django.core.management.base import BaseCommand, CommandError from django.db.models import Q from zerver.models import Message, Realm, Recipient, Stream, Subscription, get_realm class Command(BaseCommand): help = "Generate statistics on the streams ...
apache-2.0
jobiols/server-tools
mass_editing/wizard/mass_editing_wizard.py
6
13417
# -*- coding: utf-8 -*- ############################################################################## # # This module uses OpenERP, Open Source Management Solution Framework. # Copyright (C): # 2012-Today Serpent Consulting Services (<http://www.serpentcs.com>) # # This program is free software: you ca...
agpl-3.0
tuxlifan/moneyguru
qt/controller/budget/table.py
2
1168
# Created By: Virgil Dupras # Created On: 2009-11-21 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-...
gpl-3.0
takluyver/git-cola
cola/guicmds.py
1
10597
from __future__ import division, absolute_import, unicode_literals import os import re from PyQt4 import QtCore from PyQt4 import QtGui from PyQt4.QtCore import SIGNAL from cola import cmds from cola import core from cola import difftool from cola import gitcmds from cola import qtutils from cola import utils from c...
gpl-2.0
Chibin/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/package/metadata_track/test_mdt.py
9
2365
""" Copyright (c) 2004-Present Pivotal Software, Inc. 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 http://www.apache....
apache-2.0
russel1237/scikit-learn
sklearn/cluster/setup.py
263
1449
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause import os from os.path import join import numpy from sklearn._build_utils import get_blas_info def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration cblas_libs, blas_info = ...
bsd-3-clause
lah7/razer-drivers
pylib/openrazer/client/macro.py
2
6267
import json as _json import dbus as _dbus import openrazer_daemon.misc.macro as _daemon_macro from openrazer_daemon import keyboard class RazerMacro(object): def __init__(self, serial: str, devname: str, daemon_dbus=None, capabilities=None): if daemon_dbus is None: session_bus = _dbus.Sessio...
gpl-2.0
mariopro/youtube-dl
youtube_dl/extractor/yinyuetai.py
132
1907
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ExtractorError class YinYueTaiIE(InfoExtractor): IE_NAME = 'yinyuetai:video' IE_DESC = '音悦Tai' _VALID_URL = r'https?://v\.yinyuetai\.com/video(?:/h5)?/(?P<id>[0-9]+)' _TESTS = [{ 'url...
unlicense
vanwinkeljan/rpi_vmcsx
middleware/khronos/tools/reorg/khrn_reorg.py
2
7397
import os import re import stat import subprocess mapping = {} re_line = re.compile('(.+) (.+)') def fix_includes(outputpath, inputpath, srcpath): input = open(inputpath, 'r') lines = input.readlines() input.close() output = reallyopen(outputpath, 'w') filename = os.path.basename(mapping[srcpath]) ...
apache-2.0
NorthernStars/python-mrlib
python-mrLib/mrLib/networking/data/networkhandshake.py
1
13795
# ./networkhandshake.py # -*- coding: utf-8 -*- # PyXB bindings for NM:e92452c8d3e28a9e27abfc9994d2007779e7f4c9 # Generated 2013-11-11 12:06:59.516575 by PyXB version 1.2.3 # Namespace AbsentNamespace0 import pyxb.binding.saxer import io import pyxb.utils.utility import pyxb.utils.domutils # Unique identifier for bin...
apache-2.0
meredith-digops/ansible
lib/ansible/modules/files/unarchive.py
21
34901
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2013, Dylan Martin <dmartin@seattlecentral.edu> # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2016, Dag Wieers <dag@wieers.com> # # This file is part of Ansible # # Ansible is free software: you can redist...
gpl-3.0