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 |
|---|---|---|---|---|---|
eneldoserrata/marcos_openerp | addons/project_issue_sheet/__openerp__.py | 120 | 1851 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... | agpl-3.0 |
personalunion/glimpse_client-1 | 3rdparty/breakpad/src/tools/gyp/test/include_dirs/gyptest-default.py | 102 | 1073 | #!/usr/bin/env python
# Copyright (c) 2009 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 use of include_dirs when using the default build target.
"""
import TestGyp
test = TestGyp.TestGyp()
if test.format == 'scon... | bsd-3-clause |
karllessard/tensorflow | tensorflow/compiler/tests/einsum_op_test.py | 15 | 3442 | # Copyright 2019 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 |
4022321818/2015cd_midterm2 | static/Brython3.1.1-20150328-091302/Lib/unittest/result.py | 727 | 6397 | """Test result object"""
import io
import sys
import traceback
from . import util
from functools import wraps
__unittest = True
def failfast(method):
@wraps(method)
def inner(self, *args, **kw):
if getattr(self, 'failfast', False):
self.stop()
return method(self, *args, **kw)
... | agpl-3.0 |
vmthunder/brick | brick/openstack/common/jsonutils.py | 3 | 6477 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in complia... | apache-2.0 |
jaspreetw/tempest | tempest/tests/test_hacking.py | 18 | 7322 | # Copyright 2014 Matthew Treinish
#
# 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 |
erikdejonge/newsrivr | daemons/rubytest.py | 1 | 1740 | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from builtins import open
from future import standard_library
standard_library.install_aliases()
from builtins import str
import os
import time
import hashlib
import strin... | gpl-2.0 |
eonpatapon/nova | nova/tests/unit/virt/xenapi/test_agent.py | 65 | 17659 | # Copyright 2013 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 |
SEL-Columbia/commcare-hq | custom/succeed/utils.py | 1 | 3738 | from django.utils.translation import ugettext as _, ugettext_noop
import dateutil
from corehq.apps.app_manager.models import ApplicationBase
from corehq.apps.domain.models import Domain
from casexml.apps.case.models import CommCareCase
from datetime import datetime, timedelta
from pytz import timezone
EMPTY_FIELD = "-... | bsd-3-clause |
justacec/bokeh | tests/integration/interaction/test_tap.py | 7 | 1445 | from __future__ import absolute_import
from bokeh.io import save
from bokeh.plotting import figure
from bokeh.models import TapTool, CustomJS
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.action_chains import ActionChains
from tests.integration.utils import has_no_console_error... | bsd-3-clause |
vperron/django-storages | storages/backends/symlinkorcopy.py | 20 | 2608 | import os
from django.conf import settings
from django.core.files.storage import FileSystemStorage
__doc__ = """
I needed to efficiently create a mirror of a directory tree (so that
"origin pull" CDNs can automatically pull files). The trick was that
some files could be modified, and some could be identical to the or... | bsd-3-clause |
Onirik79/aaritmud | src/exit.py | 1 | 16691 | # -*- coding: utf-8 -*-
"""
Modulo per la gestione delle uscite e delle mura di una stanza.
"""
#= IMPORT ======================================================================
from src.calendar import calendar
from src.database import database
from src.describable import Describable
from src.element impo... | gpl-2.0 |
danieldmm/minerva | evaluation/keyword_selection_measurement.py | 1 | 1996 | from proc.results_logging import measureScores
from proc.structured_query import StructuredQuery
from copy import deepcopy
def runAndMeasureOneQuery(query, weights, retrieval_model):
"""
Runs an actual elastic query. Returns a dict of scores given a precomputed_query,
weights, the retrieval_model i... | gpl-3.0 |
jeffzheng1/tensorflow | tensorflow/contrib/learn/python/learn/dataframe/transforms/sparsify.py | 76 | 2727 | # 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 |
gpiotti/tsflask | server/lib/flask/testsuite/subclassing.py | 563 | 1214 | # -*- coding: utf-8 -*-
"""
flask.testsuite.subclassing
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Test that certain behavior of flask can be customized by
subclasses.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import unittest
from logging import Str... | apache-2.0 |
roninio/gae-shopify-python-boilerplate | shopify/session.py | 1 | 3291 | import time
import urllib
import urllib2
try:
from hashlib import md5
except ImportError:
from md5 import md5
try:
import simplejson as json
except ImportError:
import json
import re
from contextlib import contextmanager
class Session(object):
api_key = None
secret = None
protocol = 'https'... | lgpl-3.0 |
DrSkippy/Gnacs | acscsv/disqus_acs.py | 1 | 4820 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
__author__="Scott Hendrickson"
__license__="Simplified BSD"
import sys
from .acscsv import AcsCSV
class DiacsCSV(AcsCSV):
"""
DiacsCSV determins the parse order and included fields when parsing Disqus Activity Streams
JSON records to CSV fields.
"""
def ... | bsd-2-clause |
snasoft/QtCreatorPluginsPack | Bin/3rdParty/vera/bin/lib/test/test_kqueue.py | 52 | 6949 | """
Tests for kqueue wrapper.
"""
import socket
import errno
import time
import select
import sys
import unittest
from test import test_support
if not hasattr(select, "kqueue"):
raise unittest.SkipTest("test works only on BSD")
class TestKQueue(unittest.TestCase):
def test_create_queue(self):
kq = sel... | lgpl-3.0 |
evamwangi/bc-7-Todo_List | venv/Lib/encodings/iso8859_7.py | 593 | 13100 | """ Python Character Mapping Codec iso8859_7 generated from 'MAPPINGS/ISO8859/8859-7.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='... | mit |
ityaptin/ceilometer | ceilometer/tests/unit/publisher/test_http.py | 1 | 6417 | #
# Copyright 2016 IBM
#
# 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, softw... | apache-2.0 |
ruiqimao/voxo | node_modules/node-gyp/gyp/pylib/gyp/win_tool.py | 379 | 11640 | #!/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.
"""Utility functions for Windows builds.
These functions are executed via gyp-win-tool when using the ninja generator.
"""
import os
impor... | mit |
dnzengou/everybodytravel-test-app | node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py | 1789 | 10585 | # Copyright (c) 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Xcode-ninja wrapper project file generator.
This updates the data structures passed to the Xcode gyp generator to build
with ninja instead. The Xcode project i... | apache-2.0 |
studflexmax/studflexmax | lib/jinja2/filters.py | 329 | 30115 | # -*- coding: utf-8 -*-
"""
jinja2.filters
~~~~~~~~~~~~~~
Bundled jinja filters.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import re
import math
from random import choice
from operator import itemgetter
from itertools import groupby
from jinja2.utils... | apache-2.0 |
with-git/tensorflow | tensorflow/python/training/checkpoint_utils_test.py | 49 | 13630 | # 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 |
auduny/home-assistant | homeassistant/components/thomson/device_tracker.py | 7 | 3884 | """Support for THOMSON routers."""
import logging
import re
import telnetlib
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.device_tracker import (
DOMAIN, PLATFORM_SCHEMA, DeviceScanner)
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_US... | apache-2.0 |
syphar/django | tests/template_backends/test_jinja2.py | 28 | 3611 | # Since this package contains a "jinja2" directory, this is required to
# silence an ImportWarning warning on Python 2.
from __future__ import absolute_import
from unittest import skipIf
from django.template import TemplateSyntaxError
from django.test import RequestFactory
from .test_dummy import TemplateStringsTest... | bsd-3-clause |
mahabs/nitro | nssrc/com/citrix/netscaler/nitro/resource/stat/network/vlan_stats.py | 1 | 5491 | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | apache-2.0 |
rcgee/oq-hazardlib | openquake/hazardlib/pmf.py | 2 | 3099 | # The Hazard Library
# Copyright (C) 2012-2016 GEM Foundation
#
# 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
# License, or (at your option) any later version.
#... | agpl-3.0 |
breezjw/bigcouch | couchjs/scons/scons-local-2.0.1/SCons/Scanner/D.py | 61 | 2546 | """SCons.Scanner.D
Scanner for the Digital Mars "D" programming language.
Coded by Andy Friesen
17 Nov 2003
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and as... | apache-2.0 |
dsavenko/ck-tensorflow | dataset/tf-benchmark-overfeat/benchmark-overfeat.py | 2 | 9132 | #from builtins import range
from collections import namedtuple
from datetime import datetime
import csv
import math
import time
import sys
import tensorflow.python.platform
import tensorflow as tf
FLAGS = tf.app.flags.FLAGS
tf.app.flags.DEFINE_integer('batch_size', 128,
"""Batch size.""... | bsd-3-clause |
ClearCorp-dev/server-tools | __unported__/security_protector/__openerp__.py | 17 | 1034 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Author Nicolas Bessi. Copyright Camptocamp SA
##############################################################################
{'name': 'Security protector',
'version': '0.1',
'category': 'Tools',
'descripti... | agpl-3.0 |
vrenaville/ngo-addons-backport | openerp/report/print_xml.py | 62 | 11752 | # -*- 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... | agpl-3.0 |
xiaom-GitHub/openthread | tools/harness-automation/cases/ed_6_3_1.py | 16 | 1867 | #!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# 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
# notic... | bsd-3-clause |
flingone/frameworks_base_cmds_remoted | libs/boost/tools/build/src/build/engine.py | 6 | 7576 | # Copyright Pedro Ferreira 2005.
# Copyright Vladimir Prus 2007.
# Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
bjam_interface = __import__('bjam')
import operator
import re
import b2.build.property_s... | apache-2.0 |
kenwang815/KodiPlugins | script.module.oceanktv/lib/youtube_dl/extractor/srmediathek.py | 16 | 2241 | # encoding: utf-8
from __future__ import unicode_literals
from .ard import ARDMediathekIE
from ..utils import (
ExtractorError,
get_element_by_attribute,
)
class SRMediathekIE(ARDMediathekIE):
IE_DESC = 'Saarländischer Rundfunk'
_VALID_URL = r'https?://sr-mediathek\.sr-online\.de/index\.php\?.*?&id=(... | gpl-2.0 |
Chenmxs/scrapy | docs/_ext/scrapydocs.py | 114 | 4552 | from docutils.parsers.rst.roles import set_classes
from docutils import nodes
from sphinx.util.compat import Directive
from sphinx.util.nodes import make_refnode
from operator import itemgetter
class settingslist_node(nodes.General, nodes.Element):
pass
class SettingsListDirective(Directive):
def run(self):... | bsd-3-clause |
Cloudist/story-card-painter | normal-painter.py | 1 | 3191 | # -*- coding: utf-8 -*-
from core import CardPainter
from reportlab.lib.styles import ParagraphStyle
from reportlab.platypus import Paragraph, Frame, KeepInFrame
class NormalCardPainter(CardPainter):
def paint(self):
for story in self.backlog:
self.__paint_story_card(story)
self.canv... | mit |
jhaux/tensorflow | tensorflow/contrib/keras/python/keras/datasets/reuters.py | 27 | 4437 | # Copyright 2015 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 |
petercable/xray | xray/test/test_dataset.py | 1 | 87064 | from copy import copy, deepcopy
from textwrap import dedent
try:
import cPickle as pickle
except ImportError:
import pickle
try:
import dask.array as da
except ImportError:
pass
import numpy as np
import pandas as pd
from xray import (align, concat, conventions, backends, Dataset, DataArray,
... | apache-2.0 |
MiczFlor/Booktype | docs/settings.py | 3 | 1410 | # Django settings for docs project.
# import source code dir
import os
import sys
sys.path.insert(0, os.getcwd())
sys.path.insert(0, os.path.join(os.getcwd(), os.pardir))
SITE_ID = 303
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SECRET_KEY = 'enc*ln*vp^o2p1p6of8ip9v5_tt6r#fh2-!-@pl0ur^6ul6e)l'
COVER_IMAGE_UPLOAD_DIR = 'cove... | agpl-3.0 |
thombashi/pytablewriter | pytablewriter/__init__.py | 1 | 1557 | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from dataproperty import LineBreakHandling
from .__version__ import __author__, __copyright__, __email__, __license__, __version__
from ._factory import TableWriterFactory
from ._function import dump_tabledata, dumps_tabledata
from ._logger impor... | mit |
youhong316/docker-py | docker/api/volume.py | 5 | 5065 | from .. import errors
from .. import utils
class VolumeApiMixin(object):
def volumes(self, filters=None):
"""
List volumes currently registered by the docker daemon. Similar to the
``docker volume ls`` command.
Args:
filters (dict): Server-side list filtering options.
... | apache-2.0 |
GuggerJoel/Crypto-ICR-lab001 | server.py | 1 | 6106 | #!/usr/bin/env python3
# The MIT License (MIT)
# Copyright (c) 2016 Pascal Junod <pascal.junod@heig-vd.ch>
#
# 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 wi... | mit |
BarraQDA/nvivotools | mssqlCreate.py | 1 | 1948 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2017 Jonathan Schultz
#
# 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 lat... | gpl-3.0 |
StefanRijnhart/OpenUpgrade | addons/hr_expense/report/hr_expense_report.py | 40 | 6520 | # -*- 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 |
sndrtj/pyrefflat | pyrefflat/parser.py | 1 | 9535 | from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
__author__ = 'Sander Bollen'
import locale
import os.path
import logging
from .generics import *
from .models import *
ENCODING = locale.getdefaultlocale()[1]
class Reader(object):
... | mit |
ZHAW-INES/rioxo-uClinux-dist | user/python/python-2.4.4/Tools/scripts/texcheck.py | 4 | 9231 | """ TeXcheck.py -- rough syntax checking on Python style LaTeX documents.
Written by Raymond D. Hettinger <python at rcn.com>
Copyright (c) 2003 Python Software Foundation. All rights reserved.
Designed to catch common markup errors including:
* Unbalanced or mismatched parenthesis, brackets, and braces.
* Unb... | gpl-2.0 |
molmod/molmod | molmod/test/test_log.py | 1 | 3904 | # -*- coding: utf-8 -*-
# MolMod is a collection of molecular modelling tools for python.
# Copyright (C) 2007 - 2019 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center
# for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights
# reserved unless otherwise stated.
#
# This file is part of MolMod.
#
#... | gpl-3.0 |
paveljanik/bitcoin | test/functional/wallet_resendwallettransactions.py | 45 | 1328 | #!/usr/bin/env python3
# Copyright (c) 2017 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 resendwallettransactions RPC."""
from test_framework.test_framework import BitcoinTestFramework
from t... | mit |
kjw0106/boto | boto/datapipeline/exceptions.py | 235 | 1471 | # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights ... | mit |
TieWei/nova | nova/exception.py | 1 | 42526 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 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 |
wkschwartz/django | tests/model_formsets/tests.py | 19 | 86652 | import datetime
import re
from datetime import date
from decimal import Decimal
from django import forms
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.forms.models import (
BaseModelFormSet, _get_foreign_key, inlineformset_factory,
modelformset_factory,
)
from... | bsd-3-clause |
toomoresuch/pysonengine | eggs/tipfy.ext.auth.facebook-0.2-py2.6.egg/tipfy/ext/auth/facebook.py | 2 | 8952 | # -*- coding: utf-8 -*-
"""
tipfy.ext.auth.facebook
~~~~~~~~~~~~~~~~~~~~~~~
Implementation of Facebook authentication scheme.
Ported from `tornado.auth <http://github.com/facebook/tornado/blob/master/tornado/auth.py>`_.
:copyright: 2009 Facebook.
:copyright: 2010 tipfy.org.
:license: Apac... | mit |
magic0704/python-keystoneclient | keystoneclient/auth/identity/v3/base.py | 3 | 10604 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 |
brendandahl/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_memorizingfile.py | 496 | 4252 | #!/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 |
w1ll1am23/home-assistant | tests/components/izone/test_config_flow.py | 8 | 2605 | """Tests for iZone."""
from unittest.mock import Mock, patch
import pytest
from homeassistant import config_entries, data_entry_flow
from homeassistant.components.izone.const import DISPATCH_CONTROLLER_DISCOVERED, IZONE
@pytest.fixture
def mock_disco():
"""Mock discovery service."""
disco = Mock()
disc... | apache-2.0 |
MQQiang/kbengine | kbe/res/scripts/common/Lib/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py | 551 | 2512 | # urllib3/filepost.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import codecs
import mimetypes
from uuid import uuid4
from io import BytesIO
from .packages ... | lgpl-3.0 |
danilovazb/st4wa | Yowsup/Common/datastructures.py | 23 | 2410 | '''
Copyright (c) <2012> Tarek Galal <tare2.galal@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
m... | gpl-3.0 |
omprakasha/odoo | addons/purchase_requisition/__openerp__.py | 260 | 2424 | ##############################################################################
#
# 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 Affero General Public L... | agpl-3.0 |
tsuberi/kid-watch-app | Server/twilio/rest/resources/task_router/workers.py | 27 | 3925 | from .. import NextGenInstanceResource, NextGenListResource
from .statistics import Statistics
from .reservations import Reservations
class Worker(NextGenInstanceResource):
"""
A Worker resource.
See the `TaskRouter API reference
<https://www.twilio.com/docs/taskrouter/workers>_`
for more informa... | mit |
PGower/django-ldap3-sync | ldap3_sync/migrations/0002_auto_20170214_1935.py | 1 | 1230 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-14 09:35
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ldap3_sync', '0001_initial'),
]
operations = [
... | mit |
lucienimmink/scanner.py | mutagen/id3/_tags.py | 1 | 20910 | # -*- coding: utf-8 -*-
# Copyright 2005 Michael Urman
# Copyright 2016 Christoph Reiter
#
# 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... | mit |
hwjworld/xiaodun-platform | common/lib/xmodule/xmodule/tests/xml/test_policy.py | 248 | 1262 | """
Tests that policy json files import correctly when loading XML
"""
from nose.tools import assert_equals, assert_raises # pylint: disable=no-name-in-module
from xmodule.tests.xml.factories import CourseFactory
from xmodule.tests.xml import XModuleXmlImportTest
class TestPolicy(XModuleXmlImportTest):
"""
... | agpl-3.0 |
lindycoder/fake-switches | fake_switches/switch_configuration.py | 1 | 8198 | # Copyright 2015-2016 Internap.
#
# 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 |
LumPenPacK/NetworkExtractionFromImages | osx_build/nefi2_osx_amd64_xcode_2015/site-packages/qdarkstyle/pyside_style_rc.py | 5 | 80676 | # -*- coding: utf-8 -*-
# Resource object code
#
# Created: Thu Jun 25 20:11:05 2015
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore
qt_resource_data = b"\x00\x00b\x92/*\x0a * The MIT License (MIT)\x0a *\x0a * Copyright (c) <2... | bsd-2-clause |
krunal3103/servo | tests/wpt/css-tests/tools/wptserve/wptserve/ranges.py | 329 | 3003 | from utils import HTTPException
class RangeParser(object):
def __call__(self, header, file_size):
prefix = "bytes="
if not header.startswith(prefix):
raise HTTPException(416, message="Unrecognised range type %s" % (header,))
parts = header[len(prefix):].split(",")
rang... | mpl-2.0 |
noslenfa/tdjangorest | uw/lib/python2.7/site-packages/pip/_vendor/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... | apache-2.0 |
naidu/distcc | include_server/parse_file.py | 24 | 12527 | #! /usr/bin/python2.4
# Copyright 2007 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 i... | gpl-2.0 |
s40523238/2016fallcp_hw | plugin/render_math/math.py | 283 | 14202 | # -*- coding: utf-8 -*-
"""
Math Render Plugin for Pelican
==============================
This plugin allows your site to render Math. It uses
the MathJax JavaScript engine.
For markdown, the plugin works by creating a Markdown
extension which is used during the markdown compilation
stage. Math therefore gets treated... | agpl-3.0 |
alianmohammad/pd-gem5 | src/arch/x86/isa/insts/x87/compare_and_test/test.py | 91 | 2149 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# 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 implemen... | bsd-3-clause |
Vassy/odoo | addons/website_membership/controllers/main.py | 12 | 5866 | # -*- coding: utf-8 -*-
import openerp
from openerp import SUPERUSER_ID
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.addons.website_partner.controllers import main as website_partner
from openerp.tools.translate import _
import werkzeug.urls
class WebsiteMembership(ht... | agpl-3.0 |
WinterNis/sqlalchemy | lib/sqlalchemy/orm/strategy_options.py | 43 | 34130 | # 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
"""
"""
from .interfaces import MapperOption, PropComparator
from .. import util
from ..sql.base imp... | mit |
metaRx/ansible-network | cumulus.CumulusLinux/tests/test_cl_interface.py | 2 | 33622 | from mock import call
import mock
from nose.tools import set_trace
from dev_modules.cl_interface import get_iface_type, add_ipv4, \
add_ipv6, config_changed, modify_switch_config, main, \
remove_config_from_etc_net_interfaces, config_swp_iface, \
check_if_applyconfig_name_defined_only, add_bridgeports, \
... | apache-2.0 |
JacobCallahan/automation-tools | automation_tools/satellite6/capsule.py | 2 | 13774 | """Tasks for helping automating the provisioning of Satellite 6 Capsules"""
from __future__ import print_function
import json
from fabric.api import env, get, put, run, settings, task
from automation_tools.satellite6.hammer import (
hammer_activation_key_add_subscription,
hammer_activation_key_create,
hamm... | gpl-3.0 |
kiddinn/plaso | utils/plot_storage.py | 4 | 2620 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Script to plot storage IO timing usage from profiling data.
This script requires the matplotlib and numpy Python modules.
"""
import argparse
import glob
import os
import sys
import numpy
from matplotlib import pyplot
def Main():
"""The main program function.
... | apache-2.0 |
c-o-m-m-a-n-d-e-r/CouchPotatoServer | couchpotato/core/plugins/manage.py | 17 | 12274 | import os
import time
import traceback
from couchpotato import get_db
from couchpotato.api import addApiView
from couchpotato.core.event import fireEvent, addEvent, fireEventAsync
from couchpotato.core.helpers.encoding import sp
from couchpotato.core.helpers.variable import splitString, getTitle, tryInt, getIdentifier... | gpl-3.0 |
int19h/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/xml/sax/__init__.py | 7 | 3630 | """Simple API for XML (SAX) implementation for Python.
This module provides an implementation of the SAX 2 interface;
information about the Java version of the interface can be found at
http://www.megginson.com/SAX/. The Python version of the interface is
documented at <...>.
This package contains the following modu... | apache-2.0 |
MridulS/sympy | sympy/core/tests/test_var.py | 125 | 1572 | # Tests for var are in their own file, because var pollutes global namespace.
from sympy import Symbol, var, Function, FunctionClass
from sympy.utilities.pytest import raises
# make z1 with call-depth = 1
def _make_z1():
var("z1")
# make z2 with call-depth = 2
def __make_z2():
var("z2")
def _make_z2():... | bsd-3-clause |
bengoshii/daily_bible | feed-content.py | 1 | 1362 | #!/usr/bin/env python3
# Das Programm ist nur für die interne Verwendung. Daher werden
# unsinnige oder gefährliche Eingaben des Benutzers nicht
# abgefangen.
import sqlite3
import os
import sys
import re
#import pickle
file_number = input("Welche Dateinummer soll eingelesen werden? ")
title = input("Wie ist der Titel:... | gpl-3.0 |
odoousers2014/odoo | addons/stock/res_config.py | 7 | 8374 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 |
mtagle/airflow | tests/sensors/test_bash.py | 4 | 1895 | #
# 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 |
anlambert/tulip | doc/python/tabulate.py | 1 | 60926 | # -*- coding: utf-8 -*-
# Copyright (c) 2011-2019 Sergey Astanin
# https://bitbucket.org/astanin/python-tabulate
# 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, includ... | lgpl-3.0 |
shepdelacreme/ansible | lib/ansible/modules/network/f5/bigip_ucs_fetch.py | 4 | 18936 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
bleib1dj/boto | boto/sqs/attributes.py | 223 | 1718 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... | mit |
davidnmurray/iris | setup.py | 7 | 7013 | from __future__ import print_function
import contextlib
from distutils.command import build_ext, build_py
from distutils.core import setup, Command
from distutils.sysconfig import get_config_var
from distutils.util import convert_path
import fnmatch
import multiprocessing
import os
import sys
import numpy as np
impor... | gpl-3.0 |
AnhellO/DAS_Sistemas | Ago-Dic-2018/Claudia Seca/PrimerParcial/Guitarra.py | 1 | 1276 | from Instrumento_Musical import instrumentoMusical
class Guitarra(instrumentoMusical):
#Esta clase hereda de la super clase Instrumento Musical, solo definiremos su constructor
def __init__(self, tipo, color, marca, precioAproximado, tamañoDiapason, numeroCuerdas):
self.tipo = tipo
self.color = color... | mit |
kemalakyol48/python-for-android | python3-alpha/python3-src/Lib/test/test_codecencodings_iso2022.py | 55 | 1448 | #!/usr/bin/env python
#
# Codec encoding tests for ISO 2022 encodings.
from test import support
from test import test_multibytecodec_support
import unittest
COMMON_CODEC_TESTS = (
# invalid bytes
(b'ab\xFFcd', 'replace', 'ab\uFFFDcd'),
(b'ab\x1Bdef', 'replace', 'ab\x1Bdef'),
(b'ab\x1B$... | apache-2.0 |
brian-yang/mozillians | vendor-local/lib/python/celery/tests/test_slow/test_buckets.py | 14 | 9830 | from __future__ import absolute_import
from __future__ import with_statement
import sys
import time
from functools import partial
from itertools import chain, izip
from celery.registry import TaskRegistry
from celery.task.base import Task
from celery.utils import timeutils
from celery.utils import uuid
from celery.w... | bsd-3-clause |
patrikpettersson/rest-engine | lib/pytz/tests/test_tzinfo.py | 13 | 29486 | # -*- coding: ascii -*-
import sys, os, os.path
import unittest, doctest
try:
import cPickle as pickle
except ImportError:
import pickle
from datetime import datetime, time, timedelta, tzinfo
import warnings
if __name__ == '__main__':
# Only munge path if invoked as a script. Testrunners should have setup... | mit |
tuxfux-hlp-notes/python-batches | archieves/batch-58/modules/sheets/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py | 551 | 2512 | # urllib3/filepost.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import codecs
import mimetypes
from uuid import uuid4
from io import BytesIO
from .packages ... | gpl-3.0 |
att-comdev/deckhand | deckhand/tests/unit/db/test_revision_tags.py | 1 | 4347 | # Copyright 2017 AT&T Intellectual Property. All other 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 |
7kbird/chrome | native_client_sdk/src/tools/tests/sel_ldr_test.py | 104 | 2080 | #!/usr/bin/env python
# Copyright 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 os
import sys
import unittest
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARENT_DIR = os.path.dirname(SCRIPT_DIR)
... | bsd-3-clause |
vic/otp | lib/asn1/test/asn1_SUITE_data/Constraints.py | 92 | 4620 | Constraints DEFINITIONS ::=
BEGIN
-- Single Value
SingleValue ::= INTEGER (1)
SingleValue2 ::= INTEGER (1..20)
predefined INTEGER ::= 1
SingleValue3 ::= INTEGER (predefined | 5 | 10)
Range2to19 ::= INTEGER (1<..<20)
Range10to20 ::= INTEGER (10..20)
ContainedSubtype ::= INTEGER (INCLUDES Range10to20)
-- Some ranges for... | apache-2.0 |
dewitt/appengine-markdown | markdown/odict.py | 143 | 5157 | class OrderedDict(dict):
"""
A dictionary that keeps its keys in the order in which they're inserted.
Copied from Django's SortedDict with some modifications.
"""
def __new__(cls, *args, **kwargs):
instance = super(OrderedDict, cls).__new__(cls, *args, **kwargs)
instance.keyOrd... | apache-2.0 |
noba3/KoTos | addons/plugin.program.totalinstaller/uploadLog.py | 1 | 8538 | # Much of this code was taken from existing Log Uploaders but so far
# I have been unable to find details of the original author(s) to credit them.
# Changes in the code have been made by myself, notably the checks to see if the system
# is XBMC or Kodi.
#
# Copyright (C) 2015 Lee Randall (whufclee)
#
# This ... | gpl-2.0 |
simonsgit/bachelor_stuff | tests/test1.py | 1 | 2169 | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 19 12:12:29 2015
@author: stamylew
"""
import factorial
print "__name__ is:", __name__
import numpy as np
from factorial import factorial
import matplotlib as mpl
from matplotlib import pyplot as plt
#for i in range (1,101):
# if i % 3 == 0 and i % 5 == 0:
# ... | mit |
overtherain/scriptfile | software/googleAppEngine/lib/django_1_4/django/contrib/localflavor/is_/is_postalcodes.py | 438 | 4913 | # -*- coding: utf-8 -*-
IS_POSTALCODES = (
('101', u'101 Reykjavík'),
('103', u'103 Reykjavík'),
('104', u'104 Reykjavík'),
('105', u'105 Reykjavík'),
('107', u'107 Reykjavík'),
('108', u'108 Reykjavík'),
('109', u'109 Reykjavík'),
('110', u'110 Reykjavík'),
('111', u'111 Reykjavík'... | mit |
anmolonruby/mongo-connector | tests/test_synchronizer.py | 29 | 4811 | # Copyright 2013-2014 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 |
grtfou/aiohttp-sample-base | website/server.py | 2 | 1681 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @date 161228 - Refactoring
"""
Main program
"""
import logging
from aiohttp import web
from motor.motor_asyncio import AsyncIOMotorClient
from conf import settings
from urls import main_router
logging.basicConfig(level=logging.INFO)
def get_db():
"""
DB ... | mit |
yougov/nisteag | nisteag/entropy.py | 1 | 3954 | """This module is related to token entropy calculation and the like.
See Appendix A of the NIST document (page 103) if you want to understand how
the calculation is done.
"""
import math
import string
import chardet
import six
from nisteag.errors import (
DictionaryError,
AnagramError,
)
KEYBOARD_SIZE = ... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.