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 |
|---|---|---|---|---|---|
kaksmet/servo | tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/mux.py | 636 | 71218 | # Copyright 2012, 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 f... | mpl-2.0 |
BobCromwell/gyp | buildbot/buildbot_run.py | 5 | 8342 | #!/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.
"""Argument-less script to select what to run on the buildbots."""
import filecmp
import os
import shutil
import subprocess
import sys
i... | bsd-3-clause |
marcelovilaca/DIRAC | Core/Utilities/Distribution.py | 6 | 16780 | # $HeadURL$
__RCSID__ = "$Id$"
import urllib2, re, tarfile, os, types, sys, subprocess, urlparse, tempfile
from DIRAC import gLogger, S_OK, S_ERROR
from DIRAC.Core.Utilities import CFG, File, List
class Distribution:
cernAnonRoot = 'http://svn.cern.ch/guest/dirac'
googleAnonRoot = 'http://dirac-grid.googlecode.... | gpl-3.0 |
loli/sklearn-ensembletrees | sklearn/neighbors/base.py | 1 | 23378 | """Base and mixin classes for nearest neighbors"""
# Authors: Jake Vanderplas <vanderplas@astro.washington.edu>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Sparseness support by Lars Buitinck <L.J.Buitinck@uva.nl>
# Multi-output... | bsd-3-clause |
mattseymour/django | tests/sitemaps_tests/test_utils.py | 72 | 1830 | from unittest import mock
from urllib.parse import urlencode
from django.contrib.sitemaps import (
SitemapNotFound, _get_sitemap_full_url, ping_google,
)
from django.core.exceptions import ImproperlyConfigured
from django.test import modify_settings, override_settings
from .base import SitemapTestsBase
class Pi... | bsd-3-clause |
spaceone/mils-secure | app/utils.py | 2 | 9148 |
import configuration as config
from jinja2 import Environment, FileSystemLoader
from functools import partial
from google.appengine.ext import webapp
from google.appengine.api import users, memcache
import models
from google.appengine.api.labs import taskqueue
from appengine_utilities.sessions import Session
import re... | mit |
geotagx/geotagx-pybossa-archive | test/helper/web.py | 1 | 10544 | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa 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... | agpl-3.0 |
topic2k/EventGhost | plugins/YamahaSerial/__init__.py | 4 | 15450 | # -*- coding: latin-1 -*-
#
# YamahaSerial V0.0.1
# ================
# Written by Mark Clarkson, <mark@hollowhills.net>
# Public Domain
#
# Small trivial plugin to control Yamaha RX-V1000 AMP via RS-232
#
# Data from the AVR is turned into events. Description of
# commands and their replies can be found in the document... | gpl-2.0 |
egoid/baytree | lib/python2.7/site-packages/easy_thumbnails/utils.py | 12 | 4715 | import hashlib
import inspect
import math
from django.utils import six
from django.utils.functional import LazyObject
from django.utils import timezone
try:
from PIL import Image
except ImportError:
import Image
from easy_thumbnails.conf import settings
def image_entropy(im):
"""
Calculate the ent... | mit |
mtmail/Nominatim | test/python/test_tools_tiger_data.py | 1 | 5071 | """
Test for tiger data function
"""
import tarfile
from textwrap import dedent
import pytest
from nominatim.tools import tiger_data
from nominatim.errors import UsageError
class MockTigerTable:
def __init__(self, conn):
self.conn = conn
with conn.cursor() as cur:
cur.execute("""CREA... | gpl-2.0 |
benoitsteiner/tensorflow-opencl | tensorflow/contrib/tensor_forest/client/eval_metrics_test.py | 65 | 3849 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
nborwankar/open-budgets | openbudget/apps/accounts/tests.py | 2 | 6872 | import random
from django.test import TestCase
from django.core.urlresolvers import reverse
from openbudget.apps.accounts.factories import AccountFactory
class UserTestCase(TestCase):
"""Tests for Account objects and their related views, urls, etc."""
def setUp(self):
self.users = AccountFactory.crea... | bsd-3-clause |
aodn/compliance-checker | compliance_checker/runner.py | 1 | 9890 | from __future__ import print_function
import os
import traceback
import sys
import io
import json
from collections import OrderedDict
from contextlib import contextmanager
from compliance_checker.suite import CheckSuite
import six
# Py 3.4+ has contextlib.redirect_stdout to redirect stdout to a different
# stream, bu... | apache-2.0 |
hbutau/vimdotfiles | pymode/libs/pep257.py | 8 | 43984 | #! /usr/bin/env python
"""Static analysis tool for checking docstring conventions and style.
Implemented checks cover PEP257:
http://www.python.org/dev/peps/pep-0257/
Other checks can be added, e.g. NumPy docstring conventions:
https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
The repository is l... | lgpl-3.0 |
apanju/GMIO_Odoo | addons/google_drive/__openerp__.py | 320 | 1872 | # -*- 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 |
Acidburn0zzz/servo | tests/wpt/web-platform-tests/tools/third_party/h2/test/test_h2_upgrade.py | 25 | 10487 | # -*- coding: utf-8 -*-
"""
test_h2_upgrade.py
~~~~~~~~~~~~~~~~~~
This module contains tests that exercise the HTTP Upgrade functionality of
hyper-h2, ensuring that clients and servers can upgrade their plaintext
HTTP/1.1 connections to HTTP/2.
"""
import base64
import pytest
import h2.config
import h2.connection
im... | mpl-2.0 |
afloren/nipype | nipype/interfaces/camino/tests/test_auto_Image2Voxel.py | 9 | 1162 | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.camino.convert import Image2Voxel
def test_Image2Voxel_inputs():
input_map = dict(args=dict(argstr='%s',
),
environ=dict(nohash=True,
usedefault=True,
),
ignore_exception=dict(no... | bsd-3-clause |
wemanuel/smry | smry/server-auth/ls/google-cloud-sdk/platform/gsutil/third_party/boto/tests/integration/s3/test_cors.py | 136 | 3108 | # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# 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 restrict... | apache-2.0 |
Mj258/weiboapi | srapyDemo/envs/Lib/site-packages/twisted/logger/_stdlib.py | 10 | 4166 | # -*- test-case-name: twisted.logger.test.test_stdlib -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Integration with Python standard library logging.
"""
import logging as stdlibLogging
from zope.interface import implementer
from twisted.python.compat import _PY3, currentframe, uni... | mit |
stephen144/odoo | openerp/addons/test_inherits/models.py | 295 | 1141 | # -*- coding: utf-8 -*-
from openerp import models, fields, api, osv
# We just create a new model
class Unit(models.Model):
_name = 'test.unit'
_columns = {
'name': osv.fields.char('Name', required=True),
'state': osv.fields.selection([('a', 'A'), ('b', 'B')],
... | agpl-3.0 |
ClearCorp/account-consolidation | account_consolidation/__openerp__.py | 3 | 2316 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2011-2013 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
# ... | agpl-3.0 |
danielvdende/incubator-airflow | airflow/contrib/hooks/gcp_mlengine_hook.py | 5 | 10511 | #
# 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 |
evilhero/mylar | lib/pytz/lazy.py | 514 | 5263 | from threading import RLock
try:
from UserDict import DictMixin
except ImportError:
from collections import Mapping as DictMixin
# With lazy loading, we might end up with multiple threads triggering
# it at the same time. We need a lock.
_fill_lock = RLock()
class LazyDict(DictMixin):
"""Dictionary popu... | gpl-3.0 |
guschmue/tensorflow | tensorflow/contrib/distributions/python/ops/vector_laplace_diag.py | 60 | 8326 | # 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 |
sgiavasis/nipype | nipype/interfaces/ants/tests/test_auto_Atropos.py | 9 | 2368 | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ....testing import assert_equal
from ..segmentation import Atropos
def test_Atropos_inputs():
input_map = dict(args=dict(argstr='%s',
),
convergence_threshold=dict(requires=['n_iterations'],
),
dimension=dict(argstr='--image-dimensionality... | bsd-3-clause |
frankrousseau/weboob | modules/ganassurances/module.py | 7 | 2505 | # -*- coding: utf-8 -*-
# Copyright(C) 2012-2013 Romain Bignon
#
# This file is part of weboob.
#
# weboob 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... | agpl-3.0 |
mgedmin/ansible | lib/ansible/modules/notification/sendgrid.py | 23 | 9082 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Matt Makai <matthew.makai@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 ... | gpl-3.0 |
FGCSchool-Math-Club/fgcs-math-club-2014 | geometry.py | 3 | 62555 | #!/usr/bin/env python3
#-*- coding:utf-8 -*-
"""
Very basic 2D abstract geometry package. It defines these geometrical
constructs:
* `GeometricObject` - abstract base class, not meant to be used
directly
* `Point`
* `Vector`
* `BoundingBox`
* `Line`
* `Ray`
* `Segment`
* `Polygon... | bsd-2-clause |
openaid-IATI/OIPA | OIPA/api/chain/views.py | 2 | 9005 | from django.db.models import Count
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import filters
from api.activity.views import ActivityList
from api.aggregation.views import Aggregation, AggregationView, GroupBy
from api.chain.filters import (
ChainFilter, ChainLinkFilter, Chain... | agpl-3.0 |
gruvin/Marlin | buildroot/share/scripts/createSpeedLookupTable.py | 13 | 1511 | #!/usr/bin/env python
from __future__ import print_function
from __future__ import division
""" Generate the stepper delay lookup table for Marlin firmware. """
import argparse
__author__ = "Ben Gamari <bgamari@gmail.com>"
__copyright__ = "Copyright 2012, Ben Gamari"
__license__ = "GPL"
parser = argparse.ArgumentP... | gpl-3.0 |
user-none/calibre | manual/plugin_examples/interface_demo/main.py | 6 | 6910 | #!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
if False:
... | gpl-3.0 |
cosn/stripe-ctf-3 | level3/test/lib/http_client.py | 2 | 8197 | import httplib
import os
import sys
import textwrap
# From this package
import lib.error as error
import lib.util as util
# This is a port of http_client from [Stripe-Python](https://github.com/stripe/stripe-python)
# - Requests is the preferred HTTP library
# - Use Pycurl if it's there (at least it verifies SSL cer... | mit |
souravbadami/oppia | core/domain/rating_services.py | 1 | 5221 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | apache-2.0 |
p4datasystems/CarnotKEdist | dist/Lib/test/test_java_integration.py | 9 | 33050 | import copy
import glob
import importlib
import operator
import os
import os.path
import unittest
import shutil
import subprocess
import sys
import tempfile
import re
from collections import deque
from test import test_support
from java.lang import (ClassCastException, ExceptionInInitializerError, String, Runnable, S... | apache-2.0 |
gtko/Sick-Beard | lib/hachoir_parser/archive/bzip2_parser.py | 90 | 2896 | """
BZIP2 archive file
Author: Victor Stinner
"""
from lib.hachoir_parser import Parser
from lib.hachoir_core.field import (ParserError, String,
Bytes, Character, UInt8, UInt32, CompressedField)
from lib.hachoir_core.endian import LITTLE_ENDIAN
from lib.hachoir_core.text_handler import textHandler, hexadecimal
t... | gpl-3.0 |
GreenRecycleBin/servo | tests/wpt/css-tests/tools/pywebsocket/src/example/close_wsh.py | 495 | 2835 | # Copyright 2012, 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 f... | mpl-2.0 |
asanfilippo7/osf.io | scripts/migrate_github_oauth_settings.py | 55 | 7419 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script to migrate addongithubusersettings and create and attach addongithuboauthsettings.
Log:
Executed on production by SL on 2014-10-05 at 23:11 EST. 269 AddonGithubUserSettings records
were successfully migrated. 3 records with invalidated credentials were s... | apache-2.0 |
valrus/mingus3 | mingus/extra/__init__.py | 3 | 1136 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
================================================================================
mingus - Music theory Python package, extra package
Copyright (C) 2008-2009, Bart Spaans
This program is free software: you can redistribute it and/or modify
it under the ter... | gpl-3.0 |
codesparkle/youtube-dl | youtube_dl/extractor/crunchyroll.py | 4 | 21173 | # coding: utf-8
from __future__ import unicode_literals
import re
import json
import base64
import zlib
from hashlib import sha1
from math import pow, sqrt, floor
from .common import InfoExtractor
from ..compat import (
compat_etree_fromstring,
compat_urllib_parse_urlencode,
compat_urllib_request,
com... | unlicense |
caotianwei/django | tests/template_tests/filter_tests/test_truncatewords_html.py | 386 | 1607 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.template.defaultfilters import truncatewords_html
from django.test import SimpleTestCase
class FunctionTests(SimpleTestCase):
def test_truncate_zero(self):
self.assertEqual(truncatewords_html('<p>one <a href="#">two - three <br>... | bsd-3-clause |
mayblue9/scikit-learn | sklearn/tests/test_common.py | 70 | 7717 | """
General tests for all estimators in sklearn.
"""
# Authors: Andreas Mueller <amueller@ais.uni-bonn.de>
# Gael Varoquaux gael.varoquaux@normalesup.org
# License: BSD 3 clause
from __future__ import print_function
import os
import warnings
import sys
import pkgutil
from sklearn.externals.six import PY3
fr... | bsd-3-clause |
gymnasium/edx-platform | lms/djangoapps/shoppingcart/reports.py | 18 | 10759 | """ Objects and functions related to generating CSV reports """
from decimal import Decimal
import unicodecsv
from django.utils.translation import ugettext as _
from six import text_type
from course_modes.models import CourseMode
from courseware.courses import get_course_by_id
from shoppingcart.models import Certifi... | agpl-3.0 |
TalShafir/ansible | lib/ansible/modules/network/aci/aci_switch_policy_leaf_profile.py | 15 | 6327 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.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
ANSIBLE_METADATA = {'metadata_... | gpl-3.0 |
iivic/BoiseStateX | lms/djangoapps/notes/migrations/0001_initial.py | 114 | 6157 | # -*- 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 'Note'
db.create_table('notes_note', (
('id', self.gf('django.db.models.fields.Au... | agpl-3.0 |
specialkevin/ansible-modules-core | cloud/rackspace/rax_dns_record.py | 136 | 10840 | #!/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 distributed... | gpl-3.0 |
avaitla/Haskell-to-C---Bridge | pygccxml-1.0.0/unittests/parser_test_case.py | 1 | 3719 | # Copyright 2004-2008 Roman Yakovenko.
# Distributed under 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)
import pprint
import unittest
import autoconfig
import pygccxml
from pygccxml.utils import *
from pygccxml.parser... | bsd-3-clause |
rockfruit/bika.lims | bika/lims/browser/reports/qualitycontrol_analysesrepeated.py | 1 | 5720 | # This file is part of Bika LIMS
#
# Copyright 2011-2016 by it's authors.
# Some rights reserved. See LICENSE.txt, AUTHORS.txt.
from Products.CMFCore.utils import getToolByName
from bika.lims.browser import BrowserView
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from bika.lims import bikaMe... | agpl-3.0 |
gaotongfei/bottle | test/test_outputfilter.py | 46 | 6525 | # -*- coding: utf-8 -*-
'''Everything returned by Bottle()._cast() MUST be WSGI compatiple.'''
import unittest
import bottle
from bottle import tob, touni
from tools import ServerTestBase, tobs, warn
class TestOutputFilter(ServerTestBase):
''' Tests for WSGI functionality, routing and output casting (decorators) ... | mit |
xianjunzhengbackup/Cloud-Native-Python | env/lib/python3.5/site-packages/setuptools/command/egg_info.py | 50 | 25016 | """setuptools.command.egg_info
Create a distribution's .egg-info directory and contents"""
from distutils.filelist import FileList as _FileList
from distutils.errors import DistutilsInternalError
from distutils.util import convert_path
from distutils import log
import distutils.errors
import distutils.filelist
import... | mit |
tushar-rishav/coala | coalib/misc/Constants.py | 5 | 3138 | # -*- coding: utf-8 -*-
import appdirs
import os
import re
# Start ignoring PyImportSortBear, PyLintBear as BUS_NAME is imported as a
# constant from other files.
from coalib import BUS_NAME
from coalib import VERSION
# Stop ignoring
THIS_IS_A_BUG = ("This is a bug. We are sorry for the inconvenience. "
... | agpl-3.0 |
simartin/servo | tests/wpt/web-platform-tests/tools/third_party/atomicwrites/atomicwrites/__init__.py | 52 | 5965 | import contextlib
import os
import sys
import tempfile
try:
import fcntl
except ImportError:
fcntl = None
__version__ = '1.1.5'
PY2 = sys.version_info[0] == 2
text_type = unicode if PY2 else str # noqa
def _path_to_unicode(x):
if not isinstance(x, text_type):
return x.decode(sys.getfilesyste... | mpl-2.0 |
MrNuggles/HeyBoet-Telegram-Bot | temboo/Library/SendGrid/NewsletterAPI/Identity/DeleteIdentity.py | 5 | 3776 | # -*- coding: utf-8 -*-
###############################################################################
#
# DeleteIdentity
# Delete an Identity.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in co... | gpl-3.0 |
TheOpenBastion/symposion | symposion/schedule/views.py | 2 | 5259 | from django.core.exceptions import ObjectDoesNotExist
from django.http import Http404, HttpResponse
from django.shortcuts import render, get_object_or_404, redirect
from django.template import loader, Context
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from symposion.... | bsd-3-clause |
GbalsaC/bitnamiP | venv/lib/python2.7/site-packages/networkx/classes/tests/test_graph.py | 44 | 21083 | #!/usr/bin/env python
from nose.tools import *
import networkx
class BaseGraphTester(object):
""" Tests for data-structure independent graph class features."""
def test_contains(self):
G=self.K3
assert(1 in G )
assert(4 not in G )
assert('b' not in G )
assert([] not in G... | agpl-3.0 |
bobandbetty/assassins | assassins/assassins/settings.default.py | 2 | 3374 | """
Django settings for assassins project.
Generated by 'django-admin startproject' using Django 1.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
#... | mit |
JuliBakagianni/CEF-ELRC | lib/python2.7/site-packages/django/contrib/gis/db/backends/spatialite/operations.py | 282 | 14391 | import re
from decimal import Decimal
from django.contrib.gis.db.backends.base import BaseSpatialOperations
from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction
from django.contrib.gis.db.backends.spatialite.adapter import SpatiaLiteAdapter
from django.contrib.gis.geometry.backend import G... | bsd-3-clause |
tve/Espruino | scripts/pinutils.py | 2 | 8243 | #!/bin/false
# This file is part of Espruino, a JavaScript interpreter for Microcontrollers
#
# Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk>
#
# 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 ... | mpl-2.0 |
Jenselme/OWSLib | examples/wps-client.py | 16 | 5366 | #!/usr/bin/python
# -*- coding: ISO-8859-15 -*-
# =============================================================================
#
# Authors : Luca Cinquini
#
# =============================================================================
from __future__ import absolute_import
from __future__ import print_function
impo... | bsd-3-clause |
yakky/django | tests/template_tests/syntax_tests/test_with.py | 391 | 2245 | from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import setup
class WithTagTests(SimpleTestCase):
@setup({'with01': '{% with key=dict.key %}{{ key }}{% endwith %}'})
def test_with01(self):
output = self.engine.render_to_string('with01', {'dict': {'k... | bsd-3-clause |
wkennington/rethinkdb | external/v8_3.30.33.16/testing/gtest/test/gtest_xml_test_utils.py | 1815 | 8876 | #!/usr/bin/env python
#
# Copyright 2006, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | agpl-3.0 |
Aegeaner/spark | examples/src/main/python/mllib/naive_bayes_example.py | 106 | 2285 | #
# 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 |
mikhaelharswanto/ryu | ryu/topology/api.py | 5 | 1059 | # Copyright (C) 2013 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 |
m-labs/milkymist | cores/softusb/navre_regress/test_opcodes/test_PUSH.py | 5 | 2551 | #! /usr/bin/env python
###############################################################################
#
# simulavr - A simulator for the Atmel AVR family of microcontrollers.
# Copyright (C) 2001, 2002 Theodore A. Roth
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of th... | lgpl-3.0 |
gmimano/commcaretest | corehq/apps/users/urls.py | 1 | 4395 | #from django.conf.urls.defaults import patterns, url
from corehq.apps.users.views import DefaultProjectUserSettingsView, EditWebUserView, EditMyAccountDomainView, ListWebUsersView, InviteWebUserView
from corehq.apps.users.views.mobile.groups import EditGroupsView, EditGroupMembersView
from corehq.apps.users.views.mobil... | bsd-3-clause |
jmcorgan/gnuradio | gr-audio/examples/python/audio_copy.py | 68 | 2369 | #!/usr/bin/env python
#
# Copyright 2004,2005,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 ... | gpl-3.0 |
Lujeni/ansible | test/units/modules/network/fortios/test_fortios_system_replacemsg_image.py | 21 | 8155 | # Copyright 2019 Fortinet, 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 version.
#
# This program is distributed in the... | gpl-3.0 |
junhuac/MQUIC | src/tools/gyp/test/mac/gyptest-swift-library.py | 34 | 1893 | #!/usr/bin/env python
# Copyright (c) 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.
"""
Verifies that a swift framework builds correctly.
"""
import TestGyp
import TestMac
import collections
import sys
import subprocess
i... | mit |
physycom/QGIS | tests/src/python/test_qgsrectangle.py | 31 | 10552 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsRectangle.
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"""
__au... | gpl-2.0 |
VigneshChennai/BlackPearl | lib/BlackPearl/testing.py | 1 | 6793 | #!/usr/bin/env python
# This file is part of BlackPearl.
# BlackPearl 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.
# BlackPearl i... | gpl-3.0 |
steynovich/ansible-modules-extras | monitoring/stackdriver.py | 61 | 6988 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# 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.
... | gpl-3.0 |
ccnmtl/lettuce | tests/integration/lib/Django-1.3/django/contrib/gis/db/models/query.py | 290 | 35968 | from django.db import connections
from django.db.models.query import QuerySet, Q, ValuesQuerySet, ValuesListQuerySet
from django.contrib.gis.db.models import aggregates
from django.contrib.gis.db.models.fields import get_srid_info, GeometryField, PointField, LineStringField
from django.contrib.gis.db.models.sql import... | gpl-3.0 |
progrium/stashboard | testing/install_data.py | 2 | 1950 | # Copyright (c) 2010 Twilio Inc.
#
# 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 limitation the rights
# to use, copy, modify, merge, publish, distri... | mit |
w1ll1am23/home-assistant | homeassistant/components/upnp/sensor.py | 3 | 8396 | """Support for UPnP/IGD Sensors."""
from __future__ import annotations
from datetime import timedelta
from typing import Any, Mapping
from homeassistant.components.sensor import SensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import DATA_BYTES, DATA_RATE_KIBIBYTES_PER_SECOND... | apache-2.0 |
ME-ICA/me-ica | meica.libs/nibabel/tests/test_spatialimages.py | 1 | 10064 | # emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the NiBabel package for the
# copyright and license terms.
#
### ### ### #... | lgpl-2.1 |
ivandevp/django | django/contrib/admin/migrations/0001_initial.py | 419 | 1958 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django.contrib.admin.models
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('conten... | bsd-3-clause |
kybriainfotech/iSocioCRM | addons/account_budget/wizard/account_budget_crossovered_summary_report.py | 373 | 2191 | # -*- 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 |
gangadharkadam/v5_erp | erpnext/hr/doctype/attendance/attendance.py | 36 | 2193 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import getdate, nowdate
from frappe import _
from frappe.model.document import Document
from erpnext.hr.utils import... | agpl-3.0 |
thaim/ansible | lib/ansible/modules/network/f5/bigip_monitor_external.py | 38 | 22926 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# 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',
... | mit |
bitmovin/bitmovin-python | bitmovin/resources/models/inputs/analysis/stream_input_analysis.py | 1 | 1466 | from bitmovin.errors import BitmovinApiError
from bitmovin.resources import Resource
from .stream_analysis_details import StreamAnalysisDetails
class StreamInputAnalysis(Resource):
def __init__(self, input_id, input_path, details):
super().__init__()
self._details = None
self.inputPath = ... | unlicense |
erickt/hue | desktop/libs/hadoop/src/hadoop/fs/fsutils_tests.py | 25 | 1934 | #!/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 |
dials/dials | tests/algorithms/scaling/test_error_model.py | 1 | 10706 | """
Tests for the error model.
"""
import math
import pytest
from cctbx.sgtbx import space_group
from libtbx import phil
from dials.algorithms.scaling.error_model.engine import ErrorModelRefinery
from dials.algorithms.scaling.error_model.error_model import (
BasicErrorModel,
ErrorModelB_APM,
calc_deltah... | bsd-3-clause |
Orav/kbengine | kbe/src/lib/python/Lib/weakref.py | 2 | 18835 | """Weak reference support for Python.
This module is an implementation of PEP 205:
http://www.python.org/dev/peps/pep-0205/
"""
# Naming convention: Variables named "wr" are weak reference objects;
# they are called this instead of "ref" to avoid name collisions with
# the module-global ref() function impor... | lgpl-3.0 |
wimnat/ansible | test/units/module_utils/common/parameters/test_list_deprecations.py | 37 | 1535 | # -*- coding: utf-8 -*-
# Copyright (c) 2019 Ansible Project
# 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
from ansible.module_utils.common.parameters import list_depreca... | gpl-3.0 |
ardi69/pyload-0.4.10 | lib/Python/Lib/thrift/server/THttpServer.py | 74 | 3068 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | gpl-3.0 |
JetBrains/intellij-community | python/helpers/coveragepy/coverage/backward.py | 39 | 4710 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Add things to old Pythons so I can pretend they are newer."""
# This file does lots of tricky stuff, so disable a bunch of pylint warnings.
# pylint: disable=re... | apache-2.0 |
cosee-concourse/slack-upload-resource | opt/resource/out.py | 1 | 2926 | import sys
from concourse_common import common
from concourse_common import jsonutil
from concourse_common import request
import json
from slackclient import SlackClient
import os
import xml.etree.ElementTree
import slack_post
import schemas
def execute(filepath):
valid, payload = jsonutil.load_and_validate_payl... | mit |
ryfeus/lambda-packs | LightGBM_sklearn_scipy_numpy/source/numpy/_import_tools.py | 25 | 13234 | from __future__ import division, absolute_import, print_function
import os
import sys
import warnings
__all__ = ['PackageLoader']
class PackageLoader(object):
def __init__(self, verbose=False, infunc=False):
""" Manages loading packages.
"""
if infunc:
_level = 2
else... | mit |
googleads/googleads-adsense-examples | python/v1.4/get_all_payments.py | 3 | 2043 | #!/usr/bin/python
#
# Copyright 2013 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 b... | apache-2.0 |
archf/ansible | lib/ansible/modules/system/known_hosts.py | 8 | 12299 | #!/usr/bin/python
# Copyright(c) 2014, Matthew Vernon <mcv21@cam.ac.uk>
# 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 |
conrado/ansible-modules-core | cloud/docker/docker_image.py | 76 | 8980 | #!/usr/bin/python
#
# (c) 2014, Pavel Antonov <antonov@adwz.ru>
#
# This file is part of Ansible
#
# This module 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 ... | gpl-3.0 |
venkey-ariv/fullerite | src/diamond/collectors/powerdns/powerdns.py | 68 | 2283 | # coding=utf-8
"""
Collects all metrics exported by the powerdns nameserver using the
pdns_control binary.
#### Dependencies
* pdns_control
"""
import diamond.collector
import subprocess
import os
from diamond.collector import str_to_bool
class PowerDNSCollector(diamond.collector.Collector):
_GAUGE_KEYS = ... | apache-2.0 |
codrut3/tensorflow | tensorflow/contrib/gan/python/features/python/conditioning_utils.py | 35 | 1237 | # 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 |
varshadyavaiah/RED-with-In-and-Out-RIO-queue-discipline | src/sixlowpan/bindings/modulegen__gcc_ILP32.py | 28 | 338610 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 |
jsirois/pex | pex/vendor/_vendored/pip/pip/_vendor/toml/decoder.py | 11 | 38954 | import datetime
import io
from os import linesep
import re
import sys
from pip._vendor.toml.tz import TomlTz
if sys.version_info < (3,):
_range = xrange # noqa: F821
else:
unicode = str
_range = range
basestring = str
unichr = chr
def _detect_pathlib_path(p):
if (3, 4) <= sys.version_info:
... | apache-2.0 |
jparise/pinball | tests/pinball/parser/repository_config_parser_test.py | 6 | 5455 | # Copyright 2015, Pinterest, 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 writ... | apache-2.0 |
hinerm/ITK | Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/utils/fs_utils.py | 13 | 4611 | # Copyright 2004-2008 Roman Yakovenko.
# Distributed under 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)
import os
from types import *
##If you want include files that doesn't have extension then use filter like '*.'
def _make_lis... | apache-2.0 |
neopenx/Dragon | Dragon/python/dragon/vm/theano/compile/scan.py | 1 | 4187 | # --------------------------------------------------------
# Theano @ Dragon
# Copyright(c) 2017 SeetaTech
# Written by Ting Pan
# --------------------------------------------------------
import inspect
import copy
from dragon.core.tensor import Tensor
import dragon.protos.dragon_pb2 as pb
def scan(fn, sequences, out... | bsd-2-clause |
person142/scipy | scipy/interpolate/fitpack2.py | 1 | 66715 | """
fitpack --- curve and surface fitting with splines
fitpack is based on a collection of Fortran routines DIERCKX
by P. Dierckx (see http://www.netlib.org/dierckx/) transformed
to double routines by Pearu Peterson.
"""
# Created by Pearu Peterson, June,August 2003
__all__ = [
'UnivariateSpline',
'Interpolate... | bsd-3-clause |
tima/ansible | lib/ansible/modules/network/dellos6/dellos6_facts.py | 10 | 14240 | #!/usr/bin/python
#
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
# Copyright (c) 2016 Dell Inc.
# 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_versio... | gpl-3.0 |
enthought/Meta | meta/decompiler/instructions.py | 2 | 15084 | '''
Created on Jul 14, 2011
@author: sean
'''
from __future__ import print_function
from meta.decompiler.simple_instructions import SimpleInstructions
from meta.decompiler.control_flow_instructions import CtrlFlowInstructions
import _ast
from meta.asttools import print_ast
from meta.utils import py3, py3op, py2op
fro... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.