repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
hyperized/ansible | refs/heads/devel | lib/ansible/modules/network/panos/__init__.py | 12133432 | |
jgoclawski/django | refs/heads/master | django/utils/datastructures.py | 394 | import copy
from collections import OrderedDict
from django.utils import six
class OrderedSet(object):
"""
A set which keeps the ordering of the inserted items.
Currently backs onto OrderedDict.
"""
def __init__(self, iterable=None):
self.dict = OrderedDict(((x, None) for x in iterable) ... |
RAPD/RAPD | refs/heads/master | src/plugins/subcontractors/xdsme/new/xdsme-0.4.9/XDS/XIO/XIO_collect_info.py | 9 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# __init__.py
# Maintained by P.Legrand
# 14th April 2005
#
import os, sys
import __init__
def _print_autopar(parDict):
K = parDict.keys()
K.sort()
for k in K:
print "%s = %s" % (k, parDict[k])
def _test1(filename):
line_fmt = "%(Wavelength)8.4f... |
Sult/daf | refs/heads/master | apps/characters/templatetags/character_tags.py | 3 | from datetime import datetime, timedelta
from django import template
from django.utils.timezone import utc
from apps.characters.models import CharacterApi
from apps.characters.models import Skill, RefType
from utils.common import convert_timestamp
register = template.Library()
@register.filter
def training_time(t... |
yakky/django | refs/heads/master | tests/gis_tests/gdal_tests/test_envelope.py | 335 | import unittest
from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
if HAS_GDAL:
from django.contrib.gis.gdal import Envelope, GDALException
class TestPoint(object):
def __init__(self, x, y):
self.x = x
self.y = y
@skipUnless(HAS_GDAL, "GDAL is required")
class Env... |
JingJunYin/tensorflow | refs/heads/master | tensorflow/contrib/keras/api/keras/layers/__init__.py | 51 | # 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... |
FabianHahn/shoveler | refs/heads/master | thirdparty/fakeglib/thirdparty/googletest/googletest/test/googletest-color-test.py | 122 | #!/usr/bin/env python
#
# Copyright 2008, 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... |
schumi2004/NOT_UPDATED_Sick-Beard-Dutch | refs/heads/dutch-tpb | sickbeard/metadata/generic.py | 5 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 t... |
BibMartin/python-nvd3 | refs/heads/develop | examples/stackedAreaChart.py | 9 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Examples for Python-nvd3 is a Python wrapper for NVD3 graph library.
NVD3 is an attempt to build re-usable charts and chart components
for d3.js without taking away the power that d3.js gives you.
Project location : https://github.com/areski/python-nvd3
"""
from nvd3 imp... |
DecipherOne/Troglodyte | refs/heads/master | Trog Build Dependencies/Python26/Lib/test/test_applesingle.py | 58 | # Copyright (C) 2003 Python Software Foundation
import unittest
import macostools
import Carbon.File
import MacOS
import os
from test import test_support
import struct
import applesingle
AS_MAGIC=0x00051600
AS_VERSION=0x00020000
dataforkdata = 'hello\r\0world\n'
resourceforkdata = 'goodbye\ncruel\0world\r'
applesing... |
SergiuMir/python-phonenumbers | refs/heads/dev | python/phonenumbers/shortdata/region_CN.py | 11 | """Auto-generated file, do not edit by hand. CN metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_CN = PhoneMetadata(id='CN', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[19]\\d{2,5}', possible_number_pattern=... |
GoogleCloudPlatform/compute-image-packages | refs/heads/master | packages/python-google-compute-engine/google_compute_engine/distro_lib/utils.py | 5 | #!/usr/bin/python
# Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
mfussenegger/jedi | refs/heads/master | test/test_api/test_interpreter.py | 13 | """
Tests of ``jedi.api.Interpreter``.
"""
from ..helpers import TestCase
import jedi
from jedi._compatibility import is_py33
class TestInterpreterAPI(TestCase):
def check_interpreter_complete(self, source, namespace, completions,
**kwds):
script = jedi.Interpreter(sour... |
jnovinger/django | refs/heads/master | django/contrib/gis/db/backends/spatialite/schema.py | 518 | from django.db.backends.sqlite3.schema import DatabaseSchemaEditor
from django.db.utils import DatabaseError
class SpatialiteSchemaEditor(DatabaseSchemaEditor):
sql_add_geometry_column = (
"SELECT AddGeometryColumn(%(table)s, %(column)s, %(srid)s, "
"%(geom_type)s, %(dim)s, %(null)s)"
)
sq... |
kawamon/hue | refs/heads/master | desktop/core/ext-py/python-openid-2.2.5/openid/extensions/draft/pape2.py | 156 | """An implementation of the OpenID Provider Authentication Policy
Extension 1.0
@see: http://openid.net/developers/specs/
@since: 2.1.0
"""
__all__ = [
'Request',
'Response',
'ns_uri',
'AUTH_PHISHING_RESISTANT',
'AUTH_MULTI_FACTOR',
'AUTH_MULTI_FACTOR_PHYSICAL',
]
from openid.extension i... |
dcamposliz/youtube-dl | refs/heads/master | youtube_dl/version.py | 7 | from __future__ import unicode_literals
__version__ = '2015.07.28'
|
Carralex/landlab | refs/heads/master | landlab/components/soil_moisture/infiltrate_soil_green_ampt.py | 1 | #!/usr/bin/env python
import numpy as np
from six.moves import range
from landlab import Component, CLOSED_BOUNDARY
from ...utils.decorators import use_file_name_or_kwds
class SoilInfiltrationGreenAmpt(Component):
"""Infiltrate surface water into a soil following the Green-Ampt method.
This code is based ... |
SebDieBln/QGIS | refs/heads/master | python/ext-libs/owslib/crs.py | 30 | # -*- coding: ISO-8859-15 -*-
# =============================================================================
# Copyright (c) 2011 Tom Kralidis
#
# Authors : Tom Kralidis <tomkralidis@gmail.com>
#
# Contact email: tomkralidis@gmail.com
# =============================================================================
"""... |
BitWriters/Zenith_project | refs/heads/master | zango/lib/python3.5/site-packages/easy_install.py | 1642 | """Run the EasyInstall command"""
if __name__ == '__main__':
from setuptools.command.easy_install import main
main()
|
ravindrapanda/tensorflow | refs/heads/master | tensorflow/contrib/grid_rnn/python/kernel_tests/grid_rnn_test.py | 80 | # 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... |
vhaupert/mitmproxy | refs/heads/master | test/mitmproxy/tools/test_cmdline.py | 8 | import argparse
from mitmproxy import options
from mitmproxy.tools import cmdline, web, dump, console
from mitmproxy.tools import main
def test_common():
parser = argparse.ArgumentParser()
opts = options.Options()
cmdline.common_options(parser, opts)
args = parser.parse_args(args=[])
assert main.... |
akosyakov/intellij-community | refs/heads/master | python/testData/intentions/PythonDemorganLawIntentionTest/orNot_after.py | 83 | # "DeMorgan Law" "true"
if not a and not b:
pass |
leppa/home-assistant | refs/heads/dev | homeassistant/components/sabnzbd/__init__.py | 3 | """Support for monitoring an SABnzbd NZB client."""
from datetime import timedelta
import logging
from pysabnzbd import SabnzbdApi, SabnzbdApiException
import voluptuous as vol
from homeassistant.components.discovery import SERVICE_SABNZBD
from homeassistant.const import (
CONF_API_KEY,
CONF_HOST,
CONF_NA... |
mottosso/mindbender-setup | refs/heads/master | bin/windows/python36/Lib/site-packages/pymongo/monotonic.py | 41 | # Copyright 2014-2015 MongoDB, 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 writin... |
ingenioustechie/zamboni | refs/heads/master | mkt/extensions/permissions.py | 6 | from rest_framework.permissions import BasePermission, SAFE_METHODS
from mkt.access import acl
class AllowExtensionReviewerReadOnly(BasePermission):
def has_permission(self, request, view):
return request.method in SAFE_METHODS and acl.action_allowed(
request, 'ContentTools', 'AddonReview')
... |
GbalsaC/bitnamiP | refs/heads/master | venv/lib/python2.7/site-packages/gunicorn/arbiter.py | 7 | # -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
from __future__ import with_statement
import errno
import os
import random
import select
import signal
import sys
import time
import traceback
from gunicorn.errors import HaltServer, AppImpo... |
danellecline/stoqs | refs/heads/master | stoqs/__init__.py | 407 | __version__ = '0.1.0'
|
p2pu/learning-circles | refs/heads/master | studygroups/migrations/0061_auto_20160224_1357.py | 1 | # -*- coding: utf-8 -*-
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('studygroups', '0060_auto_20160204_0846'),
]
operations = [
migrations.AddField(
model_name='studygroup',
name='city',
field=mod... |
hassanabidpk/django | refs/heads/master | tests/auth_tests/models/is_active.py | 295 | from django.contrib.auth.models import AbstractBaseUser, BaseUserManager
from django.db import models
class IsActiveTestUser1(AbstractBaseUser):
"""
This test user class and derivatives test the default is_active behavior
"""
username = models.CharField(max_length=30, unique=True)
custom_objects ... |
srimai/odoo | refs/heads/8.0 | addons/mail/tests/test_message_read.py | 199 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... |
saberhawk/p2pool | refs/heads/master | p2pool/util/graph.py | 226 | from __future__ import absolute_import
from __future__ import division
import math
from p2pool.util import math as math2
class DataViewDescription(object):
def __init__(self, bin_count, total_width):
self.bin_count = bin_count
self.bin_width = total_width/bin_count
def _shift(x, shift, pad_item... |
brentpayne/celery-geolocator | refs/heads/master | examples/django_celery/proj/__init__.py | 155 | from __future__ import absolute_import
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
|
apanda/modeling | refs/heads/master | tests/appfw_proxy_policy_scaling.py | 1 | from concrete_examples import FixedL7ProxyPolicy
import z3
from z3 import is_true, is_false
import time
import mcnet.components as components
import random
import sys
"""Check time as increase in nodes"""
def ResetZ3 ():
z3._main_ctx = None
z3.main_ctx()
z3.set_param('auto_config', False)
z3.set_param(... |
kuiwei/edx-platform | refs/heads/master | lms/djangoapps/class_dashboard/urls.py | 40 | """
Class Dashboard API endpoint urls.
"""
from django.conf.urls import patterns, url
from django.conf import settings
COURSE_ID_PATTERN = settings.COURSE_ID_PATTERN
urlpatterns = patterns('', # nopep8
# Json request data for metrics for entire course
url(r'^{}/all_sequential_open_distrib$'.format(settings.C... |
hassanabidpk/django | refs/heads/master | django/contrib/syndication/apps.py | 590 | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class SyndicationConfig(AppConfig):
name = 'django.contrib.syndication'
verbose_name = _("Syndication")
|
eltonsantos/django | refs/heads/master | django/contrib/gis/db/backends/mysql/introspection.py | 624 | from MySQLdb.constants import FIELD_TYPE
from django.contrib.gis.gdal import OGRGeomType
from django.db.backends.mysql.introspection import DatabaseIntrospection
class MySQLIntrospection(DatabaseIntrospection):
# Updating the data_types_reverse dictionary with the appropriate
# type for Geometry fields.
d... |
dekked/dynamodb-mock | refs/heads/master | ddbmock/utils/__init__.py | 1 | # -*- coding: utf-8 -*-
from .stat import Stat
from ddbmock import config
import logging
tp_stat = {
'read': {},
'write': {},
}
req_logger = logging.getLogger("Request logger")
req_logger.addHandler(logging.NullHandler())
tp_logger = logging.getLogger("Throughput logger")
tp_logger.addHandler(logging.NullHa... |
inares/edx-platform | refs/heads/inares_sass | common/test/acceptance/pages/studio/course_info.py | 206 | """
Course Updates page.
"""
from .course_page import CoursePage
class CourseUpdatesPage(CoursePage):
"""
Course Updates page.
"""
url_path = "course_info"
def is_browser_on_page(self):
return self.q(css='body.view-updates').present
|
glogiotatidis/lumbergh | refs/heads/master | careers/base/__init__.py | 3 | default_app_config = 'careers.base.app.BaseAppConfig'
|
smartpolitech/ACHO | refs/heads/master | luces/principal.py | 1 | from light_bulbs import Luces
import ConfigParser
import paho.mqtt.client as mqtt
import time
# elif (msg.topic == "acho/bombillas/unpocobrillo1"):
# client.publish("acho/tts", "encendiendo bombilla 1")
# control_percentual_vble_B(bombilla1)
# elif (msg.topic == "acho/bombillas/unpocobrillo2"):
... |
jmesteve/medical | refs/heads/master | openerp/tools/assertion_report.py | 432 |
class assertion_report(object):
"""
Simple pair of success and failures counts (used to record YAML and XML
`assert` tags as well as unittest2 tests outcome (in this case, not
individual `assert`)).
"""
def __init__(self):
self.successes = 0
self.failures = 0
def record_suc... |
w1ll1am23/home-assistant | refs/heads/dev | tests/helpers/test_aiohttp_client.py | 8 | """Test the aiohttp client helper."""
import asyncio
from unittest.mock import Mock, patch
import aiohttp
import pytest
from homeassistant.core import EVENT_HOMEASSISTANT_CLOSE
import homeassistant.helpers.aiohttp_client as client
from homeassistant.setup import async_setup_component
@pytest.fixture(name="camera_cl... |
rlpy/rlpy | refs/heads/master | rlpy/Domains/PacmanPackage/gridworld.py | 1 | from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
# gridworld.py
# ------------
# Licensing Information: Please do not distribute or publish solutions to this
# project. You are free to use and extend these projects for e... |
digideskio/st2contrib | refs/heads/master | packs/mmonit/actions/update_host.py | 12 | from lib.mmonit import MmonitBaseAction
class MmonitUpdateHost(MmonitBaseAction):
def run(self, host_id, hostname, keepname=None, description=None, status=None, ipaddrout=None,
portout=None, sslout=None, monituser=None, monitpassword=None, skew=None):
self.login()
data = {"id": host_id... |
sebrandon1/nova | refs/heads/master | nova/tests/unit/test_loadables.py | 95 | # Copyright 2012 OpenStack Foundation # 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 req... |
ndingwall/scikit-learn | refs/heads/master | sklearn/inspection/_plot/tests/test_plot_partial_dependence.py | 10 | import numpy as np
from scipy.stats.mstats import mquantiles
import pytest
from numpy.testing import assert_allclose
from sklearn.datasets import load_diabetes
from sklearn.datasets import load_iris
from sklearn.datasets import make_classification, make_regression
from sklearn.ensemble import GradientBoostingRegresso... |
wzbozon/statsmodels | refs/heads/master | statsmodels/sandbox/archive/__init__.py | 12133432 | |
ahmadiga/min_edx | refs/heads/master | docs/en_us/enrollment_api/__init__.py | 12133432 | |
FHannes/intellij-community | refs/heads/master | python/testData/refactoring/move/conditionalImport/before/src/mod2.py | 12133432 | |
iandees/all-the-places | refs/heads/master | locations/spiders/pandora.py | 1 | # -*- coding: utf-8 -*-
import scrapy
import re
import json
from locations.items import GeojsonPointItem
class PandoraSpider(scrapy.Spider):
name = "pandora"
allowed_domains = ['pandora.net']
start_urls = (
'https://stores.pandora.net/en-us/',
)
def parse(self, response):
respons... |
alvin319/CarnotKE | refs/heads/master | jyhton/lib-python/2.7/smtplib.py | 35 | #! /usr/bin/env python
'''SMTP/ESMTP client class.
This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP
Authentication) and RFC 2487 (Secure SMTP over TLS).
Notes:
Please remember, when doing ESMTP, that the names of the SMTP service
extensions are NOT the same thing as the option keywords for the RC... |
RedHatQE/cfme_tests | refs/heads/master | cfme/generic_objects/definition/button_groups.py | 1 | import attr
from navmazing import NavigateToAttribute
from .definition_views import GenericObjectActionsDetailsView
from .definition_views import GenericObjectAddButtonView
from .definition_views import GenericObjectButtonGroupAddView
from .definition_views import GenericObjectButtonGroupDetailsView
from .definition_v... |
Endika/purchase-workflow | refs/heads/8.0 | purchase_order_revision/model/purchase_order.py | 5 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>)
# @author Lorenzo Battistini <lorenzo.battistini@agilebg.com>
#
# This program is free software: you can redistribute it and/or modi... |
PermeAgility/FrameworkBenchmarks | refs/heads/master | frameworks/Python/turbogears/app.py | 51 | from functools import partial
from operator import attrgetter
import os
from random import randint
import sys
import json
from jinja2 import Environment, PackageLoader
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from tg import expose, TGController, AppConfig
from model... |
hijinks/python-bcet | refs/heads/master | mask_no_data.py | 1 | # Mask all nodata values in a geotiff
from osgeo import gdal
import os
import glob
source_directory = './LANDSAT8/'
output_directory = './LANDSAT8/'
files = os.path.join(source_directory, '*.TIF')
for fname in glob.glob(files):
new_name = os.path.basename(fname).replace('.TIF', '')+'_masked.TIF'
new_path =... |
adamcharnock/repose | refs/heads/master | repose/helpers.py | 1 | from booby.helpers import *
|
marxin/youtube-dl | refs/heads/master | devscripts/make_readme.py | 174 | from __future__ import unicode_literals
import io
import sys
import re
README_FILE = 'README.md'
helptext = sys.stdin.read()
if isinstance(helptext, bytes):
helptext = helptext.decode('utf-8')
with io.open(README_FILE, encoding='utf-8') as f:
oldreadme = f.read()
header = oldreadme[:oldreadme.index('# OPTI... |
rohitwaghchaure/erpnext_develop | refs/heads/develop | erpnext/healthcare/doctype/medical_code_standard/__init__.py | 12133432 | |
Scot3004/temii | refs/heads/master | apps/votos/tests/__init__.py | 12133432 | |
gdi2290/django | refs/heads/master | django/contrib/admin/views/__init__.py | 12133432 | |
reinout/django | refs/heads/master | tests/utils_tests/test_module/another_good_module.py | 514 | from . import site
content = 'Another Good Module'
site._registry.update({
'lorem': 'ipsum',
})
|
Dino0631/RedRain-Bot | refs/heads/develop | lib/youtube_dl/extractor/helsinki.py | 71 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import js_to_json
class HelsinkiIE(InfoExtractor):
IE_DESC = 'helsinki.fi'
_VALID_URL = r'https?://video\.helsinki\.fi/Arkisto/flash\.php\?id=(?P<id>\d+)'
_TEST = {
'url': 'http://video.helsink... |
campagnola/acq4 | refs/heads/develop | acq4/devices/__init__.py | 3 | from __future__ import print_function
from collections import OrderedDict
from importlib import import_module
from . import Device
def getDeviceClass(name):
"""Return a device class given its name.
The class must have been defined already, or it must be importable from ``acq4.devices.name``.
"""
devC... |
jm66/vsphere_report | refs/heads/master | vmware_vcenter_rerport.py | 1 | #!/usr/bin/python
import sys, re, getpass, argparse, subprocess, logging
from time import sleep
from pysphere import MORTypes, VIServer, VITask, VIProperty, VIMor, VIException
from pysphere.vi_virtual_machine import VIVirtualMachine
def find_vm(name):
try:
vm = con.get_vm_by_name(name)
return vm
except VIExcepti... |
nuigroup/pymt-widgets | refs/heads/master | examples/games/bubblebattle/bubblebattle.py | 2 | # PYMT Plugin integration
IS_PYMT_PLUGIN = True
PLUGIN_TITLE = 'Bubble Battle !'
PLUGIN_AUTHOR = 'Mathieu Virbel'
PLUGIN_DESCRIPTION = 'Fight the bubbles !!!!! ]:X'
from pymt import *
from OpenGL.GL import *
from random import random, randint
class Basic(MTWidget):
def __init__(self, **kwargs):
super(Basi... |
Microvellum/Fluid-Designer | refs/heads/master | win64-vc/2.78/python/lib/lib2to3/fixes/fix_future.py | 529 | """Remove __future__ imports
from __future__ import foo is replaced with an empty line.
"""
# Author: Christian Heimes
# Local imports
from .. import fixer_base
from ..fixer_util import BlankLine
class FixFuture(fixer_base.BaseFix):
BM_compatible = True
PATTERN = """import_from< 'from' module_name="__future... |
MarcJoan/django | refs/heads/master | django/template/smartif.py | 69 | """
Parser and utilities for the smart 'if' tag
"""
# Using a simple top down parser, as described here:
# http://effbot.org/zone/simple-top-down-parsing.htm.
# 'led' = left denotation
# 'nud' = null denotation
# 'bp' = binding power (left = lbp, right = rbp)
class TokenBase(object):
"""
Base class for ope... |
rven/odoo | refs/heads/14.0-fix-partner-merge-mail-activity | addons/sale_project/models/product.py | 1 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
class ProductTemplate(models.Model):
_inherit = 'product.template'
service_tracking = fields.Selection([
('no', 'Don\... |
M4rtinK/anaconda | refs/heads/master | pyanaconda/core/startup/dbus_launcher.py | 3 | #
# Functions to launch and test DBus session.
#
# Functions here are NOT RECOMMENDED to be called in modules. These functions
# could have unexpected behavior when called in modules and not in main
# anaconda application.
#
# Copyright (C) 2018
# Red Hat, Inc. All rights reserved.
#
# This program is free software; y... |
joshmoore/zeroc-ice | refs/heads/master | cs/test/Ice/faultTolerance/run.py | 1 | #!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# *************************************... |
chdecultot/frappe | refs/heads/develop | frappe/core/doctype/role_permission_for_page_and_report/__init__.py | 12133432 | |
Jumpscale/jumpscale_portal8 | refs/heads/master | apps/gridportal/tests/__init__.py | 12133432 | |
napalm-automation/napalm | refs/heads/develop | test/iosxr/__init__.py | 12133432 | |
quxiaolong1504/django | refs/heads/master | tests/middleware/__init__.py | 12133432 | |
taotie12010/bigfour | refs/heads/master | lms/djangoapps/mobile_api/migrations/__init__.py | 12133432 | |
arnlaugsson/workshop_drf | refs/heads/master | workshop_drf/wsgi.py | 3 | """
WSGI config for workshop_drf 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.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_... |
SNU-Sigma/rosbridge_suite | refs/heads/develop | rosbridge_library/test/internal/publishers/test_publisher_manager.py | 9 | #!/usr/bin/env python
import sys
import rospy
import rostest
import unittest
from time import sleep
from rosbridge_library.internal.publishers import *
from rosbridge_library.internal.topics import *
from rosbridge_library.internal.message_conversion import FieldTypeMismatchException
from std_msgs.msg import String, ... |
habibmasuro/p2pool | refs/heads/master | nattraverso/portmapper.py | 288 | """
Generic NAT Port mapping interface.
TODO: Example
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@version: 0.1.0
"""
__revision__ = "$id"
from twisted.internet.base import BasePort
# Public API
def get_port_mapper(proto="TCP"):
... |
Tarasus/NewTG | refs/heads/master | bot/C_rot13.py | 36 | global parta,partb
parta = {"A":"N","B":"O","C":"P","D":"Q","E":"R","F":"S","G":"T","H":"U","I":"V","J":"W","K":"X","L":"Y","M":"Z"}
partb = {'O':'B','N':'A','Q':'D','P':'C','S':'F','R':'E','U':'H','T':'G','W':'J','V':'I','Y':'L','X':'K','Z':'M'}
def rot13(text):
global parta,partb
newtext = ""
for letter i... |
nevir/plexability | refs/heads/master | extern/depot_tools/third_party/boto/ses/__init__.py | 72 | # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2011 Harry Marr http://hmarr.com/
#
# 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
# wit... |
MungoRae/home-assistant | refs/heads/dev | homeassistant/components/light/zengge.py | 7 | """
Support for Zengge lights.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.zengge/
"""
import logging
import voluptuous as vol
from homeassistant.const import CONF_DEVICES, CONF_NAME
from homeassistant.components.light import (
ATTR_RGB_CO... |
bobisme/odoo | refs/heads/sp-8.0 | openerp-wsgi.py | 363 | # WSGI Handler sample configuration file.
#
# Change the appropriate settings below, in order to provide the parameters
# that would normally be passed in the command-line.
# (at least conf['addons_path'])
#
# For generic wsgi handlers a global application is defined.
# For uwsgi this should work:
# $ uwsgi_python --... |
gdimitris/ChessPuzzler | refs/heads/master | Virtual_Environment/lib/python2.7/site-packages/setuptools/command/setopt.py | 458 | from distutils.util import convert_path
from distutils import log
from distutils.errors import DistutilsOptionError
import distutils
import os
from setuptools import Command
__all__ = ['config_file', 'edit_config', 'option_base', 'setopt']
def config_file(kind="local"):
"""Get the filename of the distutils, lo... |
caphrim007/ansible | refs/heads/devel | lib/ansible/plugins/connection/lxd.py | 9 | # (c) 2016 Matt Clay <matt@mystile.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: Matt Clay <matt@mystile.com>
conne... |
ondrejsika/sedastrela | refs/heads/master | sedastrela/menu/migrations/__init__.py | 12133432 | |
dannybrowne86/django-ata-codes | refs/heads/master | ata_codes/ata_codes/migrations/__init__.py | 12133432 | |
ArchAssault-Project/archassaultweb | refs/heads/master | packages/migrations/__init__.py | 12133432 | |
HybridF5/jacket | refs/heads/master | jacket/db/sqlalchemy/api_migrations/migrate_repo/__init__.py | 12133432 | |
leeon/annotated-django | refs/heads/note | tests/admin_scripts/app_with_import/__init__.py | 12133432 | |
google-code-export/pyglet | refs/heads/master | tests/__init__.py | 12133432 | |
lshain-android-source/external-chromium_org-tools-gyp | refs/heads/master | test/ios/gyptest-app-ios.py | 21 | #!/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 ios app bundles are built correctly.
"""
import TestGyp
import sys
if sys.platform == 'darwin':
test = TestGyp.TestGy... |
all-of-us/raw-data-repository | refs/heads/devel | rdr_service/lib_fhir/fhirclient_3_0_0/models/visionprescription.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/VisionPrescription) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class VisionPrescription(domainresource.DomainResource):
""" Prescription for vision correction pro... |
audaciouscode/Books-Mac-OS-X | refs/heads/master | Versions/Books_3.0b3/Library of Congress Importer.app/Contents/Resources/script.py | 12 | #!/usr/bin/python
from PyZ3950 import zoom
from PyZ3950.zmarc import *
from xml.dom.minidom import Document, parseString
def getMarcValues (record, dataField, subField):
values = []
m = MARC8_to_Unicode ()
try:
for df in record.fields[dataField]:
items = []
if (subField == None):
for sf in df[2... |
caisq/tensorflow | refs/heads/master | tensorflow/contrib/learn/python/learn/utils/gc.py | 39 | # 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... |
CiscoSystems/vespa | refs/heads/master | neutron/db/migration/alembic_migrations/versions/176a85fc7d79_add_portbindings_db.py | 9 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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... |
allthroughthenight/aces | refs/heads/master | web2py/applications/welcome/languages/ca.py | 72 | # -*- coding: utf-8 -*-
{
'!langcode!': 'ca',
'!langname!': 'Català',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualizi" és una expressió opcional com "camp1=\'nou_valor\'". No es poden actualitzar o eliminar resultats de un JOIN',
'%(nrows)s... |
eteq/ginga | refs/heads/staging | ginga/pilw/ImageViewPil.py | 1 | #
# ImageViewPil.py -- classes for the display of FITS files on PIL surfaces
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
import numpy
from io import BytesIO
from P... |
evansd/django | refs/heads/master | tests/sites_framework/__init__.py | 12133432 | |
kaajavi/pytter | refs/heads/master | main/templatetags/__init__.py | 12133432 | |
ternus/click | refs/heads/master | examples/complex/complex/__init__.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.