repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
AyoubZahid/odoo
refs/heads/9.0
addons/website_sale_stock/controllers/__init__.py
7372
import main
liangazhou/django-rdp
refs/heads/master
packages/Django-1.8.6/build/lib/django/conf/locale/kn/formats.py
619
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'h:i A' # DA...
bgris/ODL_bgris
refs/heads/master
lib/python3.5/site-packages/skimage/measure/__init__.py
8
from ._find_contours import find_contours from ._marching_cubes import (marching_cubes, mesh_surface_area, correct_mesh_orientation) from ._regionprops import regionprops, perimeter from .simple_metrics import compare_mse, compare_nrmse, compare_psnr from ._structural_similarity import com...
cogeorg/BlackRhino
refs/heads/master
examples/firesales_simple/networkx/generators/geometric.py
30
# -*- coding: utf-8 -*- """ Generators for geometric graphs. """ # Copyright (C) 2004-2011 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. from __future__ import print_function __author__ = "\n".join(['Ari...
sx-ruan/BEESEM
refs/heads/master
toolbox/basic.py
2
# coding: utf-8 import itertools as itt import numpy as np def Col(array): """ :param array: array_like :return: ndarray >>> Col([0, 1]) array([[0], [1]]) """ return np.reshape(array, (-1, 1)) def Flip(dictionary): """ :param dictionary: dict :return: dict >>> ...
saurabh6790/omnitech-app
refs/heads/master
patches/october_2013/p07_rename_for_territory.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes, os def execute(): from webnotes.utils import get_base_path import shutil webnotes.reload_doc("core", "doctype", "doctype") tab...
rosmo/ansible
refs/heads/devel
contrib/inventory/cobbler.py
32
#!/usr/bin/env python """ Cobbler external inventory script ================================= Ansible has a feature where instead of reading from /etc/ansible/hosts as a text file, it can query external programs to obtain the list of hosts, groups the hosts are in, and even variables to assign to each host. To use t...
rahulgayatri23/moose-core
refs/heads/master
python/moose/optimizer_interface.py
4
# optimizer_interface.py --- # # Filename: optimizer_interface.py # Description: Provides an interface between Optimizer and MOOSE # Author: Viktor Toth # Maintainer: # Copyright (C) 2014 Viktor Toth, all rights reserved. # Created: 7 Aug 14:45:30 2014 (+0530) # Version: 1.0 # Last-Updated: # URL: # Keywords: # C...
endlessm/chromium-browser
refs/heads/master
third_party/webgl/src/sdk/tests/deqp/functional/gles3/primitiverestart/primitiverestart_test_generator.py
6
#!/usr/bin/env python # Copyright (c) 2019 The Khronos Group Inc. # Use of this source code is governed by an MIT-style license that can be # found in the LICENSE.txt file. """ Generator for primitiverestart* tests. This file needs to be run in its folder. """ import sys _DO_NOT_EDIT_WARNING = """<!-- This fil...
anasazi/POP-REU-Project
refs/heads/master
pkgs/tools/yasm/src/tools/python-yasm/tests/test_bytecode.py
5
# $Id: test_bytecode.py 1740 2007-01-21 22:01:34Z peter $ from tests import TestCase, add from yasm import Bytecode, Expression
eduNEXT/edunext-platform
refs/heads/master
openedx/core/djangoapps/dark_lang/admin.py
9
""" Admin site bindings for dark_lang """ from config_models.admin import ConfigurationModelAdmin from django.contrib import admin from openedx.core.djangoapps.dark_lang.models import DarkLangConfig admin.site.register(DarkLangConfig, ConfigurationModelAdmin)
lucychambers/lucychambers.github.io
refs/heads/master
.bundle/ruby/2.0.0/gems/pygments.rb-0.6.0/vendor/pygments-main/ez_setup.py
165
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
harmy/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_grp.py
3
"""Test script for the grp module.""" import unittest from test import support grp = support.import_module('grp') class GroupDatabaseTestCase(unittest.TestCase): def check_value(self, value): # check that a grp tuple has the entries and # attributes promised by the docs self....
cpitclaudel/elpy
refs/heads/master
elpy/tests/test_server.py
3
# coding: utf-8 """Tests for the elpy.server module""" import os import tempfile import unittest import mock from elpy import rpc from elpy import server from elpy.tests import compat from elpy.tests.support import BackendTestCase import elpy.refactor class ServerTestCase(unittest.TestCase): def setUp(self): ...
ErykB2000/home-assistant
refs/heads/master
tests/test_component_history.py
4
""" tests.test_component_history ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the history component. """ # pylint: disable=protected-access,too-many-public-methods import time import os import unittest import homeassistant as ha import homeassistant.util.dt as dt_util from homeassistant.components import history, recorder fro...
pynocchio-comic-reader/pynocchio-comic-reader
refs/heads/develop
pynocchio/comic_page_handler_factory.py
5
from .comic_page_handler import (ComicPageHandlerDoublePage, ComicPageHandlerSinglePage) class ComicPageHandlerFactory(): read_mode = { False: ComicPageHandlerSinglePage, True: ComicPageHandlerDoublePage, } @staticmethod def create_handler(page_read_mo...
funbaker/astropy
refs/heads/master
astropy/nddata/tests/test_ccddata.py
2
# Licensed under a 3-clause BSD style license - see LICENSE.rst # This module implements the base CCDData class. import textwrap import numpy as np import pytest from ...io import fits from ..nduncertainty import StdDevUncertainty, MissingDataAssociationException from ... import units as u from ... import log from ....
MrChoclate/tripping_sansa
refs/heads/master
api/__init__.py
12133432
ThiagoGarciaAlves/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/conf/locale/en_GB/__init__.py
12133432
samliu/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/__init__.py
12133432
shaistaansari/django
refs/heads/master
tests/known_related_objects/__init__.py
12133432
toke/django-tastypie
refs/heads/master
tests/slashless/api/__init__.py
12133432
protonn/Electrum-Cash
refs/heads/master
lib/interface.py
1
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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 witho...
mrroach/CentralServer
refs/heads/master
csrv/model/actions/make_a_run_action.py
1
"""Base actions for the players to take.""" from csrv.model.actions import action from csrv.model import cost from csrv.model import errors from csrv.model import events from csrv.model import game_object from csrv.model import parameters class MakeARunAction(action.Action): DESCRIPTION = 'Make a run.' COST_CLA...
deepaklukose/grpc
refs/heads/master
src/python/grpcio_tests/tests/unit/beta/_implementations_test.py
29
# Copyright 2016 gRPC authors. # # 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...
sburnett/seattle
refs/heads/master
seattlegeni/lockserver/tests/unit/single_lock_contention.py
4
import unittest import lockserver_daemon as lockserver class TheTestCase(unittest.TestCase): def setUp(self): # Reset the lockserver's global variables between each test. lockserver.init_globals() def testContentionForSingleUserLock(self): # This entire test will use this same lockdict in each req...
Hellowlol/PyTunes
refs/heads/master
libs/cherrypy/lib/auth_basic.py
88
# This file is part of CherryPy <http://www.cherrypy.org/> # -*- coding: utf-8 -*- # vim:ts=4:sw=4:expandtab:fileencoding=utf-8 __doc__ = """This module provides a CherryPy 3.x tool which implements the server-side of HTTP Basic Access Authentication, as described in :rfc:`2617`. Example usage, using the built-in che...
bzennn/blog_flask
refs/heads/master
python/lib/python3.5/site-packages/wheel/test/test_tagopt.py
326
""" Tests for the bdist_wheel tag options (--python-tag, --universal, and --plat-name) """ import sys import shutil import pytest import py.path import tempfile import subprocess SETUP_PY = """\ from setuptools import setup, Extension setup( name="Test", version="1.0", author_email="author@example.com", ...
Shaswat27/scipy
refs/heads/master
scipy/weave/examples/wx_example.py
100
""" This is taken from the scrolled window example from the demo. Take a look at the DoDrawing2() method below. The first 6 lines or so have been translated into C++. """ from __future__ import absolute_import, print_function import sys sys.path.insert(0,'..') import inline_tools from wxPython.wx import * ...
UniversalMasterEgg8679/ansible
refs/heads/devel
lib/ansible/module_utils/exoscale.py
88
# -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.net> # # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the aut...
pliniopereira/ccd10
refs/heads/master
src/ui/mainWindow/tempMonitor.py
1
from PyQt5 import QtWidgets from src.business.schedulers.SchedTemperature import SchedTemperature from src.ui.commons.layout import set_hbox class TempMonitor(QtWidgets.QWidget): def __init__(self, parent=None): super(TempMonitor, self).__init__(parent) self.tempMonitor = QtWidgets.QLabel(self) ...
Hiregui92/openacademy-project
refs/heads/master
openacademy/__init__.py
30
from . import model from . import wizard
tactcomplabs/gc64-hmcsim
refs/heads/master
test/sst/7.2.0/goblin_singlestream2-trace.py
2
import sst # Define SST core options sst.setProgramOption("timebase", "1ps") sst.setProgramOption("stopAtCycle", "0 ns") # Define the simulation components comp_cpu = sst.Component("cpu", "miranda.BaseCPU") comp_cpu.addParams({ "verbose" : 0, "generator" : "miranda.SingleStreamGenerator", "generatorParams.verbose"...
ilexius/odoo
refs/heads/master
addons/auth_signup/__init__.py
43
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import controllers import res_config import res_users
antmat/cocaine-tools
refs/heads/master
cocaine/proxy/utilserver.py
2
import logging from tornado import web class PingHandler(web.RequestHandler): # pylint: disable=W0223 def get(self): self.write("OK") class LogLevel(web.RequestHandler): # pylint: disable=W0223 def get(self): lvl = self.application.logger.getEffectiveLevel() self.write(logging.get...
panoptes/POCS
refs/heads/develop
tests/test_pocs.py
1
import os import threading import time import pytest import requests from astropy import units as u from panoptes.pocs import hardware from panoptes.pocs.core import POCS from panoptes.pocs.observatory import Observatory from panoptes.utils.config.client import set_config from panoptes.utils.serializers import to_json...
crawfordsm/pysalt
refs/heads/placeholder
proptools/optimizetab.py
2
# -*- coding: utf-8 -*- import os, sys import numpy as np from PyQt4 import QtCore, QtGui from slitlets import Slitlets import pyslit_optimize as opt class OptimizeTab: def __init__(self, ui, default_yspacing=1., default_iter=10): print 'loading OPT' self.ui = ui self.slitlets=Slitlets() ...
chiragjogi/odoo
refs/heads/8.0
addons/project/report/project_report.py
279
# -*- 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...
toontownfunserver/Panda3D-1.9.0
refs/heads/master
direct/task/__init__.py
12133432
swirlingsand/self-driving-car-nanodegree-nd013
refs/heads/master
p4-CarND-Advanced-Lane-Lines/__init__.py
12133432
shanemcd/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/spam5/__init__.py
12133432
philanthropy-u/edx-platform
refs/heads/master
openedx/core/djangoapps/user_api/course_tag/__init__.py
12133432
rubencabrera/micropython
refs/heads/master
tests/cmdline/repl_basic.py
52
# basic REPL tests print(1) 
aptana/Pydev
refs/heads/development
bundles/org.python.pydev.jython/Lib/email/Errors.py
11
# Copyright (C) 2001,2002 Python Software Foundation # Author: barry@zope.com (Barry Warsaw) """email package exception classes. """ class MessageError(Exception): """Base class for errors in the email package.""" class MessageParseError(MessageError): """Base class for message parsing errors.""" class...
alexkolar/home-assistant
refs/heads/dev
homeassistant/components/switch/wink.py
10
""" homeassistant.components.switch.wink ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support for Wink switches. """ import logging from homeassistant.components.wink import WinkToggleDevice from homeassistant.const import CONF_ACCESS_TOKEN REQUIREMENTS = ['https://github.com/balloob/python-wink/archive/' 'c...
mspark93/VTK
refs/heads/master
ThirdParty/Twisted/twisted/internet/test/test_posixbase.py
33
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet.posixbase} and supporting code. """ from __future__ import division, absolute_import from twisted.python.compat import _PY3 from twisted.trial.unittest import TestCase from twisted.internet.defer import Deferred ...
ChronoMonochrome/android_external_chromium_org
refs/heads/cm-11.0
tools/telemetry/telemetry/page/page_set_unittest.py
25
# 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. import os import tempfile import unittest from telemetry.page import page_set simple_archive_info = """ { "archives": { "data_01.wpr": ["http://www....
maestrano/openerp
refs/heads/mno-master
openerp/addons/event_moodle/__init__.py
54
# -*- 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...
thinkopensolutions/geraldo
refs/heads/master
site/newsite/django_1_0/django/core/management/commands/shell.py
76
import os from django.core.management.base import NoArgsCommand from optparse import make_option class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--plain', action='store_true', dest='plain', help='Tells Django to use plain Python, not IPython.'), ) ...
ojengwa/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/mail/pop3client.py
28
# -*- test-case-name: twisted.mail.test.test_pop3client -*- # Copyright (c) 2001-2004 Divmod Inc. # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ POP3 client protocol implementation Don't use this module directly. Use twisted.mail.pop3 instead. @author: Jp Calderone """ import re from ...
ndingwall/scikit-learn
refs/heads/master
examples/semi_supervised/plot_label_propagation_digits.py
22
""" =================================================== Label Propagation digits: Demonstrating performance =================================================== This example demonstrates the power of semisupervised learning by training a Label Spreading model to classify handwritten digits with sets of very few labels....
epinaa/weevely3
refs/heads/master
modules/audit/disablefunctionbypass.py
1
from core.vectors import PhpCode, ShellCmd, ModuleExec, Os from core.module import Module, Status from core.loggers import log from core import modules from core import messages from utils import strings from utils import http import string import os class Disablefunctionbypass(Module): """ Bypassing system-like ...
rbian/virt-test
refs/heads/master
virttest/iscsi.py
1
""" Basic iscsi support for Linux host with the help of commands iscsiadm and tgtadm. This include the basic operates such as login and get device name by target name. And it can support the real iscsi access and emulated iscsi in localhost then access it. """ import re import os import logging from autotest.client ...
WillisXChen/django-oscar
refs/heads/master
oscar/lib/python2.7/site-packages/IPython/nbconvert/writers/files.py
7
""" Contains writer for writing nbconvert output to filesystem. """ #----------------------------------------------------------------------------- #Copyright (c) 2013, the IPython Development Team. # #Distributed under the terms of the Modified BSD License. # #The full license is in the file COPYING.txt, distributed wi...
ajaali/django
refs/heads/master
django/conf/locale/fi/__init__.py
12133432
devassistant/devassistant
refs/heads/master
test/integration/__init__.py
12133432
homeworkprod/byceps
refs/heads/master
tests/util/iterables/__init__.py
12133432
fernandog/Medusa
refs/heads/optimized
ext/future/backports/email/mime/__init__.py
12133432
ThunderShiviah/code_guild
refs/heads/master
wk2/extras/linked_lists/add_reverse/__init__.py
12133432
thehyve/variant
refs/heads/master
eggs/django-1.3.1-py2.7.egg/django/db/models/base.py
55
import types import sys from itertools import izip import django.db.models.manager # Imported to register signal handler. from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned, FieldError, ValidationError, NON_FIELD_ERRORS from django.core import validators from django.db.models.fields imp...
pwoodworth/intellij-community
refs/heads/master
python/testData/copyPaste/SelectionOneLine3.dst.py
83
class MyClass(object): member1 = 1 <selection> member2 = 2<caret></selection> member3 = 3
jwilk/mwic
refs/heads/master
lib/__init__.py
1
''' mwic's private modules ''' type(lambda: (yield from [])) # Python >= 3.3 is required
caisq/tensorflow
refs/heads/master
tensorflow/contrib/tfprof/__init__.py
79
# 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...
yask123/django
refs/heads/master
django/conf/locale/kn/formats.py
619
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'h:i A' # DA...
lycantropos/VKApp
refs/heads/master
vk_app/__init__.py
2
from .app import App
yasoob/youtube-dl-GUI
refs/heads/master
youtube_dl/extractor/qqmusic.py
38
# coding: utf-8 from __future__ import unicode_literals import random import re import time from .common import InfoExtractor from ..utils import ( clean_html, ExtractorError, strip_jsonp, unescapeHTML, ) class QQMusicIE(InfoExtractor): IE_NAME = 'qqmusic' IE_DESC = 'QQ音乐' _VALID_URL = r...
pombredanne/grumpy
refs/heads/master
grumpy-runtime-src/third_party/pypy/datetime.py
6
"""Concrete date/time and related types -- prototype implemented in Python. See http://www.zope.org/Members/fdrake/DateTimeWiki/FrontPage See also http://dir.yahoo.com/Reference/calendars/ For a primer on DST, including many current DST rules, see http://webexhibits.org/daylightsaving/ For more about DST than you e...
bestvibes/neo4j-social-network
refs/heads/master
env/lib/python2.7/site-packages/py2neo/packages/jsonstream/pyjsonstream.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2012-2014 Nigel Small # # 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 ...
fkolacek/FIT-VUT
refs/heads/master
bp-revok/python/lib/python2.7/bsddb/test/test_compat.py
5
""" Test cases adapted from the test_bsddb.py module in Python's regression test suite. """ import os, string import unittest from test_all import db, hashopen, btopen, rnopen, verbose, \ get_new_database_path class CompatibilityTestCase(unittest.TestCase): def setUp(self): self.filename = get_n...
factorlibre/l10n-spain
refs/heads/8.0
payment_redsys/__openerp__.py
10
# -*- coding: utf-8 -*- { 'name': 'Redsys Payment Acquirer', 'category': 'Hidden', 'summary': 'Payment Acquirer: Redsys Implementation', 'version': '8.0.1.0.2', 'author': "Incaser Informatica S.L.,Odoo Community Association (OCA)", 'depends': ['payment'], "external_dependencies": { ...
marquirj/ProyectoSkull
refs/heads/master
bot/contenedores.py
1
#! /usr/bin/env python # -*- coding: utf-8 -*- equiposPuntos = [("Chiclana C.F", 25), ("Trebujena C.F", 25), ("Jerez Industrial C.F.", 21), ("Bazan", 20), ("Balon de Cadiz", 20), ("U.D. Villamartin", 17), ("C.D. Vejer", 15), ("Portuense C.F.", 14), ("SanFer Isleño", 14), ("Roteña", 12), ("U.D. Tesorillo", 12), ("Juven...
jalexvig/tensorflow
refs/heads/master
tensorflow/contrib/framework/python/ops/sort_ops.py
27
# 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...
drcsturm/project-euler
refs/heads/master
p033.py
1
# The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that 49/98 = 4/8, which is correct, is obtained by cancelling the 9s. # We shall consider fractions like, 30/50 = 3/5, to be trivial examples. # There are exactly four non-trivial exampl...
sankroh/satchmo
refs/heads/master
satchmo/shipping/modules/ups/__init__.py
2
import shipper from satchmo.configuration import config_choice_values def get_methods(): return [shipper.Shipper(service_type=value) for value in config_choice_values('satchmo.shipping.modules.ups', 'UPS_SHIPPING_CHOICES')]
Aintno63/NCAA-playoff
refs/heads/master
scraper_Ncaa_settings.py
1
#!/usr/bin/python ############################################################## # Program name: NCAA FOOTBALL Stats Scraper (Settings file) # Version: 1.0 # By: Sean Middleton # License: MPL 2.0 (see LICENSE file in root folder) # Additional thanks: # Refer to http://stats.ncaa.org/team/inst_team_list?sport_code=MBB&...
kg-bot/SupyBot
refs/heads/master
plugins/StdoutCapture/plugin.py
1
### # Copyright (c) 2013, Valentin Lorentz # 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, a...
partofthething/home-assistant
refs/heads/dev
homeassistant/components/flunearyou/const.py
9
"""Define flunearyou constants.""" import logging DOMAIN = "flunearyou" LOGGER = logging.getLogger(__package__) DATA_COORDINATOR = "coordinator" CATEGORY_CDC_REPORT = "cdc_report" CATEGORY_USER_REPORT = "user_report"
shawnsi/ansible-modules-core
refs/heads/devel
network/nxos/nxos_template.py
26
#!/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...
be-cloud-be/horizon-addons
refs/heads/9.0
partner-contact/partner_contact_nutrition_exclusion/models/res_partner.py
1
# -*- coding: utf-8 -*- # Copyright 2016 Ursa Information Systems <http://ursainfosystems.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import fields, models class ResPartner(models.Model): _inherit = 'res.partner' nutrition_exclusion_ids = fields.Many2many(comodel_name=...
mensler/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/spam4/__init__.py
12133432
ManiacalLabs/BiblioPixel
refs/heads/master
test/bibliopixel/util/image/__init__.py
12133432
meletakis/collato
refs/heads/master
lib/python2.7/site-packages/django/conf/locale/en_GB/__init__.py
12133432
jit/pyew
refs/heads/master
gcluster.py
14
#!/usr/bin/env python """ A program's clusterization tool based on Pyew Copyright (C) 2010, Joxean Koret 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...
hoosteeno/kuma
refs/heads/master
kuma/core/tests/test_pagination.py
26
from django.test import RequestFactory from nose.tools import eq_ import pyquery from ..urlresolvers import reverse from ..utils import paginate from ..helpers import paginator def test_paginated_url(): """Avoid duplicating page param in pagination.""" url = '%s?%s' % (reverse('search'), 'q=bookmarks&page=2'...
mmnelemane/neutron
refs/heads/master
neutron/plugins/cisco/service_plugins/cisco_router_plugin.py
30
# Copyright 2015 Cisco Systems, 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 requir...
maas/maas
refs/heads/master
src/maasserver/djangosettings/snap.py
1
# Copyright 2017 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Django snap settings for maas project.""" import os from maasserver.djangosettings import import_settings, settings # Extend base and development settings. import_settings(se...
saga-project/bliss
refs/heads/master
bliss/plugins/ssh/job.py
1
# -*- coding: utf-8 -*- # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 __author__ = "Ashley Zebrowski" __copyright__ = "Copyright 2012, Ashley Zebrowski" __license__ = "MIT" import bliss.saga from bliss.interface import JobPluginInterface from bliss.plugins.ssh.process import SSHJobProcess class SSHJobP...
antonve/s4-project-mooc
refs/heads/master
common/djangoapps/track/tests/__init__.py
150
"""Helpers for tests related to emitting events to the tracking logs.""" from datetime import datetime from django.test import TestCase from django.test.utils import override_settings from freezegun import freeze_time from pytz import UTC from eventtracking import tracker from eventtracking.django import DjangoTrack...
globau/servo
refs/heads/master
tests/wpt/web-platform-tests/subresource-integrity/tools/list_hashes.py
191
from os import path, listdir from hashlib import sha512, sha384, sha256, md5 from base64 import b64encode import re DIR = path.normpath(path.join(__file__, "..", "..")) ''' Yield each javascript and css file in the directory ''' def js_and_css_files(): for f in listdir(DIR): if path.isfile(f) and (f.endswith("....
ivan-fedorov/intellij-community
refs/heads/master
python/lib/Lib/encodings/johab.py
816
# # johab.py: Python Unicode Codec for JOHAB # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_kr, codecs import _multibytecodec as mbc codec = _codecs_kr.getcodec('johab') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrement...
sumanthha/fundafriend
refs/heads/master
django/conf/locale/sl/__init__.py
12133432
mdn/webalyzer
refs/heads/master
webalyzer/collected/migrations/__init__.py
12133432
lig/picket2014
refs/heads/master
users/management/commands/__init__.py
12133432
ahmetdaglarbas/e-commerce
refs/heads/tez
tests/functional/customer/auth_tests.py
53
import re from django.core import mail from django.core.urlresolvers import reverse from django_webtest import WebTest from oscar.test.testcases import WebTestCase from oscar.test import factories from oscar.core.compat import get_user_model User = get_user_model() class TestAUserWhoseForgottenHerPassword(WebTest...
archen/django
refs/heads/master
tests/admin_changelist/admin.py
57
from django.contrib import admin from django.core.paginator import Paginator from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from .models import Event, Child, Parent, Swallow site = admin.AdminSite(name="admin") site.register(User, UserAdmin) class CustomPaginator(Pagin...
terbolous/CouchPotatoServer
refs/heads/master
libs/requests/adapters.py
293
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import socket from .models import Response from .packages.urllib3.poolmanager import PoolManager, proxy_from_url from .packages.urllib3.response impo...
Actifio/docker-oracle-vclones
refs/heads/master
docker-bootstrap.py
1
# Copyright 2018 <Kosala Atapattu kosala.atapattu@actifio.com> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, ...
leopittelli/Django-on-App-Engine-Example
refs/heads/master
django/utils/itercompat.py
113
""" Providing iterator functions that are not in all version of Python we support. Where possible, we try to use the system-native version and only fall back to these implementations if necessary. """ import collections import itertools import sys import warnings def is_iterable(x): "A implementation independent...
VladKha/CodeWars
refs/heads/master
8 kyu/Man in the west/solve.py
1
def check_the_bucket(bucket): return 'gold' in bucket
pdufour/sqlalchemy
refs/heads/master
test/orm/test_events.py
9
from sqlalchemy.testing import assert_raises_message, assert_raises import sqlalchemy as sa from sqlalchemy import testing from sqlalchemy import Integer, String from sqlalchemy.testing.schema import Table, Column from sqlalchemy.orm import mapper, relationship, \ create_session, class_mapper, \ Mapper, column_...