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
webmull/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py
117
16083
# Copyright (C) 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: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and th...
bsd-3-clause
esthermm/odoo-addons
stock_information_mrp/models/stock_information.py
4
5085
# -*- coding: utf-8 -*- # (c) 2016 Alfredo de la Fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields, api, _ import openerp.addons.decimal_precision as dp class StockInformation(models.Model): _inherit = 'stock.information' @api.multi def ...
agpl-3.0
raymondgom/pmip6ns3.13new
src/visualizer/visualizer/ipython_view.py
89
10362
""" Backend to the console plugin. @author: Eitan Isaacson @organization: IBM Corporation @copyright: Copyright (c) 2007 IBM Corporation @license: BSD All rights reserved. This program and the accompanying materials are made available under the terms of the BSD which accompanies this distribution, and is available ...
gpl-2.0
saneyuki/servo
python/servo/bootstrap_commands.py
1
22544
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
mpl-2.0
followloda/PornGuys
FlaskServer/venv/Lib/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py
356
1555
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName, Attrs from genshi.core import START, END, TEXT, COMMENT, DOCTYPE def to_genshi(walker): text = [] for token in walker: type = token["type"] if type in ("Characters", "SpaceCharacters"): ...
gpl-3.0
jesseengel/magenta
magenta/models/piano_genie/util.py
2
2633
# Copyright 2019 The Magenta Authors. # # 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 ...
apache-2.0
gusmaogabriels/GPy
GPy/kern/_src/todo/ODE_1.py
19
6388
# Copyright (c) 2012, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) from kernpart import Kernpart import numpy as np class ODE_1(Kernpart): """ kernel resultiong from a first order ODE with OU driving GP :param input_dim: the number of input dimension, has to...
bsd-3-clause
fancasy/final
lib/flask/wrappers.py
4
6893
# -*- coding: utf-8 -*- """ flask.wrappers ~~~~~~~~~~~~~~ Implements the WSGI wrappers (request and response). :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase from w...
apache-2.0
Just-D/chromium-1
tools/site_compare/drivers/win32/keyboard.py
173
6934
#!/usr/bin/env python # Copyright (c) 2011 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. """SiteCompare module for simulating keyboard input. This module contains functions that can be used to simulate a user pressing k...
bsd-3-clause
cabanm/project-euler
Problem 23/problem23.py
1
1277
# Find the sum of all the positive integers which # cannot be written as the sum of two abundant numbers. # # Facts: # All integers greater than 28123 can be # written as the sum of two abundant numbers. # Abundant number = sum of proper divisors of n exceed n. # # Find all abundant numbers up to and including ...
gpl-2.0
SteveHNH/ansible
lib/ansible/modules/network/aci/aci_epg_to_domain.py
18
7721
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
MihaiMoldovanu/ansible
lib/ansible/modules/network/aos/aos_blueprint_param.py
19
12925
#!/usr/bin/python # # (c) 2017 Apstra Inc, <community@apstra.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 opt...
gpl-3.0
mapbox/atom-shell
script/create-dist.py
1
7365
#!/usr/bin/env python import argparse import os import re import shutil import subprocess import sys import tarfile from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, NODE_VERSION, \ TARGET_PLATFORM, DIST_ARCH from lib.util import scoped_cwd, rm_rf, get_atom_shell_version, make_zip, \ ...
mit
llhe/tensorflow
tensorflow/contrib/metrics/python/ops/metric_ops_test.py
6
203166
# 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
Haynie-Research-and-Development/jarvis
deps/lib/python3.4/site-packages/google/protobuf/text_encoding.py
152
4617
# 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 are # met: # # * Redi...
gpl-2.0
requests/requests-ntlm
tests/functional/test_functional.py
1
2038
import requests import requests_ntlm """ This test is meant to run with Appveyor but until the integration is solved it can only be run locally. The script setup_iis.ps1 can set up an IIS server with the 4 scenarios tested below if you wish to run a sanity check """ username = '.\\User' password = 'Password01' http_w...
isc
vks/servo
tests/wpt/css-tests/tools/html5lib/html5lib/filters/optionaltags.py
1727
10500
from __future__ import absolute_import, division, unicode_literals from . import _base class Filter(_base.Filter): def slider(self): previous1 = previous2 = None for token in self.source: if previous1 is not None: yield previous2, previous1, token previous2...
mpl-2.0
tectronics/mythbox
resources/test/mythboxtest/test_orphans.py
5
4262
# # MythBox for XBMC - http://mythbox.googlecode.com # Copyright (C) 2011 analogue@yahoo.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 2 # of the License, or (at you...
gpl-2.0
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/pywin32-219/com/win32comext/axdebug/codecontainer.py
18
8885
"""A utility class for a code container. A code container is a class which holds source code for a debugger. It knows how to color the text, and also how to translate lines into offsets, and back. """ import sys from win32com.axdebug import axdebug import tokenize from util import RaiseNotImpl, _wrap from win32com....
mit
DavidGuben/rcbplayspokemon
app/pywin32-220/com/win32comext/propsys/pscon.py
17
48201
# hand generated from propsys.h ## PROPENUMTYPE, used with IPropertyEnumType PET_DISCRETEVALUE = 0 PET_RANGEDVALUE = 1 PET_DEFAULTVALUE = 2 PET_ENDRANGE = 3 PDTF_DEFAULT = 0 PDTF_MULTIPLEVALUES = 0x1 PDTF_ISINNATE = 0x2 PDTF_ISGROUP = 0x4 PDTF_CANGROUPBY = 0x8 PDTF_CANSTACKBY = 0x10 PDTF_ISTREEPROPERTY = 0x20 PDTF_IN...
mit
ivanhorvath/openshift-tools
openshift/installer/vendored/openshift-ansible-3.9.14-1/roles/lib_utils/src/class/yedit.py
7
24645
# flake8: noqa # pylint: skip-file class YeditException(Exception): ''' Exception class for Yedit ''' pass # pylint: disable=too-many-public-methods class Yedit(object): ''' Class to modify yaml files ''' re_valid_key = r"(((\[-?\d+\])|([0-9a-zA-Z%s/_-]+)).?)+$" re_key = r"(?:\[(-?\d+)\])|([0-9a...
apache-2.0
afh/cmakedash
cmakedash.py
1
1690
#!/usr/bin/env python # # cmakedash - a dash docset generator for CMake import os import re import subprocess from bs4 import BeautifulSoup, NavigableString, Tag from docsetgenerator import DocsetGenerator class CMakeDocsetGenerator (DocsetGenerator): def __init__(self): DocsetGenerator.__init__(self) self....
mit
dgoedkoop/QGIS
python/plugins/MetaSearch/dialogs/manageconnectionsdialog.py
36
6685
# -*- coding: utf-8 -*- ############################################################################### # # CSW Client # --------------------------------------------------------- # QGIS Catalog Service client. # # Copyright (C) 2010 NextGIS (http://nextgis.org), # Alexander Bruy (alexander.bruy@gmail...
gpl-2.0
hj3938/panda3d
direct/src/showbase/BulletinBoardWatcher.py
14
2085
"""Undocumented Module""" __all__ = ['BulletinBoardWatcher'] from direct.directnotify import DirectNotifyGlobal from direct.showbase.PythonUtil import Functor, makeList from direct.showbase import DirectObject class BulletinBoardWatcher(DirectObject.DirectObject): """ This class allows you to wait for a set of p...
bsd-3-clause
Dino0631/RedRain-Bot
lib/youtube_dl/extractor/lego.py
42
6137
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( unescapeHTML, parse_duration, get_element_by_class, ) class LEGOIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?lego\.com/(?P<locale>[^/]+)/(...
gpl-3.0
HiSPARC/station-software
user/python/Lib/site-packages/pip/_vendor/chardet/euckrfreq.py
342
13546
######################## 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-3.0
slohse/ansible
lib/ansible/modules/network/f5/bigip_device_httpd.py
9
22210
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
AladdinSonni/youtube-dl
youtube_dl/extractor/appleconnect.py
139
1848
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( str_to_int, ExtractorError ) class AppleConnectIE(InfoExtractor): _VALID_URL = r'https?://itunes\.apple\.com/\w{0,2}/?post/idsa\.(?P<id>[\w-]+)' _TEST = { 'url': 'https://itunes.app...
unlicense
fidomason/kbengine
kbe/src/lib/python/Tools/pynche/Main.py
116
6406
"""Pynche -- The PYthon Natural Color and Hue Editor. Contact: %(AUTHNAME)s Email: %(AUTHEMAIL)s Version: %(__version__)s Pynche is based largely on a similar color editor I wrote years ago for the SunView window system. That editor was called ICE: the Interactive Color Editor. I'd always wanted to port the edito...
lgpl-3.0
johnson1228/pymatgen
pymatgen/cli/pmg_analyze.py
9
4753
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals import os import re import logging import multiprocessing from tabulate import tabulate from pymatgen.io.vasp import Outcar from pymatgen.apps.borg.hive impo...
mit
rapidhere/open-hackathon
open-hackathon-server/src/hackathon/expr/alauda_docker_expr_starter.py
6
1452
# -*- coding: utf-8 -*- """ Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd.  All rights reserved. The MIT License (MIT) 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 res...
mit
hjanime/VisTrails
vistrails/db/versions/v0_9_3/domain/workflow.py
1
7277
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
bsd-3-clause
axbaretto/beam
sdks/python/.tox/py27gcp/lib/python2.7/site-packages/pyasn1_modules/rfc1157.py
127
3285
# # SNMPv1 message syntax # # ASN.1 source from: # http://www.ietf.org/rfc/rfc1157.txt # # Sample captures from: # http://wiki.wireshark.org/SampleCaptures/ # from pyasn1.type import univ, namedtype, namedval, tag, constraint from pyasn1_modules import rfc1155 class Version(univ.Integer): namedValues = namedval.Na...
apache-2.0
Wynjones1/psemu
deps/googletest/googlemock/scripts/fuse_gmock_files.py
242
8631
#!/usr/bin/env python # # Copyright 2009, 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
julen/django-allauth
allauth/socialaccount/fields.py
69
2092
# Courtesy of django-social-auth import json from django.core.exceptions import ValidationError from django.db import models from django.utils import six try: from django.utils.encoding import smart_unicode as smart_text except ImportError: from django.utils.encoding import smart_text class JSONField(six.wi...
mit
wreckJ/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/gdal/geometries.py
388
26357
""" The OGRGeometry is a wrapper for using the OGR Geometry class (see http://www.gdal.org/ogr/classOGRGeometry.html). OGRGeometry may be instantiated when reading geometries from OGR Data Sources (e.g. SHP files), or when given OGC WKT (a string). While the 'full' API is not present yet, the API is "pythonic" u...
apache-2.0
cysnake4713/account-financial-tools
account_balance_line/account_move_line.py
31
1570
# -*- coding: utf-8 -*- ############################################################################## # # Author: Vincent Renaville (Camptocamp) # Copyright 2010-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...
agpl-3.0
semanticize/semanticizest
semanticizest/parse_wikidump/__init__.py
1
11223
"""Parsing utilities for Wikipedia database dumps.""" from __future__ import print_function from os.path import basename from bz2 import BZ2File from collections import Counter, namedtuple import gzip from HTMLParser import HTMLParser from itertools import chain import logging import re import xml.etree.ElementTree a...
apache-2.0
pshchelo/heat
heat/tests/test_watch.py
2
38660
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
apache-2.0
v2-labs/OSX-ShaderMan
prototype.py
4
54765
""" Main code for ShaderMan.Next. Still called prototype.py for reasons I don't understand by myself :) """ import os import glob import sys import inspect import logging curpath = os.path.dirname(inspect.getfile(sys._getframe(0))) if curpath=="": curpath=os.getcwd() sys.path.append(curpath) import ...
bsd-3-clause
KelSolaar/sIBL_GUI
sibl_gui/components/core/inspector/models.py
1
2265
#!/usr/bin/env python # -*- coding: utf-8 -*- """ **models.py** **Platform:** Windows, Linux, Mac Os X. **Description:** Defines the :class:`sibl_gui.components.core.inspector.inspector.Inspector` Component Interface class Models. **Others:** """ from __future__ import unicode_literals import foundat...
gpl-3.0
rismalrv/edx-platform
lms/djangoapps/edxnotes/views.py
72
3809
""" Views related to EdxNotes. """ import json import logging from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseBadRequest, Http404 from django.conf import settings from django.core.urlresolvers import reverse from edxmako.shortcuts import render_to_response fro...
agpl-3.0
KirillMysnik/ArcJail
srcds/addons/source-python/plugins/arcjail/modules/games/base_classes/prepare_time.py
1
6961
# This file is part of ArcJail. # # ArcJail 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. # # ArcJail is distributed in the hope that...
gpl-3.0
MajorMajor807/Cpp_Final_Project
third_party/gtest/test/gtest_catch_exceptions_test.py
2139
9901
#!/usr/bin/env python # # Copyright 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 o...
gpl-3.0
marcellodesales/svnedge-console
ext/windows/pkg-toolkit/pkg/vendor-packages/pkg/search_errors.py
4
4941
#!/usr/bin/python2.4 # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://w...
agpl-3.0
hfp/tensorflow-xsmm
tensorflow/api_template.__init__.py
3
4370
# 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
sekikn/ambari
ambari-common/src/main/python/ambari_ws4py/server/wsgirefserver.py
2
5353
# -*- coding: utf-8 -*- __doc__ = """ Add WebSocket support to the built-in WSGI server provided by the :py:mod:`wsgiref`. This is clearly not meant to be a production server so please consider this only for testing purpose. Mostly, this module overrides bits and pieces of the built-in classes so that it supports the ...
apache-2.0
chenjiafan/pjsip
tests/pjsua/mod_sipp.py
8
8609
# $Id: mod_sipp.py 5067 2015-04-13 12:28:02Z nanang $ ## Automatic test module for SIPp. ## ## This module will need a test driver for each SIPp scenario: ## - For simple scenario, i.e: make/receive call (including auth), this ## test module can auto-generate a default test driver, i.e: make call ## or apply auto ...
gpl-2.0
infra-structure/pinball
tests/pinball/repository/repository_test.py
6
5251
# Copyright 2015, Pinterest, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
BuildingLink/sentry
src/sentry/security/__init__.py
3
1036
from __future__ import absolute_import, print_function import logging from django.utils import timezone from .emails import generate_security_email logger = logging.getLogger('sentry.security') def capture_security_activity(account, type, actor, ip_address, context=None, send_email=T...
bsd-3-clause
sjebbara/gensim
gensim/models/lsi_dispatcher.py
33
7100
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ USAGE: %(program)s SIZE_OF_JOBS_QUEUE Dispatcher process which orchestrates distributed LSI computations. Run this \ script onl...
gpl-3.0
YOTOV-LIMITED/kuma
vendor/packages/logilab/common/sphinx_ext.py
117
3329
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
mpl-2.0
abhishek-ch/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/formtools/tests/wizard/wizardtests/tests.py
116
16304
from __future__ import unicode_literals import os from django import forms from django.test import TestCase from django.test.client import RequestFactory from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.formto...
apache-2.0
fishroot/nemoa
nemoa/dataset/commons/labels/__init__.py
1
2018
# -*- coding: utf-8 -*- __author__ = 'Patrick Michl' __email__ = 'frootlab@gmail.com' __license__ = 'GPLv3' import nemoa import numpy import importlib def convert(list, input, output = None, filter = False): generic_types = ['number', 'string', 'float'] if isinstance(list, (numpy.ndarray)): list = ...
gpl-3.0
nathan-hoad/python-icap
icap/parsing.py
2
10383
import gzip from collections import namedtuple from io import BytesIO, SEEK_END from werkzeug import cached_property from .utils import parse_encapsulated_field, convert_offsets_to_sizes from .errors import (InvalidEncapsulatedHeadersError, MalformedRequestError, abort) __all__ = [ 'Chunke...
bsd-3-clause
burzillibus/RobHome
venv/lib/python2.7/site-packages/chardet/__init__.py
1778
1295
######################## BEGIN LICENSE BLOCK ######################## # 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 ve...
mit
ngokevin/cyder
.virtualenv/lib/python2.6/site-packages/pip-1.0.2-py2.6.egg/pip/req.py
7
64177
import sys import os import shutil import re import zipfile import pkg_resources import tempfile from pip.locations import bin_py, running_under_virtualenv from pip.exceptions import InstallationError, UninstallationError from pip.vcs import vcs from pip.log import logger from pip.util import display_path, rmtree from ...
bsd-3-clause
deandunbar/bitwave
hackathon_version/venv/lib/python2.7/site-packages/django/contrib/gis/gdal/driver.py
104
2477
# prerequisites imports from ctypes import c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi from django.utils import six from django.utils.encoding import force_bytes # For more information, see...
mit
doomsterinc/odoo
openerp/workflow/__init__.py
378
3793
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2014 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
SamiHiltunen/invenio-classifier
invenio_classifier/normalizer.py
2
18618
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2008, 2009, 2010, 2011, 2013, 2014, 2015 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 # Li...
gpl-2.0
jkrishnavs/linux
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
teosz/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/inputstream.py
618
30855
from __future__ import absolute_import, division, unicode_literals from six import text_type from six.moves import http_client import codecs import re from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .constants import encodings, ReparseException from . import utils from io import String...
mpl-2.0
ovnicraft/odoo
openerp/tools/translate.py
43
45413
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
AnotherIvan/calibre
manual/epub.py
13
3510
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os from sphinx.builders.epub import EpubBuilder from calibre.ebooks.oeb.bas...
gpl-3.0
drawks/ansible
lib/ansible/plugins/action/cli_config.py
42
1287
# # Copyright 2018 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansibl...
gpl-3.0
trishnaguha/ansible
lib/ansible/modules/network/f5/bigip_monitor_external.py
14
23275
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
espadrine/opera
chromium/src/third_party/jinja2/ext.py
114
23910
# -*- coding: utf-8 -*- """ jinja2.ext ~~~~~~~~~~ Jinja extensions allow to add custom tags similar to the way django custom tags work. By default two example extensions exist: an i18n and a cache extension. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from collections impor...
bsd-3-clause
Jusedawg/SickRage
lib/sqlalchemy/ext/declarative/__init__.py
77
47619
# ext/declarative/__init__.py # Copyright (C) 2005-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 """ Synopsis ======== SQLAlchemy object-relational configuration involves...
gpl-3.0
KNMI/VERCE
verce-hpc-pe/src/networkx/algorithms/simple_paths.py
33
3813
# -*- coding: utf-8 -*- # Copyright (C) 2012 by # Sergio Nery Simoes <sergionery@gmail.com> # All rights reserved. # BSD license. import networkx as nx __author__ = """\n""".join(['Sérgio Nery Simões <sergionery@gmail.com>', 'Aric Hagberg <aric.hagberg@gmail.com>']) __all__ = ['a...
mit
Yen-Chung-En/2015cdb_W12
static/Brython3.1.1-20150328-091302/Lib/gc.py
743
3548
"""This module provides access to the garbage collector for reference cycles. enable() -- Enable automatic garbage collection. disable() -- Disable automatic garbage collection. isenabled() -- Returns true if automatic collection is enabled. collect() -- Do a full collection right now. get_count() -- Return the curren...
agpl-3.0
topicusonderwijs/zxing-ios
cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/__init__.py
34
10758
"""SCons.Tool.Packaging SCons Packaging Tool. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the ...
apache-2.0
HalcyonChimera/osf.io
tests/test_cas_authentication.py
4
14397
# -*- coding: utf-8 -*- import furl import responses import mock from nose.tools import * # noqa: F403 import unittest from framework.auth import cas from tests.base import OsfTestCase, fake from osf_tests.factories import UserFactory def make_successful_response(user): return cas.CasResponse( authenti...
apache-2.0
JohnGriffiths/dipy
scratch/very_scratch/eddy_currents.py
22
1282
import numpy as np import dipy as dp import nibabel as ni dname = '/home/eg01/Data_Backup/Data/Eleftherios/CBU090133_METHODS/20090227_145404/Series_003_CBU_DTI_64D_iso_1000' #dname = '/home/eg01/Data_Backup/Data/Frank_Eleftherios/frank/20100511_m030y_cbu100624/08_ep2d_advdiff_101dir_DSI' data,affine,bvals,gradients...
bsd-3-clause
staticlibs/android-ndk-r9d-arm-linux-androideabi-4.8
lib/python2.7/sqlite3/test/transactions.py
127
7347
#-*- coding: ISO-8859-1 -*- # pysqlite2/test/transactions.py: tests transactions # # Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages #...
gpl-2.0
FrankWang33/cuda-convnet2
shownet.py
180
18206
# Copyright 2014 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...
apache-2.0
yinquan529/platform-external-chromium_org
tools/PRESUBMIT.py
43
1548
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Top-level presubmit script for bisect/perf trybot. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the pre...
bsd-3-clause
thesuperzapper/tensorflow
tensorflow/python/kernel_tests/sparse_serialization_ops_test.py
99
8330
# 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
telefonicaid/fiware-cloto
fiware_cloto/environments/log.py
4
1219
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright 2014 Telefónica Investigación y Desarrollo, S.A.U # # This file is part of FI-WARE project. # # 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 th...
apache-2.0
marado/youtube-dl
youtube_dl/extractor/npo.py
1
12656
from __future__ import unicode_literals from .subtitles import SubtitlesInfoExtractor from .common import InfoExtractor from ..utils import ( fix_xml_ampersands, parse_duration, qualities, strip_jsonp, unified_strdate, url_basename, ) class NPOBaseIE(SubtitlesInfoExtractor): def _get_toke...
unlicense
jjmleiro/hue
desktop/core/ext-py/Pygments-1.3.1/pygments/lexers/functional.py
55
28768
# -*- coding: utf-8 -*- """ pygments.lexers.functional ~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for functional languages. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, bygroups, incl...
apache-2.0
kustodian/ansible
lib/ansible/module_utils/redhat.py
141
10351
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
CMLL/taiga-back
taiga/projects/history/migrations/0007_set_bloked_note_and_is_blocked_in_snapshots.py
16
1624
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.core.exceptions import ObjectDoesNotExist from taiga.projects.history.services import (make_key_from_model_object, get_model_from_key, get_pk_from_key) def set_current_values_of_blocked_note_a...
agpl-3.0
thfabian/serialbox2
src/serialbox-python/serialbox/slice.py
2
1163
#!/usr/bin/python3 # -*- coding: utf-8 -*- ##===-----------------------------------------------------------------------------*- Python -*-===## ## ## S E R I A L B O X ## ## This file is distributed under terms of BSD license. ## See LICENSE.txt for more information. ## ##===----------...
bsd-2-clause
fredericlepied/ansible
lib/ansible/modules/storage/zfs/zpool_facts.py
9
6172
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Adam Števko <adam.stevko@gmail.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 ANSIBLE_METADATA = {'metadata_version': '1.0', ...
gpl-3.0
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/resources/types/mobile_device_constant.py
1
2416
# -*- coding: utf-8 -*- # Copyright 2020 Google 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...
apache-2.0
Asana/bazel
third_party/protobuf/3.0.0/python/google/protobuf/internal/api_implementation.py
83
4872
# 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 are # met: # # * Redi...
apache-2.0
spencerjanssen/Flexget
gen-changelog.py
19
1769
# Writes a changelog in trac WikiFormatting based on a git log from __future__ import unicode_literals, division, absolute_import import codecs from itertools import ifilter import os import re import subprocess import sys from bs4 import BeautifulSoup import dateutil.parser import requests out_path = 'ChangeLog' if...
mit
ravindrapanda/tensorflow
tensorflow/contrib/nccl/python/ops/nccl_ops.py
23
8121
# 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
lalanza808/rharvest
rharvest.py
1
2791
#!/usr/bin/env python """ Image scraper utilizing Reddit Python API, PRAW. Requires PRAW library installed, or pip installed to get it. Choose a subreddit, it identifies pictures in that sub and downloads to specified directory. """ __author__ = 'lance - github.com/lalanza808' #######################################...
mit
StackPointCloud/ansible-modules-extras
cloud/amazon/ec2_vpc_route_table_facts.py
65
3706
#!/usr/bin/python # # This is a 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 Ansible library is distributed in the hope that i...
gpl-3.0
airspeed-velocity/asv
test/test_feed.py
2
3410
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import io import sys import datetime import xml.etree.ElementTree as etree import xml.dom.minidom import pytest from as...
bsd-3-clause
dzimine/mistral
mistral/openstack/common/py3kcompat/urlutils.py
13
1744
# # Copyright 2013 Canonical Ltd. # 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
CMSS-BCRDB/RDS
trove/tests/unittests/common/test_wsgi.py
5
1549
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
apache-2.0
mfraezz/osf.io
osf_tests/test_generate_sitemap.py
9
7286
import os import pytest import mock import shutil import tempfile import xml from future.moves.urllib.parse import urljoin from scripts import generate_sitemap from osf_tests.factories import (AuthUserFactory, ProjectFactory, RegistrationFactory, CollectionFactory, PreprintFactory, Pr...
apache-2.0
viveksh13/gymkhana
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py
484
10454
from collections import Mapping, MutableMapping try: from threading import RLock except ImportError: # Platform-specific: No threads available class RLock: def __enter__(self): pass def __exit__(self, exc_type, exc_value, traceback): pass try: # Python 2.7+ from ...
apache-2.0
tenvick/hugula
Client/tools/site-packages/PIL/ImageDraw.py
13
11655
# # The Python Imaging Library # $Id: ImageDraw.py 2817 2006-10-07 15:34:03Z fredrik $ # # drawing interface operations # # History: # 1996-04-13 fl Created (experimental) # 1996-08-07 fl Filled polygons, ellipses. # 1996-08-13 fl Added text support # 1998-06-28 fl Handle I and F images # 1998-12-29 fl Added ...
mit
6/GeoDJ
geodj/settings.py
1
5663
import os # Override these on production env os.environ.setdefault("APP_ENV", "development") os.environ.setdefault("SECRET_KEY", "^uhrm48x9y=1f&+$bg=oc(#23mp0*g5k%8+si9tdz7&4_xk&lf") if os.environ["APP_ENV"] == "development": try: # Add secret ENV varibales for development (e.g. API keys) to secrets.py ...
mit
Zhongqilong/mykbengineer
kbe/src/lib/python/Lib/encodings/unicode_internal.py
827
1196
""" Python 'unicode-internal' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is in...
lgpl-3.0
40223108/-2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/xml/sax/handler.py
925
13922
""" This module contains the core classes of version 2.0 of SAX for Python. This file provides only default classes with absolutely minimum functionality, from which drivers and applications can be subclassed. Many of these classes are empty and are included only as documentation of the interfaces. $Id$ """ version ...
gpl-3.0
userzimmermann/python-moretools
moretools/_types.py
1
2808
# python-moretools # # many more basic tools for python 2/3 # extending itertools, functools and operator # # Copyright (C) 2011-2016 Stefan Zimmermann <zimmermann.code@gmail.com> # # python-moretools is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License a...
gpl-3.0