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 |
|---|---|---|---|---|---|
aneesahmed/gameplan2 | scrum/urls.py | 1 | 4983 | from django.conf.urls import url
#from . import views
from scrum.views.portfolioView import *
from scrum.views.portfolioView import PortfolioListbyStatus, PortfolioList, PortfolioDetails, PortfolioCreate, PortfolioUpdate, PortfolioDelete
from scrum.views.releaseView import ReleaseList, ReleaseCreate, ReleaseDetails, Re... | apache-2.0 |
GheRivero/ansible | test/units/modules/network/iosxr/test_iosxr_system.py | 49 | 4219 | # (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 |
xiaoweih/DLV | networks/imageNet.py | 1 | 1666 | import os, struct
from array import array as pyarray
from cvxopt.base import matrix
import numpy as np
import PIL.Image
# FIXME: need actual class names
def LABELS(index):
ls = labels()
if len(ls) > 0:
return ls[index]
else: return range(1000)[index]
def labels():
file = open('networks/ima... | gpl-3.0 |
dya2/python-for-android | python-build/python-libs/gdata/samples/blogger/BloggerExampleV1.py | 133 | 11485 | #!/usr/bin/python
#
# Copyright (C) 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 |
funkring/fdoo | addons/mrp/wizard/mrp_product_produce.py | 75 | 6237 | # -*- 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 |
mistercrunch/airflow | tests/api_connexion/endpoints/test_dag_source_endpoint.py | 7 | 7314 | # 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 |
shahbazn/neutron | neutron/tests/unit/api/rpc/handlers/test_resources_rpc.py | 18 | 8350 | # Copyright (c) 2015 Mellanox Technologies, Ltd
#
# 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 agre... | apache-2.0 |
hogarthj/ansible | lib/ansible/modules/cloud/rackspace/rax_mon_check.py | 27 | 10761 | #!/usr/bin/python
# Copyright: 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
appknox/xysec_adb | xysec_adb/pylib/host_driven/test_info_collection.py | 106 | 5173 | # 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.
"""Module containing information about the host-driven tests."""
import logging
import os
import sys
from pylib.host_driven import tests_annotations
f... | apache-2.0 |
nealedj/search | search/tests/test_query.py | 3 | 2312 | import datetime
import unittest
from google.appengine.api import search as search_api
from ..indexes import DocumentModel, Index
from ..fields import TZDateTimeField, TextField
from ..query import SearchQuery
from ..ql import Q
from .. import timezone
from .base import AppengineTestCase
class FakeDocument(Document... | mit |
kellyrowland/openmc | tests/test_filter_distribcell/test_filter_distribcell.py | 3 | 2822 | #!/usr/bin/env python
import glob
import hashlib
import os
import sys
sys.path.insert(0, os.pardir)
from testing_harness import *
class DistribcellTestHarness(TestHarness):
def __init__(self):
super(DistribcellTestHarness, self).__init__(None, True)
def execute_test(self):
"""Run OpenMC with... | mit |
resmo/ansible | lib/ansible/modules/cloud/amazon/aws_codecommit.py | 6 | 7822 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Shuang Wang <ooocamel@icloud.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'status': ['preview'],
'supported_by': 'community',
'metadata_versi... | gpl-3.0 |
axbaretto/beam | sdks/python/.tox/py27/lib/python2.7/encodings/mbcs.py | 860 | 1211 | """ Python 'mbcs' Codec for Windows
Cloned by Mark Hammond (mhammond@skippinet.com.au) from ascii.py,
which was written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
# Import them explicitly to cause an ImportError
# on non-Windows systems
from codecs import mbcs... | apache-2.0 |
chevah/pydoctor | pydoctor/test/test_zopeinterface.py | 3 | 7725 | from pydoctor.zopeinterface import ZopeInterfaceSystem
from pydoctor.test.test_astbuilder import fromText
from pydoctor.test.test_packages import processPackage
# we set up the same situation using both implements and
# classImplements and run the same tests.
def test_implements():
src = '''
import zope.inter... | isc |
IXgnas/dixcovery_kernel | tools/perf/scripts/python/sctop.py | 11180 | 1924 | # system call top
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Periodically displays system-wide system call totals, broken down by
# syscall. If a [comm] arg is specified, only syscalls called by
# [comm] are displayed. If an [interval] arg is specified,... | gpl-3.0 |
sunshine027/mic | mic/chroot.py | 5 | 10386 | #!/usr/bin/python -tt
#
# Copyright (c) 2009, 2010, 2011 Intel, 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; version 2 of the License
#
# This program is distributed in the hope that i... | gpl-2.0 |
kingvuplus/ee | lib/python/Components/Language.py | 10 | 3878 | import gettext
from Tools.Directories import SCOPE_LANGUAGE, resolveFilename
import language_cache
class Language:
def __init__(self):
gettext.install('enigma2', resolveFilename(SCOPE_LANGUAGE, ""), unicode=0, codeset="utf-8")
self.activeLanguage = 0
self.lang = {}
self.langlist = []
# FIXME make list dyn... | gpl-2.0 |
GPCsolutions/mod-webui | module/plugins/minemap/minemap.py | 2 | 3666 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2012:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
# Forlot Romain, rforlot@yahoo.com
#
# This file is part of Shinken.
#
# S... | agpl-3.0 |
pidydx/grr | grr/lib/aff4.py | 1 | 100047 | #!/usr/bin/env python
"""AFF4 interface implementation.
This contains an AFF4 data model implementation.
"""
import __builtin__
import abc
import itertools
import StringIO
import threading
import time
import zlib
import logging
from grr.lib import access_control
from grr.lib import config_lib
from grr.lib import d... | apache-2.0 |
Fl0rianFischer/sme_odoo | addons/payment/models/payment_acquirer.py | 3 | 30820 | # -*- coding: utf-'8' "-*-"
import logging
import openerp
from openerp.osv import osv, fields
from openerp.tools import float_round, float_repr, image_get_resized_images, image_resize_image_big
from openerp.tools.translate import _
_logger = logging.getLogger(__name__)
def _partner_format_address(address1=False, ad... | gpl-3.0 |
eirmag/weboob | modules/sachsen/browser.py | 1 | 1640 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2012 Romain Bignon, Florent Fourcot
#
# 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 Licen... | agpl-3.0 |
gangadhar-kadam/lgnlvefrape | frappe/core/doctype/event/event.py | 15 | 5970 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import getdate, cint, add_months, date_diff, add_days, nowdate
from frappe.core.doctype.user.user import STANDARD_USERS
from frappe.model.docum... | mit |
sabi0/intellij-community | python/lib/Lib/site-packages/django/contrib/gis/tests/geoapp/models.py | 259 | 1546 | from django.contrib.gis.db import models
from django.contrib.gis.tests.utils import mysql, spatialite
# MySQL spatial indices can't handle NULL geometries.
null_flag = not mysql
class Country(models.Model):
name = models.CharField(max_length=30)
mpoly = models.MultiPolygonField() # SRID, by default, is 4326
... | apache-2.0 |
CranleighAD/isams-tools | settings_example.py | 1 | 2947 | # enable or disable the whole program
ENABLED = True
# if we're in testing mode, output more debug and allow testers to add their own email
DEBUG = True
# used with above, you can check the output of emails that would have been sent
SEND_EMAILS = True
# iSAMS Batch API key
API_KEY = "11D497FF-A7D9-4646-A6B8-D9D1B871... | gpl-3.0 |
raj454raj/eden | modules/templates/DRK/layouts.py | 5 | 10012 | # -*- coding: utf-8 -*-
from gluon import *
from gluon.storage import Storage
from s3 import *
from s3theme import NAV, SECTION
# =============================================================================
class S3MainMenuLayout(S3NavigationItem):
""" Custom Main Menu Layout """
@staticmethod
def layou... | mit |
Tagar/incubator-airflow | airflow/www/forms.py | 2 | 1721 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 |
fedora-infra/bodhi | devel/ci/integration/tests/fixtures/greenwave.py | 2 | 2336 | # Copyright © 2018-2019 Red Hat, Inc.
#
# This file is part of Bodhi.
#
# 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 |
deiv/plasmate-pkg | plasmate/templates/mainRunner.py | 1 | 3638 | # -*- coding: iso-8859-1 -*-
#
# Author: $AUTHOR <$EMAIL>
# Date: $DATE
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as
# published by the Free Software Foundation; either version 2, or
# (at your option) any later version.
#
# T... | gpl-2.0 |
PeterWangIntel/chromium-crosswalk | tools/telemetry/telemetry/core/platform/profiler/android_systrace_profiler_unittest.py | 9 | 1103 | # 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.
import os
import shutil
import tempfile
import zipfile
from telemetry.core.platform.profiler import android_systrace_profiler
from telemetry import decorator... | bsd-3-clause |
vadimtk/chrome4sdp | testing/legion/test_controller.py | 42 | 1760 | # Copyright 2015 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.
"""Defines the test controller base library.
This module is the basis on which test controllers are built and executed.
"""
import logging
import sys
#pyl... | bsd-3-clause |
cliixtech/bigorna | tests/tasks/test_sched.py | 1 | 1892 | from unittest import TestCase
from unittest.mock import create_autospec
from nose.tools import istest
from bigorna.commons import Event
from bigorna.tasks import TaskScheduler, TaskDefinition, task_status_changed_evt
from bigorna.tasks.executor import Executor
from bigorna.commons import Config
class TaskSchedulerT... | gpl-3.0 |
trishnaguha/ansible | test/units/modules/network/dellos9/test_dellos9_facts.py | 56 | 4619 | # (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 |
aabadie/scikit-learn | examples/manifold/plot_lle_digits.py | 138 | 8594 | """
=============================================================================
Manifold learning on handwritten digits: Locally Linear Embedding, Isomap...
=============================================================================
An illustration of various embeddings on the digits dataset.
The RandomTreesEmbed... | bsd-3-clause |
demarle/VTK | ThirdParty/Twisted/twisted/test/test_unix.py | 41 | 14557 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for implementations of L{IReactorUNIX} and L{IReactorUNIXDatagram}.
"""
import stat, os, sys, types
import socket
from twisted.internet import interfaces, reactor, protocol, error, address, defer, utils
from twisted.python import lockf... | bsd-3-clause |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/django/utils/timezone.py | 103 | 10835 | """
Timezone-related classes and functions.
This module uses pytz when it's available and fallbacks when it isn't.
"""
import sys
import time as _time
from datetime import datetime, timedelta, tzinfo
from threading import local
from django.conf import settings
from django.utils import lru_cache, six
from django.util... | mit |
falk/fabric-bolt | src/fabric_bolt/projects/migrations/0021_auto__add_field_task_description.py | 18 | 9740 | # -*- 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 'Task.description'
db.add_column(u'projects_task', 'description',
self.... | mit |
pfnet/chainer | tests/chainer_tests/functions_tests/activation_tests/test_prelu.py | 8 | 1845 | import numpy
import chainer
from chainer import functions
from chainer import testing
@testing.parameterize(*testing.product({
'shape': [(4, 3, 2), (1,), (1, 2, 3, 4, 5, 6)],
'Wdim': [0, 1, 3],
'dtype': [numpy.float16, numpy.float32, numpy.float64],
}))
@testing.fix_random()
@chainer.testing.backend.inje... | mit |
JamesShaeffer/QGIS | tests/src/python/test_qgsmaplayermodel.py | 17 | 26659 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsMapLayerModel
.. 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.
"""
_... | gpl-2.0 |
Runscope/pysaml2 | example/idp2/idp.py | 1 | 35623 | #!/usr/bin/env python
import argparse
import base64
import importlib
import logging
import os
import re
import socket
import time
from Cookie import SimpleCookie
from hashlib import sha1
from urlparse import parse_qs
from saml2 import BINDING_HTTP_ARTIFACT
from saml2 import BINDING_URI
from saml2 import BINDING_PAOS
... | bsd-2-clause |
fpy171/django | django/conf/locale/nb/formats.py | 504 | 1766 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i'
DATET... | bsd-3-clause |
dallascard/hyperopt | hyperopt/main.py | 7 | 3718 | #!/usr/bin/env python
"""
Entry point for bin/* scripts
"""
__authors__ = "James Bergstra"
__license__ = "3-clause BSD License"
__contact__ = "github.com/hyperopt/hyperopt"
import cPickle
import logging
import os
import base
import utils
logger = logging.getLogger(__name__)
from .base import SerialExperimen... | bsd-3-clause |
docusign/docusign-python-client | docusign_esign/apis/workspaces_api.py | 1 | 66547 | # 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 |
ales-erjavec/scipy | scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py | 27 | 27501 | from __future__ import division, print_function, absolute_import
__usage__ = """
To run tests locally:
python tests/test_arpack.py [-l<int>] [-v<int>]
"""
import warnings
import numpy as np
from numpy.testing import assert_allclose, \
assert_array_almost_equal_nulp, run_module_suite, \
assert_rai... | bsd-3-clause |
actmd/Diamond | src/collectors/slabinfo/slabinfo.py | 54 | 2532 | # coding=utf-8
"""
The SlabInfoCollector collects metrics on process stats from
/proc/slabinfo
#### Dependencies
* /proc/slabinfo
"""
import platform
import os
import diamond.collector
# Detect the architecture of the system
# and set the counters for MAX_VALUES
# appropriately. Otherwise, rolling over
# counter... | mit |
percyfal/bokeh | bokeh/models/renderers.py | 2 | 5608 | ''' Models (mostly base classes) for the various kinds of renderer
types that Bokeh supports.
'''
from __future__ import absolute_import
import logging
logger = logging.getLogger(__name__)
from ..core.enums import RenderLevel
from ..core.has_props import abstract
from ..core.properties import Auto, Bool, Either, Enu... | bsd-3-clause |
omgimdrunk/ocradio | ocradio/dataloggers.py | 2 | 1117 | # Copyright (C) 1994-2010 by David Massey (davidm@msynet.com)
# See LICENSE for licensing information
import os
class InstantaneousDataLog:
def dumpvalue(fname, str):
try:
fh = file(fname, 'w')
fh.write(str)
finally:
fh.close()
dumpvalue = staticmethod(dumpv... | gpl-3.0 |
neuroidss/nupic | tests/integration/nupic/algorithms/knn_classifier_test/categories_test.py | 10 | 3864 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditions apply:
#
# This pro... | agpl-3.0 |
annashcherbina/FASTQSim | src/msa_from_sam.py | 2 | 15121 | #This file does three things:
#1. calculate the frequency of mutations, insertions, and deletions at each position in an
#NGS read.
#2. find the degree of coverage of the reference genome
#3. find the fraction of each subject read that was aligned to a corresponding sequence
#in the refenece genome.
# @author ... | gpl-3.0 |
netscaler/horizon | openstack_dashboard/dashboards/project/access_and_security/security_groups/urls.py | 11 | 1441 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | apache-2.0 |
brianjgeiger/osf.io | tests/test_registrations/test_registration_approvals.py | 3 | 12424 | import datetime
import mock
from django.utils import timezone
from nose.tools import * # noqa
from tests.base import fake, OsfTestCase
from osf_tests.factories import (
EmbargoFactory, NodeFactory, ProjectFactory,
RegistrationFactory, UserFactory, UnconfirmedUserFactory
)
from framework.exceptions import Per... | apache-2.0 |
mKeRix/home-assistant | tests/components/ifttt/test_init.py | 13 | 1514 | """Test the init file of IFTTT."""
from homeassistant import data_entry_flow
from homeassistant.components import ifttt
from homeassistant.core import callback
from tests.async_mock import patch
async def test_config_flow_registers_webhook(hass, aiohttp_client):
"""Test setting up IFTTT and sending webhook."""
... | mit |
hk0792/UsefulClass | EBookDroid/jni/mupdf/freetype/src/tools/chktrcmp.py | 381 | 3826 | #!/usr/bin/env python
#
# Check trace components in FreeType 2 source.
# Author: suzuki toshiya, 2009
#
# This code is explicitly into the public domain.
import sys
import os
import re
SRC_FILE_LIST = []
USED_COMPONENT = {}
KNOWN_COMPONENT = {}
SRC_FILE_DIRS = [ "src" ]
TRACE_DEF_FILES = [ "include/freetype/in... | apache-2.0 |
MattsFleaMarket/python-for-android | python3-alpha/python3-src/Doc/includes/mp_webserver.py | 48 | 2056 | #
# Example where a pool of http servers share a single listening socket
#
# On Windows this module depends on the ability to pickle a socket
# object so that the worker processes can inherit a copy of the server
# object. (We import `multiprocessing.reduction` to enable this pickling.)
#
# Not sure if we should synch... | apache-2.0 |
xuweiliang/Codelibrary | openstack_dashboard/dashboards/admin/access_and_security/keypairs/urls.py | 1 | 1463 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 |
Nepherhotep/django | tests/sitemaps_tests/base.py | 380 | 1079 | from django.apps import apps
from django.contrib.sites.models import Site
from django.core.cache import cache
from django.test import TestCase, modify_settings, override_settings
from .models import I18nTestModel, TestModel
@modify_settings(INSTALLED_APPS={'append': 'django.contrib.sitemaps'})
@override_settings(ROO... | bsd-3-clause |
bvcms/bvcms | CmsWeb/Lib/lib2to3/pgen2/grammar.py | 6 | 6453 | # Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""This module defines the data structures used to represent a grammar.
These are a bit arcane because they are derived from the data
structures used by Python's 'pgen' parser generator.
There's also ... | gpl-2.0 |
MrPablozOne/Bakalarka_Kaira | ptp/gencpp/build.py | 12 | 4733 | #
# Copyright (C) 2011-2013 Stanislav Bohm
#
# This file is part of Kaira.
#
# Kaira 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 3 of the License, or
# (at your option) any later ... | gpl-3.0 |
davehunt/kuma | vendor/packages/pygments/unistring.py | 44 | 51150 | # -*- coding: utf-8 -*-
"""
pygments.unistring
~~~~~~~~~~~~~~~~~~
Strings of all Unicode characters of a certain category.
Used for matching in Unicode-aware languages. Run to regenerate.
Inspired by chartypes_create.py from the MoinMoin project.
:copyright: Copyright 2006-2014 by the Pygment... | mpl-2.0 |
Aorjoa/aiyara-ceph-dash | .tox/py27/lib/python2.7/site-packages/flask/helpers.py | 44 | 37384 | # -*- coding: utf-8 -*-
"""
flask.helpers
~~~~~~~~~~~~~
Implements various helpers.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
import pkgutil
import posixpath
import mimetypes
from time import time
from zlib import adler32
from th... | bsd-2-clause |
FlintHill/SUAS-Competition | UpdatedImageProcessing/UpdatedImageProcessing/ShapeDetection/utils/bounding_box.py | 1 | 3445 | import cv2
import numpy
from alpha_fill import alpha_fill
class BoundingBox(object):
def __init__(self, pil_img, show_plot=False):
self.mask_img = alpha_fill(pil_img)
self.set_bounding_box()
self.set_side_lengths()
self.set_areas()
if show_plot:
self.show_plot... | mit |
locuslab/dreaml | dreaml/dataframe/transform.py | 1 | 5833 | from abc import ABCMeta, abstractmethod
from threading import Thread
from time import sleep, time
class Transform(object):
__metaclass__ = ABCMeta
def __init__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs
@abstractmethod
def apply(self,target_df=None):
""" Ap... | apache-2.0 |
redebian/documentation | django/contrib/gis/geos/linestring.py | 411 | 5568 | from django.contrib.gis.geos.base import numpy
from django.contrib.gis.geos.coordseq import GEOSCoordSeq
from django.contrib.gis.geos.error import GEOSException
from django.contrib.gis.geos.geometry import GEOSGeometry
from django.contrib.gis.geos.point import Point
from django.contrib.gis.geos import prototypes as cap... | bsd-3-clause |
keeeener/nicki | platform/external/webkit/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py | 15 | 5787 | # Copyright (C) 2011 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... | gpl-2.0 |
ximion/dak-dep11 | dak/acl.py | 6 | 4094 | #! /usr/bin/env python
#
# Copyright (C) 2012, Ansgar Burchardt <ansgar@debian.org>
#
# 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 l... | gpl-2.0 |
MartinHeinz/training-and-food-tracker | src/models/model.py | 1 | 28995 | import textwrap
from datetime import date
from itertools import chain
import decimal
from sqlalchemy import Table, Column, Integer, ForeignKey, Date, Numeric, String, Text, Boolean, Time, and_, or_, cast, \
func, CheckConstraint
from sqlalchemy.orm import relationship, backref
from sqlalchemy.dialects import postg... | mit |
reinout/ansible | lib/ansible/plugins/action/__init__.py | 5 | 25459 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 |
GarySparrow/mFlaskWeb | venv/Lib/site-packages/pip/commands/completion.py | 343 | 2453 | from __future__ import absolute_import
import sys
from pip.basecommand import Command
BASE_COMPLETION = """
# pip %(shell)s completion start%(script)s# pip %(shell)s completion end
"""
COMPLETION_SCRIPTS = {
'bash': """
_pip_completion()
{
COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\
CO... | mit |
broferek/ansible | lib/ansible/modules/network/fortios/fortios_application_group.py | 13 | 11766 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# 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 Lic... | gpl-3.0 |
Thraxis/pymedusa | lib/rtorrent/lib/torrentparser.py | 91 | 5653 | # Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com>
# 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, ... | gpl-3.0 |
carlgao/lenga | images/lenny64-peon/usr/share/python-support/python-django/django/db/backends/__init__.py | 7 | 20811 | import decimal
from threading import local
from django.db import DEFAULT_DB_ALIAS
from django.db.backends import util
from django.utils import datetime_safe
from django.utils.importlib import import_module
class BaseDatabaseWrapper(local):
"""
Represents a database connection.
"""
ops = None
def ... | mit |
synclab/radclock | python-module/setup.py | 1 | 2076 |
# Copyright (C) 2006-2011 Julien Ridoux <julien@synclab.org>
#
# This file is part of the radclock program.
#
# 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,... | bsd-2-clause |
dragondjf/musicplayertest | player/__init__.py | 1 | 25345 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Deepin, Inc.
# 2011 Hou Shaohui
#
# Author: Hou Shaohui <houshao55@gmail.com>
# Maintainer: Hou ShaoHui <houshao55@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Ge... | gpl-2.0 |
cursoweb/python-archivos | Merlo-Joaquin/mimic.py | 6 | 2448 | #!/usr/bin/python -tt
# -*- coding: utf-8 -*-
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
"""Mimic pyquick exercise -- ejercicio extra opcional.
Google's ... | mit |
hsoft/musicguru | core/manualfs.py | 1 | 9237 | # Created By: Virgil Dupras
# Created On: 2004-12-27
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licens... | bsd-3-clause |
gromez/Sick-Beard | lib/subliminal/core.py | 30 | 12890 | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal 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... | gpl-3.0 |
alexlo03/ansible | lib/ansible/modules/cloud/ovirt/ovirt_vnic_profile.py | 37 | 8981 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# 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 |
suncycheng/intellij-community | python/lib/Lib/site-packages/django/contrib/gis/admin/options.py | 93 | 5100 | from django.conf import settings
from django.contrib.admin import ModelAdmin
from django.contrib.gis.admin.widgets import OpenLayersWidget
from django.contrib.gis.gdal import OGRGeomType
from django.contrib.gis.db import models
class GeoModelAdmin(ModelAdmin):
"""
The administration options class for Geographi... | apache-2.0 |
thresholdsoftware/asylum | openerp/addons/report_intrastat/__init__.py | 64 | 1094 | # -*- 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... | agpl-3.0 |
ubehera/django-guardian | guardian/shortcuts.py | 9 | 21556 | """
Convenient shortcuts to manage or check object permissions.
"""
from __future__ import unicode_literals
from django.contrib.auth.models import Group
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.db.models import... | bsd-2-clause |
resmo/cloudstack | tools/marvin/marvin/sandbox/testSetupSuccess.py | 12 | 3483 | # 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 |
almarklein/imageio | imageio/plugins/npz.py | 1 | 3389 | # -*- coding: utf-8 -*-
# Copyright (c) 2014, imageio contributors
# imageio is distributed under the terms of the (new) BSD License.
""" Storage of image data in npz format. Not a great format, but at least
it supports volumetric data. And its less than 100 lines.
"""
from __future__ import absolute_import, print_fu... | bsd-2-clause |
ghedsouza/snakebite | test/commandlineparser_test.py | 2 | 41119 | # -*- coding: utf-8 -*-
# Copyright (c) 2013 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 or... | apache-2.0 |
BhallaLab/moose-full | moose-gui/plugins/setsolver.py | 2 | 2548 | import moose
def deleteSolver(modelRoot):
compts = moose.wildcardFind(modelRoot+'/##[ISA=ChemCompt]')
for compt in compts:
if moose.exists(compt.path+'/stoich'):
st = moose.element(compt.path+'/stoich')
st_ksolve = st.ksolve
moose.delete(st)
if moose.exists((st_ksolve).path):
moose.delete(st_ksolve... | gpl-2.0 |
sachintaware/sublime-wakatime | packages/wakatime/packages/pygments_py2/pygments/styles/paraiso_dark.py | 126 | 5641 | # -*- coding: utf-8 -*-
"""
pygments.styles.paraiso_dark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Paraíso (Dark) by Jan T. Sott
Pygments template by Jan T. Sott (https://github.com/idleberg)
Created with Base16 Builder by Chris Kempson
(https://github.com/chriskempson/base16-builder).
:copyright: Cop... | bsd-3-clause |
xelphene/swaf | swaf/wrap.py | 1 | 3089 |
import types
import logging
import inspect
import pprint
import operator
import re
from operator import isCallable
from resp import *
import swaf.error
import swaf.misc
from swaf.misc import isListOfFuncs
DEBUG=1
def wrapFilter(f, filter_name, filters):
newf = chainWrap(f)
newf.__name__ = f.__name__
newf.__modul... | gpl-3.0 |
pjg101/SickRage | lib/pgi/cffilib/gir/gitypeinfo.py | 19 | 1740 | # Copyright 2013 Christoph Reiter
#
# This library 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 2.1 of the License, or (at your option) any later version.
from .. import _create_enu... | gpl-3.0 |
kerr-huang/SL4A | python-modules/pybluez/examples/simple/rfcomm-server.py | 67 | 1097 | # file: rfcomm-server.py
# auth: Albert Huang <albert@csail.mit.edu>
# desc: simple demonstration of a server application that uses RFCOMM sockets
#
# $Id: rfcomm-server.py 518 2007-08-10 07:20:07Z albert $
from bluetooth import *
server_sock=BluetoothSocket( RFCOMM )
server_sock.bind(("",PORT_ANY))
server_sock.liste... | apache-2.0 |
kleins11/intdatasci-byte2 | lib/flask/wrappers.py | 773 | 6709 | # -*- coding: utf-8 -*-
"""
flask.wrappers
~~~~~~~~~~~~~~
Implements the WSGI wrappers (request and response).
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase
from werkzeug.exce... | apache-2.0 |
texcaltech/windmilltownhomes-old | django/contrib/gis/maps/google/zoom.py | 327 | 6628 | from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon, Point
from django.contrib.gis.maps.google.gmap import GoogleMapException
from math import pi, sin, cos, log, exp, atan
# Constants used for degree to radian conversion, and vice-versa.
DTOR = pi / 180.
RTOD = 180. / pi
class GoogleZoom(object):
... | bsd-3-clause |
CUFCTL/DLBD | face-detection-code/object_detection/models/ssd_inception_v3_feature_extractor_test.py | 2 | 5729 | # 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... | mit |
ryfeus/lambda-packs | Tensorflow_OpenCV_Nightly/source/tensorflow/contrib/learn/python/learn/dataframe/estimator_utils.py | 75 | 7274 | # pylint: disable=g-bad-file-header
# 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/LICENS... | mit |
nitin-cherian/LifeLongLearning | Python/PythonProgrammingLanguage/Encapsulation/encap_env/lib/python3.5/site-packages/notebook/services/contents/handlers.py | 3 | 11387 | """Tornado handlers for the contents web service.
Preliminary documentation at https://github.com/ipython/ipython/wiki/IPEP-27%3A-Contents-Service
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import json
from tornado import gen, web
from notebook.utils im... | mit |
dvliman/jaikuengine | .google_appengine/lib/django-0.96/django/test/doctest.py | 32 | 99628 | # Module doctest.
# Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org).
# Major enhancements and refactoring by:
# Jim Fulton
# Edward Loper
# Provided as-is; use at your own risk; no warranty; no promises; enjoy!
r"""Module doctest -- a framework for running examples in docstrings.
In... | apache-2.0 |
djmaze/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/download_unittest.py | 118 | 17125 | # Copyright (C) 2009, 2011 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... | bsd-3-clause |
SlimRemix/android_external_chromium_org | tools/json_to_struct/struct_generator_test.py | 129 | 1924 | #!/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.
from struct_generator import GenerateField
from struct_generator import GenerateStruct
import unittest
class StructGeneratorTest(u... | bsd-3-clause |
pitrou/numba | numba/tests/test_range.py | 5 | 4757 | from __future__ import print_function
import numba.unittest_support as unittest
import numpy
from numba.compiler import compile_isolated
from numba import types
def loop1(n):
s = 0
for i in range(n):
s += i
return s
def loop2(a, b):
s = 0
for i in range(a, b):
s += i
return s... | bsd-2-clause |
skandavivek/tracking-cars-highway | lk_track2.py | 1 | 3415 | #!/usr/bin/env python
'''
Lucas-Kanade tracker
====================
Lucas-Kanade algorithm to track cars on a highway and save output
lk_track2.py [<video_source>]
ESC - exit
'''
from __future__ import print_function
import numpy as np
import cv2
#import video
from common import anorm2, draw_str
from time import... | apache-2.0 |
repotvsupertuga/tvsupertuga.repository | plugin.video.loganaddon/resources/lib/sources/disabled/dizimag_tv.py | 10 | 5827 | # -*- coding: utf-8 -*-
'''
Specto Add-on
Copyright (C) 2015 lambda
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 l... | gpl-2.0 |
windelbouwman/ppci-mirror | ppci/cli/yacc.py | 1 | 1231 | """ Parser generator utility.
This script can generate a python script from a grammar description.
Invoke the script on a grammar specification file:
.. code::
$ ppci-yacc test.x -o test_parser.py
And use the generated parser by deriving a user class:
.. code::
import test_parser
class MyParser(test... | bsd-2-clause |
sdpp/python-keystoneclient | keystoneclient/auth/identity/generic/base.py | 4 | 7039 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.