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 |
|---|---|---|---|---|---|
BirkbeckCTP/janeway | src/core/homepage_elements/carousel/plugin_settings.py | 1 | 2057 | from django.db.utils import OperationalError
from django.contrib.contenttypes.models import ContentType
PLUGIN_NAME = 'Carousel'
DESCRIPTION = 'This is a homepage element that renders a carousel.'
AUTHOR = 'Martin Paul Eve'
def install():
import core.models as core_models
import journal.models as journal_mod... | agpl-3.0 |
NeuralEnsemble/elephant | elephant/asset/asset.py | 2 | 102992 | # -*- coding: utf-8 -*-
"""
ASSET is a statistical method :cite:`asset-Torre16_e1004939` for the detection
of repeating sequences of synchronous spiking events in parallel spike trains.
ASSET analysis class object of finding patterns
-----------------------------------------------
.. autosummary::
:toctree: _toc... | bsd-3-clause |
tronlogistics/micro | flask/lib/python3.4/site-packages/pip/commands/show.py | 344 | 2767 | import os
from pip.basecommand import Command
from pip.log import logger
from pip._vendor import pkg_resources
class ShowCommand(Command):
"""Show information about one or more installed packages."""
name = 'show'
usage = """
%prog [options] <package> ..."""
summary = 'Show information about in... | bsd-3-clause |
3nids/QGIS | tests/src/python/test_qgsdelimitedtextprovider_wanted.py | 12 | 73024 | # -*- coding: utf-8 -*-
"""
***************************************************************************
test_qgsdelimitedtextprovider_wanted.py
---------------------
Date : May 2013
Copyright : (C) 2013 by Chris Crook
Email : ccrook at linz dot govt dot nz
... | gpl-2.0 |
zubair-arbi/edx-platform | lms/envs/aws_migrate.py | 288 | 1256 | """
A Django settings file for use on AWS while running
database migrations, since we don't want to normally run the
LMS with enough privileges to modify the database schema.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=... | agpl-3.0 |
kennedyshead/home-assistant | homeassistant/components/websocket_api/http.py | 2 | 8634 | """View to accept incoming websocket connection."""
from __future__ import annotations
import asyncio
from collections.abc import Callable
from contextlib import suppress
import datetime as dt
import logging
from typing import Any, Final
from aiohttp import WSMsgType, web
import async_timeout
from homeassistant.comp... | apache-2.0 |
prathik/thrift | lib/py/src/TSCons.py | 237 | 1267 | #
# 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 |
ShakedY/ai-project | py2.5/lib/python2.5/curses/wrapper.py | 19 | 1650 | """curses.wrapper
Contains one function, wrapper(), which runs another function which
should be the rest of your curses-based application. If the
application raises an exception, wrapper() will restore the terminal
to a sane state so you can read the resulting traceback.
"""
import sys, curses
def wrapper(func, *a... | gpl-3.0 |
pbenner/adaptive-sampling | adaptive_sampling/policy.py | 1 | 7380 | #! /usr/bin/env python
# Copyright (C) 2012 Philipp Benner
#
# 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
# any later version.
#
# This program is distrib... | gpl-2.0 |
mglukhikh/intellij-community | python/lib/Lib/distutils/bcppcompiler.py | 85 | 15086 | """distutils.bcppcompiler
Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
"""
# This implementation by Lyle Johnson, based on the original msvccompiler.py
# module and using the directions originally published by Gordon Williams.
# XXX looks like there's a L... | apache-2.0 |
nttks/edx-platform | lms/djangoapps/course_wiki/tests/test_tab.py | 158 | 2454 | """
Tests for wiki views.
"""
from django.conf import settings
from django.test.client import RequestFactory
from courseware.tabs import get_course_tab_list
from student.tests.factories import AdminFactory, UserFactory
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tes... | agpl-3.0 |
salguarnieri/intellij-community | plugins/hg4idea/testData/bin/mercurial/keepalive.py | 91 | 25918 | # 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.
#
# This library is distributed in the hope that it w... | apache-2.0 |
sincerefly/getEastmoneyReport | guping_new/statistics/sta-3.py | 1 | 2384 | #!/bin/env python
#encoding:utf-8
from pymongo import MongoClient
import datetime
# Settings
mongopath = "localhost" # 数据库地址
startDate = "20150104" # 检索数据开始日期
endDate = "20150529" # 检索数据结束日期
#endDate = "20150227" # 检索数据结束日期(三个月预留)
nowDate = datetime.datetime.now().strftime("%Y%m%d") # 当前日期
# Functions
def isN... | mit |
AutomatedTester/selenium | py/test/selenium/test_prompts.py | 65 | 2425 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 |
sbalde/edx-platform | common/lib/xmodule/xmodule/modulestore/tests/factories.py | 16 | 21208 | """
Factories for use in tests of XBlocks.
"""
import functools
import inspect
import pprint
import pymongo.message
import threading
import traceback
from collections import defaultdict
from decorator import contextmanager
from uuid import uuid4
from factory import Factory, Sequence, lazy_attribute_sequence, lazy_att... | agpl-3.0 |
XiaodunServerGroup/medicalmooc | common/lib/capa/capa/tests/__init__.py | 8 | 1737 | """Tools for helping with testing capa."""
import gettext
import os
import os.path
import fs.osfs
from capa.capa_problem import LoncapaProblem, LoncapaSystem
from mock import Mock, MagicMock
import xml.sax.saxutils as saxutils
TEST_DIR = os.path.dirname(os.path.realpath(__file__))
def tst_render_template(templat... | agpl-3.0 |
zsulocal/pycoin | pycoin/tx/script/check_signature.py | 1 | 11210 | # -*- coding: utf-8 -*-
"""
Parse, stream, create, sign and verify Bitcoin transactions as Tx structures.
The MIT License (MIT)
Copyright (c) 2015 by Richard Kiss
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to dea... | mit |
mattilyra/scikit-learn | sklearn/cluster/affinity_propagation_.py | 60 | 10688 | """Affinity Propagation clustering algorithm."""
# Author: Alexandre Gramfort alexandre.gramfort@inria.fr
# Gael Varoquaux gael.varoquaux@normalesup.org
# License: BSD 3 clause
import numpy as np
from ..base import BaseEstimator, ClusterMixin
from ..utils import as_float_array, check_array
from ..utils.valid... | bsd-3-clause |
badp/ganeti | test/py/cmdlib/testsupport/__init__.py | 2 | 1758 | #
#
# Copyright (C) 2013 Google 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed ... | gpl-2.0 |
OlexandrI/pyside | paste/lint.py | 1 | 15002 | # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
# Also licenced under the Apache License, 2.0: http://opensource.org/licenses/apache2.0.php
# Licensed to PSF under a Contributor Agreement
"""
Middlew... | lgpl-3.0 |
sadaf2605/django | tests/middleware/tests.py | 2 | 36708 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import gzip
import random
import re
from io import BytesIO
from unittest import skipIf
from django.conf import settings
from django.core import mail
from django.core.exceptions import PermissionDenied
from django.http import (
FileResponse, HttpReque... | bsd-3-clause |
4eek/edx-platform | lms/djangoapps/shoppingcart/migrations/0013_auto__add_field_invoice_is_valid.py | 114 | 13795 | # -*- 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 'Invoice.is_valid'
db.add_column('shoppingcart_invoice', 'is_valid',
se... | agpl-3.0 |
abegong/textbadger | textbadger/tb_app/models.py | 1 | 17389 | #from django.db.models import Model, TextField
#from djangotoolbox.fields import ListField, EmbeddedModelField, DictField
from django.contrib.auth.models import User
from django.db import connections
from bson.objectid import ObjectId
from pymongo.errors import InvalidId
import csv, re, json, datetime, random
from col... | mit |
bitmazk/django-multilingual-survey | runtests.py | 1 | 1047 | #!/usr/bin/env python
"""
This script is used to run tests, create a coverage report and output the
statistics at the end of the tox run.
To run this script just execute ``tox``
"""
import re
from fabric.api import local, warn
from fabric.colors import green, red
if __name__ == '__main__':
local('flake8 --ignore... | mit |
alfa-addon/addon | plugin.video.alfa/channels/blogdepelis.py | 1 | 6801 | # -*- coding: utf-8 -*-
# -*- Channel Blog de Pelis -*-
# -*- Created for Alfa-addon -*-
# -*- By the Alfa Develop Group -*-
from builtins import range
import sys
PY3 = False
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
import re
from channelselector import get_thumb
f... | gpl-3.0 |
sudosurootdev/kernel_lge_lgl24 | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | 1927 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... | gpl-2.0 |
amb/blender-texture-tools | __init__.py | 1 | 55839 | # 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 hope that it will be useful,
# bu... | gpl-2.0 |
MacGyverNL/alot | setup.py | 1 | 1650 | #!/usr/bin/env python3
from setuptools import setup, find_packages
import alot
setup(
name='alot',
version=alot.__version__,
description=alot.__description__,
author=alot.__author__,
author_email=alot.__author_email__,
url=alot.__url__,
license=alot.__copyright__,
classifiers=[
... | gpl-3.0 |
plowman/python-mcparseface | models/syntaxnet/tensorflow/tensorflow/contrib/ffmpeg/encode_audio_op_test.py | 6 | 1742 | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
jalanb/dotjab | src/python/y.py | 2 | 1435 | """y not?"""
import os
import argv
argv.add_options([
('delete', 'delete python compiled files as well', False),
('wipe', 'remove known garbage', False),
('stat', 'run svn stat', False),
('tags', 'refresh the tags file', True),
('verbose', 'run ptags verbosely', False),
])
from ls import ly
fr... | mit |
ArnossArnossi/django | tests/template_tests/test_context.py | 166 | 5389 | # -*- coding: utf-8 -*-
from django.http import HttpRequest
from django.template import (
Context, Engine, RequestContext, Template, Variable, VariableDoesNotExist,
)
from django.template.context import RenderContext
from django.test import RequestFactory, SimpleTestCase
class ContextTests(SimpleTestCase):
... | bsd-3-clause |
waseem18/oh-mainline | mysite/project/tasks/__init__.py | 15 | 1736 | # This file is part of OpenHatch.
# Copyright (C) 2010 Parker Phinney
# Copyright (C) 2010 OpenHatch, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Licens... | agpl-3.0 |
kei-yamazaki/jenkins-job-builder | jenkins_jobs/modules/wrappers.py | 1 | 54570 | # Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# 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 |
xubenben/scikit-learn | sklearn/linear_model/ridge.py | 25 | 39394 | """
Ridge regression
"""
# Author: Mathieu Blondel <mathieu@mblondel.org>
# Reuben Fletcher-Costin <reuben.fletchercostin@gmail.com>
# Fabian Pedregosa <fabian@fseoane.net>
# Michael Eickenberg <michael.eickenberg@nsup.org>
# License: BSD 3 clause
from abc import ABCMeta, abstractmethod
impor... | bsd-3-clause |
clobrano/personfinder | app/unidecode/x070.py | 252 | 4693 | data = (
'You ', # 0x00
'Yang ', # 0x01
'Lu ', # 0x02
'Si ', # 0x03
'Jie ', # 0x04
'Ying ', # 0x05
'Du ', # 0x06
'Wang ', # 0x07
'Hui ', # 0x08
'Xie ', # 0x09
'Pan ', # 0x0a
'Shen ', # 0x0b
'Biao ', # 0x0c
'Chan ', # 0x0d
'Mo ', # 0x0e
'Liu ', # 0x0f
'Jian ', # 0x10
'P... | apache-2.0 |
Elbagoury/odoo | addons/event/event.py | 56 | 19486 | # -*- 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 |
sternshus/Arelle | setup.py | 1 | 17326 | """
Created on Jan 30, 2011
@author: Mark V Systems Limited
(c) Copyright 2011 Mark V Systems Limited, All rights reserved.
"""
import sys
import os
import datetime
from distutils.command.build_py import build_py as _build_py
def get_version():
"""
Utility function to return the current version of the librar... | apache-2.0 |
jordanemedlock/psychtruths | temboo/core/Library/SendGrid/NewsletterAPI/Newsletter/EditNewsletter.py | 5 | 5093 | # -*- coding: utf-8 -*-
###############################################################################
#
# EditNewsletter
# Edit an existing newsletter.
#
# 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 exc... | apache-2.0 |
xiaotdl/ansible | lib/ansible/template/template.py | 267 | 1397 | # (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 |
maelnor/nova | nova/api/openstack/compute/plugins/v3/floating_ip_pools.py | 5 | 2145 | # Copyright (c) 2011 X.commerce, a business unit of eBay 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 req... | apache-2.0 |
Maple1401/awesome-python-webapp | www/markdown2.py | 27 | 92765 | #!/usr/bin/env python
# Copyright (c) 2012 Trent Mick.
# Copyright (c) 2007-2008 ActiveState Corp.
# License: MIT (http://www.opensource.org/licenses/mit-license.php)
from __future__ import generators
r"""A fast and complete Python implementation of Markdown.
[from http://daringfireball.net/projects/markdown/]
> Mar... | gpl-2.0 |
BrianGladman/pthreads | build.vs/build_tests/_msvccompiler.py | 1 | 22500 | """
----------------------------------------------------------------------------
Copyright © 2001-2020 Python Software Foundation; All Rights Reserved
This file is distributed under the terms of this license:
https://docs.python.org/3/license.html
-----------------------------------------------------------------... | apache-2.0 |
koobonil/Boss2D | Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/contrib/bayesflow/python/kernel_tests/stochastic_tensor_test.py | 54 | 9345 | # 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... | mit |
Tokyo-Buffalo/tokyosouth | env/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/util/timeout.py | 713 | 9596 | from __future__ import absolute_import
# The default socket timeout, used by httplib to indicate that no timeout was
# specified by the user
from socket import _GLOBAL_DEFAULT_TIMEOUT
import time
from ..exceptions import TimeoutStateError
# A sentinel value to indicate that no timeout was specified by the user in
# u... | mit |
duhzecca/cinder | cinder/volume/drivers/vmware/volumeops.py | 7 | 68492 | # Copyright (c) 2013 VMware, 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... | apache-2.0 |
dirn/Simon | tests/test_query.py | 1 | 14495 | try:
import unittest2 as unittest
except ImportError:
import unittest
import collections
try:
from unittest import mock
except ImportError:
import mock
from pymongo.cursor import Cursor
from simon import connection, query
from simon._compat import range
from .utils import AN_OBJECT_ID, ModelFactory... | bsd-3-clause |
sharad/calibre | src/calibre/utils/config_base.py | 1 | 19477 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = 'GPL v3'
__copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import os, re, cPickle, traceback
from functools import partial
from collections import defaultdict
from copy import deepco... | gpl-3.0 |
Lawrence-Liu/scikit-learn | examples/cluster/plot_segmentation_toy.py | 258 | 3336 | """
===========================================
Spectral clustering for image segmentation
===========================================
In this example, an image with connected circles is generated and
spectral clustering is used to separate the circles.
In these settings, the :ref:`spectral_clustering` approach solve... | bsd-3-clause |
vlachoudis/sl4a | python/src/Lib/bsddb/db.py | 194 | 2730 | #----------------------------------------------------------------------
# Copyright (c) 1999-2001, Digital Creations, Fredericksburg, VA, USA
# and Andrew Kuchling. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following c... | apache-2.0 |
agentxan/nzbToMedia | libs/beets/plugins.py | 4 | 15698 | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# 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 t... | gpl-3.0 |
mulkieran/pyblk | tests/test_traversal.py | 1 | 4103 | # -*- coding: utf-8 -*-
# Copyright (C) 2015 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in th... | gpl-2.0 |
zaina/nova | nova/tests/unit/api/ec2/test_ec2utils.py | 84 | 2549 | # Copyright 2014 - Red Hat, 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 ag... | apache-2.0 |
thedemz/M101P | chapter2/hw2-2.py | 1 | 1698 | import sys
import os
file_path = os.path.abspath(__file__)
dir_path = os.path.dirname(file_path)
lib_path = os.path.join(dir_path, "lib")
sys.path.insert(0, lib_path)
import pymongo
# connnecto to the db on standard port
connection = pymongo.MongoClient("mongodb://localhost")
db = connection.students ... | apache-2.0 |
chiffa/numpy | numpy/distutils/conv_template.py | 38 | 9684 | #!/usr/bin/python
"""
takes templated file .xxx.src and produces .xxx file where .xxx is
.i or .c or .h, using the following template rules
/**begin repeat -- on a line by itself marks the start of a repeated code
segment
/**end repeat**/ -- on a line by itself marks it's end
After the /**begin ... | bsd-3-clause |
spisneha25/django | tests/sitemaps_tests/test_https.py | 205 | 3608 | from __future__ import unicode_literals
from datetime import date
from django.test import ignore_warnings, override_settings
from django.utils.deprecation import RemovedInDjango110Warning
from .base import SitemapTestsBase
@override_settings(ROOT_URLCONF='sitemaps_tests.urls.https')
class HTTPSSitemapTests(Sitemap... | bsd-3-clause |
catapult-project/catapult | third_party/gsutil/third_party/pyu2f/pyu2f/tests/hardware_test.py | 7 | 7337 | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | bsd-3-clause |
ASlave2Audio/Restaurant-App | mingw/bin/lib/xdrlib.py | 197 | 5563 | """Implements (a subset of) Sun XDR -- eXternal Data Representation.
See: RFC 1014
"""
import struct
try:
from cStringIO import StringIO as _StringIO
except ImportError:
from StringIO import StringIO as _StringIO
__all__ = ["Error", "Packer", "Unpacker", "ConversionError"]
# exceptions
class Error(Exceptio... | mit |
dhhjx880713/GPy | GPy/likelihoods/mixed_noise.py | 7 | 3266 | # Copyright (c) 2012-2014 The GPy authors (see AUTHORS.txt)
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from scipy import stats, special
from . import link_functions
from .likelihood import Likelihood
from .gaussian import Gaussian
from ..core.parameterization import Param
from param... | bsd-3-clause |
sdgathman/cjdns | node_build/dependencies/libuv/build/gyp/test/ninja/action_dependencies/gyptest-action-dependencies.py | 54 | 1972 | #!/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.
"""
Verify that building an object file correctly depends on running actions in
dependent targets, but not the targets themselves.
"""
impo... | gpl-3.0 |
Distrotech/bzr | bzrlib/tests/test_reconcile.py | 2 | 2802 | # Copyright (C) 2006, 2008-2011 Canonical Ltd
#
# 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.
#
# This program is dist... | gpl-2.0 |
aspidites/django | tests/multiple_database/models.py | 282 | 2472 | from django.contrib.auth.models import User
from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
clas... | bsd-3-clause |
ryfx/modrana | modules/mod_cron.py | 1 | 13149 | # -*- coding: utf-8 -*-
#----------------------------------------------------------------------------
# A timing and scheduling module for modRana.
#----------------------------------------------------------------------------
# Copyright 2007, Oliver White
#
# This program is free software: you can redistribute it and/... | gpl-3.0 |
samueldotj/TeeRISC-Simulator | util/o3-pipeview.py | 58 | 15788 | #! /usr/bin/env python
# Copyright (c) 2011 ARM Limited
# All rights reserved
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementatio... | bsd-3-clause |
drewp/tahoe-lafs | setuptools-0.6c16dev3.egg/setuptools/command/develop.py | 7 | 5478 | from setuptools.command.easy_install import easy_install
from distutils.util import convert_path
from pkg_resources import Distribution, PathMetadata, normalize_path
from distutils import log
from distutils.errors import *
import sys, os, setuptools, glob
class develop(easy_install):
"""Set up package for developm... | gpl-2.0 |
odoousers2014/LibrERP | account_financial_report_webkit/wizard/general_ledger_wizard.py | 2 | 6208 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi, Guewen Baconnier
# Copyright Camptocamp SA 2011
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | agpl-3.0 |
john-wang-metro/metro-openerp | metro_mrp/__openerp__.py | 2 | 2231 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can red... | agpl-3.0 |
thispc/download-manager | module/plugins/crypter/CryptCat.py | 8 | 1949 | # -*- coding: utf-8 -*-
import re
from ..internal.SimpleCrypter import SimpleCrypter
class CryptCat(SimpleCrypter):
__name__ = "CryptCat"
__type__ = "crypter"
__version__ = "0.04"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?crypt\.cat/\w+'
__config__ = [("activated", "bool", "... | gpl-3.0 |
simonmonk/squid | build/lib.linux-armv6l-2.7/squid.py | 1 | 1424 | #squid.py Library
import RPi.GPIO as GPIO
import time
WHITE = (30, 30, 30)
OFF = (0, 0, 0)
RED = (100, 0, 0)
GREEN = (0, 100, 0)
BLUE = (0, 0, 100)
YELLOW = (50, 50, 0)
PURPLE = (50, 0, 50)
CYAN = (0, 50, 50)
class Squid:
RED_PIN = 0
GREEN_PIN = 0
BLUE_PIN = 0
red_pwm = 0
green_pwm = 0
blu... | mit |
hyowon/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_mock.py | 496 | 5168 | #!/usr/bin/env python
#
# Copyright 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... | mpl-2.0 |
hlieberman/debian-ansible | docsite/build-site.py | 35 | 3249 | #!/usr/bin/env python
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of the Ansible Documentation
#
# 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 th... | gpl-3.0 |
bestvibes/neo4j-social-network | mac_env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py | 2755 | 9226 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | mit |
Maximilian-Reuter/SickRage-1 | lib/twilio/rest/resources/pricing/voice.py | 35 | 4195 | from .. import NextGenInstanceResource, NextGenListResource
class Voice(object):
"""Holds references to the Voice pricing resources."""
name = "Voice"
key = "voice"
def __init__(self, base_uri, auth, timeout):
self.uri = "%s/Voice" % base_uri
self.countries = VoiceCountries(self.uri,... | gpl-3.0 |
taedori81/django-oscar | src/oscar/apps/address/migrations/0001_initial.py | 58 | 4480 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import oscar.models.fields
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = ... | bsd-3-clause |
ssavvides/posix-omni-parser | parsers/Parser.py | 1 | 4623 | """
<Started>
July 2013
<Author>
Savvas Savvides <savvas@purdue.edu>
<Purpose>
Acts as the parent for all parsers. Defines some abstract methods required by
all parsers and some helper methods that can be used by any parser.
"""
import pickle
class Parser():
def __init__(self, trace_path):
""... | apache-2.0 |
atsao72/sympy | sympy/matrices/expressions/hadamard.py | 91 | 2443 | from __future__ import print_function, division
from sympy.core import Mul, sympify
from sympy.strategies import unpack, flatten, condition, exhaust, do_one
from sympy.matrices.expressions.matexpr import MatrixExpr, ShapeError
def hadamard_product(*matrices):
"""
Return the elementwise (aka Hadamard) product... | bsd-3-clause |
paplorinc/intellij-community | python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/pgen2/driver.py | 212 | 5164 | # Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
# Modifications:
# Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Parser driver.
This provides a high-level interface to parse a file into a synta... | apache-2.0 |
Forage/Gramps | gramps/gen/db/backup.py | 1 | 6924 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2007 Donald N. Allingham
# Copyright (C) 2011 Tim G L Lyons
#
# 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 ve... | gpl-2.0 |
cd80/UtilizedLLVM | tools/clang/bindings/python/clang/enumerations.py | 307 | 1077 | #===- enumerations.py - Python Enumerations ------------------*- python -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===--------------------------------------------------------------... | unlicense |
erhuabushuo/crossbar | crossbar/router/test/test_observation.py | 2 | 12951 | #####################################################################################
#
# Copyright (C) Tavendo GmbH
#
# Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you
# have purchased a commercial license), the license terms below apply.
#
# Should you enter into a separate licen... | agpl-3.0 |
hesseltuinhof/mxnet | example/gluon/dcgan.py | 1 | 8010 | import matplotlib as mpl
mpl.use('Agg')
from matplotlib import pyplot as plt
import argparse
import mxnet as mx
from mxnet import gluon
from mxnet.gluon import nn
from mxnet import autograd
import numpy as np
import logging
from datetime import datetime
import os
import time
def fill_buf(buf, i, img, shape):
n = ... | apache-2.0 |
frankinit/ThinkStats2 | code/chap14soln.py | 68 | 4396 | """This file contains code for use with "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function, division
import numpy as np
import random
import first
import normal
import th... | gpl-3.0 |
dob71/x2swn | skeinforge/skeinforge_application/skeinforge_plugins/craft_plugins/coil.py | 8 | 9991 | """
This page is in the table of contents.
Coil is a script to coil wire or filament around an object.
==Operation==
The default 'Activate Coil' checkbox is on. When it is on, the functions described below will work, when it is off, the functions will not be called.
==Settings==
===Minimum Tool Distance===
Default i... | gpl-3.0 |
vnsofthe/odoo-dev | addons/hr_gamification/__openerp__.py | 320 | 1676 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 OpenERP SA (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 |
dostavro/dotfiles | sublime2/Packages/SublimeCodeIntel/libs/process.py | 2 | 26248 | # ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (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.mozilla.org/MPL/
#
# Softwa... | mit |
ZenithDK/mopidy | tests/http/test_handlers.py | 17 | 3205 | from __future__ import absolute_import, unicode_literals
import os
import mock
import tornado.testing
import tornado.web
import tornado.websocket
import mopidy
from mopidy.http import handlers
class StaticFileHandlerTest(tornado.testing.AsyncHTTPTestCase):
def get_app(self):
return tornado.web.Applic... | apache-2.0 |
clovett/MissionPlanner | Lib/site-packages/numpy/random/__init__.py | 54 | 4688 | """
========================
Random Number Generation
========================
==================== =========================================================
Utility functions
==============================================================================
random Uniformly distributed values of a given sha... | gpl-3.0 |
drammock/mne-python | tutorials/preprocessing/59_head_positions.py | 5 | 3467 | """
.. _tut-head-pos:
================================================
Extracting and visualizing subject head movement
================================================
Continuous head movement can be encoded during MEG recordings by use of
HPI coils that continuously emit sinusoidal signals. These signals can then b... | bsd-3-clause |
nanolearningllc/edx-platform-cypress-2 | common/djangoapps/third_party_auth/tests/specs/base.py | 36 | 38777 | """Base integration test for provider implementations."""
import unittest
import json
import mock
from django import test
from django.contrib import auth
from django.contrib.auth import models as auth_models
from django.contrib.messages.storage import fallback
from django.contrib.sessions.backends import cache
from ... | agpl-3.0 |
bratsche/Neutron-Drive | google_appengine/lib/webob_1_1_1/docs/wiki-example-code/example.py | 6 | 5829 | import os
import re
from webob import Request, Response
from webob import exc
from tempita import HTMLTemplate
VIEW_TEMPLATE = HTMLTemplate("""\
<html>
<head>
<title>{{page.title}}</title>
</head>
<body>
<h1>{{page.title}}</h1>
{{if message}}
<div style="background-color: #99f">{{message}}</div>
{{endif}}
<div>{... | bsd-3-clause |
MBoustani/climate | ocw/data_source/esgf.py | 1 | 5050 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 |
peguin40/zulip | zerver/logging_handlers.py | 12 | 3082 | from __future__ import absolute_import
from django.conf import settings
import logging
import traceback
import platform
from django.core import mail
from django.http import HttpRequest
from django.utils.log import AdminEmailHandler
from django.views.debug import ExceptionReporter, get_exception_reporter_filter
from... | apache-2.0 |
Changaco/oh-mainline | vendor/packages/Django/django/test/simple.py | 78 | 13939 | import unittest as real_unittest
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models import get_app, get_apps
from django.test import _doctest as doctest
from django.test.utils import setup_test_environment, teardown_test_environment
from django.test.testcases... | agpl-3.0 |
ptsneves/ardupilot | Tools/ardupilotwaf/gtest.py | 52 | 1267 | #!/usr/bin/env python
# encoding: utf-8
"""
gtest is a Waf tool for test builds in Ardupilot
"""
from waflib import Utils
from waflib.Configure import conf
import boards
def configure(cfg):
cfg.env.HAS_GTEST = False
if cfg.options.disable_tests:
return
board = cfg.get_board()
if isinstance(... | gpl-3.0 |
NickRuiz/wikitrans-pootle | strings.py | 5 | 1461 | # These are some strings that we need for successful extraction. They come from
# Django and is not included in our POT file otherwise. This file itself is not
# used for a running Pootle.
# Don't change any of these strings unless they changed in Django. The adding
# of extra comments to help translators is fine.
_(... | gpl-2.0 |
Embisto/lightblue-0.4 | src/series60/_obex.py | 47 | 4585 | # Copyright (c) 2009 Bea Lam. All rights reserved.
#
# This file is part of LightBlue.
#
# LightBlue 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-3.0 |
kyvinh/home-assistant | homeassistant/components/light/mqtt_template.py | 3 | 10024 | """
Support for MQTT Template lights.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.mqtt_template/
"""
import logging
import voluptuous as vol
import homeassistant.components.mqtt as mqtt
from homeassistant.components.light import (
ATTR_BRI... | apache-2.0 |
inspirehep/invenio-accounts | invenio_accounts/alembic/e12419831262_add_new_columns_on_sessionactivity.py | 3 | 1487 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2017-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Add new columns on SessionActivity."""
import sqlalchemy as sa
from alembic impor... | mit |
nacc/autotest | cli/acl.py | 6 | 7654 | #
# Copyright 2008 Google Inc. All Rights Reserved.
"""
The acl module contains the objects and methods used to
manage ACLs in Autotest.
The valid actions are:
add: adds acl(s), or users or hosts to an ACL
remove: deletes acl(s), or users or hosts from an ACL
list: lists acl(s)
The common options are:
--... | gpl-2.0 |
schemaorg/schemaorg | software/SchemaTerms/example-code/protobufs/google/protobuf/internal/more_messages_pb2.py | 4 | 253271 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/internal/more_messages.proto
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf imp... | apache-2.0 |
slightstone/SickRage | lib/chardet/langthaimodel.py | 2930 | 11275 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.