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
lucacerone/nikola
tests/test_integration.py
6
23724
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function, absolute_import import os import sys import io import locale import shutil import subprocess import tempfile import unittest import lxml.html import pytest from nikola import __main__ import nikola import nikola.plugins.command import ...
mit
wweiradio/django
django/contrib/gis/gdal/error.py
535
1996
""" This module houses the GDAL & SRS Exception objects, and the check_err() routine which checks the status code returned by GDAL/OGR methods. """ # #### GDAL & SRS Exceptions #### class GDALException(Exception): pass # Legacy name OGRException = GDALException class SRSException(Exception): pass cla...
bsd-3-clause
Micronaet/micronaet-production
production_accounting_external_closed/report/production_parser.py
1
2846
# -*- coding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
nwgh/git-hg
src/push.py
2
3194
#!/usr/bin/env python # # Copyright (c) 2011 Nick Hurley <hurley at todesschaf dot org> # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope...
gpl-2.0
sarvex/tensorflow
tensorflow/python/kernel_tests/conv_ops_test.py
6
128973
# 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
Dino0631/RedRain-Bot
lib/youtube_dl/extractor/spiegeltv.py
25
4153
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urllib_parse_urlparse from ..utils import ( determine_ext, float_or_none, ) class SpiegeltvIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?spiegel\.tv/(?:#/)?filme/(?P<id>[\-a-z0-9]+...
gpl-3.0
bobwalker99/Pydev
plugins/org.python.pydev.jython/Lib/_MozillaCookieJar.py
191
5809
"""Mozilla / Netscape cookie loading / saving.""" import re, time from cookielib import (_warn_unhandled_exception, FileCookieJar, LoadError, Cookie, MISSING_FILENAME_TEXT) class MozillaCookieJar(FileCookieJar): """ WARNING: you may want to backup your browser's cookies file if you us...
epl-1.0
40223243/2015cd_midterm2
static/Brython3.1.1-20150328-091302/Lib/xml/etree/__init__.py
1200
1604
# $Id: __init__.py 3375 2008-02-13 08:05:08Z fredrik $ # elementtree package # -------------------------------------------------------------------- # The ElementTree toolkit is # # Copyright (c) 1999-2008 by Fredrik Lundh # # By obtaining, using, and/or copying this software and/or its # associated documentation, you ...
agpl-3.0
not-raspberry/mirakuru
setup.py
3
2950
# Copyright (C) 2014 by Clearcode <http://clearcode.cc> # and associates (see AUTHORS). # This file is part of mirakuru. # mirakuru is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of ...
lgpl-3.0
rajalokan/glance
glance/tests/unit/test_image_cache.py
4
20278
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
Manuel4131/youtube-dl
youtube_dl/extractor/cspan.py
99
4719
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, unescapeHTML, find_xpath_attr, smuggle_url, determine_ext, ) from .senateisvp import SenateISVPIE class CSpanIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?c-span\.org/v...
unlicense
Salat-Cx65/python-for-android
python3-alpha/python3-src/Tools/demo/sortvisu.py
108
19981
#!/usr/bin/env python3 """ Sorting algorithms visualizer using Tkinter. This module is comprised of three ``components'': - an array visualizer with methods that implement basic sorting operations (compare, swap) as well as methods for ``annotating'' the sorting algorithm (e.g. to show the pivot element); - a numbe...
apache-2.0
teslaji/homebase
venv/HomeBase/lib/python3.5/site-packages/pip/_vendor/requests/adapters.py
573
16810
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import socket from .models import Response from .packages.urllib3.poolmanager import PoolManager, proxy_from_url from .packages.urllib3.response impo...
gpl-3.0
PU-Crypto/AES
Rijndael/KeySchedule.py
1
1376
# -*- coding: utf-8 -*- #KeySchedule from Rijndael.SubBytes import * from Rijndael.Tables import RijndaelRcon import math def RotWord(Spalte): #Verschiebe die Plaetze im Array output = list() output.append(Spalte[1]) output.append(Spalte[2]) output.append(Spalte[3]) output.append(Spalte[0]) ...
lgpl-3.0
manjunaths/tensorflow
tensorflow/contrib/crf/python/kernel_tests/crf_test.py
18
9272
# 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
karllessard/tensorflow
tensorflow/python/framework/c_api_util_test.py
61
2017
# 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
mogoweb/chromium-crosswalk
chrome/test/functional/media/cns_test_base.py
68
6833
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Constrained network server (CNS) test base.""" import logging import os import Queue import subprocess import sys import threading import urllib2 im...
bsd-3-clause
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/windows/win_dsc.py
24
3414
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Trond Hindenes <trond@hindenes.com>, and others # # 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 versio...
bsd-3-clause
cloud9ers/gurumate
environment/lib/python2.7/site-packages/IPython/core/hooks.py
3
7449
"""hooks for IPython. In Python, it is possible to overwrite any method of any object if you really want to. But IPython exposes a few 'hooks', methods which are _designed_ to be overwritten by users for customization purposes. This module defines the default versions of all such hooks, which get used by IPython if ...
lgpl-3.0
Jeff-Lewis/namebench
nb_third_party/jinja2/constants.py
220
6229
# -*- coding: utf-8 -*- """ jinja.constants ~~~~~~~~~~~~~~~ Various constants. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ #: list of lorem ipsum words used by the lipsum() helper function LOREM_IPSUM_WORDS = u'''\ a ac accumsan ad adipiscing aenean a...
apache-2.0
SomethingExplosive/android_external_chromium_org
chrome/common/extensions/docs/server2/samples_data_source.py
23
9511
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import hashlib import json import logging import re from compiled_file_system import CompiledFileSystem from file_system import FileNotFoundError import...
bsd-3-clause
thinkopensolutions/l10n-brazil
l10n_br_base/models/sped_pais.py
3
1028
# -*- coding: utf-8 -*- # # Copyright 2016 Taŭga Tecnologia - Aristides Caldeira # <aristides.caldeira@tauga.com.br> # License AGPL-3 or later (http://www.gnu.org/licenses/agpl) # from __future__ import division, print_function, unicode_literals from odoo import fields, models class SpedPais(models.Model): _nam...
agpl-3.0
VigneshMohan1/spark-branch-2.3
python/pyspark/cloudpickle.py
32
28542
""" This class is defined to override standard pickle functionality The goals of it follow: -Serialize lambdas and nested functions to compiled byte code -Deal with main module correctly -Deal with other non-serializable objects It does not include an unpickler, as standard python unpickling suffices. This module wa...
apache-2.0
panmari/tensorflow
tensorflow/python/kernel_tests/depthwise_conv_op_test.py
14
17572
# Copyright 2015 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
Master2uiroga/AUR
cagraph/src/cagraph-1.2/cagraph/axis/xaxis.py
5
4017
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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 distr...
gpl-2.0
Mhynlo/SickRage
sickbeard/providers/torrentz.py
6
4966
# coding=utf-8 # Author: Dustyn Gibson <miigotu@gmail.com> # # URL: https://sickrage.github.io # # This file is part of SickRage. # # SickRage 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 o...
gpl-3.0
benoitsteiner/tensorflow
tensorflow/contrib/data/python/framework/function_test.py
34
1929
# 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...
apache-2.0
Moriadry/tensorflow
tensorflow/python/debug/wrappers/local_cli_wrapper_test.py
5
23141
# 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
marcoantoniooliveira/labweb
oscar/lib/python2.7/site-packages/django/utils/autoreload.py
109
6239
# Autoreloading launcher. # Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org). # Some taken from Ian Bicking's Paste (http://pythonpaste.org/). # # Portions copyright (c) 2004, CherryPy Team (team@cherrypy.org) # All rights reserved. # # Redistribution and use in source and binary forms, with ...
bsd-3-clause
corvorepack/REPOULTRA
plugin.video.movie.ultra.7k/resources/lib/cloudflare.py
2
4105
# # Copyright (C) 2015 tknorris (Derived from Mikey1234's & Lambda's) # # 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, or (at your option) # any later version. # # This...
gpl-2.0
BIT-SYS/gem5-spm-module
util/checkpoint_aggregator.py
64
6198
# Copyright (c) 2009 The Regents of The University of Michigan # Copyright (c) 2011 Advanced Micro Devices, Inc. # Copyright (c) 2013 Mark D. Hill and David A. Wood # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following con...
bsd-3-clause
catroot/rethinkdb
test/common/http_support/jinja2/compiler.py
623
61785
# -*- coding: utf-8 -*- """ jinja2.compiler ~~~~~~~~~~~~~~~ Compiles nodes into python code. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from itertools import chain from copy import deepcopy from keyword import iskeyword as is_python_keyword from jinja2...
agpl-3.0
TanguyPatte/phantomjs-packaging
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/thread/messagepump_unittest.py
124
3119
# Copyright (C) 2010 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 of conditions and the f...
bsd-3-clause
sbt9uc/osf.io
tests/api_tests/users/test_views.py
1
32030
# -*- coding: utf-8 -*- import urlparse from nose.tools import * # flake8: noqa from website.models import Node from website.util.sanitize import strip_html from tests.base import ApiTestCase from tests.factories import AuthUserFactory, DashboardFactory, FolderFactory, ProjectFactory from api.base.settings.defaults...
apache-2.0
Eseoghene/bite-project
tools/bugs/server/appengine/providers/datastore/indexer.py
17
1417
# Copyright 2011 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
jphilipsen05/zulip
api/integrations/codebase/zulip_codebase_config.py
31
2518
# -*- coding: utf-8 -*- # # Copyright © 2014 Zulip, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify,...
apache-2.0
Sticklyman1936/workload-automation
wlauto/tools/extdoc.py
5
3940
# Copyright 2014-2015 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 w...
apache-2.0
nedjo/openoutreach
profiles/openoutreach/libraries/openlayers/tools/exampleparser.py
131
7756
#!/usr/bin/env python import sys import os import re import time from xml.dom.minidom import Document try: import xml.etree.ElementTree as ElementTree except ImportError: try: import cElementTree as ElementTree except ImportError: try: import elementtree.ElementTree as Element...
gpl-2.0
darkwing/kuma
vendor/packages/pygments/lexers/sql.py
72
25929
# -*- coding: utf-8 -*- """ pygments.lexers.sql ~~~~~~~~~~~~~~~~~~~ Lexers for various SQL dialects and related interactive sessions. Postgres specific lexers: `PostgresLexer` A SQL lexer for the PostgreSQL dialect. Differences w.r.t. the SQL lexer are: - keywords and dat...
mpl-2.0
mkaluza/external_chromium_org
third_party/libxml/src/gentest.py
298
29646
#!/usr/bin/python -u # # generate a tester program for the API # import sys import os import string try: import libxml2 except: print "libxml2 python bindings not available, skipping testapi.c generation" sys.exit(0) if len(sys.argv) > 1: srcPref = sys.argv[1] + '/' else: srcPref = '' # # Modules ...
bsd-3-clause
rahushen/ansible
lib/ansible/modules/system/firewalld.py
2
35685
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Adam Miller (maxamillion@fedoraproject.org) # 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':...
gpl-3.0
gylian/sickbeard
bs4/testing.py
82
21997
"""Helper classes for tests.""" import copy import functools import unittest from unittest import TestCase from bs4 import BeautifulSoup from bs4.element import ( CharsetMetaAttributeValue, Comment, ContentMetaAttributeValue, Doctype, SoupStrainer, ) from bs4.builder import HTMLParserTreeBuilder d...
gpl-3.0
LazoCoder/Pokemon-Terminal
tests/test_main.py
1
3018
#!/usr/bin/env python3 # To run the tests, use: python3 -m pytest --capture=sys from pokemonterminal.database import Database from pokemonterminal.filters import Filter, RegionFilter, NonExtrasFilter from pokemonterminal.main import main from tests.test_utils import region_dict import random db = Database() def br...
gpl-3.0
edx-solutions/edx-platform
lms/djangoapps/ccx/tests/utils.py
4
4271
""" Test utils for CCX """ import datetime import pytz from django.conf import settings from six.moves import range from lms.djangoapps.ccx.overrides import override_field_for_ccx from lms.djangoapps.ccx.tests.factories import CcxFactory from openedx.core.djangoapps.ace_common.tests.mixins import EmailTemplateTagMi...
agpl-3.0
laszlocsomor/tensorflow
tensorflow/tools/docs/pretty_docs.py
15
10880
# 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
mrquim/mrquimrepo
repo/script.module.youtube.dl/lib/youtube_dl/extractor/ustream.py
45
10569
from __future__ import unicode_literals import random import re from .common import InfoExtractor from ..compat import ( compat_str, compat_urlparse, ) from ..utils import ( encode_data_uri, ExtractorError, int_or_none, float_or_none, mimetype2ext, str_or_none, ) class UstreamIE(Info...
gpl-2.0
apocalypsebg/odoo
openerp/addons/base/tests/test_views.py
176
39717
# -*- encoding: utf-8 -*- from functools import partial import itertools import unittest2 from lxml import etree as ET from lxml.builder import E from psycopg2 import IntegrityError from openerp.tests import common import openerp.tools Field = E.field class ViewCase(common.TransactionCase): def setUp(self): ...
agpl-3.0
griffy/Pyap
pyap/library/db.py
1
2688
# Pyap - The Python Audio Player Library # # Copyright (c) 2012 Joel Griffith # Copyright (c) 2005 Joe Wreschnig # Copyright (c) 2002 David I. Lehn # Copyright (c) 2005-2011 the SQLAlchemy authors and contributors # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU L...
gpl-2.0
jkakavas/creepy
creepy/plugins/googleplus/googleplus.py
1
10302
#!/usr/bin/python # -*- coding: utf-8 -*- from models.InputPlugin import InputPlugin from oauth2client.client import OAuth2WebServerFlow, AccessTokenCredentials from googleapiclient.discovery import build import logging import os import urllib import httplib2 import dateutil.parser from PyQt4.QtGui import QWizard, QWiz...
gpl-3.0
omni5cience/django-inlineformfield
.tox/py27/lib/python2.7/site-packages/IPython/core/tests/test_events.py
8
1333
import unittest try: # Python 3.3 + from unittest.mock import Mock except ImportError: from mock import Mock from IPython.core import events import IPython.testing.tools as tt def ping_received(): pass class CallbackTests(unittest.TestCase): def setUp(self): self.em = events.EventManager(get...
mit
elkingtonmcb/django
tests/template_tests/syntax_tests/test_basic.py
252
12482
from django.template.base import Context, TemplateSyntaxError from django.test import SimpleTestCase from ..utils import SilentAttrClass, SilentGetItemClass, SomeClass, setup basic_templates = { 'basic-syntax01': 'something cool', 'basic-syntax02': '{{ headline }}', 'basic-syntax03': '{{ first }} --- {{ s...
bsd-3-clause
40223139/2015cdaa5-12
static/Brython3.1.0-20150301-090019/Lib/collections/__init__.py
625
25849
#__all__ = ['deque', 'defaultdict', 'Counter'] from _collections import deque, defaultdict #from itertools import repeat as _repeat, chain as _chain, starmap as _starmap __all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList', 'UserString', 'Counter', 'OrderedDict'] # For bootstrapping re...
gpl-3.0
mjschultz/ansible-modules-extras
cloud/amazon/ec2_ami_copy.py
63
6501
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
ifduyue/polysh
polysh/dispatchers.py
3
3935
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-2.0
gmacchi93/serverInfoParaguay
apps/venv/lib/python2.7/site-packages/django/contrib/gis/db/models/sql/conversion.py
308
2015
""" This module holds simple classes to convert geospatial values from the database. """ from django.contrib.gis.db.models.fields import GeoSelectFormatMixin from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.measure import Area, Distance class BaseField(object): empty_strings_allow...
apache-2.0
magchips/labalyzer
setup.py
1
3470
#!/usr/bin/env python # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2010 <Atreju Tauschinsky> <Atreju.Tauschinsky@gmx.de> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version ...
gpl-3.0
Gentlemanlylad5/googlepersonfinder
app/restore.py
16
4272
#!/usr/bin/python2.7 # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
johankaito/fufuka
microblog/old-flask/lib/python2.7/site-packages/sqlalchemy/ext/horizontal_shard.py
81
4814
# ext/horizontal_shard.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Horizontal sharding support. Defines a rudimental 'horizontal sharding' ...
apache-2.0
kobejean/tensorflow
tensorflow/contrib/data/python/kernel_tests/serialization/flat_map_dataset_serialization_test.py
14
3933
# 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...
apache-2.0
sxhao/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py
121
13709
# 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 of conditions and the f...
bsd-3-clause
drawks/ansible
lib/ansible/modules/network/checkpoint/checkpoint_task_facts.py
30
2599
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
firmlyjin/brython
www/src/Lib/test/pystone.py
718
7379
#! /usr/bin/python3.3 """ "PYSTONE" Benchmark Program Version: Python/1.1 (corresponds to C/1.1 plus 2 Pystone fixes) Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013. Translated from ADA to C by Rick Richardson. Every method to preserve ADA-likeness ha...
bsd-3-clause
moi65/cookiecutter
tests/test_output_folder.py
21
1991
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_output_folder ------------------ Test formerly known from a unittest residing in test_generate.py named TestOutputFolder.test_output_folder """ from __future__ import unicode_literals import os import pytest from cookiecutter import generate from cookiecutter i...
bsd-3-clause
Intel-Corporation/tensorflow
tensorflow/python/compiler/xla/xla.py
3
22372
# Copyright 2018 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
arista-eosplus/ansible
lib/ansible/modules/cloud/ovirt/ovirt_nics.py
16
8376
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
gpl-3.0
AICP/external_chromium_org
tools/clang/scripts/update.py
8
8328
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Windows can't run .sh files, so this is a Python implementation of update.sh. This script should replace update.sh on all platfo...
bsd-3-clause
5GExchange/escape
mininet/examples/consoles.py
2
15613
#!/usr/bin/python """ consoles.py: bring up a bunch of miniature consoles on a virtual network This demo shows how to monitor a set of nodes by using Node's monitor() and Tkinter's createfilehandler(). We monitor nodes in a couple of ways: - First, each individual node is monitored, and its output is added to its...
apache-2.0
blink1073/scikit-image
doc/examples/edges/plot_active_contours.py
4
3317
""" ==================== Active Contour Model ==================== The active contour model is a method to fit open or closed splines to lines or edges in an image. It works by minimising an energy that is in part defined by the image and part by the spline's shape: length and smoothness. The minimization is done impl...
bsd-3-clause
codepython/restcommander
play-1.2.4/python/Lib/site-packages/win32/lib/mmsystem.py
21
30723
# Generated by h2py from d:/msdev/include/mmsystem.h MAXPNAMELEN = 32 MAXERRORLENGTH = 256 MAX_JOYSTICKOEMVXDNAME = 260 MM_MICROSOFT = 1 MM_MIDI_MAPPER = 1 MM_WAVE_MAPPER = 2 MM_SNDBLST_MIDIOUT = 3 MM_SNDBLST_MIDIIN = 4 MM_SNDBLST_SYNTH = 5 MM_SNDBLST_WAVEOUT = 6 MM_SNDBLST_WAVEIN = 7 MM_ADLIB = 9 MM_MPU401_MIDIOUT = 1...
apache-2.0
olga-perederieieva/pyDEA
pyDEA/main.py
1
3347
''' This module contains methods for running pyDEA from terminal. ''' import sys from pyDEA.core.data_processing.parameters import parse_parameters_from_file from pyDEA.core.utils.run_routine import RunMethodTerminal from pyDEA.core.utils.dea_utils import clean_up_pickled_files, get_logger def main(filename, output_...
mit
gdimitris/ChessPuzzlerBackend
Virtual_Environment/lib/python2.7/site-packages/pbr/version.py
47
18561
# Copyright 2012 OpenStack Foundation # Copyright 2012-2013 Hewlett-Packard Development Company, L.P. # # 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.ap...
mit
wireservice/csvkit
setup.py
1
2897
#!/usr/bin/env python import sys from setuptools import setup install_requires = [ 'agate>=1.6.1', 'agate-excel>=0.2.2', 'agate-dbf>=0.2.0', 'agate-sql>=0.5.3', 'six>=1.6.1', 'setuptools', ] if sys.version_info < (2, 7): install_requires.append('argparse>=1.2.1') install_requires.appe...
mit
jayceyxc/hue
desktop/core/ext-py/elementtree/setup.py
45
1306
#!/usr/bin/env python # # Setup script for the elementtree library # $Id: setup.py 2326 2005-03-17 07:45:21Z fredrik $ # # Usage: python setup.py install # from distutils.core import setup try: # add download_url syntax to distutils from distutils.dist import DistributionMetadata DistributionMetadata.clas...
apache-2.0
dr-robertk/opm-common
python/pybind11/tests/test_chrono.py
27
2890
from pybind11_tests import chrono as m import datetime def test_chrono_system_clock(): # Get the time from both c++ and datetime date1 = m.test_chrono1() date2 = datetime.datetime.today() # The returned value should be a datetime assert isinstance(date1, datetime.datetime) # The numbers sho...
gpl-3.0
lizardsystem/lizard-kpi
lizard_kpi/testsettings.py
1
3003
import os from lizard_ui.settingshelper import setup_logging from lizard_ui.settingshelper import STATICFILES_FINDERS DEBUG = True TEMPLATE_DEBUG = True # SETTINGS_DIR allows media paths and so to be relative to this settings file # instead of hardcoded to c:\only\on\my\computer. SETTINGS_DIR = os.path.dirname(os.pa...
gpl-3.0
M3nin0/supreme-broccoli
Web/Flask/site_/lib/python3.5/site-packages/setuptools/msvc.py
19
37087
""" Improved support for Microsoft Visual C++ compilers. Known supported compilers: -------------------------- Microsoft Visual C++ 9.0: Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64); Microsoft Windows SDK 7.0 (x86, x64, ia64); Microsoft Windows SDK 6.1 (x86, x64, ia64) Microsoft Visual C++ 10...
apache-2.0
ZachMassia/platformio
platformio/builder/scripts/nordicnrf51.py
1
2079
# Copyright 2014-2016 Ivan Kravets <me@ikravets.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
pancentric/django-cms
cms/migrations/0004_textobjects.py
385
19523
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Dummy migration pass def backwards(self, orm): # Dummy migration pass models = { ...
bsd-3-clause
Tchanders/socorro
socorro/unittest/external/happybase/test_crash_data.py
11
8059
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os from nose.plugins.skip import SkipTest from nose.tools import eq_ from configman import ConfigurationManager, ...
mpl-2.0
manazhao/tf_recsys
tensorflow/python/estimator/canned/optimizers_test.py
70
3306
# 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...
apache-2.0
carvalhomb/tsmells
guess/src/Lib/token.py
4
3030
#! /usr/bin/env python """Token constants (from "token.h").""" # This file is automatically generated; please don't muck it up! # # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # # python Lib/token.py #--start const...
gpl-2.0
IV-GII/SocialCookies
ENV1/lib/python2.7/site-packages/django/conf/locale/hr/formats.py
118
2068
# -*- 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 = 'j. E Y.' TIME_FORMAT = 'H:i:s' DA...
gpl-2.0
havatv/QGIS
tests/src/python/test_authmanager_pki_ows.py
13
7719
# -*- coding: utf-8 -*- """ Tests for auth manager WMS/WFS using QGIS Server through PKI enabled qgis_wrapped_server.py. This is an integration test for QGIS Desktop Auth Manager WFS and WMS provider and QGIS Server WFS/WMS that check if QGIS can use a stored auth manager auth configuration to access an HTTP Basic pro...
gpl-2.0
vmanoria/bluemix-hue-filebrowser
hue-3.8.1-bluemix/desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/Hash/HMAC.py
123
7302
# HMAC.py - Implements the HMAC algorithm as described by RFC 2104. # # =================================================================== # Portions Copyright (c) 2001, 2002, 2003 Python Software Foundation; # All Rights Reserved # # This file contains code from the Python 2.2 hmac.py module (the # "Original Code"), ...
gpl-2.0
bikashgupta11/javarobot
src/main/resources/jython/Lib/email/test/test_email_torture.py
150
3669
# Copyright (C) 2002-2004 Python Software Foundation # # A torture test of the email package. This should not be run as part of the # standard Python test suite since it requires several meg of email messages # collected in the wild. These source messages are not checked into the # Python distro, but are available as...
gpl-3.0
TurBoss/HostilPlanet
lib/pgu/gui/form.py
23
2636
""" """ from . import widget class Form(widget.Widget): """A form that automatically will contain all named widgets. After a form is created, all named widget that are subsequently created are added to that form. You may use dict style access to access named widgets. Example: f = g...
gpl-2.0
Gazer022/bitcoin
test/functional/forknotify.py
16
2125
#!/usr/bin/env python3 # Copyright (c) 2014-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 -alertnotify option.""" import os import time from test_framework.test_framework import Bitco...
mit
sosreport/sos
sos/report/plugins/ovn_host.py
2
1792
# Copyright (C) 2018 Mark Michelson <mmichels@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 General Public Li...
gpl-2.0
simon8233/Ezilla3.0
share/websockify/websocket.py
4
34456
#!/usr/bin/env python ''' Python WebSocket library with support for "wss://" encryption. Copyright 2011 Joel Martin Licensed under LGPL version 3 (see docs/LICENSE.LGPL-3) Supports following protocol versions: - http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75 - http://tools.ietf.org/html/draft-...
gpl-3.0
luser/socorro
webapp-django/crashstats/authentication/tests/test_views.py
2
3328
import json import re from nose.tools import eq_, ok_ from django.conf import settings from django.core.urlresolvers import reverse from crashstats.base.tests.testbase import DjangoTestCase from ..browserid_mock import mock_browserid class TestViews(DjangoTestCase): def _login_attempt(self, email, assertion='...
mpl-2.0
zyhh/losslessh264
module/task_utils.py
75
5586
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. MAX_ARGS = 15 boilerplate = "/* This Source Code Form is subject to the terms of the Mozilla Public\n\ * License, v. 2....
bsd-2-clause
unho/pootle
pootle/core/views/paths.py
5
1763
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from django.utils.decorators import method_d...
gpl-3.0
MountainWei/nova
nova/tests/unit/test_flavors.py
39
24595
# Copyright 2011 Ken Pepple # 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
gttm/RASP
kafka-producers/PcapProducer.py
2
1325
#!/usr/bin/python import gzip import time import calendar import random from kafka import SimpleProducer, KafkaClient brokerList = ["worker1:9092", "worker2:9092", "worker3:9092", "worker4:9092"] kafka = KafkaClient(brokerList) producer = SimpleProducer(kafka, async=True, batch_send_every_n=100, batch_send_every_t=5) ...
apache-2.0
AccelAI/accel.ai
flask-aws/lib/python2.7/site-packages/boto/sdb/item.py
17
6974
# 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
blacktear23/django
tests/regressiontests/generic_views/urls.py
28
9307
from django.conf.urls.defaults import * from django.views.generic import TemplateView from django.views.decorators.cache import cache_page import views urlpatterns = patterns('', # base #(r'^about/login-required/$', # views.DecoratedAboutView()), # TemplateView (r'^template/no_template/$', ...
bsd-3-clause
swegener/gruvi
tests/test_logging.py
2
6559
# # This file is part of gruvi. Gruvi is free software available under the # terms of the MIT license. See the file "LICENSE" that was provided # together with this source file for the licensing terms. # # Copyright (c) 2012-2017 the gruvi authors. See the file "AUTHORS" for a # complete list. from __future__ import a...
mit
Lawrence-Liu/scikit-learn
sklearn/covariance/shrunk_covariance_.py
209
18133
""" Covariance estimators using shrinkage. Shrinkage corresponds to regularising `cov` using a convex combination: shrunk_cov = (1-shrinkage)*cov + shrinkage*structured_estimate. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Virgile ...
bsd-3-clause
sigmavirus24/glance
glance/tests/unit/v1/test_registry_api.py
4
82500
# -*- coding: utf-8 -*- # Copyright 2010-2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/...
apache-2.0
Widiot/simpleblog
venv/lib/python3.5/site-packages/werkzeug/exceptions.py
104
20505
# -*- coding: utf-8 -*- """ werkzeug.exceptions ~~~~~~~~~~~~~~~~~~~ This module implements a number of Python exceptions you can raise from within your views to trigger a standard non-200 response. Usage Example ------------- :: from werkzeug.wrappers import BaseRequest ...
mit