repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
benoitsteiner/tensorflow-opencl | tensorflow/python/training/optimizer.py | 1 | 31529 | # 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 |
addition-it-solutions/project-all | openerp/workflow/service.py | 8 | 4971 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of... | agpl-3.0 |
bboyfeiyu/CocosBuilder | CocosBuilder/libs/nodejs/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py | 151 | 1920 | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Unit tests for the common.py file."""
import gyp.common
import unittest
import sys
class TestTopologicallySorted(unittest.TestCase):
... | mit |
pdellaert/ansible | lib/ansible/modules/windows/win_partition.py | 48 | 4629 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Varun Chopra (@chopraaa) <v@chopraaa.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
DOCU... | gpl-3.0 |
pidah/st2contrib | packs/vsphere/actions/vm_vnic_update.py | 6 | 4727 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | apache-2.0 |
FusionSP/android_external_chromium_org | chrome/browser/resources/chromeos/chromevox/tools/upload_chromevox_to_webstore.py | 26 | 3654 | #!/usr/bin/env python
# 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.
'''Publishes ChromeVox to the webstore.
Given an unpacked extension, compresses and sends to the Chrome webstore.
Releasing to th... | bsd-3-clause |
willbittner/grit-i18n | grit/gather/txt.py | 62 | 1175 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Supports making amessage from a text file.
'''
from grit.gather import interface
from grit import tclib
class TxtFile(interfa... | bsd-2-clause |
yhsa678/cuda-convnet2 | python_util/options.py | 180 | 16577 | # Copyright 2014 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 applicable law or... | apache-2.0 |
Evervolv/android_external_chromium_org | tools/telemetry/telemetry/core/platform/mac_platform_backend.py | 23 | 2027 | # Copyright (c) 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.
import os
import subprocess
try:
import resource # pylint: disable=F0401
except ImportError:
resource = None # Not available on all platforms
from... | bsd-3-clause |
theoryno3/luigi | test/scheduler_visualisation_test.py | 49 | 13542 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 |
chudaol/edx-platform | lms/djangoapps/certificates/migrations/0022_default_modes.py | 84 | 11586 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from django.core.files import File
from django.conf import settings
class Migration(DataMigration):
def forwards(self, orm):
"""Add default mo... | agpl-3.0 |
nevir/plexability | extern/depot_tools/third_party/logilab/astng/protocols.py | 18 | 12096 | # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
# copyright 2003-2010 Sylvain Thenault, all rights reserved.
# contact mailto:thenault@gmail.com
#
# This file is part of logilab-astng.
#
# logilab-astng is free software: you can redi... | gpl-2.0 |
drawks/ansible | lib/ansible/modules/network/cloudengine/ce_mlag_config.py | 27 | 33394 | #!/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 |
gchp/django | django/contrib/sites/models.py | 33 | 3883 | from __future__ import unicode_literals
import string
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.db import models
from django.db.models.signals import pre_delete, pre_save
from django.http.request import split_domain_port
from django.utils.encoding import python_2_unicode_com... | bsd-3-clause |
dhanzhang/shadowsocks-1 | shadowsocks/crypto/table.py | 1044 | 8108 | # !/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# 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 |
michath/ConMonkey | python/mozbuild/mozpack/chrome/flags.py | 5 | 8227 | # 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 re
from distutils.version import LooseVersion
from mozpack.errors import errors
from collections import OrderedDi... | mpl-2.0 |
sebgoa/client-python | kubernetes/client/models/v1alpha1_external_admission_hook.py | 2 | 6679 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.7.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 |
afloren/nipype | nipype/interfaces/semtools/testing/generateaveragelmkfile.py | 18 | 1496 | # -*- coding: utf8 -*-
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""
from nipype.interfaces.base import CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath
i... | bsd-3-clause |
kmee/l10n-brazil | sped_purchase/models/inherited_purchase_order_line.py | 2 | 5269 | # -*- coding: utf-8 -*-
# Copyright 2017 KMEE
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from __future__ import division, print_function, unicode_literals
import logging
from odoo import api, fields, models, _
import odoo.addons.decimal_precision as dp
from odoo.addons.sped_imposto.models.sped_c... | agpl-3.0 |
Pakoach/Sick-Beard-Animes | lib/hachoir_parser/program/prc.py | 90 | 2778 | """
PRC (Palm resource) parser.
Author: Sebastien Ponce
Creation date: 29 october 2008
"""
from lib.hachoir_parser import Parser
from lib.hachoir_core.field import (FieldSet,
UInt16, UInt32, TimestampMac32,
String, RawBytes)
from lib.hachoir_core.endian import BIG_ENDIAN
class PRCHeader(FieldSet):
static... | gpl-3.0 |
kjw0106/boto | tests/integration/ec2/vpc/test_connection.py | 114 | 8619 | #!/usr/bin/env python
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without ... | mit |
TrevorLowing/PyGames | pysollib/games/beleagueredcastle.py | 2 | 30812 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
##---------------------------------------------------------------------------##
##
## Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
## Copyright (C) 2003 Mt. Hood Playing Card Co.
## Copyright (C) 2005-2009 Skomoroh
##
## This program is free ... | gpl-2.0 |
wdv4758h/ZipPy | edu.uci.python.benchmark/src/benchmarks/sympy/sympy/liealgebras/cartan_type.py | 22 | 1796 | from __future__ import print_function, division
from sympy.core import Basic, Symbol, Dict, Tuple
class CartanType_generator(Basic):
"""
Constructor for actually creating things
"""
def __call__(self, *args):
c = args[0]
c = list(c)
letter, n = c[0], int(c[1])
if n < ... | bsd-3-clause |
jeromecc/docker-fhio-yakkety | web/lightop/__init__.py | 1 | 3474 | from flask import (Flask,
request,
abort,
)
import os
# Flask app
app = Flask(__name__,
static_folder='static', static_url_path='',
instance_relative_config=True)
CONFIG = os.environ.get('CONFIG') or 'config.Development'
app.config.from_... | apache-2.0 |
lucafavatella/intellij-community | python/lib/Lib/site-packages/django/views/i18n.py | 73 | 9565 | import os
import gettext as gettext_module
from django import http
from django.conf import settings
from django.utils import importlib
from django.utils.translation import check_for_language, activate, to_locale, get_language
from django.utils.text import javascript_quote
from django.utils.encoding import smart_unicod... | apache-2.0 |
derekjchow/models | research/tcn/dataset/webcam.py | 5 | 16225 | # 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 applicab... | apache-2.0 |
adrianholovaty/django | django/contrib/auth/tests/forms.py | 5 | 12677 | import os
from django.contrib.auth.models import User
from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm,
PasswordChangeForm, SetPasswordForm, UserChangeForm, PasswordResetForm)
from django.core import mail
from django.forms.fields import Field, EmailField
from django.test import TestCase
f... | bsd-3-clause |
andrewleech/sickbeard-2-myth | sickbeard-2-myth.py | 1 | 7693 | #!/usr/bin/env python
import _mysql
import sys
import time
import os
import xmltodict
import socket
import logging
import logging.handlers
import subprocess
# This folder needs to be added to new myth storage group called Links
TV_PATH="/myth/tv_downloaded/"
BACKEND_HOST='localhost'
BACKEND_USER='mythtv'
BACKEND_PASS=... | gpl-2.0 |
nriyer/csvkit | csvkit/typeinference.py | 21 | 9005 | #!/usr/bin/env python
import datetime
from dateutil.parser import parse
import six
from csvkit.exceptions import InvalidValueForTypeException, InvalidValueForTypeListException
NoneType = type(None)
NULL_VALUES = ('na', 'n/a', 'none', 'null', '.')
TRUE_VALUES = ('yes', 'y', 'true', 't')
FALSE_VALUES = ('no', 'n', '... | mit |
vmanoria/bluemix-hue-filebrowser | hue-3.8.1-bluemix/desktop/core/ext-py/Django-1.6.10/tests/many_to_one_null/tests.py | 111 | 4478 | from __future__ import absolute_import
from django.test import TestCase
from .models import Reporter, Article
class ManyToOneNullTests(TestCase):
def setUp(self):
# Create a Reporter.
self.r = Reporter(name='John Smith')
self.r.save()
# Create an Article.
self.a = Article... | gpl-2.0 |
hurricup/intellij-community | python/helpers/epydoc/cli.py | 90 | 59770 | # epydoc -- Command line interface
#
# Copyright (C) 2005 Edward Loper
# Author: Edward Loper <edloper@loper.org>
# URL: <http://epydoc.sf.net>
#
# $Id: cli.py 1678 2008-01-29 17:21:29Z edloper $
"""
Command-line interface for epydoc. Abbreviated Usage::
epydoc [options] NAMES...
NAMES... Th... | apache-2.0 |
mancoast/CPythonPyc_test | cpython/314_script_helper.py | 1 | 4346 | # Common utility functions used by various script execution tests
# e.g. test_cmd_line, test_cmd_line_script and test_runpy
import sys
import os
import re
import os.path
import tempfile
import subprocess
import py_compile
import contextlib
import shutil
import zipfile
from test.support import strip_python_stderr
# ... | gpl-3.0 |
Ted1993/Flasky | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py | 483 | 9011 | import datetime
import sys
import socket
from socket import timeout as SocketTimeout
import warnings
from .packages import six
try: # Python 3
from http.client import HTTPConnection as _HTTPConnection, HTTPException
except ImportError:
from httplib import HTTPConnection as _HTTPConnection, HTTPException
cla... | mit |
jorsea/vertical-ngo | logistic_requisition/tests/test_propagate_owner_to_cost_estimate.py | 2 | 1699 | # Author: Leonardo Pistone
# Copyright 2014 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
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any la... | agpl-3.0 |
colinligertwood/odoo | addons/survey/wizard/survey_email_compose_message.py | 106 | 10959 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 |
mldbai/mldb | ext/googleurl/PRESUBMIT.py | 93 | 3371 | #!/usr/bin/python
# Copyright (c) 2009 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.
"""Top-level presubmit script for googleurl.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details o... | apache-2.0 |
Haynie-Research-and-Development/jarvis | deps/lib/python3.4/site-packages/sqlalchemy/dialects/mysql/reflection.py | 1 | 16703 | # mysql/reflection.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
import re
from ... import log, util
from ... import types as sqltypes
from .enum... | gpl-2.0 |
googleinterns/risr | data_utils/comment_classification_test.py | 1 | 2653 | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 |
looooo/pivy | scons/scons-local-1.2.0.d20090919/SCons/Tool/FortranCommon.py | 1 | 9860 | """SCons.Tool.FortranCommon
Stuff for processing Fortran, common to all fortran dialects.
"""
from __future__ import print_function
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this so... | isc |
alliejones/zulip | zerver/views/__init__.py | 1 | 58570 | from __future__ import absolute_import
from django.conf import settings
from django.contrib.auth import authenticate, login, get_backends
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponseForbidden, HttpRespo... | apache-2.0 |
zhouyejoe/spark | examples/src/main/python/mllib/fpgrowth_example.py | 158 | 1280 | #
# 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 |
drxaero/calibre | setup/linux-installer.py | 11 | 25783 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import sys, os, shutil, subprocess, re,... | gpl-3.0 |
syhost/android_kernel_pantech_ef50l | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
windedge/odoo | addons/point_of_sale/report/pos_report.py | 381 | 6370 | # -*- 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 |
Pointedstick/ReplicatorG | skein_engines/skeinforge-40/skeinforge_application/skeinforge_utilities/skeinforge_help.py | 2 | 3940 | """
Help has buttons and menu items to open help, blog and forum pages in your primary browser.
"""
from __future__ import absolute_import
#Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
import __init__
from... | gpl-2.0 |
Innovahn/odoo.old | addons/base_gengo/wizard/__init__.py | 434 | 1077 | # -*- 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 |
juggernate/pymel | pymel/util/testing.py | 8 | 16711 | import sys
import os
import types
import doctest
import modulefinder
import traceback
import inspect
from StringIO import StringIO
from unittest import *
import pymel.util
from warnings import warn
TEST_MAIN_FUNC_NAME = "test_main"
SUITE_FUNC_NAME = "suite"
def doctestFriendly(func):
"""
Decorator which prep... | bsd-3-clause |
ar7z1/ansible | lib/ansible/parsing/ajson.py | 48 | 2435 | # Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
from datetime import date, datetime
from ansible.modu... | gpl-3.0 |
readbeyond/aeneas | aeneas/tools/run_sd.py | 5 | 9786 | #!/usr/bin/env python
# coding=utf-8
# aeneas is a Python/C library and a set of tools
# to automagically synchronize audio and text (aka forced alignment)
#
# Copyright (C) 2012-2013, Alberto Pettarin (www.albertopettarin.it)
# Copyright (C) 2013-2015, ReadBeyond Srl (www.readbeyond.it)
# Copyright (C) 2015-2017, A... | agpl-3.0 |
stephanepechard/mediapp | mediapp/libs/kaa_metadata/audio/core.py | 3 | 2385 | # -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------------
# core.py - basic audio class
# -----------------------------------------------------------------------------
# $Id: core.py 4041 2009-05-22 14:59:59Z tack $
#
# -------------------------------------------------... | gpl-3.0 |
benedictpaten/sonLib | cigarsTest.py | 2 | 2315 | #!/usr/bin/env python
#Copyright (C) 2006-2012 by Benedict Paten (benedictpaten@gmail.com)
#
#Released under the MIT license, see LICENSE.txt
import unittest
import os
import sys
import random
from bioio import getTempFile
from bioio import cigarRead
from bioio import cigarWrite
from bioio import getRandomPairwise... | mit |
CI-WATER/TethysCluster | tethyscluster/commands/help.py | 2 | 1372 | # Copyright 2009-2014 Justin Riley
#
# This file is part of TethysCluster.
#
# TethysCluster is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# la... | gpl-3.0 |
agentxan/nzbToMedia | libs/jaraco/ui/editor.py | 5 | 2756 | from __future__ import unicode_literals, absolute_import
import tempfile
import os
import sys
import subprocess
import mimetypes
import collections
import io
import difflib
import six
class EditProcessException(RuntimeError): pass
class EditableFile(object):
"""
EditableFile saves some data to a temporary file, l... | gpl-3.0 |
Tiotao/morpherpy | env/Lib/site-packages/_markerlib/markers.py | 1769 | 3979 | # -*- coding: utf-8 -*-
"""Interpret PEP 345 environment markers.
EXPR [in|==|!=|not in] EXPR [or|and] ...
where EXPR belongs to any of those:
python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1])
python_full_version = sys.version.split()[0]
os.name = os.name
sys.platform = sys.platfo... | mit |
2014c2g5/2014c2 | exts/w2/static/Brython2.0.0-20140209-164925/Lib/xml/etree/ElementTree.py | 730 | 61800 | #
# ElementTree
# $Id: ElementTree.py 3440 2008-07-18 14:45:01Z fredrik $
#
# light-weight XML support for Python 2.3 and later.
#
# history (since 1.2.6):
# 2005-11-12 fl added tostringlist/fromstringlist helpers
# 2006-07-05 fl merged in selected changes from the 1.3 sandbox
# 2006-07-05 fl removed support for ... | gpl-2.0 |
Omegaphora/external_chromium_org | third_party/tlslite/tlslite/utils/openssl_aes.py | 202 | 1944 | # Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""OpenSSL/M2Crypto AES implementation."""
from .cryptomath import *
from .aes import *
if m2cryptoLoaded:
def new(key, mode, IV):
return OpenSSL_AES(key, mode, IV)
class OpenSSL_AES(AES):
def ... | bsd-3-clause |
cadithealth/genemail | genemail/manager.py | 1 | 2810 | # -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
# file: $Id$
# lib: genemail.manager
# auth: Philip J Grabner <grabner@cadit.com>
# date: 2013/07/09
# copy: (C) Copyright 2013 Cadit Health Inc., All Rights Reserved.
#----------------------------------------------... | mit |
RedHatInsights/insights-core | insights/parsers/tests/test_redhat_release.py | 1 | 4645 | import doctest
from insights.parsers import redhat_release
from insights.parsers.redhat_release import RedhatRelease
from insights.tests import context_wrap
REDHAT_RELEASE1 = """
Red Hat Enterprise Linux Server release 6.7 (Santiago)
""".strip()
REDHAT_RELEASE2 = """
Red Hat Enterprise Linux Server release 7.2 (Mai... | apache-2.0 |
epiphany27/NewsBlur | apps/rss_feeds/migrations/0072_search_indexed.py | 17 | 6538 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Feed.search_indexed'
db.add_column('feeds', 'search_indexed',
self.gf(... | mit |
ovnicraft/odoo | addons/edi/models/__init__.py | 442 | 1116 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
Pexego/odoo | addons/portal_project/tests/test_access_rights.py | 65 | 15194 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
fernandoacorreia/DjangoWAWSLogging | DjangoWAWSLogging/env/Lib/site-packages/django/contrib/sites/tests.py | 41 | 2536 | from django.conf import settings
from django.contrib.sites.models import Site, RequestSite, get_current_site
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpRequest
from django.test import TestCase
from django.test.utils import override_settings
class SitesFrameworkTests(TestCase):
... | mit |
tudyzhb/yichui | django/contrib/gis/db/models/sql/where.py | 89 | 3931 | from django.db.models.fields import FieldDoesNotExist
from django.db.models.sql.constants import LOOKUP_SEP
from django.db.models.sql.expressions import SQLEvaluator
from django.db.models.sql.where import Constraint, WhereNode
from django.contrib.gis.db.models.fields import GeometryField
class GeoConstraint(Constraint... | bsd-3-clause |
akretion/odoo | addons/account_test/__manifest__.py | 16 | 1150 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (c) 2011 CCI Connect asbl (http://www.cciconnect.be) All Rights Reserved.
# Philmer <philmer@cciconnect.be>
{
'name': 'Accounting Consistency Tests',
'version': '1.0',
'cate... | agpl-3.0 |
jason-neal/companion_simulations | simulators/bhm_module.py | 1 | 7262 | import logging
import os
import numpy as np
import pandas as pd
from logutils import BraceMessage as __
from tqdm import tqdm
import simulators
from mingle.models.broadcasted_models import one_comp_model
from mingle.utilities.chisqr import chi_squared
from mingle.utilities.phoenix_utils import generate_bhm_config_par... | mit |
glogiotatidis/bedrock | bedrock/newsletter/views.py | 5 | 26749 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import json
import re
from cgi import escape
from collections import defaultdict
from operator import itemgetter
from d... | mpl-2.0 |
almost/django-pipeline | tests/tests/test_middleware.py | 18 | 1991 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from django.conf import settings
from django.core.urlresolvers import reverse
from tests.utils import pipeline_settings
class MiddlewareTest(TestCase):
def test_middleware_off(self):
response = self.client.g... | mit |
bspink/django | tests/test_client_regress/views.py | 143 | 5161 | import json
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core.serializers.json import DjangoJSONEncoder
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
from django.shortcuts import render_to_response
from django.template import RequestC... | bsd-3-clause |
jhoos/django | tests/admin_ordering/tests.py | 279 | 6702 | from __future__ import unicode_literals
from django.contrib import admin
from django.contrib.admin.options import ModelAdmin
from django.contrib.auth.models import User
from django.test import RequestFactory, TestCase
from .models import (
Band, DynOrderingBandAdmin, Song, SongInlineDefaultOrdering,
SongInlin... | bsd-3-clause |
jralls/gramps | gramps/gui/widgets/grampletbar.py | 3 | 27418 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2011 Nick Hall
# Copyright (C) 2011 Gary Burton
#
# 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
#... | gpl-2.0 |
TariqAHassan/BioVida | tests/images/biovida_images_tests.py | 1 | 2865 | """
BioVida-Images Subpackage Unit Testing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
# Note: 'medpix.png' is simply a blank images of same correct size.
# To test the OpeniImageProcessing() class, it will need to be replaced
# with an actual MedPix image.
import os
import sys
import unittest
import pandas a... | bsd-3-clause |
amisrs/one-eighty | venv2/lib/python2.7/site-packages/_mysql_exceptions.py | 99 | 2352 | """_mysql_exceptions: Exception classes for _mysql and MySQLdb.
These classes are dictated by the DB API v2.0:
http://www.python.org/topics/database/DatabaseAPI-2.0.html
"""
try:
from exceptions import Exception, StandardError, Warning
except ImportError:
# Python 3
StandardError = Exception
class ... | mit |
jjs0sbw/CSPLN | apps/scaffolding/mac/web2py/web2py.app/Contents/Resources/lib/python2.7/numpy/oldnumeric/alter_code1.py | 101 | 8498 | """
This module converts code written for Numeric to run with numpy
Makes the following changes:
* Changes import statements (warns of use of from Numeric import *)
* Changes import statements (using numerix) ...
* Makes search and replace changes to:
- .typecode()
- .iscontiguous()
- .byteswapped()
- .... | gpl-3.0 |
jlebon/redhat-ci | papr/utils/ext_schema.py | 1 | 3671 | import re
from pykwalify.core import Core
from pykwalify.errors import SchemaError
# we can't use pkg-relative imports here because pykwalify imports this file as
# its own pkg
from papr.utils import common
# http://stackoverflow.com/questions/2532053/
def _valid_hostname(hostname):
if len(hostname) > 253:
... | mit |
cogeorg/BlackRhino | examples/Georg2012/production/networkx/readwrite/json_graph/adjacency.py | 14 | 2989 | # Copyright (C) 2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
from copy import deepcopy
from itertools import count,repeat
import json
import networkx as nx
__author__ = """Aric Hagberg (hagberg@lanl.... | gpl-3.0 |
elbeardmorez/quodlibet | quodlibet/tests/test_formats_wma.py | 1 | 6849 | # -*- coding: utf-8 -*-
# Copyright 2013 Christoph Reiter
#
# 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.
import os
... | gpl-2.0 |
Korkki/django | tests/template_tests/syntax_tests/test_autoescape.py | 337 | 5575 | from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import SafeClass, UnsafeClass, setup
class AutoescapeTagTests(SimpleTestCase):
@setup({'autoescape-tag01': '{% autoescape off %}hello{% endautoescape %}'})
def te... | bsd-3-clause |
precedenceguo/mxnet | tools/caffe_converter/compare_layers.py | 11 | 14618 | # 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 |
openstack/oslo.log | oslo_log/log.py | 1 | 18773 | # Copyright 2011 OpenStack Foundation.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance w... | apache-2.0 |
normanmaurer/AutobahnTestSuite | autobahntestsuite/autobahntestsuite/case/case1_2_8.py | 14 | 1396 | ###############################################################################
##
## Copyright 2011 Tavendo GmbH
##
## 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
##
## ht... | apache-2.0 |
yamt/neutron | quantum/plugins/services/agent_loadbalancer/agent/api.py | 7 | 2454 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 New Dream Network, LLC (DreamHost)
#
# 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/li... | apache-2.0 |
samfoo/servo | tests/wpt/web-platform-tests/tools/wptserve/wptserve/request.py | 57 | 16117 | import base64
import cgi
import Cookie
import StringIO
import tempfile
import urlparse
import stash
from utils import HTTPException
missing = object()
class Server(object):
"""Data about the server environment
.. attribute:: config
Environment configuration information with information about the
v... | mpl-2.0 |
fancylads/bespoke | tests/config_test.py | 1 | 49881 | """
.. module:: config_test
:platform: Linux, Windows
:synopsis: Unit tests for the config module.
:license: BSD, see LICENSE for more details.
.. moduleauthor:: Ryan Gard <ryan.a.gard@outlook.com>
"""
__version__ = 0.2
#========================================================================================... | bsd-2-clause |
bosha/torhandlers | torhandlers/list.py | 1 | 4064 | # -*- coding: utf-8 -*-
__author__ = 'Alex Bo'
__email__ = 'bosha@the-bosha.ru'
import math
from torhandlers.exceptions import ImproperlyConfigured
from torhandlers.base import ContextMixin, GenericHandler, TemplateResponseMixin
from torhandlers.pagination import Page
from sqlalchemy import func
class MultipleObject... | mit |
erik-nelson/berkeley_sfm | external/gtest/test/gtest_output_test.py | 1733 | 12005 | #!/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... | bsd-3-clause |
yousseb/meld | meld/matchers/merge.py | 2 | 13035 | # Copyright (C) 2009-2010 Piotr Piastucki <the_leech@users.berlios.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 2 of the License, or (at
# your option) any later version.... | gpl-2.0 |
haniehrajabi/ryu | ryu/lib/packet/packet_base.py | 58 | 2613 | # Copyright (C) 2012 Nippon Telegraph and Telephone 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 appli... | apache-2.0 |
jaggu303619/asylum | openerp/addons/auth_openid/__init__.py | 443 | 1090 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
Hazer/moveonpc | examples/python/rolling.py | 7 | 2500 |
#
# PS Move API - An interface for the PS Move Motion Controller
# Copyright (c) 2011, 2012 Thomas Perl <m@thp.io>
# 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 sou... | bsd-2-clause |
wfxiang08/Nuitka | nuitka/codegen/SliceCodes.py | 2 | 6053 | # Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | apache-2.0 |
sjsinju/coreclr | tests/scripts/lst_creator.py | 4 | 13209 | #!/usr/bin/env python
#
## Licensed to the .NET Foundation under one or more agreements.
## The .NET Foundation licenses this file to you under the MIT license.
## See the LICENSE file in the project root for more information.
#
##
# Title :lst_creator.py
#
# Script to create a working list file from the ... | mit |
mikebenfield/scikit-learn | examples/linear_model/plot_logistic_multinomial.py | 50 | 2480 | """
====================================================
Plot multinomial and One-vs-Rest Logistic Regression
====================================================
Plot decision surface of multinomial and One-vs-Rest Logistic Regression.
The hyperplanes corresponding to the three One-vs-Rest (OVR) classifiers
are repre... | bsd-3-clause |
tanmaykm/edx-platform | common/djangoapps/student/management/tests/test_bulk_change_enrollment.py | 22 | 4543 | """Tests for the bulk_change_enrollment command."""
import ddt
from django.core.management import call_command
from django.core.management.base import CommandError
from mock import patch, call
from student.tests.factories import UserFactory, CourseModeFactory, CourseEnrollmentFactory
from student.models import CourseE... | agpl-3.0 |
ericzolf/ansible | test/integration/targets/collections/collections/ansible_collections/testns/content_adj/plugins/cache/custom_jsonfile.py | 119 | 1967 | # (c) 2014, Brian Coca, Josh Drake, et al
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
cache: jsonfi... | gpl-3.0 |
acsone/odoo | addons/hr_holidays/wizard/hr_holidays_summary_department.py | 337 | 2335 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# $Id: account.py 1005 2005-07-25 08:41:42Z nicoe $
#
# This program is free software: you can redistrib... | agpl-3.0 |
elopez/linux | tools/perf/scripts/python/syscall-counts-by-pid.py | 1996 | 2105 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... | gpl-2.0 |
TheWhisp/android_kernel_samsung_kyle | tools/perf/scripts/python/sched-migration.py | 11215 | 11670 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... | gpl-2.0 |
hifly/OpenUpgrade | addons/sale_order_dates/__openerp__.py | 260 | 1771 | # -*- 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 |
agustinhenze/webassets.debian | examples/appengine/webassets/filter/cleancss.py | 14 | 1085 | import os
from webassets.filter import ExternalTool
__all__ = ('CleanCSS',)
class CleanCSS(ExternalTool):
"""
Minify css using `Clean-css <https://github.com/GoalSmashers/clean-css/>`_.
Clean-css is an external tool written for NodeJS; this filter assumes that
the ``cleancss`` executable is in the... | bsd-2-clause |
chrisdew/protobuf-wireshark | make_wireshark_plugin.py | 8 | 6315 | #! /usr/bin/python
#
# Dilip Antony Joseph (dilip.antony.joseph at gmail.com)
# http://www.cs.berkeley.edu/~dilip/wireshark-protobuf
#
# NOTE FROM AUTHOR:
# This is my first Python program. I am still learning the
# language. If you find any glaring errors or coding style
# violations, please do email me.
import sy... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.