repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
crafty78/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_asg_facts.py
9
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
alfredodeza/boto
refs/heads/develop
tests/unit/machinelearning/test_machinelearning.py
91
# Copyright (c) 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
DeBortoliWines/Bika-LIMS
refs/heads/hotfix/next
bika/lims/upgrade/to3014.py
2
from Acquisition import aq_inner from Acquisition import aq_parent from bika.lims.permissions import * def upgrade(tool): portal = aq_parent(aq_inner(tool)) # missing /supplyorders folder permission clients = portal.clients.objectValues() for client in clients: mp = client.manage_permission ...
suqinhuang/virt-test
refs/heads/master
qemu/tests/qemu_io_blkdebug.py
1
import re, logging, ConfigParser from autotest.client.shared import error from virttest import qemu_io from virttest import utils_misc from virttest.qemu_storage import QemuImg from autotest.client import utils @error.context_aware def run_qemu_io_blkdebug(test, params, env): """ Run qemu-io blkdebug tests: ...
est31/godot
refs/heads/master
tools/export/blender25/godot_export_manager.py
13
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 program is distributed ...
savoirfairelinux/OpenUpgrade
refs/heads/master
addons/web_analytics/__openerp__.py
62
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
q6654282/p2pool
refs/heads/master
p2pool/util/memoize.py
281
import itertools class LRUDict(object): def __init__(self, n): self.n = n self.inner = {} self.counter = itertools.count() def get(self, key, default=None): if key in self.inner: x, value = self.inner[key] self.inner[key] = self.counter.next(), value ...
enitihas/SAC-Website
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/constants.py
3007
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mvaled/sentry
refs/heads/master
src/sentry/mediators/service_hooks/__init__.py
3
from __future__ import absolute_import from .creator import Creator # NOQA from .updater import Updater # NOQA from .destroyer import Destroyer # NOQA
team-items/MissionControl-Server
refs/heads/master
lib/MIDaCSerializer.py
1
import json #ENUM style class for easier comparison class MSGType(): ConnREQ = 1 ConnACK = 2 ConnREJ = 3 ConnLAO = 4 ConnSTT = 5 ConnB = 6 #exception thrown when a message is not midac serializeable class MIDaCSerializationException(Exception): def __init__(self, value): self.value = value def __s...
mrquim/mrquimrepo
refs/heads/master
repo/script.module.youtube.dl/lib/youtube_dl/__main__.py
90
#!/usr/bin/env python from __future__ import unicode_literals # Execute with # $ python youtube_dl/__main__.py (2.6+) # $ python -m youtube_dl (2.7+) import sys if __package__ is None and not hasattr(sys, 'frozen'): # direct call of __main__.py import os.path path = os.path.realpath(os.path.absp...
clsdaniel/iridium
refs/heads/master
scm/urls.py
1
# Copyright (c) 2009, Carlos Daniel Ruvalcaba Valenzuela # 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, # th...
nirmeshk/mase
refs/heads/master
python101/code/Time2_soln.py
14
""" Code example from Think Python, by Allen B. Downey. Available from http://thinkpython.com Copyright 2012 Allen B. Downey. Distributed under the GNU General Public License at gnu.org/licenses/gpl.html. """ class Time(object): """Represents the time of day. attributes: hour, minute, second """...
hbarghi/VirtualBattery1
refs/heads/master
src/virtual-net-device/bindings/callbacks_list.py
127
callback_classes = [ ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', ...
PegasusWang/pyhome
refs/heads/master
crawler/sougou_wechat/_env.py
10
#!/usr/bin/env python # -*- coding:utf-8 -*- import sys from os.path import abspath, dirname, join if sys.getdefaultencoding() != 'utf-8': reload(sys) sys.setdefaultencoding('utf-8') PREFIX = abspath(join(dirname(abspath(__file__)), '../')) PARENT = abspath(join(dirname(abspath(__file__)), '../../')) if ...
tayfun/django
refs/heads/master
tests/utils_tests/test_encoding.py
288
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import datetime import unittest from django.utils import six from django.utils.encoding import ( escape_uri_path, filepath_to_uri, force_bytes, force_text, iri_to_uri, smart_text, uri_to_iri, ) from django.utils.functional import SimpleLazyObje...
JeyZeta/Dangerous
refs/heads/master
Dangerous/TheHarvester/requests-2.9.1/requests/status_codes.py
202
# -*- coding: utf-8 -*- from .structures import LookupDict _codes = { # Informational. 100: ('continue',), 101: ('switching_protocols',), 102: ('processing',), 103: ('checkpoint',), 122: ('uri_too_long', 'request_uri_too_long'), 200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'...
scipy/scipy-svn
refs/heads/master
scipy/io/matlab/mio.py
4
"""Module for reading and writing MATLAB .mat files""" # Authors: Travis Oliphant, Matthew Brett """ Module for reading and writing matlab (TM) .mat files """ import os import sys import warnings from numpy.compat import asbytes from miobase import get_matfile_version, docfiller from mio4 import MatFile4Reader, Mat...
olgabrani/synnefo
refs/heads/feature-newui-pithos
snf-pithos-backend/pithos/__init__.py
70
# Copyright (C) 2010-2014 GRNET S.A. # # 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. # # This program is distributed i...
40423143/2017springcd_hw
refs/heads/gh-pages
plugin/liquid_tags/gram.py
271
""" Instagram Image Tag ------------------- By `Tom Spalding <https://github.com/digitalvapor>`_ You can see a working example at `antivapor.net/instagram-tag.html <http://antivapor.net/instagram-tag.html>`_. Based on `Liquid Image Tag <https://github.com/getpelican/pelican-plugins/blob/master/liquid_tags/img.py>`_ ...
163gal/Time-Line
refs/heads/master
libs64/wx/lib/fancytext.py
6
# 12/02/2003 - Jeff Grimmett ([email protected]) # # o Updated for 2.5 compatability. # """ FancyText -- methods for rendering XML specified text This module exports four main methods:: def GetExtent(str, dc=None, enclose=True) def GetFullExtent(str, dc=None, enclose=True) def RenderToBitmap(str, b...
GeyerA/android_external_chromium_org
refs/heads/master
tools/linux/dump-static-initializers.py
68
#!/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. """Dump functions called by static intializers in a Linux Release binary. Usage example: tools/linux/dump-static-intializers.py ...
shinate/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/watchlist/changedlinepattern.py
134
# Copyright (C) 2011 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 ...
benspaulding/django-faq
refs/heads/master
faq/models.py
1
# -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.contrib.sites.models import Site from django.template.defaultfilters import slugify from django.utils.translation import ugettext_lazy as _ from faq.settings import DRAFTED, PUBLISHED, REMOVED, STATUS_CHOICES # Manager...
brkrishna/freelance
refs/heads/master
linkedin/linkedin_soup.py
1
# -- coding: utf-8 -- #------------------------------------------------------------------------------- # Name: linkedin # Purpose: Parse linked in given a list of companies and write users to a csv file # # Author: Ramakrishna # # Created: 21/Jan/2016 # Copyright: (c) Ramakrishna 2016 # Licen...
cloudsigma/cloud-init
refs/heads/master
tests/unittests/test_distros/test_sysconfig.py
8
from mocker import MockerTestCase import re from cloudinit.distros.parsers.sys_conf import SysConf # Lots of good examples @ # http://content.hccfl.edu/pollock/AUnix1/SysconfigFilesDesc.txt class TestSysConfHelper(MockerTestCase): # This function was added in 2.7, make it work for 2.6 def assertRegMatches(...
cloudbase/nova
refs/heads/master
nova/i18n.py
86
# Copyright 2014 IBM Corp. # # 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, s...
barbarubra/Don-t-know-What-i-m-doing.
refs/heads/master
python/src/Lib/distutils/command/install_headers.py
53
"""distutils.command.install_headers Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id: install_headers.py 61000 2008-02-23 17:40:11Z christian.heimes $" from distutils.co...
demarle/VTK
refs/heads/master
Filters/General/Testing/Python/WarpToImage.py
20
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # create a rendering window renWin = vtk.vtkRenderWindow() renWin.SetMultiSamples(0) renWin.SetSize(200,200) wavelet = vtk.vtkRTAnalyticSource() wavelet.SetWholeExtent(-100,100,-100,1...
zstyblik/infernal-twin
refs/heads/master
build/pip/build/lib.linux-i686-2.7/pip/_vendor/html5lib/treeadapters/sax.py
1835
from __future__ import absolute_import, division, unicode_literals from xml.sax.xmlreader import AttributesNSImpl from ..constants import adjustForeignAttributes, unadjustForeignAttributes prefix_mapping = {} for prefix, localName, namespace in adjustForeignAttributes.values(): if prefix is not None: pre...
lycancoin/lycancoin-release
refs/heads/master
contrib/bitrpc/bitrpc.py
2
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") else: access = Ser...
hackersql/sq1map
refs/heads/master
Web/信息收集/pentest_tools/漏洞利用/web漏洞/lfi/lfi_tmp.py
1
#!/usr/bin/env python # encoding=utf-8 # Author : idwar # http://secer.org ''' 可能需要你改的几个地方: 1、host 2、port 3、request中的phpinfo页面名字及路径 4、hello_lfi() 函数中的url,即存在lfi的页面和参数 5、如果不成功或报错,尝试增加padding长度到7000、8000试试 6、某些开了magic_quotes_gpc或者其他东西不能%00的,自行想办法截断并在(4)的位置对应修改 Good Luck :) 7、payload的./指的是当前脚本的目录下,所以要注意最后输出的结果 ''' i...
anisyonk/pilot
refs/heads/master
saga/adaptors/globus_online/go_file.py
4
__author__ = "Andre Merzky, Ole Weidner, Alexander Grill" __copyright__ = "Copyright 2012-2013, The SAGA Project" __license__ = "MIT" """ shell based file adaptor implementation """ import radical.utils as ru import saga.utils.pty_shell as sups import saga.utils.misc as sumisc import saga.adaptors...
4pr0n/rip
refs/heads/master
sites/site_instagram.py
1
#!/usr/bin/python from basesite import basesite from json import loads from time import sleep from os import path """ Downloads instagram albums """ class instagram(basesite): """ Retrieves API key from local file """ def get_api_key(self): api_path = path.join(path.dirname(__file__), 'instagram_api.key') ...
abhikumar22/MYBLOG
refs/heads/master
blg/Lib/site-packages/pip/_vendor/packaging/version.py
1151
# 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 collections import itertools import re from ._structures import In...
ilya-epifanov/ansible-modules-core
refs/heads/devel
network/basics/slurp.py
134
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <[email protected]> # # 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...
rooshilp/CMPUT410Lab6
refs/heads/master
virt_env/virt1/lib/python2.7/site-packages/django/contrib/sessions/exceptions.py
931
from django.core.exceptions import SuspiciousOperation class InvalidSessionKey(SuspiciousOperation): """Invalid characters in session key""" pass class SuspiciousSession(SuspiciousOperation): """The session may be tampered with""" pass
ptrendx/mxnet
refs/heads/master
ci/build_windows.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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 Licen...
liuzzfnst/tp-libvirt
refs/heads/master
libvirt/tests/src/virsh_cmd/domain/virsh_sendkey.py
3
import logging import time from autotest.client.shared import error from virttest import virsh from provider import libvirt_version def run(test, params, env): """ Test send-key command, include all types of codeset and sysrq For normal sendkey test, we create a file to check the command execute by s...
dhongu/l10n-romania
refs/heads/11.0
currency_rate_update/services/update_service_PL_NBP.py
1
# -*- coding: utf-8 -*- # © 2009 Camptocamp # © 2009 Grzegorz Grzelak # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from .currency_getter_interface import CurrencyGetterInterface from datetime import datetime from odoo.tools import DEFAULT_SERVER_DATE_FORMAT import logging _logger = logging.getLogg...
youprofit/NewsBlur
refs/heads/master
apps/recommendations/tests.py
1940
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ ...
fogcitymarathoner/djfb
refs/heads/master
facebook_example/member/tests.py
1940
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ ...
NSLS-II-HXN/PyXRF
refs/heads/master
pyxrf/api.py
2
# Use this file if you are importing into an interactive IPython session. # Use 'pyxrf.api_dev' if you are importing PyXRF API into a custom script. from .api_dev import * # noqa: F401, F403 def pyxrf_api(): r""" ======================================================================================= Mo...
pombredanne/python-engineio
refs/heads/master
tests/test_socket.py
2
import time import unittest import six if six.PY3: from unittest import mock else: import mock from engineio import packet from engineio import payload from engineio import socket class TestSocket(unittest.TestCase): def _get_mock_server(self): mock_server = mock.Mock() mock_server.ping_...
kirca/OpenUpgrade
refs/heads/8.0
addons/crm_partner_assign/crm_lead.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...
Kussie/HTPC-Manager
refs/heads/master2
libs/pyasn1/codec/ber/eoo.py
407
from pyasn1.type import base, tag class EndOfOctets(base.AbstractSimpleAsn1Item): defaultValue = 0 tagSet = tag.initTagSet( tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 0x00) ) endOfOctets = EndOfOctets()
pombredanne/django-hosts
refs/heads/master
django_hosts/tests/hosts/appended.py
4
from django_hosts import patterns, host from django_hosts.tests.hosts.simple import host_patterns host_patterns += patterns('', host(r'special', 'django_hosts.tests.urls.simple', name='special'), )
ststaynov/fishGame
refs/heads/master
chat/tests/test_consumers.py
9
import json import pytest from asgiref.inmemory import ChannelLayer as InMemoryChannelLayer from channels import Group from channels.handler import AsgiRequest from channels.message import Message from django.contrib.sessions.backends.file import SessionStore as FileSessionStore from chat.consumers import ws_connect,...
rmmariano/ProjScriptsTekton
refs/heads/master
backend/appengine/routes/meuperfil/home.py
2
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from config.template_middleware import TemplateResponse from gaecookie.decorator import no_csrf from gaepermission.decorator import login_not_required __author__ = 'Rodrigo' @login_not_required @no_csrf def index(): return TemplateR...
pcm17/tensorflow
refs/heads/master
tensorflow/contrib/framework/python/framework/checkpoint_utils_test.py
23
# 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...
asiersarasua/QGIS
refs/heads/master
python/plugins/processing/gui/__init__.py
17
# -*- coding: utf-8 -*- """ *************************************************************************** __init__.py --------------------- Date : August 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com ******************************...
xodus7/tensorflow
refs/heads/master
tensorflow/contrib/distribute/python/estimator_training_test.py
6
# 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...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/raw/GL/ATI/fragment_shader.py
9
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _...
devananda/python-redfish
refs/heads/master
examples/__init__.py
2
__author__ = 'deva'
vrjuggler/maestro
refs/heads/master
maestro/daemon/plugins/services/launch/which.py
2
#!/usr/bin/env python # Copyright (c) 2002-2005 ActiveState Corp. # See LICENSE-which.txt for license details. # Author: # Trent Mick ([email protected]) # Home: # http://trentm.com/projects/which/ r"""Find the full path to commands. which(command, path=None, verbose=0, exts=None) Return the full path to...
gurbuzali/hazelcast-jet
refs/heads/master
extensions/python/src/main/resources/jet_to_python_pb2_grpc.py
10
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc import jet_to_python_pb2 as jet__to__python__pb2 class JetToPythonStub(object): # missing associated documentation comment in .proto file pass def __init__(self, channel): """Constructor. Args: channel: A grpc.Cha...
JPJPJPOPOP/zulip
refs/heads/master
zerver/webhooks/crashlytics/tests.py
31
# -*- coding: utf-8 -*- from zerver.lib.test_classes import WebhookTestCase class CrashlyticsHookTests(WebhookTestCase): STREAM_NAME = 'crashlytics' URL_TEMPLATE = u"/api/v1/external/crashlytics?stream={stream}&api_key={api_key}" FIXTURE_DIR_NAME = 'crashlytics' def test_crashlytics_verification_messa...
joostvdg/jenkins-job-builder
refs/heads/master
jenkins_jobs/modules/publishers.py
1
# Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright 2012 Varnish Software AS # Copyright 2013-2014 Antoine "hashar" Musso # Copyright 2013-2014 Wikimedia Foundation Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licen...
mwmuni/LIGGGHTS_GUI
refs/heads/master
OpenGL/raw/GLX/EXT/framebuffer_sRGB.py
8
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLX import _types as _cs # End users want this... from OpenGL.raw.GLX._types import * from OpenGL.raw.GLX import _errors from OpenGL.constant import Constant as _C import ctype...
sharkykh/SickRage
refs/heads/develop
lib/github/InputGitAuthor.py
10
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <[email protected]> # # Copyright 2012 Zearin <[email protected]> ...
henryfjordan/django
refs/heads/master
tests/template_backends/apps/good/templatetags/good_tags.py
1426
from django.template import Library register = Library()
zhmocean/mongo-web-shell
refs/heads/master
run_tests.py
4
# Copyright 2013 10gen 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 agreed to...
chrber/dcache-docker
refs/heads/master
dcache/deps/.vim/bundle/jedi-vim/jedi_vim.py
5
""" The Python parts of the Jedi library for VIM. It is mostly about communicating with VIM. """ import traceback # for exception output import re import os import sys from shlex import split as shsplit try: from itertools import zip_longest except ImportError: from itertools import izip_longest as zip_longes...
GrahamDigital/django-scheduler
refs/heads/gd/master
schedule/models/__init__.py
10
from schedule.models.calendars import Calendar, CalendarRelation from schedule.models.events import * from schedule.models.rules import * from schedule.signals import *
peitur/docker-util
refs/heads/master
lib/Controller/config.py
1
import sys,os, json, re from pprint import pprint import util ## make it into a singleton, only want one single store for all instanciations of config class SingInstance( object ): __shared = {} def __init__( self ): self.__dict__ = self.__shared class ConfigContent( SingInstance ): ...
googleapis/googleapis-gen
refs/heads/master
google/cloud/oslogin/v1beta/oslogin-v1beta-py/google/cloud/oslogin_v1beta/services/os_login_service/client.py
1
# -*- 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 required by applicable law or...
satishgoda/pipe2py
refs/heads/master
tests/pypipelines/pipe_404411a8d22104920f3fc1f428f33642.py
6
# Pipe pipe_404411a8d22104920f3fc1f428f33642 generated by pipe2py from pipe2py import Context from pipe2py.modules.pipeforever import pipe_forever from pipe2py.modules.pipefetch import pipe_fetch from pipe2py.modules.pipefetch import pipe_fetch from pipe2py.modules.pipecount import pipe_count from pipe2py.modules.pipe...
rdo-management/neutron
refs/heads/mgt-master
neutron/plugins/openvswitch/agent/ovs_dvr_neutron_agent.py
2
# Copyright 2014, 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 # # http://www.apache.org/licenses/LICENSE-...
n-west/gnuradio
refs/heads/maint
grc/gui/Config.py
18
""" Copyright 2016 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 ...
tdfischer/lets-encrypt-preview
refs/heads/master
acme/acme/other.py
14
"""Other ACME objects.""" import functools import logging import os from acme import jose logger = logging.getLogger(__name__) class Signature(jose.JSONObjectWithFields): """ACME signature. :ivar .JWASignature alg: Signature algorithm. :ivar bytes sig: Signature. :ivar bytes nonce: Nonce. :iva...
fillycheezstake/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/distutils/tests/f2py_ext/setup.py
51
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('f2py_ext',parent_package,top_path) config.add_extension('fib2', ['src/fib2.pyf'...
newmediamedicine/indivo_server_1_0
refs/heads/master
indivo/tests/data/reports/__init__.py
4
from allergy import TEST_ALLERGIES, TEST_ALLERGIES_INVALID from equipment import TEST_EQUIPMENT from immunization import TEST_IMMUNIZATIONS from lab import TEST_LABS from measurement import TEST_MEASUREMENTS from medication import TEST_MEDICATIONS from problem import TEST_PROBLEMS from procedure import TEST_PROCEDURES ...
beernarrd/gramps
refs/heads/sl-master
gramps/gui/basesidebar.py
10
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Nick Hall # # 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) ...
zubron/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/html5lib/html5lib/treewalkers/genshistream.py
1730
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT from . import _base from ..constants import voidElements, namespaces class ...
underloki/Cyprium
refs/heads/master
app/cli/root/crypto/text/triliteral.py
1
#! /usr/bin/python3 ######################################################################## # # # Cyprium is a multifunction cryptographic, steganographic and # # cryptanalysis tool developped by members of The Hackademy. # # Fre...
ZhaoCJ/django
refs/heads/master
django/contrib/gis/gdal/datasource.py
219
""" DataSource is a wrapper for the OGR Data Source object, which provides an interface for reading vector geometry data from many different file formats (including ESRI shapefiles). When instantiating a DataSource object, use the filename of a GDAL-supported data source. For example, a SHP file or a TIGER/Line...
loftywaif002/django-tastypie
refs/heads/master
tests/core/tests/serializers.py
20
# -*- coding: utf-8 -*- import datetime import yaml from decimal import Decimal from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from tastypie.bundle import Bundle from tastypie import fields from tastypie.exceptions import BadRequest from tastypi...
utkbansal/kuma
refs/heads/master
vendor/packages/pyflakes/test/test_return_with_arguments_inside_generator.py
53
from sys import version_info from pyflakes import messages as m from pyflakes.test.harness import TestCase, skipIf class Test(TestCase): @skipIf(version_info >= (3, 3), 'new in Python 3.3') def test_return(self): self.flakes(''' class a: def b(): for x in a.c: ...
themiken/mtasa-blue
refs/heads/master
vendor/google-breakpad/src/tools/gyp/test/mac/gyptest-framework-headers.py
344
#!/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. """ Verifies that mac_framework_headers works properly. """ import TestGyp import sys if sys.platform == 'darwin': # TODO(thakis): Make...
EazzyLab/blog-scraper
refs/heads/master
Scraper/sync_http.py
1
import requests def get_request(url, headers=None, proxy=None): r = requests.get(url, headers=headers, proxies=proxy) return r
ChameleonCloud/horizon
refs/heads/chameleoncloud/train
openstack_dashboard/test/unit/api/rest/test_config.py
3
# Copyright 2015 IBM Corp. # # 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, sof...
pmisik/buildbot
refs/heads/master
master/buildbot/test/util/connector_component.py
5
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
tectronics/arsenalsuite
refs/heads/master
cpp/apps/freezer/build.py
7
from blur.build import * import os, sys path = os.path.dirname(os.path.abspath(__file__)) rev_path = os.path.join(path,'../..') instPrefix = "" destDir = "" if "DESTDIR" in os.environ: destDir = os.environ["DESTDIR"] elif sys.platform=='win32': destDir = "c:/" if sys.platform=="linux2": instPrefix = dest...
xfournet/intellij-community
refs/heads/master
python/testData/intentions/PyAnnotateVariableTypeIntentionTest/notSuggestedForComprehensionTarget.py
19
[v<caret>ar for var in range(10)]
kool79/intellij-community
refs/heads/master
python/testData/inspections/PyTypeCheckerInspection/StringStartsWith.py
49
'foo'.startswith('bar') 'foo'.startswith(('bar', 'baz')) 'foo'.startswith(<warning descr="Expected type 'Union[str, unicode, tuple]', got 'int' instead">2</warning>) u'foo'.startswith(u'bar') u'foo'.startswith((u'bar', u'baz')) u'foo'.startswith(<warning descr="Expected type 'Union[str, unicode, tuple]', got 'int' ins...
elkingtonmcb/rethinkdb
refs/heads/next
scripts/VirtuaBuild/vm_build.py
46
# Copyright 2010-2012 RethinkDB, all rights reserved. import os import socket import time import socket # pythonic discriminated union I guess, this is kind of retarded. # actually 0 need for a base class it's really more like a comment # that happens to be runable code class RunError(Exception): def __init__(se...
SKIRT/PTS
refs/heads/master
magic/sources/extended.py
1
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
lushfuture/Liveduino
refs/heads/master
libraries/stc-1.2.9/Selected_Track_Control/ParamSetter.py
1
import Live import MIDI import settings from Logging import log # general device parameter setter def general_device(song, device, param, value, mode, status): param_range = param.max - param.min #log("set %s (%s): %s - %s" % (param.name, param.value, param.min, param.max)) if param.is_quantized: if status...
dparks1134/STAMP
refs/heads/master
stamp/GUI/plotDlg.py
1
#======================================================================= # Author: Donovan Parks # # Dock widget containing customizable group legend. # # Copyright 2011 Donovan Parks # # This file is part of STAMP. # # STAMP is free software: you can redistribute it and/or modify # it under the terms of the GNU Genera...
lmorchard/badg.us
refs/heads/master
settings_test.py
65
# These settings will always be overriding for all test runs # this bypasses bcrypt to speed up test fixtures PASSWORD_HASHERS = ( 'django.contrib.auth.hashers.MD5PasswordHasher', )
yb-kim/gemV
refs/heads/gemV
src/arch/x86/isa/insts/simd64/integer/arithmetic/addition.py
91
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
jmarsik/mopidy
refs/heads/develop
tests/mpd/test_commands.py
17
# encoding: utf-8 from __future__ import absolute_import, unicode_literals import unittest from mopidy.mpd import exceptions, protocol class TestConverts(unittest.TestCase): def test_integer(self): self.assertEqual(123, protocol.INT('123')) self.assertEqual(-123, protocol.INT('-123')) ...
optima-ict/odoo
refs/heads/9.0
addons/l10n_vn/__openerp__.py
17
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # This module is Copyright (c) 2009-2013 General Solutions (http://gscom.vn) All Rights Reserved. { "name" : "Vietnam - Accounting", "version" : "1.0", "author" : "General Solutions", 'website': 'http://...
kerr-huang/Testerman
refs/heads/master
core/snmp/pysnmp/proto/secmod/rfc3414/auth/noauth.py
2
from pysnmp.proto.secmod.rfc3414.auth import base class NoAuth(base.AbstractAuthenticationService): serviceID = (1, 3, 6, 1, 6, 3, 10, 1, 1, 1) # usmNoAuthProtocol
peterakdemir/python_sandbox
refs/heads/master
GPA_Calculator.py
1
#The GPA calculator print("GPA Calculator\n\n") #for this code we are going to make it easy for someone to calculate their GPA and average for their marking period. we assumed that the #for all the variables that start with g we are asking for average grade in that class for that marking period g1 = float(input("Grad...
tensorflow/probability
refs/heads/main
tensorflow_probability/python/version.py
1
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Lyleo/nupic
refs/heads/master
nupic/regions/ImageSensorExplorers/Jiggle.py
8
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
ltilve/ChromiumGStreamerBackend
refs/heads/master
third_party/markdown/__main__.py
109
# markdown is released under the BSD license # Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) # Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) # Copyright 2004 Manfred Stienstra (the original version) # # All rights reserved. # # Redistribution and use in source and binary forms, with or...
watchdogpolska/bliski_publikator
refs/heads/master
bliski_publikator/users/migrations/0002_auto_20160414_0903.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-14 09:03 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migr...
adamginsburg/frontend
refs/heads/master
ingest_datasets_better.py
3
import numpy as np from astropy import table from astropy.table import Table,Column from astropy import units as u import re import string unit_mapping = {'SurfaceDensity':u.M_sun/u.pc**2, 'VelocityDispersion':u.km/u.s, 'Radius':u.pc} def fix_logical(t): """ Convert a boolean c...