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
entomb/CouchPotatoServer
libs/sqlalchemy/orm/__init__.py
18
66714
# orm/__init__.py # Copyright (C) 2005-2013 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 """ Functional constructs for ORM configuration. See the SQLAlchemy object relational...
gpl-3.0
razvanphp/arangodb
3rdParty/V8-3.31.74.1/third_party/python_26/Lib/site-packages/win32com/server/connect.py
17
2424
"""Utilities for Server Side connections. A collection of helpers for server side connection points. """ import pythoncom from exception import Exception import winerror from win32com import olectl import win32com.server.util # Methods implemented by the interfaces. IConnectionPointContainer_methods = ["EnumConnect...
apache-2.0
wyrdmeister/OnlineAnalysis
OAGui/src/GuiBase.py
1
5421
# -*- coding: utf-8 -*- """ Online Analysis Configuration Editor - Base class with logging functions Version 2.0 Michele Devetta (c) 2013 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 ver...
gpl-3.0
facebookexperimental/eden
eden/hg-server/tests/test-fb-hgext-diff-since-last-submit-t.py
2
5827
# Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import from testutil.dott import feature, sh, testtmp # noqa: F401 # Load extensions ( sh ...
gpl-2.0
nrwahl2/ansible
lib/ansible/modules/cloud/azure/azure_rm_resourcegroup_facts.py
5
4030
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # 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 ANS...
gpl-3.0
orbitfp7/nova
nova/tests/unit/api/openstack/compute/contrib/test_flavor_manage.py
4
17126
# Copyright 2011 Andrew Bogott for the Wikimedia 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-...
apache-2.0
gpodder/gpodder
share/gpodder/extensions/notification-win32.py
1
6754
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2018 The gPodder Team # # gPodder 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 Licens...
gpl-3.0
yashaswi-reddy/icsisumm
icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk_contrib/classifier_tests/autoclasstests.py
9
1570
# Natural Language Toolkit - Attribute # can extract the name and values from a line and operate on them # # Author: Sumukh Ghodke <sumukh dot ghodke at gmail dot com> # # URL: <http://nltk.sf.net> # This software is distributed under GPL, for license information see LICENSE.TXT from nltk_contrib.classifier import au...
gpl-3.0
MSOpenTech/edx-platform
cms/djangoapps/contentstore/management/commands/delete_orphans.py
110
1623
"""Script for deleting orphans""" from django.core.management.base import BaseCommand, CommandError from contentstore.views.item import _delete_orphans from opaque_keys.edx.keys import CourseKey from opaque_keys import InvalidKeyError from xmodule.modulestore import ModuleStoreEnum class Command(BaseCommand): """...
agpl-3.0
nuclear-wizard/moose
modules/geochemistry/python/dbclass.py
10
5668
#!/usr/bin/env python3 #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgp...
lgpl-2.1
uphold/bitcoin
qa/rpc-tests/zmq_test.py
7
3230
#!/usr/bin/env python3 # Copyright (c) 2015-2016 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 the ZMQ API.""" from test_framework.test_framework import BitcoinTestFramework from test_framewor...
mit
bslatkin/8-bits
appengine-ndb/ndb/key_test.py
1
16345
"""Tests for key.py.""" import base64 import pickle import unittest from .google_imports import datastore_errors from .google_imports import datastore_types from .google_imports import entity_pb from . import eventloop from . import key from . import model from . import tasklets from . import test_utils class KeyT...
apache-2.0
beck/django
django/views/i18n.py
82
11102
import gettext as gettext_module import importlib import json import os from django import http from django.apps import apps from django.conf import settings from django.core.urlresolvers import translate_url from django.template import Context, Engine from django.utils import six from django.utils._os import upath fr...
bsd-3-clause
Philippe12/external_chromium_org
chrome/test/chromedriver/client/webelement.py
28
1436
# 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. from command_executor import Command class WebElement(object): """Represents an HTML element.""" def __init__(self, chromedriver, id_): self._chrom...
bsd-3-clause
chaen/DIRAC
ResourceStatusSystem/Policy/test/Test_RSS_Policy_AlwaysActivePolicy.py
8
1675
""" Test_RSS_Policy_AlwaysActivePolicy """ __RCSID__ = '$Id: $' import unittest import DIRAC.ResourceStatusSystem.Policy.AlwaysActivePolicy as moduleTested ################################################################################ class AlwaysActivePolicy_TestCase( unittest.TestCase ): def setUp( self ...
gpl-3.0
jsafrane/openlmi-storage
test/unit/config/test_unit_settings.py
1
7966
# Copyright (C) 2012 Red Hat, Inc. All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # ...
lgpl-2.1
DBrianKimmel/PyHouse
Project/src/Modules/Computer/Web/test/test_web_utils.py
1
3750
""" @name: PyHouse/src/Modules/Computer/Web/_test/test_web_utils.py @author: D. Brian Kimmel @contact: D.BrianKimmel@gmail.com> @copyright: (c) 2014-2017 by D. Brian Kimmel @license: MIT License @note: Created on Jun 29, 2013 @Summary: Test web utilities module Passed all 7 tests - DBK - 2017-01-12 ...
mit
tbeadle/django
tests/admin_filters/tests.py
8
48796
from __future__ import unicode_literals import datetime import sys import unittest from django.contrib.admin import ( AllValuesFieldListFilter, BooleanFieldListFilter, ModelAdmin, RelatedOnlyFieldListFilter, SimpleListFilter, site, ) from django.contrib.admin.views.main import ChangeList from django.contrib.a...
bsd-3-clause
aljscott/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/common.py
203
3229
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # 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 conditions and...
bsd-3-clause
dmilith/SublimeText3-dmilith
Packages/Debugger/modules/libs/pywinpty/st3_windows_x32/winpty/tests/test_cywinpty.py
3
1138
# -*- coding: utf-8 -*- """Cywinpty tests.""" # yapf: disable # Third party imports from winpty.cywinpty import Agent from winpty.winpty_wrapper import PY2 from winpty.ptyprocess import which import pytest # yapf: disable CMD = which('cmd') if PY2: CMD = unicode(CMD) # noqa @pytest.fixture(scope='module') d...
mit
chencoyote/owasp-pysec
pysec/load.py
1
11062
# Python Security Project (PySec) and its related class files. # # PySec is a set of tools for secure application development under Linux # # Copyright 2014 PySec development team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You...
apache-2.0
pitch-sands/i-MPI
flask/Lib/site-packages/sqlalchemy/sql/__init__.py
34
1138
# sql/__init__.py # Copyright (C) 2005-2012 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 sqlalchemy.sql.expression import ( Alias, ClauseElement, ColumnCollec...
bsd-3-clause
skim1420/spinnaker
testing/citest/tests/aws_smoke_test.py
1
19365
# 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
VigTech/Vigtech-Services
env/lib/python2.7/site-packages/django/utils/baseconv.py
650
2982
# Copyright (c) 2010 Guilherme Gondim. All rights reserved. # Copyright (c) 2009 Simon Willison. All rights reserved. # Copyright (c) 2002 Drew Perttula. All rights reserved. # # License: # Python Software Foundation License version 2 # # See the file "LICENSE" for terms & conditions for usage, and a DISCLAIMER OF # ...
lgpl-3.0
creasyw/IMTAphy
documentation/doctools/trunk/tests/test_quickstart.py
3
4527
# -*- coding: utf-8 -*- """ test_quickstart ~~~~~~~~~~~~~~~ Test the sphinx.quickstart module. :copyright: 2008 by Georg Brandl. :license: BSD. """ import sys import time import __builtin__ from util import * from sphinx import quickstart as qs from sphinx.util.console import nocolor, coloron ...
gpl-2.0
randybias/beets
beetsplug/ipfs.py
15
9953
# This file is part of beets. # # 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, merge, publish, # distribu...
mit
kedz/cuttsum
old/python/cuttsum/readers.py
1
2494
import codecs import numpy as np from sklearn.feature_extraction import DictVectorizer def gold_reader(bow_file, l_file, sim_idx, vector=u'latent'): op = codecs.open sims = [] vectors = [] labels = [] unicodes = [] last_hour = None with op(bow_file, u'r', u'utf-8') as bf, op(l_file, u'r', u...
apache-2.0
Karajlug/karajlug
dbot/views.py
1
2174
# ----------------------------------------------------------------------------- # Karajlug.org # Copyright (C) 2010 Karajlug community # # 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 Found...
gpl-2.0
libracore/erpnext
erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py
7
1027
# 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 erpnext.accounts.report.non_billed_report import get_ordered_to_be_billed_data def execute(filters=None): columns = ge...
gpl-3.0
brandond/ansible
lib/ansible/plugins/httpapi/fortimanager.py
42
13169
# Copyright (c) 2018 Fortinet and/or its affiliates. # # 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 late...
gpl-3.0
tos-kamiya/agec2
src/gen_ngram.py
1
25223
#!/usr/bin/env python #coding: utf-8 __author__ = 'Toshihiro Kamiya <kamiya@mbj.nifty.com>' __status__ = 'experimental' import collections import os import sys import datetime from _utilities import sort_uniq import asm_manip as am import ope_manip as om import precomp_manip as pm UNTRACKED_CLAZS = frozenset([ ...
mit
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_console_config.py
24
21691
# Configuration file for ipython-console. c = get_config() #------------------------------------------------------------------------------ # ZMQTerminalIPythonApp configuration #------------------------------------------------------------------------------ # ZMQTerminalIPythonApp will inherit config from: TerminalIP...
mit
r0balo/pelisalacarta
python/main-classic/lib/requests/packages/chardet/mbcssm.py
1783
19590
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
gpl-3.0
varuntiwari27/rally
rally/common/plugin/meta.py
5
3476
# Copyright 2015: Mirantis 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 b...
apache-2.0
tpaszkowski/quantum
quantum/tests/unit/test_config.py
5
1952
# Copyright (c) 2012 OpenStack Foundation. # # 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...
apache-2.0
trivoldus28/pulsarch-verilog
tools/local/bas-release/bas,3.9/lib/python/lib/python2.3/idlelib/configHandler.py
2
26743
"""Provides access to stored IDLE configuration information. Refer to the comments at the beginning of config-main.def for a description of the available configuration files and the design implemented to update user configuration information. In particular, user configuration choices which duplicate the defaults will...
gpl-2.0
NaviNet/ImageFeeder
imagefeeder/imagefeeder.py
1
19421
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014 NaviNet 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 # # ...
apache-2.0
wholeGenomeSequencingAnalysisPipeline/BacPipe
yaml/PyYAML-3.12/lib/yaml/tokens.py
985
2573
class Token(object): def __init__(self, start_mark, end_mark): self.start_mark = start_mark self.end_mark = end_mark def __repr__(self): attributes = [key for key in self.__dict__ if not key.endswith('_mark')] attributes.sort() arguments = ', '.join(['%s=...
gpl-3.0
bmanojlovic/ansible
lib/ansible/plugins/cache/redis.py
112
3535
# (c) 2014, Brian Coca, Josh Drake, et al # # 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
neno1978/pelisalacarta
python/main-classic/channels/cinefoxtv.py
2
7935
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # Canal (cinefoxtv) por Hernan_Ar_c # ------------------------------------------------------------ import re import sys import urlparse from core import config from core import httptools from core import logger from core import scr...
gpl-3.0
OmeGak/indico
indico/modules/oauth/models/tokens_test.py
2
2920
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import datetime, timedelta from uuid import uuid4 import pytest from indico.modules.oauth....
mit
bckwltn/SickRage
lib/sqlalchemy/dialects/postgresql/ranges.py
79
4805
# Copyright (C) 2013-2014 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 .base import ischema_names from ... import types as sqltypes __all__ = ('INT4RANGE', 'INT8RANGE', ...
gpl-3.0
Theer108/invenio
invenio/legacy/websubmit/file_stamper.py
13
87964
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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...
gpl-2.0
mattclark/osf.io
addons/github/models.py
1
16200
# -*- coding: utf-8 -*- import os import urlparse import markupsafe from addons.base.models import (BaseOAuthNodeSettings, BaseOAuthUserSettings, BaseStorageAddon) from django.db import models from framework.auth import Auth from github3 import GitHubError from osf.models.external impo...
apache-2.0
rhyolight/hypersearch
setup.py
1
1371
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditio...
gpl-3.0
RPI-OPENEDX/edx-platform
common/djangoapps/util/tests/test_markup.py
8
2311
# -*- coding: utf-8 -*- """ Tests for util.markup """ import unittest import ddt from edxmako.template import Template from util.markup import escape, HTML, ugettext as _, ungettext @ddt.ddt class FormatHtmlTest(unittest.TestCase): """Test that we can format plain strings and HTML into them properly.""" @...
agpl-3.0
chennqqi/streamhtmlparser
src/tests/py_streamhtmlparser_test.py
8
11809
#!/usr/bin/env python # # Copyright (c) 2008, 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 ...
bsd-3-clause
MatthewWilkes/django
tests/serializers/tests.py
61
30538
# -*- coding: utf-8 -*- from __future__ import unicode_literals import importlib import json import re import unittest from datetime import datetime from xml.dom import minidom from django.core import management, serializers from django.core.serializers.base import ProgressBar from django.db import connection, transa...
bsd-3-clause
brijeshkesariya/odoo
addons/crm_helpdesk/__openerp__.py
260
1956
# -*- 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
castroflavio/ryu
ryu/ofproto/ofproto_v1_4_parser.py
6
220055
# Copyright (C) 2012, 2013, 2014 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012, 2013 Isaku Yamahata <yamahata at valinux co jp> # # 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...
apache-2.0
SUSE-Cloud/nova
nova/openstack/common/fileutils.py
11
3090
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apac...
apache-2.0
wodji/mbed
workspace_tools/dev/dsp_fir.py
120
2714
""" 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
ESOedX/edx-platform
openedx/core/djangoapps/video_pipeline/migrations/0001_initial.py
2
1429
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settin...
agpl-3.0
tboggs/fretboard
fretboard/displays/common.py
1
1370
from __future__ import division, print_function, unicode_literals class Fret(object): '''Represents an individual fret on a fretboard.''' def __init__(self, string, fret, note): self.string = string self.number = fret self.note = note self.text = None class FretboardDis...
gpl-3.0
omji/django-tabbed-admin
tabbed_admin/templatetags/tabbed_admin_tags.py
1
1878
# -*- coding: utf-8 -*- from django import template from django.contrib.admin.helpers import Fieldset from django.template.loader import render_to_string from django.core.exceptions import ImproperlyConfigured register = template.Library() @register.simple_tag(takes_context=True) def render_tab_fieldsets_inlines(con...
bsd-3-clause
DucQuang1/youtube-dl
youtube_dl/extractor/udemy.py
33
7277
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( ExtractorError, ) class UdemyIE(InfoExtractor): IE_NAME = 'udemy' _VALID_URL = r'https?://www\.udemy\.com/(?:[^#]+#/lectu...
unlicense
tboyce021/home-assistant
tests/components/august/test_config_flow.py
5
9572
"""Test the August config flow.""" from august.authenticator import ValidationResult from homeassistant import config_entries, setup from homeassistant.components.august.const import ( CONF_ACCESS_TOKEN_CACHE_FILE, CONF_INSTALL_ID, CONF_LOGIN_METHOD, DOMAIN, VERIFICATION_CODE_KEY, ) from homeassist...
apache-2.0
fredgj/lazy
lazy/lazy.py
1
1420
class LazyRef(object): def __init__(self, fget): self.fget = fget self.name = fget.__name__ def __get__(self, instance, cls): value = self.fget(instance) instance.__dict__[self.name] = value return value class LazyProperty(object): def __init__(self, fget=None, fse...
mit
ifp-uiuc/an-analysis-of-unsupervised-pre-training-iclr-2015
cifar10/1_to_1/cnn_a/train.py
1
1904
import os import sys sys.path.append('../..') import numpy from anna import util from anna.datasets import supervised_dataset from models import CNNModel print('Start') pid = os.getpid() print('PID: {}'.format(pid)) f = open('pid', 'wb') f.write(str(pid)+'\n') f.close() model = CNNModel('experiment', './', learni...
bsd-3-clause
tjsavage/djangononrel-starter
settings.py
1
1733
# Initialize App Engine and import the default settings (DB backend, etc.). # If you want to use a different backend you have to remove all occurences # of "djangoappengine" from this file. from djangoappengine.settings_base import * import os SECRET_KEY = '=r-$b*8hglm+858&9t043hlm6-&6-3d3vfc4((7yd0dbrakhvi' INSTALL...
bsd-3-clause
mcauser/micropython
tests/net_inet/test_tls_nonblock.py
6
3119
try: import usocket as socket, ussl as ssl, uerrno as errno, sys except: import socket, ssl, errno, sys, time, select def test_one(site, opts): ai = socket.getaddrinfo(site, 443) addr = ai[0][-1] print(addr) # Connect the raw socket s = socket.socket() s.setblocking(False) try: ...
mit
saintdragon2/python-3-lecture-2015
civil-final/2nd_presentation/11조/pygame/examples/headless_no_windows_needed.py
32
1333
#!/usr/bin/env python """How to use pygame with no windowing system, like on headless servers. Thumbnail generation with scaling is an example of what you can do with pygame. NOTE: the pygame scale function uses mmx/sse if available, and can be run in multiple threads. """ useage = """-scale inputimage outputimage...
mit
gabrielfalcao/lettuce
tests/integration/lib/Django-1.3/django/utils/unittest/case.py
151
42686
"""Test case implementation""" import sys import difflib import pprint import re import unittest import warnings from django.utils.unittest import result from django.utils.unittest.util import\ safe_repr, safe_str, strclass,\ unorderable_list_difference from django.utils.unittest.compatibility import wraps ...
gpl-3.0
parkera/swift
utils/pass-pipeline/scripts/pipeline_generator.py
78
1617
#!/usr/bin/env python import argparse import json import os import sys import textwrap # Append the src dir sys.path.append(os.path.join(os.path.dirname( os.path.dirname(os.path.abspath(__file__))), 'src')) import pass_pipeline_library # noqa (E402 module level import not at top of file) import passes ...
apache-2.0
mitsuhiko/sentry
tests/sentry/buffer/redis/tests.py
7
2937
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from sentry.buffer.redis import RedisBuffer from sentry.models import Group, Project from sentry.testutils import TestCase class RedisBufferTest(TestCase): def setUp(self): self.buf = RedisBuffer() def test_coerce_val_handl...
bsd-3-clause
frePPLe/frePPLe
contrib/odoo/addons_v8/frepple/res_company.py
1
1239
# -*- coding: utf-8 -*- # # Copyright (C) 2014 by frePPLe bv # # This library 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
cpcloud/numpy
numpy/distutils/command/autodist.py
3
1650
"""This module implements additional tests ala autoconf which can be useful. """ from __future__ import division, absolute_import, print_function # We put them here since they could be easily reused outside numpy.distutils def check_inline(cmd): """Return the inline identifier (may be empty).""" cmd._check_...
bsd-3-clause
ganeshnalawade/ansible
test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/cache/notjsonfile.py
20
1422
# (c) 2020 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' cache: notjsonfile short_description: JSON formatte...
gpl-3.0
gauribhoite/personfinder
env/site-packages/django/middleware/http.py
247
2129
from django.utils.http import http_date, parse_http_date_safe class ConditionalGetMiddleware(object): """ Handles conditional GET operations. If the response has an ETag or Last-Modified header, and the request has If-None-Match or If-Modified-Since, the response is replaced by an HttpNotModified. ...
apache-2.0
bluedazzle/flask
tests/test_testing.py
143
6479
# -*- coding: utf-8 -*- """ tests.testing ~~~~~~~~~~~~~ Test client and more. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import pytest import flask from flask._compat import text_type def test_environ_defaults_from_config(): app = flask.Flask(_...
bsd-3-clause
ozgurgunes/django-filizver
filizver/_apps/text/defaults.py
2
3412
# -*- coding: utf-8 -*- from django.conf import settings def get(key, default): return getattr(settings, key, default) DEFAULT_MARKUP = get('FILIZVER_DEFAULT_MARKUP', 'markdown') SMILEYS_SUPPORT = get('FILIZVER_SMILEYS_SUPPORT', True) EMOTICON_SMILE = get('FILIZVER_EMOTICON_SMILE', '<img src="%simg/smileys/smi...
mit
martin-mann/bioconda-recipes
recipes/qorts/qorts.py
47
2602
#!/usr/bin/env python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # Program Parameters # import os import s...
mit
tracierenea/gnuradio
gr-digital/python/digital/qa_diff_encoder.py
57
3099
#!/usr/bin/env python # # Copyright 2006,2007,2010,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...
gpl-3.0
GeoMop/GeoMop
src/LayerEditor/ui/dialogs/layers/split_layer.py
1
4224
""" Dialog for appending new layer to the end. """ import PyQt5.QtWidgets as QtWidgets import PyQt5.QtGui as QtGui from .layers_helpers import LayersHelpers from LayerEditor.leconfig import cfg import gm_base.icon as icon class SplitLayerDlg(QtWidgets.QDialog): def __init__(self, min, max, copy_block, parent=Non...
gpl-3.0
joequery/django
tests/forms_tests/widget_tests/test_datetimeinput.py
247
2367
from datetime import datetime from django.forms import DateTimeInput from django.test import override_settings from django.utils import translation from .base import WidgetTest class DateTimeInputTest(WidgetTest): widget = DateTimeInput() def test_render_none(self): self.check_html(self.widget, 'da...
bsd-3-clause
oliverhr/odoo
addons/account_asset/account_asset.py
183
28936
# -*- encoding: 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 G...
agpl-3.0
lupyuen/RaspberryPiImage
home/pi/GrovePi/Software/Python/others/temboo/Library/Google/Plus/Domains/Audiences/List.py
5
6675
# -*- coding: utf-8 -*- ############################################################################### # # List # Lists all of the audiences with which a user can share. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not ...
apache-2.0
dalegregory/odoo
addons/report_webkit/company.py
431
2562
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
agpl-3.0
kuropatkin/lte
.waf-1.8.19-b1fc8f7baef51bd2db4c2971909a568d/waflib/Context.py
9
10576
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,re,imp,sys from waflib import Utils,Errors,Logs import waflib.Node HEXVERSION=0x1081300 WAFVERSION="1.8.19" WAFREVISION="f14a6d43092d3419d90c1ce16b9d3c700309d7b3" ABI=98 DBFILE='.wafpickle-...
gpl-2.0
iansf/sky_engine
testing/legion/legion_test_case.py
23
4463
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Adds unittest-esque functionality to Legion.""" import argparse import logging import sys import unittest #pylint: disable=relative-import import common...
bsd-3-clause
home-assistant/home-assistant
tests/components/smarttub/test_sensor.py
2
2183
"""Test the SmartTub sensor platform.""" import pytest import smarttub @pytest.mark.parametrize( "entity_suffix,expected_state", [ ("state", "normal"), ("flow_switch", "open"), ("ozone", "off"), ("uv", "off"), ("blowout_cycle", "inactive"), ("cleanup_cycle", "i...
apache-2.0
ruilin/RLMap
3party/protobuf/protobuf/python/google/protobuf/internal/text_encoding_test.py
126
2903
#! /usr/bin/env python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
apache-2.0
lonetwin/opencore
opencore/views/mbox.py
4
17015
# Copyright (C) 2008-2009 Open Society Institute # Thomas Moroz: tmoroz.org # 2010-2011 Large Blue # Fergus Doyle: fergus.doyle@largeblue.com # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License Version ...
gpl-2.0
britcey/ansible
lib/ansible/modules/system/pam_limits.py
36
9515
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Sebastien Rohaut <sebastien.rohaut@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version ...
gpl-3.0
lewiskan/heron
heron/tools/tracker/src/python/constants.py
6
1852
# Copyright 2016 Twitter. 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
adrienbrault/home-assistant
homeassistant/components/zwave_js/cover.py
3
6290
"""Support for Z-Wave cover devices.""" from __future__ import annotations import logging from typing import Any, Callable from zwave_js_server.client import Client as ZwaveClient from zwave_js_server.model.value import Value as ZwaveValue from homeassistant.components.cover import ( ATTR_POSITION, DEVICE_CL...
mit
SCPR/calif-earthquakes
tests.py
1
6616
# -*- coding: utf-8 -*- from earthquakes import app, db # from earthquakes import settings_production from earthquakes.models import Earthquake, NearestCity import os import logging import time import datetime import calendar import pytz from pytz import timezone from datetime import tzinfo, date import unittest import...
gpl-2.0
stefanseefeld/qmtest
qm/external/DocumentTemplate/DT_HTML.py
2
11025
############################################################################## # # Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFT...
gpl-2.0
CydarLtd/ansible
lib/ansible/modules/notification/mattermost.py
49
5291
#!/usr/bin/python # -*- coding: utf-8 -*- # Benjamin Jolivot <bjolivot@gmail.com> # Inspired by slack module : # # (c) 2017, Steve Pletcher <steve@steve-pletcher.com> # # (c) 2016, René Moser <mail@renemoser.net> # # (c) 2015, Stefan Berggren <nsg@nsg.cc> # # (c) 2014, Ramon de la Fuente <ramon@delafuente....
gpl-3.0
IBCCW/paparazzi
sw/tools/dfu/dfu.py
84
7206
#!/usr/bin/env python # # dfu.py: Access USB DFU class devices # Copyright (C) 2009 Black Sphere Technologies # Copyright (C) 2012 Transition Robotics Inc. # Written by Gareth McMullin <gareth@blacksphere.co.nz> # Modified by Piotr Esden-Tempski <piotr@esden.net> # # This program is free software: you can redistribut...
gpl-2.0
MiltosD/CEF-ELRC
lib/python2.7/site-packages/django/contrib/gis/management/commands/ogrinspect.py
324
6252
import os, sys from optparse import make_option from django.contrib.gis import gdal from django.contrib.gis.management.base import ArgsCommand, CommandError def layer_option(option, opt, value, parser): """ Callback for `make_option` for the `ogrinspect` `layer_key` keyword option which may be an integer o...
bsd-3-clause
opencollab/debile
debile/slave/commands/roodi.py
4
1288
# Copyright (c) 2015 Julien Gamba <jgamba@aius.u-strasbg.fr> # # 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, mod...
mit
supriyantomaftuh/ltp
testcases/network/nfsv4/acl/setacl_stress.py
27
1123
''' Access Control Lists stressing script To lauch on the first client Aurelien Charbon - Bull SA ''' from random_gen import * from optparse import OptionParser import commands import os import random alphabet='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789_-()' t_alphabet=len(alphabet) test = Rand...
gpl-2.0
ljwolford/ADL_LRS
oauth_provider/tests/auth.py
3
6894
# -*- coding: utf-8 -*- import time import urllib import re from urlparse import parse_qs, urlparse from django.test import TestCase, Client import oauth2 from oauth_provider.models import Scope, Consumer, Token from oauth_provider.compat import get_user_model User = get_user_model() METHOD_AUTHORIZATION_HEADER = 0...
apache-2.0
klmitch/nova
nova/privsep/qemu.py
3
5270
# Copyright 2018 Michael Still and Aptira # # 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 ...
apache-2.0
moreati/revelation
epiphany/test/test_asm.py
1
11662
from epiphany.sim import Epiphany from epiphany.utils import float2bits from epiphany.test.machine import StateChecker import os.path import pytest elf_dir = os.path.join('epiphany', 'test', 'asm') @pytest.mark.parametrize("elf,expected", [('add.elf', StateChecker(rf1=110, rf2=7, rf3=105)), ('and.elf'...
bsd-3-clause
asedunov/intellij-community
plugins/hg4idea/testData/bin/mercurial/worker.py
90
4507
# worker.py - master-slave parallelism support # # Copyright 2013 Facebook, Inc. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from i18n import _ import errno, os, signal, sys, threading, util def countcpus(): '''try to cou...
apache-2.0
dkarakats/edx-platform
cms/djangoapps/contentstore/views/tests/test_import_export.py
5
17260
""" Unit tests for course import and export """ import copy import json import logging import lxml import os import shutil import tarfile import tempfile from path import path from uuid import uuid4 from django.test.utils import override_settings from django.conf import settings from xmodule.contentstore.django import...
agpl-3.0
ysrc/xunfeng
vulscan/vuldb/crack_mongo.py
4
1215
# coding=utf-8 import socket import binascii def get_plugin_info(): plugin_info = { "name": "MongoDB未授权访问", "info": "导致数据库敏感信息泄露。", "level": "中危", "type": "未授权访问", "author": "wolf@YSRC", "url": "", "keyword": "server:mongodb", "source": 1 } r...
gpl-3.0
yawnosnorous/python-for-android
python-build/python-libs/gdata/tests/gdata_tests/apps/groups/service_test.py
128
9064
#!/usr/bin/python # # Copyright (C) 2008 Google # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0