repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
frdb194/django
refs/heads/master
django/conf/locale/eo/formats.py
504
# -*- 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 = r'j\-\a \d\e F Y' # '26-a ...
seoester/Git-Deployment-Handler
refs/heads/master
gitdh/modules/__init__.py
1
from gitdh.module import Module
jorik041/Weevely
refs/heads/master
testsuite/test_findperms.py
2
from baseclasses import FolderFileFSTestCase from test import conf import os, sys sys.path.append(os.path.abspath('..')) import modules from unittest import skipIf class FSFindCheck(FolderFileFSTestCase): def setUp(self): self.sorted_files = sorted(['./%s' % x for x in self.filenames]) self.sorted...
flan/staticdhcpd
refs/heads/2.0.x
staticDHCPd/staticdhcpdlib/web/headers.py
2
# -*- encoding: utf-8 -*- """ staticdhcpdlib.web.headers ========================== Provides implementations of the default <head/> elements. Legal ----- This file is part of staticDHCPd. staticDHCPd is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publish...
rnixx/kivy
refs/heads/master
kivy/uix/image.py
2
''' Image ===== The :class:`Image` widget is used to display an image:: Example in python:: wimg = Image(source='mylogo.png') Kv Example:: Image: source: 'mylogo.png' size: self.texture_size Asynchronous Loading -------------------- To load an image asynchronously (for example from an ex...
schristiaens/raft
refs/heads/master
core/web/TesterWebPage.py
11
# # Implements a standard web page that has user interaction # # Author: Gregory Fleischer (gfleischer@gmail.com) # # Copyright (c) 2011-2013 RAFT Team # # This file is part of RAFT. # # RAFT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by #...
plazmer/micro-meta
refs/heads/master
app.py
1
from bottle import * import plugin import utils import sqlite3 import model from pprint import pprint @get('/') def search_handler(): vars = {} vars['results']=[] query = request.query.getunicode('q') if query: print('query ', query) vars['q'] = query cnt = le...
etuna-SBF-kog/Stadsparken
refs/heads/master
env/lib/python2.7/site-packages/setuptools/command/upload.py
68
"""distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).""" from distutils.errors import * from distutils.core import Command from distutils.spawn import spawn from distutils import log try: from hashlib import md5 except ImportError: from md5 import md5 import os imp...
pwndbg/pwndbg
refs/heads/dev
tests/test_loads.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- import codecs import os import re import subprocess import pytest import tests def run_gdb_with_script(binary='', core='', pybefore=None, pyafter=None): """ Runs GDB with given commands launched before and after loading of gdbinit.py Returns GDB output. ...
fernandoacorreia/DjangoWAWSLogging
refs/heads/master
DjangoWAWSLogging/env/Lib/site-packages/django/contrib/auth/tests/forms.py
46
from __future__ import with_statement import os from django.contrib.auth.models import User from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm, PasswordChangeForm, SetPasswordForm, UserChangeForm, PasswordResetForm) from django.core import mail from django.forms.fields import Field, EmailFi...
veger/ansible
refs/heads/devel
lib/ansible/modules/network/aci/aci_config_rollback.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- # 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', 'status': ['preview'], ...
FreshXOpenSource/wallaby-base
refs/heads/master
wallaby/pf/peer/peer.py
1
# Copyright (c) by it's authors. # Some rights reserved. See LICENSE, AUTHORS. # Common imports from wallaby.pf.pillow import Pillow from twisted.internet import defer class Peer(object): from wallaby.pf.pillow import Pillow __metaclass__ = Pillow peers = [] def __init__(self, roomName): ...
CredoReference/edx-platform
refs/heads/integration-hawthorn-qa
common/lib/xmodule/xmodule/modulestore/tests/test_mongo_call_count.py
11
""" Tests to verify correct number of MongoDB calls during course import/export and traversal when using the Split modulestore. """ from tempfile import mkdtemp from shutil import rmtree from unittest import TestCase, skip import ddt from django.test import TestCase from xmodule.modulestore.xml_importer import import...
pwoodworth/intellij-community
refs/heads/master
python/testData/refactoring/extractmethod/YieldFrom33.before.py
83
def f(x, y): yield 'foo' return x, y def g(in1, in2): out1, out2 = <selection>yield from f(in1, in2)</selection> print(out1, out2)
MebiusHKU/flask-web
refs/heads/master
flask/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py
34
# sql/sqltypes.py # Copyright (C) 2005-2015 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 """SQL specific types. """ import datetime as dt import codecs from .type_api imp...
mstriemer/addons-server
refs/heads/master
src/olympia/addons/models.py
2
# -*- coding: utf-8 -*- import collections import itertools import json import os import posixpath import re import time from operator import attrgetter from datetime import datetime from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.core.files.storage import default_sto...
MER-GROUP/intellij-community
refs/heads/master
python/helpers/coveragepy/coverage/bytecode.py
209
"""Bytecode manipulation for coverage.py""" import opcode, types from coverage.backward import byte_to_int class ByteCode(object): """A single bytecode.""" def __init__(self): # The offset of this bytecode in the code object. self.offset = -1 # The opcode, defined in the `opcode` mod...
jeremiahyan/odoo
refs/heads/master
addons/l10n_eu_service/models/res_config_settings.py
1
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' l10n_eu_services_eu_country = fields.Boolean('Is European country?', compute='_compute_l10n...
Sing-Li/go-buildpack
refs/heads/master
builds/runtimes/python-2.7.6/lib/python2.7/test/test_al.py
151
#! /usr/bin/env python """Whimpy test script for the al module Roger E. Masse """ from test.test_support import verbose, import_module al = import_module('al', deprecated=True) alattrs = ['__doc__', '__name__', 'getdefault', 'getminmax', 'getname', 'getparams', 'newconfig', 'openport', 'queryparams', 'se...
edmorley/django
refs/heads/master
tests/messages_tests/base.py
20
from django.contrib.messages import constants, get_level, set_level, utils from django.contrib.messages.api import MessageFailure from django.contrib.messages.constants import DEFAULT_LEVELS from django.contrib.messages.storage import base, default_storage from django.contrib.messages.storage.base import Message from d...
PyIran/website
refs/heads/master
project/libs/wtf/fields/simple.py
1
from .. import widgets from .core import StringField, BooleanField __all__ = ( 'BooleanField', 'TextAreaField', 'PasswordField', 'FileField', 'HiddenField', 'SubmitField', 'TextField' ) class TextField(StringField): """ Legacy alias for StringField """ class TextAreaField(TextField): """...
multiplay/mysql-connector-python
refs/heads/master
lib/mysql/connector/fabric/balancing.py
39
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2013, 2014, 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...
DaniSagan/Game_13w33
refs/heads/master
script/filemanager.py
1
#! /usr/bin/python # -*- coding=utf-8 -*- import wx import sys def main(): app = wx.App() if sys.argv[1] == 'o': openFileDialog = wx.FileDialog(None, "Open file", "", "", "Image file (*.jpg, *.png;)|*.jpg;*.png", wx.FD_OPEN...
sonnyhu/scikit-learn
refs/heads/master
examples/ensemble/plot_gradient_boosting_oob.py
50
""" ====================================== Gradient Boosting Out-of-Bag estimates ====================================== Out-of-bag (OOB) estimates can be a useful heuristic to estimate the "optimal" number of boosting iterations. OOB estimates are almost identical to cross-validation estimates but they can be compute...
daviddupont69/CouchPotatoServer
refs/heads/develop
couchpotato/core/notifications/toasty/main.py
10
from couchpotato.core.helpers.encoding import toUnicode, tryUrlencode from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification import traceback log = CPLog(__name__) class Toasty(Notification): urls = { 'api': 'http://api.supertoasty.com/notify/%s?%s' } ...
quantifiedcode-bot/blitzdb
refs/heads/master
blitzdb/tests/test_update.py
5
from __future__ import absolute_import from .fixtures import * from blitzdb.tests.helpers.movie_data import Actor def test_update_by_list(mongodb_backend): actor = Actor({'name': 'Robert de Niro', 'age': 54}) mongodb_backend.save(actor) mongodb_backend.commit() assert len(mongodb_backend.filter(A...
mperignon/bmi-delta
refs/heads/master
bmi/base.py
4
#! /usr/bin/env python """Interface to the basic control functions of a model.""" class BmiBase(object): """Functions that control model execution. These BMI functions are critical to plug-and-play modeling because they give a calling component fine-grained control over the model execution. """ ...
GiovanniConserva/TestDeploy
refs/heads/master
venv/Lib/site-packages/django/test/utils.py
178
import logging import re import sys import time import warnings from contextlib import contextmanager from functools import wraps from unittest import skipIf, skipUnless from xml.dom.minidom import Node, parseString from django.apps import apps from django.conf import UserSettingsHolder, settings from django.core impo...
theboocock/NGaDNAP
refs/heads/master
tests/test_vcf_to_fasta.py
2
""" py.test module. Used for testing included vcf_to_fasta script. """ import pytest import ngadnap.pipeline class TestVCFToFasta: def test_create_directory(self, tmpdir): print(tmpdir) assert True
aallai/pyobfsproxy
refs/heads/master
obfsproxy/transports/obfs3_dh.py
1
import binascii import obfsproxy.common.rand as rand def int_to_bytes(lvalue, width): fmt = '%%.%dx' % (2*width) return binascii.unhexlify(fmt % (lvalue & ((1L<<8*width)-1))) class UniformDH: """ This is a class that implements a DH handshake that uses public keys that are indistinguishable from ...
GdZ/scriptfile
refs/heads/master
software/googleAppEngine/lib/django_0_96/django/core/xheaders.py
33
""" Pages in Django can are served up with custom HTTP headers containing useful information about those pages -- namely, the content type and object ID. This module contains utility functions for retrieving and doing interesting things with these special "X-Headers" (so called because the HTTP spec demands that custo...
xq262144/hue
refs/heads/master
desktop/core/ext-py/boto-2.46.1/tests/mturk/_init_environment.py
122
import os import functools live_connection = False mturk_host = 'mechanicalturk.sandbox.amazonaws.com' external_url = 'http://www.example.com/' SetHostMTurkConnection = None def config_environment(): global SetHostMTurkConnection try: local = os.path.join(os.path.dirname(__file__), ...
jamesfoley/cms
refs/heads/develop
cms/templatetags/permalinks.py
3
"""Permalink generation template tags.""" from django import template from django.utils.html import escape from cms import permalinks register = template.Library() @register.filter def permalink(model): """Returns a permalink for the given model.""" return permalinks.create(model) @register.simple_tag(...
h-mayorquin/camp_india_2016
refs/heads/master
tutorials/LTP-I/Demo1/For_abbott_repfig2.py
1
### Code written for STDP tutorial @ CAMP 2016 ### Adapted from Song et al 2000 (Competitive Hebbian Learning through spike-timing-dependent synaptic plasticity ### With independent Poisson inputs (relevant figures : Fig 2a,b,c) ### Author: Harsha Gurnani ### Date: June 15, 2016 #######################################...
timpalpant/calibre
refs/heads/master
setup/extensions.py
1
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import textwrap, os, shlex, subprocess, glob, shutil, re, sys from distutils import ...
leitao/mcrouter
refs/heads/master
mcrouter/test/test_shard_splits.py
13
# Copyright (c) 2015, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from __future__ import absolute_...
glenn124f/treeherder
refs/heads/master
treeherder/webapp/api/refdata.py
2
from django.contrib.auth.models import User from rest_framework import viewsets from rest_framework.response import Response from treeherder.model import models from treeherder.model.derived import JobsModel from treeherder.webapp.api import serializers as th_serializers from treeherder.webapp.api.permissions import (...
xianggong/m2c_unit_test
refs/heads/master
test/integer/rotate_uint4uint4/compile.py
1861
#!/usr/bin/python import os import subprocess import re def runCommand(command): p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) p.wait() return iter(p.stdout.readline, b'') def dumpRunCommand(command,...
luoguizhou/gooderp_addons
refs/heads/master
warehouse/models/inventory.py
1
# -*- coding: utf-8 -*- from odoo.osv import osv # from odoo.osv import fields from utils import create_name, safe_division import odoo.addons.decimal_precision as dp from odoo.exceptions import UserError from odoo import models from odoo import fields from odoo import api from odoo.tools import float_compare, float_i...
Robrowski/TrollUniversity
refs/heads/master
TrollUniversity/src/_RequiredAPIs/requests/packages/charade/big5freq.py
3132
######################## 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 Rights R...
alexanderteves/OpsBox
refs/heads/master
mail.py
1
from email.mime.text import MIMEText from smtplib import SMTP class Gmail(object): """Send an email with Google Mail Can easily be used with other providers by editing the server and port in send() Args: credentials (tuple): (username, password) """ def __init__(self, credentials): ...
MattsFleaMarket/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/msilib/sequence.py
175
AdminExecuteSequence = [ ('InstallInitialize', None, 1500), ('InstallFinalize', None, 6600), ('InstallFiles', None, 4000), ('InstallAdminPackage', None, 3900), ('FileCost', None, 900), ('CostInitialize', None, 800), ('CostFinalize', None, 1000), ('InstallValidate', None, 1400), ] AdminUISequence = [ ('FileCost', None,...
NL66278/odoo
refs/heads/8.0
addons/account_analytic_plans/wizard/__init__.py
445
# -*- 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...
tpo/ansible
refs/heads/devel
test/integration/targets/want_json_modules_posix/library/helloworld.py
35
#!/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 distributed...
puttarajubr/commcare-hq
refs/heads/master
custom/ewsghana/tests/handlers/handler.py
2
from django.test import TestCase from corehq.apps.commtrack.tests.util import bootstrap_domain, make_loc from custom.ewsghana.handler import handle from custom.ewsghana.utils import bootstrap_user TEST_DOMAIN = 'ews-handler-test' class HandlerTest(TestCase): def setUp(self): domain = bootstrap_domain(TE...
shibumi/yowsup
refs/heads/master
src/Yowsup/Media/downloader.py
22
from ..Common.Http.warequest import WARequest import tempfile, sys if sys.version_info >= (3, 0): from urllib.request import urlopen from urllib.parse import urlencode else: from urllib2 import urlopen from urllib import urlencode class MediaDownloader(WARequest): def __init__(self, successClbk = ...
edxnercel/edx-platform
refs/heads/master
common/djangoapps/third_party_auth/middleware.py
169
"""Middleware classes for third_party_auth.""" from social.apps.django_app.middleware import SocialAuthExceptionMiddleware from . import pipeline class ExceptionMiddleware(SocialAuthExceptionMiddleware): """Custom middleware that handles conditional redirection.""" def get_redirect_uri(self, request, excep...
ndawe/pyAMI
refs/heads/master
pyAMI/objects.py
1
from string import rjust from cStringIO import StringIO class DatasetInfo(object): def __init__(self, dataset): self.dataset = dataset self.info = {} self.extra = {} self.comments = {} self.properties = {} def __repr__(self): return self.__str__() def _...
Permafacture/data-oriented-pyglet
refs/heads/master
numpy_ecs/accessors.py
1
''' Accessors provide an object oriented interface for a specific entity instance (guid) by providing an object with attributes that access the array slices allocated to that guid under the hood This file is part of Numpy-ECS. Copyright (C) 2016 Elliot Hallmark (permafacture@gmail.com) Numpy-ECS is free software: yo...
nickleefly/youtube-dl
refs/heads/master
youtube_dl/extractor/golem.py
186
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urlparse, ) from ..utils import ( determine_ext, ) class GolemIE(InfoExtractor): _VALID_URL = r'^https?://video\.golem\.de/.+?/(?P<id>.+?)/' _TEST = { 'url': 'http://video.g...
microdee/IronHydra
refs/heads/master
src/IronHydra/Lib/_threading_local.py
241
"""Thread-local objects. (Note that this module provides a Python version of the threading.local class. Depending on the version of Python you're using, there may be a faster one available. You should always import the `local` class from `threading`.) Thread-local objects support the management of thread-local d...
fapeci/Filma
refs/heads/master
plugin.video.filma/lib/server/nahnojiresolver.py
1
# * GNU General Public License for more details. # * # * You should have received a copy of the GNU General Public License # * along with this program; see the file COPYING. If not, write to # * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. # * http://www.gnu.org/copyleft/gpl.html # * # */...
nesdis/djongo
refs/heads/master
tests/django_tests/tests/v21/tests/forms_tests/widget_tests/test_checkboxselectmultiple.py
58
import datetime from django import forms from django.forms import CheckboxSelectMultiple from django.test import override_settings from .base import WidgetTest class CheckboxSelectMultipleTest(WidgetTest): widget = CheckboxSelectMultiple def test_render_value(self): self.check_html(self.widget(choi...
eoogbe/api-client-staging
refs/heads/master
generated/python/googleapis-common-protos/google/logging/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
amitdhiman000/dais
refs/heads/master
error/views.py
1
from django.shortcuts import render from django.http import HttpResponse, JsonResponse, HttpResponseRedirect from django.template.context_processors import csrf from common import post_required, login_required, redirect_if_loggedin, __redirect # Create your views here. def index(request): data = {'title': 'Error', 'p...
TeamExodus/kernel_moto_shamu
refs/heads/EXODUS-6.0
tools/perf/scripts/python/futex-contention.py
11261
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/building/general/cloning_facility_general.py
2
import sys def setup(core, object): return
Zhaoyanzhang/-myflasky
refs/heads/master
venv/lib/python2.7/site-packages/sqlalchemy/engine/util.py
33
# engine/util.py # Copyright (C) 2005-2017 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 from .. import util def connection_memoize(key): """Decorator, memoize a functi...
DiegoCorrea/ouvidoMusical
refs/heads/master
apps/evaluators/MAP/analyzer/benchmark.py
1
import matplotlib.pyplot as plt import numpy as np import logging import os from collections import Counter from apps.CONSTANTS import ( SET_SIZE_LIST, INTERVAL, AT_LIST, GRAPH_SET_COLORS_LIST ) from apps.evaluators.MAP.algorithm.models import MAP logger = logging.getLogger(__name__) def bench_gLin...
Gamebasis/3DGamebasisServer
refs/heads/master
GameData/blender-2.71-windows64/2.71/python/lib/site-packages/numpy/testing/decorators.py
73
""" Decorators for labeling and modifying behavior of test objects. Decorators that merely return a modified version of the original function object are straightforward. Decorators that return a new function object need to use :: nose.tools.make_decorator(original_function)(decorator) in returning the decorator, i...
MER-GROUP/intellij-community
refs/heads/master
python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/protectedMember.py
80
class A: def __init__(self): self._x = 1 def _foo(self): print(self._x) a = A() a._foo() print(a._<caret>x)
Erotemic/hotspotter
refs/heads/jon
hscom/__common__.py
1
from __future__ import division, print_function import __builtin__ from os.path import exists, join import logging import logging.config import os import sys import multiprocessing __MODULE_LIST__ = [] __LOGGERS__ = {} __IN_MAIN_PROCESS__ = multiprocessing.current_process().name == 'MainProcess' def argv_flag(name,...
thresholdsoftware/asylum-v2.0
refs/heads/master
openerp/addons/base/module/__init__.py
462
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
elielsardanons/dstar_sniffer
refs/heads/master
dstar_sniffer/dstar_sniffer.py
1
#!/usr/bin/env python # # DSTAR Repeater Controller Sniffer # # Coded by Eliel Sardanons (LU1ALY) # import socket import sys import logging import logging.config from dstar_lib import DStar, last_heard_callback from aprs_lib import aprsis_dstar_callback from net_lib import parse_packet from util_lib.daemon import Da...
beni55/Empire
refs/heads/master
lib/modules/persistence/powerbreach/resolver.py
22
import os from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-ResolverBackdoor', 'Author': ['@sixdub'], 'Description': ('Starts the Resolver Backdoor.'), 'Background' : False, '...
ryfeus/lambda-packs
refs/heads/master
Tensorflow_Pandas_Numpy/source3.6/tensorflow/contrib/distributions/python/ops/bijectors/absolute_value_impl.py
12
# 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...
demon-ru/iml-crm
refs/heads/master
addons/account_payment/account_payment.py
89
# -*- 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...
redhat-openstack/sahara
refs/heads/master-patches
sahara/tests/tempest/scenario/data_processing/client_tests/test_cluster_templates.py
9
# Copyright (c) 2014 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
SungEun-Steve-Kim/test-mp
refs/heads/master
tests/micropython/viper_misc.py
7
import micropython # viper function taking and returning ints @micropython.viper def viper_int(x:int, y:int) -> int: return x + y + 3 print(viper_int(1, 2)) # viper function taking and returning objects @micropython.viper def viper_object(x:object, y:object) -> object: return x + y print(viper_object(1, 2)) ...
jproffitt/django-cms
refs/heads/develop
cms/utils/request_ip_resolvers.py
12
# -*- coding: utf-8 -*- import importlib from django.core.exceptions import ImproperlyConfigured from django.utils.translation import ugettext as _ from cms.utils.conf import get_cms_setting def get_request_ip_resolver(): """ This is the recommended method for obtaining the specified CMS_REQUEST_IP_RES...
Lilywei123/tempest
refs/heads/master
tempest/api/compute/keypairs/test_keypairs_negative.py
3
# Copyright 2012 OpenStack Foundation # Copyright 2013 IBM Corp # 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/LICE...
Flexget/Flexget
refs/heads/develop
flexget/tests/test_condition.py
3
class TestCondition: config = """ templates: global: disable: [seen] mock: - {title: 'test', year: 2000} - {title: 'brilliant', rating: 9.9} - {title: 'fresh', year: 2011} tasks: test_condition_reject: ...
boyuegame/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_grp.py
88
"""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.assertEqual(...
otherness-space/myProject002
refs/heads/master
my_project_002/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py
2768
######################## 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...
DrMeers/django
refs/heads/master
tests/comment_tests/tests/test_comment_form.py
13
import time from django.conf import settings from django.contrib.comments.forms import CommentForm from django.contrib.comments.models import Comment from django.test import override_settings from . import CommentTestCase from ..models import Article class CommentFormTests(CommentTestCase): def testInit(self): ...
ruibarreira/linuxtrail
refs/heads/master
usr/lib/python2.7/distutils/spawn.py
57
"""distutils.spawn Provides the 'spawn()' function, a front-end to various platform- specific functions for launching another program in a sub-process. Also provides the 'find_executable()' to search the path for a given executable name. """ __revision__ = "$Id$" import sys import os from distutils.errors import Di...
airbnb/airflow
refs/heads/master
tests/providers/jira/hooks/__init__.py
4185
# 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 u...
martindale/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/win/gyptest-midl-rules.py
125
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Handle default .idl build rules. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.TestGyp(formats=['msvs', ...
fldc/CouchPotatoServer
refs/heads/custom
libs/tornado/platform/caresresolver.py
193
from __future__ import absolute_import, division, print_function, with_statement import pycares import socket from tornado import gen from tornado.ioloop import IOLoop from tornado.netutil import Resolver, is_valid_ip class CaresResolver(Resolver): """Name resolver based on the c-ares library. This is a non...
kovetskiy/ultisnips
refs/heads/master
test/test_SnippetActions.py
4
from test.vim_test_case import VimTestCase as _VimTest from test.constant import * class SnippetActions_PreActionModifiesBuffer(_VimTest): files = { 'us/all.snippets': r""" pre_expand "snip.buffer[snip.line:snip.line] = ['\n']" snippet a "desc" "True" e abc endsnippet """} ...
balloob/home-assistant
refs/heads/dev
homeassistant/components/epsonworkforce/__init__.py
34
"""The epsonworkforce component."""
hikelee/launcher
refs/heads/master
launcher/templatetags/define.py
1
from django import template register=template.Library() @register.simple_tag def define(val=None): return val
chaen/DIRAC
refs/heads/integration
Core/DISET/private/GatewayService.py
4
""" The gateway service is used for forwarding service calls to the appropriate services. For this to be used, the following CS option is required:: DIRAC { Gateways { my.site.org = dips://thisIsAn.url.org:9159/Framework/Gateway } } At the same time, this s...
hoatle/odoo
refs/heads/8.0
addons/mrp/wizard/mrp_workcenter_load.py
381
# -*- 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...
Sorsly/subtle
refs/heads/master
google-cloud-sdk/platform/gsutil/third_party/boto/tests/unit/s3/test_key.py
100
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012 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 restricti...
ASethi77/StateOfTheMedia
refs/heads/master
src/preprocess_text/article_parsers/article_parser.py
2
import os class ArticleParser: def __init__(self, articles_directory): if (os.path.isdir(articles_directory)): self.articles_dir = articles_directory else: raise ValueError("Path to articles directory is invalid.") def yield_articles(self): raise NotImplementedError
frappe/erpnext
refs/heads/develop
erpnext/hr/doctype/leave_period/test_leave_period.py
2
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe, erpnext import unittest test_dependencies = ["Employee", "Leave Type", "Leave Policy"] class TestLeavePeriod(unittest.TestCase): pass def create_leav...
tph-thuering/vnetsource
refs/heads/master
datawarehouse/views/IngestionView.py
2
######################################################################################################################## # VECNet CI - Prototype # Date: 4/5/2013 # Institution: University of Notre Dame # Primary Authors: # Lawrence Selvy <Lawrence.Selvy.1@nd.edu> # Zachary Torstrick <Zachary.R.Torstrick.1@nd.edu> #...
ctrlaltdel/neutrinator
refs/heads/master
vendor/pbr/tests/__init__.py
74
# 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 the...
moijes12/oh-mainline
refs/heads/master
vendor/packages/south/south/tests/deps_b/migrations/0005_b.py
2088
from south.db import db from django.db import models class Migration: def forwards(self): pass def backwards(self): pass
google/xls
refs/heads/main
xls/ir/python/function_test.py
1
# Copyright 2020 The XLS 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 writ...
cancerregulome/gidget
refs/heads/master
commands/maf_processing/python/simplify_maf.py
1
import sys import tsv import csv import optparse NCBI_BUILD_LUT = { "36": "hg18", "37": "hg19", } TABLE_SCHEMA = [ "Chromosome", ["Start_Position", "Start_position"], ["End_Position", "End_position"], "Reference_Allele", "Tumor_Seq_Allele2", "LineNo", "Hugo_Symbol", "Entrez_Gen...
openstack/python-openstacksdk
refs/heads/master
examples/image/list.py
2
# 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 t...
spacialdb/parse_fdw
refs/heads/master
setup.py
1
from setuptools import setup setup( name='parse_fdw', version='0.1.0', author='Kashif Rasul', author_email='kashif.rasul@gmail.com', packages=['parse_fdw'], url='https://github.com/spacialdb/parse_fdw', install_requires=['multicorn', 'parse_rest'], dependency_links=['https://github.com/dgrtwo/ParsePy/t...
pyfa-org/Pyfa
refs/heads/master
gui/builtinStatsViews/outgoingViewMinimal.py
1
# =============================================================================== # Copyright (C) 2014 Alexandros Kosiaris # # This file is part of pyfa. # # pyfa 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...
davipeterlini/routeflow_tcc_ha
refs/heads/master
pox/pox/lib/packet/dns.py
22
# Copyright 2011,2012 James McCauley # Copyright 2008 (C) Nicira, Inc. # # This file is part of POX. # # POX 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 optio...
sarvex/django
refs/heads/master
django/contrib/gis/db/backends/postgis/base.py
366
from django.db.backends.base.base import NO_DB_ALIAS from django.db.backends.postgresql.base import \ DatabaseWrapper as Psycopg2DatabaseWrapper from .features import DatabaseFeatures from .introspection import PostGISIntrospection from .operations import PostGISOperations from .schema import PostGISSchemaEditor ...
PhilSk/zulip
refs/heads/master
zerver/tornado/ioloop_logging.py
10
from __future__ import absolute_import from __future__ import division from typing import Any, List, Tuple import logging import time import select from tornado import ioloop from django.conf import settings try: # Tornado 2.4 orig_poll_impl = ioloop._poll # type: ignore # cross-version type variation is hard...
Dilmacoin/dilmacoin-abe
refs/heads/master
Abe/admin.py
29
#!/usr/bin/env python # Copyright(C) 2012,2013,2014 by Abe developers. # 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 ve...
arpit1997/Pqusic
refs/heads/development3
mysite/MusicApp/models.py
1
from django.db import models from django.contrib.auth.models import User class AppUserProfile(models.Model): """ extended user model for application user """ user = models.ForeignKey(User) # True is for public user privacy = models.BooleanField(default=True) class PlaylistSongs(models.Model): """ Songs tabl...