repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
fhe-odoo/odoo
addons/purchase_requisition/wizard/bid_line_qty.py
374
1711
# -*- 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
aronysidoro/django-angular
djangular/views/mixins.py
16
5168
# -*- coding: utf-8 -*- import json import warnings from django.core.serializers.json import DjangoJSONEncoder from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden def allow_remote_invocation(func, method='auto'): """ All methods which shall be callable through a given Ajax 'act...
mit
Eddy0402/Environment
vim/ycmd/cpp/ycm/tests/gmock/test/gmock_test_utils.py
769
3684
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
gpl-3.0
quanhua92/learning-notes
libs/wxpython/design/mvc.py
1
3804
import wx class ModelInterface(object): """"Defines an interface for a simple value generator model""" def __init__(self): super(ModelInterface, self).__init__() self.value = 0 self.observers = list() def Generate(self): """Interface method to be implemented by subclasses...
apache-2.0
richardotis/scipy
scipy/odr/models.py
113
4659
""" Collection of Model instances for use with the odrpack fitting package. """ from __future__ import division, print_function, absolute_import import numpy as np from scipy.odr.odrpack import Model __all__ = ['Model', 'exponential', 'multilinear', 'unilinear', 'quadratic', 'polynomial'] def _lin_fcn(B,...
bsd-3-clause
SOKP/external_chromium_org
tools/telemetry/telemetry/value/summary.py
58
6381
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from collections import defaultdict from telemetry.value import failure from telemetry.value import merge_values from telemetry.value import skip class Su...
bsd-3-clause
ayseyo/oclapi
django-nonrel/ocl/mappings/tests.py
1
46964
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ import os from unittest import skip from urlparse import urlparse from django.contrib.auth.models import User from django.contrib.conten...
mpl-2.0
ajose01/rethinkdb
test/rql_test/connections/http_support/werkzeug/contrib/iterio.py
147
10718
# -*- coding: utf-8 -*- r""" werkzeug.contrib.iterio ~~~~~~~~~~~~~~~~~~~~~~~ This module implements a :class:`IterIO` that converts an iterator into a stream object and the other way round. Converting streams into iterators requires the `greenlet`_ module. To convert an iterator into a stream...
agpl-3.0
denny820909/builder
lib/python2.7/site-packages/python_dateutil-1.5-py2.7.egg/dateutil/tz.py
270
32741
""" Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "PSF License" import datetime import struct import time import sys import os relativedelta = None pa...
mit
fuzeman/Catalytic
deluge/ui/console/commands/help.py
8
3063
# help.py # # Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com> # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may redistribute it and/or modify it under the terms of the # GNU General Public License, as published by the Free Software # Foundation; either vers...
gpl-3.0
tcffisher/namebench
libnamebench/better_webbrowser.py
175
4191
#!/usr/bin/env python # Copyright 2009 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...
apache-2.0
aesteve/vertx-web
vertx-web/src/test/sockjs-protocol/ws4py/__init__.py
4
2689
# -*- coding: utf-8 -*- # # 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 following disclaimer. # * ...
apache-2.0
yyamano/RESTx
src/python/restxclient/restx_resource.py
2
5575
""" RESTx: Sane, simple and effective data publishing and integration. Copyright (C) 2010 MuleSoft Inc. http://www.mulesoft.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...
gpl-3.0
provaleks/o8
addons/report_webkit/__init__.py
382
1593
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
agpl-3.0
openstack/vitrage
vitrage/evaluator/actions/priority_tools.py
1
1972
# Copyright 2016 - Nokia # # 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, sof...
apache-2.0
jasonmccampbell/scipy-refactor
scipy/sparse/linalg/dsolve/linsolve.py
8
9161
from warnings import warn from numpy import asarray from scipy.sparse import isspmatrix_csc, isspmatrix_csr, isspmatrix, \ SparseEfficiencyWarning, csc_matrix import _superlu noScikit = False try: import scikits.umfpack as umfpack except ImportError: import umfpack noScikit = True isUmfpack = ha...
bsd-3-clause
Skoda091/alfred-deepl
lib/urllib3/fields.py
288
5943
from __future__ import absolute_import import email.utils import mimetypes from .packages import six def guess_content_type(filename, default='application/octet-stream'): """ Guess the "Content-Type" of a file. :param filename: The filename to guess the "Content-Type" of using :mod:`mimetypes`. ...
mit
xidui/shadowsocks
shadowsocks/crypto/table.py
1044
8108
# !/usr/bin/env python # # Copyright 2015 clowwindy # # 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
PennyQ/glue-3d-viewer
glue_vispy_viewers/extern/vispy/scene/cameras/turntable.py
20
5029
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. from __future__ import division import numpy as np from .perspective import Base3DRotationCamera class TurntableCamera(Base3DRotationCamera): """ 3D camera class that ...
bsd-2-clause
benesch/pip
pip/_vendor/requests/packages/urllib3/util/connection.py
365
4744
from __future__ import absolute_import import socket 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...
mit
kevinlondon/httpie
httpie/output/formatters/xml.py
51
1959
from __future__ import absolute_import import re from xml.etree import ElementTree from httpie.plugins import FormatterPlugin DECLARATION_RE = re.compile('<\?xml[^\n]+?\?>', flags=re.I) DOCTYPE_RE = re.compile('<!DOCTYPE[^\n]+?>', flags=re.I) DEFAULT_INDENT = 4 def indent(elem, indent_text=' ' * DEFAULT_INDENT):...
bsd-3-clause
tmenjo/cinder-2015.1.1
cinder/flow_utils.py
6
2961
# 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 # d...
apache-2.0
Maistho/CouchPotatoServer
couchpotato/core/media/_base/media/main.py
65
21493
from datetime import timedelta import time import traceback from string import ascii_lowercase from CodernityDB.database import RecordNotFound, RecordDeleted from couchpotato import tryInt, get_db from couchpotato.api import addApiView from couchpotato.core.event import fireEvent, fireEventAsync, addEvent from couchpo...
gpl-3.0
TeamEOS/external_chromium_org_third_party_WebKit
Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/__init__.py
658
4406
# 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
openstack/python-magnumclient
magnumclient/common/utils.py
1
11677
# -*- coding: utf-8 -*- # # Copyright 2012 OpenStack LLC. # 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
bgxavier/nova
nova/objects/compute_node.py
8
15378
# Copyright 2013 IBM Corp # # 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...
apache-2.0
ZacariasBendeck/youtube-dl
youtube_dl/extractor/hentaistigma.py
109
1201
from __future__ import unicode_literals from .common import InfoExtractor class HentaiStigmaIE(InfoExtractor): _VALID_URL = r'^https?://hentai\.animestigma\.com/(?P<id>[^/]+)' _TEST = { 'url': 'http://hentai.animestigma.com/inyouchuu-etsu-bonus/', 'md5': '4e3d07422a68a4cc363d8f57c8bf0d23', ...
unlicense
SauloAislan/ironic
ironic/tests/unit/drivers/test_utils.py
3
16883
# 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
Arcanemagus/plexpy
lib/dns/rdtypes/ANY/NSEC.py
18
4690
# Copyright (C) 2004-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
gpl-3.0
PyGotham/pygotham
pygotham/frontend/profile.py
2
2262
"""PyGotham user profiles.""" from flask import ( Blueprint, flash, g, redirect, render_template, request, url_for ) from flask_login import current_user from flask_security import login_required from pygotham.core import db from pygotham.frontend import route from pygotham.models import Talk, Volunteer __all__ ...
bsd-3-clause
wcalvert/LPC11U_LPC13U_CodeBase
src/drivers/sensors/testscripts/plot_xyz_plus_mag_sma.py
2
3774
#------------------------------------------------------------------------------- # Name: plot_sensors_event.py # Purpose: Plots logged sensors_event_t data from logger.c CSV files # # Author: K. Townsend # # Created: 09/06/2013 # Copyright: (c) K. Townsend 2013 # Licence: BSD #----------------...
bsd-3-clause
Openergy/oplus
setup.py
1
1042
from setuptools import setup, find_packages from pkg_resources import parse_requirements import os with open(os.path.join("oplus", "version.py")) as f: version = f.read().split("=")[1].strip().strip("'").strip('"') with open("requirements.txt", "r") as f: requirements = [str(r) for r in parse_requirements(f....
mpl-2.0
lude-ma/python-ivi
ivi/agilent/agilentMSO6052A.py
7
1687
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the...
mit
Alluxio/alluxio
integration/vagrant/bin/spot_request.py
6
7965
#!/usr/bin/env python # # The Alluxio Open Foundation licenses this work under the Apache License, version 2.0 # (the "License"). You may not use this work except in compliance with the License, which is # available at www.apache.org/licenses/LICENSE-2.0 # # This software is distributed on an "AS IS" basis, WITHOUT WAR...
apache-2.0
brandon-rhodes/numpy
numpy/polynomial/tests/test_printing.py
208
2004
from __future__ import division, absolute_import, print_function import numpy.polynomial as poly from numpy.testing import TestCase, run_module_suite, assert_ class test_str(TestCase): def test_polynomial_str(self): res = str(poly.Polynomial([0, 1])) tgt = 'poly([0., 1.])' assert_(res, tg...
bsd-3-clause
CauldronDevelopmentLLC/buildbot
buildbot/test/test_svnpoller.py
2
16276
# -*- test-case-name: buildbot.test.test_svnpoller -*- import time from twisted.internet import defer from twisted.trial import unittest from buildbot.changes.svnpoller import SVNPoller # this is the output of "svn info --xml # svn+ssh://svn.twistedmatrix.com/svn/Twisted/trunk" prefix_output = """\ <?xml version="1.0...
gpl-2.0
greg-hellings/ansible-modules-extras
monitoring/sensu_check.py
42
11565
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Anders Ingemann <aim@secoya.dk> # # 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 Licen...
gpl-3.0
kushal124/gensim
gensim/test/test_utils.py
53
2863
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for checking various utils functions. """ import logging import unittest from gensim import utils class TestIsCorpus(unittest.TestCase): def test_None(self): #...
gpl-3.0
randynobx/ansible
test/runner/lib/changes.py
57
5755
"""Detect changes in Ansible code.""" from __future__ import absolute_import, print_function import re import os from lib.util import ( ApplicationError, SubprocessError, MissingEnvironmentVariable, CommonConfig, display, ) from lib.http import ( HttpClient, urlencode, ) from lib.git im...
gpl-3.0
suninsky/ReceiptOCR
Python/server/lib/python2.7/site-packages/werkzeug/http.py
85
36658
# -*- coding: utf-8 -*- """ werkzeug.http ~~~~~~~~~~~~~ Werkzeug comes with a bunch of utilities that help Werkzeug to deal with HTTP data. Most of the classes and functions provided by this module are used by the wrappers, but they are useful on their own, too, especially if the response and ...
mit
UManPychron/pychron
pychron/file_defaults.py
2
11951
# =============================================================================== # Copyright 2015 Jake Ross # # 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
nomadcube/scikit-learn
sklearn/decomposition/incremental_pca.py
199
10508
"""Incremental Principal Components Analysis.""" # Author: Kyle Kastner <kastnerkyle@gmail.com> # License: BSD 3 clause import numpy as np from scipy import linalg from .base import _BasePCA from ..utils import check_array, gen_batches from ..utils.extmath import svd_flip, _batch_mean_variance_update class Increme...
bsd-3-clause
supriyantomaftuh/django
tests/staticfiles_tests/test_storage.py
147
18183
from __future__ import unicode_literals import os import sys import unittest from django.conf import settings from django.contrib.staticfiles import finders, storage from django.contrib.staticfiles.management.commands import collectstatic from django.contrib.staticfiles.management.commands.collectstatic import \ ...
bsd-3-clause
MiltosD/CEFELRC
lib/python2.7/site-packages/django/db/models/sql/constants.py
394
1043
import re # Valid query types (a dictionary is used for speedy lookups). QUERY_TERMS = dict([(x, None) for x in ( 'exact', 'iexact', 'contains', 'icontains', 'gt', 'gte', 'lt', 'lte', 'in', 'startswith', 'istartswith', 'endswith', 'iendswith', 'range', 'year', 'month', 'day', 'week_day', 'isnull', 'search'...
bsd-3-clause
multigcs/quadfork
Libraries/Mavlink/pymavlink/generator/lib/minixsv/minixsvWrapper.py
79
2400
#!/usr/local/bin/python import sys import getopt from ..genxmlif import GenXmlIfError from xsvalErrorHandler import ErrorHandler, XsvalError from ..minixsv import * from pyxsval import parseAndValidate ########################################## # minixsv Wrapper for calling mi...
gpl-3.0
aerler/Ensemble
src/ensemble/ensemble_test.py
1
8702
''' Created on 2013-08-24 Unittest for the GeoPy main package geodata. @author: Andre R. Erler, GPL v3 ''' import unittest import netCDF4 as nc import numpy as np import numpy.ma as ma import scipy.stats as ss import os import gc from copy import deepcopy import shutil # internal imports # from ensemble.base impor...
gpl-3.0
mwcraig/ccdproc
ccdproc/tests/test_cosmicray.py
2
10917
# Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np from numpy.testing import assert_allclose import pytest from astropy.utils import NumpyRNGContext from astropy.nddata import StdDevUncertainty from astropy import units as u from ccdproc.core import (cosmicray_lacosmic, cosmicray_medi...
bsd-3-clause
transientskp/aartfaac-arthur
scripts/arthur-plot.py
1
1440
#!/usr/bin/env python3 import sys import numpy as np from arthur.imaging import full_calculation, calculate_lag from arthur.io import read_full from arthur.plot import plot_image, plot_lag, plot_chan_power, plot_corr_mat, plot_diff from arthur.constants import NUM_CHAN from matplotlib import pyplot FRQ = 58398437.5 ...
gpl-3.0
seiji56/rmaze-2016
testes/sharp.py
1
1113
import time import Adafruit_ADS1x15 import sys addr = 0 def convert( aString ): if aString.startswith("0x") or aString.startswith("0X"): return int(aString,16) elif aString.startswith("0"): return int(aString,8) else: return int(aString) milli_time = lambda: int(round(time.time() ...
gpl-3.0
mbr/unleash
tests/test_depgraph.py
1
1538
import pytest from unleash.depgraph import DependencyGraph @pytest.fixture def dg(): # our example dependency graph. it looks like this # # D -> B # \ # A E -> F # / # C g = DependencyGraph() g.add_obj('D', ['B']) g.add_obj('B', ['A']) g.add_obj...
mit
cstipkovic/spidermonkey-research
testing/marionette/harness/marionette/tests/unit/test_addons.py
1
1985
# 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 import unittest from marionette import MarionetteTestCase from marionette_driver.addons import Addons, AddonI...
mpl-2.0
jimbobhickville/libcloud
libcloud/test/compute/test_vcloud.py
33
32420
# 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 use ...
apache-2.0
nikushx/AlexaUrbanDictionaryWOTD
libraries/requests/packages/urllib3/util/retry.py
198
9981
from __future__ import absolute_import import time import logging from ..exceptions import ( ConnectTimeoutError, MaxRetryError, ProtocolError, ReadTimeoutError, ResponseError, ) from ..packages import six log = logging.getLogger(__name__) class Retry(object): """ Retry configuration. ...
gpl-2.0
milinbhakta/flaskjinja
flask1/Lib/site-packages/setuptools/command/bdist_rpm.py
1049
1508
import distutils.command.bdist_rpm as orig class bdist_rpm(orig.bdist_rpm): """ Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to disable eggs...
gpl-2.0
GoogleCloudPlatform/sap-deployment-automation
third_party/github.com/ansible/awx/awx_collection/plugins/modules/tower_credential.py
1
13502
#!/usr/bin/python # coding: utf-8 -*- # Copyright: (c) 2017, Wayne Witzel III <wayne@riotousliving.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_ver...
apache-2.0
paweljasinski/ironpython3
Src/StdLib/Lib/multiprocessing/semaphore_tracker.py
5
4863
# # On Unix we run a server process which keeps track of unlinked # semaphores. The server ignores SIGINT and SIGTERM and reads from a # pipe. Every other process of the program has a copy of the writable # end of the pipe, so we get EOF when all other processes have exited. # Then the server process unlinks any remai...
apache-2.0
benbox69/pyload
module/plugins/internal/Extractor.py
6
4390
# -*- coding: utf-8 -*- import os import re from module.PyFile import PyFile from module.plugins.internal.Plugin import Plugin class ArchiveError(Exception): pass class CRCError(Exception): pass class PasswordError(Exception): pass class Extractor(Plugin): __name__ = "Extractor" __type_...
gpl-3.0
xodus7/tensorflow
tensorflow/python/autograph/utils/type_check.py
26
1170
# 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
yanheven/keystone
keystone/common/wsgi.py
3
31025
# Copyright 2012 OpenStack Foundation # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2010 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not...
apache-2.0
magic2du/contact_matrix
Contact_maps/DeepLearning/DeepLearningTool/DL_contact_matrix_load2-new10fold_01_09_2015_01.py
1
25014
# coding: utf-8 # In[1]: # this part imports libs and load data from csv file import sys sys.path.append('../../../libs/') import csv from dateutil import parser from datetime import timedelta from sklearn import svm import numpy as np import pandas as pd import pickle from sklearn.cross_validation import train_test...
gpl-2.0
maizy/ambient7
ambient7-arduino/serial2influxdb/serial2influxdb.py
1
4275
#!/usr/bin/env python3 # coding: utf-8 import argparse import configparser import logging import time import re import datetime import serial import influxdb SERIAL_RETRY_DELAY = 5.0 logger = logging.getLogger('s2i') def parse_args_and_config(args): parser = argparse.ArgumentParser(description='ambient7 - ser...
apache-2.0
mannygit/zerorpc-python
zerorpc/events.py
51
9209
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
mit
yaroslavvb/tensorflow
tensorflow/contrib/learn/python/learn/dataframe/estimator_utils.py
75
7274
# pylint: disable=g-bad-file-header # 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/LICENS...
apache-2.0
Arable/old-www-do-not-use
lib/python2.7/site-packages/requests/packages/urllib3/_collections.py
310
3111
# urllib3/_collections.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 from collections import MutableMapping try: from threading import RLock except ImportE...
mit
psychopy/versions
psychopy/app/utils.py
1
17380
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """utility classes for the Builder """ from __future__ import absolute_import, division, ...
gpl-3.0
netscaler/horizon
openstack_dashboard/dashboards/project/firewalls/tests.py
5
19627
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013, Big Switch Networks, 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/...
apache-2.0
foursquare/pants
src/python/pants/backend/jvm/tasks/jvm_compile/execution_graph.py
1
11698
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import queue import sys import threading import traceback from builtins import map, objec...
apache-2.0
foursquare/pants
tests/python/pants_test/backend/jvm/tasks/test_jvmdoc_gen.py
2
1845
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os from pants.backend.jvm.tasks.jvmdoc_gen import Jvmdoc, JvmdocGen from pants.ba...
apache-2.0
xyuanmu/XX-Net
code/default/x_tunnel/local/cloudfront_front/web_control.py
4
5336
#!/usr/bin/env python # coding:utf-8 import os import time import urllib.parse import simple_http_server from .front import front current_path = os.path.dirname(os.path.abspath(__file__)) root_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir)) top_path = os.path.abspath(os.path.join(root_path...
bsd-2-clause
lz1988/company-site
django/contrib/sites/management.py
232
1587
""" Creates the default Site object. """ from django.db.models import signals from django.db import connections from django.db import router from django.contrib.sites.models import Site from django.contrib.sites import models as site_app from django.core.management.color import no_style def create_default_site(app, c...
bsd-3-clause
ruuk/script.module.youtube.dl
lib/youtube_dl/extractor/urort.py
64
2249
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urllib_parse, ) from ..utils import ( unified_strdate, ) class UrortIE(InfoExtractor): IE_DESC = 'NRK P3 Urørt' _VALID_URL = r'https?://(?:www\.)?urort\.p3\.no/#!/Band/(?P<id>[^/]+)...
gpl-2.0
sdopoku/flask-blog
env/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/utf8prober.py
2919
2652
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
gpl-2.0
Ted1993/Flasky
venv/lib/python2.7/site-packages/mako/ext/turbogears.py
39
2132
# ext/turbogears.py # Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from mako import compat from mako.lookup import TemplateLookup from mako.template import Templat...
mit
telerik/cloudbase-init
cloudbaseinit/openstack/common/notifier/rabbit_notifier.py
1
1108
# Copyright 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
apache-2.0
AlexBoogaard/Sick-Beard-Torrent-Edition
lib/unidecode/x0b5.py
253
4919
data = ( 'dyil', # 0x00 'dyilg', # 0x01 'dyilm', # 0x02 'dyilb', # 0x03 'dyils', # 0x04 'dyilt', # 0x05 'dyilp', # 0x06 'dyilh', # 0x07 'dyim', # 0x08 'dyib', # 0x09 'dyibs', # 0x0a 'dyis', # 0x0b 'dyiss', # 0x0c 'dying', # 0x0d 'dyij', # 0x0e 'dyic', # 0x0f 'dyik', # ...
gpl-3.0
DazWorrall/ansible
lib/ansible/modules/network/avi/avi_snmptrapprofile.py
27
3396
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # # 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...
gpl-3.0
quodlibet/quodlibet
tests/test_pattern.py
4
24758
# 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. import os from senf import fsnative from tests import TestCase from ...
gpl-2.0
c0hen/django-venv
lib/python3.4/site-packages/psycopg2/pool.py
3
8136
"""Connection pooling for psycopg2 This module implements thread-safe (and not) connection pools. """ # psycopg/pool.py - pooling code for psycopg # # Copyright (C) 2003-2010 Federico Di Gregorio <fog@debian.org> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU Less...
gpl-3.0
Darthkpo/xtt
openpyxl/tests/test_backend.py
4
2038
# # 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, distribute, sublicense, and/or sell # co...
mit
InterfaceMasters/ONL
components/all/vendor-config/qemu/src/python/qemu/__init__.py
9
1313
#!/usr/bin/python ############################################################ # <bsn.cl fy=2013 v=onl> # # Copyright 2013, 2014 Big Switch Networks, Inc. # # Licensed under the Eclipse Public License, Version 1.0 (the # "License"); you may not use this file except in compliance # with the License. You ...
epl-1.0
shipci/boto
tests/unit/vpc/test_customergateway.py
114
4610
from tests.compat import OrderedDict from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.vpc import VPCConnection, CustomerGateway class TestDescribeCustomerGateways(AWSMockServiceTestCase): connection_class = VPCConnection def default_body(self): return b""" ...
mit
hifly/OpenUpgrade
addons/product_extended/__init__.py
374
1068
############################################################################## # # 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 Affero General Publ...
agpl-3.0
vim-IDE/python-mode
pymode/libs/_markerlib/markers.py
1769
3979
# -*- coding: utf-8 -*- """Interpret PEP 345 environment markers. EXPR [in|==|!=|not in] EXPR [or|and] ... where EXPR belongs to any of those: python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1]) python_full_version = sys.version.split()[0] os.name = os.name sys.platform = sys.platfo...
lgpl-3.0
jayceyxc/hue
desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl/writer/dump_worksheet.py
61
8158
# file openpyxl/writer/straight_worksheet.py # Copyright (c) 2010 openpyxl # # 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...
apache-2.0
ApolloAuto/apollo
third_party/gpus/check_cuda_libs.py
3
2904
# Copyright 2020 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
slava-sh/NewsBlur
vendor/readability/cleaners.py
13
1199
# strip out a set of nuisance html attributes that can mess up rendering in RSS feeds import re from lxml.html.clean import Cleaner bad_attrs = ['style', '[-a-z]*color', 'background[-a-z]*', 'on*'] single_quoted = "'[^']+'" double_quoted = '"[^"]+"' non_space = '[^ "\'>]+' htmlstrip = re.compile("<" # open "([^>]+...
mit
polyaxon/polyaxon
core/polyaxon/polypod/common/container_resources.py
1
1492
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
apache-2.0
leapcode/bitmask-dev
tests/integration/mail/outgoing/test_outgoing.py
1
9783
# -*- coding: utf-8 -*- # test_gateway.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
gpl-3.0
rvraghav93/scikit-learn
sklearn/feature_extraction/tests/test_text.py
8
35969
from __future__ import unicode_literals import warnings from sklearn.feature_extraction.text import strip_tags from sklearn.feature_extraction.text import strip_accents_unicode from sklearn.feature_extraction.text import strip_accents_ascii from sklearn.feature_extraction.text import HashingVectorizer from sklearn.fe...
bsd-3-clause
xgds/xgds_core
setup.py
1
1649
# __BEGIN_LICENSE__ # Copyright (c) 2015, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The xGDS platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance...
apache-2.0
40423126/2016fallcadp_ag9
plugin/liquid_tags/mdx_liquid_tags.py
281
3447
""" Markdown Extension for Liquid-style Tags ---------------------------------------- A markdown extension to allow user-defined tags of the form:: {% tag arg1 arg2 ... argn %} Where "tag" is associated with some user-defined extension. These result in a preprocess step within markdown that produces either markdo...
agpl-3.0
f-guichard/cf-sample-php-buildpack-custo
extensions/composer/extension.py
6
16424
# 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 use ...
apache-2.0
pipermerriam/django
django/contrib/auth/migrations/0001_initial.py
108
4524
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.auth.models from django.core import validators from django.db import migrations, models from django.utils import timezone class Migration(migrations.Migration): dependencies = [ ('contenttypes', '__first__'), ] ...
bsd-3-clause
blackye/luscan-devel
thirdparty_libs/yaml/parser.py
409
25542
# The following YAML grammar is LL(1) and is parsed by a recursive descent # parser. # # stream ::= STREAM-START implicit_document? explicit_document* STREAM-END # implicit_document ::= block_node DOCUMENT-END* # explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* # block_node_or_inden...
gpl-2.0
allinpaybusiness/ACS
allinpay projects/creditscoreMLP/classMLP.py
1
9585
# -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ import sys; import os; sys.path.append("allinpay projects") from creditscore.creditscore import CreditScore import numpy as np import pandas as pd import time from sklearn.model_selection import train_test_split from sklearn.linear_model ...
apache-2.0
jlmucb/cloudproxy
src/third_party/googlemock/gtest/xcode/Scripts/versiongenerate.py
3088
4536
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
apache-2.0
silizium/ardupilot
Tools/scripts/frame_sizes.py
351
1117
#!/usr/bin/env python import re, sys, operator, os code_line = re.compile("^\s*\d+:/") frame_line = re.compile("^\s*\d+\s+/\* frame size = (\d+) \*/") class frame(object): def __init__(self, code, frame_size): self.code = code self.frame_size = int(frame_size) frames = [] def process_lst(filena...
gpl-3.0
mlperf/training_results_v0.7
SIAT/benchmarks/resnet/implementations/tensorflow_open_src/resnet.py
1
21852
import tensorflow as tf # from mlperf_compliance import mlperf_log # from mlperf_compliance import resnet_log_helper # from configs.res50.res50_config import res50_config _BATCH_NORM_EPSILON = 1e-4 _BATCH_NORM_DECAY = 0.9 ML_PERF_LOG=False class LayerBuilder(object): def __init__(self, activation=None, data_form...
apache-2.0
jmvalin/aom
tools/intersect-diffs.py
98
2364
#!/usr/bin/env python ## Copyright (c) 2012 The WebM project authors. All Rights Reserved. ## ## Use of this source code is governed by a BSD-style license ## that can be found in the LICENSE file in the root of the source ## tree. An additional intellectual property rights grant can be found ## in the file PATENT...
bsd-3-clause
surchs/brainbox
visu/base.py
1
8414
__author__ = 'surchs' import sys import numpy as np from matplotlib import gridspec from nilearn import plotting as nlp from matplotlib import pyplot as plt from matplotlib import colors as mpc def add_subplot_axes(ax, rect, axisbg='w'): fig = plt.gcf() box = ax.get_position() width = box.width height...
mit