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
odubno/microblog
flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py
319
1348
from socket import error as SocketError try: from select import poll, POLLIN except ImportError: # `poll` doesn't exist on OSX and other platforms poll = False try: from select import select except ImportError: # `select` doesn't exist on AppEngine. select = False def is_connection_dr...
bsd-3-clause
ahmetabdi/SickRage
lib/requests/packages/chardet/constants.py
3008
1335
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
gpl-3.0
raajitr/django_hangman
env/lib/python2.7/site-packages/django/db/models/fields/related_descriptors.py
9
50863
""" Accessors for related objects. When a field defines a relation between two models, each model class provides an attribute to access related instances of the other model class (unless the reverse accessor has been disabled with related_name='+'). Accessors are implemented as descriptors in order to customize acces...
mit
noba3/KoTos
addons/plugin.video.iptvxtra-trtv/resources/lib/requests/packages/chardet/langhebrewmodel.py
2763
11318
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Simon Montagu # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved...
gpl-2.0
pixelgremlins/ztruck
dj/lib/python2.7/site-packages/django/contrib/postgres/fields/array.py
86
8318
import json from django.contrib.postgres import lookups from django.contrib.postgres.forms import SimpleArrayField from django.contrib.postgres.validators import ArrayMaxLengthValidator from django.core import checks, exceptions from django.db.models import Field, IntegerField, Transform from django.utils import six f...
apache-2.0
XueqingLin/tensorflow
tensorflow/contrib/opt/python/training/variable_clipping_optimizer_test.py
16
6857
# 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
sunghan-chang/TizenRT
os/tools/discover.py
10
4155
#!/usr/bin/env python ############################################################################ # # Copyright 2016 Samsung Electronics 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...
apache-2.0
jiachenning/odoo
addons/account/account_invoice.py
3
79107
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
DJMelonz/basic-blog
django/contrib/auth/tests/permissions.py
231
1654
try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.contrib.auth.management import create_permissions from django.contrib.auth import models as auth_models from django.contrib.contenttypes import models as contenttypes_models from django.core.management import call...
bsd-3-clause
munyirik/python
cpython/Tools/unicode/comparecodecs.py
52
1440
#!/usr/bin/env python3 """ Compare the output of two codecs. (c) Copyright 2005, Marc-Andre Lemburg (mal@lemburg.com). Licensed to PSF under a Contributor Agreement. """ import sys def compare_codecs(encoding1, encoding2): print('Comparing encoding/decoding of %r and %r' % (encoding1, encoding2)) ...
bsd-3-clause
cswaroop/airflow
airflow/migrations/versions/1507a7289a2f_create_is_encrypted.py
37
1408
"""create is_encrypted Revision ID: 1507a7289a2f Revises: e3a246e0dc1 Create Date: 2015-08-18 18:57:51.927315 """ # revision identifiers, used by Alembic. revision = '1507a7289a2f' down_revision = 'e3a246e0dc1' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa from sqlalchemy.eng...
apache-2.0
lmazuel/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/virtual_machine_scale_set_update_os_disk.py
1
2121
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
timvandermeij/servo
tests/wpt/update/github.py
197
5152
# 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 json from urlparse import urljoin requests = None class GitHubError(Exception): def __init__(self, status, d...
mpl-2.0
sparkslabs/kamaelia_
Sketches/MPS/Experiments/Shard/ShardUser.py
6
2001
#!/usr/bin/python from Shards import ShardedPygameAppChassis from Shards import blitToSurface from Shards import waitBox from Shards import Fail from Shards import addListenEvent import InlineShards import MagnaDoodleShards def MagnaDoodle(**argd): """\ MagnaDoodle(...) -> A new MagnaDoodle component. A...
apache-2.0
memo/tensorflow
tensorflow/contrib/specs/python/summaries.py
164
8831
# 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 applicable ...
apache-2.0
BlackstoneEngineering/yotta
yotta/lib/access.py
3
14311
# Copyright 2014 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , import os import logging # Component, , represents an installed component, internal import component # Target, , represents an installed target, internal import target # Pack...
apache-2.0
acsone/project-service
project_service_type/project.py
28
1992
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camtocamp SA # @author Joël Grand-Guillaume # $Id: $ # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all pot...
agpl-3.0
mlavin/django
tests/template_tests/syntax_tests/test_verbatim.py
521
1658
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup class VerbatimTagTests(SimpleTestCase): @setup({'verbatim-tag01': '{% verbatim %}{{bare }}{% endverbatim %}'}) def test_verbatim_tag01(self): output = self.engine.render_to_string('verb...
bsd-3-clause
laserson/ibis
docs/sphinxext/ipython_sphinxext/ipython_directive.py
9
37645
# -*- coding: utf-8 -*- """ Sphinx directive to support embedded IPython code. This directive allows pasting of entire interactive IPython sessions, prompts and all, and their code will actually get re-executed at doc build time, with all prompts renumbered sequentially. It also allows you to input code as a pure pyth...
apache-2.0
mjsauvinen/P4UL
pyRaster/tif2NumpyTile.py
1
1956
#!/usr/bin/env python3 import sys import argparse import numpy as np from mapTools import * from utilities import filesFromList, writeLog from plotTools import addImagePlot import matplotlib.pyplot as plt ''' Author: Mikko Auvinen mikko.auvinen@helsinki.fi University of Helsinki & Finnish Meteor...
mit
guschmue/tensorflow
tensorflow/compiler/tests/depthwise_conv_op_test.py
43
15596
# 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
Livefyre/django-cms
cms/models/placeholderpluginmodel.py
49
1244
# -*- coding: utf-8 -*- from cms.models import CMSPlugin from cms.models.fields import PlaceholderField from cms.utils.copy_plugins import copy_plugins_to from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class PlaceholderReference(CMSPlugin): ...
bsd-3-clause
calou/compose
tests/unit/service_test.py
5
15680
from __future__ import unicode_literals from __future__ import absolute_import from .. import unittest import mock import docker from compose.service import Service from compose.container import Container from compose.const import LABEL_SERVICE, LABEL_PROJECT, LABEL_ONE_OFF from compose.service import ( ConfigEr...
apache-2.0
Kronopt/pipUpdateAll
pipUpdateAll.py
1
3682
#!python2 # coding: utf-8 """ PIP UPDATE ALL Updates outdated python modules using pip Checks outdated modules using "pip list --outdated --format columns", parses that column to only show relevant information (name, current version, new version) and then updates all detected modules using "pip install -U" followed by...
mit
leebird/legonlp
utils/runner.py
1
1644
import sys import os import codecs class Runner(object): runnerName = None def __init__(self): ''' read input files and process run directly on input files run directly on input dir process output ''' pass def run(self, args): ''' i...
gpl-2.0
x111ong/odoo
addons/purchase_double_validation/purchase_double_validation_installer.py
432
2315
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
stlcoin/stl
contrib/spendfrom/spendfrom.py
1
10053
#!/usr/bin/env python # # Use the raw transactions API to spend bitcoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a stlcoind or Stl...
mit
aarpon/obit_microscopy_core_technology
core-plugins/microscopy/1/dss/drop-boxes/MicroscopyDropbox/LeicaTIFFSeriesCompositeDatasetConfig.py
1
12298
# -*- coding: utf-8 -*- """ Created on Feb 20, 2014 @author: Aaron Ponti """ import re from MicroscopyCompositeDatasetConfig import MicroscopyCompositeDatasetConfig from LeicaTIFFSeriesMaximumIntensityProjectionGenerationAlgorithm import LeicaTIFFSeriesMaximumIntensityProjectionGenerationAlgorithm from ch.systemsx.c...
apache-2.0
akashlevy/Lyff
lyff_lambda/chardet/codingstatemachine.py
289
3590
######################## 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...
mit
gibiansky/tensorflow
tensorflow/python/tools/optimize_for_inference_lib.py
24
17111
# pylint: disable=g-bad-file-header # 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/LICENS...
apache-2.0
Haxjs/Hax
node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py
2485
5536
# This file comes from # https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py # Do not edit! Edit the upstream one instead. """Python module for generating .ninja files. Note that this is emphatically not a required piece of Ninja; it's just a helpful utility for build-file-generation systems that alr...
mit
crossbario/crossbar-fabric-cli
cbsh/idl/loader.py
1
16965
##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below apply. # # Should you enter ...
mit
kaoscoach/crits
crits/screenshots/views.py
15
4924
import json from django.contrib.auth.decorators import user_passes_test from django.http import HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext from crits.core.user_tools import user_can_view_data from crits.screenshots.handlers import get_screenshots_for_id, ge...
mit
MycroftAI/mycroft-core
test/integrationtests/voight_kampff/generate_feature.py
2
2177
# Copyright 2020 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
carolFrohlich/nipype
nipype/interfaces/camino/connectivity.py
9
6670
# -*- coding: utf-8 -*- """ Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) >>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data')) >>> os.chdir(datadir) """ from __future__ import print_functi...
bsd-3-clause
CI-WATER/TethysCluster
tethyscluster/commands/removekey.py
2
1719
# Copyright 2009-2014 Justin Riley # # This file is part of TethysCluster. # # TethysCluster 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 the License, or (at your option) any # la...
gpl-3.0
catapult-project/catapult
dashboard/dashboard/file_bug_test.py
3
43198
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=too-many-lines from __future__ import print_function from __future__ import division from __future__ import absolute_import import datetim...
bsd-3-clause
samthetechie/pyFolia
venv/lib/python2.7/distutils/__init__.py
100
3811
import os import sys import warnings import opcode # opcode is not a virtualenv module, so we can use it to find the stdlib # Important! To work on pypy, this must be a module that resides in the # lib-python/modified-x.y.z directory dirname = os.path.dirname distutils_path = os.path.join...
gpl-3.0
rubyinhell/brython
www/src/Lib/contextlib.py
737
8788
"""Utilities for with-statement contexts. See PEP 343.""" import sys from collections import deque from functools import wraps __all__ = ["contextmanager", "closing", "ContextDecorator", "ExitStack"] class ContextDecorator(object): "A base class or mixin that enables context managers to work as decorators." ...
bsd-3-clause
jwiggins/scikit-image
skimage/future/graph/rag.py
2
14784
import networkx as nx import numpy as np from numpy.lib.stride_tricks import as_strided from scipy import ndimage as ndi import math from ... import draw, measure, segmentation, util, color try: from matplotlib import colors from matplotlib import cm except ImportError: pass def min_weight(graph, src, dst...
bsd-3-clause
2uller/LotF
App/Lib/fpformat.py
66
4844
"""General floating point formatting functions. Functions: fix(x, digits_behind) sci(x, digits_behind) Each takes a number or a string and a number of digits as arguments. Parameters: x: number to be formatted; or a string resembling a number digits_behind: number of digits behind the decimal p...
gpl-2.0
vi4m/django-dedal
runtests.py
1
1164
import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="dedal.urls", INSTALLED_APPS=[ "d...
bsd-3-clause
msmolens/VTK
ThirdParty/ZopeInterface/zope/interface/exceptions.py
86
1999
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
bsd-3-clause
martynovp/edx-platform
common/lib/xmodule/xmodule/modulestore/xml.py
16
41947
import hashlib import itertools import json import logging import os import re import sys import glob from collections import defaultdict from cStringIO import StringIO from fs.osfs import OSFS from importlib import import_module from lxml import etree from path import path from contextlib import contextmanager from l...
agpl-3.0
chalasr/Flask-P2P
venv/lib/python2.7/site-packages/setuptools/command/install_egg_info.py
423
4001
from distutils import log, dir_util import os from setuptools import Command from setuptools.archive_util import unpack_archive import pkg_resources class install_egg_info(Command): """Install an .egg-info directory for the package""" description = "Install an .egg-info directory for the package" user_...
mit
ProfessionalIT/maxigenios-website
sdk/google_appengine/google/appengine/_internal/django/conf/global_settings.py
23
19252
# Default Django settings. Override these with settings in the module # pointed-to by the DJANGO_SETTINGS_MODULE environment variable. # This is defined here as a do-nothing function because we can't import # django.utils.translation -- that module depends on the settings. gettext_noop = lambda s: s #################...
mit
mheap/ansible
lib/ansible/plugins/action/win_reboot.py
22
8340
# (c) 2016, Matt Davis <mdavis@ansible.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 import time from datetime import datetime, timedelta from ansible.errors import AnsibleErro...
gpl-3.0
Laurawly/tvm-1
python/tvm/relay/qnn/transform.py
5
4792
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
ask/celery
celery/local.py
2
14183
# -*- coding: utf-8 -*- """ celery.local ~~~~~~~~~~~~ This module contains critical utilities that needs to be loaded as soon as possible, and that shall not load any third party modules. Parts of this module is Copyright by Werkzeug Team. :copyright: (c) 2009 - 2012 by Ask Solem. :li...
bsd-3-clause
fernandojunior/searching-techniques
python/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py
762
3532
import hashlib import os from pip._vendor.lockfile import LockFile from pip._vendor.lockfile.mkdirlockfile import MkdirLockFile from ..cache import BaseCache from ..controller import CacheController def _secure_open_write(filename, fmode): # We only want to write to this file, so open it in write only mode ...
mit
omargammoh/rpislave
website/processing.py
1
6269
from bson import json_util import multiprocessing from website.models import Conf from time import time, sleep import inspect import subprocess import json try: import signal except: print "signal cannot be imported" def execute(cmd, daemon=False): if daemon: _ = subprocess.Popen(cmd, shell=True,...
gpl-2.0
sinhrks/numpy
numpy/ma/tests/test_mrecords.py
64
20867
# pylint: disable-msg=W0611, W0612, W0511,R0201 """Tests suite for mrecords. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu """ from __future__ import division, absolute_import, print_function import warnings import pickle import numpy as np import numpy.ma as ma from numpy import recarray from n...
bsd-3-clause
Anatoscope/sofa
applications/plugins/RigidScale/examples/mapping/rigidScaleToAffineMultiMapping.py
5
6852
import sys,os import Sofa import Flexible.IO from Compliant import Tools as Tools # main path currentdir = os.path.dirname(os.path.realpath(__file__))+'/' __file = __file__.replace('\\', '/') # windows compatible filename source = './mesh/cube.obj' target = './mesh/cube.obj' voxel_size = 0.1 # =========...
lgpl-2.1
zeroc0d3/docker-lab
python/rootfs/usr/lib/python2.7/dist-packages/powerline/segment.py
31
13488
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) from powerline.lib.watcher import create_file_watcher def list_segment_key_values(segment, theme_configs, segment_data, key, function_name=None, name=None, module=None, default=None): try: yield segm...
mit
zakuro9715/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/forms/localflavor/id.py
50
7253
import warnings from django.contrib.localflavor.id.forms import (IDPhoneNumberField, IDPostCodeField, IDNationalIdentityNumberField, IDLicensePlateField, IDProvinceSelect, IDLicensePlatePrefixSelect) from utils import LocalFlavorTestCase class IDLocalFlavorTests(LocalFlavorTestCase): def setUp(self): ...
gpl-3.0
ilastikdev/ilastik
ilastik/applets/thresholdTwoLevels/_OpObjectsSegment.py
1
10889
############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # mod...
gpl-3.0
supergentle/migueltutorial
flask/lib/python2.7/site-packages/openid/extension.py
157
1686
from openid import message as message_module class Extension(object): """An interface for OpenID extensions. @ivar ns_uri: The namespace to which to add the arguments for this extension """ ns_uri = None ns_alias = None def getExtensionArgs(self): """Get the string arguments t...
bsd-3-clause
dinossimpson/pyspeckit
pyspeckit/wrappers/fit_gaussians_to_simple_spectra.py
2
2973
""" ====================== Simple Gaussian Fitter ====================== """ import pyspeckit def fit_gaussians_to_simple_spectra(filename, units='km/s', doplot=True, baseline=True, plotresiduals=False, figuresavename=None, croprange=None, savename=None, **kwargs): """ As stated in the name tit...
mit
asweigart/pygcurse
examples/shadowtest.py
1
1621
# Simplified BSD License, Copyright 2011 Al Sweigart import sys import os sys.path.append(os.path.abspath('..')) import pygcurse, pygame from pygame.locals import * win = pygcurse.PygcurseWindow(40, 25) win.autoblit = False xoffset = 1 yoffset = 1 mousex = mousey = 0 while True: for event in pygame.event.get(): #...
bsd-3-clause
koreiklein/fantasia
ui/render/text/colors.py
1
1104
# Copyright (C) 2013 Korei Klein <korei.klein1@gmail.com> genericColor = None variableColor = None symbolColor = None andColor = None orColor = None callColor = None quantifierDividerColor = None notColor = None alwaysBackgroundColor = None maybeBackgroundColor = None relationColor = None iffColor = None applyC...
gpl-2.0
noba3/KoTos
addons/script.module.youtube.dl/lib/youtube_dl/extractor/yesjapan.py
172
2195
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( HEADRequest, get_element_by_attribute, parse_iso8601, ) class YesJapanIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?yesjapan\.com/video/(?P<slug>[A-Za-z0-9\-]*)_(?P<id>[A-Za-z0-9]+)\...
gpl-2.0
timokoola/lambdabot
requests/packages/chardet/langthaimodel.py
2930
11275
######################## 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
nishigori/boto
tests/integration/gs/test_resumable_downloads.py
110
16174
# Copyright 2010 Google 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, merge, publish, dis- # trib...
mit
GoogleCloudPlatform/training-data-analyst
courses/machine_learning/deepdive2/end_to_end_ml/labs/serving/application/lib/flask/globals.py
322
1645
# -*- coding: utf-8 -*- """ flask.globals ~~~~~~~~~~~~~ Defines all the global objects that are proxies to the current active context. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from functools import partial from werkzeug.local import LocalStack, ...
apache-2.0
hiviah/perspectives-observatory
utilities/cert_client.py
1
3009
# This file is part of the Perspectives Notary Server # # Copyright (C) 2011 Dan Wendlandt # Copyright (C) 2011 Ondrej Mikle, CZ.NIC Labs # # 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 Founda...
gpl-3.0
Vauxoo/server-tools
base_jsonify/models/models.py
2
3348
# © 2017 Akretion (http://www.akretion.com) # Sébastien BEAU <sebastien.beau@akretion.com> # Raphaël Reverdy <raphael.reverdy@akretion.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models from odoo.exceptions import UserError from odoo.tools.translate import _ ...
agpl-3.0
frostyfrog/mark2
mk2/events/server.py
1
2945
import re from . import Event, get_timestamp # input/output output_exp = re.compile( r'(\d{4}-\d{2}-\d{2} |)(\d{2}:\d{2}:\d{2}) \[([A-Z]+)\] (?:%s)?(.*)' % '|'.join((re.escape(x) for x in ( '[Minecraft] ', '[Minecraft-Server] ' )))) class ServerInput(Event): """Send data to the server's s...
mit
ghchinoy/tensorflow
tensorflow/python/distribute/cluster_resolver/slurm_cluster_resolver_test.py
15
6551
# 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 applicable ...
apache-2.0
xtenex/raft
core/data/FormFillValues.py
11
4855
# # class to represent form fill values # # Author: Gregory Fleischer (gfleischer@gmail.com) # # Copyright (c) 2011 RAFT Team # # This file is part of RAFT. # # RAFT 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 Foundat...
gpl-3.0
gameduell/duell
bin/win/python2.7.9/Lib/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py
743
1141
#!/usr/bin/env python """ Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. """ from ...
bsd-2-clause
xdajog/kernel_fx3q_aosp
scripts/build-all.py
1250
9474
#! /usr/bin/env python # Copyright (c) 2009-2011, Code Aurora Forum. 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 # n...
gpl-2.0
eLBati/odoo
addons/portal/mail_message.py
354
3518
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
amymok/owning-a-home
test/browser_testing/features/pages/loan_options.py
11
8931
# coding: utf-8 from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditi...
cc0-1.0
pinterb/st2
st2common/st2common/transport/execution.py
3
1279
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
Times-0/Timeline
Timeline/PacketHandler/UserHandler.py
1
3401
from Timeline.Server.Constants import TIMELINE_LOGGER, PACKET_TYPE, PACKET_DELIMITER, LOGIN_SERVER, WORLD_SERVER, LOGIN_SERVER_ALLOWED from Timeline.Utils.Events import PacketEventHandler from twisted.internet import threads from twisted.internet.defer import Deferred from collections import deque import loggi...
gpl-3.0
mnahm5/django-estore
Lib/site-packages/boto/route53/connection.py
103
23153
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011 Blue Pines Technologies LLC, Brad Carleton # www.bluepines.org # Copyright (c) 2012 42 Lines Inc., Jim Browne # # Permission is hereby granted, free of charge, to any person obtaining a # copy...
mit
ESS-LLP/frappe
frappe/www/rss.py
14
1198
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import urllib from frappe.utils import escape_html, get_request_site_address, now, cstr from six.moves.urllib.parse import quote, urljoin no_cache = 1 base_template...
mit
roselleebarle04/django
django/conf/locale/cy/formats.py
504
1822
# -*- 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 F Y' # '25 Hy...
bsd-3-clause
lyricat/Hotot
hotot-gir/hotot.py
4
14709
# -*- coding: UTF-8 -*- # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: '''Hotot @author: U{Shellex Wei <5h3ll3x@gmail.com>} @license: LGPLv3+ ''' import os import sys import threading import time import config import gi gi.require_version('Gtk', '3.0') gi.require_version('Gdk', '3.0') gi.require_version('GdkX...
lgpl-3.0
inspyration/odoo
addons/account_followup/report/account_followup_print.py
63
5695
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
ridfrustum/lettuce
tests/integration/lib/Django-1.3/tests/regressiontests/serializers_regress/models.py
49
7687
""" A test spanning all the capabilities of all the serializers. This class sets up a model for each model field type (except for image types, because of the PIL dependency). """ from django.db import models from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType fro...
gpl-3.0
asedunov/intellij-community
python/helpers/py2only/docutils/writers/s5_html/__init__.py
100
14658
# $Id: __init__.py 7720 2013-09-05 12:54:56Z milde $ # Authors: Chris Liechti <cliechti@gmx.net>; # David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ S5/HTML Slideshow Writer. """ __docformat__ = 'reStructuredText' import sys import os import re import do...
apache-2.0
zhumengyuan/kallithea
kallithea/lib/compat.py
2
17465
# -*- 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 distributed in the hope that...
gpl-3.0
dpad/sumatra
sumatra/dependency_finder/r.py
5
3930
""" :copyright: Copyright 2006-2015 by the Sumatra team, see doc/authors.txt :license: BSD 2-clause, see LICENSE for details. """ from __future__ import unicode_literals import subprocess import pkg_resources from sumatra.dependency_finder import core package_split_str = 'pkg::\n' element_split_str = '\n' name_valu...
bsd-2-clause
varunr047/homefile
homeassistant/components/downloader.py
6
4253
""" Support for functionality to download files. For more details about this component, please refer to the documentation at https://home-assistant.io/components/downloader/ """ import logging import os import re import threading import requests import voluptuous as vol import homeassistant.helpers.config_validation...
mit
levibostian/myBlanky
googleAppEngine/google/appengine/api/taskqueue/taskqueue.py
8
79078
#!/usr/bin/env python # # Copyright 2007 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 o...
mit
annulen/qtwebkit-snapshots
Source/ThirdParty/gtest/test/gtest_help_test.py
227
5760
#!/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...
lgpl-2.1
amitjamadagni/sympy
sympy/functions/special/error_functions.py
2
32620
""" This module contains various functions that are special cases of incomplete gamma functions. It should probably be renamed. """ from sympy.core import Add, S, C, sympify, cacheit, pi, I from sympy.core.function import Function, ArgumentIndexError from sympy.functions.elementary.miscellaneous import sqrt, root ...
bsd-3-clause
intel-linux-graphics/drm-intel
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
vinaykumar2491/Lumos
Project_Python/cornell/lab3/cornelltest.py
2
13014
# cornelltest.py # Walker M. White (wmw2), Lillian Lee (LJL2), Steve Marschner (srm2) # August 20, 2015 """Unit test support functions This module provides function-level unit testing tools. It is a replacement for the built-in Python package unittest, which is much less user friendly and requires an understanding ...
apache-2.0
Gamebasis/3DGamebasisServer
GameData/blender-2.71-windows64/2.71/python/lib/site-packages/requests/packages/urllib3/connection.py
187
5659
# urllib3/connection.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import socket from socket import timeout as SocketTimeout try: # Python 3 from http.cli...
gpl-3.0
IllusionRom-deprecated/android_platform_tools_idea
python/lib/Lib/encodings/mac_roman.py
593
13736
""" Python Character Mapping Codec mac_roman generated from 'MAPPINGS/VENDORS/APPLE/ROMAN.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,err...
apache-2.0
brianrodri/oppia
core/domain/html_validation_service_test.py
2
66734
# coding: utf-8 # # Copyright 2018 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
robrua/cassiopeia
cassiopeia/datastores/common.py
2
8698
import re import zlib from contextlib import contextmanager, ExitStack from io import BytesIO from typing import Mapping, MutableMapping, Any, Union, Dict, List from urllib.parse import urlencode try: from pycurl import Curl USE_PYCURL = True except ImportError: import requests USE_PYCURL = False C...
mit
patilsangram/erpnext
erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.py
22
2461
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ import re from frappe.model.document import Document class InvalidFormulaVariable(frappe.ValidationE...
gpl-3.0
askeing/servo
components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py
170
1564
def WebIDLTest(parser, harness): threw = False try: parser.parse(""" interface VariadicConstraints1 { void foo(byte... arg1, byte arg2); }; """) results = parser.finish() except: threw = True harness.ok(threw, "Should...
mpl-2.0
pshchelo/heat
heat/tests/openstack/test_volume.py
1
42764
# # 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
Dhivyap/ansible
test/units/plugins/connection/test_ssh.py
45
31100
# -*- coding: utf-8 -*- # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.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 # (a...
gpl-3.0
arruda/rmr
rmr/apps/books/migrations/0006_books_to_userbooks.py
1
8533
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Remember to use orm['appname.ModelName'] rather than "from appname.mo...
mit
az0/entity-metadata
code/etl_openlibrary.py
1
2492
#!/usr/bin/python3 # # Copyright (C) 2019 by Compassion International. All rights reserved. # License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. # This is free software: you are free to change and redistribute it. # There is NO WARRANTY, to the extent permitted by law. """ This program E...
gpl-3.0