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
sam408130/Ionic-Demos
ioniclub-master/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/__init__.py
574
21473
#!/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. import copy import gyp.input import optparse import os.path import re import shlex import sys import traceback from gyp.common import GypErr...
mit
chouseknecht/openshift-restclient-python
openshift/client/models/v1_image_stream_import.py
1
10557
# coding: utf-8 """ OpenShift API (with Kubernetes) OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is...
apache-2.0
lshain-android-source/external-chromium_org
third_party/protobuf/python/ez_setup.py
454
10334
#!python # This file was obtained from: # http://peak.telecommunity.com/dist/ez_setup.py # on 2011/1/21. """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup...
bsd-3-clause
keithroe/vtkoptix
ThirdParty/Twisted/twisted/names/test/test_names.py
22
35173
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for twisted.names. """ import socket, operator, copy from StringIO import StringIO from functools import partial, reduce from twisted.trial import unittest from twisted.internet import reactor, defer, error from twisted.internet....
bsd-3-clause
younisd/django-basic-apps
basic/tools/shortcuts.py
12
1262
import os.path import hashlib import datetime from django.shortcuts import render_to_response from django.template.context import RequestContext from django.http import HttpResponseRedirect def build_filename(instance, filename): """ Converts an image filename to a hash. """ now = datetime.datetime.n...
bsd-3-clause
IV-GII/SocialCookies
ENV1/lib/python2.7/site-packages/django/conf/locale/lt/formats.py
118
1833
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'Y \m. E j \d.' TIME_FORMAT = 'H:...
gpl-2.0
mrquim/mrquimrepo
repo/plugin.video.playlistLoader/resources/lib/chardet/codingstatemachine.py
2931
2318
######################## 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-2.0
Gjum/gagar
gagar/draw_background.py
6
1088
from .drawutils import * from .subscriber import Subscriber class SolidBackground(Subscriber): def __init__(self, color=DARK_GRAY): self.color = color def on_draw_background(self, c, w): c.fill_color(self.color) class GridDrawer(Subscriber): def on_draw_background(self, c, w): w...
gpl-3.0
trec-kba/streamcorpus-pipeline
streamcorpus_pipeline/_pdf_to_text.py
1
2115
from __future__ import absolute_import from cStringIO import StringIO import logging from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.converter import TextConverter from pdfminer.layout import LAParams from pdfminer.pdfpage import PDFPage from pdfminer.pdftypes import PDFException f...
mit
dol-sen/gentoolkit
pym/gentoolkit/equery/check.py
1
7171
# Copyright(c) 2009, Gentoo Foundation # # Licensed under the GNU General Public License, v2 # # $Header: $ """Checks timestamps and MD5 sums for files owned by a given installed package""" from __future__ import print_function __docformat__ = 'epytext' # ======= # Imports # ======= import os import sys from funct...
gpl-2.0
mozilla/inventory
core/network/views.py
2
1289
from django.shortcuts import get_object_or_404 from django.shortcuts import render from core.network.models import Network from core.network.utils import calc_networks from core.network.forms import NetworkForm from core.views import (CoreDeleteView, CoreListView, CoreUpdateView, CoreCreateVie...
bsd-3-clause
ceph/swift
test/unit/common/middleware/test_tempauth.py
5
23154
# Copyright (c) 2011 OpenStack, LLC. # # 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
goddardl/cortex
python/IECoreNuke/FnProceduralHolder.py
12
2474
########################################################################## # # Copyright (c) 2010, Image Engine Design 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: # # * Redistribu...
bsd-3-clause
bnq4ever/gypgoogle
test/builddir/gyptest-all.py
185
2706
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verify the settings that cause a set of programs to be created in a specific build directory, and that no intermediate built files get c...
bsd-3-clause
maurizioandreotti/D-Rats-0.3.ev
ENV/lib/python2.7/site-packages/d_rats/sessions/rpc.py
4
17393
#!/usr/bin/python # # Copyright 2008 Dan Smith <dsmith@danplanet.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 version 3 of the License, or # (at your option) any later version. ...
gpl-3.0
alexdglover/shill-isms
venv/lib/python2.7/site-packages/sqlalchemy/dialects/postgresql/json.py
14
9821
# postgresql/json.py # Copyright (C) 2005-2016 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 __future__ import absolute_import import json import collections from .base...
mit
sharkykh/SickRage
lib/xmltodict.py
18
17356
#!/usr/bin/env python "Makes working with XML feel like you are working with JSON" try: from defusedexpat import pyexpat as expat except ImportError: from xml.parsers import expat from xml.sax.saxutils import XMLGenerator from xml.sax.xmlreader import AttributesImpl try: # pragma no cover from cStringIO i...
gpl-3.0
deanhiller/databus
webapp/play1.3.x/python/Lib/logging/handlers.py
3
45276
# Copyright 2001-2007 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this perm...
mpl-2.0
adegroote/linux
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
tlakshman26/cinder-https-changes
cinder/scheduler/manager.py
3
12279
# Copyright (c) 2010 OpenStack Foundation # 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 complianc...
apache-2.0
kvar/ansible
lib/ansible/cli/__init__.py
1
20562
# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com> # Copyright: (c) 2018, 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 ...
gpl-3.0
Impactstory/total-impact-webapp
totalimpact/importer.py
2
3279
from unicode_helpers import remove_nonprinting_characters from totalimpact.providers import crossref from totalimpact.providers import arxiv from totalimpact.providers import pubmed from totalimpact.providers import webpage from totalimpact.providers.provider import ProviderFactory import re import logging logger = l...
mit
MichaelDoyle/Diamond
src/collectors/mountstats/mountstats.py
28
8068
# coding=utf-8 """ The function of MountStatsCollector is to parse the detailed per-mount NFS performance statistics provided by `/proc/self/mountstats` (reads, writes, remote procedure call count/latency, etc.) and provide counters to Diamond. Filesystems may be included/excluded using a regular expression filter, lik...
mit
jounex/hue
desktop/core/ext-py/boto-2.38.0/boto/route53/__init__.py
145
3103
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # w...
apache-2.0
PyNSKOrg/pynsk.ru
apps/meetup/tests/test_on_air.py
5
1974
# -*- coding: utf-8 -*- import contextlib import datetime from django.test import TestCase from apps.meetup.models import Event @contextlib.contextmanager def mock_now(dt_value): """Context manager for mocking out datetime.now() in unit tests. Example: with mock_now(datetime.datetime(2011, 2, 3, 10, 11...
bsd-3-clause
ryfeus/lambda-packs
Tensorflow_OpenCV_Nightly/source/tensorflow/python/util/tf_should_use.py
13
7653
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
mit
bhargav2408/python-for-android
python3-alpha/python3-src/Lib/ctypes/test/test_funcptr.py
53
3915
import os, unittest from ctypes import * try: WINFUNCTYPE except NameError: # fake to enable this test on Linux WINFUNCTYPE = CFUNCTYPE import _ctypes_test lib = CDLL(_ctypes_test.__file__) class CFuncPtrTestCase(unittest.TestCase): def test_basic(self): X = WINFUNCTYPE(c_int, c_int, c_int) ...
apache-2.0
perclasson/python-tombstones
tests/test_analysis.py
1
2361
import json import mock from tombstones.analysis import unique_log_entries from tombstones.analysis import active_tombstones from tombstones.log import LogEntry FIRST_LOG_ENTRY = LogEntry( name="first_function", source_file="test_decorator.py", line_number=16, datetime="2015-10-07 16:14:18.965741", ) ...
bsd-2-clause
KostasLifeboy/RyzomCore
ryzom/tools/build_gamedata/workspace/ecosystems/lacustre/directories.py
3
12987
#!/usr/bin/python # # ################################################################# # ## WARNING : this is a generated file, don't change it ! # ################################################################# # # \file directories.py # \brief Directories configuration # \date 2010-09-19-14-19-GMT # \author Jan ...
agpl-3.0
andir/ganeti
lib/config/verify.py
3
5275
# # # Copyright (C) 2015 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and ...
bsd-2-clause
glandium/git-cinnabar
CI/tools.py
1
12874
import hashlib import os from tasks import ( Task, TaskEnvironment, Tool, parse_version, ) from docker import DockerImage import msys MERCURIAL_VERSION = '5.7.1' GIT_VERSION = '2.32.0' ALL_MERCURIAL_VERSIONS = ( '1.9.3', '2.0.2', '2.1.2', '2.2.3', '2.3.2', '2.4.2', '2.5.4', '2.6.3', '2.7.2',...
gpl-2.0
jitka/weblate
weblate/trans/tests/test_files.py
2
12194
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2016 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.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, eith...
gpl-3.0
PolicyStat/django
tests/model_formsets_regress/tests.py
14
20702
from __future__ import unicode_literals from django import forms from django.forms.formsets import BaseFormSet, DELETION_FIELD_NAME from django.forms.utils import ErrorDict, ErrorList from django.forms.models import modelform_factory, inlineformset_factory, modelformset_factory, BaseModelFormSet from django.test impor...
bsd-3-clause
anand1712/cloudpulse
cloudpulse/scenario/plugins/endpoint_tests/endpoint.py
1
3993
# 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 # di...
apache-2.0
QuantConnect/Lean
Algorithm.Python/ExpiryHelperAlphaModelFrameworkAlgorithm.py
3
3519
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Licen...
apache-2.0
brianrodri/oppia
appengine_config_test.py
2
3607
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
MXWXZ/DuiMini
thirdpart/googletest/googletest/test/gtest_xml_output_unittest.py
29
17318
#!/usr/bin/env python # # Copyright 2006, 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...
mit
hdinsight/hue
desktop/core/ext-py/Django-1.6.10/tests/generic_relations/tests.py
52
18167
from __future__ import absolute_import, unicode_literals from django import forms from django.contrib.contenttypes.generic import generic_inlineformset_factory from django.contrib.contenttypes.models import ContentType from django.test import TestCase from .models import (TaggedItem, ValuableTaggedItem, Comparison, A...
apache-2.0
NL66278/OCB
openerp/addons/base/module/wizard/base_export_language.py
178
3642
# -*- 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 of t...
agpl-3.0
hekra01/mercurial
contrib/fixpax.py
2
1503
# fixpax - fix ownership in bdist_mpkg output # # Copyright 2015 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # MIT license (http://opensource.org/licenses/MIT) """Set file ownership to 0 in an Archive.pax.gz. Suitable for fixing files bdist_mpkg output: *....
gpl-2.0
40223151/2014c2g9
wsgi/static/reeborg/src/libraries/brython/Lib/_testcapi.py
742
4231
CHAR_MAX = 127 CHAR_MIN = -128 DBL_MAX = 1.7976931348623157e+308 DBL_MIN = 2.2250738585072014e-308 FLT_MAX = 3.4028234663852886e+38 FLT_MIN = 1.1754943508222875e-38 INT_MAX = 2147483647 INT_MIN = -2147483648 LLONG_MAX = 9223372036854775807 LLONG_MIN = -9223372036854775808 LONG_MAX = 2147483647 LONG_MIN = -2...
gpl-2.0
sanoju/GaeTwWpBot
tweepy/parsers.py
74
2622
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. from tweepy.models import ModelFactory from tweepy.utils import import_simplejson from tweepy.error import TweepError class Parser(object): def parse(self, method, payload): """ Parse the response payload and return the r...
mit
doganov/edx-platform
lms/djangoapps/courseware/tests/test_video_handlers.py
39
35867
# -*- coding: utf-8 -*- """Video xmodule tests in mongo.""" import os import freezegun import tempfile import textwrap import json import ddt from nose.plugins.attrib import attr from datetime import timedelta, datetime from webob import Request from mock import MagicMock, Mock, patch from xmodule.contentstore.conte...
agpl-3.0
OpenTherapeutics/transcode
setup.py
1
1160
import os import sys import codecs from setuptools import setup, find_packages app = __import__('transcode') VERSION = app.get_version() DESCRIPTION = app.__doc__ HERE = os.path.dirname(__file__) if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit(0) def read(*files): conte...
mit
anthonypdawson/LazyLibrarian
lazylibrarian/__init__.py
1
15282
from __future__ import with_statement import os, sys, subprocess, threading, cherrypy, webbrowser, sqlite3 import datetime from lib.configobj import ConfigObj from lib.apscheduler.scheduler import Scheduler import threading from lazylibrarian import logger, postprocess, searchnzb, SimpleCache FULL_PATH = None PRO...
gpl-3.0
TheoRettisch/p2pool-octocoin
SOAPpy/GSIServer.py
289
5238
from __future__ import nested_scopes """ GSIServer - Contributed by Ivan R. Judson <judson@mcs.anl.gov> ################################################################################ # # SOAPpy - Cayce Ullman (cayce@actzero.com) # Brian Matthews (blm@actzero.com) # Gregory Warnes (G...
gpl-3.0
sammerry/ansible
lib/ansible/inventory/host.py
45
3513
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
Allow2CEO/browser-ios
brave/node_modules/hashset-cpp/vendor/depot_tools/third_party/boto/datapipeline/layer1.py
51
24236
# 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 ...
mpl-2.0
snakeleon/YouCompleteMe-x86
third_party/ycmd/third_party/JediHTTP/vendor/jedi/scripts/wx_check.py
27
1669
#! /usr/bin/env python """ Depends: ``objgraph`` (third party Python library) ``wx._core`` is a very nice module to test Jedi's speed and memory performance on big Python modules. Its size is ~16kLOC (one file). It also seems to look like a typical big Python modules. A mix between a lot of different Python things. Y...
gpl-3.0
hbrunn/bank-statement-reconcile
account_advanced_reconcile/res_config.py
22
2234
# -*- coding: utf-8 -*- ############################################################################## # # Author: Leonardo Pistone # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
agpl-3.0
saltastro/pipetools
saltobsid.py
1
9583
################################# LICENSE ################################## # Copyright (c) 2016, South African Astronomical Observatory (SAAO) # # All rights reserved. # ############################################################################ from pyraf ...
bsd-3-clause
dubourg/openturns
python/test/t_SquareMatrix_lapack.py
2
1494
#! /usr/bin/env python from __future__ import print_function from openturns import * TESTPREAMBLE() try: matrix1 = SquareMatrix(2) matrix1.setName("matrix1") matrix1[0, 0] = 1.0 matrix1[1, 0] = 2.0 matrix1[0, 1] = 5.0 matrix1[1, 1] = 12.0 print("matrix1 = ", matrix1) pt = NumericalPo...
gpl-3.0
terencehonles/mailman
src/mailman/interfaces/command.py
3
2725
# Copyright (C) 2008-2012 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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-3.0
Beauhurst/django
tests/forms_tests/field_tests/test_imagefield.py
26
1859
import os import unittest from django.core.files.uploadedfile import SimpleUploadedFile from django.forms import ImageField from django.test import SimpleTestCase try: from PIL import Image except ImportError: Image = None def get_img_path(path): return os.path.join(os.path.abspath(os.path.join(__file__...
bsd-3-clause
xiaoyuanW/gem5
src/sim/Process.py
9
3021
# Copyright (c) 2005-2008 The Regents of The University of Michigan # 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
40223137/2015abc
static/Brython3.1.1-20150328-091302/Lib/unittest/test/testmock/testmock.py
737
40047
import copy import sys import unittest from unittest.test.testmock.support import is_instance from unittest import mock from unittest.mock import ( call, DEFAULT, patch, sentinel, MagicMock, Mock, NonCallableMock, NonCallableMagicMock, _CallList, create_autospec ) class Iter(object): def __init__...
gpl-3.0
JBonsink/GSOC-2013
tools/ns-allinone-3.14.1/ns-3.14.1/src/create-module.py
21
9326
#! /usr/bin/env python import sys from optparse import OptionParser import os WSCRIPT_TEMPLATE = '''# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # def options(opt): # pass # def configure(conf): # conf.check_nonfatal(header_name='stdint.h', define_name='HAVE_STDINT_H') ...
gpl-3.0
square/pants
tests/python/pants_test/engine/test_engine.py
2
2994
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, print_function, unicode_literals) from pants.base.exce...
apache-2.0
jimherd/Robokid_Blockly
requireprovides.py
1
1725
#!/usr/bin/python # Outputs requires for each namespace provided by the specified files. """ Utility for outputing goog.require for every thing that the set of files provides. usage: %prog [options] [file1.js ...] """ import source, optparse, sys parser = optparse.OptionParser(__doc__); parser.add_option('-o', ...
apache-2.0
robovm/robovm-studio
python/helpers/pydev/pydev_ipython_console.py
42
2469
import sys from pydev_console_utils import BaseInterpreterInterface import os os.environ['TERM'] = 'emacs' #to use proper page_more() for paging # Uncomment to force PyDev standard shell. # raise ImportError() from pydev_ipython_console_011 import get_pydev_frontend #==============================================...
apache-2.0
vinay87/flyer
.buildozer/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py
2931
1684
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
gpl-2.0
Gabriel439/pants
src/python/pants/backend/android/tasks/aapt_gen.py
4
8325
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
apache-2.0
SavinaRoja/OpenAccess_EPUB
src/openaccess_epub/article/__init__.py
1
8150
# -*- coding: utf-8 -*- """ openaccess_epub.article defines abstract article representation The openaccess_epub.article contains the :class:`Article` class which is instantiated per article XML file. Basic article structural elements are collected and metadata is parsed according to DTD rules into a python data struc...
gpl-3.0
xq262144/hue
desktop/core/ext-py/python-openid-2.2.5/openid/test/test_xri.py
87
3912
from unittest import TestCase from openid.yadis import xri class XriDiscoveryTestCase(TestCase): def test_isXRI(self): i = xri.identifierScheme self.failUnlessEqual(i('=john.smith'), 'XRI') self.failUnlessEqual(i('@smiths/john'), 'XRI') self.failUnlessEqual(i('smoker.myopenid.com'),...
apache-2.0
NetApp/cinder
cinder/tests/unit/test_db_worker_api.py
5
10386
# Copyright (c) 2016 Red Hat, 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 require...
apache-2.0
szopu/django
django/contrib/gis/gdal/prototypes/ds.py
25
4266
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER from django.contrib.gis.gdal.envelope import OGREnvelope from djang...
bsd-3-clause
StealthMicro/OctoPi-Makerbot
env/Lib/abc.py
488
7145
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) according to PEP 3119.""" import types from _weakrefset import WeakSet # Instance of old-style class class _C: pass _InstanceType = type(_C()) def abstractmethod(funcobj): """A d...
agpl-3.0
timlinux/inasafe
safe/gui/tools/osm_downloader_dialog.py
1
20848
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid - **Import Dialog.** Contact : ole.moller.nielsen@gmail.com .. 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 Found...
gpl-3.0
anand-c-goog/tensorflow
tensorflow/python/kernel_tests/sparse_ops_test.py
8
31029
# 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
twz915/django
django/test/signals.py
81
6729
import os import threading import time import warnings from django.apps import apps from django.core.exceptions import ImproperlyConfigured from django.core.signals import setting_changed from django.db import connections, router from django.db.utils import ConnectionRouter from django.dispatch import Signal, receiver...
bsd-3-clause
ShinyROM/android_external_chromium_org
chrome/common/extensions/docs/server2/cache_chain_object_store_test.py
154
8532
#!/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. from cache_chain_object_store import CacheChainObjectStore from test_object_store import TestObjectStore import unittest class CacheCh...
bsd-3-clause
aronbierbaum/txsuds
suds/sax/element.py
175
36480
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 ...
lgpl-3.0
mandeepdhami/neutron
neutron/plugins/nec/config.py
26
2980
# Copyright 2012 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
apache-2.0
slashdd/sos
sos/report/plugins/ovirt_hosted_engine.py
4
2212
# Copyright (C) 2014 Red Hat, Inc., Sandro Bonazzola <sbonazzo@redhat.com> # This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # version 2 of the GNU ...
gpl-2.0
orekyuu/intellij-community
python/helpers/pycharm_generator_utils/constants.py
11
32341
import os import re import types import sys import string import time # !!! Don't forget to update VERSION and required_gen_version if necessary !!! VERSION = "1.137" OUT_ENCODING = 'utf-8' version = ( (sys.hexversion & (0xff << 24)) >> 24, (sys.hexversion & (0xff << 16)) >> 16 ) if version[0] >= 3: #no...
apache-2.0
apihackers/wagtail-sendinblue
sendinblue/views.py
1
5262
from collections import defaultdict from django.http import JsonResponse from django.shortcuts import render from django.utils.translation import ugettext_lazy as _ from django.views.decorators.vary import vary_on_headers from .client import Client, AutomationClient from .forms import SendInBlueDynamicForm from .mode...
mit
dbaxa/django
django/test/runner.py
89
26473
import collections import ctypes import itertools import logging import multiprocessing import os import pickle import textwrap import unittest from importlib import import_module from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import DEFAULT_DB_ALIAS, connection...
bsd-3-clause
lucastheis/trlda
code/trlda/python/tests/onlineldavb.py
1
12273
# onlineldavb.py: Package of functions for fitting Latent Dirichlet # Allocation (LDA) with online variational Bayes (VB). # # Copyright (C) 2010 Matthew D. Hoffman # # 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...
mit
Microvellum/Fluid-Designer
win64-vc/2.78/Python/bin/2.78/scripts/freestyle/styles/sketchy_topology_broken.py
6
2001
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
gpl-3.0
dwhall/HeyMac
heymac/ui/rdo_stngs_model.py
1
2231
""" Copyright 2021 Dean Hall. See LICENSE for details. The Text User Interface Radio Settings model and view. """ from ..phy import SX127xSettings class RadioStngsModel(object): def __init__(self, phy_hsm): self._phy_hsm = phy_hsm def apply_stngs(self, model_stngs): stng_fld = { ...
mit
doganov/edx-platform
common/djangoapps/util/organizations_helpers.py
62
3046
""" Utility library for working with the edx-organizations app """ from django.conf import settings from django.db.utils import DatabaseError def add_organization(organization_data): """ Client API operation adapter/wrapper """ if not organizations_enabled(): return None from organization...
agpl-3.0
lsaffre/lino_book
lino_book/projects/min1/tests.py
1
12564
# -*- coding: utf-8 -*- # Copyright 2008-2017 Rumma & Ko Ltd # License: BSD (see file COPYING for details) """ This module contains some relatively quick tests that don't load any fixtures. To run only this test:: $ go min1 $ python manage.py test """ from __future__ import unicode_literals from django.conf i...
agpl-3.0
MatthieuDartiailh/pyvisa-sim
pyvisa-sim/channels.py
1
5848
# -*- coding: utf-8 -*- """ pyvisa-sim.channel ~~~~~~~~~~~~~~~~~~ Classes to enable the use of channels in devices. :copyright: 2014 by PyVISA-sim Authors, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ from collections import defaultdict import stringparser from ...
mit
flychen50/python-oauth2
oauth2/clients/imap.py
885
1685
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 ...
mit
fuselock/odoo
openerp/addons/test_workflow/models.py
337
2268
# -*- coding: utf-8 -*- import openerp.osv.orm class m(openerp.osv.orm.Model): """ A model for which we will define a workflow (see data.xml). """ _name = 'test.workflow.model' def print_(self, cr, uid, ids, s, context=None): print ' Running activity `%s` for record %s' % (s, ids) return ...
agpl-3.0
jhawkesworth/ansible
test/units/modules/network/fortimanager/test_fmgr_secprof_proxy.py
38
2717
# Copyright 2018 Fortinet, 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
RoboPython/Pykemon
maps.py
1
4645
#This file is modified from Silveira Neto's blog post at http://silveiraneto.net/2009/12/19/tiled-tmx-map-loader-for-pygame/ which is GPLv3-licensed #Accordingly, this file is made available under the GPLv3. See http://www.gnu.org/licenses/gpl.txt #Copyright Brian Gordon 2010. import os, sys, pygame, config, item, spr...
gpl-2.0
catapult-project/catapult
third_party/gsutil/gslib/vendored/boto/tests/unit/iam/test_connection.py
100
19292
#!/usr/bin/env python # 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 ...
bsd-3-clause
RomanZWang/osf.io
scripts/consistency/fix_duplicate_addons.py
55
3158
#!/usr/bin/env python # -*- coding: utf-8 -*- """Fixes nodes with two copies of the files and wiki addons attached. This script must be run from the OSF root directory for the imports to work. :: $ python -m scripts.consistency.fix_duplicate_addons Performed on production by SL on 2014-08-12 at 5:10PM (EST). ""...
apache-2.0
airelil/pywinauto
examples/misc_examples.py
5
4022
# GUI Application automation and testing library # Copyright (C) 2006-2018 Mark Mc Mahon and Contributors # https://github.com/pywinauto/pywinauto/graphs/contributors # http://pywinauto.readthedocs.io/en/latest/credits.html # All rights reserved. # # Redistribution and use in source and binary forms, with or with...
bsd-3-clause
open-pli/enigma2
lib/python/Screens/TaskView.py
32
5471
from Screen import Screen from Components.ConfigList import ConfigListScreen from Components.config import config, ConfigSubsection, ConfigSelection, getConfigListEntry from Components.SystemInfo import SystemInfo from Components.Task import job_manager from InfoBarGenerics import InfoBarNotifications import Screens.St...
gpl-2.0
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/numpy/lib/tests/test_financial.py
83
1912
from numpy.testing import * import numpy as np class TestFinancial(TestCase): def test_rate(self): assert_almost_equal(np.rate(10,0,-3500,10000), 0.1107, 4) def test_irr(self): v = [-150000, 15000, 25000, 35000, 45000, 60000] assert_almost_equal(np.irr(v), ...
agpl-3.0
danny200309/anaconda
commands/disable_linting.py
6
1167
# Copyright (C) 2013 - Oscar Campos <oscar.campos@member.fsf.org> # This program is Free Software see LICENSE file for details import sublime_plugin from ..anaconda_lib.helpers import get_settings from ..anaconda_lib.helpers import valid_languages from ..anaconda_lib.linting.sublime import ANACONDA, erase_lint_marks...
gpl-3.0
simonwydooghe/ansible
lib/ansible/modules/packaging/os/layman.py
47
7667
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Jakub Jirutka <jakub@jirutka.cz> # # 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
mangpo/cacheall-proxy-server
httpmessage/_entityio.py
1
8455
import cStringIO, os import httpmessage.dispatch as dispatch import httpmessage.exc as exc from httpmessage._entityreader import EntityReader class FilelikeWrap(object): """A proxy for a wrapped file-like object. Shares internal data storage format with :class:`EntityIO`, so that things will continue to work ...
bsd-2-clause
xyguo/scikit-learn
sklearn/linear_model/base.py
24
21854
""" Generalized Linear models. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Vincent Michel <vincent.michel@inria.fr> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # Mathieu Blond...
bsd-3-clause
eblossom/gnuradio
grc/gui/ParserErrorsDialog.py
37
3716
""" Copyright 2013 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 ...
gpl-3.0
ibmsoe/tensorflow
tensorflow/python/training/basic_session_run_hooks.py
28
25109
# 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
vasyarv/edx-platform
lms/djangoapps/courseware/features/courseware_common.py
160
1067
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # pylint: disable=unused-argument from lettuce import world, step @step('I click on View Courseware') def i_click_on_view_courseware(step): world.css_click('a.enter-course') @step('I click on the "([^"]*)" tab$') def i_click_on_the_tab(...
agpl-3.0
Dangetsu/vnr
Frameworks/Sakura/py/scripts/getedict.py
1
3160
# coding: utf8 # getedict.py # Get the latest EDICT dictionary. # 2/9/2014 jichi if __name__ == '__main__': import initrc initrc.chcwd() initrc.initenv() import os title = os.path.basename(__file__) initrc.settitle(title) import os from sakurakit.skdebug import dprint, dwarn from sakurakit.skprof import ...
gpl-3.0