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
mrquim/repository.mrquim
script.module.youtube.dl/lib/youtube_dl/extractor/kickstarter.py
71
2708
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import smuggle_url class KickStarterIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?kickstarter\.com/projects/(?P<id>[^/]*)/.*' _TESTS = [{ 'url': 'https://www.kickstarter.com/projects/14044618...
gpl-2.0
ericmckean/syzygy
syzygy/py/etw_db/etw_db/process.py
3
3832
#!python # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
apache-2.0
Venturi/cms
env/lib/python2.7/site-packages/html5lib/treewalkers/__init__.py
499
5766
"""A collection of modules for iterating through different kinds of tree, generating tokens identical to those produced by the tokenizer module. To create a tree walker for a new type of tree, you need to do implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method taking a ...
gpl-2.0
anryko/ansible
test/units/cli/test_adhoc.py
42
4553
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import pytest import re from ansible import context from ansible.cli.adhoc...
gpl-3.0
sipak/MaidSafe
src/third_party_libs/googlemock/gtest/scripts/pump.py
603
23316
#!/usr/bin/env python # # Copyright 2008, 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-3.0
midori1/midorinoblog
site-packages/django/core/management/base.py
49
21889
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Base classes for writing management commands (named commands which can be executed through ``django-admin.py`` or ``manage.py``). """ import os import sys import warnings from optparse import make_option, OptionParser import django from django.cor...
apache-2.0
jimi-c/ansible
lib/ansible/modules/cloud/vultr/vultr_ssh_key.py
27
6176
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2017, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
kragniz/nduko
gui/__init__.py
1
1167
#!/usr/bin/env python import sys import widgets try: import gi from gi.repository import Gtk except: import gtk as Gtk print 'falling back to gtk 2' class gui(object): def __init__( self ): gladeFile = 'main.ui' builder = Gtk.Builder() builder.add_from_file(gladeFile) ...
gpl-3.0
ArmchairArmada/COS125Project01
src/ui.py
1
6740
#!/usr/bin/env python """ Simple UI """ import assets import inputs import pygame # Font colors COLORS = { "white":(255,255,255), "black":(0,0,0), "grey":(128,128,128), "red":(245,0,0), "blue":(0,100,255), "green":(25,180,0), "yellow":(255,220,0) } class Widget(object): def __init__(...
mit
xq262144/hue
apps/impala/src/impala/api.py
3
3713
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
ronakkhunt/kuma
vendor/packages/pkg_resources/_vendor/packaging/_structures.py
906
1809
# Copyright 2014 Donald Stufft # # 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...
mpl-2.0
garbled1/ansible
test/units/modules/network/nxos/test_nxos_ip_interface.py
12
2974
# (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
ewandor/home-assistant
homeassistant/components/cloud/__init__.py
1
5727
"""Component to integrate the Home Assistant cloud.""" import asyncio from datetime import datetime import json import logging import os import voluptuous as vol from homeassistant.const import ( EVENT_HOMEASSISTANT_START, CONF_REGION, CONF_MODE) from homeassistant.helpers import entityfilter from homeassistant.u...
apache-2.0
xysec/xysec_adb
xysec_adb/pylib/linker/test_case.py
37
19752
# 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. """Base class for linker-specific test cases. The custom dynamic linker can only be tested through a custom test case for various technical reasons: ...
apache-2.0
olivierdalang/QGIS
python/plugins/processing/algs/qgis/Climb.py
11
8651
# -*- coding: utf-8 -*- """ /*************************************************************************** Climb begin : 2019-05-15 copyright : (C) 2019 by Håvard Tveite email : havard.tveite@nmbu.no ******************************************************...
gpl-2.0
proxysh/Safejumper-for-Mac
buildmac/Resources/env/lib/python2.7/site-packages/twisted/names/test/test_names.py
12
41743
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.names. """ from __future__ import absolute_import, division import copy import operator import socket from io import BytesIO from functools import partial, reduce from struct import pack from twisted.trial import uni...
gpl-2.0
bratsche/Neutron-Drive
google_appengine/lib/django_1_3/django/contrib/gis/gdal/tests/test_ds.py
137
10990
import os import unittest from django.contrib.gis.gdal import DataSource, Envelope, OGRGeometry, OGRException, OGRIndexError, GDAL_VERSION from django.contrib.gis.gdal.field import OFTReal, OFTInteger, OFTString from django.contrib.gis.geometry.test_data import get_ds_file, TestDS, TEST_DATA # List of acceptable data ...
bsd-3-clause
sasukeh/neutron
neutron/plugins/ml2/rpc.py
6
14236
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
agrista/odoo-saas
addons/l10n_hn/__openerp__.py
343
2260
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2009-2010 Salvatore Josué Trimarchi Pinto <salvatore@trigluu.com> # (http://trigluu.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Gen...
agpl-3.0
fkolacek/FIT-VUT
bp-revok/python/lib/python2.7/test/test_binascii.py
114
8634
"""Test the binascii C module.""" from test import test_support import unittest import binascii import array # Note: "*_hex" functions are aliases for "(un)hexlify" b2a_functions = ['b2a_base64', 'b2a_hex', 'b2a_hqx', 'b2a_qp', 'b2a_uu', 'hexlify', 'rlecode_hqx'] a2b_functions = ['a2b_base64', 'a2b_h...
apache-2.0
himleyb85/django
tests/template_tests/filter_tests/test_linenumbers.py
331
1992
from django.template.defaultfilters import linenumbers from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class LinenumbersTests(SimpleTestCase): """ The contents of "linenumbers" is escaped according to the current autoescape setting. """ ...
bsd-3-clause
csala/zato
code/zato-server/src/zato/server/connection/cloud/aws/s3.py
7
2799
# -*- coding: utf-8 -*- """ Copyright (C) 2014 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib from logging import getLogger # Boto from boto.s3.bucket import Bucket ...
gpl-3.0
apache/tez
tez-tools/swimlanes/amlogparser.py
5
8663
# # 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...
apache-2.0
sophie63/FlyLFM
stanford_lfanalyze_v0.4/lflib/lightfield.py
1
4410
# __BEGIN_LICENSE__ # # Copyright (C) 2010-2012 Stanford University. # All rights reserved. # # __END_LICENSE__ import numpy as np #--------------------------------------------------------------------------------------- # UTILITY METHODS #----------------------------------------------...
bsd-2-clause
nop33/indico-plugins
vc_dummy/setup.py
1
1510
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
gpl-3.0
Yen-Chung-En/w16b_test
static/Brython3.1.1-20150328-091302/Lib/_markupbase.py
891
14598
"""Shared support for scanning document type declarations in HTML and XHTML. This module is used as a foundation for the html.parser module. It has no documented public API and should not be used directly. """ import re _declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*').match _declstringlit_match = re.com...
agpl-3.0
petemounce/ansible
test/units/playbook/test_playbook.py
119
2239
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an...
gpl-3.0
ospalh/kajongg-fork
src/backgroundselector.py
1
3280
""" Copyright (C) 2008-2012 Wolfgang Rohdewald <wolfgang@rohdewald.de> partially based on C++ code from: Copyright (C) 2006 Mauricio Piacentini <mauricio@tabuleiro.com> Libkmahjongg is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publ...
gpl-2.0
noironetworks/nova
nova/tests/unit/api/ec2/test_faults.py
69
1846
# 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 # d...
apache-2.0
7WebPages/django-allauth
allauth/socialaccount/providers/oauth/views.py
50
4232
from __future__ import absolute_import from django.core.urlresolvers import reverse from allauth.socialaccount.helpers import render_authentication_error from allauth.socialaccount.providers.oauth.client import (OAuthClient, OAuthError) from allauth.socialacco...
mit
ric2b/Vivaldi-browser
chromium/third_party/blink/web_tests/external/wpt/tools/third_party/py/py/_code/_assertionold.py
60
17869
import py import sys, inspect from compiler import parse, ast, pycodegen from py._code.assertion import BuiltinAssertionError, _format_explanation import types passthroughex = py.builtin._sysex class Failure: def __init__(self, node): self.exc, self.value, self.tb = sys.exc_info() self.node = node...
bsd-3-clause
rptec/seafile
tests/test-transfer.py
24
3106
#!/usr/bin/env python from datetime import datetime import os import time import shutil import common from common import CcnetDaemon, SeafileDaemon, print_cmsg, db_item_exists import ccnet from pysearpc import * import seafile def cleanup_and_exit(): os.system("""pkill ccnet""") # os.system("""cd basic; ./cle...
gpl-2.0
fo2rist/infra-strike
backend/venv/Lib/site-packages/wheel/metadata.py
230
11050
""" Tools for converting old- to new-style metadata. """ from collections import namedtuple from .pkginfo import read_pkg_info from .util import OrderedDefaultDict try: from collections import OrderedDict except ImportError: OrderedDict = dict import re import os.path import textwrap import pkg_resources impo...
lgpl-3.0
lillian-gardenia-seabreeze/sappho
demo/config.py
3
1199
"""Configuration constants for Sappho demo.""" import pkg_resources # Constants/game config # The path to the file that's being used to represent the player ANIMATED_SPRITE_PATH = pkg_resources.resource_filename("test_scene", "test.gif") # The path to the file being used as the tilesheet TILESHEET_PATH = pkg_resourc...
mit
cloudera/hue
desktop/core/ext-py/SQLAlchemy-1.3.17/lib/sqlalchemy/orm/attributes.py
3
67867
# orm/attributes.py # Copyright (C) 2005-2020 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 """Defines instrumentation for class attributes and their interaction with instanc...
apache-2.0
erkrishna9/odoo
addons/account_analytic_default/__openerp__.py
119
1866
# -*- 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
makinacorpus/odoo
addons/hr_payroll/res_config.py
441
1294
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
ZihengJiang/mxnet
tests/python/unittest/test_loss.py
3
11225
# 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
binhqnguyen/ln
nsc/scons-local-1.2.0.d20090223/SCons/Tool/ar.py
18
2192
"""SCons.Tool.ar Tool-specific initialization for ar (library archive). 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 The SCons Founda...
gpl-2.0
gdi2290/django
django/utils/html_parser.py
18
5220
from django.utils.six.moves import html_parser as _html_parser import re import sys current_version = sys.version_info use_workaround = ( (current_version < (2, 7, 3)) or (current_version >= (3, 0) and current_version < (3, 2, 3)) ) try: HTMLParseError = _html_parser.HTMLParseError except AttributeError:...
bsd-3-clause
SaM-Solutions/samba
lib/dnspython/dns/rdatatype.py
241
5164
# Copyright (C) 2001-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
gpl-3.0
XiaosongWei/chromium-crosswalk
chrome/common/extensions/docs/server2/permissions_data_source.py
37
3654
# 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. from itertools import ifilter from operator import itemgetter from data_source import DataSource from extensions_paths import PRIVATE_TEMPLATES from future ...
bsd-3-clause
pypot/scikit-learn
sklearn/utils/fixes.py
133
12882
"""Compatibility fixes for older version of python, numpy and scipy If you add content to this file, please give the version of the package at which the fixe is no longer needed. """ # Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoquaux <gael.varoquaux@normalesup.org> # ...
bsd-3-clause
umkay/zulip
zerver/management/commands/delete_old_unclaimed_attachments.py
46
1892
from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from django.core.management.base import BaseCommand from zerver.lib.actions import do_delete_old_unclaimed_attachments from zerver.models import Attachment, get_old_unclaimed_attach...
apache-2.0
gudcjfdldu/volatility
volatility/plugins/overlays/windows/windows.py
44
36146
# Volatility # Copyright (c) 2008-2013 Volatility Foundation # Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu> # # This file is part of Volatility. # # Volatility 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...
gpl-2.0
lamby/python-social-auth
social/backends/loginradius.py
83
2617
""" LoginRadius BaseOAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/loginradius.html """ from social.backends.oauth import BaseOAuth2 class LoginRadiusAuth(BaseOAuth2): """LoginRadius BaseOAuth2 authentication backend.""" name = 'loginradius' ID_KEY = 'ID' ACCESS_TOKEN_URL = 'h...
bsd-3-clause
Edraak/edraak-platform
pavelib/utils/test/utils.py
11
5138
""" Helper functions for test tasks """ import os import re import subprocess from paver.easy import cmdopts, sh, task from pavelib.utils.envs import Env from pavelib.utils.timer import timed try: from bok_choy.browser import browser except ImportError: browser = None MONGO_PORT_NUM = int(os.environ.get('ED...
agpl-3.0
pogaku9/aws-datalake-quickstart-looker-isv-integration
scripts/lambdas/writetoES/requests/packages/chardet/jpcntx.py
5
19575
######################## 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 Ri...
apache-2.0
yfried/ansible
lib/ansible/modules/network/avi/avi_clusterclouddetails.py
20
3609
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIB...
gpl-3.0
ajdiaz/mole
mole/index/whoosh.py
1
3646
#! /usr/bin/env python # -*- encoding: utf-8 -*- # vim:fenc=utf-8: from __future__ import absolute_import import os import threading from time import sleep try: import cPickle as pickle except ImportError: import pickle from whoosh.index import create_in,open_dir from whoosh.qparser import QueryParser from...
gpl-3.0
aslamplr/shorts
lib/flask/json.py
348
7530
# -*- coding: utf-8 -*- """ flask.jsonimpl ~~~~~~~~~~~~~~ Implementation helpers for the JSON support in Flask. :copyright: (c) 2012 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import io import uuid from datetime import datetime from .globals import current_app, request fro...
mit
guewen/OpenUpgrade
setup/win32/OpenERPServerService.py
105
3328
# -*- coding: 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 GNU...
agpl-3.0
kantai/passe-framework-prototype
django/contrib/auth/models.py
1
19508
import datetime import urllib from django.contrib import auth from django.contrib.auth.signals import user_logged_in from django.core.exceptions import ImproperlyConfigured from django.db import models from django.db.models.manager import EmptyManager from django.contrib.contenttypes.models import ContentType from dja...
bsd-3-clause
writefaruq/supervised-ipython-nbserver
ipysite/receivers.py
2
1363
from django.dispatch import receiver from account.signals import password_changed from account.signals import user_sign_up_attempt, user_signed_up from account.signals import user_login_attempt, user_logged_in from eventlog.models import log @receiver(user_logged_in) def handle_user_logged_in(sender, **kwargs): ...
mit
pleaseproject/python-for-android
python3-alpha/python3-src/Lib/test/test_unicode.py
46
70367
""" Test script for the Unicode implementation. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs import struct import sys import unittest import warnings from test import support, string_tests import _string # Error handling (bad decoder retu...
apache-2.0
wreckJ/intellij-community
python/lib/Lib/site-packages/django/contrib/messages/tests/base.py
73
17612
import warnings from django import http from django.test import TestCase from django.conf import settings from django.utils.translation import ugettext_lazy from django.utils.unittest import skipIf from django.contrib.messages import constants, utils, get_level, set_level from django.contrib.messages.api import Messag...
apache-2.0
Sutto/cloud-custodian
c7n/actions/webhook.py
2
5660
# Copyright 2019 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
apache-2.0
MinFu/youtube-dl
youtube_dl/extractor/moevideo.py
112
3732
# coding: utf-8 from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( ExtractorError, int_or_none, ) class MoeVideoIE(InfoExtractor): IE_DESC = 'LetitBit video ser...
unlicense
DLance96/ox-dashboard
dashboard/urls.py
1
9734
from django.conf.urls import url from . import views app_name = 'dashboard' urlpatterns = [ # login views url(r'^login/$', views.LoginView.as_view(), name='login'), url(r'^logout/$', views.LogoutView.as_view(), name='logout'), url(r'^brother/change-password/$', views.change_password, name="change_pa...
mit
CraigHarris/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/uao/uaocs_isolation/test_uao_aocs_isolation.py
6
1840
""" 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
EmadMokhtar/Django
tests/m2m_through_regress/test_multitable.py
106
2178
from django.test import TestCase from .models import ( CompetingTeam, Event, Group, IndividualCompetitor, Membership, Person, ) class MultiTableTests(TestCase): @classmethod def setUpTestData(cls): cls.alice = Person.objects.create(name='Alice') cls.bob = Person.objects.create(name='Bob')...
mit
shuggiefisher/crowdstock
django/contrib/gis/management/commands/inspectdb.py
311
1553
from optparse import make_option from django.core.management.base import CommandError from django.core.management.commands.inspectdb import Command as InspectDBCommand class Command(InspectDBCommand): db_module = 'django.contrib.gis.db' gis_tables = {} def get_field_type(self, connection, table_name, row...
bsd-3-clause
BFriedland/UserDataBase-Heroku
venv/Lib/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py
949
19104
######################## 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...
mit
mffrench/fabric
bddtests/peer/query_pb2.py
17
8250
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: peer/query.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _re...
apache-2.0
zasdfgbnm/qutip
qutip/qip/models/cqed.py
5
11710
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
bsd-3-clause
meteorcloudy/tensorflow
tensorflow/contrib/receptive_field/python/util/receptive_field_test.py
39
17994
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
TansyArron/pants
src/python/pants/backend/jvm/subsystems/jvm_platform.py
4
8105
# coding=utf-8 # Copyright 2015 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 logging from...
apache-2.0
tetra5/radiance
logic/threads.py
1
1875
from PyQt4 import QtCore class ImportingThread(QtCore.QThread): """ Imports modules in a thread. Heaviest imports should be initially here, just to be sure that their importing at runtime won't cause UI to hang. Unfortunately, pyinstaller does not recognize such importing, so the same modules...
mit
denovogroup/pox
pox/openflow/webservice.py
45
6404
# Copyright 2012 James McCauley # # 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 writi...
apache-2.0
dulems/hue
apps/oozie/src/oozie/tests.py
4
172224
#!/usr/bin/env python ## -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 ...
apache-2.0
balena/python-smime
smime/pubkey.py
1
1035
from __future__ import unicode_literals from abc import ABCMeta, abstractmethod from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import rsa, padding class PublicKeyCipher(object): __metaclass__ = ABCMeta algo = None @abstractmethod def encrypt...
apache-2.0
MartinHjelmare/home-assistant
homeassistant/components/mqtt/switch.py
7
8464
"""Support for MQTT switches.""" import logging import voluptuous as vol from homeassistant.components import mqtt, switch from homeassistant.components.switch import SwitchDevice from homeassistant.const import ( CONF_DEVICE, CONF_ICON, CONF_NAME, CONF_OPTIMISTIC, CONF_PAYLOAD_OFF, CONF_PAYLOAD_ON, CONF_VALU...
apache-2.0
DoubleNegativeVisualEffects/cortex
test/IECore/ClassLoader.py
12
5337
########################################################################## # # Copyright (c) 2007-2012, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
bsd-3-clause
KaiRo-at/socorro
webapp-django/crashstats/urls.py
2
2070
import os from django.conf import settings from django.conf.urls import patterns, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from .base.monkeypatches import patch from .crashstats import urls from .supersearch import urls as supersearch_urls from .authentication import urls as auth_ur...
mpl-2.0
chienlieu2017/it_management
odoo/addons/membership/tests/test_membership.py
35
3729
# -*- coding: utf-8 -*- import datetime from dateutil.relativedelta import relativedelta from odoo.addons.membership.tests.common import TestMembershipCommon class TestMembership(TestMembershipCommon): def test_old_membership(self): self.membership_1.write({ 'membership_date_from': datetime...
gpl-3.0
bertrand-l/LearnML
learnml/predictor.py
1
11861
# -*- coding: utf-8 -*- # pylint: disable=C0103 """ Base classes for predictors. """ # Author: bertrand-l # License: BSD from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np from .classification import confusion from .optimize.optimize import BaseUnconstrainedOptimizer...
bsd-3-clause
Bloodyaugust/sugarlabcppboilerplate
lib/boost/libs/python/pyste/src/Pyste/EnumExporter.py
13
2214
# Copyright Bruno da Silva de Oliveira 2003. Use, modification and # distribution is subject to 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) from Exporter import Exporter from settings import * import utils #===========...
gpl-2.0
proxysh/Safejumper-for-Desktop
buildlinux/env64/lib/python2.7/site-packages/twisted/web/domhelpers.py
12
8640
# -*- test-case-name: twisted.web.test.test_domhelpers -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ A library for performing interesting tasks with DOM objects. """ import StringIO from twisted.web import microdom from twisted.web.microdom import getElementsByTagName, escape, unesc...
gpl-2.0
vertexproject/synapse
synapse/lib/stormlib/model.py
1
25510
import synapse.exc as s_exc import synapse.common as s_common import synapse.lib.cache as s_cache import synapse.lib.stormtypes as s_stormtypes stormcmds = [ { 'name': 'model.edge.set', 'descr': 'Set a key-value for an edge verb that exists in the current view.', 'cmdargs': ( (...
apache-2.0
sajuptpm/manila
manila/policy.py
5
3459
# Copyright (c) 2011 OpenStack, LLC. # 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 requi...
apache-2.0
DepthDeluxe/ansible
lib/ansible/modules/cloud/ovirt/ovirt_groups.py
45
5353
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
gpl-3.0
a-doumoulakis/tensorflow
tensorflow/python/tools/import_pb_to_tensorboard.py
48
2721
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
midokura/python-midonetclient
src/midonetclient/dhcp_subnet.py
1
3102
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Midokura PTE 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/LICENS...
apache-2.0
felixfontein/ansible
test/units/playbook/test_task.py
26
3563
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an...
gpl-3.0
funkring/fdoo
addons/payment_sips/controllers/main.py
33
1871
# -*- 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
AllenDowney/ThinkBayes2
scripts/hyrax_soln.py
3
1615
"""This file contains code for use with "Think Bayes", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division import numpy import thinkbayes2 import thinkplot class Hyrax(thinkba...
mit
blacklin/kbengine
kbe/res/scripts/common/Lib/encodings/unicode_escape.py
852
1184
""" Python 'unicode-escape' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is inte...
lgpl-3.0
jessegonzalez/grinder
src/grinder/PackageFetch.py
2
3070
# # Copyright (c) 2011 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied, # including the im...
gpl-2.0
marquesarthur/mahadeva_agenda
oauth2client/locked_file.py
144
11379
# Copyright 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
gpl-2.0
toby82/anvil
anvil/components/db.py
2
5493
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Yahoo! 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.or...
apache-2.0
mdmintz/SeleniumBase
seleniumbase/core/report_helper.py
1
10923
import os import shutil import sys import time from selenium import webdriver from seleniumbase.config import settings from seleniumbase.core.style_sheet import style from seleniumbase.fixtures import page_actions from seleniumbase import drivers LATEST_REPORT_DIR = settings.LATEST_REPORT_DIR ARCHIVE_DIR = settings.RE...
mit
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/test/test_xdrlib.py
21
2226
import unittest import xdrlib class XDRTest(unittest.TestCase): def test_xdr(self): p = xdrlib.Packer() s = b'hello world' a = [b'what', b'is', b'hapnin', b'doctor'] p.pack_int(42) p.pack_int(-17) p.pack_uint(9) p.pack_bool(True) p.pack_bool(False...
gpl-3.0
pnichols104/python-koans
python2/koans/about_string_manipulation.py
2
2781
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutStringManipulation(Koan): def test_use_format_to_interpolate_variables(self): value1 = 'one' value2 = 2 string = "The values are {0} and {1}".format(value1, value2) self.assertEqual("The values are...
mit
joelddiaz/openshift-tools
openshift/installer/vendored/openshift-ansible-3.8.36-1/roles/lib_utils/library/delegated_serial_command.py
84
8837
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others # (c) 2016, Andrew Butcher <abutcher@redhat.com> # # This module is derrived from the Ansible command module. # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
apache-2.0
lidan-fnst/samba
python/samba/tests/lsa_string.py
5
2576
# Tests for lsa.String helpers in source4/librpc/ndr/py_lsa.c # # Copyright (C) Catalyst IT Ltd. 2017 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at ...
gpl-3.0
40423252/2017springcd_hw
plugin/liquid_tags/test_audio.py
273
1456
from . import audio import pytest import re @pytest.mark.parametrize('input,expected', [ ('http://foo.bar https://bar.foo', ('http://foo.bar', 'https://bar.foo', None)), ('http://test.foo', ('http://test.foo', None, None)), ('https://test.foo', ('https://test.foo', None, None)), ('http:...
agpl-3.0
niklasf/python-prompt-toolkit
prompt_toolkit/clipboard/pyperclip.py
27
1137
from __future__ import absolute_import, unicode_literals import pyperclip from prompt_toolkit.selection import SelectionType from .base import Clipboard, ClipboardData __all__ = ( 'PyperclipClipboard', ) class PyperclipClipboard(Clipboard): """ Clipboard that synchronizes with the Windows/Mac/Linux syst...
bsd-3-clause
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/azure_reachability_report_parameters.py
1
2244
# 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
ternjs/tern_for_vim
script/tern.py
1
15139
import vim, os, platform, subprocess, webbrowser, json, re, time import sys PY2 = int(sys.version[0]) == 2 if PY2: import urllib2 as request from urllib2 import HTTPError else: # Py3 from urllib import request from urllib.error import HTTPError def cmp(a, b): if a < b: return -...
mit
u0m3/gr-baz
python/qa_howto.py
4
1978
#!/usr/bin/env python # # Copyright 2004,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your opt...
gpl-3.0