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 |
|---|---|---|---|---|---|
oasis-open/cti-pattern-validator | setup.py | 1 | 1795 | #!/usr/bin/env python
from setuptools import find_packages, setup
with open('README.rst') as f:
readme = f.read()
doc_requires = [
'sphinx',
'sphinx-prompt',
]
test_requires = [
'coverage',
'pytest',
'pytest-cov',
]
dev_requires = doc_requires + test_requires + [
'bumpversion',
'che... | bsd-3-clause |
zerc/django | tests/flatpages_tests/test_forms.py | 155 | 4568 | from __future__ import unicode_literals
from django.conf import settings
from django.contrib.flatpages.forms import FlatpageForm
from django.contrib.flatpages.models import FlatPage
from django.contrib.sites.models import Site
from django.test import TestCase, modify_settings, override_settings
from django.utils impor... | bsd-3-clause |
Bysmyyr/chromium-crosswalk | tools/usb_gadget/gadget_test.py | 37 | 12748 | #!/usr/bin/python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
import uuid
import mock
import gadget
import usb_constants
import usb_descriptors
device_desc = usb_descriptors.DeviceD... | bsd-3-clause |
alpodrezov/ordering_lunch | xavchik/settings.py | 1 | 2241 | """
Django settings for xavchik project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
im... | unlicense |
splotz90/urh | src/urh/signalprocessing/SimulatorItem.py | 1 | 2278 | class SimulatorItem(object):
protocol_manager = None
expression_parser = None
def __init__(self):
self.__parentItem = None
self.__childItems = []
self.logging_active = True
self.is_valid = True
def check(self):
return True
def get_pos(self):
if self... | gpl-3.0 |
dgladkov/django | django/utils/dates.py | 590 | 2296 | "Commonly-used date structures"
from django.utils.translation import pgettext_lazy, ugettext_lazy as _
WEEKDAYS = {
0: _('Monday'), 1: _('Tuesday'), 2: _('Wednesday'), 3: _('Thursday'), 4: _('Friday'),
5: _('Saturday'), 6: _('Sunday')
}
WEEKDAYS_ABBR = {
0: _('Mon'), 1: _('Tue'), 2: _('Wed'), 3: _('Thu'),... | bsd-3-clause |
kawamon/hue | desktop/core/ext-py/Django-1.11.29/django/core/serializers/pyyaml.py | 51 | 2844 | """
YAML serializer.
Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__.
"""
import collections
import decimal
import sys
from io import StringIO
import yaml
from django.core.serializers.base import DeserializationError
from django.core.serializers.python import (
Deserializer as PythonDes... | apache-2.0 |
freedomofpress/securedrop | securedrop/alembic/versions/e0a525cbab83_add_column_to_track_source_deletion_of_.py | 2 | 2076 | """add column to track source deletion of replies
Revision ID: e0a525cbab83
Revises: 2d0ce3ee5bdc
Create Date: 2018-08-02 00:07:59.242510
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "e0a525cbab83"
down_revision = "2d0ce3ee5bdc"
branch_labels = None
depends_... | agpl-3.0 |
beblount/Steer-Clear-Backend-Web | env/Lib/site-packages/sqlalchemy/event/base.py | 60 | 9540 | # event/base.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
"""Base implementation classes.
The public-facing ``Events`` serves as the base class... | mit |
shsingh/ansible | lib/ansible/modules/network/sros/sros_config.py | 6 | 11718 | #!/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 |
dhruvsrivastava/OJ | flask/lib/python2.7/site-packages/flask/testsuite/signals.py | 554 | 4807 | # -*- coding: utf-8 -*-
"""
flask.testsuite.signals
~~~~~~~~~~~~~~~~~~~~~~~
Signalling.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import unittest
from flask.testsuite import FlaskTestCase
class SignalsTestCase(FlaskTestCase):
def ... | bsd-3-clause |
bks7/mzbench | lib/mzbench_api_client.py | 2 | 6734 |
from urllib import urlencode
import json
import os
import sys
import requests
import multipart
class MZBenchAPIException(Exception):
pass
def start(host, script_file, script_content,
node_commit = None, nodes = None, deallocate_after_bench = None,
provision_nodes = None, exclusive_node_usage ... | bsd-3-clause |
zalf-lsa/monica | installer/Hohenfinow2/python/run-producer.py | 1 | 2337 | #!/usr/bin/python
# -*- coding: UTF-8
# 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/. */
# Authors:
# Michael Berg-Mohnicke <michael.berg@zalf.de>
#
# Maintainers:
# C... | mpl-2.0 |
veger/ansible | test/units/modules/network/slxos/test_slxos_l3_interface.py | 30 | 3426 | #
# (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 |
valtech-mooc/edx-platform | cms/djangoapps/contentstore/tests/test_course_settings.py | 17 | 49152 | """
Tests for Studio Course Settings.
"""
import datetime
import json
import copy
import mock
from mock import patch
import unittest
from django.utils.timezone import UTC
from django.test.utils import override_settings
from django.conf import settings
from models.settings.course_details import (CourseDetails, CourseS... | agpl-3.0 |
mavit/ansible | test/units/modules/network/nxos/test_nxos_nxapi.py | 12 | 3065 | # (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 |
sudosurootdev/external_chromium_org | tools/telemetry/telemetry/unittest/decorators_unittest.py | 69 | 1511 | # 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 unittest
from telemetry import decorators
_counter = 0
class Foo(object):
@decorators.Cache
def GetCountCached(self, _):
global _counter
... | bsd-3-clause |
cmelange/ansible | lib/ansible/modules/cloud/ovirt/ovirt_nics.py | 5 | 7994 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (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
#... | gpl-3.0 |
3nids/QGIS | tests/src/python/test_qgsmaprenderercache.py | 18 | 13383 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsMapRendererCache.
.. 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 |
svirusxxx/cjdns | node_build/dependencies/libuv/build/gyp/test/mac/gyptest-action-envvars.py | 100 | 1073 | #!/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.
"""
Verifies that env vars work with actions, with relative directory paths.
"""
import TestGyp
import sys
if sys.platform == 'darwin':
... | gpl-3.0 |
aimas/TuniErp-8.0 | openerp/osv/expression.py | 65 | 57592 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 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 |
JacobFischer/Joueur.py | games/anarchy/building.py | 1 | 3963 | # Building: A basic building. It does nothing besides burn down. Other Buildings inherit from this class.
# DO NOT MODIFY THIS FILE
# Never try to directly create an instance of this class, or modify its member variables.
# Instead, you should only be reading its variables and calling its functions.
from games.anarch... | mit |
gento/dionaea | modules/python/scripts/pptp/include/packets.py | 1 | 4630 | #********************************************************************************
#* Dionaea
#* - catches bugs -
#*
#*
#*
#* Copyright (C) 2015 Tan Kean Siong
#*
#* This program is free software; you can redistribute it and/or
#* modify it under the terms of the... | gpl-2.0 |
MillerDix/NEChromeX | flaskTest/venv/lib/python2.7/site-packages/pip/utils/appdirs.py | 340 | 8811 | """
This code was taken from https://github.com/ActiveState/appdirs and modified
to suit our purposes.
"""
from __future__ import absolute_import
import os
import sys
from pip.compat import WINDOWS, expanduser
from pip._vendor.six import PY2, text_type
def user_cache_dir(appname):
r"""
Return full path to t... | mit |
rcmorano/gecosws-config-assistant | firstboot_lib/FirstbootEntry.py | 2 | 1362 |
import os
import types
import firstbootconfig
import firstboot.pages
from xdg.IniFile import *
class FirstbootEntry(IniFile):
default_group = 'Firstboot Entry'
def __init__(self):
self.content = dict()
self.config_path = '/var/lib/firstboot'
self.config_file = os.path.join(self.con... | gpl-2.0 |
dmilith/SublimeText3-dmilith | Packages/pyte/all/pyte/graphics.py | 1 | 3441 | # -*- coding: utf-8 -*-
"""
pyte.graphics
~~~~~~~~~~~~~
This module defines graphic-related constants, mostly taken from
:manpage:`console_codes(4)` and
http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html.
:copyright: (c) 2011-2012 by Selectel.
:copyright: (c) 2012-2017 by pyte ... | mit |
gisce/OCB | addons/account_chart/__init__.py | 526 | 1055 | # -*- 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 |
BrainTech/openbci | obci/logic/logic_speller_peer.py | 1 | 1099 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author:
# Mateusz Kruszyński <mateusz.kruszynski@gmail.com>
#
import time
from obci.utils import tags_helper
from multiplexer.multiplexer_constants import peers, types
from obci.logic import logic_helper
from obci.logic.logic_decision_peer import LogicDecision
from ob... | gpl-3.0 |
ethanbao/artman | artman/pipelines/core_generation.py | 1 | 2951 | # 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 agree... | apache-2.0 |
dbiesecke/dbiesecke.github.io | repo/script.module.urlresolver/lib/urlresolver/plugins/waaw.py | 2 | 6528 | '''
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,
but WITHOUT... | mit |
aleksandra-tarkowska/django | django/contrib/gis/db/backends/oracle/models.py | 86 | 2268 | """
The GeometryColumns and SpatialRefSys models for the Oracle spatial
backend.
It should be noted that Oracle Spatial does not have database tables
named according to the OGC standard, so the closest analogs are used.
For example, the `USER_SDO_GEOM_METADATA` is used for the GeometryColumns
model and the `SDO_... | bsd-3-clause |
jcpowermac/ansible | lib/ansible/modules/cloud/vmware/vmware_maintenancemode.py | 10 | 6537 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, VMware, Inc.
# Copyright: (c) 2018, 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 = {
... | gpl-3.0 |
vrv/tensorflow | tensorflow/contrib/cloud/python/ops/bigquery_reader_ops_test.py | 26 | 9667 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
Universal-Model-Converter/UMC3.0a | data/Python/x86/Lib/lib2to3/tests/test_util.py | 126 | 21245 | """ Test suite for the code in fixer_util """
# Testing imports
from . import support
# Python imports
import os.path
# Local imports
from lib2to3.pytree import Node, Leaf
from lib2to3 import fixer_util
from lib2to3.fixer_util import Attr, Name, Call, Comma
from lib2to3.pgen2 import token
def parse(code, strip_leve... | mit |
calamityman/ansible-modules-extras | database/postgresql/postgresql_ext.py | 26 | 5791 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#... | gpl-3.0 |
kevinsung/OpenFermion | src/openfermion/utils/_testing_utils.py | 1 | 13228 | # 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
# distribu... | apache-2.0 |
DragonQuiz/MCEdit-Unified | albow/extended_widgets.py | 2 | 10322 | # -*- coding: UTF-8 -*-
# extended_widgets.py
# Moved albow related stuff from mceutils.
import resource_packs
from controls import ValueDisplay
from dialogs import alert, ask, Dialog
from controls import Button, Label, ValueButton, CheckBox, AttrRef
from widget import Widget
import root
from layout import Column, Row
... | isc |
kdart/pycopia | core/pycopia/stringmatch.py | 1 | 4548 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
... | apache-2.0 |
maas/python-libmaas | maas/client/utils/multipart.py | 3 | 6112 | # Copyright 2016-2017 Canonical 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 agreed to in wr... | agpl-3.0 |
transition-robotics/paparazzi | sw/tools/tcp_aircraft_server/tcp_aircraft_server.py | 46 | 2721 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#Copyright 2014, Antoine Drouin
from __future__ import print_function
import logging, base64, socket
from gi.repository import GLib, GObject
import ivy.ivy as ivy
ivylogger = logging.getLogger('Ivy')
ivylogger.setLevel(logging.CRITICAL)
import phoenix.messages
import pho... | gpl-2.0 |
jishnu7/silpa | src/silpa/common/urlrelay.py | 3 | 12299 | # Copyright (c) 2006-2008 L. C. Rees
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of c... | agpl-3.0 |
Microvellum/Fluid-Designer | win64-vc/2.78/Python/bin/2.78/scripts/addons/add_curve_sapling/presets/callistemon.py | 2 | 2255 | {'handleType': '0', 'rotate': (99.5, 137.5, 137.5, 137.5), 'baseSize_s': 0.1600000560283661, 'af2': 1.0, 'pruneRatio': 0.75, 'radiusTweak': (1.0, 1.0, 1.0, 1.0), 'pruneWidthPeak': 0.5, 'boneStep': (1, 1, 1, 1), 'nrings': 0, 'leafScale': 0.4000000059604645, 'makeMesh': False, 'baseSize': 0.30000001192092896, 'lengthV': ... | gpl-3.0 |
openvapour/ryu | ryu/contrib/ovs/db/schema.py | 50 | 10545 | # Copyright (c) 2009, 2010, 2011 Nicira, 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 |
2014c2g2/2014c2 | wsgi/static/Brython2.1.0-20140419-113919/Lib/_thread.py | 740 | 4879 | """Drop-in replacement for the thread module.
Meant to be used as a brain-dead substitute so that threaded code does
not need to be rewritten for when the thread module is not present.
Suggested usage is::
try:
import _thread
except ImportError:
import _dummy_thread as _thread
"""
# Exports ... | gpl-2.0 |
germanovm/vdsm | vdsm/v2v.py | 1 | 26018 | # Copyright 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the ... | gpl-2.0 |
kwilliams-mo/iris | lib/iris/tests/test_util.py | 1 | 13481 | # (C) British Crown Copyright 2010 - 2013, Met Office
#
# This file is part of Iris.
#
# Iris 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 the License, or
# (at your option) any l... | gpl-3.0 |
sodastsai/depot-pm | depot_pm/check.py | 2 | 1433 | #
# Copyright 2015 sodastsai
#
# 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, ... | apache-2.0 |
blooparksystems/odoo | openerp/tools/amount_to_text_en.py | 50 | 4147 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from translate import _
_logger = logging.getLogger(__name__)
#-------------------------------------------------------------
#ENGLISH
#-------------------------------------------------------------
to_19... | gpl-3.0 |
omriabnd/UCCA-App | Server/uccaApp/models/Users.py | 1 | 1828 | from datetime import datetime
from rest_framework.exceptions import ValidationError
from uccaApp.models import Tabs, Constants, Roles
from django.db import models
from django.contrib.auth.models import User, Group
class Users(models.Model):
id = models.AutoField(primary_key=True)
user_auth = models.OneToOn... | gpl-3.0 |
jammerful/buildbot | master/buildbot/statistics/__init__.py | 17 | 1857 | # This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 |
wweiradio/django | django/contrib/admin/models.py | 90 | 3131 | from __future__ import unicode_literals
from django.conf import settings
from django.contrib.admin.utils import quote
from django.contrib.contenttypes.models import ContentType
from django.core.urlresolvers import NoReverseMatch, reverse
from django.db import models
from django.utils.encoding import python_2_unicode_c... | bsd-3-clause |
skosukhin/spack | lib/spack/spack/cmd/compiler.py | 1 | 7883 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 |
malefice/django-websocket-redis | ws4redis/settings.py | 6 | 2037 | # -*- coding: utf-8 -*-
from django.conf import settings
WEBSOCKET_URL = getattr(settings, 'WEBSOCKET_URL', '/ws/')
WS4REDIS_CONNECTION = getattr(settings, 'WS4REDIS_CONNECTION', {
'host': 'localhost',
'port': 6379,
'db': 0,
'password': None,
})
"""
A string to prefix elements in the Redis datastore,... | mit |
jasco/WeasyPrint | weasyprint/tests/test_layout.py | 4 | 177892 | # coding: utf8
"""
weasyprint.tests.layout
-----------------------
Tests for layout, ie. positioning and dimensioning of boxes,
line breaks, page breaks.
:copyright: Copyright 2011-2014 Simon Sapin and contributors, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ imp... | bsd-3-clause |
yunque/sms-tools | lectures/03-Fourier-properties/plots-code/symmetry-real-even.py | 26 | 1150 | import matplotlib.pyplot as plt
import numpy as np
import sys
import math
from scipy.signal import triang
from scipy.fftpack import fft, fftshift
M = 127
N = 128
hM1 = int(math.floor((M+1)/2))
hM2 = int(math.floor(M/2))
x = triang(M)
fftbuffer = np.zeros(N)
fftbuffer[:hM1] = x[hM2:]
fftbuffer[N-hM2:] = x[:hM2]
X =... | agpl-3.0 |
brianwrf/mongo-python-driver | tools/benchmark.py | 18 | 5936 | # Copyright 2009-2015 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | apache-2.0 |
Amechi101/concepteur-market-app | venv/lib/python2.7/site-packages/django/contrib/admindocs/utils.py | 216 | 3801 | "Misc. utility functions/classes for admin documentation generator."
import re
from email.parser import HeaderParser
from email.errors import HeaderParseError
from django.utils.safestring import mark_safe
from django.core.urlresolvers import reverse
from django.utils.encoding import force_bytes
try:
import docuti... | mit |
michaelld/gnuradio | gr-blocks/python/blocks/qa_multiply_conjugate.py | 7 | 1914 | #!/usr/bin/env python
#
# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your optio... | gpl-3.0 |
DG-i/openshift-ansible | playbooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py | 35 | 5312 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Ansible module for modifying OpenShift configs during an upgrade"""
import os
import yaml
DOCUMENTATION = '''
---
module: openshift_upgrade_config
short_description: OpenShift Upgrade Config
author: Jason DeTiberus
requirements: [ ]
'''
EXAMPLES = '''
'''
def modify_api_... | apache-2.0 |
380wmda999/sphinx2.2.11-string-4G | api/sphinxapi.py | 1 | 35093 | #
# $Id$
#
# Python version of Sphinx searchd client (Python API)
#
# Copyright (c) 2006, Mike Osadnik
# Copyright (c) 2006-2016, Andrew Aksyonoff
# Copyright (c) 2008-2016, Sphinx Technologies Inc
# All rights reserved
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the... | gpl-2.0 |
masamichi/bite-project | deps/mrtaskman/server/mapreduce/lib/graphy/common.py | 77 | 14637 | #!/usr/bin/env python
#
# Copyright 2008 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 |
andrewmoses/ssquiz | flask/lib/python2.7/site-packages/openid/store/interface.py | 180 | 7083 | """
This module contains the definition of the C{L{OpenIDStore}}
interface.
"""
class OpenIDStore(object):
"""
This is the interface for the store objects the OpenID library
uses. It is a single class that provides all of the persistence
mechanisms that the OpenID library needs, for both servers and
... | bsd-3-clause |
ZhangXinNan/tensorflow | tensorflow/contrib/distributions/python/ops/conditional_transformed_distribution.py | 39 | 11189 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
nurnbeck/project-2-CMPUT-291 | ret_DATA.py | 1 | 1814 | import os
import time
import bsddb3 as bsddb
'''
Retrieve records with a given data
- Assume that database is closed before calling ret_DATA();
- Writes (append) the result to the file 'answers'.
For now I assume that indexfile = btree, further tests are necessary.
Tested under DB_SIZE = 10
'''
DB_FILE = "/tmp/yish... | mit |
mspark93/VTK | Rendering/Core/Testing/Python/TestCameraInterpolator.py | 20 | 3316 | #!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
lut = vtk.vtkLookupTable()
lut.SetHueRange(0.6, 0)
lut.SetSaturationRange(1.0, 0)
lut.SetValueRange(0.5, 1.0)
# Read the data: a height field results
demReader = vtk.vtkDEMReader()
d... | bsd-3-clause |
liberorbis/libernext | apps/frappe/frappe/website/context.py | 17 | 2811 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.website.doctype.website_settings.website_settings import get_website_settings
from frappe.website.template import render_blocks
from frappe.website.r... | gpl-2.0 |
TheTypoMaster/asuswrt | release/src/router/samba-3.5.8/source4/scripting/python/samba/idmap.py | 23 | 2430 | #!/usr/bin/python
# Unix SMB/CIFS implementation.
# Copyright (C) 2008 Kai Blin <kai@samba.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 3 of the License, or
# (at you... | gpl-2.0 |
crosswalk-project/chromium-crosswalk-efl | tools/perf/benchmarks/media.py | 32 | 3214 | # 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.
from measurements import media
import page_sets
from telemetry import benchmark
from telemetry.page import page_test
from telemetry.value import list_of_scal... | bsd-3-clause |
Godiyos/python-for-android | python3-alpha/python3-src/Lib/lib2to3/tests/test_parser.py | 47 | 6147 | """Test suite for 2to3's parser and grammar files.
This is the place to add tests for changes to 2to3's grammar, such as those
merging the grammars for Python 2 and 3. In addition to specific tests for
parts of the grammar we've changed, we also make sure we can parse the
test_grammar.py files from both Python 2 and P... | apache-2.0 |
cjgunase/ThinkStats2 | code/relay_soln.py | 70 | 1675 | """This file contains code used in "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
"""
import thinkstats2
import thinkplot
import relay
def ObservedPmf(pmf, speed, label=None):
"""Returns a new Pmf repres... | gpl-3.0 |
fillycheezstake/MissionPlanner | Lib/_abcoll.py | 56 | 15273 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) for collections, according to PEP 3119.
DON'T USE THIS MODULE DIRECTLY! The classes here should be imported
via collections; they are defined here only to alleviate certain
boots... | gpl-3.0 |
tiqiheng/pyspider | pyspider/scheduler/task_queue.py | 57 | 7035 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2014-02-07 13:12:10
import time
import heapq
import logging
import threading
from six.moves import queue as Queue
try:
from UserDict import DictMixin
e... | apache-2.0 |
alexbruy/QGIS | python/plugins/processing/algs/lidar/lastools/las2dem.py | 3 | 3592 | # -*- coding: utf-8 -*-
"""
***************************************************************************
las2dem.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
---------------------
D... | gpl-2.0 |
lihui7115/ChromiumGStreamerBackend | tools/telemetry/telemetry/value/skip_unittest.py | 13 | 1626 | # 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 unittest
from telemetry import story
from telemetry import page as page_module
from telemetry import value
from telemetry.value import skip... | bsd-3-clause |
larusx/yunmark | site-packages/markdown/extensions/abbr.py | 13 | 2786 | '''
Abbreviation Extension for Python-Markdown
==========================================
This extension adds abbreviation handling to Python-Markdown.
See <https://pythonhosted.org/Markdown/extensions/abbreviations.html>
for documentation.
Oringinal code Copyright 2007-2008 [Waylan Limberg](http://achinghead.com/)... | mit |
benjamindeleener/odoo | addons/l10n_ca/__openerp__.py | 1 | 1831 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Canada - Accounting',
'version': '1.0',
'author': 'Savoir-faire Linux',
'website': 'https://www.savoirfairelinux.com',
'category': 'Localization/Account Charts',
'description': """
This... | gpl-3.0 |
py-geek/City-Air | venv/lib/python2.7/site-packages/psycopg2/tests/testutils.py | 14 | 10390 | # testutils.py - utility module for psycopg2 testing.
#
# Copyright (C) 2010-2011 Daniele Varrazzo <daniele.varrazzo@gmail.com>
#
# psycopg2 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 vers... | mit |
AdrienMQ/parameter-framework | tools/coverage/coverage.py | 2 | 34920 | #!/usr/bin/env python3
# Copyright (c) 2011-2014, Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, t... | bsd-3-clause |
Softmotions/edx-platform | lms/djangoapps/instructor_task/api_helper.py | 102 | 15417 | """
Helper lib for instructor_tasks API.
Includes methods to check args for rescoring task, encoding student input,
and task submission logic, including handling the Celery backend.
"""
import hashlib
import json
import logging
from django.utils.translation import ugettext as _
from celery.result import AsyncResult
... | agpl-3.0 |
AnotherBobSmith/CLUZ | cluz_dialog3.py | 1 | 15904 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
A QGIS plugin
CLUZ for QGIS
-------------------
begin : 2016-23-02
copyright : (C) 2016 by Bob Smith, DICE
... | gpl-2.0 |
cisco-openstack/networking-cisco | networking_cisco/plugins/ml2/drivers/cisco/ucsm/config.py | 2 | 3192 | # Copyright 2015 Cisco Systems, 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 requi... | apache-2.0 |
mosesfistos1/beetbox | beetsplug/filefilter.py | 13 | 3038 | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, Malte Ried.
#
# 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 r... | mit |
40223134/40223134w17 | static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/sprite.py | 603 | 55779 | ## pygame - Python Game Library
## Copyright (C) 2000-2003, 2007 Pete Shinners
## (C) 2004 Joe Wreschnig
## This library 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; e... | gpl-3.0 |
yakky/django-cms | cms/models/static_placeholder.py | 1 | 3681 | import uuid
from django.contrib.auth import get_permission_codename
from django.contrib.sites.models import Site
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.translation import ugettext_lazy as _
from six import text_type, python_2_unicode_compatible
from cms.mode... | bsd-3-clause |
Triv90/Nova | nova/tests/test_wsgi.py | 10 | 7206 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | apache-2.0 |
2014c2g4/2015cda_g7 | static/Brython3.1.0-20150301-090019/Lib/unittest/main.py | 739 | 10385 | """Unittest main program"""
import sys
import optparse
import os
from . import loader, runner
from .signals import installHandler
__unittest = True
FAILFAST = " -f, --failfast Stop on first failure\n"
CATCHBREAK = " -c, --catch Catch control-C and display results\n"
BUFFEROUTPUT = " -b, --buffer ... | gpl-3.0 |
mathpresso/adminpp | example_project/post/migrations/0001_initial.py | 2 | 1451 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-22 12:35
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... | mit |
nickgentoo/LSTM-timepredictionPMdata | code/nick_evaluate_suffix_and_remaining_time_only_time_OHenc.py | 1 | 15048 | '''
this script takes as input the LSTM or RNN weights found by train.py
change the path in line 178 of this script to point to the h5 file
with LSTM or RNN weights generated by train.py
Author: Niek Tax
'''
from __future__ import division
from keras.models import load_model
import csv
import copy
import numpy as np
... | gpl-3.0 |
jarodwilson/linux-muck | Documentation/conf.py | 57 | 16596 | # -*- coding: utf-8 -*-
#
# The Linux Kernel documentation build configuration file, created by
# sphinx-quickstart on Fri Feb 12 13:51:46 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fi... | gpl-2.0 |
prodromou87/gem5 | src/mem/slicc/ast/MemberExprAST.py | 86 | 3128 | # Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
# Copyright (c) 2009 The Hewlett-Packard Development Company
# 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 co... | bsd-3-clause |
xin3liang/platform_external_chromium_org | tools/idl_parser/idl_parser_test.py | 176 | 3689 | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import glob
import unittest
from idl_lexer import IDLLexer
from idl_parser import IDLParser, ParseFile
from idl_ppapi_lexer import... | bsd-3-clause |
shoyer/xarray | xarray/tests/test_variable.py | 1 | 87655 | import warnings
from copy import copy, deepcopy
from datetime import datetime, timedelta
from textwrap import dedent
import numpy as np
import pandas as pd
import pytest
import pytz
from xarray import Coordinate, Dataset, IndexVariable, Variable, set_options
from xarray.core import dtypes, duck_array_ops, indexing
fr... | apache-2.0 |
etherkit/OpenBeacon2 | client/linux-arm/venv/lib/python3.5/site-packages/PyInstaller/loader/pyiboot01_bootstrap.py | 2 | 7533 | #-----------------------------------------------------------------------------
# Copyright (c) 2005-2019, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this s... | gpl-3.0 |
AndreyPopovNew/asuswrt-merlin-rt-n | release/src/router/samba-3.0.25b/source/stf/pythoncheck.py | 55 | 1787 | #! /usr/bin/python
# Comfychair test cases for Samba python extensions
# Copyright (C) 2003 by Tim Potter <tpot@samba.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 o... | gpl-2.0 |
bountyful/bountyfulcoins | bountyfulcoinsapp/migrations/0001_initial.py | 1 | 9626 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Link'
db.create_table(u'bountyfulcoinsapp_link', (
... | mit |
Pluto-tv/chromium-crosswalk | chrome/common/extensions/docs/server2/fake_url_fetcher.py | 85 | 4886 | # 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.
import os
import posixpath
from future import Future
from path_util import AssertIsDirectory, IsDirectory
class _Response(object):
def __init__(self... | bsd-3-clause |
HengeSense/website | apps/news/widgets.py | 1 | 2559 | ############################################################################
# This file is part of the Maui Web site.
#
# Copyright (c) 2012 Pier Luigi Fiorini
# Copyright (c) 2009-2010 Krzysztof Grodzicki
#
# Author(s):
# Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
#
# $BEGIN_LICENSE:AGPL3+$
#
# This program ... | agpl-3.0 |
afaheem88/tempest | tempest/api/image/v2/test_images_tags.py | 9 | 1504 | # 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 agreed to in writing, software
#... | apache-2.0 |
vine-comment/live_portal | live_portal/urls.py | 1 | 1677 | from live_portal import views
from views import *
from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from registration.backends.simple.views import RegistrationView
from forms import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patte... | gpl-3.0 |
karimbahgat/Pure-Python-Greiner-Hormann-Polygon-Clipping | GreinerHorman_Algo/KimKim/puremidpoints_v16(k&k,tryfixcrosschange).py | 1 | 36981 | # -*- coding: UTF-8 -*-
# Efficient Clipping of Arbitrary Polygons
#
# Copyright (c) 2011, 2012 Helder Correia <helder.mc@gmail.com>
#
# 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.