repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
js0701/chromium-crosswalk
refs/heads/master
third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
6
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
ssbarnea/ansible
refs/heads/devel
lib/ansible/module_utils/facts/network/generic_bsd.py
58
# 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 in the hope that ...
jiangzhuo/kbengine
refs/heads/master
kbe/src/lib/python/Lib/idlelib/SearchDialogBase.py
86
'''Define SearchDialogBase used by Search, Replace, and Grep dialogs.''' from tkinter import (Toplevel, Frame, Entry, Label, Button, Checkbutton, Radiobutton) class SearchDialogBase: '''Create most of a 3 or 4 row, 3 column search dialog. The left and wide middle column contain: 1 or...
lfalcao/thumbor
refs/heads/master
thumbor/handlers/legacy_upload.py
11
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/globocom/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com import urllib from thumbor.handlers import ContextHandler import to...
dqnykamp/sympy
refs/heads/master
sympy/physics/quantum/qubit.py
24
"""Qubits for quantum computing. Todo: * Finish implementing measurement logic. This should include POVM. * Update docstrings. * Update tests. """ from __future__ import print_function, division import math from sympy import Integer, log, Mul, Add, Pow, conjugate from sympy.core.basic import sympify from sympy.core...
wevote/WebAppPublic
refs/heads/master
support_oppose_deciding/controllers.py
1
# support_oppose_deciding/controllers.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from ballot.controllers import figure_out_google_civic_election_id_voter_is_watching, \ voter_ballot_items_retrieve_for_one_election_for_api from ballot.models import CANDIDATE, MEASURE, OFFICE from candidate.mod...
ARMmbed/yotta_osx_installer
refs/heads/master
workspace/lib/python2.7/site-packages/wheel/bdist_wheel.py
219
""" Create a wheel (.whl) distribution. A wheel is a built archive format. """ import csv import hashlib import os import subprocess import warnings import shutil import json import wheel try: import sysconfig except ImportError: # pragma nocover # Python < 2.7 import distutils.sysconfig as sysconfig i...
prutseltje/ansible
refs/heads/devel
lib/ansible/module_utils/network/dellos6/dellos6.py
34
# # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # # Copyright (c) 2016 Dell Inc. # # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still b...
lepistone/odoo
refs/heads/master
addons/l10n_cr/__init__.py
438
# -*- encoding: utf-8 -*- ############################################################################## # # __init__.py # l10n_cr_account # First author: Carlos Vásquez <carlos.vasquez@clearcorp.co.cr> (ClearCorp S.A.) # Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved....
CollabQ/CollabQ
refs/heads/master
vendor/django/forms/widgets.py
3
""" HTML Widget classes """ try: set except NameError: from sets import Set as set # Python 2.3 fallback import copy from itertools import chain from django.conf import settings from django.utils.datastructures import MultiValueDict, MergeDict from django.utils.html import escape, conditional_escape from dj...
zeinsteinz/tacker
refs/heads/feyman
tacker/extensions/common_services.py
1
# Copyright 2016 Brocade Communications Systems Inc # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
TOCyna/tabelinha
refs/heads/master
flask/lib/python2.7/site-packages/pbr/tests/test_version.py
41
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Red Hat, Inc. # Copyright 2012-2013 Hewlett-Packard Development Company, L.P. # # 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 Licen...
Andygmb/python-social-auth
refs/heads/master
social/backends/legacy.py
83
from social.backends.base import BaseAuth from social.exceptions import AuthMissingParameter class LegacyAuth(BaseAuth): def get_user_id(self, details, response): return details.get(self.ID_KEY) or \ response.get(self.ID_KEY) def auth_url(self): return self.setting('FORM_URL') ...
c24b/django-angular
refs/heads/master
djangular/__init__.py
11
# -*- coding: utf-8 -*- __version__ = '0.7.15'
lsaffre/lino
refs/heads/master
lino/modlib/ipdict/middleware.py
1
# -*- coding: UTF-8 -*- # Copyright 2017-2018 Rumma & Ko Ltd # License: BSD, see LICENSE for more details. from datetime import datetime from django.conf import settings from django.utils.deprecation import MiddlewareMixin class Middleware(MiddlewareMixin): def process_request(self, request): # sup...
Integral-Technology-Solutions/ConfigNOW
refs/heads/master
wlst/workmgr.py
2
# ============================================================================ # # Copyright (c) 2007-2010 Integral Technology Solutions Pty Ltd, # All Rights Reserved. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL...
andim27/magiccamp
refs/heads/master
django/dispatch/dispatcher.py
19
import weakref from django.dispatch import saferef WEAKREF_TYPES = (weakref.ReferenceType, saferef.BoundMethodWeakref) def _make_id(target): if hasattr(target, 'im_func'): return (id(target.im_self), id(target.im_func)) return id(target) class Signal(object): """ Base class for all signals ...
oneman/xmms2-oneman-old
refs/heads/nextgen-output-switchbuffer
wafadmin/Build.py
2
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2005 (ita) """ Dependency tree holder The class Build holds all the info related to a build: * file system representation (tree of Node instances) * various cached objects (task signatures, file scan results, ..) There is only one Build object at a time (bld sin...
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/npc_dressed_corellia_elite_slaver_guard_bth_m01.py
85615
import sys def setup(core, object): return
omnirom/android_external_chromium-org
refs/heads/android-5.1
chrome/common/extensions/docs/server2/test_data/object_level_availability/tabs.py
47
# 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 json from extensions_paths import CHROME_EXTENSIONS from test_file_system import MoveAllTo from test_util import ReadFile FAKE_TABS_IDL = '\n'.join(...
NcLang/vimrc
refs/heads/master
sources_non_forked/YouCompleteMe/third_party/ycmd/cpp/ycm/tests/gmock/scripts/upload.py
2511
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
wouwei/PiLapse
refs/heads/master
picam/picamEnv/Lib/site-packages/setuptools/command/bdist_rpm.py
1049
import distutils.command.bdist_rpm as orig class bdist_rpm(orig.bdist_rpm): """ Override the default bdist_rpm behavior to do the following: 1. Run egg_info to ensure the name and version are properly calculated. 2. Always run 'install' using --single-version-externally-managed to disable eggs...
pwong-mapr/private-hue
refs/heads/HUE-1096-abe
desktop/core/ext-py/Django-1.4.5/tests/regressiontests/dispatch/tests/test_saferef.py
40
from django.dispatch.saferef import safeRef from django.utils import unittest class Test1(object): def x(self): pass def test2(obj): pass class Test2(object): def __call__(self, obj): pass class SaferefTests(unittest.TestCase): def setUp(self): ts = [] ss = [] ...
voutilad/courtlistener
refs/heads/master
cl/corpus_importer/dup_finder.py
3
from collections import OrderedDict import string from cl.lib.solr_core_admin import get_term_frequency from django.conf import settings from cl.lib import sunburnt from cl.lib.string_diff import find_confidences, gen_diff_ratio, get_cosine_similarity import datetime import re DEBUG = True def build_date_range(date...
2014c2g2/2014c2
refs/heads/master
exts/w2/static/Brython2.0.0-20140209-164925/Lib/collections/__init__.py
49
#__all__ = ['deque', 'defaultdict', 'Counter'] from _collections import deque, defaultdict #from itertools import repeat as _repeat, chain as _chain, starmap as _starmap __all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList', 'UserString', 'Counter', 'OrderedDict'] # For bootstrapping re...
smessmer/cryfs
refs/heads/develop
vendor/googletest/gtest/googletest/test/gtest_testbridge_test.py
122
#!/usr/bin/env python # # Copyright 2018 Google LLC. 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...
Azure/azure-storage-python
refs/heads/master
samples/test_sample.py
1
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import uni...
pmarks-net/grpc
refs/heads/master
src/python/grpcio_tests/tests/unit/_cython/_channel_test.py
21
# Copyright 2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
rrampage/rethinkdb
refs/heads/next
test/old_regression/issue_133.py
22
#!/usr/bin/env python # Copyright 2010-2012 RethinkDB, all rights reserved. import os, sys, socket, random, time sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) from test_common import * def test_function(opts, port, test_dir): s = socket.socket(socket.AF_INET, ...
Jgarcia-IAS/SITE
refs/heads/master
addons/account/report/account_partner_balance.py
286
# -*- 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...
eleonrk/SickRage
refs/heads/master
lib/pgi/codegen/fieldgen.py
20
# Copyright 2013 Christoph Reiter # # This library 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 2.1 of the License, or (at your option) any later version. import traceback from .fi...
lfalcao/thumbor
refs/heads/master
vows/rotate_filter_vows.py
14
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/globocom/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com from pyvows import Vows, expect from thumbor.context import Context...
c0defreak/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/ctypes/test/test_unicode.py
65
import unittest import ctypes try: ctypes.c_wchar except AttributeError: pass else: import _ctypes_test class UnicodeTestCase(unittest.TestCase): def test_wcslen(self): dll = ctypes.CDLL(_ctypes_test.__file__) wcslen = dll.my_wcslen wcslen.argtypes = [ctypes...
gauravbose/digital-menu
refs/heads/master
digimenu2/django/db/backends/postgresql_psycopg2/base.py
55
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ import warnings from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import DEFAULT_DB_ALIAS from django.db.backends.base.base import BaseDatabaseWrapper from djan...
edx-solutions/edx-platform
refs/heads/master
openedx/__init__.py
208
""" This is the root package for Open edX. The intent is that all importable code from Open edX will eventually live here, including the code in the lms, cms, and common directories. Note: for now the code is not structured like this, and hence legacy code will continue to live in a number of different packages. All n...
firmlyjin/brython
refs/heads/master
www/tests/unittests/test/test_bufio.py
112
import unittest from test import support import io # C implementation. import _pyio as pyio # Python implementation. # Simple test to ensure that optimizations in the IO library deliver the # expected results. For best testing, run this under a debug-build Python too # (to exercise asserts in the C code). lengths =...
joergpatz/PokemonGo-Bot
refs/heads/master
tests/api_wrapper_test.py
21
import unittest from mock import MagicMock, patch from timeout_decorator import timeout, TimeoutError from tests import FakeApi from pgoapi import PGoApi from pgoapi.exceptions import NotLoggedInException, ServerBusyOrOfflineException, NoPlayerPositionSetException, EmptySubrequestChainException from pokemongo_bot.api...
Cuuuurzel/KiPyCalc
refs/heads/master
sympy/physics/optics/__init__.py
58
__all__ = [] # The following pattern is used below for importing sub-modules: # # 1. "from foo import *". This imports all the names from foo.__all__ into # this module. But, this does not put those names into the __all__ of # this module. This enables "from sympy.physics.optics import TWave" to # work. # 2....
jjingrong/PONUS-1.2
refs/heads/master
venv/Lib/site-packages/pip/_vendor/html5lib/trie/datrie.py
1301
from __future__ import absolute_import, division, unicode_literals from datrie import Trie as DATrie from pip._vendor.six import text_type from ._base import Trie as ABCTrie class Trie(ABCTrie): def __init__(self, data): chars = set() for key in data.keys(): if not isinstance(key, te...
IrdetoServices/threat-buster
refs/heads/master
landing/migrations/0004_auto_20170714_1150.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-14 11:50 from __future__ import unicode_literals import django.db.models.deletion import django.db.models.manager from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0008_alter_user_user...
thisisshi/cloud-custodian
refs/heads/master
tools/c7n_azure/tests_azure/test_resource_graph_source.py
2
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import json from datetime import timedelta from tests_azure.azure_common import BaseTest, arm_template from dateutil.parser import parse from c7n.exceptions import PolicyValidationError class ResourceGraphSource(BaseTest): def test_...
WriterOfAlicrow/servo
refs/heads/master
tests/wpt/css-tests/tools/pywebsocket/src/test/testdata/handlers/sub/wrong_handshake_sig_wsh.py
499
# 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 conditions and the f...
yukoba/sympy
refs/heads/master
sympy/physics/mechanics/functions.py
40
from __future__ import print_function, division from sympy.utilities import dict_merge from sympy.utilities.iterables import iterable from sympy.physics.vector import (Dyadic, Vector, ReferenceFrame, Point, dynamicsymbols) from sympy.physics.vector.printing import (vprint, vsprint, vp...
EmadMokhtar/Django
refs/heads/master
tests/admin_docs/test_utils.py
24
import unittest from django.contrib.admindocs.utils import ( docutils_is_available, parse_docstring, parse_rst, trim_docstring, ) from .tests import AdminDocsSimpleTestCase @unittest.skipUnless(docutils_is_available, "no docutils installed.") class TestUtils(AdminDocsSimpleTestCase): """ This __doc__ ou...
badbytes/pymeg
refs/heads/master
meg/lbex.py
1
'''lbex''' # concentration problem # ROI concentration = lfall_X248X3 * lf_ROIX248X3 # Entire concentration = lfall_X248X3 * lf_AllGridX248X3 rc = lf.leadfield rc = dot(lf.leadfield,lf.leadfield[newxyz-3:newxyz+3].T)
varunkamra/kuma
refs/heads/master
vendor/packages/pygments/lexers/ambient.py
72
# -*- coding: utf-8 -*- """ pygments.lexers.ambient ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for AmbientTalk language. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, words from pygment...
anselmobd/fo2
refs/heads/master
src/geral/migrations/0014_pop.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-03-12 21:25 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('geral', '0013_auto_20180123_1410'), ] operations = [ migrations.CreateModel...
marios-zindilis/musicbrainz-django-models
refs/heads/master
musicbrainz_django_models/tests/test_edit_place.py
1
from django.test import TestCase from ..models import edit_place class test_edit_place(TestCase): def setUp(self): self.subject = edit_place() def test__edit_place__instance(self): self.assertIsInstance(self.subject, edit_place) def test__edit_place__str(self): self.assertEqual(s...
taf3/testcases
refs/heads/master
general/test_switch_ons.py
1
""" @copyright Copyright (c) 2011 - 2016, Intel Corporation. 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 agr...
poojavade/Genomics_Docker
refs/heads/master
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/scipy/optimize/tests/test_tnc.py
110
""" Unit tests for TNC optimization routine from tnc.py """ from numpy.testing import (assert_allclose, assert_equal, TestCase, run_module_suite) from scipy import optimize import numpy as np from math import pow class TestTnc(TestCase): """TNC non-linear optimization. These test...
abhishek-ch/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/model_inheritance/models.py
49
""" XX. Model inheritance Model inheritance exists in two varieties: - abstract base classes which are a way of specifying common information inherited by the subclasses. They don't exist as a separate model. - non-abstract base classes (the default), which are models in their own right with ...
scith/htpc-manager_ynh
refs/heads/master
sources/libs/cherrypy/wsgiserver/ssl_builtin.py
56
"""A library for integrating Python's builtin ``ssl`` library with CherryPy. The ssl module must be importable for SSL functionality. To use this module, set ``CherryPyWSGIServer.ssl_adapter`` to an instance of ``BuiltinSSLAdapter``. """ try: import ssl except ImportError: ssl = None try: from _pyio imp...
savoirfairelinux/odoo
refs/heads/master
addons/report_webkit/company.py
431
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
sadjehwty/claws
refs/heads/master
tools/vcard2xml.py
4
#!/usr/bin/env python # -*- coding: latin-1 -*- """ Copyright © 2003 Bogdan Sumanariu <zarrok@yahoo.com> This file 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 ...
openhatch/oh-mainline
refs/heads/master
vendor/packages/twisted/doc/core/howto/listings/pb/cache_classes.py
18
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.spread import pb class MasterDuckPond(pb.Cacheable): def __init__(self, ducks): self.observers = [] self.ducks = ducks def count(self): print "I have [%d] ducks" % len(self.ducks...
mschuett/test_ansible_pr_24407
refs/heads/master
library/zabbix_host_pr_24407.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013-2014, Epic Games, Inc. # # 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 # (...
yugangzhang/GitTest
refs/heads/master
CMS_Profile/97-user.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # vi: ts=4 sw=4 ################################################################################ # Short-term settings (specific to a particular user/experiment) can # be placed in this file. You may instead wish to make a copy of this file in # the user's data directory, ...
eudaq/eudaq
refs/heads/master
legacy/producers/explorer/srs-software/slow_control/reset_FEC_ADC.py
13
#! /usr/bin/env python ## ## code testing of class SlowControl ## import SlowControl # slow control code sc = SlowControl.SlowControl(1) # send a reset pulse of 1 us to all parts of the application unit, # with a synchronous reset # # bit 0: complete synchronous reset # 1: send reset to all asynchronous reset lin...
Eseoghene/bite-project
refs/heads/master
deps/gdata-python-client/samples/apps/marketplace_sample/gdata/tlslite/utils/OpenSSL_RC4.py
359
"""OpenSSL/M2Crypto RC4 implementation.""" from cryptomath import * from RC4 import RC4 if m2cryptoLoaded: def new(key): return OpenSSL_RC4(key) class OpenSSL_RC4(RC4): def __init__(self, key): RC4.__init__(self, key, "openssl") self.rc4 = m2.rc4_new() m2...
fgimenez/kubernetes
refs/heads/master
hack/boilerplate/boilerplate_test.py
135
#!/usr/bin/env python # Copyright 2016 The Kubernetes 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 appli...
lumig242/Hue-Integration-with-CDAP
refs/heads/pull3
desktop/core/ext-py/cryptography-1.3.1/src/cryptography/exceptions.py
23
# 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 enum import Enum class _Reasons(Enum): BACKEND_MISSING_INTERFA...
wangjun/odoo
refs/heads/8.0
addons/hr_gamification/__init__.py
388
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
abramhindle/WebSocketsExamples
refs/heads/master
broadcaster.py
1
#!/usr/bin/env python # Copyright 2013 Abram Hindle # # 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...
ngokevin/three.js
refs/heads/master
utils/exporters/blender/addons/io_three/exporter/geometry.py
19
""" Module for creating Three.js geometry JSON nodes. """ import os from .. import constants, logger from . import base_classes, io, api FORMAT_VERSION = 3 class Geometry(base_classes.BaseNode): """Class that wraps a single mesh/geometry node.""" def __init__(self, node, parent=None): logger.debug(...
ridfrustum/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/django/utils/module_loading.py
222
import imp import os import sys def module_has_submodule(package, module_name): """See if 'module' is in 'package'.""" name = ".".join([package.__name__, module_name]) try: # None indicates a cached miss; see mark_miss() in Python/import.c. return sys.modules[name] is not None except K...
aviciimaxwell/odoo
refs/heads/8.0
addons/marketing_campaign/report/__init__.py
441
# -*- 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...
xebialabs-community/xld-install-helper
refs/heads/master
tests/artifacts/test_PluginsSelection.py
1
import unittest from xl_helper.artifacts.PluginsSelection import PluginsSelection from xl_helper.artifacts.Plugin import Plugin class PluginsSelectionTest(unittest.TestCase): was4_0 = Plugin("was-plugin-4.0.0.jar") was3_9 = Plugin("was-plugin-3.9.0.jar") wls4_0_snapshot = Plugin("wls-plugin-4.0.0-SNAPSH...
jmartinm/invenio-oauthclient
refs/heads/master
tests/__init__.py
423
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
lctseng/NCTU-SDN-Project
refs/heads/master
example/graphTopo.py
148
#!/usr/bin/python import urllib2 import json import sys def simple_json_get(url): return json.loads(urllib2.urlopen(url).read()) def shorten(s): return s.replace('net.floodlightcontroller','n.f' ).replace('com.bigswitch','c.b') def usage(s): sys.stderr.write("Usage:\ngrahTopo.py hostname ...
hackathon-3d/ice-cream-manwich-repo
refs/heads/master
server/src/BooksWithFriends/libs/django/contrib/sessions/backends/signed_cookies.py
94
try: import cPickle as pickle except ImportError: import pickle from django.conf import settings from django.core import signing from django.contrib.sessions.backends.base import SessionBase class PickleSerializer(object): """ Simple wrapper around pickle to be used in signing.dumps and signing....
MrSwiss/chrome-app-samples
refs/heads/master
samples/appengine-channelapi/appengine/chatactoe.py
73
#!/usr/bin/python2.4 # # Copyright 2010 Google Inc. All Rights Reserved. # pylint: disable-msg=C6310 """Channel Tic Tac Toe This module demonstrates the App Engine Channel API by implementing a simple tic-tac-toe game. """ import datetime import logging import os import random import re import uuid import sys from ...
MatthewWilkes/mw4068-packaging
refs/heads/master
src/melange/src/soc/modules/ghop/models/comment.py
1
#!/usr/bin/env python2.5 # # Copyright 2009 the Melange 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 applic...
muntasirsyed/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/db/models/sql/__init__.py
349
from query import * from subqueries import * from where import AND, OR from datastructures import EmptyResultSet __all__ = ['Query', 'AND', 'OR', 'EmptyResultSet']
lzjqsdd/lightos
refs/heads/master
src/esx/esx_vi_generator.py
14
#!/usr/bin/env python # # esx_vi_generator.py: generates most of the SOAP type mapping code # # Copyright (C) 2010-2012 Matthias Bolte <matthias.bolte@googlemail.com> # Copyright (C) 2013 Ata E Husain Bohra <ata.husain@hotmail.com> # # This library is free software; you can redistribute it and/or # modify it under the...
glenngillen/dotfiles
refs/heads/master
.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/lib/jedilsp/pydantic/tools.py
2
import json from functools import lru_cache from pathlib import Path from typing import Any, Callable, Optional, Type, TypeVar, Union from .parse import Protocol, load_file, load_str_bytes from .types import StrBytes from .typing import display_as_type __all__ = ('parse_file_as', 'parse_obj_as', 'parse_raw_as') Name...
Pteridium/openwrt-abandoned
refs/heads/master
target/linux/x86/image/mkimg_bifferboard.py
561
#!/usr/bin/env python """ Create firmware for 4/8MB Bifferboards, suitable for uploading using either bb_upload8.py or bb_eth_upload8.py """ import struct, sys # Increase the kmax value if the script gives errors about the kernel being # too large. You need to set the Biffboot kmax value to the same value yo...
devendra12/werkzeug-1
refs/heads/master
werkzeug/contrib/jsrouting.py
513
# -*- coding: utf-8 -*- """ werkzeug.contrib.jsrouting ~~~~~~~~~~~~~~~~~~~~~~~~~~ Addon module that allows to create a JavaScript function from a map that generates rules. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ ...
pgmillon/ansible
refs/heads/devel
test/units/module_utils/net_tools/nios/test_api.py
15
# (c) 2018 Red Hat, Inc. # 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 import sys import copy from units.compat import unittest from units.compat.mock import patch, MagicMock, Mock fro...
kingmotley/SickRage
refs/heads/master
lib/sqlalchemy/sql/util.py
78
# sql/util.py # Copyright (C) 2005-2014 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 """High level utilities which build upon other modules here. """ from .. import exc, uti...
mhrivnak/pulp
refs/heads/master
playpen/grinder/metadata/simple_yum_test.py
10
#!/usr/bin/env python import os import shlex import shutil import subprocess import sys import tempfile import time import yum sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)) + "/../../utils") from memory_usage import MemoryUsage TIME_FMT_STR = "%b%d_%Y__%l:%M%p" LOG = open("%s.simple_yum_test.output" ...
himanshu-setia/keystone
refs/heads/master
keystone/auth/plugins/token.py
14
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
ZachLiuGIS/django-allauth
refs/heads/master
allauth/__init__.py
28
""" _ ___ __ __ .___________. __ __ /\| |/\ / \ | | | | | || | | | \ ` ' / / ^ \ | | | | `---| |----`| |__| | |_ _| / /_\ \ | | | | | | | __ | / , . \ / _____ \ | `--' | | | | | | | \/|_|\//__/ \__\ \______/ |...
jm-begon/scikit-learn
refs/heads/master
sklearn/utils/tests/test_class_weight.py
140
import numpy as np from sklearn.linear_model import LogisticRegression from sklearn.datasets import make_blobs from sklearn.utils.class_weight import compute_class_weight from sklearn.utils.class_weight import compute_sample_weight from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testin...
volatilityfoundation/volatility
refs/heads/master
volatility/plugins/overlays/linux/elf.py
2
# Volatility # Copyright (C) 2007-2011 Volatile Systems # # 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. # # This progr...
dsp-jetpack/JetPack
refs/heads/master
src/tempest/tempest/cmd/db/mysql/delete_volume.py
1
#!/usr/bin/env python3 # Copyright (c) 2016-2021 Dell Inc. or its subsidiaries. # # 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 ...
potato/searx
refs/heads/master
tests/unit/engines/test_wolframalpha_api.py
3
# -*- coding: utf-8 -*- from collections import defaultdict import mock from requests import Request from searx.engines import wolframalpha_api from searx.testing import SearxTestCase class TestWolframAlphaAPIEngine(SearxTestCase): def test_request(self): query = 'test_query' dicto = defaultdict(...
bsipocz/bokeh
refs/heads/master
examples/plotting/file/histogram.py
43
# -*- coding: utf-8 -*- import numpy as np import scipy.special from bokeh.plotting import figure, show, output_file, vplot output_file('histogram.html') p1 = figure(title="Normal Distribution (μ=0, σ=0.5)",tools="save", background_fill="#E8DDCB") mu, sigma = 0, 0.5 measured = np.random.normal(mu, sigma, 1...
aduric/crossfit
refs/heads/master
nonrel/tests/regressiontests/generic_inline_admin/urls.py
103
from django.conf.urls.defaults import * from django.contrib import admin urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), )
zrs233/ursula
refs/heads/master
library/keystone_service.py
4
#!/usr/bin/python # -*- coding: utf-8 -*- DOCUMENTATION = ''' --- module: keystone_service short_description: Manage OpenStack Identity (keystone) service endpoints options: name: description: - name of service (e.g., keystone) required: yes type: description: - type of service (e.g., i...
pyramania/scipy
refs/heads/master
scipy/special/_spherical_bessel.py
45
from __future__ import division, print_function, absolute_import from ._ufuncs import (_spherical_jn, _spherical_yn, _spherical_in, _spherical_kn, _spherical_jn_d, _spherical_yn_d, _spherical_in_d, _spherical_kn_d) def spherical_jn(n, z, derivative=False): r"""Spherical...
NicoVarg99/daf-recipes
refs/heads/master
ckan/ckan/ckan/ckanext/datastore/logic/auth.py
1
# encoding: utf-8 import ckan.plugins as p def datastore_auth(context, data_dict, privilege='resource_update'): if not 'id' in data_dict: data_dict['id'] = data_dict.get('resource_id') user = context.get('user') authorized = p.toolkit.check_access(privilege, context, data_dict) if not auth...
RobinSikkens/Sticky-discord
refs/heads/master
stickord/alembic/versions/794b179f951b_create_koekjes.py
1
"""create koekjes Revision ID: 794b179f951b Revises: 2cf458912ec4 Create Date: 2017-10-11 10:58:59.398956 """ from datetime import datetime from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '794b179f951b' down_revision = '2cf458912ec4' branch_labels = None depends_o...
muravjov/fablib
refs/heads/master
src/bootstrap_cfg.py
1
#!/usr/bin/python # -*- coding: UTF-8 -*- import os cfg = None def init(hook_func=None): args = None global cfg if not cfg: import argparse parser = argparse.ArgumentParser() parser.add_argument( '-c', '--config', dest='config', type=str, ...
ayepezv/GAD_ERP
refs/heads/master
addons/gamification_sale_crm/__init__.py
2456
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details.
dkentw/robotframework
refs/heads/master
src/robot/running/arguments/embedded.py
19
# Copyright 2008-2015 Nokia Solutions and Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
trabacus-softapps/docker-kingswood
refs/heads/master
additional_addons/account_financial_report_webkit/wizard/general_ledger_wizard.py
7
# -*- encoding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi, Guewen Baconnier # Copyright Camptocamp SA 2011 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
Godin/coreclr
refs/heads/master
tests/scripts/exclusion.py
129
#!/usr/bin/env python # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. ## See the LICENSE file in the project root for more information. # ## # Title :exclusion.py # # Script to create a new list file from the old li...
liu602348184/django
refs/heads/master
django/db/backends/sqlite3/client.py
521
import subprocess from django.db.backends.base.client import BaseDatabaseClient class DatabaseClient(BaseDatabaseClient): executable_name = 'sqlite3' def runshell(self): args = [self.executable_name, self.connection.settings_dict['NAME']] subprocess.call(args)
Varriount/Colliberation
refs/heads/master
libs/construct/formats/executable/elf32.py
9
""" Executable and Linkable Format (ELF), 32 bit, big or little endian Used on *nix systems as a replacement of the older a.out format Big-endian support kindly submitted by Craig McQueen (mcqueen-c#edsrd1!yzk!co!jp) """ from construct import * import six def elf32_body(ElfInt16, ElfInt32): elf32_program_header ...
yograterol/django
refs/heads/master
django/core/mail/backends/__init__.py
1498
# Mail backends shipped with Django.