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 |
|---|---|---|---|---|---|
stephenrjones/geoq | geoq/wsgi.py | 6 | 1108 | # -*- coding: utf-8 -*-
# This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and
# is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012)
"""
WSGI config for geoq project.
This module contains the WSGI application used by Djan... | mit |
flochaz/horizon | openstack_dashboard/dashboards/project/data_processing/data_plugins/tabs.py | 43 | 1536 | # 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 the... | apache-2.0 |
GETLIMS/LIMS-Backend | lims/shared/migrations/0005_auto_20180301_0958.py | 1 | 1248 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2018-03-01 09:58
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shared', '0004_trigger_fire_on_create'),
]
operations = [
migrations.AlterM... | mit |
devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/celery/app/registry.py | 9 | 1748 | # -*- coding: utf-8 -*-
"""
celery.app.registry
~~~~~~~~~~~~~~~~~~~
Registry of available tasks.
"""
from __future__ import absolute_import
import inspect
from importlib import import_module
from celery._state import get_current_app
from celery.exceptions import NotRegistered
from celery.five import it... | agpl-3.0 |
arifsetiawan/edx-platform | cms/envs/devstack.py | 20 | 4027 | """
Specific overrides to the base prod settings to make development easier.
"""
from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import
# Don't use S3 in devstack, fall back to filesystem
del DEFAULT_FILE_STORAGE
MEDIA_ROOT = "/edx/var/edxapp/uploads"
DEBUG = True
USE_I18N = True
TEMPLATE_DEBU... | agpl-3.0 |
Midrya/chromium | third_party/gsutil/gslib/addlhelp/acls.py | 51 | 9472 | # Copyright 2012 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... | bsd-3-clause |
gooddata/openstack-nova | nova/api/openstack/compute/limits.py | 2 | 3505 | # Copyright 2011 OpenStack Foundation
# 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 requ... | apache-2.0 |
gnuhub/intellij-community | python/lib/Lib/site-packages/django/contrib/sitemaps/views.py | 232 | 2084 | from django.http import HttpResponse, Http404
from django.template import loader
from django.contrib.sites.models import get_current_site
from django.core import urlresolvers
from django.utils.encoding import smart_str
from django.core.paginator import EmptyPage, PageNotAnInteger
def index(request, sitemaps, template_... | apache-2.0 |
qualitio/qualitio | qualitio/core/views.py | 1 | 9056 | import operator
from mptt.models import MPTTModel
from reversion.models import Version
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Q
from django.db.models.loading import get_model
from django.views.generic.simple import direct_to_template
from q... | gpl-3.0 |
marado/youtube-dl | youtube_dl/extractor/bilibili.py | 13 | 3153 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
int_or_none,
unified_strdate,
)
class BiliBiliIE(InfoExtractor):
_VALID_URL = r'http://www\.bilibili\.(?:tv|com)/video/av(?P<id>[0-9]+)/'
_TEST = {
'url': 'http://www.bi... | unlicense |
flavour/porto | tests/selenium/scripts/GUI/selectTestsWindow.py | 7 | 1975 | from Tkinter import *
import tkSimpleDialog
class SelectTestWindow(tkSimpleDialog.Dialog):
def __init__(self, parent, module, details):
self.module = module
self.details = details
tkSimpleDialog.Dialog.__init__(self, parent)
def body(self, parent):
self.testList = []
se... | mit |
mmatyas/servo | tests/wpt/update/github.py | 197 | 5152 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import json
from urlparse import urljoin
requests = None
class GitHubError(Exception):
def __init__(self, status, d... | mpl-2.0 |
dhanunjaya/neutron | neutron/tests/api/test_qos.py | 19 | 20618 | # Copyright 2015 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 agre... | apache-2.0 |
afloren/nipype | nipype/interfaces/mrtrix/tests/test_auto_Threshold.py | 9 | 1416 | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.mrtrix.preprocess import Threshold
def test_Threshold_inputs():
input_map = dict(absolute_threshold_value=dict(argstr='-abs %s',
),
args=dict(argstr='%s',
),
debug=dict(argstr='-debu... | bsd-3-clause |
2ndy/RaspIM | usr/lib/python2.6/lib-tk/FileDialog.py | 71 | 8837 | """File selection dialog classes.
Classes:
- FileDialog
- LoadFileDialog
- SaveFileDialog
"""
from Tkinter import *
from Dialog import Dialog
import os
import fnmatch
dialogstates = {}
class FileDialog:
"""Standard file selection dialog -- no checks on selected file.
Usage:
d = FileDialog(ma... | gpl-2.0 |
yuanagain/seniorthesis | venv/lib/python2.7/site-packages/scipy/fftpack/tests/test_import.py | 49 | 1352 | """Test possibility of patching fftpack with pyfftw.
No module source outside of scipy.fftpack should contain an import of
the form `from scipy.fftpack import ...`, so that a simple replacement
of scipy.fftpack by the corresponding fftw interface completely swaps
the two FFT implementations.
Because this simply inspe... | mit |
clarko1/Cramd | endpoints/getting-started/main.py | 10 | 2861 | # 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 |
mancoast/CPythonPyc_test | fail/330_test_api.py | 3 | 7151 | from . import util
import imp
import importlib
from importlib import machinery
import sys
from test import support
import unittest
class ImportModuleTests(unittest.TestCase):
"""Test importlib.import_module."""
def test_module_import(self):
# Test importing a top-level module.
with util.mock... | gpl-3.0 |
ksmit799/Toontown-Source | toontown/minigame/DistributedPatternGameAI.py | 1 | 7498 | from DistributedMinigameAI import *
from toontown.ai.ToonBarrier import *
from direct.fsm import ClassicFSM, State
from direct.fsm import State
import random
import PatternGameGlobals
import copy
class DistributedPatternGameAI(DistributedMinigameAI):
def __init__(self, air, minigameId):
try:
s... | mit |
lnielsen/invenio | invenio/modules/formatter/format_elements/bfe_client_info.py | 29 | 1911 | ## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2009, 2010, 2011 CERN.
##
## Invenio 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 ... | gpl-2.0 |
GitHublong/hue | desktop/core/ext-py/djangosaml2-0.13.0/djangosaml2/views.py | 35 | 14787 | # Copyright (C) 2010-2013 Yaco Sistemas (http://www.yaco.es)
# Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... | apache-2.0 |
wzairix/parameter-framework | test/functional-tests-legacy/PfwTestCase/Types/__init__.py | 20 | 1526 | """
Types Package : All testcases about differents types used in PFW :
- bit block
- boolean
- enum
- FP16_Q0_15 : 16bits Fixed point - 0 integer bits, 15 fractionnal bits
- FP16_Q15_0 : 16bits Fixed point - 15 integer bits, 0 fractionnal bits
- FP16_Q7_8 : 16bits Fixed point - 7 integer bits, 8... | bsd-3-clause |
thnee/ansible | test/units/modules/network/slxos/test_slxos_command.py | 38 | 4734 | #
# (c) 2018 Extreme Networks 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.
#
# Ans... | gpl-3.0 |
NeurodataWithoutBorders/api-python | unittest/t_ref_image.py | 1 | 1592 | #!/usr/bin/python
# import nwb
import test_utils as ut
from nwb import nwb_file
from nwb import nwb_utils as utils
# TESTS storage of reference image
def test_refimage_series():
if __file__.startswith("./"):
fname = "s" + __file__[3:-3] + ".nwb"
else:
fname = "s" + __file__[1:-3] + ".nwb"
... | bsd-3-clause |
hhorak/rebase-helper | test/test_application.py | 1 | 4369 | # -*- coding: utf-8 -*-
#
# This tool helps you to rebase package to the latest version
# Copyright (C) 2013-2014 Red Hat, 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
# he Free Software Foundation; either version 2 ... | gpl-2.0 |
aaltinisik/OCBAltinkaya | addons/account/report/account_general_ledger.py | 39 | 15459 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2005-2006 CamptoCamp
# Copyright (c) 2006-2010 OpenERP S.A
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all po... | agpl-3.0 |
mfraezz/osf.io | addons/forward/tests/test_utils.py | 28 | 1309 | # -*- coding: utf-8 -*-
"""Tests for addons.forward.utils."""
from nose.tools import assert_equal, assert_true, assert_false
import pytest
from tests.base import OsfTestCase
from addons.forward.tests.factories import ForwardSettingsFactory
from addons.forward import utils
pytestmark = pytest.mark.django_db
class T... | apache-2.0 |
wisonwang/django-lfs | lfs/manufacturer/tests.py | 4 | 8581 | # coding: utf-8
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from lfs.catalog.models import Product, Category
from lfs.manufacturer.models import Manufacturer
class ManufacturersTestCase(TestCase):
fixtures = ['lfs_shop.xml']
def se... | bsd-3-clause |
infobloxopen/infoblox-netmri | infoblox_netmri/api/broker/v3_7_0/job_detail_broker.py | 16 | 45926 | from ..broker import Broker
class JobDetailBroker(Broker):
controller = "job_details"
def search(self, **kwargs):
"""Lists the available job details matching the input criteria. This method provides a more flexible search interface than the index method, but searching using this method is more demand... | apache-2.0 |
nzavagli/UnrealPy | UnrealPyEmbed/Source/Python/Lib/python27/test/test_gzip.py | 19 | 11911 | """Test script for the gzip module.
"""
import unittest
from test import test_support
import os
import io
import struct
gzip = test_support.import_module('gzip')
data1 = """ int length=DEFAULTALLOC, err = Z_OK;
PyObject *RetVal;
int flushmode = Z_FINISH;
unsigned long start_total_out;
"""
data2 = """/* zlibm... | mit |
Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/python2.7/encodings/iso8859_2.py | 593 | 13660 | """ Python Character Mapping Codec iso8859_2 generated from 'MAPPINGS/ISO8859/8859-2.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,errors='... | gpl-3.0 |
bgris/ODL_bgris | lib/python3.5/site-packages/html5lib/treebuilders/__init__.py | 1730 | 3405 | """A collection of modules for building different kinds of tree from
HTML documents.
To create a treebuilder for a new type of tree, you need to do
implement several things:
1) A set of classes for various types of elements: Document, Doctype,
Comment, Element. These must implement the interface of
_base.treebuilders... | gpl-3.0 |
gdgellatly/OCB1 | addons/procurement/company.py | 56 | 1531 | # -*- 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 |
ambivalentno/django-rest-framework | tests/test_multitable_inheritance.py | 79 | 2116 | from __future__ import unicode_literals
from django.db import models
from django.test import TestCase
from rest_framework import serializers
from tests.models import RESTFrameworkModel
# Models
class ParentModel(RESTFrameworkModel):
name1 = models.CharField(max_length=100)
class ChildModel(ParentModel):
n... | bsd-2-clause |
dariemp/odoo | addons/website_gengo/__openerp__.py | 385 | 1387 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP S.A. (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the term... | agpl-3.0 |
DANCEcollaborative/forum-xblock | XBlock Integration Files/xdjangobb/xblock/lib/python2.7/site-packages/requests/packages/chardet/langgreekmodel.py | 2763 | 12628 | ######################## 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 |
LordDamionDevil/Lony | lib/requests/adapters.py | 131 | 19727 | # -*- coding: utf-8 -*-
"""
requests.adapters
~~~~~~~~~~~~~~~~~
This module contains the transport adapters that Requests uses to define
and maintain connections.
"""
import os.path
import socket
from .models import Response
from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
from .packages.urllib... | gpl-3.0 |
prasaianooz/pip | pip/_vendor/cachecontrol/controller.py | 317 | 10124 | """
The httplib2 algorithms ported for use with requests.
"""
import re
import calendar
import time
from email.utils import parsedate_tz
from pip._vendor.requests.structures import CaseInsensitiveDict
from .cache import DictCache
from .serialize import Serializer
URI = re.compile(r"^(([^:/?#]+):)?(//([^/?#]*))?([^?... | mit |
xmission/d-note | venv/lib/python2.7/site-packages/jinja2/optimizer.py | 1401 | 2302 | # -*- coding: utf-8 -*-
"""
jinja2.optimizer
~~~~~~~~~~~~~~~~
The jinja optimizer is currently trying to constant fold a few expressions
and modify the AST in place so that it should be easier to evaluate it.
Because the AST does not contain all the scoping information and the
compiler has to ... | agpl-3.0 |
indautgrp/erpnext | erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py | 1 | 5770 | # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt, cint
from erpnext.accounts.report.trial_balance.trial_balance import validate_filters
def exe... | gpl-3.0 |
lycying/seeking | sklib/ui/wysiwyg/syntax.py | 1 | 2930 | # coding:utf-8
#
# Copyright (c) 2010, guo.li <lycying@gmail.com>
# Site < http://code.google.com/p/seeking/ >
# All rights reserved.
# vim: set ft=python sw=2 ts=2 et:
#
from PyQt5.QtGui import QFont
from PyQt5.QtGui import QTextCharFormat
from PyQt5.QtGui import QSyntaxHighlighter
from PyQt5.QtCore import Qt
from Py... | gpl-2.0 |
FlyLu/rt-thread | bsp/w60x/makeimg.py | 3 | 9348 | # -*- coding: utf-8 -*-
import os
import sys
import shutil
import subprocess
import time
import platform
# if debug_info=True, Debugging Print Information will be turned on
debug_info=False
# if make_fal=True, Partition tables are put into firmware
make_fal=False
# Setting firmware output directory
out_path='./Bin'... | apache-2.0 |
etzhou/edx-platform | lms/djangoapps/courseware/features/openended.py | 119 | 2996 | # pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
from lettuce import world, step
from lettuce.django import django_url
from nose.tools import assert_equals, assert_in # pylint: disable=no-name-in-module
from logging import getLogger
logger = getLogger(__name__)
@step('I navigate to an open... | agpl-3.0 |
maniteja123/sympy | sympy/physics/quantum/tests/test_tensorproduct.py | 108 | 3752 | from sympy import I, symbols, Matrix
from sympy.physics.quantum.commutator import Commutator as Comm
from sympy.physics.quantum.tensorproduct import TensorProduct
from sympy.physics.quantum.tensorproduct import TensorProduct as TP
from sympy.physics.quantum.tensorproduct import tensor_product_simp
from sympy.physics.q... | bsd-3-clause |
williamdlees/TRIgS | PlotIdentity.py | 2 | 6306 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
# Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND... | mit |
Galland/rk3x_kernel_3.0.36 | tools/perf/scripts/python/check-perf-trace.py | 11214 | 2503 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... | gpl-2.0 |
40223108/w18 | static/Brython3.1.3-20150514-095342/Lib/_threading_local.py | 923 | 7410 | """Thread-local objects.
(Note that this module provides a Python version of the threading.local
class. Depending on the version of Python you're using, there may be a
faster one available. You should always import the `local` class from
`threading`.)
Thread-local objects support the management of thread-local d... | gpl-3.0 |
nheijmans/random_scripts | mock_http_server/http_https_server.py | 1 | 1185 | # given a pem file ... openssl req -new -x509 -keyout yourpemfile.pem -out yourpemfile.pem -days 365 -nodes
import sys
import ssl
import time
import signal
import threading
import BaseHTTPServer, SimpleHTTPServer
def http_worker():
httpd = BaseHTTPServer.HTTPServer(('localhost', 8080), SimpleHTTPServer.SimpleHTTP... | gpl-3.0 |
joachimmetz/plaso | tests/parsers/sqlite_plugins/mac_notificationcenter.py | 3 | 2445 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the MacOS Notification Center plugin."""
import unittest
from plaso.lib import definitions
from plaso.parsers.sqlite_plugins import mac_notificationcenter
from tests.parsers.sqlite_plugins import test_lib
class MacNotificationCenterTest(test_lib.SQLitePlu... | apache-2.0 |
switowski/invenio | invenio/testsuite/test_utils_hepdata.py | 13 | 22615 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2008, 2009, 2010, 2011, 2015 CERN.
#
# Invenio 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 (a... | gpl-2.0 |
Tejeshwarabm/Westwood | src/fd-net-device/bindings/modulegen__gcc_ILP32.py | 19 | 334168 | 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 |
boazjohn/pyspark-job-server | lib/receiver.py | 1 | 8167 | #!/usr/bin/python
# Standard Library
import json
import time
import logging
import socket
from threading import Thread, Lock
# Third Party
# Local
# set up logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
class EventBroadcastReceiver:
def __init__(self, host='localhost',... | bsd-3-clause |
y12uc231/edx-platform | common/lib/xmodule/xmodule/tests/test_tabs.py | 18 | 29491 | """Tests for Tab classes"""
from mock import MagicMock
import xmodule.tabs as tabs
import unittest
from opaque_keys.edx.locations import SlashSeparatedCourseKey
class TabTestCase(unittest.TestCase):
"""Base class for Tab-related test cases."""
def setUp(self):
super(TabTestCase, self).setUp()
... | agpl-3.0 |
Antiun/odoomrp-wip | product_attribute_types_views/__openerp__.py | 27 | 1568 | # -*- encoding: utf-8 -*-
##############################################################################
#
# 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... | agpl-3.0 |
AvadootNachankar/gstudio | gnowsys-ndf/gnowsys_ndf/ndf/views/data_review.py | 2 | 15718 | ''' -- Imports from python libraries -- '''
# import os, re
import json
''' -- imports from installed packages -- '''
from django.http import HttpResponse
from django.shortcuts import render_to_response # , render #uncomment when to use
from django.template import RequestContext
from django.contrib.auth.decorators i... | agpl-3.0 |
NcLang/vimrc | sources_non_forked/YouCompleteMe/third_party/ycmd/ycmd/tests/typescript/get_completions_test.py | 4 | 6559 | # Copyright (C) 2015 ycmd contributors
#
# This file is part of ycmd.
#
# ycmd 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.
#
# ycmd... | mit |
RakanNimer/hackathon | main.py | 1 | 1342 | from flask import Flask
import flask
from reddit import Submissions
from reddit import Submission
import redis
import json
try:
from flask.ext.cors import CORS # The typical way to import flask-cors
except ImportError:
# Path hack allows examples to be run without installation.
import os
parentdir = o... | mit |
netzimme/mbed-os | tools/host_tests/host_tests_plugins/module_copy_firefox.py | 128 | 2907 | """
mbed SDK
Copyright (c) 2011-2013 ARM Limited
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 wr... | apache-2.0 |
xhochy/g-octave | g_octave/config.py | 1 | 2924 | # -*- coding: utf-8 -*-
"""
g_octave.config
~~~~~~~~~~~~~~~
This module implements a Python object to handle the configuration
of g-octave.
:copyright: (c) 2009-2010 by Rafael Goncalves Martins
:license: GPL-2, see LICENSE for more details.
"""
from __future__ import absolute_import
import o... | gpl-2.0 |
technologiescollege/s2a_fr | s2a/Python/Lib/test/test_hotshot.py | 122 | 4990 | import os
import pprint
import unittest
import tempfile
import _hotshot
import gc
from test import test_support
# Silence Py3k warning
hotshot = test_support.import_module('hotshot', deprecated=True)
from hotshot.log import ENTER, EXIT, LINE
from hotshot import stats
def shortfilename(fn):
# We use a really sho... | gpl-3.0 |
wyc/django | django/db/backends/base/operations.py | 192 | 22514 | import datetime
import decimal
import warnings
from importlib import import_module
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.backends import utils
from django.utils import six, timezone
from django.utils.dateparse import parse_duration
from django.utils.dep... | bsd-3-clause |
dtsd/zte_blade_s6_lollipop_kernel | tools/perf/scripts/python/event_analyzing_sample.py | 4719 | 7393 | # event_analyzing_sample.py: general event handler in python
#
# Current perf report is already very powerful with the annotation integrated,
# and this script is not trying to be as powerful as perf report, but
# providing end user/developer a flexible way to analyze the events other
# than trace points.
#
# The 2 dat... | gpl-2.0 |
banesullivan/ParaViewGeophysics | PVGeo/ubc/tensor.py | 1 | 21910 | __all__ = [
'TensorMeshReader',
'TensorMeshAppender',
'TopoMeshAppender',
]
__displayname__ = 'Tensor Mesh'
import os
import sys
import numpy as np
import pandas as pd
import vtk
from .. import _helpers, interface
from ..base import AlgorithmBase
from .two_file_base import ModelAppenderBase, ubcMeshRead... | bsd-3-clause |
ptitjes/quodlibet | quodlibet/ext/songsmenu/replaygain.py | 2 | 22062 | # ReplayGain Album Analysis using gstreamer rganalysis element
# Copyright (C) 2005,2007,2009 Michael Urman
# 2012,2014,2016 Nick Boultbee
# 2013 Christoph Reiter
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU... | gpl-2.0 |
Nettacker/Nettacker | lib/transactions/maltego/nettacker_transforms/src/nettacker_transforms/transforms/wp_xmlrpc_dos_vuln.py | 1 | 1880 | import random
from canari.maltego.transform import Transform
from canari.maltego.entities import URL
from canari.framework import EnableDebugWindow
from common.entities import NettackerScan
from lib.scan.wp_xmlrpc.engine import start
from database.db import __logs_by_scan_id as find_log
__author__ = 'Shaddy Garg'
_... | gpl-3.0 |
andrius-preimantas/odoo | addons/resource/tests/test_resource.py | 243 | 32181 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 |
lastship/plugin.video.lastship | resources/lib/modules/utils.py | 2 | 2686 | # -*- coding: UTF-8 -*-
"""
Lastship Add-on (C) 2019
Credits to Placenta and Covenant; our thanks go to their creators
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 vers... | gpl-3.0 |
fldc/CouchPotatoServer | couchpotato/core/notifications/synoindex.py | 75 | 1650 | import os
import subprocess
from couchpotato.api import addApiView
from couchpotato.core.event import addEvent
from couchpotato.core.logger import CPLog
from couchpotato.core.notifications.base import Notification
log = CPLog(__name__)
autoload = 'Synoindex'
class Synoindex(Notification):
index_path = '/usr/... | gpl-3.0 |
aps-sids/zulip | analytics/management/commands/analyze_user_activity.py | 114 | 2417 | from __future__ import absolute_import
from zerver.lib.statistics import seconds_usage_between
from optparse import make_option
from django.core.management.base import BaseCommand
from zerver.models import UserProfile
import datetime
from django.utils.timezone import utc
def analyze_activity(options):
day_start ... | apache-2.0 |
maxwward/SCOPEBak | askbot/migrations/0150_auto__add_field_post_new_summary.py | 2 | 34228 | # -*- 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 'Post.new_summary'
db.add_column('askbot_post', 'new_summary',
self.gf(... | gpl-3.0 |
azurestandard/django | tests/regressiontests/generic_inline_admin/tests.py | 8 | 17001 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.conf import settings
from django.contrib import admin
from django.contrib.admin.sites import AdminSite
from django.contrib.contenttypes.generic import (
generic_inlineformset_factory, GenericTabularInline)
from django.form... | bsd-3-clause |
hanw/kubernetes | hack/lookup_pull.py | 368 | 1319 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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
#
# Unle... | apache-2.0 |
chengjf/database-interface-doc-management | flask-demo/flask/Lib/site-packages/sqlalchemy/sql/crud.py | 39 | 19284 | # sql/crud.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Functions used by compiler.py to determine the parameters rendered
within INSERT and ... | apache-2.0 |
Gabrielcarvfer/NS3 | utils/tests/TestBase.py | 4 | 5476 | #! /usr/bin/env python3
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
#
# Copyright (c) 2014 Siddharth Santurkar
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Soft... | gpl-2.0 |
tamland/actors | setup.py | 2 | 1395 | from setuptools import setup
install_requires = ['six']
long_description = ""
with open('README.rst') as f:
long_description += f.read()
with open('HISTORY.rst') as f:
long_description += f.read()
setup(
name='actors',
version='0.5.1b1',
author='Thomas Amland',
author_email='thomas.amland@g... | gpl-3.0 |
rosmo/ansible | lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py | 44 | 14083 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 |
skoslowski/gnuradio | gnuradio-runtime/examples/mp-sched/affinity_set.py | 10 | 2631 | #!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: Affinity Set Test
##################################################
from __future__ import print_function
from __future__ import unicode_literals
from gnuradio import eng_notation
from gnuradio import gr
fro... | gpl-3.0 |
xmichael/tagger | src/main/lib/logtool.py | 1 | 1546 | ## Just some utility functions for logging messages. Most important is getLogger.
import sys, pprint, json, logging, configuration
### Constants ###
#################
## Can only log in stderr (or environ['wsgi.errors']) when using WSGI:
def dbg(msg):
print >> sys.stderr, msg
def pp(obj):
"""
shortcut ... | bsd-3-clause |
912/M-new | virtualenvironment/experimental/lib/python2.7/site-packages/pip/_vendor/html5lib/tokenizer.py | 1710 | 76929 | from __future__ import absolute_import, division, unicode_literals
try:
chr = unichr # flake8: noqa
except NameError:
pass
from collections import deque
from .constants import spaceCharacters
from .constants import entities
from .constants import asciiLetters, asciiUpper2Lower
from .constants import digits, ... | gpl-2.0 |
impedimentToProgress/Ratchet | llvm/bindings/python/llvm/tests/test_core.py | 97 | 4675 | from .base import TestBase
from ..core import MemoryBuffer
from ..core import PassRegistry
from ..core import Context
from ..core import Module
from ..core import Enums
from ..core import OpCode
from ..bit_reader import parse_bitcode
class TestCore(TestBase):
def test_enumerations(self):
for enum_cls, enum... | mit |
surligas/gnuradio | gr-channels/python/channels/iqbal_gen.py | 53 | 2550 | #!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: IQ Imbalance Generator
# Author: mettus
# Generated: Thu Aug 1 12:08:07 2013
##################################################
from gnuradio import blocks
from gnuradio import gr
from gnuradio.filter import... | gpl-3.0 |
BhallaLab/moose-full | moose-core/tests/python/neuroml/CA1.py | 2 | 1046 | ## Aditya Gilra, NCBS, Bangalore, 2012
## Dilawar Singh, NCBS, 2015
import os
os.environ['NUMPTHREADS'] = '1'
import sys
sys.path.append('../../../python/')
import moose
from moose.utils import *
import moose.utils as mu
import count
import numpy as np
from moose.neuroml.NeuroML import NeuroML
import unittest
simdt... | gpl-2.0 |
jseabold/scikit-learn | sklearn/feature_selection/rfe.py | 4 | 15662 | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Vincent Michel <vincent.michel@inria.fr>
# Gilles Louppe <g.louppe@gmail.com>
#
# License: BSD 3 clause
"""Recursive feature elimination for feature ranking"""
import numpy as np
from ..utils import check_X_y, safe_sqr
from ..utils.metaes... | bsd-3-clause |
mdietrichc2c/OCB | openerp/addons/base/ir/ir_filters.py | 99 | 8757 | # -*- 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 |
Labbiness/Pancake | setup.py | 1 | 1437 | # -*- encoding:utf-8 -*-
#
# Copyright (c) 2017-2018 Shota Shimazu
#
# 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 ap... | apache-2.0 |
chauhanhardik/populo_2 | lms/djangoapps/instructor/management/commands/openended_post.py | 86 | 4626 | """
Command to manually re-post open ended submissions to the grader.
"""
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand
from optparse import make_option
from xmodule.modulestore.django import modulestore
from opaque_keys.edx.locations import SlashSeparatedCourseKey
fro... | agpl-3.0 |
ktsaou/netdata | collectors/python.d.plugin/python_modules/pyyaml2/error.py | 4 | 2590 | # SPDX-License-Identifier: MIT
__all__ = ['Mark', 'YAMLError', 'MarkedYAMLError']
class Mark(object):
def __init__(self, name, index, line, column, buffer, pointer):
self.name = name
self.index = index
self.line = line
self.column = column
self.buffer = buffer
self... | gpl-3.0 |
ciarams87/PyU4V | PyU4V/tools/openstack/migrate.py | 1 | 7265 | # Copyright (c) 2020 Dell Inc. or its subsidiaries.
#
# 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... | mit |
huahbo/src | pens/scripts/tkvpconvert.py | 4 | 4695 | #!/usr/bin/env python
'''GUI for vpconvert'''
## Copyright (C) 2012 University of Texas at Austin
##
## 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... | gpl-2.0 |
Rav3nPL/polcoin | qa/rpc-tests/forknotify.py | 126 | 2105 | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test -alertnotify
#
from test_framework.test_framework import BitcoinTestFramework
from test_framework.u... | mit |
mailgun/talon | talon/signature/learning/helpers.py | 1 | 6879 | # -*- coding: utf-8 -*-
""" The module provides:
* functions used when evaluating signature's features
* regexp's constants used when evaluating signature's features
"""
from __future__ import absolute_import
import unicodedata
import regex as re
from talon.utils import to_unicode
from talon.signature.constants im... | apache-2.0 |
mshafiq9/django | tests/template_tests/filter_tests/test_join.py | 362 | 2707 | from django.template.defaultfilters import join
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class JoinTests(SimpleTestCase):
@setup({'join01': '{{ a|join:", " }}'})
def test_join01(self):
output = self.engine.render_to_string('join01... | bsd-3-clause |
foospidy/DbDat | plugins/mysql/check_user_access_denied.py | 1 | 2424 | import ConfigParser
import os.path
class check_user_access_denied():
"""
check_user_access_denied:
Access denied events for user, these should be reviewed for malicious activity.
"""
# References:
# https://www.percona.com/blog/2012/12/28/auditing-login-attempts-in-mysql/
TITLE = 'User... | gpl-2.0 |
raychorn/knowu | django/djangononrelsample2/django/contrib/auth/tests/forms.py | 94 | 15172 | from __future__ import unicode_literals
import os
from django.contrib.auth.models import User
from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm,
PasswordChangeForm, SetPasswordForm, UserChangeForm, PasswordResetForm,
ReadOnlyPasswordHashWidget)
from django.contrib.auth.tests.utils imp... | lgpl-3.0 |
sherazkasi/SabreSoftware | Lib/distutils/command/install_data.py | 251 | 2845 | """distutils.command.install_data
Implements the Distutils 'install_data' command, for installing
platform-independent data files."""
# contributed by Bastian Kleineidam
__revision__ = "$Id$"
import os
from distutils.core import Command
from distutils.util import change_root, convert_path
class install_data(Comman... | gpl-3.0 |
kobronson/cs-voltdb | tests/scripts/examples/sql_coverage/strings-schema.py | 1 | 1798 | #!/usr/bin/env python
# This file is part of VoltDB.
# Copyright (C) 2008-2013 VoltDB 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 limitati... | agpl-3.0 |
rfleschenberg/django-shop-rest-checkout | docs/conf.py | 1 | 1474 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.ifconfig',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext... | bsd-2-clause |
yd0str/infernal-twin | build/pip/build/lib.linux-i686-2.7/pip/_vendor/six.py | 878 | 29664 | """Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2015 Benjamin Peterson
#
# 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 with... | gpl-3.0 |
fangxingli/hue | apps/jobsub/src/jobsub/conf.py | 36 | 1341 | #!/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 |
andreif/django | django/contrib/gis/db/backends/mysql/operations.py | 12 | 2873 | from django.contrib.gis.db.backends.base.adapter import WKTAdapter
from django.contrib.gis.db.backends.base.operations import \
BaseSpatialOperations
from django.contrib.gis.db.backends.utils import SpatialOperator
from django.contrib.gis.db.models import aggregates
from django.db.backends.mysql.operations import D... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.