repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
nitzmahone/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_healthcheck.py
48
#!/usr/bin/python # Copyright 2017 Google 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
adamtiger/tensorflow
refs/heads/master
tensorflow/python/estimator/canned/dnn_test.py
31
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
lubegamark/senkumba
refs/heads/master
loans/migrations/0003_auto_20160721_1556.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-07-21 12:56 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('loans', '0002_auto_20160721_1546'), ] operations = [ migrations.RenameField(...
JayVora-SerpentCS/e-commerce
refs/heads/9.0
website_sale_require_login/__openerp__.py
1
# -*- coding: utf-8 -*- # © 2015 Antiun Ingeniería, S.L. - Jairo Llopis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Require login to checkout", "summary": "Force users to login for buying", "version": "9.0.1.0.0", "category": "Website", "website": "http://www.anti...
munyirik/python
refs/heads/develop
cpython/Lib/unittest/test/testmock/testpatch.py
8
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ import os import sys import unittest from unittest.test.testmock import support from unittest.test.testmock.support import SomeClass, is_instance from unittest.mock import...
bartsidee/bartsidee-boxee
refs/heads/master
sources/tv/external/workerpool/exceptions.py
8
# exceptions.py - Exceptions used in the operation of a worker pool # Copyright (c) 2008 Andrey Petrov # # This module is part of workerpool and is released under # the MIT license: http://www.opensource.org/licenses/mit-license.php class TerminationNotice(Exception): "This exception is raised inside a thread whe...
mattvick/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/lru_cache.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 ...
Awesomeomics/webserver
refs/heads/master
env/lib/python2.7/site-packages/setuptools/tests/test_build_ext.py
166
"""build_ext tests """ import unittest from distutils.command.build_ext import build_ext as distutils_build_ext from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExtTest(unittest.TestCase): def test_get_ext_filename(self): # setuptools needs to give...
miptliot/edx-platform
refs/heads/ginkgo_openedu_docker
cms/djangoapps/contentstore/push_notification.py
8
""" Helper methods for push notifications from Studio. """ from logging import exception as log_exception from uuid import uuid4 from django.conf import settings from contentstore.models import PushNotificationConfig from contentstore.tasks import push_course_update_task from parse_rest.connection import register fr...
luchesar/emibg
refs/heads/master
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
896
# Copyright (c) 2013 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. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
gkoelln/youtube-dl
refs/heads/master
youtube_dl/extractor/rtlnl.py
10
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, parse_duration, ) class RtlNlIE(InfoExtractor): IE_NAME = 'rtl.nl' IE_DESC = 'rtl.nl and rtlxl.nl' _VALID_URL = r'''(?x) https?://(?:(?:www|static)\.)? (?: ...
izzyalonso/tndata_backend
refs/heads/master
tndata_backend/officehours/admin.py
2
from django.contrib import admin from . import models @admin.register(models.OfficeHours) class OfficeHoursAdmin(admin.ModelAdmin): list_display = ( 'email', 'full_name', '__str__', 'expires_on', 'created_on' ) search_fields = ('user__email', 'user__first_name', 'user__last_name') raw...
djenniex/CouchPotatoServer
refs/heads/master
couchpotato/core/media/movie/providers/automation/trakt/__init__.py
35
from .main import Trakt def autoload(): return Trakt() config = [{ 'name': 'trakt', 'groups': [ { 'tab': 'automation', 'list': 'watchlist_providers', 'name': 'trakt_automation', 'label': 'Trakt', 'description': 'Import movies from your ...
IIIIIHIIIII/metamarket
refs/heads/master
setup.py
2
# Copyright (C) 2015 Marc D. Wood # # This file is part of the METAMARKET project. # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of METAMARKET, including this file, may be copied, modified, # propagated, or distributed except according to...
incaser/odoo-odoo
refs/heads/8.0
addons/calendar/calendar.py
81
# -*- coding: utf-8 -*- import pytz import re import time import openerp import openerp.service.report import uuid import collections import babel.dates from werkzeug.exceptions import BadRequest from datetime import datetime, timedelta from dateutil import parser from dateutil import rrule from dateutil.relativedelta...
pbrod/scipy
refs/heads/master
benchmarks/benchmarks/signal_filtering.py
40
from __future__ import division, absolute_import, print_function import numpy as np try: from scipy.signal import lfilter, firwin, decimate except ImportError: pass from .common import Benchmark class Decimate(Benchmark): param_names = ['q', 'ftype', 'zero_phase'] params = [ [2, 10, 30], ...
vipul-sharma20/oh-mainline
refs/heads/master
vendor/packages/gdata/src/gdata/tlslite/utils/Python_RSAKey.py
239
"""Pure-Python RSA implementation.""" from cryptomath import * import xmltools from ASN1Parser import ASN1Parser from RSAKey import * class Python_RSAKey(RSAKey): def __init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0): if (n and not e) or (e and not n): raise AssertionError() ...
botswana-harvard/dmis-models
refs/heads/master
manage.py
1
#!/usr/bin/env python3 import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dmis_models.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
mffrench/fabric
refs/heads/v1.0.0-alpha2-elixir
test/feature/steps/endorser_impl.py
1
# Copyright IBM Corp. 2016 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 ag...
caramucho/ns3-ndnsim
refs/heads/mybranch
src/propagation/bindings/modulegen__gcc_ILP32.py
24
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
odin1314/security_monkey
refs/heads/master
security_monkey/monitors.py
7
""" .. module: security_monkey.monitors :platform: Unix :synopsis: Monitors are a grouping of a watcher and it's associated auditor .. version:: $$VERSION$$ .. moduleauthor:: Patrick Kelley <pkelley@netflix.com> @monkeysecurity """ from security_monkey.watchers.iam.iam_role import IAMRole from security_monkey...
ubc/edx-platform
refs/heads/release
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
73
""" Tests for the various pieces of the CombinedOpenEndedGrading system OpenEndedChild OpenEndedModule """ import json import logging import unittest from datetime import datetime from lxml import etree from lxml.html import fragment_fromstring from mock import Mock, MagicMock, patch from pytz import UTC from webob...
jose36/jmdl5
refs/heads/master
servers/vidxden.py
35
# -*- coding: iso-8859-1 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para vidxden # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core ...
synicalsyntax/zulip
refs/heads/master
zerver/tests/test_settings.py
2
import time from typing import Any, Dict from unittest import mock import ujson from django.http import HttpResponse from django.test import override_settings from zerver.lib.initial_password import initial_password from zerver.lib.rate_limiter import add_ratelimit_rule, remove_ratelimit_rule from zerver.lib.test_cla...
Metaswitch/horizon
refs/heads/master
openstack_dashboard/dashboards/project/firewalls/views.py
29
# Copyright 2013, Big Switch Networks, 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 applic...
frewsxcv/keyczar
refs/heads/master
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Tool/zip.py
19
"""SCons.Tool.zip Tool-specific initialization for zip. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # Permiss...
gsanchez1117/test2
refs/heads/gabby-branch
lib/flask/testsuite/test_apps/main_app.py
614
import flask # Test Flask initialization with main module. app = flask.Flask('__main__')
Chicknstwe/Text-encryption
refs/heads/master
encryption v0.2.py
1
""" MIT License Copyright (c) 2017 Demetrio Carmona Derqui 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 to use, copy, modif...
HarryRybacki/osf.io
refs/heads/develop
website/addons/dropbox/settings/defaults.py
75
# OAuth app keys DROPBOX_KEY = None DROPBOX_SECRET = None DROPBOX_AUTH_CSRF_TOKEN = 'dropbox-auth-csrf-token'
mayankcu/Django-social
refs/heads/master
venv/Lib/site-packages/django/test/utils.py
37
from __future__ import with_statement import warnings from django.conf import settings, UserSettingsHolder from django.core import mail from django.test.signals import template_rendered, setting_changed from django.template import Template, loader, TemplateDoesNotExist from django.template.loaders import cached from d...
GregorCH/ipet
refs/heads/master
ipet/concepts/Observer.py
1
""" The MIT License (MIT) Copyright (c) 2018 Zuse Institute Berlin, www.zib.de Permissions are granted as stated in the license file you have obtained with this software. If you find the library useful for your purpose, please refer to README.md for how to cite IPET. @author: Gregor Hendel """ class Obser...
naziris/HomeSecPi
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/html5lib/__init__.py
196
""" HTML parsing library based on the WHATWG "HTML5" specification. The parser is designed to be compatible with existing HTML found in the wild and implements well-defined error recovery that is largely compatible with modern desktop web browsers. Example usage: import html5lib f = open("my_document.html") tree = ht...
pentestfail/TA-FireEye_TAP
refs/heads/master
bin/ta_fireeye_tap/requests/packages/chardet/sbcharsetprober.py
2926
######################## 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...
shastikk/youtube-dl
refs/heads/master
youtube_dl/extractor/krasview.py
85
# encoding: utf-8 from __future__ import unicode_literals import json from .common import InfoExtractor from ..utils import ( int_or_none, js_to_json, ) class KrasViewIE(InfoExtractor): IE_DESC = 'Красвью' _VALID_URL = r'https?://krasview\.ru/(?:video|embed)/(?P<id>\d+)' _TEST = { 'url'...
dlazz/ansible
refs/heads/devel
lib/ansible/modules/network/panos/panos_sag.py
18
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
kressi/erpnext
refs/heads/develop
erpnext/schools/doctype/fee_category/test_fee_category.py
54
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest # test_records = frappe.get_test_records('Fee Category') class TestFeeCategory(unittest.TestCase): pass
takeshineshiro/django
refs/heads/master
tests/migrations/test_migrations_squashed_complex/3_squashed_5.py
770
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): replaces = [ ("migrations", "3_auto"), ("migrations", "4_auto"), ("migrations", "5_auto"), ] dependencies = [("migrations", "2_auto")] ope...
yangming85/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/regressiontests/special_headers/models.py
103
from django.db import models class Article(models.Model): text = models.TextField()
hvnsweeting/Diamond
refs/heads/master
src/collectors/slabinfo/slabinfo.py
54
# coding=utf-8 """ The SlabInfoCollector collects metrics on process stats from /proc/slabinfo #### Dependencies * /proc/slabinfo """ import platform import os import diamond.collector # Detect the architecture of the system # and set the counters for MAX_VALUES # appropriately. Otherwise, rolling over # counter...
sambyers/o365_fmc
refs/heads/master
.venv/lib/python3.6/site-packages/setuptools/namespaces.py
196
import os from distutils import log import itertools from setuptools.extern.six.moves import map flatten = itertools.chain.from_iterable class Installer: nspkg_ext = '-nspkg.pth' def install_namespaces(self): nsp = self._get_all_ns_packages() if not nsp: return filenam...
runekaagaard/django-contrib-locking
refs/heads/master
django/contrib/gis/management/commands/ogrinspect.py
111
import argparse import inspect from django.contrib.gis import gdal from django.core.management.base import BaseCommand, CommandError class LayerOptionAction(argparse.Action): """ Custom argparse action for the `ogrinspect` `layer_key` keyword option which may be an integer or a string. """ def __...
40223102/w110519
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/locale.py
624
def getdefaultlocale(): return __BRYTHON__.language,None def localeconv(): """ localeconv() -> dict. Returns numeric and monetary locale-specific parameters. """ # 'C' locale default values return {'grouping': [127], 'currency_symbol': '', ...
webu/django-cms
refs/heads/develop
cms/management/commands/subcommands/base.py
48
# -*- coding: utf-8 -*- import sys from django.core.management.base import BaseCommand, CommandError class SubcommandsCommand(BaseCommand): subcommands = {} command_name = '' def __init__(self): super(SubcommandsCommand, self).__init__() for name, subcommand in self.subcommands.items(): ...
rafaelwerneck/kuaa
refs/heads/master
descriptors/bic/plugin_bic.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################### # This file is part of Kuaa. # # Kuaa is a framework for the automation of machine learning experiments. # # It provides a workflow-based standardized environment for easy evaluation of # feature d...
MechCoder/sympy
refs/heads/master
sympy/categories/baseclasses.py
47
from __future__ import print_function, division from sympy.core import S, Basic, Dict, Symbol, Tuple from sympy.core.compatibility import range, iterable from sympy.sets import Set, FiniteSet, EmptySet class Class(Set): r""" The base class for any kind of class in the set-theoretic sense. In axiomatic s...
SysTheron/adhocracy
refs/heads/develop
src/adhocracy/lib/event/rss.py
1
from pylons import response from webhelpers.feedgenerator import Rss201rev2Feed as Feed from adhocracy.lib import pager from adhocracy.lib.event import formatting def rss_feed(events, name, link, description): rss = Feed(name, link.encode('utf-8'), description) def event_item(event): try: ...
nikhil93uf/Qemu
refs/heads/master
scripts/analyse-9p-simpletrace.py
333
#!/usr/bin/env python # Pretty print 9p simpletrace log # Usage: ./analyse-9p-simpletrace <trace-events> <trace-pid> # # Author: Harsh Prateek Bora import os import simpletrace symbol_9p = { 6 : 'TLERROR', 7 : 'RLERROR', 8 : 'TSTATFS', 9 : 'RSTATFS', 12 : 'TLOPEN', 13 : 'RLOPEN', ...
liuquansheng47/ansible
refs/heads/devel
lib/ansible/utils/unicode.py
1
# (c) 2012-2014, Toshio Kuraotmi <a.badger@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) any lat...
foliverkodi/repository.foliver
refs/heads/master
plugin.video.brfilmes/resources/lib/chardet/compat.py
2942
######################## BEGIN LICENSE BLOCK ######################## # Contributor(s): # Ian Cordasco - port to Python # # 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 # versio...
ceph/samba
refs/heads/ceph
source4/dsdb/tests/python/dirsync.py
33
#!/usr/bin/env python # # Unit tests for dirsync control # Copyright (C) Matthieu Patou <mat@matws.net> 2011 # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2014 # # 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 ...
apixandru/intellij-community
refs/heads/master
python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/noSelf.py
83
__author__ = 'ktisha' class Child(Base): def __init__(self): super(Child, self).__init__() def <caret>f(): test = 1
Hybrid-Cloud/conveyor
refs/heads/master
conveyor/conveyorheat/engine/notification/__init__.py
1
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
samitnuk/talks_keeper
refs/heads/master
talks_keeper/models.py
1
from django.db import models from django.urls import reverse from colorfield.fields import ColorField class Country(models.Model): name = models.CharField( max_length=256, db_index=True, verbose_name="Назва країни") class Meta: verbose_name = "Країна" verbose_name_plural = "Країни" ...
avadacatavra/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py
142
import WebIDL def WebIDLTest(parser, harness): parser.parse(""" callback interface TestCallbackInterface { attribute boolean bool; }; """) results = parser.finish() iface = results[0] harness.ok(iface.isCallback(), "Interface should be a callback") parser = parser....
unasuke/AtCoder
refs/heads/master
Beginner/13/13-A.py
1
#AtCoder Beginner 13 A str = raw_input() if str == 'A': print "1" elif str == 'B': print "2" elif str == 'C': print "3" elif str == 'D': print "4" elif str == 'E': print "5"
lixun910/pysal
refs/heads/master
pysal/lib/weights/tests/test_spintW.py
3
import unittest import numpy as np from ..spintW import ODW, netW, mat2L, vecW from ..util import lat2W class TestODWeights(unittest.TestCase): def setUp(self): self.O = lat2W(2,2) self.D = lat2W(2,2) self.ODW = np.array( [[ 0. , 0. , 0. , 0. , 0. , 0.25, 0.25, ...
VitalPet/odoo
refs/heads/7.0
addons/document_page/wizard/document_page_show_diff.py
59
# -*- 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...
suyashphadtare/test
refs/heads/develop
erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py
25
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cstr, cint from frappe import msgprint, _ def execute(filters=None): if not filters: filters = {} conditio...
jose36/plugin.video.Jmdl2
refs/heads/master
servers/movreel.py
42
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para movreel # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core impor...
mchughmk/react-django
refs/heads/master
backend/ReactDjango/wsgi.py
1
""" WSGI config for ReactDjango project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_...
EricCline/CEM_inc
refs/heads/master
env/lib/python2.7/site-packages/django/contrib/auth/forms.py
59
from __future__ import unicode_literals from django import forms from django.forms.util import flatatt from django.template import loader from django.utils.datastructures import SortedDict from django.utils.html import format_html, format_html_join from django.utils.http import int_to_base36 from django.utils.safestri...
okanasik/JdeRobot
refs/heads/master
src/tools/visualStates_py/gui/state.py
2
''' Copyright (C) 1997-2017 JDERobot Developers Team 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 pr...
fabioz/PyDev.Debugger
refs/heads/master
third_party/pep8/lib2to3/lib2to3/pgen2/pgen.py
321
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. # Pgen imports from . import grammar, token, tokenize class PgenGrammar(grammar.Grammar): pass class ParserGenerator(object): def __init__(self, filename, stream=None): close_stream =...
slarosa/QGIS
refs/heads/master
python/plugins/sextante/algs/ftools/BasicStatisticsNumbers.py
1
# -*- coding: utf-8 -*- """ *************************************************************************** BasicStatisticsNumbers.py --------------------- Date : September 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************...
AloneRoad/Inforlearn
refs/heads/1.0-rc3
.google_appengine/lib/django/django/contrib/contenttypes/models.py
33
from django.db import models from django.utils.translation import gettext_lazy as _ CONTENT_TYPE_CACHE = {} class ContentTypeManager(models.Manager): def get_for_model(self, model): """ Returns the ContentType object for the given model, creating the ContentType if necessary. """ ...
samstav/satori
refs/heads/master
tools/install_venv_common.py
31
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack Foundation # Copyright 2013 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.a...
jim-minter/aws-ose3
refs/heads/master
target/reip.py
1
#!/usr/bin/python import OpenSSL.crypto import argparse import base64 import glob import k8s import os import shutil import yaml def sn(): sn = int(open("/etc/origin/master/ca.serial.txt").read(), 16) sntext = "%X" % (sn + 1) if len(sntext) % 2: sntext = "0" + sntext open("/etc/origin/maste...
weimingtom/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/turtledemo/colormixer.py
65
# colormixer from turtle import Screen, Turtle, mainloop import sys sys.setrecursionlimit(20000) # overcomes, for now, an instability of Python 3.0 class ColorTurtle(Turtle): def __init__(self, x, y): Turtle.__init__(self) self.shape("turtle") self.resizemode("user") self.shapes...
liavkoren/djangoDev
refs/heads/master
django/contrib/gis/geos/libgeos.py
90
""" This module houses the ctypes initialization procedures, as well as the notice and error handler function callbacks (get called when an error occurs in GEOS). This module also houses GEOS Pointer utilities, including get_pointer_arr(), and GEOM_PTR. """ import logging import os import re from ctypes import c_...
tempesta-tech/linux-4.8.15-tfw
refs/heads/master
Documentation/conf.py
37
# -*- coding: utf-8 -*- # # The Linux Kernel documentation build configuration file, created by # sphinx-quickstart on Fri Feb 12 13:51:46 2016. # # 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 fi...
UManPychron/pychron
refs/heads/develop
pychron/core/fits/measurement_fits_selector.py
2
# =============================================================================== # Copyright 2014 Jake Ross # # 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/licens...
overtherain/scriptfile
refs/heads/master
software/googleAppEngine/lib/django_1_4/tests/regressiontests/string_lookup/models.py
43
# -*- coding: utf-8 -*- from django.db import models class Foo(models.Model): name = models.CharField(max_length=50) friend = models.CharField(max_length=50, blank=True) def __unicode__(self): return "Foo %s" % self.name class Bar(models.Model): name = models.CharField(max_length=50) nor...
hwu25/AppPkg
refs/heads/trunk
Applications/Python/Python-2.7.2/Lib/encodings/cp037.py
93
""" Python Character Mapping Codec cp037 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP037.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def deco...
rafaelvieiras/plugin.program.advanced.launcher
refs/heads/master
resources/scrapers/datas/ComicVine/__init__.py
201
# Dummy file to make this directory a package.
CPFL/gxen
refs/heads/master
tools/python/xen/remus/vm.py
43
#!/usr/bin/env python import xmlrpclib from xen.xend.XendClient import server from xen.xend import sxp, osdep from xen.lowlevel.xc import xc import vif import blkdev # need a nicer way to load disk drivers import vbd class VMException(Exception): pass class VM(object): "Representation of a virtual machine" ...
microhh/microhh2
refs/heads/master
cases_old_setup/strongscaling/strongscalingprof.py
5
import numpy #from pylab import * # set the height kmax = 1024 dn = 1./kmax n = numpy.linspace(dn, 1.-dn, kmax) nloc1 = 160.*dn nbuf1 = 32.*dn nloc2 = 1024.*dn nbuf2 = 144.*dn dz1 = 0.0005 dz2 = 0.001 dz3 = 0.01 dzdn1 = dz1/dn dzdn2 = dz2/dn dzdn3 = dz3/dn dzdn = dzdn1 + 0.5*(dzdn2-dzdn1)*(1. + numpy.tanh((n-n...
chrrrles/ansible
refs/heads/devel
test/units/plugins/lookup/__init__.py
7690
# (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...
roadmapper/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_vpc_nacl_info.py
5
#!/usr/bin/python # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterface'], 's...
koying/xbmc
refs/heads/master-krypton
tools/Fake Episode Maker/openAnything.py
169
# -*- coding: utf-8 -*- # Copyright (C) 2008-2013 Team XBMC # http://xbmc.org # # 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, or (at your option) # any l...
rudimeier/numpy
refs/heads/master
numpy/polynomial/legendre.py
75
""" Legendre Series (:mod: `numpy.polynomial.legendre`) =================================================== .. currentmodule:: numpy.polynomial.polynomial This module provides a number of objects (mostly functions) useful for dealing with Legendre series, including a `Legendre` class that encapsulates the usual arith...
gcallah/Indra
refs/heads/master
registry/tests/test_registry.py
1
""" This is the test suite for registry.py. """ from unittest import TestCase, main from registry.registry import Registry, REGISTRY, get_prop from registry.registry import set_env, get_env, add_group, get_group TEST_VAL_STR = "test_val" TEST_VAL = 1 class RegisteryTestCase(TestCase): def setUp(self): ...
BT-jmichaud/sale-workflow
refs/heads/8.0
sale_quotation_sourcing/tests/test_consistent_route.py
35
# Author: Leonardo Pistone # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any la...
prabhucomo/symfonytask
refs/heads/master
vendor/doctrine/orm/docs/en/conf.py
2448
# -*- coding: utf-8 -*- # # Doctrine 2 ORM documentation build configuration file, created by # sphinx-quickstart on Fri Dec 3 18:10:24 2010. # # 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. ...
defionscode/ansible
refs/heads/devel
lib/ansible/plugins/connection/paramiko_ssh.py
19
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ author: Ansible Core Team con...
mbedmicro/pyOCD
refs/heads/master
test/unit/test_memory_map.py
3
# pyOCD debugger # Copyright (c) 2016-2019 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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...
Addepar/buck
refs/heads/master
python-dsl/buck_parser/buck_test.py
5
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
rabbitt/artifactory
refs/heads/master
artifactory/exceptions.py
1
from .utils import export @export class ArtifactoryError(Exception): pass @export class ImmutableConfigError(ArtifactoryError): pass
tianon/hy
refs/heads/master
hy/lex/__init__.py
8
# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modif...
sysalexis/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_asyncio/test_tasks.py
60
"""Tests for tasks.py.""" import re import sys import types import unittest import weakref from test import support from test.script_helper import assert_python_ok from unittest import mock import asyncio from asyncio import coroutines from asyncio import test_utils PY34 = (sys.version_info >= (3, 4)) PY35 = (sys.v...
home-assistant/home-assistant
refs/heads/dev
homeassistant/components/juicenet/__init__.py
1
"""The JuiceNet integration.""" from datetime import timedelta import logging import aiohttp from pyjuicenet import Api, TokenError import voluptuous as vol from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.const import CONF_ACCESS_TOKEN from homeassistant.core import HomeAssistan...
jcpowermac/ansible
refs/heads/devel
lib/ansible/modules/network/panos/panos_security_rule.py
15
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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':...
ArcherSys/ArcherSys
refs/heads/master
Lib/site-packages/construct/protocols/layer4/__init__.py
15
""" layer 4 (transporation) protocols """
neal-rogers/is210-week-05-warmup
refs/heads/master
tests/test_smoke.py
245
#!/usr/bin/env python # -*- coding: utf-8 -*- """Smoke test for test suite.""" # Import Python libs import unittest class SmokeTestCase(unittest.TestCase): """Test cases to ensure that the test suite is operational.""" def test_true(self): """Tests that True is True.""" self.assertTrue(True)...
google/ci_edit
refs/heads/master
app/unit_test_performance.py
1
# Copyright 2017 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 or agreed to in writing, ...
arenadata/ambari
refs/heads/branch-adh-1.6
ambari-server/src/main/resources/stacks/ADH/1.4/services/OOZIE/package/scripts/check_oozie_server_status.py
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 License, Version 2.0 (the "License"); you may not use this ...
saurabh6790/omn-lib
refs/heads/master
webnotes/tests/test_fmt_money.py
34
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt import webnotes from webnotes import _ from webnotes.utils import flt, cstr def fmt_money(amount, precision=None): """ Convert to string with commas for thousands, millions etc """ number_format = webnotes.con...
FreescaleSemiconductor/quantum
refs/heads/stable/folsom
quantum/tests/unit/test_db_rpc_base.py
3
# Copyright (c) 2012 OpenStack, 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 agreed to in wr...
illume/numpy3k
refs/heads/master
numpy/numarray/functions.py
5
# missing Numarray defined names (in from numarray import *) ##__all__ = ['ClassicUnpickler', 'Complex32_fromtype', ## 'Complex64_fromtype', 'ComplexArray', 'Error', ## 'MAX_ALIGN', 'MAX_INT_SIZE', 'MAX_LINE_WIDTH', ## 'NDArray', 'NewArray', 'NumArray', ## 'NumError', 'PRECISION'...
ndebuhr/thermo-state-solver
refs/heads/master
thermo-env/lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py
1775
######################## 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...
elena/django
refs/heads/master
tests/postgres_tests/test_introspection.py
27
from io import StringIO from django.core.management import call_command from django.test.utils import modify_settings from . import PostgreSQLTestCase @modify_settings(INSTALLED_APPS={'append': 'django.contrib.postgres'}) class InspectDBTests(PostgreSQLTestCase): def assertFieldsInModel(self, model, field_outpu...