repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
LightWind/usenix-conference-system
refs/heads/master
NFC controller/nfc/handover/client.py
5
# -*- coding: latin-1 -*- # ----------------------------------------------------------------------------- # Copyright 2009-2011 Stephen Tiedemann <stephen.tiedemann@googlemail.com> # # Licensed under the EUPL, Version 1.1 or - as soon they # will be approved by the European Commission - subsequent # versions of the EU...
tseaver/google-cloud-python
refs/heads/master
websecurityscanner/google/cloud/websecurityscanner_v1alpha/proto/finding_pb2_grpc.py
573
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc
sergiorua/libcloud
refs/heads/trunk
libcloud/test/common/test_aws.py
26
import sys import unittest from datetime import datetime import mock from libcloud.common.aws import SignedAWSConnection from libcloud.common.aws import AWSRequestSignerAlgorithmV4 from libcloud.test import LibcloudTestCase class EC2MockDriver(object): region_name = 'my_region' class AWSRequestSignerAlgorithm...
kalaspuff/tomodachi
refs/heads/master
tests/services/dummy_protobuf_service.py
1
import tomodachi from tomodachi.discovery.dummy_registry import DummyRegistry from tomodachi.envelope.protobuf_base import ProtobufBase @tomodachi.service class DummyService(tomodachi.Service): name = "test_dummy_protobuf" discovery = [DummyRegistry] message_envelope = ProtobufBase options = { ...
alx-eu/django
refs/heads/stable/1.5.x
tests/regressiontests/comment_tests/urls_admin.py
174
from django.conf.urls import patterns, include from django.contrib import admin from django.contrib.comments.admin import CommentsAdmin from django.contrib.comments.models import Comment # Make a new AdminSite to avoid picking up the deliberately broken admin # modules in other tests. admin_site = admin.AdminSite() ad...
GdZ/scriptfile
refs/heads/master
software/googleAppEngine/lib/django_1_3/django/conf/locale/ka/formats.py
329
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'l, j F, Y' TIME_FORMAT = 'h:i:s a' DATETIME_FORMAT = 'j F, Y h:i:s a' YEA...
HousekeepLtd/django
refs/heads/master
django/core/serializers/python.py
153
""" A Python "serializer". Doesn't do much serializing per se -- just converts to and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for other serializers. """ from __future__ import unicode_literals from collections import OrderedDict from django.apps import apps from django.conf impor...
sujeet4github/MyLangUtils
refs/heads/master
LangPython/oreilly-intro-to-flask-video/venv/lib/python3.6/site-packages/werkzeug/datastructures.py
56
# -*- coding: utf-8 -*- """ werkzeug.datastructures ~~~~~~~~~~~~~~~~~~~~~~~ This module provides mixins and classes with an immutable interface. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import codecs import ...
shepdelacreme/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_postgresqldatabase.py
36
#!/usr/bin/python # # Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.com> # # 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', ...
mgraffg/simplegp
refs/heads/master
SimpleGP/tests/test_gpmae.py
1
# Copyright 2013 Mario Graff Guerrero # 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 wri...
asimshankar/tensorflow
refs/heads/master
tensorflow/contrib/distribute/python/estimator_integration_test.py
7
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
unusedPhD/amoco
refs/heads/release
amoco/arch/arm/v7/formats.py
5
# -*- coding: utf-8 -*- from .env import * from .utils import * from amoco.arch.core import Formatter def mnemo(i): m = i.mnemonic if hasattr(i,'setflags') and i.setflags: m += 'S' if hasattr(i,'cond') and i.cond!=CONDITION_AL: m += '.%s'%CONDITION[i.cond][0] return '%s'%(m.lower()).lj...
MemeticParadigm/TensorFlow
refs/heads/master
tensorflow/python/training/momentum.py
5
"""Momentum for TensorFlow.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import ops from tensorflow.python.ops import constant_op from tensorflow.python.training import optimizer from tensorflow.python.training import t...
0k/OpenUpgrade
refs/heads/8.0
addons/account_bank_statement_extensions/wizard/confirm_statement_line.py
381
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
ryfeus/lambda-packs
refs/heads/master
LightGBM_sklearn_scipy_numpy/source/numpy/matrixlib/defmatrix.py
10
from __future__ import division, absolute_import, print_function __all__ = ['matrix', 'bmat', 'mat', 'asmatrix'] import sys import ast import numpy.core.numeric as N from numpy.core.numeric import concatenate, isscalar, binary_repr, identity, asanyarray from numpy.core.numerictypes import issubdtype def _convert_fro...
OCA/bank-payment
refs/heads/12.0
account_payment_sale/models/sale_order.py
1
# Copyright 2014-2016 Akretion - Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields, api class SaleOrder(models.Model): _inherit = "sale.order" payment_mode_id = fields.Many2one( 'account.payment.mode', string='Payment Mode', doma...
jeyraof/python-social-auth
refs/heads/master
social/backends/douban.py
82
""" Douban OAuth1 and OAuth2 backends, docs at: http://psa.matiasaguirre.net/docs/backends/douban.html """ from social.backends.oauth import BaseOAuth2, BaseOAuth1 class DoubanOAuth(BaseOAuth1): """Douban OAuth authentication backend""" name = 'douban' EXTRA_DATA = [('id', 'id')] AUTHORIZATION_URL...
xfournet/intellij-community
refs/heads/master
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_0/_pkg0_0_0/_pkg0_0_0_0/_pkg0_0_0_0_0/_mod0_0_0_0_0_1.py
30
name0_0_0_0_0_1_0 = None name0_0_0_0_0_1_1 = None name0_0_0_0_0_1_2 = None name0_0_0_0_0_1_3 = None name0_0_0_0_0_1_4 = None
CryptoCoderz/INSN
refs/heads/master
share/qt/make_spinner.py
4415
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
cryptodev35/Shark
refs/heads/master
share/qt/make_spinner.py
4415
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
MarcosCommunity/odoo
refs/heads/marcos-8.0
addons/l10n_bo/__openerp__.py
259
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the...
ESS-LLP/erpnext
refs/heads/develop
erpnext/projects/doctype/project_user/project_user.py
56
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class ProjectUser(Document): pass
ogenstad/ansible
refs/heads/devel
lib/ansible/utils/module_docs_fragments/rackspace.py
45
# (c) 2014, Matt Martz <matt@sivel.net> # # 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. # ...
joequery/django
refs/heads/master
django/template/base.py
91
""" This is the Django template system. How it works: The Lexer.tokenize() function converts a template string (i.e., a string containing markup with custom template tags) to tokens, which can be either plain text (TOKEN_TEXT), variables (TOKEN_VAR) or block statements (TOKEN_BLOCK). The Parser() class takes a list ...
crepererum/invenio
refs/heads/master
invenio/ext/session/interface.py
13
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012, 2013, 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your...
DarthMaulware/EquationGroupLeaks
refs/heads/master
Leak #5 - Lost In Translation/windows/Resources/ZBng/PyScripts/Lib/zbng/mca/security/cmd/logonasuser/data/__init__.py
148
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: __init__.py pass
taoger/titanium_mobile
refs/heads/master
support/android/debugger.py
37
#!/usr/bin/env python # This server acts as an intermediary between # an ADB forwarded Titanium application w/ debugging # and a local debug server that is listening for a connection # TODO: this will work for on-device debugging import asyncore import socket import sys import time def debug(msg): print "[DEBUG] "+m...
ms-iot/python
refs/heads/develop
cpython/Lib/test/test_crypt.py
91
from test import support import unittest crypt = support.import_module('crypt') class CryptTestCase(unittest.TestCase): def test_crypt(self): c = crypt.crypt('mypassword', 'ab') if support.verbose: print('Test encryption: ', c) def test_salt(self): self.assertEqual(len(cr...
chriscabral/django-lean
refs/heads/master
docs/__init__.py
887
# Included so that Django's startproject comment runs against the docs directory
roshikouhai/courseEvalRetriever
refs/heads/master
CourseEvalRetriever/retrieveCourseEvalLinks.py
1
#TODO: Add functionality to save location, spot to resume download #TODO: Set up how to download information #TODO: Set up log file. #TODO: Upload to online database. """ Web Page Scraper for Teacher Evals Page Only goes through to find the links. """ import os, argparse, string from selenium import webdriver course...
elenanst/HPOlib
refs/heads/master
optimizers/smac/smac_2_08_00-master.py
2
## # wrapping: A program making it easy to use hyperparameter # optimization software. # Copyright (C) 2013 Katharina Eggensperger and Matthias Feurer # # 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 Found...
netsamir/dotfiles
refs/heads/master
files/vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/tests/gmock/gtest/test/gtest_shuffle_test.py
3023
#!/usr/bin/env python # # Copyright 2009 Google Inc. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of...
markgw/jazzparser
refs/heads/master
src/jazzparser/taggers/segmidi/base.py
1
"""Base classes for segmidi taggers. """ """ ============================== License ======================================== Copyright (C) 2008, 2010-12 University of Edinburgh, Mark Granroth-Wilding This file is part of The Jazz Parser. The Jazz Parser is free software: you can redistribute it and/or modify i...
mdmintz/SeleniumBase
refs/heads/master
examples/custom_settings.py
2
""" To override default settings stored in seleniumbase/config/settings.py, change the values here and add "--settings=custom_settings.py" when running. """ # Default timeout values for waiting for page elements to appear. MINI_TIMEOUT = 2 SMALL_TIMEOUT = 6 LARGE_TIMEOUT = 10 EXTREME_TIMEOUT = 30 # If False, only log...
UnbDroid/robomagellan
refs/heads/master
Codigos/Raspberry/desenvolvimentoRos/devel/lib/python2.7/dist-packages/visualization_msgs/msg/_MarkerArray.py
1
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from visualization_msgs/MarkerArray.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import genpy import geometry_msgs.msg import visualization_msgs.msg import std_msgs.msg...
SOKP/external_chromium_org
refs/heads/sokp-l5.1
tools/win/split_link/graph_dependencies.py
145
# 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. import os import shutil import subprocess import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) def main(): if len(sys.argv) != 2: print...
SUSE/azure-sdk-for-python
refs/heads/master
azure-keyvault/azure/keyvault/models/certificate_operation.py
4
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lshain-android-source/external-chromium_org
refs/heads/master
tools/valgrind/browser_wrapper_win.py
80
# Copyright (c) 2011 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 glob import os import re import sys import subprocess # TODO(timurrrr): we may use it on POSIX too to avoid code duplication once we # support la...
ASCrookes/django
refs/heads/master
django/conf/locale/bg/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 = 'd F Y' TIME_FORMAT = 'H:i' # DATE...
aaannndddyyy/Replicating-DeepMind
refs/heads/master
libraries/cuda-convnet2/python_util/gpumodel.py
175
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
nfallen/servo
refs/heads/master
tests/jquery/run_jquery.py
215
#!/usr/bin/env python # 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/. import os import re import subprocess import sys import BaseHTTPServer import SimpleHTTPServer im...
wemanuel/smry
refs/heads/master
server-auth/ls/google-cloud-sdk/platform/gsutil/gslib/copy_helper.py
11
# -*- coding: utf-8 -*- # Copyright 2011 Google Inc. All Rights Reserved. # Copyright 2011, Nexenta Systems 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/...
mnick/offlineimap
refs/heads/master
offlineimap/CustomConfig.py
6
# Copyright (C) 2003-2012 John Goerzen & contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # ...
rds0751/colinkers
refs/heads/master
env/Lib/site-packages/django/core/files/base.py
59
from __future__ import unicode_literals import os from io import BytesIO, StringIO, UnsupportedOperation from django.core.files.utils import FileProxyMixin from django.utils import six from django.utils.encoding import ( force_bytes, force_str, force_text, python_2_unicode_compatible, ) @python_2_unicode_compat...
OptoFidelity/cerbero
refs/heads/master
cerbero/ide/xcode/fwlib.py
7
#!/usr/bin/env python # cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free So...
Vagab0nd/SiCKRAGE
refs/heads/master
lib3/cryptography/hazmat/backends/openssl/x448.py
4
# 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 from cryptography import utils from cryptography.hazmat.backends.openssl....
TonyJenkins/cfs2160-python
refs/heads/master
04classes/bank_account.py
1
#!/usr/bin/env python3 # bank_account.py # # Simple Bank Account class example. # # AMJ # 2017-04-01 class BankAccount: def __init__ (self, account_number, account_holder, has_overdraft): self.account_number = account_number self.account_holder = account_holder self.has_overdraft = has_ov...
RedHatQE/cinch
refs/heads/master
cinch/library/line_match.py
2
#!/usr/bin/env python import re from ansible.module_utils.basic import AnsibleModule from os import path def main(): module = AnsibleModule( argument_spec={ 'file': {'required': True}, 'line': {'required': False}, 'method': {'choices': ['regex', 'simple'], 'default': '...
tfroehlich82/EventGhost
refs/heads/master
_build/data/Py2ExeBootScript.py
2
# -*- coding: utf-8 -*- # # This file is part of EventGhost. # Copyright © 2005-2020 EventGhost Project <http://www.eventghost.net/> # # EventGhost 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 versio...
lz1988/company-site
refs/heads/master
django/conf/locale/ar/formats.py
234
# -*- 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 = 'g:i:s A' #...
mapr/hue
refs/heads/hue-3.9.0-mapr
desktop/core/ext-py/Django-1.6.10/django/conf/locale/tr/formats.py
118
# -*- 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 = 'd F Y' TIME_FORMAT = 'H:i:s' DATE...
davidsminor/gaffer
refs/heads/master
python/GafferUI/SectionedCompoundPlugValueWidget.py
5
########################################################################## # # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Red...
ashhher3/invenio
refs/heads/master
modules/webstyle/lib/template.py
32
## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your ...
PRJosh/kernel_msm
refs/heads/caf_LA.BF.1.1.1_rb1.26
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
nesdis/djongo
refs/heads/master
tests/django_tests/tests/v21/tests/check_framework/urls/include_contains_tuple.py
94
from django.urls import include, path urlpatterns = [ path('', include([(r'^tuple/$', lambda x: x)])), ]
mj10777/QGIS
refs/heads/master
tests/code_layout/acceptable_missing_doc.py
10
# -*- coding: utf-8 -*- """ *************************************************************************** acceptable_missing_doc.py --------------------- Date : March 2016 Copyright : (C) 2016 by Stéphane Brunner Email : stephane dot brunner at camptocamp dot...
hottwaj/django
refs/heads/master
django/db/backends/oracle/features.py
356
from django.db.backends.base.features import BaseDatabaseFeatures from django.db.utils import InterfaceError try: import pytz except ImportError: pytz = None class DatabaseFeatures(BaseDatabaseFeatures): empty_fetchmany_value = () interprets_empty_strings_as_nulls = True uses_savepoints = True ...
dfunckt/django
refs/heads/master
tests/auth_tests/test_hashers.py
8
# -*- coding: utf-8 -*- from __future__ import unicode_literals from unittest import skipUnless from django.conf.global_settings import PASSWORD_HASHERS from django.contrib.auth.hashers import ( UNUSABLE_PASSWORD_PREFIX, UNUSABLE_PASSWORD_SUFFIX_LENGTH, BasePasswordHasher, PBKDF2PasswordHasher, PBKDF2SHA1Pass...
blindroot/django
refs/heads/master
tests/forms_tests/field_tests/test_floatfield.py
38
from __future__ import unicode_literals from django.forms import FloatField, NumberInput, ValidationError from django.test import SimpleTestCase from django.utils import formats, translation from . import FormFieldAssertionsMixin class FloatFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_floatfie...
willingc/pythondotorg
refs/heads/master
blogs/views.py
10
from django.conf import settings from django.views.generic import TemplateView from .models import BlogEntry, Translation, Contributor class BlogHome(TemplateView): """ Main blog view """ template_name = 'blogs/index.html' def get_context_data(self, *args, **kwargs): context = super().get_contex...
frappe/frappe
refs/heads/develop
frappe/custom/doctype/property_setter/property_setter.py
1
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt import frappe from frappe import _ from frappe.model.document import Document not_allowed_fieldtype_change = ['naming_series'] class PropertySetter(Document): def autoname(self): self.name = '{doctype}-{field}-{pr...
AndroidOpenDevelopment/android_external_chromium_org
refs/heads/lp
chrome/common/extensions/docs/server2/link_converter.py
96
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This script converts old-style <a> links to API docs to the new $ref links. # See reference_resolver.py for more info on the form...
MartinRiese/python_koans
refs/heads/master
python2/koans/about_none.py
16
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutNil in the Ruby Koans # from runner.koan import * class AboutNone(Koan): def test_none_is_an_object(self): "Unlike NULL in a lot of languages" self.assertEqual(True, isinstance(None, object)) def test_none_is_universal(self): ...
DIRACGrid/DIRAC
refs/heads/integration
src/DIRAC/Core/Utilities/ExecutorDispatcher.py
2
""" Used by the executors for dispatching events (IIUC) """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import threading import time from DIRAC import S_OK, S_ERROR, gLogger from DIRAC.Core.Utilities.ReturnValues import isReturnStructure from DIRAC.Core...
somchaisomph/RPI.GPIO.TH
refs/heads/master
gadgets/th_gpio.py
1
import atexit import RPi.GPIO as GPIO ## Import GPIO library def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance ''' I think TH_GPIO class is needed to be a singleton to be sure that ther...
PanDAWMS/panda-bigmon-lsst
refs/heads/wenaus
lsst/settings/__init__.py
2
""" Settings package to replace standard django project settings.py. It separates A) base.py: general project configuration, should not change this one B) config.py: machine-specific environment config with sensible defaults C) local.py: settings to override machine-specific environment config ""...
notriddle/servo
refs/heads/master
tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/events.py
26
import pytest from tests.support.asserts import ( assert_element_has_focus, assert_events_equal, assert_success, ) from tests.support.inline import inline from . import map_files_to_multiline_text @pytest.fixture def tracked_events(): return [ "blur", "change", "focus", ...
cheery/essence
refs/heads/master
richtext.py
1
from argon import rgba from box import Box blackish = rgba(0x00, 0x00, 0x00, 0x40) whiteish = rgba(0xf6, 0xf3, 0xe8) blueish = rgba(0x00, 0xf3, 0xe8, 0x80) def clamp(low, high, value): return min(high, max(low, value)) class Segment(object): def __init__(self, width, text): self.width = width ...
w1r0x/ansible
refs/heads/devel
lib/ansible/plugins/callback/default.py
11
# (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...
nikitos/npui
refs/heads/master
netprofile/netprofile/common/magic.py
3
#!/usr/bin/env python ''' Python bindings for libmagic ''' import ctypes from ctypes import * from ctypes.util import find_library def _init(): """ Loads the shared library through ctypes and returns a library L{ctypes.CDLL} instance """ dll = None lib = find_library('magic') or find_library('magic1') if lib...
spiceweasel/studyit-flashcard
refs/heads/master
book/models.py
1
# studyit-flashcard is a django based flashcard system designed for studying on the go. # Copyright (C) 2013 Scott Jacovidis # # This file is part of studyit-flashcard. # # Studyit-flashcard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by ...
grlee77/nipype
refs/heads/master
nipype/interfaces/slicer/filtering/arithmetic.py
15
# -*- coding: utf8 -*- """Autogenerated file - DO NOT EDIT If you spot a bug, please report it on the mailing list and/or change the generator.""" from nipype.interfaces.base import CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath i...
CERNDocumentServer/invenio
refs/heads/prod
modules/bibformat/lib/elements/bfe_sword_push.py
1
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any...
smartforceplus/SmartForceplus
refs/heads/master
addons/website_forum/controllers/__init__.py
4497
# -*- coding: utf-8 -*- import main
mattiaslinnap/django-partial-index
refs/heads/master
partial_index/mixins.py
1
from django.core.exceptions import ImproperlyConfigured, ValidationError from django.db.models import Q from .index import PartialIndex from . import query class PartialUniqueValidationError(ValidationError): pass class ValidatePartialUniqueMixin(object): """PartialIndex with unique=True validation to Mode...
KangaCoders/titanium_mobile
refs/heads/master
support/common/markdown/preprocessors.py
112
""" PRE-PROCESSORS ============================================================================= Preprocessors work on source text before we start doing anything too complicated. """ import re import markdown HTML_PLACEHOLDER_PREFIX = markdown.STX+"wzxhzdk:" HTML_PLACEHOLDER = HTML_PLACEHOLDER_PREFIX + "%d" + mark...
kdwink/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/db/backends/mysql/creation.py
311
from django.db.backends.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated MySQL column # types, as strings. Column-type strings can contain format strings; they'll # be interpolated against the values of Field.__dict_...
libracore/erpnext
refs/heads/v12
erpnext/patches/v4_2/reset_bom_costs.py
120
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc('manufacturing', 'doctype', 'bom_operation') for d in frappe.db.sql("""select name from `tabBOM` where...
nicholedwight/nichole-theme
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/trac.py
364
# -*- coding: utf-8 -*- """ pygments.styles.trac ~~~~~~~~~~~~~~~~~~~~ Port of the default trac highlighter design. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Na...
jonasmcarson/cmsplugin-iframe
refs/heads/master
tests/settings_18.py
2
# This settings module is for Django 1.8 or higher from settings_17 import * # NOQA TEMPLATES = [{ 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.request', ], } }]
geekaia/edx-platform
refs/heads/master
common/djangoapps/cache_toolbox/model.py
239
""" Caching model instances ----------------------- ``cache_model`` adds utility methods to a model to obtain ``ForeignKey`` instances via the cache. Usage ~~~~~ :: from django.db import models from django.contrib.auth.models import User class Foo(models.Model): name = models.CharField(length=2...
nschloe/seacas
refs/heads/master
cmake/tribits/ci_support/CheckinTest.py
1
# @HEADER # ************************************************************************ # # TriBITS: Tribal Build, Integrate, and Test System # Copyright 2013 Sandia Corporation # # Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, # the U.S. Government retains certain ri...
axonchisel/ax_metrics
refs/heads/master
py/axonchisel/metrics/io/emfetch/plugins/__init__.py
1
""" Ax_Metrics - Default EMFetcher plugin class aggregation ------------------------------------------------------------------------------ Author: Dan Kamins <dos at axonchisel dot net> Copyright (c) 2014 Dan Kamins, AxonChisel.net """ # ---------------------------------------------------------------------------- #...
smart-developerr/my-first-blog
refs/heads/master
Lib/site-packages/django/contrib/sessions/apps.py
591
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class SessionsConfig(AppConfig): name = 'django.contrib.sessions' verbose_name = _("Sessions")
evanma92/routeh
refs/heads/master
flask/lib/python2.7/site-packages/sqlalchemy/testing/exclusions.py
21
# testing/exclusions.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 import operator from .plugin.plugin_base import SkipTest from ..util import d...
harukaeru/Brython-Django
refs/heads/master
static/brython/www/tests/from_import_test/a.py
31
x = 1
winndows/cinder
refs/heads/master
cinder/volume/drivers/emc/emc_cli_fc.py
5
# Copyright (c) 2012 - 2015 EMC Corporation, 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 # # ...
vileopratama/vitech
refs/heads/master
src/addons/website_crm/__openerp__.py
35
{ 'name': 'Contact Form', 'category': 'Website', 'website': 'https://www.odoo.com/page/website-builder', 'summary': 'Create Leads From Contact Form', 'version': '2.0', 'description': """ OpenERP Contact Form ==================== """, 'depends': ['website_form','website_partner', 'cr...
ivbeg/docx2csv
refs/heads/master
docs/conf.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # docx2csv documentation build configuration file # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default...
linjoahow/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/suite.py
748
"""TestSuite""" import sys from . import case from . import util __unittest = True def _call_if_exists(parent, attr): func = getattr(parent, attr, lambda: None) func() class BaseTestSuite(object): """A simple test suite that doesn't provide class or module shared fixtures. """ def __init__(se...
LWJensen/coala-bears
refs/heads/master
tests/python/PyCommentedCodeBearTest.py
2
from queue import Queue from bears.python.PyCommentedCodeBear import PyCommentedCodeBear from tests.LocalBearTestHelper import LocalBearTestHelper from coalib.settings.Section import Section class PyCommentedCodeBearTest(LocalBearTestHelper): def setUp(self): self.uut = PyCommentedCodeBear(Section('name...
crmccreary/openerp_server
refs/heads/master
openerp/addons/l10n_tr/__openerp__.py
2
# -*- 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 GN...
sdcooke/django
refs/heads/master
tests/sites_framework/models.py
281
from django.contrib.sites.managers import CurrentSiteManager from django.contrib.sites.models import Site from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class AbstractArticle(models.Model): title = models.CharField(max_length=50) object...
praveen049/pandas
refs/heads/master
example1/fpanda.py
1
#!/usr/bin/python import pandas as pd s = pd.Series([7, 'Heisenberg', 3.14, -1789710578, 'Happy Eating!'], index = ['A','C','F','G','Z']) print s d = {'Chicago': 1000, 'New York': 1300, 'Portland': 900, 'San Francisco': 1100, 'Austin': 450, 'Boston': None} cities = pd.Series(d) print cities[2] print cities.index...
zjuwangg/scrapy
refs/heads/master
tests/test_utils_serialize.py
135
import json import unittest import datetime from decimal import Decimal from twisted.internet import defer from scrapy.utils.serialize import ScrapyJSONEncoder from scrapy.http import Request, Response class JsonEncoderTestCase(unittest.TestCase): def setUp(self): self.encoder = ScrapyJSONEncoder() ...
dmnfarrell/smallrnaseq
refs/heads/master
smallrnaseq/mirdeep2.py
2
#!/usr/bin/env python """ Module for miRDeep2 wrappers and utilities Created July 2014 Copyright (C) Damien Farrell 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 ver...
onecloud/ovs-igmp-v3
refs/heads/master
python/ovs/json.py
52
# Copyright (c) 2010, 2011, 2012 Nicira, 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 agre...
elmar-peise/ELAPS
refs/heads/master
elaps/bin/playmat.py
2
#!/usr/bin/env python """Wrapper for ELAPS:PlayMat.""" import argparse from .. import defines from ..qt import PlayMat def main(): """Main entry point.""" # parse args parser = argparse.ArgumentParser( description="ELAPS PlayMat (Experiment GUI)" ) parser.add_argument("--reset", action="...
dbckz/ansible
refs/heads/devel
lib/ansible/playbook/role/requirement.py
20
# (c) 2014 Michael DeHaan, <michael@ansible.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) any later ve...
mammique/django
refs/heads/tp_alpha
tests/modeltests/fixtures_model_package/tests.py
58
from __future__ import unicode_literals from django.core import management from django.db import transaction from django.test import TestCase, TransactionTestCase from .models import Article, Book class SampleTestCase(TestCase): fixtures = ['fixture1.json', 'fixture2.json'] def testClassFixtures(self): ...