repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
MetSystem/PTVS
refs/heads/master
Python/Tests/TestData/DebuggerProject/EvalRawTest.py
18
import sys try: unicode except: unicode = str class DerivedString(unicode): def __new__(cls, *args, **kwargs): return unicode.__new__(cls, *args, **kwargs) n = 123 if sys.version[0] == '3': s = 'fob'.encode('ascii') u = 'fob' else: s = 'fob' u = unicode('fob') ...
detrout/debian-statsmodels
refs/heads/debian
statsmodels/examples/tsa/lagpolynomial.py
34
# -*- coding: utf-8 -*- """ Created on Fri Oct 22 08:13:38 2010 Author: josef-pktd License: BSD (3-clause) """ from __future__ import print_function import numpy as np from numpy import polynomial as npp class LagPolynomial(npp.Polynomial): #def __init__(self, maxlag): def pad(self, maxlag): retur...
aronparsons/spacewalk
refs/heads/master
client/rhel/rhnlib/rhn/SSL.py
2
# # Higher-level SSL objects used by rpclib # # Copyright (c) 2002--2015 Red Hat, Inc. # # Author: Mihai Ibanescu <misa@redhat.com> # # In addition, as a special exception, the copyright holders give # permission to link the code of portions of this program with the # OpenSSL library under certain conditions as describ...
home-assistant/home-assistant
refs/heads/dev
tests/components/wilight/__init__.py
2
"""Tests for the WiLight component.""" from pywilight.const import DOMAIN from homeassistant.components.ssdp import ( ATTR_SSDP_LOCATION, ATTR_UPNP_MANUFACTURER, ATTR_UPNP_MODEL_NAME, ATTR_UPNP_MODEL_NUMBER, ATTR_UPNP_SERIAL, ) from homeassistant.components.wilight.config_flow import ( CONF_MO...
SantosDevelopers/sborganicos
refs/heads/master
venv/lib/python3.5/site-packages/pkg_resources/_vendor/packaging/specifiers.py
1107
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import functools import itertools import re from ._compat impo...
thodoris/djangoPharma
refs/heads/master
djangoPharma/env/Lib/site-packages/django/contrib/sites/shortcuts.py
615
from __future__ import unicode_literals from django.apps import apps def get_current_site(request): """ Checks if contrib.sites is installed and returns either the current ``Site`` object or a ``RequestSite`` object based on the request. """ # Imports are inside the function because its point is ...
petewarden/tensorflow
refs/heads/master
tensorflow/python/distribute/distribute_lib_test.py
5
# Copyright 2018 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...
zhanghenry/stocks
refs/heads/master
tests/template_tests/filter_tests/test_pluralize.py
430
from decimal import Decimal from django.template.defaultfilters import pluralize from django.test import SimpleTestCase class FunctionTests(SimpleTestCase): def test_integers(self): self.assertEqual(pluralize(1), '') self.assertEqual(pluralize(0), 's') self.assertEqual(pluralize(2), 's')...
cerebrumaize/leetcode
refs/heads/master
78.Subsets/1.py
1
#!/usr/bin/env python '''code description''' # pylint: disable = I0011, E0401, C0103, C0321 class Solution(object): '''Solution description''' def func(self, nums): '''Solution function description''' from itertools import combinations if len(nums) == 1: return[[], nums] res = [...
developerQuinnZ/this_will_work
refs/heads/master
labeler/migrations/0004_auto_20170803_2308.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-04 06:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('labeler', '0003_auto_20170803_2247'), ] operations = [ migrations.RemoveFie...
playfulgod/kernel_lge_dory
refs/heads/cm-11.0
tools/perf/tests/attr.py
3174
#! /usr/bin/python import os import sys import glob import optparse import tempfile import logging import shutil import ConfigParser class Fail(Exception): def __init__(self, test, msg): self.msg = msg self.test = test def getMsg(self): return '\'%s\' - %s' % (self.test.path, self.msg)...
minhphung171093/OpenERP_V8
refs/heads/master
openerp/report/render/makohtml2html/__init__.py
381
# -*- 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...
KarolBedkowski/tbviewer
refs/heads/master
tbviewer/main.py
1
# -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © Karol Będkowski, 2015-2020 # # This file is part of tbviewer # Distributed under terms of the GPLv3 license. """Main module.""" import optparse import logging import tempfile import time import os from . import version _LOG = logging.getLogger(__name__) def...
flux3dp/fluxghost
refs/heads/master
fluxghost/__init__.py
3
__version__ = "1.9.0"
rbaindourov/v8-inspector
refs/heads/master
Source/chrome/tools/gyp/test/many-actions/gyptest-many-actions-unsorted.py
54
#!/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. """ Make sure lots of actions in the same target don't cause exceeding command line length. """ import TestGyp test = TestGyp.TestGyp() t...
simon-andrews/roboclone
refs/heads/master
roboclone/main.py
1
#!/usr/bin/python import argparse import os from .eclipse import write_metadata_files from .git import clone def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("remote_url", help="url of the remote git repository (https or ssh)") parser.add_argument("destination", help="directory to...
bateman/mood-c2a
refs/heads/master
moodc2a/converter.py
1
# author: bateman # date: nov. 13, 2015 # version: 0.1 import csv import argparse import string class Csv2Aiken: """ CSV (input) file must be formatted as follows: Question;Answer;Index;Correct What is the correct answer to this question?;Is it this one;A; ;Maybe this answer;B...
sparkslabs/kamaelia_
refs/heads/master
Sketches/JL/AIM_/protneg.py
3
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
ChanduERP/odoo
refs/heads/8.0
doc/_extensions/html_domain.py
254
# -*- coding: utf-8 -*- """ Defines a "raw HTML" domain with a ``div[classes]`` and a number of roles rendered more or less directly to HTML. .. warning:: the purpose of this domain is *not* to document HTML or components """ from docutils import nodes, utils from docutils.parsers.rst import Directive, directiv...
kbrebanov/ansible
refs/heads/devel
lib/ansible/plugins/lookup/csvfile.py
22
# (c) 2013, Jan-Piet Mens <jpmens(at)gmail.com> # (c) 2017 Ansible Project # 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 DOCUMENTATION = """ lookup: csvfile author: Jan-Piet Me...
saturngod/pyWebTest-gitbook
refs/heads/master
book/js/Lib/itertools.py
630
import operator class accumulate: def __init__(self, iterable, func = operator.add): self.it = iter(iterable) self._total = None self.func = func def __iter__(self): return self def __next__(self): if not self._total: self._total = next(self.it)...
nop33/indico
refs/heads/master
bin/utils/apiProxy.py
2
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
EmmanuelJohnson/ssquiz
refs/heads/master
flask/lib/python2.7/encodings/shift_jis.py
816
# # shift_jis.py: Python Unicode Codec for SHIFT_JIS # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('shift_jis') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.Multib...
noironetworks/group-based-policy
refs/heads/master
gbpservice/contrib/nfp/configurator/lib/generic_config_constants.py
1
# 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 # d...
Frenzie/youtube-dl
refs/heads/master
youtube_dl/extractor/walla.py
123
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( xpath_text, int_or_none, ) class WallaIE(InfoExtractor): _VALID_URL = r'http://vod\.walla\.co\.il/[^/]+/(?P<id>\d+)/(?P<display_id>.+)' _TEST = { 'url': 'http://vod.walla...
onestarshang/flask_super_config
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py
928
def is_fp_closed(obj): """ Checks whether a given file-like object is closed. :param obj: The file-like object to check. """ try: # Check via the official file-like-object way. return obj.closed except AttributeError: pass try: # Check if the object...
hevel/goflow
refs/heads/master
docs/source/modules/gen_modules.py
10
import sys, os from Cheetah.Template import Template template =''' .. _${mod.name}: :mod:`${mod.name}` -- ${mod.synopsis} ================================================================================ .. module:: ${mod.name} :synopsis: ${mod.synopsis} ''' template_ =''' .. _${mod.name}: :mod:`${mod.name}` ...
yoer/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/distinct_on_fields/tests.py
117
from __future__ import absolute_import from django.db.models import Max from django.test import TestCase, skipUnlessDBFeature from django.test.utils import str_prefix from .models import Tag, Celebrity, Fan, Staff, StaffTag class DistinctOnTests(TestCase): def setUp(self): t1 = Tag.objects.create(name='t...
minixalpha/SourceLearning
refs/heads/master
wsgiref-0.1.2/wsgi_demo/server.py
1
#!/usr/bin/env python #coding: utf-8 # Demo of WSGI Server def run(application): # environ must be a Python dict object environ = {} cur_response_headers = [] # set environ def write(data): pass def _response_headers_legal(response_headers): return True def start_respon...
flyapen/UgFlu
refs/heads/master
flumotion/test/test_component_feeder.py
4
# -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU Genera...
bgnori/gnubg
refs/heads/master
scripts/db_import.py
1
# # db_import.py -- batch import of multiple sgf files into relational database # # by Jon Kinsey <Jon_Kinsey@hotmail.com>, 2004 # # This program is free software; you can redistribute it and/or modify # it under the terms of version 3 or later of the GNU General Public License as # published by the Free Software Found...
lightos/LaZagne
refs/heads/master
Windows/src/LaZagne/config/dico.py
22
def get_dico(): return [ "password", "123456", "12345678", "1234", "qwerty", "12345", "dragon", "pussy", "baseball", "football", "letmein", "monkey", "696969", "abc123", "mustang", "michael", "shadow", "master", "jennifer", "111111", "2000", "jordan", "superman", "harley", "1234567", "fuckme...
zencodex/csip
refs/heads/master
CSipSimple/jni/pjsip/sources/tests/pjsua/scripts-sendto/361_non_sip_uri.py
59
# $Id: 361_non_sip_uri.py 2392 2008-12-22 18:54:58Z bennylp $ import inc_sip as sip import inc_sdp as sdp # No SIP URI in Contact header # complete_msg = \ """INVITE sip:localhost SIP/2.0 Via: SIP/2.0/UDP 192.168.0.14:5060;rport;branch=z9hG4bKPj9db9 Max-Forwards: 70 From: <sip:192.168.0.14>;tag=08cd5bfc2d8a4fddb1f5e5...
hcsturix74/django
refs/heads/master
tests/messages_tests/test_cookie.py
299
import json from django.contrib.messages import constants from django.contrib.messages.storage.base import Message from django.contrib.messages.storage.cookie import ( CookieStorage, MessageDecoder, MessageEncoder, ) from django.test import SimpleTestCase, override_settings from django.utils.safestring import Safe...
mdaniel/intellij-community
refs/heads/master
python/testData/refactoring/extractmethod/CommentsPrecedingSourceStatement.before.py
30
x = 42 # print('commented') # comment 1 # comment 2 print(<selection>x ** 2</selection>)
k-okada/naoqi_driver
refs/heads/master
doc/source/ToggleDirective.py
10
# Directive that shows a toggle link between sections. # Those sections cannot contain titles # The first one is initially showed. Here is the syntax: # .. toggle_table:: # :arg1: text in button 1 # :arg2: text in button 2 # # .. toggle:: text in button 1 # # some RST text # #.. toggle:: text in button 2 # #...
arthurdarcet/tornado
refs/heads/master
tornado/platform/twisted.py
23
# Author: Ovidiu Predescu # Date: July 2011 # # 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 ...
costa23c/rdmw_cloudkit
refs/heads/master
xbgw_dashboard/__init__.py
35
# # 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/. # # Copyright (c) 2015 Digi International Inc., All Rights Reserved. #
citrix-openstack-build/heat
refs/heads/master
doc/source/conf.py
5
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
zahodi/ansible
refs/heads/devel
lib/ansible/modules/packaging/language/bundler.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Tim Hoiberg <tim.hoiberg@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the L...
msebire/intellij-community
refs/heads/master
python/testData/completion/py3668/foo/bar.py
12133432
wisonwang/django-lfs
refs/heads/master
lfs/order/migrations/__init__.py
12133432
wolfv/AutobahnPython
refs/heads/master
autobahn/autobahn/twisted/resource.py
11
############################################################################### ## ## Copyright (C) 2012-2014 Tavendo GmbH ## ## 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 ## ## h...
bzbarsky/servo
refs/heads/master
tests/wpt/css-tests/tools/py/testing/process/test_cmdexec.py
163
import py from py.process import cmdexec def exvalue(): return py.std.sys.exc_info()[1] class Test_exec_cmd: def test_simple(self): out = cmdexec('echo hallo') assert out.strip() == 'hallo' assert py.builtin._istext(out) def test_simple_newline(self): import sys ou...
landscape-test/all-messages
refs/heads/master
messages/pylint/W0301.py
1
""" W0301 Unnecessary semicolon """
googleapis/python-billingbudgets
refs/heads/master
scripts/fixup_budgets_v1beta1_keywords.py
4
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
dhermes/endpoints-proto-datastore
refs/heads/master
endpoints_proto_datastore/ndb/properties.py
8
# Copyright 2012 Google Inc. All Rights Reserved. """Custom properties for hybrid NDB/ProtoRPC models. Custom properties are defined to allow custom interactions with complex types and custom serialization of these values into ProtoRPC fields. Defined here: EndpointsAliasProperty: A local only property used fo...
luisgg/iteexe
refs/heads/master
twisted/test/process_reader.py
166
"""Script used by test_process.TestTwoProcesses""" # run until stdin is closed, then quit import sys while 1: d = sys.stdin.read() if len(d) == 0: sys.exit(0)
tashaxe/Red-DiscordBot
refs/heads/develop
lib/PIL/ImageQt.py
14
# # The Python Imaging Library. # $Id$ # # a simple Qt image interface. # # history: # 2006-06-03 fl: created # 2006-06-04 fl: inherit from QImage instead of wrapping it # 2006-06-05 fl: removed toimage helper; move string support to ImageQt # 2013-11-13 fl: add support for Qt5 (aurelien.ballier@cyclonit.com) # # Copyr...
tanmaythakur/django
refs/heads/master
django/core/cache/backends/locmem.py
586
"Thread-safe in-memory cache backend." import time from contextlib import contextmanager from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache from django.utils.synch import RWLock try: from django.utils.six.moves import cPickle as pickle except ImportError: import pickle # Global in-memor...
blitz-io/blitz-python
refs/heads/master
src/blitz/sprint.py
1
__author__="ghermeto" __date__ ="$27/07/2011 23:23:38$" import base64 from blitz.api import Curl, ValidationError from blitz.validation import validate_list, validate class Request: """Represents the request object generated by the sprint. Contains all of the headers and POST/PUT data, if any.""" ...
kirca/odoo
refs/heads/master
addons/stock/report/stock_graph.py
112
# -*- 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...
DailyActie/Surrogate-Model
refs/heads/master
01-codes/scikit-learn-master/sklearn/svm/tests/test_sparse.py
1
import numpy as np from nose.tools import assert_raises, assert_true, assert_false from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_equal) from scipy import sparse from sklearn import datasets, svm, linear_model, base from sklearn.datasets import make_classific...
aidanhs/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptserve/wptserve/logger.py
489
class NoOpLogger(object): def critical(self, msg): pass def error(self, msg): pass def info(self, msg): pass def warning(self, msg): pass def debug(self, msg): pass logger = NoOpLogger() _set_logger = False def set_logger(new_logger): global _set_log...
TeamEOS/external_chromium_org
refs/heads/lp5.0
third_party/protobuf/python/google/protobuf/reflection.py
223
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
happyleavesaoc/home-assistant
refs/heads/dev
tests/components/tts/test_init.py
16
"""The tests for the TTS component.""" import ctypes import os import shutil from unittest.mock import patch, PropertyMock import pytest import requests import homeassistant.components.http as http import homeassistant.components.tts as tts from homeassistant.components.tts.demo import DemoProvider from homeassistant...
IptvBrasilGroup/Cleitonleonelcreton.repository
refs/heads/master
plugin.video.iptvbrondemand.mobile/jsunpack.py
18
""" urlresolver XBMC Addon Copyright (C) 2013 Bstrdsmkr 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....
FLYKingdom/MyCode
refs/heads/master
PycharmProjects/PythonTest/venv/lib/python2.7/site-packages/pip/_vendor/progress/counter.py
510
# -*- coding: utf-8 -*- # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS P...
google/llvm-propeller
refs/heads/bb-clusters
lldb/test/API/functionalities/thread_plan/TestThreadPlanCommands.py
8
""" Test that thread plan listing, and deleting works. """ import lldb from lldbsuite.test.decorators import * import lldbsuite.test.lldbutil as lldbutil from lldbsuite.test.lldbtest import * class TestThreadPlanCommands(TestBase): mydir = TestBase.compute_mydir(__file__) NO_DEBUG_INFO_TESTCASE = True ...
sparcs-kaist/olim
refs/heads/master
olim/olim/apps/account/tests.py
24123
from django.test import TestCase # Create your tests here.
fuhongliang/odoo
refs/heads/8.0
addons/multi_company/__openerp__.py
259
# -*- 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...
wehriam/awspider
refs/heads/master
static_analysis/pep8.py
48
#!/usr/bin/python # pep8.py - Check Python source code formatting, according to PEP 8 # Copyright (C) 2006 Johann C. Rocholl <johann@browsershots.org> # # 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...
amith01994/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/db/models/sql/query.py
72
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
vmturbo/nova
refs/heads/master
nova/api/openstack/compute/schemas/rescue.py
16
# Copyright 2014 NEC Corporation. # 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...
alxgu/ansible
refs/heads/devel
lib/ansible/modules/network/fortimanager/fmgr_fwobj_ippool6.py
38
#!/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...
jzoldak/edx-platform
refs/heads/master
docs/en_us/enrollment_api/source/conf.py
13
# -*- coding: utf-8 -*- # pylint: disable=invalid-name # pylint: disable=redefined-builtin # pylint: disable=protected-access # pylint: disable=unused-argument import os from path import Path as path import sys import mock MOCK_MODULES = [ 'ipware', 'ip', 'ipware.ip', 'get_ip', 'pygeoip', 'ipa...
illfelder/compute-image-packages
refs/heads/master
packages/python-google-compute-engine/google_compute_engine/metadata_scripts/script_executor.py
6
#!/usr/bin/python # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
ssvsergeyev/ZenPacks.zenoss.AWS
refs/heads/develop
src/boto/boto/dynamodb/exceptions.py
185
""" Exceptions that are specific to the dynamodb module. """ from boto.exception import BotoServerError, BotoClientError from boto.exception import DynamoDBResponseError class DynamoDBExpiredTokenError(BotoServerError): """ Raised when a DynamoDB security token expires. This is generally boto's (or the us...
emarinizquierdo/xentinels
refs/heads/master
openid/__init__.py
139
""" This package is an implementation of the OpenID specification in Python. It contains code for both server and consumer implementations. For information on implementing an OpenID consumer, see the C{L{openid.consumer.consumer}} module. For information on implementing an OpenID server, see the C{L{openid.server.se...
kenshay/ImageScripter
refs/heads/master
ProgramData/Android/ADB/platform-tools/systrace/catapult/common/py_utils/py_utils/refactor/module.py
11
# 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. from py_utils.refactor import annotated_symbol class Module(object): def __init__(self, file_path): self._file_path = file_path with open(self....
DirtyUnicorns/android_external_chromium-org
refs/heads/kitkat
build/android/gyp/apk_install.py
28
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Installs an APK. """ import optparse import os import re import subprocess import sys from util import build_device from util i...
PitMaker/Orion
refs/heads/master
drone_lib.py
1
#bibliotheques de fonctions relatives au drone
BraichuSoft/pyafipws
refs/heads/master
cot.py
11
#!/usr/bin/python # -*- coding: latin-1 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 3, or (at your option) any later # version. # # This program is distributed in t...
adlnet-archive/edx-platform
refs/heads/master
common/djangoapps/edxmako/templatetag_helpers.py
250
from django.template import loader from django.template.base import Template, Context from django.template.loader import get_template, select_template def django_template_include(file_name, mako_context): """ This can be used within a mako template to include a django template in the way that a django-sty...
pahaz/prospector
refs/heads/master
prospector/tools/frosted/__init__.py
3
from __future__ import absolute_import from frosted.api import check_path from prospector.message import Location, Message from prospector.tools.base import ToolBase __all__ = ( 'FrostedTool', ) class ProspectorReporter(object): def __init__(self, ignore=None): self._messages = [] self.ign...
BassantMorsi/finderApp
refs/heads/master
lib/python2.7/site-packages/django/conf/locale/et/__init__.py
12133432
amitaekbote/dcos
refs/heads/master
packages/adminrouter/extra/src/test-harness/modules/mocker/endpoints/__init__.py
12133432
Vagab0nd/SiCKRAGE
refs/heads/master
sickchill/providers/subtitle/wizdom.py
1
import bisect import io import logging import os import zipfile from babelfish import Language from guessit import guessit from requests import Session from subliminal.cache import region, SHOW_EXPIRATION_TIME from subliminal.exceptions import ProviderError from subliminal.matches import guess_matches from subliminal....
s-store/sstore-soft
refs/heads/master
src/dtxn/net/demomessages.py
9
#!/usr/bin/python import stupidcompiler demo = stupidcompiler.MessageDefinition("Demo", "A simple test message.") demo.addField(stupidcompiler.INT32, "integer", -42, "An integer.") demo.addField(stupidcompiler.BOOL, "boolean", False, "A boolean.") demo.addField(stupidcompiler.STRING, "str", None, "A string.") messag...
ewiger/tree_output
refs/heads/master
tree_output/houtput.py
1
# -*- coding: utf-8 -*- ''' tree_output =========== Python library to simplify building of tree output with command-line interfaces. Copyright (c) 2014 Yauhen Yakimovich Licensed under the MIT License (MIT). Read a copy of LICENSE distributed with this code. ''' import sys import json import colorama from colorama im...
arenadata/ambari
refs/heads/branch-adh-1.6
ambari-server/src/main/resources/stacks/ADH/1.6/services/HIVE/package/alerts/alert_webhcat_server.py
7
#!/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 "License")...
MostlyOpen/odoo_addons
refs/heads/master
myo_mfile/models/mfile.py
1
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # 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 #...
partofthething/home-assistant
refs/heads/dev
tests/components/axis/test_binary_sensor.py
5
"""Axis binary sensor platform tests.""" from homeassistant.components.axis.const import DOMAIN as AXIS_DOMAIN from homeassistant.components.binary_sensor import ( DEVICE_CLASS_MOTION, DOMAIN as BINARY_SENSOR_DOMAIN, ) from homeassistant.const import STATE_OFF, STATE_ON from homeassistant.setup import async_se...
krischer/jane
refs/heads/master
src/jane/documents/management/commands/reindex_all_documents.py
1
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand from jane.documents import models, signals class Command(BaseCommand): help = "Reindex all documents in Jane's document database." def add_arguments(self, parser): parser.add_argument( 'document_type', type=str, ...
sanjeevtripurari/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/contrib/auth/management/commands/createsuperuser.py
130
""" Management utility to create superusers. """ from __future__ import unicode_literals import getpass import sys from optparse import make_option from django.contrib.auth import get_user_model from django.contrib.auth.management import get_default_username from django.core import exceptions from django.core.managem...
minggli/chatbot
refs/heads/dev
tests/test_vector.py
1
from chatbot import settings as s from chatbot.ie import extracted_urls, TextMiner from chatbot.nlp.embedding import WordEmbedding WEB_METAKEY, BASE_URL = s.WEB_METAKEY, s.BASE_URL urls = extracted_urls(base_url=BASE_URL) web_scraper = TextMiner(urls=urls, attrs=WEB_METAKEY, display=True) raw_data = web_scraper.ex...
NavyaJayaram/MyRepository
refs/heads/master
YouTubeUsingAJS/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/langthaimodel.py
2929
######################## 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...
Teamxrtc/webrtc-streaming-node
refs/heads/master
third_party/webrtc/src/chromium/src/tools/chrome_proxy/live_tests/chrome_proxy_benchmark.py
8
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from live_tests import chrome_proxy_measurements as measurements from live_tests import pagesets from telemetry import benchmark class ChromeProxyLatency(b...
patcorwin/fossil
refs/heads/master
pdil/tool/fossil/card.py
1
''' ''' import os import math from maya.api import OpenMaya from pymel.core import PyNode, xform, rotate, nurbsPlane, polyCylinder, scale, delete, makeIdentity, joint, hide, pointConstraint, group, parentConstraint, aimConstraint, warning, dt, confirmDialog, duplicate, ls, importFile, mel, spaceLocator, distanceDime...
caveman-dick/ansible
refs/heads/devel
lib/ansible/inventory/data.py
2
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
songmonit/CTTMSONLINE
refs/heads/master
addons/crm_profiling/crm_profiling.py
333
# -*- 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...
socialplanning/opencore
refs/heads/master
opencore/api/__init__.py
9480
#
shaheemirza/pupy
refs/heads/master
pupy/packages/windows/x86/psutil/_pswindows.py
66
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Windows platform implementation.""" import errno import functools import os import sys from collections import namedtuple from ...
pschmitt/home-assistant
refs/heads/dev
homeassistant/components/mobile_app/config_flow.py
14
"""Config flow for Mobile App.""" import uuid from homeassistant import config_entries from homeassistant.components import person from homeassistant.helpers import entity_registry from .const import ATTR_APP_ID, ATTR_DEVICE_ID, ATTR_DEVICE_NAME, CONF_USER_ID, DOMAIN @config_entries.HANDLERS.register(DOMAIN) class ...
apple/swift-lldb
refs/heads/stable
packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py
13
"""Test lldb's expression evaluations and collect statistics.""" from __future__ import print_function import sys import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbbench import * from lldbsuite.test.lldbtest import * from lldbsuite.test import configuration from lldbsuite.test import lldbut...
TieWei/nova
refs/heads/enhanced/havana
nova/virt/baremetal/virtual_power_driver.py
7
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Hewlett-Packard Development Company, L.P. # 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 # # ...
pjamesjoyce/lcopt
refs/heads/development
lcopt/mass_balance.py
1
def recurse_mass(d, allow_no_mass = False, checkSecondary = True): to_return = {} #cum_impact = 0 isBiosphere = d['tag'] == 'biosphere' if not isBiosphere and checkSecondary: isBiosphere = 'biosphere' in d['secondary_tags'] for k, v in d.items(): if k == 'amount' and isBiosphe...
botswana-harvard/microbiome
refs/heads/develop
microbiome/apps/mb_maternal/admin/maternal_off_study_admin.py
3
from django.contrib import admin from ..models import MaternalOffStudy from ..forms import MaternalOffStudyForm from .base_maternal_model_admin import BaseMaternalModelAdmin class MaternalOffStudyAdmin(BaseMaternalModelAdmin): form = MaternalOffStudyForm fields = ( 'maternal_visit', 'report...
guerrerocarlos/odoo
refs/heads/8.0
addons/mrp/res_config.py
301
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
h2oai/h2o-3
refs/heads/master
h2o-py/tests/testdir_misc/pyunit_init_https.py
2
#!/usr/bin/env python # -*- encoding: utf-8 -*- import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils from h2o.exceptions import H2OConnectionError def test_https_startup(): try: h2o.init(ip = "127.0.0.1", port="12345", https=True) # Port 12345 is used, as 54321 is expected to b...