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
sosiouxme/openshift-ansible
roles/lib_openshift/library/oc_configmap.py
8
57637
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
apache-2.0
niktto/dontstarve_camp_status
camping/models.py
1
5416
# -*- coding: utf-8 -*- from django.db import models from django.core.validators import MaxValueValidator, MinValueValidator # Create your models here. from .utils import k100 class Camper(models.Model): class Meta: verbose_name = u"Obozowicz" verbose_name_plural = u"Obozowicze" name = mod...
apache-2.0
dariemp/odoo
addons/l10n_tr/__init__.py
429
1050
# -*- 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...
agpl-3.0
Ritsyy/fjord
vendor/packages/urllib3/test/test_response.py
8
12093
import unittest from io import BytesIO, BufferedReader from urllib3.response import HTTPResponse from urllib3.exceptions import DecodeError from base64 import b64decode # A known random (i.e, not-too-compressible) payload generated with: # "".join(random.choice(string.printable) for i in xrange(512)) # .enco...
bsd-3-clause
googleapis/googleapis-gen
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/resources/types/ad_group_feed.py
1
2946
# -*- 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
Puri321/lge-kernel-bssq
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
Azure/azure-sdk-for-python
sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_caches_operations.py
1
54791
# 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 may ...
mit
mixturemodel-flow/tensorflow
tensorflow/python/kernel_tests/logging_ops_test.py
92
2860
# 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
TwistedHardware/roshanRush
tasks/admin.py
1
1626
from django.contrib import admin import models class TaskInline(admin.TabularInline): model = model = models.Task extra = 0 class TaskParameterInline(admin.TabularInline): model = model = models.TaskParameter extra = 0 class WorkerAdmin(admin.ModelAdmin): """ Manages admin interface for dat...
gpl-2.0
burzillibus/RobHome
venv/lib/python2.7/site-packages/werkzeug/contrib/jsrouting.py
513
8564
# -*- coding: utf-8 -*- """ werkzeug.contrib.jsrouting ~~~~~~~~~~~~~~~~~~~~~~~~~~ Addon module that allows to create a JavaScript function from a map that generates rules. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ ...
mit
HappyFaceMonitoring/HappyFace
hf/utility.py
1
3436
# -*- coding: utf-8 -*- # # Copyright 2012 Institut für Experimentelle Kernphysik - Karlsruher Institut für Technologie # # 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://...
apache-2.0
florian-dacosta/OCB
openerp/exceptions.py
312
3157
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
mickburgs/taxi-sam
node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
2698
3270
#!/usr/bin/env python # Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Unit tests for the easy_xml.py file. """ import gyp.easy_xml as easy_xml import unittest import StringIO class TestSequenceFunctions(...
mit
birthdayalex/notepad-plus-plus
scintilla/scripts/HFacer.py
53
2067
#!/usr/bin/env python # HFacer.py - regenerate the Scintilla.h and SciLexer.h files from the Scintilla.iface interface # definition file. # Implemented 2000 by Neil Hodgson neilh@scintilla.org # Requires Python 2.5 or later import sys import os import Face from FileGenerator import UpdateFile, Generate, Reg...
gpl-2.0
silk/trac-childticketsplugin
childtickets/parentautocompleteprovider.py
1
1527
import re from trac.core import * from trac.web.api import IRequestHandler class AutocompleteParentProvider(Component): implements(IRequestHandler) min_length = 0 ### methods for IRequestHandler def match_request(self, req): """Return whether the handler wants to process the given request....
bsd-3-clause
asgard-lab/neutron
neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/test_linuxbridge_neutron_agent.py
1
58434
# Copyright (c) 2012 OpenStack Foundation. # # 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
ram08ece/-http-w2ui.com
server/python/bottle/w2lib.py
51
4798
class w2Grid: def __init__(self,conn): self.conn = conn def getRecords(self, sql, request, cql=None): sql_components = { 'where': [], 'params': [], 'sort': [] } if request.get('search',[]): for search in request['search']: operator = "=" field = search['field'] # TODO: protect...
mit
qedi-r/home-assistant
homeassistant/components/buienradar/camera.py
3
6110
"""Provide animated GIF loops of Buienradar imagery.""" import asyncio import logging from datetime import datetime, timedelta from typing import Optional import aiohttp import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.const import CONF_NAME from homeass...
apache-2.0
edgemaster/yahoo-group-archiver
yahoogroupsapi.py
1
7370
# Warning: This module must be imported before any imports of the requests module. from __future__ import unicode_literals from contextlib import contextmanager import functools import logging import os import random import time try: from warcio.capture_http import capture_http warcio_failed = False except Im...
mit
pombreda/pydbgr
trepan/processor/command/set_subcmd/trace.py
2
1399
# -*- coding: utf-8 -*- # Copyright (C) 2009-2010, 2013 Rocky Bernstein rocky@gnu.org # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your o...
gpl-3.0
pballand/congress
thirdparty/antlr3-antlr-3.5/runtime/Python3/antlr3/exceptions.py
6
12546
"""ANTLR3 exception hierarchy""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2012 Terence Parr # 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 c...
apache-2.0
uliwebext/uliweb-redbreast
redbreast/ui/layout.py
1
2640
#coding=utf-8 class WFBasicLayout(object): BEFORE_HTML = "" AFTER_HTML = "" def __init__(self, items, **kwargs): self._items = items def before_html(self): return self.BEFORE_HTML def after_html(self): return self.AFTER_HTML def html(self): output = [self.be...
bsd-2-clause
w1ll1am23/home-assistant
tests/components/denonavr/test_config_flow.py
2
14218
"""Test the DenonAVR config flow.""" from unittest.mock import patch import pytest from homeassistant import config_entries, data_entry_flow from homeassistant.components import ssdp from homeassistant.components.denonavr.config_flow import ( CONF_MANUFACTURER, CONF_MODEL, CONF_SERIAL_NUMBER, CONF_SHO...
apache-2.0
yyjiang/scikit-learn
sklearn/mixture/gmm.py
128
31069
""" Gaussian Mixture Models. This implementation corresponds to frequentist (non-Bayesian) formulation of Gaussian Mixture Models. """ # Author: Ron Weiss <ronweiss@gmail.com> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Bertrand Thirion <bertrand.thirion@inria.fr> import warnings import numpy as...
bsd-3-clause
mpld3/mpld3_rewrite
mpld3_rewrite/_server.py
1
2862
""" A Simple server used to show mpld3 images. """ import threading import webbrowser import socket import itertools import random try: # Python 2.x import BaseHTTPServer as server except ImportError: # Python 3.x from http import server def generate_handler(html, files=None): if files is None: ...
bsd-3-clause
skycucumber/xuemc
python/venv/lib/python2.7/site-packages/flask/testsuite/helpers.py
405
21973
# -*- coding: utf-8 -*- """ flask.testsuite.helpers ~~~~~~~~~~~~~~~~~~~~~~~ Various helpers. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import flask import unittest from logging import StreamHandler from flask.testsuite import FlaskTestCase,...
gpl-2.0
lightcn/odoo
openerp/tools/yaml_import.py
114
43149
# -*- coding: utf-8 -*- import threading import types import time # used to eval time.strftime expressions from datetime import datetime, timedelta import logging import openerp import openerp.sql_db as sql_db import openerp.workflow import misc from config import config import yaml_tag import yaml import re from lxml...
agpl-3.0
data-exp-lab/girder
girder/api/v1/collection.py
3
9217
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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 cop...
apache-2.0
ynotstartups/Wanhao
plugins/UltimakerMachineActions/UMOCheckupMachineAction.py
5
8177
from cura.MachineAction import MachineAction from cura.PrinterOutputDevice import PrinterOutputDevice from UM.Application import Application from PyQt5.QtCore import pyqtSlot, pyqtSignal, pyqtProperty from UM.Logger import Logger from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") ## Action to check up if...
agpl-3.0
liberorbis/libernext
env/lib/python2.7/site-packages/IPython/parallel/tests/test_db.py
12
11883
"""Tests for db backends Authors: * Min RK """ #------------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #...
gpl-2.0
ibid/ibid
ibid/source/http.py
2
4191
# Copyright (c) 2008-2010, Michael Gorven # Released under terms of the MIT/X/Expat Licence. See COPYING for details. import logging import os from twisted.web import server, resource, static, xmlrpc, soap from twisted.application import internet from twisted.internet import reactor from jinja2 import Environment, Fi...
gpl-3.0
firebitsbr/infernal-twin
build/pillow/build/lib.linux-i686-2.7/PIL/PdfImagePlugin.py
26
5815
# # The Python Imaging Library. # $Id$ # # PDF (Acrobat) file handling # # History: # 1996-07-16 fl Created # 1997-01-18 fl Fixed header # 2004-02-21 fl Fixes for 1/L/CMYK images, etc. # 2004-02-24 fl Fixes for 1 and P images. # # Copyright (c) 1997-2004 by Secret Labs AB. All rights reserved. # Copyright (c) ...
gpl-3.0
torgartor21/solar
solar/solar/events/api.py
1
4578
# Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
garvitr/sympy
sympy/abc.py
89
4085
""" This module exports all latin and greek letters as Symbols, so you can conveniently do >>> from sympy.abc import x, y instead of the slightly more clunky-looking >>> from sympy import symbols >>> x, y = symbols('x y') Caveats ======= 1. As of the time of writing this, the names ``C``, ``O``, ``S``,...
bsd-3-clause
buckmaxwell/neoapi
neoapi/serializable_structured_node.py
1
53407
from neomodel import (Property, StructuredNode, StringProperty, DateProperty, AliasProperty, UniqueProperty, DateTimeProperty, RelationshipFrom, BooleanProperty, Relationship, DoesNotExist, ZeroOrOne, DeflateError, One, ZeroOrMore, OneOrMore, AttemptedCardinalityViolation, Mu...
mit
mstriemer/zamboni
mkt/site/utils.py
1
22309
import codecs import datetime import errno import itertools import operator import os import random import re import shutil import time import unicodedata import urllib import uuid from django import http from django.conf import settings from django.core import paginator from django.core.cache import cache from django...
bsd-3-clause
dariemp/odoo
addons/hr_timesheet_invoice/hr_timesheet_invoice.py
80
18148
# -*- 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
jaggu303619/asylum-v2.0
openerp/addons/share/res_users.py
34
2207
# -*- 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
acmihal/Cinnamon
files/usr/lib/cinnamon-settings/bin/SettingsWidgets.py
5
35717
#!/usr/bin/env python2 from gi.repository import Gio, Gtk, GObject, Gdk, GLib, GdkPixbuf import math import os import subprocess import traceback settings_objects = {} # Monkey patch Gio.Settings object def __setitem__(self, key, value): # set_value() aborts the program on an unknown key if key not in self: ...
gpl-2.0
vitan/django
django/contrib/auth/management/commands/changepassword.py
222
2100
from __future__ import unicode_literals import getpass from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS from django.utils.encoding import force_str class Command(BaseCommand): help = "Change a user's password ...
bsd-3-clause
strint/tensorflow
tensorflow/contrib/ffmpeg/ffmpeg_ops.py
42
4398
# 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
mattvonrocketstein/smash
smashlib/ipy3x/testing/globalipapp.py
1
6141
"""Global IPython app to support test running. We must start our own ipython object and heavily muck with it so that all the modifications IPython makes to system behavior don't send the doctest machinery into a fit. This code should be considered a gross hack, but it gets the job done. """ from __future__ import abs...
mit
openlabs/trytond_stock_supply
order_point.py
1
7637
#This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. from trytond.model import ModelView, ModelSQL, fields from trytond.wizard import Wizard from trytond.pyson import If, Equal, Eval, Not, In, Get from trytond.transaction import Tr...
gpl-3.0
cokelaer/spectrum
src/spectrum/transfer.py
1
7481
"""Linear systems""" import numpy as np __all__ = ["tf2zp", 'eqtflength', 'latc2tf', 'latcfilt', 'ss2zpk', 'tf2sos', 'tf2ss', 'tf2zpk', 'zpk2ss', 'zpk2tf'] """to be done latc2tf Convert lattice filter parameters to transfer function form polyscale Scale roots of polynomial polystab Stabilize polynomi...
bsd-3-clause
ccastell/Transfer-System
Website/env/lib/python3.5/site-packages/django/contrib/gis/geos/prepared.py
180
1575
from .base import GEOSBase from .prototypes import prepared as capi class PreparedGeometry(GEOSBase): """ A geometry that is prepared for performing certain operations. At the moment this includes the contains covers, and intersects operations. """ ptr_type = capi.PREPGEOM_PTR destructor =...
apache-2.0
Aasmi/scikit-learn
sklearn/decomposition/tests/test_factor_analysis.py
222
3055
# Author: Christian Osendorfer <osendorf@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Licence: BSD3 import numpy as np from sklearn.utils.testing import assert_warns from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_greater from sklearn.utils.testing im...
bsd-3-clause
emidln/django_roa
env/lib/python2.7/site-packages/django/conf/__init__.py
146
6707
""" Settings and configuration for Django. Values will be read from the module specified by the DJANGO_SETTINGS_MODULE environment variable, and then from django.conf.global_settings; see the global settings file for a list of all possible variables. """ import os import re import time # Needed for Windows import...
bsd-3-clause
sshnaidm/ru
plugin.video.fepcom.net/resources/lib/RubricSelect.py
5
1164
# -*- coding: utf-8 -*- import xbmcgui, urllib LIST = 146 class RubricSelectDialog(xbmcgui.WindowXMLDialog): def __init__(self, *args, **kwargs): xbmcgui.WindowXMLDialog.__init__(self) self.MainScreen = kwargs.get('MainScreen') def onInit(self): xbmcgui.WindowXMLDialog.onInit(self) rubrics_list ...
gpl-2.0
ennoborg/gramps
gramps/plugins/view/dashboardview.py
2
4113
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # # 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
eriser/picasso-graphic
tools/gyp/pylib/gyp/input.py
28
107054
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard from compiler.ast import List from compiler.ast import Module from co...
bsd-3-clause
hundeboll/core
lib/oelite/recipe.py
4
3740
from oebakery import die, err, warn, info, debug from oelite import InvalidRecipe import oelite.meta from oelite.dbutil import * import sys import os import cPickle import warnings def unpickle(file, filename, cookbook): type = cPickle.load(file) meta = oelite.meta.dict.unpickle(file) return OEliteRecipe...
mit
prosig/libvmi
tools/pyvmi/examples/process-list.py
10
1982
#!/usr/bin/env python """ The LibVMI Library is an introspection library that simplifies access to memory in a target virtual machine or in a file containing a dump of a system's physical memory. LibVMI is based on the XenAccess Library. Copyright 2011 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000...
gpl-3.0
jolyonb/edx-platform
openedx/features/enterprise_support/tests/test_middleware.py
2
2605
""" Tests for Enterprise middleware. """ from __future__ import absolute_import import mock from django.test import TestCase from django.test.utils import override_settings from django.urls import reverse from openedx.core.djangolib.testing.utils import skip_unless_lms from openedx.features.enterprise_support.tests ...
agpl-3.0
paolodedios/pybuilder
src/main/python/pybuilder/plugins/python/flake8_plugin.py
3
4301
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2020 PyBuilder Team # # 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/l...
apache-2.0
JT5D/Alfred-Popclip-Sublime
Geeklets/services/wx_yahoo.py
1
11110
""" YahooWeather ROBERT WOLTERMAN (xtacocorex) - 2012 GRABS THE WEATHER FROM THE YAHOO WEATHER SITE THIS CLASS INHERITS FROM forecasts.Forecasts """ # MODULE IMPORTS from globals import * from utilityfunctions import * import forecasts # CHANGELOG # 21 APRIL 2012 # - EXTRACTION FROM THE MAIN SCRIPT A...
gpl-2.0
sjshank/spotEmployee
node_modules/npm/node_modules/node-gyp/gyp/tools/pretty_gyp.py
2618
4756
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Pretty-prints the contents of a GYP file.""" import sys import re # Regex to remove comments when we're counting braces. COMMENT_RE = ...
epl-1.0
crike/crike
src/crike_django/crike_django/urls.py
1
5321
from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic import * from django.conf.urls.static import static from django.core.urlresolvers import reverse_lazy from django.views.generic import RedirectView from django.contrib.auth.decorators import login_required ...
apache-2.0
andyzsf/django-cms
cms/test_utils/project/placeholderapp/migrations/0001_initial.py
66
4526
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import cms.models.fields import cms.test_utils.project.placeholderapp.models class Migration(migrations.Migration): dependencies = [ ('cms', '0002_auto_20140816_1918'), ] operations = [ ...
bsd-3-clause
FelixZYY/gyp
test/mac/gyptest-xcode-gcc.py
212
1781
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that xcode-style GCC_... settings are handled properly. """ import TestGyp import os import subprocess import sys def Ignore...
bsd-3-clause
QuantEcon/QuantEcon.py
quantecon/markov/gth_solve.py
2
4312
""" Routine to compute the stationary distribution of an irreducible Markov chain by the Grassmann-Taksar-Heyman (GTH) algorithm. """ import numpy as np from numba import jit def gth_solve(A, overwrite=False, use_jit=True): r""" This routine computes the stationary distribution of an irreducible Markov tr...
bsd-3-clause
liamf/suds
suds/bindings/rpc.py
209
3141
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
lgpl-3.0
40223225/2015-cdb_g3-40223225
static/Brython3.1.1-20150328-091302/Lib/zipfile.py
620
66368
""" Read and write ZIP files. XXX references to utf-8 need further investigation. """ import io import os import re import imp import sys import time import stat import shutil import struct import binascii try: import zlib # We may need its compression method crc32 = zlib.crc32 except ImportError: zlib =...
gpl-3.0
jamielennox/keystone
keystone/credential/routers.py
29
1034
# Copyright 2013 OpenStack Foundation # # 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
kivy/python-for-android
pythonforandroid/recipes/libexpat/__init__.py
4
1088
import sh from pythonforandroid.recipe import Recipe from pythonforandroid.util import current_directory from pythonforandroid.logger import shprint from os.path import join from multiprocessing import cpu_count class LibexpatRecipe(Recipe): version = 'master' url = 'https://github.com/libexpat/libexpat/arch...
mit
elssar/calibre
src/calibre/ebooks/markdown/extensions/toc.py
46
8336
""" Table of Contents Extension for Python-Markdown * * * (c) 2008 [Jack Miller](http://codezen.org) Dependencies: * [Markdown 2.1+](http://packages.python.org/Markdown/) """ from __future__ import absolute_import from __future__ import unicode_literals from . import Extension from ..treeprocessors import Treeproce...
gpl-3.0
jvenezia/heroku-buildpack-python
vendor/pip-pop/pip/baseparser.py
424
10465
"""Base option parser setup""" from __future__ import absolute_import import sys import optparse import os import re import textwrap from distutils.util import strtobool from pip._vendor.six import string_types from pip._vendor.six.moves import configparser from pip.locations import ( legacy_config_file, config_b...
mit
Micronaet/micronaet-fashion
fashion_sheet_wide/__openerp__.py
1
1344
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013 Davide Corio (<http://www.davidecorio.com>) # 2013 Nicola Riolini (<http://www.micronaet.it>) # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
jetskijoe/headphones
lib/apscheduler/jobstores/zookeeper.py
5
6378
from __future__ import absolute_import import os from datetime import datetime from pytz import utc from kazoo.exceptions import NoNodeError, NodeExistsError from apscheduler.jobstores.base import BaseJobStore, JobLookupError, ConflictingIdError from apscheduler.util import maybe_ref, datetime_to_utc_timestamp, utc_...
gpl-3.0
diana-hep/rootconverter
root2avro/tests/arrayArrayUInt.py
1
1335
#!/usr/bin/env python # Copyright 2016 Jim Pivarski # # 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 la...
apache-2.0
yufengg/tensorflow
tensorflow/compiler/tests/rmsprop_test.py
95
2326
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
andersonresende/django
django/utils/synch.py
116
2627
""" Synchronization primitives: - reader-writer lock (preference to writers) (Contributed to Django by eugene@lazutkin.com) """ import contextlib try: import threading except ImportError: import dummy_threading as threading class RWLock(object): """ Classic implementation of reader-writer lock ...
bsd-3-clause
Jeff-Tian/mybnb
Python27/Lib/distutils/tests/test_version.py
13
2696
"""Tests for distutils.version.""" import unittest from distutils.version import LooseVersion from distutils.version import StrictVersion from test.test_support import run_unittest class VersionTestCase(unittest.TestCase): def test_prerelease(self): version = StrictVersion('1.2.3a1') sel...
apache-2.0
darklordIN/android_kernel_sony_nicki-1
tools/perf/scripts/python/sched-migration.py
11215
11670
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
gpl-2.0
navycrow/Sick-Beard
lib/imdb/_compat.py
128
2753
""" _compat module (imdb package). This module provides compatibility functions used by the imdb package to deal with unusual environments. Copyright 2008-2010 Davide Alberani <da@erlug.linux.it> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License...
gpl-3.0
Yonjuni/true-or-false
venv/lib/python2.7/site.py
306
27543
"""Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** In earlier versions of Python (up to 1.5a3), scripts or...
gpl-3.0
Hack4Eugene/Hack4Cause2016
src/SERT/ParcadeArcade/game-element/PostToUrl.py
1
2464
# -*- coding: utf-8 -*- """ Created on Fri Feb 12 23:26:00 2016 @author: South Eugene Robotics Team """ # provides an example of a Game connecting to the Server import grovepi import requests import json import lcd import mote import subprocess import socket import fcntl import struct def get_ip_address(ifname): ...
mit
coopsource/taiga-back
taiga/hooks/github/event_hooks.py
14
10015
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
agpl-3.0
CERNDocumentServer/invenio
modules/bibformat/lib/elements/bfe_issn.py
3
49891
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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 # License,...
gpl-2.0
zack3241/incubator-airflow
airflow/contrib/hooks/redshift_hook.py
2
4181
# -*- coding: utf-8 -*- # # 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
arista-eosplus/ansible
lib/ansible/modules/cloud/docker/docker_container.py
14
79088
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # # 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 la...
gpl-3.0
acesonl/remotecare
remotecare/apps/questionnaire/wizards.py
1
21631
# -*- coding: utf-8 -*- """ This module contains the subclassed WizardView which allows filling in a list of forms. The wizard uses a :class:`apps.questionnaire.storage.DatabaseStorage` instance to store the filled in information. In short the wizard uses the following internal procedure for displaying forms and savi...
gpl-3.0
algorhythms/HackerRankAlgorithms
Dynamic Programming Classics - The Longest increasing subsequence.py
1
1292
""" Problem Statement An Introduction to the Longest Increasing Subsequence Problems The task is to find the length of the longest subsequence in a given array of integers such that all elements of the subsequence are sorted in ascending order. For example, the length of the LIS for { 15, 27, 14, 38, 26, 55, 46, 65, ...
apache-2.0
asadziach/tensorflow
tensorflow/python/tools/selective_registration_header_lib.py
27
6109
# 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
LinusU/ansible
docsite/build-site.py
211
2937
#!/usr/bin/env python # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of the Ansible Documentation # # 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 th...
gpl-3.0
blooparksystems/odoo
addons/l10n_eu_service/wizard/wizard.py
45
5502
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.exceptions import Warning from openerp import fields, models, api from openerp.tools.translate import _ class l10n_eu_service(models.TransientModel): """Create fiscal positions for EU Service VAT""" ...
gpl-3.0
stylianos-kampakis/scikit-learn
sklearn/manifold/tests/test_t_sne.py
162
9771
import sys from sklearn.externals.six.moves import cStringIO as StringIO import numpy as np import scipy.sparse as sp from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_raises_regexp ...
bsd-3-clause
denim2x/urllib3
urllib3/exceptions.py
196
5440
from __future__ import absolute_import # Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class PoolError(HTTPError): "Base exception for errors caused within a pool." def __init__(se...
mit
joshal/behave
test/test_tag_matcher.py
11
35709
# -*- coding: utf-8 -*- from __future__ import absolute_import from behave.tag_matcher import * from mock import Mock from unittest import TestCase import warnings # -- REQUIRES: pytest # import pytest class Traits4ActiveTagMatcher(object): TagMatcher = ActiveTagMatcher value_provider = { "foo": "ali...
bsd-2-clause
mmargoliono/git-cola
cola/qtcompat.py
2
1415
from __future__ import division, absolute_import, unicode_literals from PyQt4 import QtGui from PyQt4 import QtCore def patch(obj, attr, value): if not hasattr(obj, attr): setattr(obj, attr, value) def install(): set_contents_margins = ( lambda self, left, top, right, bottom: self.setMa...
gpl-2.0
tarsqi/ttk
components/simpletime/main.py
1
3933
from __future__ import absolute_import from __future__ import print_function import os, sys from io import open def elements_file(): return os.path.join(os.environ['TTK_ROOT'], 'components', 'simpletime', 'elements.txt') def rules_file(): return os.path.join(os.environ['TTK_ROOT'], 'components', 'simpletime...
apache-2.0
koneman/RetinaDiag
src/RetinalScan/imageGradients.py
1
1320
import cv2 import matplotlib.pyplot as plt import numpy as np from skimage import data, color # Load the example image and turn it into grayscale image = cv2.imread('/Users/sathvik/work/python/RetinaDiag/imgs/src/RetinalScan/im0001.ppm') # Compute the horizontal gradient using the centered 1D filter # This is equival...
mit
wzbozon/django-rest-framework
tests/test_parsers.py
81
3752
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.core.files.uploadhandler import MemoryFileUploadHandler from django.test import TestCase from django.utils.six.moves import StringIO from rest_framework.exceptions import ParseError from rest_framework.parsers import...
bsd-2-clause
safwanrahman/mozillians
mozillians/groups/models.py
1
12186
from django.core.exceptions import ValidationError from django.db import models from django.utils.timezone import now from autoslug.fields import AutoSlugField from funfactory.urlresolvers import reverse from funfactory.utils import absolutify from tower import ugettext as _ from tower import ugettext_lazy as _lazy f...
bsd-3-clause
vtorshyn/voltdb-shardit-src
python/voltdb-simple.py
1
2011
#!/usr/bin/python import json import sys import time import threading import urllib import urllib2 def debug(what): print what class VoltDBJSONClient(object): def __init__(self, host, port, api_version="1.0"): self.url="http://%s:%s/api/%s/" % (host, port, api_version) def buildRequest(self, procedure...
apache-2.0
mrquim/mrquimrepo
repo/script.module.unidecode/lib/unidecode/x096.py
252
4610
data = ( 'Fa ', # 0x00 'Ge ', # 0x01 'He ', # 0x02 'Kun ', # 0x03 'Jiu ', # 0x04 'Yue ', # 0x05 'Lang ', # 0x06 'Du ', # 0x07 'Yu ', # 0x08 'Yan ', # 0x09 'Chang ', # 0x0a 'Xi ', # 0x0b 'Wen ', # 0x0c 'Hun ', # 0x0d 'Yan ', # 0x0e 'E ', # 0x0f 'Chan ', # 0x10 'Lan ', ...
gpl-2.0
aronparsons/spacewalk
backend/server/rhnSQL/dbi.py
17
1500
# # Copyright (c) 2008--2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
qianqians/Screw
3rdparty/protobuf/python/google/protobuf/service_reflection.py
243
11023
# 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...
lgpl-2.1
skoppisetty/idigbio-appliance
lib/sqlalchemy/dialects/sybase/pyodbc.py
17
2214
# sybase/pyodbc.py # Copyright (C) 2005-2012 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 """ Support for Sybase via pyodbc. http://pypi.python.org/pypi/pyodbc/ Connect stri...
gpl-3.0
Nikoala/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/tass.py
166
2017
# encoding: utf-8 from __future__ import unicode_literals import json from .common import InfoExtractor from ..utils import ( js_to_json, qualities, ) class TassIE(InfoExtractor): _VALID_URL = r'https?://(?:tass\.ru|itar-tass\.com)/[^/]+/(?P<id>\d+)' _TESTS = [ { 'url': 'http://t...
gpl-3.0
pombreda/eggy
eggy/chardet/eucjpprober.py
215
3506
######################## 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-3.0