repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
jaloren/robotframework
src/robot/utils/markuputils.py
6
1553
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework 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 ...
apache-2.0
bingwen/shadowsocks
shadowsocks/shell.py
652
12736
#!/usr/bin/python # -*- coding: utf-8 -*- # # 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 b...
apache-2.0
sgraham/nope
tools/perf/measurements/smoothness.py
1
1618
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from metrics import power from measurements import smoothness_controller from telemetry.page import page_test class Smoothness(page_test.PageTest): def _...
bsd-3-clause
gurneyalex/sale-workflow
__unported__/sale_exception_nostock/model/sale.py
2
6153
# -*- coding: utf-8 -*- # # # Author: Nicolas Bessi # Copyright 2013 Camptocamp SA # # 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 Free Software Foundation, either version 3 of the # License, o...
agpl-3.0
Gaia3D/QGIS
python/plugins/processing/algs/qgis/SelectByExpression.py
6
3247
# -*- coding: utf-8 -*- """ *************************************************************************** SelectByExpression.py --------------------- Date : July 2014 Copyright : (C) 2014 by Michaël Douchin ***********************************************************************...
gpl-2.0
eXistenZNL/SickRage
lib/sqlalchemy/dialects/postgresql/pg8000.py
78
3930
# postgresql/pg8000.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: postgresql+pg8000 :name: pg8000 :dbapi: pg8000 :conn...
gpl-3.0
40223139/39g7test
static/Brython3.1.3-20150514-095342/Lib/signal.py
743
1646
"""This module provides mechanisms to use signal handlers in Python. Functions: alarm() -- cause SIGALRM after a specified time [Unix only] setitimer() -- cause a signal (described below) after a specified float time and the timer may restart then [Unix only] getitimer() -- get current value of timer [...
gpl-3.0
gnperumal/exscript
src/Exscript/parselib/Lexer.py
7
6515
# Copyright (C) 2007-2010 Samuel Abels. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2, as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANT...
gpl-2.0
halostatue/ansible
lib/ansible/errors/__init__.py
163
7342
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
zeroq/kraut_salad
kraut_parser/models.py
1
22668
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 from django.db import models # Create your models here. class Namespace(models.Model): namespace = models.CharField(max_length=255, default='nospace', unique=True) description = models.TextField(null=True, blank=True) def __unicode__(self): r...
gpl-2.0
patdoyle1/FastMath
lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/mbcsgroupprober.py
2769
1967
######################## 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-2.0
brinbois/Sick-Beard
sickbeard/clients/requests/packages/charade/chardistribution.py
184
9457
######################## 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 Ri...
gpl-3.0
cryptapus/electrum
electrum/gui/kivy/uix/dialogs/question.py
4
1357
from kivy.app import App from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from kivy.uix.checkbox import CheckBox from kivy.uix.label import Label from kivy.uix.widget import Widget from electrum.gui.kivy.i18n import _ Builder.load_string(''' <Question@Popup> ...
mit
liminspace/django-transtool
transtool/settings.py
1
2429
from django.conf import settings TRANSTOOL_DL_URL = getattr(settings, 'TRANSTOOL_DL_URL', None) # http://example.com/localemessages/export/ TRANSTOOL_DL_KEY = getattr(settings, 'TRANSTOOL_DL_KEY', None) # for import translates from remote server TRANSTOOL_EXPORT_KEY = getattr(settings, 'TRANSTOOL_EXPORT_KEY', None)...
mit
ict-felix/stack
optin_manager/src/python/openflow/optin_manager/sfa/openflow_utils/SliverRSpecParser.py
4
5551
class GENIDatapath(): def __init__ (self, dom): super(GENIDatapath, self).__init__() self.component_id = None if dom.tag == u'{%s}datapath' % (OFNSv3): self.__parse_openflowv3_datapath(dom) def __parse_openflowv3_datapath (self, dom): self.component_id = dom.get("component_id") cmid = d...
apache-2.0
Imaginashion/cloud-vision
.fr-d0BNfn/django-jquery-file-upload/venv/lib/python3.5/site-packages/django/core/management/commands/makemessages.py
9
25792
from __future__ import unicode_literals import fnmatch import glob import io import os import re import sys from functools import total_ordering from itertools import dropwhile import django from django.conf import settings from django.core.files.temp import NamedTemporaryFile from django.core.management.base import ...
mit
ministryofjustice/cla_public
cla_public/apps/base/views.py
1
7832
# coding: utf-8 """Base app views""" import os import logging import datetime import re from urlparse import urlparse, urljoin from flask import abort, current_app, jsonify, redirect, render_template, session, url_for, request, views from flask.ext.babel import lazy_gettext as _ import cla_public.apps.base.filters ...
mit
daymer/xWIKI_Karma
CustomModules/mysql-connector-python-2.1.7/tests/test_abstracts.py
1
10372
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
apache-2.0
synergeticsedx/deployment-wipro
common/djangoapps/enrollment/tests/test_api.py
16
12613
""" Tests for student enrollment. """ from mock import patch, Mock import ddt from nose.tools import raises import unittest from django.test.utils import override_settings from django.conf import settings from course_modes.models import CourseMode from enrollment import api from enrollment.errors import EnrollmentApi...
agpl-3.0
captain-pool/GSOC
E3_Distill_ESRGAN/main.py
1
5562
""" Compressing GANs using Knowledge Distillation. Teacher GAN: ESRGAN (https://github.com/captain-pool/E2_ESRGAN) Citation: @article{DBLP:journals/corr/abs-1902-00159, author = {Angeline Aguinaldo and Ping{-}Yeh Chiang and Alexander Gain and Ameya Patil and Kolten Pearson and Soheil F...
mit
pigeonflight/strider-plone
docker/appengine/lib/django-1.4/tests/runtests.py
25
12973
#!/usr/bin/env python import os import shutil import subprocess import sys import tempfile import warnings from django import contrib # databrowse is deprecated, but we still want to run its tests warnings.filterwarnings('ignore', "The Databrowse contrib app is deprecated", PendingDeprecationW...
mit
bharadwajyarlagadda/korona
tests/test_html_tags/test_col_tag.py
1
1308
# -*- coding: utf-8 -*- import pytest from ..fixtures import parametrize from korona.html.tags import Col from korona.templates.html.tags import col from korona.exceptions import TagAttributeError @parametrize('attributes', [ ({'align': 'char'}), ({'align': 'char', 'char': '.'}), ({'align': 'char', 'ch...
mit
tlangerak/Multi-Agent-Systems
setup.py
1
1846
#!/usr/bin/env python import sys import subprocess from setuptools import setup, Extension from runspade import __version__ try: import bdist_mpkg except: # This is not a mac pass if sys.platform == "win32": ext = Extension("tlslite.utils.win32prng", sources=["tlslite/utils/win...
lgpl-2.1
lmorchard/django
django/core/management/commands/makemigrations.py
38
12571
import os import sys from itertools import takewhile from django.apps import apps from django.core.management.base import BaseCommand, CommandError from django.db.migrations import Migration from django.db.migrations.autodetector import MigrationAutodetector from django.db.migrations.loader import MigrationLoader from...
bsd-3-clause
gabyx/GRSFramework
simulations/python/modules/GRSFTools/Transformations/Transformations.py
2
65541
# -*- coding: utf-8 -*- # transformations.py # Copyright (c) 2006-2014, Christoph Gohlke # Copyright (c) 2006-2014, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modifi...
gpl-3.0
nnethercote/servo
tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_origin.py
20
4728
import pytest from webdriver import MoveTargetOutOfBoundsException from tests.perform_actions.support.mouse import get_inview_center, get_viewport_rect from tests.support.inline import inline def origin_doc(inner_style, outer_style=""): return inline(""" <div id="outer" style="{1}" onmousemove=...
mpl-2.0
rdipietro/tensorflow
tensorflow/contrib/labeled_tensor/python/ops/ops_test.py
8
33515
# 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
felix9064/python
Demo/liaoxf/listcompr.py
1
1180
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 列表生成式 # 例1:使用列表生成式,将列表list1中的元素转小写,并过滤list1中的非字符串元素 # isinstance是Python内置函数,用于判断给定对象是否是给定的类型 list1 = ['Hello', 'World', 18, 'Apple', None] list2 = [s.lower() for s in list1 if isinstance(s, str)] print(list2) if list2 == ['hello', 'world', 'apple']: print('测试通过!'...
mit
seem-sky/kbengine
kbe/src/lib/python/Lib/idlelib/SearchEngine.py
70
7483
'''Define SearchEngine for search dialogs.''' import re from tkinter import StringVar, BooleanVar, TclError import tkinter.messagebox as tkMessageBox def get(root): '''Return the singleton SearchEngine instance for the process. The single SearchEngine saves settings between dialog instances. If there is n...
lgpl-3.0
wbond/asn1crypto
tests/test_csr.py
2
5871
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import unittest import sys import os from asn1crypto import csr, util from ._unittest_compat import patch patch() if sys.version_info < (3,): byte_cls = str num_cls = long # noqa else: byte_cls = bytes ...
mit
ran5515/DeepDecision
tensorflow/python/training/sync_replicas_optimizer_test.py
32
11519
# 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
specialkevin/ansible-modules-core
cloud/openstack/os_security_group.py
109
4265
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Copyright (c) 2013, Benno Joy <benno@ansible.com> # # This module 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 vers...
gpl-3.0
qwang2505/ssdb-source-comments
deps/cpy/engine.py
26
13165
# encoding=utf-8 ################################# # Author: ideawu # Link: http://www.ideawu.net/ ################################# import sys, os, shutil, datetime import antlr3 import antlr3.tree from ExprLexer import ExprLexer from ExprParser import ExprParser class CpyEngine: found_files = set() def find_impo...
bsd-3-clause
NetApp/manila
manila/tests/test_service.py
3
7809
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2014 NetApp, Inc. # Copyright 2014 Mirantis, Inc. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this fi...
apache-2.0
epiqc/ScaffCC
llvm/utils/lit/lit/display.py
2
4265
import sys def create_display(opts, tests, total_tests, workers): if opts.quiet: return NopDisplay() of_total = (' of %d' % total_tests) if (tests != total_tests) else '' header = '-- Testing: %d%s tests, %d workers --' % (tests, of_total, workers) progress_bar = None if opts.succinct an...
bsd-2-clause
MTgeophysics/mtpy
tests/modeling/__init__.py
1
2712
from __future__ import print_function import shutil from difflib import unified_diff import matplotlib import os import sys from matplotlib import pyplot as plt if os.name == "posix" and 'DISPLAY' not in os.environ: print("MATPLOTLIB: No Display found, using non-interactive svg backend", file=sys.stderr) m...
gpl-3.0
xujun10110/sleepy-puppy-1
sleepypuppy/admin/capture/models.py
13
2480
# Copyright 2015 Netflix, 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...
apache-2.0
tcstewar/parser
leftright.py
1
3272
D = 512 from vocab import Vocabulary input_sentence = 'the dog ran'.split() rules = [ ('S', ['NP', 'VP']), ('VP', ['V']), ('NP', ['DET', 'N']), ] words = { 'N': 'man dog'.split(), 'DET': 'a the'.split(), 'V': 'ran saw'.split(), } def label_word(s): best = None for w in wo...
gpl-2.0
jpirko/lnst
lnst/Tests/TestPMD.py
1
1828
import logging import subprocess import signal from lnst.Common.Parameters import Param, StrParam, IntParam, FloatParam from lnst.Common.Parameters import IpParam, DeviceOrIpParam from lnst.Tests.BaseTestModule import BaseTestModule, TestModuleError class TestPMD(BaseTestModule): coremask = StrParam(mandatory=True...
gpl-2.0
google-code/ampatu
languages/pl.py
2
6724
# coding: utf8 { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników z JOIN:', '%Y-%m-%d': '%Y-%m-%d', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%...
agpl-3.0
dominjune/LeetCode
062 Minimum Path Sum.py
3
1179
""" Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right at any point in time. """ __author__ = 'Danyang' class Solution: def minPathSum(self, grid): """ ...
mit
lmazuel/ansible
lib/ansible/modules/network/openswitch/ops_config.py
43
10660
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
henridwyer/scikit-learn
examples/calibration/plot_calibration.py
225
4795
""" ====================================== Probability calibration of classifiers ====================================== When performing classification you often want to predict not only the class label, but also the associated probability. This probability gives you some kind of confidence on the prediction. However,...
bsd-3-clause
olorz/scrapy
tests/test_downloadermiddleware_redirect.py
25
10022
import unittest from scrapy.downloadermiddlewares.redirect import RedirectMiddleware, MetaRefreshMiddleware from scrapy.spiders import Spider from scrapy.exceptions import IgnoreRequest from scrapy.http import Request, Response, HtmlResponse from scrapy.utils.test import get_crawler class RedirectMiddlewareTest(unit...
bsd-3-clause
NaturalGIS/naturalgis_qgis
python/plugins/processing/algs/grass7/ext/v_in_geonames.py
45
1246
# -*- coding: utf-8 -*- """ *************************************************************************** v_in_geonames.py ---------------- Date : March 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr *****************************...
gpl-2.0
ubgarbage/gae-blog
django/core/servers/fastcgi.py
289
6402
""" FastCGI (or SCGI, or AJP1.3 ...) server that implements the WSGI protocol. Uses the flup python package: http://www.saddi.com/software/flup/ This is a adaptation of the flup package to add FastCGI server support to run Django apps from Web servers that support the FastCGI protocol. This module can be run standalo...
bsd-3-clause
achang97/YouTunes
lib/python2.7/site-packages/flask/blueprints.py
169
16872
# -*- coding: utf-8 -*- """ flask.blueprints ~~~~~~~~~~~~~~~~ Blueprints are the recommended way to implement larger or more pluggable applications in Flask 0.7 and later. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from functools import update_wrap...
mit
alberthdev/pyradmon
pyradmon/wrapper.py
1
17646
#!/usr/bin/env python # PyRadmon - Python Radiance Monitoring Tool # Copyright 2014 Albert Huang. # # 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
Brandon32/jasper-client
client/vocabcompiler.py
34
19268
# -*- coding: utf-8-*- """ Iterates over all the WORDS variables in the modules and creates a vocabulary for the respective stt_engine if needed. """ import os import tempfile import logging import hashlib import subprocess import tarfile import re import contextlib import shutil from abc import ABCMeta, abstractmetho...
mit
piMoll/SEILAPLAN
lib/reportlab/graphics/barcode/usps4s.py
2
15593
#copyright ReportLab Inc. 2000-2016 #see license.txt for license details from __future__ import print_function __version__='3.3.0' __all__ = ('USPS_4State',) from reportlab.lib.colors import black from reportlab.graphics.barcode.common import Barcode from reportlab.lib.utils import asNative def nhex(i): 'normaliz...
gpl-2.0
rabipanda/tensorflow
tensorflow/contrib/opt/python/training/moving_average_optimizer_test.py
13
6633
# 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
vrtadmin/clamav-devel
win32/3rdparty/libxml2/python/libxml2class.py
1
321365
# # Functions from module HTMLparser # def htmlCreateMemoryParserCtxt(buffer, size): """Create a parser context for an HTML in-memory document. """ ret = libxml2mod.htmlCreateMemoryParserCtxt(buffer, size) if ret is None:raise parserError('htmlCreateMemoryParserCtxt() failed') return parserCtxt(_obj=re...
gpl-2.0
mrquim/mrquimrepo
script.video.F4mProxy/lib/flvlib/helpers.py
95
5650
import os import time import datetime from StringIO import StringIO from UserDict import DictMixin class UTC(datetime.tzinfo): """ A UTC tzinfo class, based on http://docs.python.org/library/datetime.html#datetime.tzinfo """ ZERO = datetime.timedelta(0) def utcoffset(self, dt): retu...
gpl-2.0
andrewyoung1991/abjad
abjad/tools/mathtools/yield_all_partitions_of_integer.py
2
1024
# -*- encoding: utf-8 -*- def yield_all_partitions_of_integer(n): r'''Yields all partitions of positive integer `n` in descending lex order: :: >>> for partition in mathtools.yield_all_partitions_of_integer(7): ... partition ... (7,) (6, 1) (5, 2) ...
gpl-3.0
jessefeinman/FintechHackathon
venv/Lib/site-packages/wheel/metadata.py
93
11676
""" Tools for converting old- to new-style metadata. """ from collections import namedtuple from .pkginfo import read_pkg_info from .util import OrderedDefaultDict try: from collections import OrderedDict except ImportError: OrderedDict = dict import re import os.path import textwrap import pkg_resources impo...
bsd-2-clause
MadcowD/libgdx
extensions/gdx-freetype/jni/freetype-2.6.2/src/tools/docmaker/docmaker.py
165
3183
#!/usr/bin/env python # # docmaker.py # # Convert source code markup to HTML documentation. # # Copyright 2002-2015 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.TXT. By continuing ...
apache-2.0
adamklawonn/CityCircles
citycircles_iphone/build_back2/iphoneDistribution-iphonesimulator/CityCircles.app/globalmaptiles.py
28
16529
#!/usr/bin/env python ############################################################################### # $Id$ # # Project: GDAL2Tiles, Google Summer of Code 2007 & 2008 # Global Map Tiles Classes # Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326, # generate a simple HTML viewers b...
gpl-3.0
jemekite/Dougpool
p2pool/util/forest.py
281
13557
''' forest data structure ''' import itertools from p2pool.util import skiplist, variable class TrackerSkipList(skiplist.SkipList): def __init__(self, tracker): skiplist.SkipList.__init__(self) self.tracker = tracker self.tracker.removed.watch_weakref(self, lambda self, item: se...
gpl-3.0
LaoZhongGu/kbengine
kbe/src/lib/python/Doc/includes/sqlite3/converter_point.py
55
1192
import sqlite3 class Point: def __init__(self, x, y): self.x, self.y = x, y def __repr__(self): return "(%f;%f)" % (self.x, self.y) def adapt_point(point): return ("%f;%f" % (point.x, point.y)).encode('ascii') def convert_point(s): x, y = list(map(float, s.split(b";"))) return Po...
lgpl-3.0
shsingh/ansible
lib/ansible/modules/network/fortios/fortios_wanopt_settings.py
7
9324
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
gpl-3.0
jylaxp/django
tests/app_loading/tests.py
288
3113
from __future__ import unicode_literals import os from django.apps import apps from django.test import SimpleTestCase from django.test.utils import extend_sys_path from django.utils import six from django.utils._os import upath class EggLoadingTest(SimpleTestCase): def setUp(self): self.egg_dir = '%s/e...
bsd-3-clause
jamesbeebop/CouchPotatoServer
couchpotato/core/media/__init__.py
22
3818
import os import traceback from couchpotato import CPLog, md5 from couchpotato.core.event import addEvent, fireEvent, fireEventAsync from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import getExt from couchpotato.core.plugins.base import Plugin import six log = CPLog(__n...
gpl-3.0
shastah/spacewalk
client/debian/packages-already-in-debian/rhn-client-tools/src/firstboot/rhn_choose_server_gui.py
17
3410
# Copyright 2006--2010 Red Hat, Inc. # # 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; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT...
gpl-2.0
c-a/jhbuild
jhbuild/utils/sxml.py
8
2925
# jhbuild - a tool to ease building collections of source packages # Copyright (C) 2008 Andy Wingo <wingo@pobox.com> # # sxml.py: xml as s-expressions # # 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 Fo...
gpl-2.0
ahu-odoo/odoo
addons/account_payment/account_move_line.py
66
2705
# -*- 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
psdh/servo
tests/wpt/css-tests/tools/webdriver/webdriver/keys.py
263
1481
"""Constants for special keys.""" class Keys: """Constants for special keys.""" NULL = '\uE000' CANCEL = '\uE001' HELP = '\uE002' BACK_SPACE = '\uE003' TAB = '\uE004' CLEAR = '\uE005' RETURN = '\uE006' ENTER = '\uE007' SHIFT = '\uE008' LEFT_SHIFT = '\uE008' CONTROL = '\u...
mpl-2.0
dfalt974/SickRage
sickbeard/notifiers/emby.py
2
4219
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: https://sickchill.github.io # # This file is part of SickChill. # # SickChill 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
pymedusa/Medusa
medusa/clients/torrent/mlnet.py
2
1427
# coding=utf-8 """MLDonkey Client.""" from __future__ import unicode_literals from medusa.clients.torrent.generic import GenericClient class MLNetAPI(GenericClient): """MLDonkey API class.""" def __init__(self, host=None, username=None, password=None): """Constructor. :param host: ...
gpl-3.0
leighpauls/k2cro4
third_party/python_26/Lib/site-packages/win32/lib/win32pdhutil.py
21
7360
"""Utilities for the win32 Performance Data Helper module Example: To get a single bit of data: >>> import win32pdhutil >>> win32pdhutil.GetPerformanceAttributes("Memory", "Available Bytes") 6053888 >>> win32pdhutil.FindPerformanceAttributesByName("python", counter="Virtual Bytes") [22278144] First exam...
bsd-3-clause
tencentyun/Cloud-Image-Migration-Tool
usr/lib/oss2/api.py
4
40750
# -*- coding: utf-8 -*- """ 文件上传方法中的data参数 ------------------------ 诸如 :func:`put_object <Bucket.put_object>` 这样的上传接口都会有 `data` 参数用于接收用户数据。`data` 可以是下述类型 - unicode类型(对于Python3则是str类型):内部会自动转换为UTF-8的bytes - bytes类型:不做任何转换 - file-like object:对于可以seek和tell的file object,从当前位置读取直到结束。其他类型,请确保当前位置是文件开始。 - 可迭代类...
mit
ehashman/oh-mainline
mysite/customs/migrations/0013_fix_fieldname_in_bugzillaurl.py
16
4442
# This file is part of OpenHatch. # Copyright (C) 2010 Jack Grigg # # 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 Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
agpl-3.0
defionscode/ansible
lib/ansible/plugins/callback/splunk.py
54
8017
# -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distr...
gpl-3.0
tusharjain95/Babblefire
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
ConanChou/hyde
hydeengine/templatetags/hydetags.py
35
13384
from datetime import datetime import operator import os import re import string from django import template from django.conf import settings from django.template import Template from django.template.loader import render_to_string from django.template.defaultfilters import truncatewords_html, stringfilter from django.t...
mit
mgr0dzicki/python-neo
neo/core/baseneo.py
6
14948
# -*- coding: utf-8 -*- """ This module defines :class:`BaseNeo`, the abstract base class used by all :module:`neo.core` classes. """ # needed for python 3 compatibility from __future__ import absolute_import, division, print_function from datetime import datetime, date, time, timedelta from decimal import Decimal im...
bsd-3-clause
cosmo-ethz/hope
hope/config.py
1
1137
# Copyright (c) 2013 ETH Zurich, Institute of Astronomy, Lukas Gamper <lukas.gamper@usystems.ch> from __future__ import print_function, division, absolute_import, unicode_literals from hope.options import get_cxxflags # Additional compiler flags, formated as array of strings cxxflags = get_cxxflags() """ List of c...
gpl-3.0
albertjan/pypyjs-presentation
assets/js/pypy.js-0.3.1/lib/modules/distutils/dist.py
175
50049
"""distutils.dist Provides the Distribution class, which represents the module distribution being built/installed/distributed. """ __revision__ = "$Id$" import sys, os, re from email import message_from_file try: import warnings except ImportError: warnings = None from distutils.errors import (DistutilsOpt...
unlicense
blakfeld/ansible-modules-extras
cloud/amazon/ec2_eni.py
10
14272
#!/usr/bin/python # # This is a free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This Ansible library is distributed in the hope that i...
gpl-3.0
jrfastab/rocker-net-next
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
joshuajan/odoo
addons/product/_common.py
111
1418
# -*- 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
ewiseblatt/spinnaker
unittest/buildtool/test_util.py
2
6983
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
jorik041/plaso
tests/parsers/chrome_preferences.py
3
2101
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the Chrome Preferences file parser.""" import unittest # pylint: disable=unused-import from plaso.formatters import chrome_preferences as chrome_preferences_formatter from plaso.lib import timelib from plaso.parsers import chrome_preferences from tests.parsers i...
apache-2.0
Orochimarufan/youtube-dl
youtube_dl/extractor/nowness.py
54
6024
# coding: utf-8 from __future__ import unicode_literals from .brightcove import ( BrightcoveLegacyIE, BrightcoveNewIE, ) from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, sanitized_Request, ) class NownessBaseIE(InfoExtractor): def _extract_ur...
unlicense
sileht/aodh
aodh/tests/api/v2/test_acl_scenarios.py
1
4386
# # Copyright 2012 New Dream Network, LLC (DreamHost) # Copyright 2015 Red Hat, 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 # # Un...
apache-2.0
appneta/boto
tests/integration/cognito/identity/test_cognito_identity.py
112
2545
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
mit
efortuna/AndroidSDKClone
ndk_experimental/prebuilt/linux-x86_64/lib/python2.7/idlelib/macosxSupport.py
51
6222
""" A number of function that enhance IDLE on MacOSX when it used as a normal GUI application (as opposed to an X11 application). """ import sys import Tkinter from os import path _appbundle = None def runningAsOSXApp(): """ Returns True if Python is running from within an app on OSX. If so, assume that ...
apache-2.0
pulsar-chem/Pulsar-Core
lib/systems/d-leucine.py
1
1231
import pulsar as psr def load_ref_system(): """ Returns d-leucine as found in the IQMol fragment library. All credit to https://github.com/nutjunkie/IQmol """ return psr.make_system(""" C 1.6125 -0.7205 -0.4004 C 0.1080 -0.4462 -0.4641 C -0.2699 ...
bsd-3-clause
sillvan/laikaboss
laikaboss/modules/decode_base64.py
20
1160
# Copyright 2015 Lockheed Martin Corporation # # 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 agr...
apache-2.0
map222/spark
python/pyspark/mllib/clustering.py
59
36931
# # 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 us...
apache-2.0
Tao-Ma/incubator-hawq
tools/bin/gppylib/testold/testUtils.py
40
7004
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2010. All Rights Reserved. # # # THIS IMPORT MUST COME FIRST # import mainUtils FIRST to get python version check # from gppylib.mainUtils import * import os, sys, traceback gProgramName = os.path.split(sys.argv[0])[-1] from gppylib.commands.base import setExecuti...
apache-2.0
lg-devs/android_kernel_lge_msm8974
tools/perf/scripts/python/netdev-times.py
11271
15048
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
mmardini/django
tests/proxy_model_inheritance/tests.py
34
1921
from __future__ import absolute_import, unicode_literals import os from django.core.management import call_command from django.test import TestCase, TransactionTestCase from django.test.utils import override_system_checks, extend_sys_path from django.utils._os import upath from .models import (ConcreteModel, Concret...
bsd-3-clause
LUTAN/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/kullback_leibler_test.py
27
4410
# 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
tlakshman26/cinder-https-changes
cinder/tests/unit/test_test.py
22
2735
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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...
apache-2.0
uclaacm/ai-combat
AICombat/virtual/queuebot.py
1
4860
""" queuebot.py A pure utility virtualbot to be subclassed. The Queuebot provides a queue decorator to be used on get_action, allowing subclasses to define action sequences instead of juggling around action primitives. """ # Global imports from collections import deque # Local imports import real.definitions as d fr...
gpl-2.0
0k/odoo
addons/marketing_campaign_crm_demo/__openerp__.py
52
1694
# -*- 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
mSenyor/sl4a
python/src/Tools/msi/msi.py
30
58459
# Python MSI Generator # (C) 2003 Martin v. Loewis # See "FOO" in comments refers to MSDN sections with the title FOO. import msilib, schema, sequence, os, glob, time, re, shutil from msilib import Feature, CAB, Directory, Dialog, Binary, add_data import uisample from win32com.client import constants from distutils.spa...
apache-2.0
cyril51/Sick-Beard
lib/hachoir_metadata/image.py
90
10812
from lib.hachoir_metadata.metadata import (registerExtractor, Metadata, RootMetadata, MultipleMetadata) from lib.hachoir_parser.image import ( BmpFile, IcoFile, PcxFile, GifFile, PngFile, TiffFile, XcfFile, TargaFile, WMF_File, PsdFile) from lib.hachoir_parser.image.png import getBitsPerPixel as pngBitsPerP...
gpl-3.0
spadae22/odoo
addons/mrp_operations/__init__.py
443
1091
# -*- 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
zhlinh/leetcode
0284.Peeking Iterator/solution.py
1
2930
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ***************************************** Author: zhlinh Email: zhlinhng@gmail.com Version: 0.0.1 Created Time: 2016-05-10 Last_modify: 2016-05-10 ****************************************** ''' ''' Given an Iterator class interface with met...
apache-2.0