repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
orifinkelman/incubator-trafficcontrol
refs/heads/master
docs/source/conf.py
3
# # # 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 # distributed under th...
grap/OpenUpgrade
refs/heads/8.0
addons/website_sale/models/payment.py
46
# -*- coding: utf-8 -*- import logging from openerp import SUPERUSER_ID from openerp.osv import orm, fields from openerp.tools import float_compare _logger = logging.getLogger(__name__) class PaymentTransaction(orm.Model): _inherit = 'payment.transaction' _columns = { # link with the sale order ...
moylop260/odoo-dev
refs/heads/master
addons/portal_project_issue/tests/test_access_rights.py
43
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
CG-F16-16-Rutgers/steersuite-rutgers
refs/heads/master
steerstats/run_steersim.py
8
import sys from steersuite.LogParser import LogParser from steersuite import init_steerSim if __name__ == "__main__": """ Example run python run_steersim.py -module scenario,scenarioAI=pprAI,useBenchmark,benchmarkTechnique=compositePLE,checkAgentValid,reducedGoals,fixedSpeed,checkAgentRelevant,minAge...
mbareta/edx-platform-ft
refs/heads/open-release/eucalyptus.master
common/test/data/capa/prog2.py
270
# prog2 # Make this file long, since that seems to affect how uploaded files are # handled in webob or cgi.FieldStorage. moby_dick_ten_chapters = """ CHAPTER 1. Loomings. Call me Ishmael. Some years ago--never mind how long precisely--having little or no money in my purse, and nothing particular to interest me on s...
pypa/pip
refs/heads/main
src/pip/_vendor/urllib3/contrib/appengine.py
11
""" This module provides a pool manager that uses Google App Engine's `URLFetch Service <https://cloud.google.com/appengine/docs/python/urlfetch>`_. Example usage:: from pip._vendor.urllib3 import PoolManager from pip._vendor.urllib3.contrib.appengine import AppEngineManager, is_appengine_sandbox if is_a...
ajoaoff/django
refs/heads/master
django/contrib/flatpages/sitemaps.py
729
from django.apps import apps as django_apps from django.contrib.sitemaps import Sitemap from django.core.exceptions import ImproperlyConfigured class FlatPageSitemap(Sitemap): def items(self): if not django_apps.is_installed('django.contrib.sites'): raise ImproperlyConfigured("FlatPageSitemap ...
mgpyh/django-contrib-comments
refs/heads/master
tests/testapp/tests/comment_view_tests.py
4
from __future__ import absolute_import, unicode_literals import re from django.conf import settings from django.contrib.auth.models import User from django_comments import signals from django_comments.models import Comment from . import CommentTestCase from ..models import Article, Book post_redirect_re = re.comp...
proxysh/Safejumper-for-Mac
refs/heads/master
buildlinux/env32/lib/python2.7/site-packages/twisted/plugins/twisted_inet.py
83
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.application.service import ServiceMaker TwistedINETD = ServiceMaker( "Twisted INETD Server", "twisted.runner.inetdtap", "An inetd(8) replacement.", "inetd")
alajara/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_dispatch.py
488
#!/usr/bin/env python # # 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...
liosha2007/temporary-groupdocs-python-sdk
refs/heads/master
groupdocs/models/UpdateUserResponse.py
1
#!/usr/bin/env python """ Copyright 2012 GroupDocs. 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...
skylarker/jasper-client
refs/heads/master
client/conversation.py
30
# -*- coding: utf-8-*- import logging from notifier import Notifier from brain import Brain class Conversation(object): def __init__(self, persona, mic, profile): self._logger = logging.getLogger(__name__) self.persona = persona self.mic = mic self.profile = profile self.b...
ehashman/oh-mainline
refs/heads/master
vendor/packages/sphinx/sphinx/util/jsonimpl.py
16
# -*- coding: utf-8 -*- """ sphinx.util.jsonimpl ~~~~~~~~~~~~~~~~~~~~ JSON serializer implementation wrapper. :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import UserString try: import json # json-py's json module has no JSO...
stanlyxiang/incubator-hawq
refs/heads/master
tools/bin/gppylib/operations/test/unit/test_unit_utils.py
12
#!/usr/bin/env python # 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 # "Li...
mbroadst/rethinkdb
refs/heads/next
test/common/http_support/flask/debughelpers.py
777
# -*- coding: utf-8 -*- """ flask.debughelpers ~~~~~~~~~~~~~~~~~~ Various helpers to make the development experience better. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from ._compat import implements_to_string class UnexpectedUnicodeError(AssertionEr...
fstagni/DIRAC
refs/heads/v7r0-fixes27
Core/Utilities/CFG.py
1
""" This is the main module that interprets DIRAC cfg format """ from __future__ import print_function __RCSID__ = "$Id$" import copy import os import re import zipfile try: from DIRAC.Core.Utilities import List, ThreadSafe from DIRAC.Core.Utilities.ReturnValues import S_OK, S_ERROR gCFGSynchro = ThreadSafe....
andrew-luhring/yolo-robot
refs/heads/master
node_modules/sqlite3/deps/extract.py
775
import sys import tarfile import os tarball = os.path.abspath(sys.argv[1]) dirname = os.path.abspath(sys.argv[2]) tfile = tarfile.open(tarball,'r:gz'); tfile.extractall(dirname) sys.exit(0)
Drudenhaus/aws-ec2rescue-linux
refs/heads/develop
lib/requests/certs.py
516
#!/usr/bin/env python # -*- coding: utf-8 -*- """ requests.certs ~~~~~~~~~~~~~~ This module returns the preferred default CA certificate bundle. If you are packaging Requests, e.g., for a Linux distribution or a managed environment, you can change the definition of where() to return a separately packaged CA bundle. ...
ejpbruel/servo
refs/heads/master
tests/wpt/css-tests/tools/wptserve/wptserve/constants.py
326
import utils content_types = utils.invert_dict({"text/html": ["htm", "html"], "application/json": ["json"], "application/xhtml+xml": ["xht", "xhtm", "xhtml"], "application/xml": ["xml"], ...
anirudhSK/chromium
refs/heads/master
native_client_sdk/src/build_tools/tests/verify_filelist_test.py
132
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) BUILD_TOOLS_DIR = os.path.dirname(SCR...
zemogle/raspberrysky
refs/heads/master
app.py
1
#!/usr/bin/env python from importlib import import_module import os from flask import Flask, render_template, Response, send_from_directory, request import socket import json from allsky import single_image_raspistill, check_image_status from tasks import background_task app = Flask(__name__) # Create the Celery ins...
arju88nair/projectCulminate
refs/heads/master
venv/lib/python3.5/site-packages/nltk/app/nemo_app.py
2
# Finding (and Replacing) Nemo, Version 1.1, Aristide Grange 2006/06/06 # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496783 """ Finding (and Replacing) Nemo Instant Regular Expressions Created by Aristide Grange """ from six.moves.tkinter import (Frame, Label, PhotoImage, Scrollbar, Text, Tk, ...
prashanthr/wakatime
refs/heads/master
wakatime/packages/pygments_py2/pygments/lexers/actionscript.py
72
# -*- coding: utf-8 -*- """ pygments.lexers.actionscript ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for ActionScript and MXML. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, using,...
jaggu303619/asylum-v2.0
refs/heads/master
openerp/tools/config.py
17
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
avadacatavra/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/funcsigs/tests/test_inspect.py
40
# Copyright 2001-2013 Python Software Foundation; All Rights Reserved from __future__ import absolute_import, division, print_function import collections import sys try: import unittest2 as unittest except ImportError: import unittest import funcsigs as inspect class TestSignatureObject(unittest.TestCase): ...
vmanoria/bluemix-hue-filebrowser
refs/heads/master
hue-3.8.1-bluemix/desktop/core/ext-py/kazoo-2.0/kazoo/tests/test_security.py
51
import unittest from nose.tools import eq_ from kazoo.security import Permissions class TestACL(unittest.TestCase): def _makeOne(self, *args, **kwargs): from kazoo.security import make_acl return make_acl(*args, **kwargs) def test_read_acl(self): acl = self._makeOne("digest", ":", re...
ylbian/robot-d
refs/heads/master
robotx/template/project_template/results/__init__.py
9
#this directory is used for saving running results
zhouzhenghui/python-for-android
refs/heads/master
python3-alpha/extra_modules/gdata/contentforshopping/client.py
63
#!/usr/bin/python # # Copyright (C) 2010-2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
RealTimeWeb/datasets
refs/heads/master
builder/languages/detect_distribution.py
1
import warnings import numpy as np import pandas as pd import scipy.stats as st import statsmodels as sm import matplotlib import matplotlib.pyplot as plt import random matplotlib.rcParams['figure.figsize'] = (16.0, 12.0) matplotlib.style.use('ggplot') # Create models from data def best_fit_distribution(data, bins=20...
tbinjiayou/Odoo
refs/heads/master
addons/web_tests_demo/__openerp__.py
384
{ 'name': "Demonstration of web/javascript tests", 'category': 'Hidden', 'description': """ OpenERP Web demo of a test suite ================================ Test suite example, same code as that used in the testing documentation. """, 'depends': ['web'], 'data' : [ 'views/web_tests_dem...
noisyboiler/wampy
refs/heads/master
wampy/messages/registered.py
1
# 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/. class Registered(object): """ [REGISTERED, REGISTER.Request|id, Registration|id] """ WAMP_CODE = 65 nam...
wdkk/iSuperColliderKit
refs/heads/master
editors/sced/sced/Settings.py
46
# sced (SuperCollider mode for gedit) # Copyright 2009 Artem Popov and other contributors (see AUTHORS) # # sced 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, ...
omarestrella/repolab
refs/heads/master
repolab/urls.py
1
from django.conf.urls import patterns, url from repolab import views urlpatterns = patterns('', url(r'^$', views.Homepage.as_view(), name='homepage_url'), url(r'^repo/add/$', views.AddRepo.as_view(), name='add_repo_url'), url(r'^repo/(?P<slug>[\w\d_-]+)/$', views.ViewRepo.as_view(), name='repo_url'), ...
mattclark/osf.io
refs/heads/develop
osf/models/spam.py
7
import abc import logging from django.db import models from django.utils import timezone from osf.exceptions import ValidationValueError, ValidationTypeError from osf.utils.datetime_aware_jsonfield import DateTimeAwareJSONField from osf.utils.fields import NonNaiveDateTimeField from osf.utils import akismet from webs...
crawln45/Flexget
refs/heads/develop
flexget/plugins/modify/plugin_priority.py
13
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging from flexget import plugin from flexget.event import event log = logging.getLogger('p_priority') class PluginPriority(object): """ Allows mod...
jianghuaw/nova
refs/heads/master
nova/tests/unit/utils.py
4
# Copyright 2011 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 l...
gibil5/openhealth
refs/heads/master
models/product/exc_vars.py
1
# -*- coding: utf-8 -*- # Used by: Product Template _family_list = [ # Products 'topical', 'card', 'kit', # Services 'consultation', 'laser', 'medical', 'cosmetology', 'gynecology', 'promotion', 'echography', 'other', 'test', ] _subfamily_list = [ # Products 'chavarri', 'commercial', # Consultation 'consul...
eusoubrasileiro/fatiando_seismic
refs/heads/sim-class-migration
cookbook/seismic_wavefd_love_wave.py
9
""" Seismic: 2D finite difference simulation of elastic SH wave propagation in a medium with a discontinuity (i.e., Moho), generating Love waves. """ import numpy as np from matplotlib import animation from fatiando import gridder from fatiando.seismic import wavefd from fatiando.vis import mpl # Set the parameters of...
TanguyPatte/phantomjs-packaging
refs/heads/master
src/qt/qtwebkit/Tools/QueueStatusServer/main.py
119
# Copyright (C) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
phillxnet/rockstor-core
refs/heads/master
src/rockstor/storageadmin/models/validators.py
2
""" Copyright (c) 2012-2020 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
vaporry/pyethereum
refs/heads/master
ethereum/tester.py
2
import shutil import tempfile import time from ethereum import spv import ethereum import ethereum.db as db import ethereum.opcodes as opcodes import ethereum.abi as abi from ethereum.slogging import LogRecorder, configure_logging, set_level from ethereum.utils import to_string from ethereum.config import Env from ethe...
maljac/connector
refs/heads/8.0
connector/unit/synchronizer.py
18
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # 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 # pu...
NeovaHealth/odoo
refs/heads/8.0
openerp/tests/addons/test_translation_import/tests/test_term_count.py
323
# -*- coding: utf-8 -*- import openerp from openerp.tests import common class TestTermCount(common.TransactionCase): def test_count_term(self): """ Just make sure we have as many translation entries as we wanted. """ openerp.tools.trans_load(self.cr, 'test_translation_import/i18n/...
Centre-Alt-Rendiment-Esportiu/att
refs/heads/master
old_project/Python/win_libs/scipy/sparse/tests/test_spfuncs.py
122
from __future__ import division, print_function, absolute_import from numpy import array, kron, matrix, diag from numpy.testing import TestCase, run_module_suite, assert_, assert_equal from scipy.sparse import spfuncs from scipy.sparse import csr_matrix, csc_matrix, bsr_matrix from scipy.sparse._sparsetools import cs...
zjsxzy/datahub
refs/heads/master
src/apps/viz2/urls.py
7
from django.conf.urls import patterns, include, url urlpatterns = patterns('', url(r'^$', 'viz2.views.index'), )
bernardorufino/pick
refs/heads/master
src/view.py
1
import curses from utils import printstr class View(object): DIRECTIONS = { curses.KEY_UP: (-1, 0), curses.KEY_RIGHT: (0, 1), curses.KEY_DOWN: (1, 0), curses.KEY_LEFT: (0, -1), } MARGIN = (1, 2) def __init__(self, table, selectors, output_processors, delimiter): ...
EdLogan18/logan-repository
refs/heads/master
plugin.video.SportsDevil/dateutil/tz/__init__.py
105
from .tz import * __all__ = ["tzutc", "tzoffset", "tzlocal", "tzfile", "tzrange", "tzstr", "tzical", "tzwin", "tzwinlocal", "gettz"]
mitocw/edx-platform
refs/heads/master
lms/djangoapps/commerce/constants.py
6
""" Constants for this app as well as the external API. """ class OrderStatus(object): """Constants representing all known order statuses. """ OPEN = 'Open' FULFILLMENT_ERROR = 'Fulfillment Error' COMPLETE = 'Complete' class Messages(object): """ Strings used to populate response messages. """ ...
shichao-an/python-daemon
refs/heads/master
daemon/runner.py
9
# -*- coding: utf-8 -*- # daemon/runner.py # Part of ‘python-daemon’, an implementation of PEP 3143. # # Copyright © 2009–2015 Ben Finney <[email protected]> # Copyright © 2007–2008 Robert Niederreiter, Jens Klein # Copyright © 2003 Clark Evans # Copyright © 2002 Noah Spurrier # Copyright © 2001 Jürgen Herman...
cartwheelweb/packaginator
refs/heads/master
apps/pypi/__init__.py
4
""" All connection points with PyPI """
hyperized/ansible
refs/heads/devel
test/units/modules/network/fortios/test_fortios_firewall_ssl_server.py
21
# 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 License, or # (at your option) any later version. # # This program is distributed in the...
fairbird/OpenPLI-BlackHole
refs/heads/master
lib/python/Components/Element.py
47
from Tools.CList import CList # down up # Render Converter Converter Source # a bidirectional connection def cached(f): name = f.__name__ def wrapper(self): cache = self.cache if cache is None: return f(self) if name not in cache: cache[name] = (True, f(self)) return cache[name]...
angelapper/odoo
refs/heads/9.0
addons/website/models/ir_qweb.py
29
# -*- coding: utf-8 -*- from openerp.addons.web.http import request from openerp.osv import orm class QWeb(orm.AbstractModel): """ QWeb object for rendering stuff in the website context """ _inherit = 'ir.qweb' URL_ATTRS = { 'form': 'action', 'a': 'href', } CDN_TRIGGERS = { ...
jjkester/django-auditlog
refs/heads/master
auditlog/migrations/0003_logentry_remote_addr.py
1
from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('auditlog', '0002_auto_support_long_primary_keys'), ] operations = [ migrations.AddField( model_name='logentry', name='remote_addr', field=models.GenericI...
xiang12835/python_web
refs/heads/master
py2_web2py/web2py/gluon/contrib/pypyodbc.py
21
# -*- coding: utf-8 -*- # PyPyODBC is develped from RealPyODBC 0.1 beta released in 2004 by Michele Petrazzo. Thanks Michele. # The MIT License (MIT) # # Copyright (c) 2014 Henry Zhou <[email protected]> and PyPyODBC contributors # Copyright (c) 2004 Michele Petrazzo # Permission is hereby granted, free of charg...
deemoowoor/.vim
refs/heads/master
ftplugin/python/pyflakes/setup.py
37
#!/usr/bin/python # (c) 2005-2009 Divmod, Inc. See LICENSE file for details from distutils.core import setup setup( name="pyflakes", license="MIT", version="0.4.0", description="passive checker of Python programs", author="Phil Frost", maintainer="Moe Aboulkheir", maintainer_email="moe@di...
kthordarson/youtube-dl-ruv
refs/heads/master
youtube_dl/extractor/brightcove.py
2
# encoding: utf-8 from __future__ import unicode_literals import re import json import xml.etree.ElementTree from .common import InfoExtractor from ..utils import ( compat_urllib_parse, find_xpath_attr, fix_xml_ampersands, compat_urlparse, compat_str, compat_urllib_request, compat_parse_qs...
monsta/pluma
refs/heads/master
plugins/quickopen/quickopen/windowhelper.py
1
# -*- coding: utf-8 -*- # Copyright (C) 2009 - Jesse van den Kieboom # # 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 vers...
hgl888/chromium-crosswalk
refs/heads/master
tools/git/git-diff-ide.py
197
#!/usr/bin/env python # Copyright (c) 2012 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. """ Invokes git diff [args...] and inserts file:line in front of each line of diff output where possible. This is useful fro...
os2sd/android_kernel_lge_msm7x27-3.0.x
refs/heads/cm-11.0
tools/perf/scripts/python/sctop.py
11180
# system call top # (c) 2010, Tom Zanussi <[email protected]> # 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,...
kumarkrishna/sympy
refs/heads/master
sympy/solvers/tests/test_inequalities.py
24
"""Tests for tools for solving inequalities and systems of inequalities. """ from sympy import (And, Eq, FiniteSet, Ge, Gt, Interval, Le, Lt, Ne, oo, Or, S, sin, sqrt, Symbol, Union, Integral, Sum, Function, Poly, PurePoly, pi, root) from sympy.solvers.inequalities import (reduce_...
dougbenjamin/panda-harvester
refs/heads/master
pandaharvester/harvesterbody/command_manager.py
2
import socket import datetime from future.utils import iteritems from pandaharvester.harvesterconfig import harvester_config from pandaharvester.harvestercore import core_utils from pandaharvester.harvestercore.db_proxy_pool import DBProxyPool as DBProxy from pandaharvester.harvesterbody.agent_base import AgentBase fro...
gencer/python-phonenumbers
refs/heads/dev
python/phonenumbers/data/alt_format_676.py
13
"""Auto-generated file, do not edit by hand. 676 metadata""" from ..phonemetadata import NumberFormat PHONE_ALT_FORMAT_676 = [NumberFormat(pattern='(\\d{2})(\\d{5})', format='\\1 \\2', leading_digits_pattern=['7[5-9]|8[47-9]'])]
stephenmcd/cartridge
refs/heads/master
cartridge/shop/__init__.py
17
from __future__ import unicode_literals from cartridge import __version__
nubark/odoo
refs/heads/9.0
addons/payment_ogone/tests/test_ogone.py
430
# -*- coding: utf-8 -*- from lxml import objectify import time import urlparse from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment.tests.common import PaymentAcquirerCommon from openerp.addons.payment_ogone.controllers.main import OgoneController from openerp.tools i...
MQQiang/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/idlelib/macosxSupport.py
67
""" A number of functions that enhance IDLE on Mac OSX. """ import sys import tkinter from os import path import warnings def runningAsOSXApp(): warnings.warn("runningAsOSXApp() is deprecated, use isAquaTk()", DeprecationWarning, stacklevel=2) return isAquaTk() def isCarbonAquaTk(root)...
getsentry/zeus
refs/heads/master
zeus/migrations/2174d4350f40_multiple_revision_authors.py
1
"""multiple_revision_authors Revision ID: 2174d4350f40 Revises: f8851082b9d9 Create Date: 2020-01-06 15:57:52.051760 """ import zeus from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "2174d4350f40" down_revision = "f8851082b9d9" branch_labels = () depends_on = None ...
klonage/nlt-gcs
refs/heads/master
packages/IronPython.StdLib.2.7.4/content/Lib/lib2to3/fixes/fix_callable.py
59
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for callable(). This converts callable(obj) into isinstance(obj, collections.Callable), adding a collections import if needed.""" # Local imports from lib2to3 import fixer_base from lib2to3.fixer_ut...
yuewu001/sol
refs/heads/master
exp/demo_util.py
2
#!/usr/bin/env python # AUTHOR: Yue Wu ([email protected]) # FILE: demo_util.py # ROLE: shared parts for demo # CREATED: 2015-02-08 16:09:41 # MODIFIED: 2015-02-08 22:24:12 import os import sys import dataset import util import run_ofs import run_sol import run_liblinear import run_fgm import run_mRMR imp...
intermezzo-fr/onedrive-d
refs/heads/master
onedrive_d/api/resources.py
2
__author__ = 'xb' import json from onedrive_d import str_to_datetime from onedrive_d.api import options class UserProfile: VERSION_KEY = '@version' VERSION_VALUE = 1 def __init__(self, data): self._data = data @property def user_id(self): """ :rtype: str """ ...
silentfuzzle/calibre
refs/heads/master
src/calibre/db/tests/profiling.py
14
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' import os, cProfile from tempfile import gettempdir from calibre.db.legacy ...
thundernixon/dailydecode
refs/heads/master
node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/MSVSUtil.py
566
# Copyright (c) 2013 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. """Utility functions shared amongst the Windows generators.""" import copy import os _TARGET_TYPE_EXT = { 'executable': '.exe', 'loadable_module': '.dll', ...
laugh26/clapcoin
refs/heads/master
share/qt/make_spinner.py
4415
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
axinging/sky_engine
refs/heads/master
mojo/tools/testing/mojom_fetcher/mojom_file_tests.py
10
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os.path import unittest from fetcher.mojom_file import MojomFile from fetcher.dependency import Dependency from fetcher.repository import Repository ...
camptocamp/c2c-rd-addons
refs/heads/8.0
picking_invoice_rel/purchase.py
4
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2011 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.com>). # # This p...
thumbimigwe/echorizr
refs/heads/master
lib/python2.7/site-packages/django/template/defaulttags.py
31
"""Default tags used by the template system, available to all templates.""" from __future__ import unicode_literals import os import re import sys import warnings from datetime import datetime from itertools import cycle as itertools_cycle, groupby from django.conf import settings from django.utils import six, timezo...
swarna-k/MyDiary
refs/heads/master
flask/lib/python2.7/site-packages/pytz/lazy.py
514
from threading import RLock try: from UserDict import DictMixin except ImportError: from collections import Mapping as DictMixin # With lazy loading, we might end up with multiple threads triggering # it at the same time. We need a lock. _fill_lock = RLock() class LazyDict(DictMixin): """Dictionary popu...
mick-d/nipype_source
refs/heads/master
nipype/interfaces/afni/tests/test_auto_Merge.py
5
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from nipype.testing import assert_equal from nipype.interfaces.afni.preprocess import Merge def test_Merge_inputs(): input_map = dict(args=dict(argstr='%s', ), blurfwhm=dict(argstr='-1blur_fwhm %d', units='mm', ), doall=dict(argstr='-doall',...
demarle/VTK
refs/heads/master
IO/EnSight/Testing/Python/EnSight6ElementsBin.py
17
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # create a rendering window and renderer ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) renWin.StereoCapableWindowOn() iren = vtk.vtkRenderWindowInte...
TimothyVandenbrande/ansible-modules-extras
refs/heads/devel
packaging/os/zypper.py
6
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2013, Patrick Callahan <[email protected]> # based on # openbsd_pkg # (c) 2013 # Patrik Lundin <[email protected]> # # yum # (c) 2012, Red Hat, Inc # Written by Seth Vidal <skvidal at fedoraproject.org> # # This...
GREO/GNU-Radio
refs/heads/master
grc/grc_gnuradio/wxgui/panel.py
33
# Copyright 2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # # G...
mlaitinen/odoo
refs/heads/8.0
openerp/cli/deploy.py
369
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import os import requests import sys import tempfile import zipfile from . import Command class Deploy(Command): """Deploy a module on an Odoo instance""" def __init__(self): super(Deploy, self).__init__() self.session = requests.se...
99cloud/keystone_register
refs/heads/master
horizon/models.py
172
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
mlaitinen/odoo
refs/heads/8.0
addons/payment_transfer/controllers/main.py
395
# -*- coding: utf-8 -*- import logging import pprint import werkzeug from openerp import http, SUPERUSER_ID from openerp.http import request _logger = logging.getLogger(__name__) class OgoneController(http.Controller): _accept_url = '/payment/transfer/feedback' @http.route([ '/payment/transfer/feed...
jur/linux
refs/heads/master
scripts/tracing/draw_functrace.py
14679
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <[email protected]> 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 ...
anitahitouch/mediadrop
refs/heads/master
mediacore/templates/admin/players/__init__.py
14
from mediadrop.templates.admin.players import *
MobinRanjbar/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/utils_tests/test_checksums.py
246
import unittest from django.utils import checksums class TestUtilsChecksums(unittest.TestCase): def check_output(self, function, value, output=None): """ Check that function(value) equals output. If output is None, check that function(value) equals value. """ if output is...
popazerty/enigma2-4.3
refs/heads/master
lib/python/Screens/PluginBrowser.py
4
from Screen import Screen from Components.Language import language from enigma import eConsoleAppContainer, eDVBDB from boxbranding import getImageVersion from Components.ActionMap import ActionMap from Components.PluginComponent import plugins from Components.PluginList import * from Components.Label import Label fro...
gurneyalex/odoo
refs/heads/13.0-improve_sale_coupon_perf
addons/hr_holidays/tests/common.py
7
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail.tests.common import mail_new_test_user from odoo.tests import common class TestHrHolidaysBase(common.TransactionCase): def setUp(self): super(TestHrHolidaysBase, self).setUp() ...
Russell-IO/ansible
refs/heads/devel
lib/ansible/modules/storage/purestorage/purefa_volume.py
21
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Simon Dodsley ([email protected]) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1',...
leimaohui/dnf-yocto
refs/heads/dnf-yocto2.3
doc/examples/install_plugin.py
5
# Copyright (C) 2015 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be u...
boris-savic/swampdragon
refs/heads/master
tests/test_selfpub_model.py
13
from swampdragon.route_handler import ModelRouter from swampdragon.pubsub_providers.base_provider import PUBACTIONS from swampdragon.testing.dragon_testcase import DragonTestCase from .models import FooSelfPub, BarSelfPub from .serializers import FooSelfPubSerializer, BarSelfPubSerializer from datetime import datetime ...
ianstalk/Flexget
refs/heads/develop
flexget/tests/test_pathscrub.py
3
import pytest from flexget.utils.pathscrub import pathscrub class TestPathscrub: def test_windows_filenames(self): # Windows filename tests # 'None' indicates there should be no changes after path scrub win_fn = { 'afilename': 'afilename', 'filename/with/slash': 'f...
w495/scrapy
refs/heads/master
scrapy/contrib/spidermiddleware/referer.py
144
import warnings from scrapy.exceptions import ScrapyDeprecationWarning warnings.warn("Module `scrapy.contrib.spidermiddleware.referer` is deprecated, " "use `scrapy.spidermiddlewares.referer` instead", ScrapyDeprecationWarning, stacklevel=2) from scrapy.spidermiddlewares.referer import *
mozilla/splice
refs/heads/master
tests/api/test_tile.py
3
from nose.tools import assert_equal from flask import url_for, json from tests.base import BaseTestCase from tests.populate_database import parse_csv from collections import defaultdict class TestTile(BaseTestCase): def setUp(self): self.tile_fixture = defaultdict(list) self.new_adgroup_id = 1 ...
mbalasso/mynumpy
refs/heads/master
numpy/fft/setupscons.py
100
def configuration(parent_package = '', top_path = None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('fft', parent_package, top_path) config.add_data_dir('tests') config.add_sconscript('SConstruct', source_files = ['fftpa...
cydhaselton/coreclr
refs/heads/master
src/ToolBox/SOS/tests/t_cmd_histroot.py
43
import lldb import re import testutils as test def runScenario(assembly, debugger, target): process = target.GetProcess() res = lldb.SBCommandReturnObject() ci = debugger.GetCommandInterpreter() # Run debugger, wait until libcoreclr is loaded, # set breakpoint at Test.Main and stop there test...
MakingMexico/Eaco
refs/heads/master
Eacos/settings.py
1
""" Django settings for Eacos project. Generated by 'django-admin startproject' using Django 1.8.5. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths ...
nharraud/b2share
refs/heads/master
invenio/modules/workflows/signals.py
16
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 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, or (at your option) any later...
xorpaul/shinken
refs/heads/master
windows/Tools/Charp_Services/Shinken_Services/install.d/tools/skonf.py
6
#!/usr/bin/env python # # Copyright (C) 2009-2012: # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # David GUENAULT, [email protected] # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Af...