repo_name stringlengths 6 100 | path stringlengths 4 294 | copies stringlengths 1 5 | size stringlengths 4 6 | content stringlengths 606 896k | license stringclasses 15
values |
|---|---|---|---|---|---|
breathe/ansible | lib/ansible/plugins/action/raw.py | 106 | 1665 | # (c) 2012, 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) any lat... | gpl-3.0 |
marscher/mdtraj | MDTraj/core/trajectory.py | 1 | 51903 | ##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2014 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors: Kyle A. Beauchamp, TJ Lane, Jo... | lgpl-2.1 |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-3.5.0/Lib/uuid.py | 3 | 23887 | r"""UUID objects (universally unique identifiers) according to RFC 4122.
This module provides immutable UUID objects (class UUID) and the functions
uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5
UUIDs as specified in RFC 4122.
If all you want is a unique ID, you should probably call uuid1() ... | mit |
tmerrick1/spack | var/spack/repos/builtin/packages/minismac2d/package.py | 5 | 3131 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 |
albertjan/pypyjs | website/js/pypy.js-0.2.0/lib/modules/hashlib.py | 8 | 7418 | # $Id$
#
# Copyright (C) 2005 Gregory P. Smith (greg@krypto.org)
# Licensed to PSF under a Contributor Agreement.
#
__doc__ = """hashlib module - A common interface to many hash functions.
new(name, string='') - returns a new hash object implementing the
given hash function; initializing th... | mit |
thusser/rtml-parse | rtmlparse/examples/telescope.py | 1 | 1224 | from rtmlparse import RTML
from rtmlparse.elements import *
from rtmlparse.misc import units, unitvalues
def main():
# create rtml
rtml = RTML('rtml://monet.uni-goettingen.de/resource', RTML.Mode.resource)
# telescope
telescope = Telescope(rtml, name='MONET/S')
telescope.Aperture = unitvalues.Ape... | mit |
switchboardOp/ansible | test/units/modules/network/nxos/test_nxos_pim.py | 47 | 2116 | # (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 |
qwefi/nova | nova/tests/virt/powervm/test_powervm.py | 2 | 42457 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | apache-2.0 |
nitzmahone/ansible | lib/ansible/modules/remote_management/manageiq/manageiq_provider.py | 53 | 35689 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Daniel Korn <korndaniel1@gmail.com>
# (c) 2017, Yaacov Zamir <yzamir@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
ANS... | gpl-3.0 |
google/floq-client | floq/client/client/cirq.py | 1 | 1444 | # Copyright 2021 The Floq 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 |
coldmind/django | tests/template_tests/syntax_tests/test_template_tag.py | 521 | 2594 | from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import setup
class TemplateTagTests(SimpleTestCase):
@setup({'templatetag01': '{% templatetag openblock %}'})
def test_templatetag01(self):
output = self.engine.render_to_string('templatetag01')
... | bsd-3-clause |
spisneha25/django | tests/gis_tests/maps/tests.py | 322 | 2099 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import skipUnless
from django.contrib.gis.geos import HAS_GEOS
from django.test import SimpleTestCase
from django.test.utils import modify_settings, override_settings
from django.utils.encoding import force_text
GOOGLE_MAPS_API_KEY = 'XXXX... | bsd-3-clause |
alexmingoia/nixops | nixops/resources/gce_image.py | 5 | 3204 | # -*- coding: utf-8 -*-
# Automatic provisioning of GCE Images.
import os
import libcloud.common.google
from nixops.util import attr_property
from nixops.gce_common import ResourceDefinition, ResourceState
class GCEImageDefinition(ResourceDefinition):
"""Definition of a GCE Image"""
@classmethod
def g... | lgpl-3.0 |
SergioGonzalezSanz/conformal_predictors | tests/nc_measures/SVMTest.py | 1 | 1492 | import unittest
from conformal_predictors.nc_measures.SVM import SVCDistanceNCMeasure
from sklearn.svm import SVC
from numpy import array
class SVMTest(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_1(self):
x = array([[1, 1], [2, 2]])
y = ar... | mit |
snnn/tensorflow | tensorflow/python/ops/gradient_checker.py | 20 | 15045 | # 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 |
borjam/exabgp | src/exabgp/configuration/process/parser.py | 3 | 2367 | # encoding: utf-8
"""
parse_process.py
Created by Thomas Mangin on 2015-06-18.
Copyright (c) 2009-2017 Exa Networks. All rights reserved.
License: 3-clause BSD. (See the COPYRIGHT file)
"""
import os
import stat
def encoder(tokeniser):
value = tokeniser()
if value not in ('text', 'json'):
raise Val... | bsd-3-clause |
jessrosenfield/pants | src/python/pants/base/workunit.py | 3 | 8719 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import re
... | apache-2.0 |
bonitadecker77/python-for-android | python3-alpha/python3-src/Lib/test/test_hmac.py | 57 | 12958 | import hmac
import hashlib
import unittest
import warnings
from test import support
class TestVectorsTestCase(unittest.TestCase):
def test_md5_vectors(self):
# Test the HMAC module against test vectors from the RFC.
def md5test(key, data, digest):
h = hmac.HMAC(key, data)
... | apache-2.0 |
CirrusLogic/rpi-linux | tools/perf/scripts/python/sched-migration.py | 1910 | 11965 | #!/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 |
jbassen/edx-platform | lms/djangoapps/django_comment_client/management/commands/rename_user.py | 3 | 1646 | """
Change the username of an existing user
"""
import logging
from os.path import basename
from pymongo.errors import PyMongoError
from django.core.management.base import BaseCommand, CommandError
from django.db import IntegrityError
from django.contrib.auth.models import User
from django_comment_client import man... | agpl-3.0 |
thedep2/CouchPotatoServer | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/syfy.py | 159 | 1827 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
class SyfyIE(InfoExtractor):
_VALID_URL = r'https?://www\.syfy\.com/(?:videos/.+?vid:(?P<id>[0-9]+)|(?!videos)(?P<video_name>[^/]+)(?:$|[?#]))'
_TESTS = [{
'url': 'http://www.syfy.com/videos/Robot%20Combat%20League/... | gpl-3.0 |
ygol/dotfiles | bin/.venv-ansible-venv/lib/python2.6/site-packages/ansible/modules/core/cloud/rackspace/rax_cdb_user.py | 60 | 6244 | #!/usr/bin/python -tt
# 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 distrib... | mit |
philippeback/volatility | contrib/plugins/example.py | 58 | 2769 | # Volatility
#
# Authors:
# Mike Auty <mike.auty@gmail.com>
#
# 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 Software Foundation; either version 2 of the License, or
# (at your op... | gpl-2.0 |
b-carter/numpy | numpy/distutils/system_info.py | 4 | 85315 | #!/usr/bin/env python
"""
This file defines a set of system_info classes for getting
information about various resources (libraries, library directories,
include directories, etc.) in the system. Currently, the following
classes are available:
atlas_info
atlas_threads_info
atlas_blas_info
atlas_blas_threads_in... | bsd-3-clause |
evensonbryan/yocto-autobuilder | lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/trial/runner.py | 5 | 28076 | # -*- test-case-name: twisted.trial.test.test_runner -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
A miscellany of code used to run Trial tests.
Maintainer: Jonathan Lange
"""
__all__ = [
'suiteVisit', 'TestSuite',
'DestructiveTestSuite', 'DryRunVisitor',
'ErrorHolder',... | gpl-2.0 |
sebrandon1/nova | nova/tests/unit/virt/libvirt/fake_imagebackend.py | 3 | 7680 | # Copyright 2012 Grid Dynamics
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | apache-2.0 |
repotvsupertuga/tvsupertuga.repository | instal/script.module.universalscrapers/lib/universalscrapers/modules/js2py/prototypes/jsarray.py | 15 | 14886 | import six
if six.PY3:
xrange = range
import functools
def to_arr(this):
"""Returns Python array from Js array"""
return [this.get(str(e)) for e in xrange(len(this))]
ARR_STACK = set({})
class ArrayPrototype:
def toString():
# this function is wrong but I will leave it here fore debuggi... | gpl-2.0 |
mogproject/javactl | src/javactl/setting/setting.py | 1 | 3543 | from __future__ import division, print_function, absolute_import, unicode_literals
import subprocess
from itertools import chain
import yaml
import six
from mog_commons.case_class import CaseClass
from mog_commons.functional import oget
from javactl.setting import arg_parser
from javactl.setting.app_setting import App... | apache-2.0 |
gurneyalex/OpenUpgrade | addons/purchase_double_validation/purchase_double_validation_installer.py | 432 | 2315 | # -*- 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 |
hellhovnd/django | tests/validation/models.py | 56 | 4426 | from __future__ import unicode_literals
from datetime import datetime
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
def validate_answer_to_universe(value):
if value != 42:
raise ValidationError('This is not t... | bsd-3-clause |
OS2World/APP-INTERNET-torpak_2 | Lib/repr.py | 2 | 3743 | """Redo the `...` (representation) but with limits on most sizes."""
__all__ = ["Repr","repr"]
import sys
class Repr:
def __init__(self):
self.maxlevel = 6
self.maxtuple = 6
self.maxlist = 6
self.maxarray = 5
self.maxdict = 4
self.maxstring = 30
self.maxlon... | mit |
jjmleiro/hue | desktop/core/ext-py/Babel-0.9.6/setup.py | 40 | 2769 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
... | apache-2.0 |
lumig242/Hue-Integration-with-CDAP | desktop/core/ext-py/Django-1.6.10/tests/check/tests.py | 51 | 5087 | from django.core.checks.compatibility import base
from django.core.checks.compatibility import django_1_6_0
from django.core.management.commands import check
from django.core.management import call_command
from django.db.models.fields import NOT_PROVIDED
from django.test import TestCase
from .models import Book
class... | apache-2.0 |
Gota7/Miyamoto | loading.py | 2 | 29315 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Miyamoto! Level Editor - New Super Mario Bros. U Level Editor
# Copyright (C) 2009-2021 Treeki, Tempus, angelsl, JasonP27, Kinnay,
# MalStar1000, RoadrunnerWMC, MrRean, Grop, AboodXD, Gota7, John10v10,
# mrbengtsson
# This file is part of Miyamoto!.
# Miyamoto! is fre... | gpl-3.0 |
Havner/smack-namespace | scripts/analyze_suspend.py | 1537 | 120394 | #!/usr/bin/python
#
# Tool for analyzing suspend/resume timing
# Copyright (c) 2013, Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This prog... | gpl-2.0 |
mtils/ems | examples/qt4/gui/persondata_form.py | 1 | 1430 |
from PyQt4.QtCore import pyqtSignal, Qt
from PyQt4.QtGui import QTableView, QApplication, QWidget, QVBoxLayout
from PyQt4.QtGui import QLineEdit, QSpinBox, QDoubleSpinBox, QCheckBox
class PersonDataForm(QWidget):
def __init__(self, parent=None):
super(PersonDataForm, self).__init__(parent)
self... | mit |
iocoop/beancount | src/python/beancount/projects/returns.py | 1 | 39336 | #!/usr/bin/env python3
"""Compute the returns of a portfolio.
A document exists to describe the problem in more detail.
http://furius.ca/beancount/doc/portfolio-returns
Calculating the returns is carried out by identifying the entries whose accounts
match a regular expression that defines accounts to consider for val... | gpl-2.0 |
andrew-plunk/docker-registry | depends/docker-registry-core/docker_registry/testing/mock_dict.py | 38 | 1431 | # -*- coding: utf-8 -*-
# Copyright (c) 2014 Docker.
#
# 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 |
qedsoftware/commcare-hq | corehq/ex-submodules/pillowtop/utils.py | 1 | 8673 | from __future__ import division
from collections import namedtuple
from datetime import datetime
import sys
import simplejson
from django.conf import settings
from dimagi.utils.chunked import chunked
from dimagi.utils.modules import to_function
from pillowtop.exceptions import PillowNotFoundError
from pillowtop.log... | bsd-3-clause |
cristiana214/cristianachavez214-cristianachavez | python/gdata/samples/oauth/oauth_on_appengine/appengine_utilities/rotmodel.py | 131 | 2149 | """
Copyright (c) 2008, appengine-utilities project
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 of conditions and ... | apache-2.0 |
joone/chromium-crosswalk | tools/copyright_scanner/copyright_scanner.py | 10 | 16713 | # 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.
"""Utilities for scanning source files to determine code authorship.
"""
import itertools
def ForwardSlashesToOsPathSeps(input_api, path):
"""Converts fo... | bsd-3-clause |
temasek/android_external_chromium_org | chrome/common/extensions/docs/server2/host_file_system_provider_test.py | 23 | 1704 | #!/usr/bin/env python
# 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 copy import deepcopy
import unittest
from extensions_paths import API
from file_system import FileNotFoundError
from host_file_sy... | bsd-3-clause |
jennyzhang0215/incubator-mxnet | python/mxnet/module/python_module.py | 38 | 14791 | # 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 |
SpeedBienal/app-bienal | Bienal/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py | 1869 | 1247 | # Copyright 2014 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.
"""A clone of the default copy.deepcopy that doesn't handle cyclic
structures or complex types except for dicts and lists. This is
because gyp copies so large structur... | gpl-3.0 |
dmordom/nipype | nipype/interfaces/fsl/tests/test_auto_FNIRT.py | 5 | 3834 | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.fsl.preprocess import FNIRT
def test_FNIRT_inputs():
input_map = dict(affine_file=dict(argstr='--aff=%s',
),
apply_inmask=dict(argstr='--applyinmask=%s',
sep=',',
xor=['skip_inmask']... | bsd-3-clause |
dcramer/django-compositepks | tests/modeltests/many_to_one_null/models.py | 30 | 3262 | """
16. Many-to-one relationships that can be null
To define a many-to-one relationship that can have a null foreign key, use
``ForeignKey()`` with ``null=True`` .
"""
from django.db import models
class Reporter(models.Model):
name = models.CharField(max_length=30)
def __unicode__(self):
return self... | bsd-3-clause |
piotroxp/scibibscan | scib/lib/python3.6/site-packages/pip/_vendor/colorama/ansitowin32.py | 450 | 9668 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import re
import sys
import os
from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style
from .winterm import WinTerm, WinColor, WinStyle
from .win32 import windll, winapi_test
winterm = None
if windll is not None:
winterm = WinTerm()
def ... | mit |
deklungel/iRulez | old/modules/libraries/mysql/connector/conversion.py | 15 | 19710 | # MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. There are special exceptio... | mit |
brockwhittaker/zulip | zerver/webhooks/beanstalk/view.py | 3 | 3606 | # Webhooks for external integrations.
from django.http import HttpRequest, HttpResponse
from zerver.models import get_client, UserProfile
from zerver.lib.actions import check_send_stream_message
from zerver.lib.response import json_success
from zerver.lib.validator import check_dict
from zerver.decorator import REQ, h... | apache-2.0 |
UKTradeInvestment/export-wins-data | mi/views/sector_views.py | 1 | 13377 | import operator
from collections import defaultdict
from itertools import groupby
from operator import itemgetter
from functools import reduce
from django.db.models import Q
from mi.models import (
HVCGroup,
SectorTeam,
Target,
)
from mi.utils import sort_campaigns_by
from mi.views.base_view import BaseWi... | gpl-3.0 |
cgstudiomap/cgstudiomap | main/eggs/Django-1.9-py2.7.egg/django/core/cache/backends/db.py | 480 | 8628 | "Database cache backend."
import base64
from datetime import datetime
from django.conf import settings
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
from django.db import DatabaseError, connections, models, router, transaction
from django.utils import six, timezone
from django.utils.encoding i... | agpl-3.0 |
Elettronik/SickRage | lib/html5lib/treewalkers/__init__.py | 354 | 5544 | """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-3.0 |
siggame/webserver | webserver/codemanagement/migrations/0001_initial.py | 1 | 11020 | # -*- 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 model 'BaseClient'
db.create_table('codemanagement_baseclient', (
('id', self.gf('djang... | bsd-3-clause |
mlperf/training_results_v0.6 | Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/backend/test/case/node/gather.py | 2 | 1223 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np # type: ignore
import onnx
from ..base import Base
from . import expect
class Gather(Base):
@staticmethod
def export_gather_0(): # type: ... | apache-2.0 |
CubicERP/geraldo | site/newsite/django_1_0/django/template/context.py | 14 | 3365 | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
_standard_context_processors = None
class ContextPopException(Exception):
"pop() has been called more times than push()"
pass
class Context(object):
"A stack container for variable context"
def __init__(self, dic... | lgpl-3.0 |
eunchong/build | scripts/tools/get_master_config.py | 2 | 3333 | #!/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.
"""Prints information from master_site_config.py
The sole purpose of this program it to keep the crap inside build/ while
we're moving... | bsd-3-clause |
py4n6/pyflag | utilities/whois_load.py | 7 | 12614 | #!/usr/bin/python
#
# Script to load whois ipv4 data into pyflag master database
# usage:
# ./whois_load [filename]...
#
# Multiple files can be named on the cmd line, but filenames MUST
# be of a particular format:
# RIR Records: delegated-<source>-<latest|date> eg. delegated-arin-latest
# Full Records: <source>.db.i... | gpl-2.0 |
sexroute/commandergenius | project/jni/python/src/Lib/plat-mac/lib-scriptpackages/Finder/Enumerations.py | 81 | 3491 | """Suite Enumerations: Enumerations for the Finder
Level 1, version 1
Generated from /System/Library/CoreServices/Finder.app
AETE/AEUT resource version 0/144, language 0, script 0
"""
import aetools
import MacOS
_code = 'tpnm'
from StdSuites.Type_Names_Suite import *
class Enumerations_Events(Type_Names_Suite_Event... | lgpl-2.1 |
bgris/ODL_bgris | lib/python3.5/site-packages/PIL/FpxImagePlugin.py | 14 | 6388 | #
# THIS IS WORK IN PROGRESS
#
# The Python Imaging Library.
# $Id$
#
# FlashPix support for PIL
#
# History:
# 97-01-25 fl Created (reads uncompressed RGB images only)
#
# Copyright (c) Secret Labs AB 1997.
# Copyright (c) Fredrik Lundh 1997.
#
# See the README file for information on usage and redistribution.
#
fr... | gpl-3.0 |
yakky/django | tests/sitemaps_tests/urls/http.py | 311 | 4069 | from datetime import date, datetime
from django.conf.urls import url
from django.conf.urls.i18n import i18n_patterns
from django.contrib.sitemaps import GenericSitemap, Sitemap, views
from django.http import HttpResponse
from django.utils import timezone
from django.views.decorators.cache import cache_page
from ..mod... | bsd-3-clause |
drpaneas/linuxed.gr | lib/python2.7/site-packages/docutils/parsers/rst/languages/pl.py | 130 | 3427 | # $Id$
# Author: Robert Wojciechowicz <rw@smsnet.pl>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/langu... | mit |
rosswhitfield/mantid | Framework/PythonInterface/plugins/algorithms/EnggFocus.py | 3 | 12079 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
from... | gpl-3.0 |
VagrantApe/flaskMicroblog | venv/lib/python2.7/site-packages/flask_wtf/i18n.py | 4 | 1651 | # coding: utf-8
"""
flask_wtf.i18n
~~~~~~~~~~~~~~
Internationalization support for Flask WTF.
:copyright: (c) 2013 by Hsiaoming Yang.
"""
from flask import _request_ctx_stack
from wtforms.ext.i18n.utils import messages_path
from flask.ext.babel import get_locale
from babel import support
__all__ = (... | bsd-3-clause |
docusign/docusign-python-client | docusign_esign/models/in_person_signer.py | 1 | 102224 | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | mit |
eeshangarg/oh-mainline | vendor/packages/Django/scripts/manage_translations.py | 41 | 6210 | #!/usr/bin/env python
#
# This python file contains utility scripts to manage Django translations.
# It has to be run inside the django git root directory.
#
# The following commands are available:
#
# * update_catalogs: check for new strings in core and contrib catalogs, and
# output how much string... | agpl-3.0 |
Lekensteyn/buildbot | master/buildbot/test/unit/test_util_subscriptions.py | 10 | 2140 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 |
ktsitsikas/odemis | src/odemis/gui/test/comp_slider_test.py | 1 | 179452 | #-*- coding: utf-8 -*-
"""
@author: Rinze de Laat
Copyright © 2012 Rinze de Laat, Delmic
This file is part of Odemis.
Odemis is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License version 2 as published by the Free
Software Foundation.
Odemis is distributed in ... | gpl-2.0 |
kutenai/django | tests/db_functions/test_datetime.py | 9 | 35755 | from __future__ import unicode_literals
from datetime import datetime
from unittest import skipIf
from django.conf import settings
from django.db import connection
from django.db.models import DateField, DateTimeField, IntegerField
from django.db.models.functions import (
Extract, ExtractDay, ExtractHour, Extract... | bsd-3-clause |
ravibhure/ansible | lib/ansible/modules/net_tools/ldap/ldap_entry.py | 49 | 9945 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Peter Sagerson <psagers@ignorare.net>
# (c) 2016, Jiri Tyr <jiri.tyr@gmail.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
A... | gpl-3.0 |
Yukarumya/Yukarum-Redfoxes | testing/mozharness/configs/marionette/windows_config.py | 1 | 1876 | # This is a template config file for marionette production on Windows.
import os
import sys
config = {
# marionette options
"marionette_address": "localhost:2828",
"test_manifest": "unit-tests.ini",
"virtualenv_python_dll": 'c:/mozilla-build/python27/python27.dll',
"virtualenv_path": 'venv',
"... | mpl-2.0 |
mugurrus/superdesk-core | tests/io/feed_parsers/dpa_test.py | 4 | 2118 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import os
... | agpl-3.0 |
pquentin/django | tests/generic_relations/tests.py | 8 | 25089 | from __future__ import unicode_literals
from django import forms
from django.contrib.contenttypes.forms import generic_inlineformset_factory
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import FieldError
from django.db.models import Q
from django.test import TestCase
from djan... | bsd-3-clause |
saradbowman/osf.io | osf/models/action.py | 5 | 1878 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from include import IncludeManager
from osf.models.base import BaseModel, ObjectIDMixin
from osf.utils.workflows import DefaultStates, DefaultTriggers, ReviewStates, ReviewTriggers
from osf.utils import permissions
class B... | apache-2.0 |
umitproject/tease-o-matic | django/conf/locale/id/formats.py | 355 | 1818 | # -*- 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 = 'j N Y'
DATETIME_FORMAT = "j N Y, G.i.s"
TIME_FORMAT = 'G.i.s'
YEAR_MONTH_... | bsd-3-clause |
2014c2g5/2014c2 | exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/calendar.py | 828 | 22940 | """Calendar printing functions
Note when comparing these calendars to the ones printed by cal(1): By
default, these calendars have Monday as the first day of the week, and
Sunday as the last (the European convention). Use setfirstweekday() to
set the first day of the week (0=Monday, 6=Sunday)."""
import sys
import da... | gpl-2.0 |
willingc/oh-mainline | vendor/packages/Django/tests/modeltests/update_only_fields/tests.py | 102 | 9781 | from __future__ import absolute_import
from django.db.models.signals import pre_save, post_save
from django.test import TestCase
from .models import Person, Employee, ProxyEmployee, Profile, Account
class UpdateOnlyFieldsTests(TestCase):
def test_update_fields_basic(self):
s = Person.objects.create(name... | agpl-3.0 |
dstockwell/blink | Tools/Scripts/webkitpy/tool/commands/commitannouncer.py | 39 | 2787 | # Copyright (c) 2013 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 of conditions and the ... | bsd-3-clause |
alcobar/asuswrt-merlin | release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/arm-none-eabi/lib/thumb2/libstdc++.a-gdb.py | 12 | 2354 | # -*- python -*-
# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later versi... | gpl-2.0 |
blaggacao/odoo | addons/l10n_be_hr_payroll_account/__init__.py | 430 | 1046 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... | agpl-3.0 |
nju520/django | tests/m2m_recursive/models.py | 410 | 1120 | """
Many-to-many relationships between the same two tables
In this example, a ``Person`` can have many friends, who are also ``Person``
objects. Friendship is a symmetrical relationship - if I am your friend, you
are my friend. Here, ``friends`` is an example of a symmetrical
``ManyToManyField``.
A ``Person`` can als... | bsd-3-clause |
proxysh/Safejumper-for-Desktop | buildlinux/env32/lib/python2.7/site-packages/twisted/protocols/haproxy/_parser.py | 16 | 2051 | # -*- test-case-name: twisted.protocols.haproxy.test.test_parser -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Parser for 'haproxy:' string endpoint.
"""
from zope.interface import implementer
from twisted.plugin import IPlugin
from twisted.internet.endpoints import (
quoteStrin... | gpl-2.0 |
samepage-labs/luigi | test/scheduler_test.py | 6 | 4367 | # -*- 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 |
majetideepak/arrow | python/pyarrow/tests/test_builder.py | 7 | 2015 | # 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 |
waelrash1/or-tools | examples/python/data/nonogram_regular/nonogram_ps.py | 74 | 1042 | # Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
BartoszCichecki/onlinepython | onlinepython/pypy-2.4.0-win32/lib-python/2.7/test/test_timeout.py | 46 | 7092 | """Unit tests for socket timeout feature."""
import unittest
from test import test_support
# This requires the 'network' resource as given on the regrtest command line.
skip_expected = not test_support.is_resource_enabled('network')
import time
import socket
class CreationTestCase(unittest.TestCase):
"""Test c... | gpl-2.0 |
sujoykroy/motion-picture | editor/MotionPicture/shapes/polygon_shape.py | 1 | 17847 | from ..commons import *
from .shape import Shape
from xml.etree.ElementTree import Element as XmlElement
from .mirror import *
class PolygonFormRenderer(object):
def __init__(self, polygon_shape, form_name):
self.polygon_shape = polygon_shape
self.form_name = form_name
def get_name(self):
... | gpl-3.0 |
altairpearl/scikit-learn | sklearn/feature_extraction/tests/test_image.py | 25 | 11187 | # Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org>
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# License: BSD 3 clause
import numpy as np
import scipy as sp
from scipy import ndimage
from nose.tools import assert_equal, assert_true
from numpy.testing import assert_raises
from sklearn... | bsd-3-clause |
xylsxyls/xueyelingshuang | src/StockCharge/scripts/rebuild_StockCharge.py | 1 | 14091 | #!python3
# -*- coding:utf-8 -*-
import os
import sys
import time
import ctypes
import shutil
import subprocess
IsPy3 = sys.version_info[0] >= 3
if IsPy3:
import winreg
else:
import codecs
import _winreg as winreg
BuildType = 'Release'
IsRebuild = True
Build = 'Rebuild'
Update = False
Copy = False
CleanAl... | mit |
saucelabs/Diamond | src/collectors/dseopscenter/test/testdseopscenter.py | 29 | 1863 | #!/usr/bin/python
# coding=utf-8
################################################################################
from test import CollectorTestCase
from test import get_collector_config
from mock import Mock
from mock import patch
from diamond.collector import Collector
from dseopscenter import DseOpsCenterCollecto... | mit |
brinbois/Sick-Beard | lib/hachoir_parser/image/common.py | 90 | 1433 | from lib.hachoir_core.field import FieldSet, UserVector, UInt8
class RGB(FieldSet):
color_name = {
( 0, 0, 0): "Black",
(255, 0, 0): "Red",
( 0, 255, 0): "Green",
( 0, 0, 255): "Blue",
(255, 255, 255): "White",
}
static_size = 24
def createFields(... | gpl-3.0 |
matsumoto-r/synciga | src/build/android/pylib/gtest/gtest_config.py | 3 | 1094 | # 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.
"""Configuration file for android gtest suites."""
# Add new suites here before upgrading them to the stable list below.
EXPERIMENTAL_TEST_SUITES = [
... | bsd-3-clause |
hfp/tensorflow-xsmm | tensorflow/contrib/opt/python/training/addsign.py | 55 | 6067 | # 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 |
efortuna/AndroidSDKClone | ndk_experimental/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/share/gdb/python/gdb/command/pretty_printers.py | 137 | 14474 | # Pretty-printer commands.
# Copyright (C) 2010-2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any la... | apache-2.0 |
axelspringer/ansible-modules-core | cloud/rackspace/rax_cdb_database.py | 51 | 4856 | #!/usr/bin/python -tt
# 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 distrib... | gpl-3.0 |
AOtools/soapy | soapy/pyqtgraph/widgets/SpinBox.py | 25 | 19875 | # -*- coding: utf-8 -*-
from ..Qt import QtGui, QtCore
from ..python2_3 import asUnicode
from ..SignalProxy import SignalProxy
from .. import functions as fn
from math import log
from decimal import Decimal as D ## Use decimal to avoid accumulating floating-point errors
from decimal import *
import weakref
__all__ =... | gpl-3.0 |
jnewland/home-assistant | homeassistant/components/decora/light.py | 7 | 4088 | """Support for Decora dimmers."""
import importlib
import logging
from functools import wraps
import time
import voluptuous as vol
from homeassistant.const import CONF_API_KEY, CONF_DEVICES, CONF_NAME
from homeassistant.components.light import (
ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, Light,
PLATFORM_SCHEMA)
imp... | apache-2.0 |
Ivoz/ajenti | plugins/pkgman/api.py | 17 | 1380 | from ajenti.com import *
from ajenti.api import *
from ajenti.apis import API
class PkgMan(API):
class IPackageManager(Interface):
def refresh(self, st):
pass
def get_lists(self, st):
pass
def search(self, q):
pass
def mark_install(self, st, n... | lgpl-3.0 |
takis/django | tests/template_tests/filter_tests/test_wordcount.py | 521 | 1107 | from django.template.defaultfilters import wordcount
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class WordcountTests(SimpleTestCase):
@setup({'wordcount01': '{% autoescape off %}{{ a|wordcount }} {{ b|wordcount }}{% endautoescape %}'})
def ... | bsd-3-clause |
jrwdunham/old | onlinelinguisticdatabase/controllers/morphologybackups.py | 1 | 3615 | # Copyright 2016 Joel Dunham
#
# 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 |
videetssinghai/Blog-Rest-Api | lib/python2.7/site-packages/pip/commands/search.py | 343 | 4502 | from __future__ import absolute_import
import logging
import sys
import textwrap
from pip.basecommand import Command, SUCCESS
from pip.compat import OrderedDict
from pip.download import PipXmlrpcTransport
from pip.models import PyPI
from pip.utils import get_terminal_size
from pip.utils.logging import indent_log
from... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.