repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
djedproject/djed.static
refs/heads/master
djed/static/__init__.py
1
import logging import os from collections import namedtuple from zope.interface import Interface from bowerstatic import ( Bower, InjectorTween, PublisherTween, ) from pyramid.interfaces import IApplicationCreated from pyramid.path import AssetResolver from pyramid.exceptions import ConfigurationError lo...
Shiroy/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/html5lib/html5lib/tests/performance/concatenation.py
451
from __future__ import absolute_import, division, unicode_literals def f1(): x = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ" y = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ" z = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ" x += y + z def f2(): x = "ABCDEFGHIJKLMNOP...
jn7163/django
refs/heads/master
tests/template_tests/syntax_tests/test_lorem.py
443
from django.test import SimpleTestCase from ..utils import setup class LoremTagTests(SimpleTestCase): @setup({'lorem1': '{% lorem 3 w %}'}) def test_lorem1(self): output = self.engine.render_to_string('lorem1') self.assertEqual(output, 'lorem ipsum dolor')
Almad/django-photologue
refs/heads/master
photologue/templatetags/photologue_tags.py
22
from django import template register = template.Library() @register.inclusion_tag('photologue/tags/next_in_gallery.html') def next_in_gallery(photo, gallery): return {'photo': photo.get_next_in_gallery(gallery)} @register.inclusion_tag('photologue/tags/prev_in_gallery.html') def previous_in_gallery(photo, galler...
HonzaKral/django
refs/heads/master
django/contrib/sites/models.py
15
from __future__ import unicode_literals import string from django.core.exceptions import ImproperlyConfigured, ValidationError from django.db import models from django.db.models.signals import pre_delete, pre_save from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugett...
40223203/2015cdb_g3_40223203_0622
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/multiprocessing/pool.py
694
# # Module providing the `Pool` class for managing a process pool # # multiprocessing/pool.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # __all__ = ['Pool'] # # Imports # import threading import queue import itertools import collections import time from multiprocessing ...
RPI-OPENEDX/edx-platform
refs/heads/RPI-DEV
cms/djangoapps/contentstore/management/commands/prompt.py
204
import sys def query_yes_no(question, default="yes"): """Ask a yes/no question via raw_input() and return their answer. "question" is a string that is presented to the user. "default" is the presumed answer if the user just hits <Enter>. It must be "yes" (the default), "no" or None (meaning ...
infogulch/pyspades
refs/heads/protocol075
feature_server/scripts/medkit.py
7
""" Gives a specified amount of medkits on spawn Author: Booboorocks998 Maintainer: mat^2 """ import commands from pyspades.constants import * @commands.alias('m') def medkit(connection): if connection.medkits and connection.hp < 100: connection.set_hp(connection.hp + connection.protocol.hea...
leiferikb/bitpop
refs/heads/master
depot_tools/third_party/boto/manage/volume.py
70
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.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, modi...
zerebubuth/mapnik
refs/heads/master
scons/scons-local-2.5.0/SCons/Tool/lex.py
3
"""SCons.Tool.lex Tool-specific initialization for lex. 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 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to...
obutkalyuk/Python_15
refs/heads/master
model/contact.py
1
from sys import maxsize from fixture.string_helper import * class Contact: def __init__(self, id= None, firstName=None, lastName=None, address=None, all_phones = None, all_emails = None, homePhone=None,mobilePhone=None, workPhone=None, secondaryPhone = None, email1=None, email2=None, email3=None)...
graphserver/graphserver
refs/heads/master
pygs/graphserver/ext/osm/simplify_osm.py
5
from osm import OSM, Node, Way osm = OSM( "map.osm" ) fp = open("nodes.csv", "w") for nodeid in osm.nodes.keys(): fp.write( "%s\n"%nodeid ) fp.close() fp = open("map.csv", "w") for wayid, way in osm.ways.iteritems(): if 'highway' in way.tags: fp.write("%s,%s,%s,%f\n"%(wayid, way.fromv, way.tov, way....
iAInNet/tensorflow_in_action
refs/heads/master
slim/nets/inception_v3.py
1
"""Contains the definition for inception v3 classification network.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import tensorflow.contrib.slim as slim from slim.nets import inception_utils def trunc_normal(stddev): retur...
polyaxon/polyaxon
refs/heads/master
core/polyaxon/polyboard/logging/handler.py
1
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
shubhangiKishore/pattern
refs/heads/master
pattern/text/en/wordnet/pywordnet/concordance.py
3
# some accessing of the semantic concordance data for wordnet 1.6 # by Des Berry, berry@ais.it import string import os from wordnet import binarySearchFile # Sample entries in the 'taglist' file # ordinary%1:18:01:: 1 br-a01:78,1;86,1;88,4 # ordered%5:00:00:organized:01 2 br-j23:6,14;13,32;66,12 # where the gener...
fedora-copr/copr-rebuild-tools
refs/heads/main
backends/tito.py
1
import os import subprocess from copr_rebuild_tools import Backend, CoprBackend, Entity class Package(Entity): path = None @property def pkgname(self): return self.name class Tito(Backend): def __init__(self, *args, **kwargs): super(Tito, self).__init__(*args, **kwargs) sel...
gglinux/python_demo
refs/heads/master
ticket/tickets.py
1
#! /usr/bin/env python3 # coding=utf-8 """ 火车票 Usage: tickets [-gdtkz] <from> <to> <date> Option: -h,--help 现实帮助菜单 -g 高铁 -d 动车 -t 特快 -k 普快 -z 直达 Example: tickets beijing shanghai 2016-10-01 """ from docopt import docopt from stations import stations import requests import logg...
dqnykamp/sympy
refs/heads/master
sympy/mpmath/matrices/matrices.py
18
from ..libmp.backend import xrange # TODO: interpret list as vectors (for multiplication) rowsep = '\n' colsep = ' ' class _matrix(object): """ Numerical matrix. Specify the dimensions or the data as a nested list. Elements default to zero. Use a flat list to create a column vector easily. ...
Obus/scikit-learn
refs/heads/master
sklearn/__check_build/setup.py
333
# Author: Virgile Fritsch <virgile.fritsch@inria.fr> # License: BSD 3 clause import numpy def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('__check_build', parent_package, top_path) config.add_extension('_check_build', ...
reciproco/delma
refs/heads/master
seguridad/admin.py
13848
from django.contrib import admin # Register your models here.
0Chencc/CTFCrackTools
refs/heads/master
Lib/lib2to3/fixes/fix_idioms.py
327
"""Adjust some old Python 2 idioms to their modern counterparts. * Change some type comparisons to isinstance() calls: type(x) == T -> isinstance(x, T) type(x) is T -> isinstance(x, T) type(x) != T -> not isinstance(x, T) type(x) is not T -> not isinstance(x, T) * Change "while 1:" into "while True:"....
carnell69/kuma
refs/heads/master
kuma/feeder/migrations/0001_initial.py
26
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Bundle', fields=[ ('id', models.AutoField(verbo...
TeamTwisted/external_chromium_org
refs/heads/opti-5.1
mojo/public/tools/bindings/pylib/mojom/error.py
112
# Copyright 2014 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. class Error(Exception): """Base class for Mojo IDL bindings parser/generator errors.""" def __init__(self, filename, message, lineno=None, addenda=None,...
hasanalom/ggrc-core
refs/heads/develop
src/ggrc_basic_permissions/migrations/versions/20131014203618_33a9ca4c32ac_move_system_roles_to.py
7
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: dan@reciprocitylabs.com # Maintained By: dan@reciprocitylabs.com """Move system roles to default context. Revision ID: 33a9ca4c32ac Revises: 3adc4...
davidvon/pipa-pay-server
refs/heads/master
site-packages/sqlalchemy/testing/assertsql.py
10
from ..engine.default import DefaultDialect from .. import util import re class AssertRule(object): def process_execute(self, clauseelement, *multiparams, **params): pass def process_cursor_execute(self, statement, parameters, context, executemany): pass ...
viblo/pymunk
refs/heads/master
pymunk/tests/test_vec2d.py
1
import math import pickle import unittest import pymunk from pymunk.vec2d import Vec2d class UnitTestVec2d(unittest.TestCase): def testCreationAndAccess(self) -> None: v = Vec2d(*(0, 0)) self.assertEqual(v.x, 0) self.assertEqual(v[0], 0) self.assertEqual(v.y, 0) self.asser...
JonathonReinhart/killerbee
refs/heads/master
killerbee/config.py
4
# Database (MySQL type assumed) # This configuration is only required # if the dblog module is used. # Database schema is expected to match that # created by the file in killerbee/scripts. DB_HOST = "" DB_PORT = 3306 DB_NAME = "" DB_USER = "" DB_PASS = "" ...
robgolding63/rubber
refs/heads/master
src/latex_modules/nomencl.py
3
# This file is part of Rubber and thus covered by the GPL # (c) Emmanuel Beffara, 2008 """ Support for nomenclatures with package 'nomencl'. This module simply wraps the functionality of the 'index' module with default values for the 'nomencl' package. """ from rubber.latex_modules.index import Index def setup (docu...
Crim/storm
refs/heads/master
examples/storm-starter/multilang/resources/splitsentence.py
78
# 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 u...
linjoahow/w17g
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/_io.py
629
""" Python implementation of the io module. """ import os import abc import codecs import errno # Import _thread instead of threading to reduce startup cost try: from _thread import allocate_lock as Lock except ImportError: from _dummy_thread import allocate_lock as Lock import io #brython fix me #from io imp...
redbaron/ansible
refs/heads/devel
v2/ansible/playbook/role/definition.py
10
# (c) 2014 Michael DeHaan, <michael@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
vsoch/deepdive-python
refs/heads/master
wordfish/scripts/run_slurm.py
2
''' run_slurm.py A basic script to read in a list of commands, parse into slurm job scripts, and run the jobs. This will be improved! For now, modify the bottom of the script to change the default submission args. ''' import os import sys script_dir = os.path.dirname(os.path.realpath(__file__)) job_dir = "%s/.job" ...
am2012/g3_kernel
refs/heads/lp-release
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
palashahuja/myhdl
refs/heads/master
example/arith_lib/arith_utils.py
13
SLOW, MEDIUM, FAST = range(3) BEHAVIOR, STRUCTURE = range(2) def log2ceil(n): m = 0 p = 1 for i in range(n+1): if p < n: m += 1 p *= 2 return m
DannyBoyBroadSword/JSONpythonComms
refs/heads/master
comm.py
1
import requests #Library for Post Get and Put Requests import json #Handels Data from __builtin__ import raw_input #Auto IMport thanks eclipse def initiate(): #initiate() creates a url with some "data" headers = {'content-type': 'application/json'} #headers make everything smoothe data=json.dumps({"Dat...
sencha/chromium-spacewalk
refs/heads/master
tools/valgrind/common.py
184
# 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. import logging import platform import os import signal import subprocess import sys import time class NotImplementedError(Exception): pass class Ti...
TomTranter/OpenPNM
refs/heads/master
tests/unit/models/phase/ElectricalConductivityTest.py
1
import openpnm as op class ElectricalConductivityTest: def setup_class(self): self.net = op.network.Cubic(shape=[3, 3, 3]) self.phase = op.phases.GenericPhase(network=self.net) self.phase['pore.intrinsic_conductivity'] = 1 self.phase['pore.volume_fraction'] = 0.5 def test_perc...
Tribler/decentralized-mortgage-market
refs/heads/master
market/models/house.py
2
from storm.properties import Int, Unicode, Float class House(object): """ This class represents a house for which a mortgage is created. """ __storm_table__ = "house" id = Int(primary=True) postal_code = Unicode() house_number = Unicode() address = Unicode() price = Float() ur...
nikhilprathapani/python-for-android
refs/heads/master
python-build/python-libs/gdata/build/lib/gdata/tlslite/utils/PyCrypto_AES.py
359
"""PyCrypto AES implementation.""" from cryptomath import * from AES import * if pycryptoLoaded: import Crypto.Cipher.AES def new(key, mode, IV): return PyCrypto_AES(key, mode, IV) class PyCrypto_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, ...
J861449197/edx-platform
refs/heads/master
lms/djangoapps/django_comment_client/utils.py
43
from collections import defaultdict from datetime import datetime import json import logging import pytz from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.db import connection from django.http import HttpResponse from django.utils.timezone import UTC import pystache_c...
adrianschlatter/python-ivi
refs/heads/master
ivi/agilent/agilentMSO6014A.py
7
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich 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...
cdondrup/naoqi_interfaces
refs/heads/master
src/naoqi_interfaces/services/service_proxy.py
1
from naoqi import ALProxy class ServiceProxy(object): def __init__(self, proxy_name): """ Creates a proxy for simple service calls. Proxies can be called in different ways: service = ServiceProxy("ALAnimatedSpeech") service.ALAnimatedSpeech.say("test") service.prox...
aknuds1/srl-python-lib
refs/heads/master
Tests/testqtgui/testapplication.py
1
""" Test QApplication wrapper. """ from _common import * if has_qt4: from srllib.qtgui import Application from PyQt4.QtCore import QTimer @only_qt4 class ApplicationTest(TestCase): def test_set_excepthook(self): def exchook(exc, value, tb, threadname): self.__invoked = (exc, value, tb,...
wxue/xiakelite
refs/heads/master
libs/jinja2/testsuite/lexnparse.py
12
# -*- coding: utf-8 -*- """ jinja2.testsuite.lexnparse ~~~~~~~~~~~~~~~~~~~~~~~~~~ All the unittests regarding lexing, parsing and syntax. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import os import sys import time import tempfile import unittest from ...
fhe-odoo/odoo
refs/heads/8.0
addons/website_hr/models/hr.py
306
# -*- coding: utf-8 -*- from openerp.osv import osv, fields class hr(osv.osv): _inherit = 'hr.employee' _columns = { 'website_published': fields.boolean('Available in the website', copy=False), 'public_info': fields.text('Public Info'), } _defaults = { 'website_published': Fal...
impowski/servo
refs/heads/master
tests/wpt/harness/wptrunner/wptmanifest/tests/test_tokenizer.py
195
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import sys import os import unittest sys.path.insert(0, os.path.abspath("..")) from cStringIO import StringIO from .. ...
pfalcon/picotui
refs/heads/master
examples/example_filter_listbox.py
1
# # This example shows how to change the items of a ListBox widget # when the current selection of a DropDown widget changes. # from picotui.screen import Screen from picotui.widgets import * from picotui.defs import * if __name__ == "__main__": s = Screen() # Set the list of all available DropDown choices ...
HyperBaton/ansible
refs/heads/devel
lib/ansible/modules/network/netscaler/netscaler_gslb_vserver.py
124
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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', ...
txm/potato
refs/heads/master
django/contrib/markup/tests.py
245
# Quick tests for the markup templatetags (django.contrib.markup) import re from django.template import Template, Context, add_to_builtins from django.utils import unittest from django.utils.html import escape add_to_builtins('django.contrib.markup.templatetags.markup') try: import textile except ImportError: ...
haobtc/bitcoin
refs/heads/master
qa/rpc-tests/invalidtxrequest.py
108
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import ComparisonTestFramework from test_framework.comptool import Tes...
lxiange/shadowsocks
refs/heads/master
shadowsocks/crypto/rc4_md5.py
1042
#!/usr/bin/env python # # Copyright 2015 clowwindy # # 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 ...
elyezer/robottelo
refs/heads/master
robottelo/performance/pulp.py
8
"""Test utilities for writing Pulp tests Part of functionalities of Pulp are defined in this module and have utilities of single repository synchronization, single sequential repository sync, sequential repository re-sync. """ import logging from robottelo import ssh from robottelo.cli.base import CLIReturnCodeError...
jomyhuang/sdwle
refs/heads/master
SDWLE/cards/spells/__init__.py
2
from SDWLE.cards.spells.neutral import ( ArmorPlating, EmergencyCoolant, FinickyCloakfield, ReversingSwitch, RustyHorn, TimeRewinder, WhirlingBlades, TheCoin ) from SDWLE.cards.spells.druid import ( Innervate, Moonfire, Claw, Naturalize, Savagery, MarkOfTheWild, ...
smmribeiro/intellij-community
refs/heads/master
python/testData/resolve/multiFile/importOsPath/yos/__init__.py
83
def makedir(foo): print foo
Zord13appdesa/python-for-android
refs/heads/master
python-modules/twisted/twisted/test/test_sob.py
60
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. import sys, os try: import Crypto.Cipher.AES except ImportError: Crypto = None from twisted.trial import unittest from twisted.persisted import sob from twisted.python import components class Dummy(components.Componentized): ...
doublebits/osf.io
refs/heads/develop
website/tokens/handlers.py
5
import httplib as http from flask import redirect, request import markupsafe from modularodm import Q from framework.auth.decorators import must_be_logged_in from framework.exceptions import HTTPError, PermissionsError from framework import status from website.tokens.exceptions import UnsupportedSanctionHandlerKind,...
pavpanchekha/bitrate-lab
refs/heads/master
pysim/old/minproved.py
1
# Colleen Josephson, 2013 # This file attempts to implement the minstrel rate control algorithm from random import randint from random import choice import rates from rates import ieee80211_to_idx class BalancedEWMA: def __init__(self, time, time_step, pval): self.p = pval self.time = time ...
cjgrady/compression
refs/heads/master
poc/src/rle/normal.py
1
""" @summary: Module containing classes for normal run length encoding """ import struct from matrix.matrix import Matrix # ............................................................................. class NormalRLECompressedMatrix(Matrix): # ........................... def __init__(self, mtx=None): if ...
cognitiveclass/edx-platform
refs/heads/master
common/djangoapps/util/organizations_helpers.py
62
""" Utility library for working with the edx-organizations app """ from django.conf import settings from django.db.utils import DatabaseError def add_organization(organization_data): """ Client API operation adapter/wrapper """ if not organizations_enabled(): return None from organization...
habnabit/pip
refs/heads/develop
pip/_vendor/requests/packages/urllib3/packages/__init__.py
2161
from __future__ import absolute_import from . import ssl_match_hostname
Edraak/edx-platform
refs/heads/master
common/test/acceptance/pages/studio/container.py
65
""" Container page in Studio """ from bok_choy.page_object import PageObject from bok_choy.promise import Promise, EmptyPromise from . import BASE_URL from ..common.utils import click_css, confirm_prompt from .utils import type_in_codemirror class ContainerPage(PageObject): """ Container page in Studio ...
freakynit/vertx-web
refs/heads/master
src/test/sockjs-protocol/venv/lib/python2.7/site-packages/pip/_vendor/distlib/__init__.py
164
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import logging __version__ = '0.1.7' class DistlibException(Exception): pass try: from logging import NullHandler except Impor...
staute/shinken_package
refs/heads/master
shinken/db_sqlite.py
19
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you c...
JohnnyKing94/pootle
refs/heads/master
pytest_pootle/fixtures/mock.py
9
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. """Monkeypatching fixtures.""" from _pytest...
bongo-project/bongo
refs/heads/master
src/libs/python/bongo/admin/Smtp.py
1
import Handler, Mdb, Security, Template, Util from bongo import MDB def ShowSmtp(req): tmpl = Template.Template('tmpl/smtp.tmpl') tmpl.SendPage(req) return 0
Acehaidrey/incubator-airflow
refs/heads/master
tests/core/test_sqlalchemy_config.py
7
# # 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...
ziir/gandi.cli
refs/heads/master
gandi/cli/modules/paas.py
1
""" PaaS commands module. """ import os import re from gandi.cli.core.base import GandiModule from gandi.cli.modules.metric import Metric from gandi.cli.modules.vhost import Vhost from gandi.cli.modules.datacenter import Datacenter from gandi.cli.modules.sshkey import SshkeyHelper class Paas(GandiModule, SshkeyHelp...
ChengyuSong/xen-arm
refs/heads/chromebook
tools/python/scripts/xapi.domcfg.py
43
# # VM Configuration for Xen API # name_label = 'GentooAPI' name_description = 'Gentoo VM via API' user_version = 1 is_a_template = False memory_static_max = 32 memory_dynamic_max = 32 memory_dynamic_min = 32 memory_static_min = 32 VCPUs_policy = '' VCPUs_params = '' VCPUS_features_required = '' VCPUs_featu...
partofthething/home-assistant
refs/heads/dev
homeassistant/components/channels/const.py
25
"""Constants for the Channels component.""" DOMAIN = "channels" SERVICE_SEEK_FORWARD = "seek_forward" SERVICE_SEEK_BACKWARD = "seek_backward" SERVICE_SEEK_BY = "seek_by"
zhuoyang/kernel
refs/heads/14.5.0.242
Documentation/networking/cxacru-cf.py
14668
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 i...
anthonybrice/COMP469
refs/heads/master
w2/search/pacman.py
7
# pacman.py # --------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to # http://inst.eecs.berkele...
ritzk/ansible-modules-extras
refs/heads/devel
cloud/centurylink/clc_blueprint_package.py
43
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # # 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 la...
cris-iisc/mpc-primitives
refs/heads/master
crislib/libscapi/lib/boost_1_64_0/libs/iterator/doc/generate.py
61
#!/usr/bin/python # Copyright David Abrahams 2004. Use, modification and distribution is # subject to the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # # Generate html, TeX, and PDF versions of all the source files # import os import sy...
alu0100207385/dsi_3Django
refs/heads/master
django/contrib/gis/tests/layermap/tests.py
62
# coding: utf-8 from __future__ import absolute_import, unicode_literals import os from copy import copy from decimal import Decimal from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql from django.db import router from django.conf import settings from django.t...
coolman100/coolmanbot
refs/heads/master
app.py
1
#!/usr/bin/env python from __future__ import print_function from future.standard_library import install_aliases install_aliases() from urllib.parse import urlparse, urlencode from urllib.request import urlopen, Request from urllib.error import HTTPError import json import os from flask import Flask from flask impor...
jklaiho/django-class-fixtures
refs/heads/master
docs/conf.py
1
# -*- coding: utf-8 -*- # # django-class-fixtures documentation build configuration file, created by # sphinx-quickstart on Tue Jun 7 10:53:29 2011. # # 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...
vamsirajendra/nupic
refs/heads/master
nupic/data/__init__.py
40
# ---------------------------------------------------------------------- # 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...
Distrotech/intellij-community
refs/heads/master
python/testData/intentions/PyConvertCollectionLiteralIntentionTest/convertSetToTuple_after.py
312
xs = (1, 2)
3nids/QGIS
refs/heads/master
tests/src/python/test_qgsrendererrasterpropertieswidget.py
32
import pathlib from qgis.testing import start_app, unittest, TestCase from qgis.testing.mocked import get_iface from qgis.core import QgsRasterLayer, QgsProject, QgsMultiBandColorRenderer, QgsRasterRenderer, QgsSingleBandGrayRenderer from qgis.gui import QgsRendererRasterPropertiesWidget, QgsMapCanvas, QgsMultiBandColo...
forseti-security/forseti-security
refs/heads/master
google/cloud/forseti/common/gcp_type/project.py
1
# Copyright 2017 The Forseti Security 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 ap...
dashea/zanata-python-client
refs/heads/master
setup.py
1
#!/usr/bin/env python """ Build script for zanata-python-client """ from setuptools import setup, find_packages import os import subprocess def get_client_version(): number = "" path = os.path.dirname(os.path.realpath(__file__)) version_file = os.path.join(path, 'zanataclient/VERSION-FILE') version_ge...
ysywh/ryu
refs/heads/master
ryu/services/protocols/bgp/utils/evtlet.py
48
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
lifei/flask-admin
refs/heads/master
flask_admin/model/filters.py
5
import time import datetime from flask_admin.babel import lazy_gettext class BaseFilter(object): """ Base filter class. """ def __init__(self, name, options=None, data_type=None): """ Constructor. :param name: Displayed name :param opti...
Schevo/schevo
refs/heads/master
schevo/test/test_label.py
1
"""Object decoration unit tests.""" # Copyright (c) 2001-2009 ElevenCraft Inc. # See LICENSE for details. from schevo.test import CreatesSchema, raises from schevo import base from schevo import error from schevo.introspect import isextentmethod from schevo import label from schevo import transaction class BaseDeco...
benesch/pip
refs/heads/master
pip/req/__init__.py
806
from __future__ import absolute_import from .req_install import InstallRequirement from .req_set import RequirementSet, Requirements from .req_file import parse_requirements __all__ = [ "RequirementSet", "Requirements", "InstallRequirement", "parse_requirements", ]
akaminsky/ghost_blog
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/util.py
269
# -*- coding: utf-8 -*- """ pygments.util ~~~~~~~~~~~~~ Utility functions. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import sys import codecs split_path_re = re.compile(r'[/\\ ]') doctype_lookup_re = re.compile(r'''(...
beni55/edx-platform
refs/heads/master
common/djangoapps/student/migrations/0039_auto__del_courseregistrationcode.py
114
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'CourseRegistrationCode' db.delete_table('student_courseregistrationcode') def backwa...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/parcats/line/colorbar/_outlinecolor.py
1
import _plotly_utils.basevalidators class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="parcats.line.colorbar", **kwargs ): super(OutlinecolorValidator, self).__init__( plotly_name=plotly_name, ...
Mercy-Nekesa/sokoapp
refs/heads/master
sokoapp/deals/admin.py
1
from django.contrib import admin from testdeals.deals.models import Deal class DealAdmin(admin.ModelAdmin): fields=('title', 'price', 'description', 'url', 'date',) admin.site.register(Deal)
mvo5/snapcraft
refs/heads/master
tests/unit/pluginhandler/test_dirty_report.py
4
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
strk/QGIS
refs/heads/master
tests/src/python/test_qgsdatabasetablecombobox.py
32
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsDatabaseTableComboBox .. note:: 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 versio...
toshywoshy/ansible
refs/heads/devel
lib/ansible/plugins/lookup/cartesian.py
141
# (c) 2013, Bradley Young <young.bradley@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 = """ lookup: cartesian version_added...
librato/librato-python-web
refs/heads/master
librato_python_web/instrumentor/instrument.py
1
# Copyright (c) 2015. Librato, 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 a...
acshi/osf.io
refs/heads/develop
website/addons/s3/model.py
10
# -*- coding: utf-8 -*- from modularodm import fields from framework.auth.core import Auth from website.addons.base import exceptions from website.addons.base import AddonOAuthUserSettingsBase, AddonOAuthNodeSettingsBase from website.addons.base import StorageAddonBase from website.addons.s3.provider import S3Provi...
rahushen/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/netapp_e_storagepool.py
14
#!/usr/bin/python # (c) 2016, NetApp, 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'], ...
giova17/iptvgiova
refs/heads/master
CustomPlayer.py
285
# -*- coding: utf-8 -*- import xbmc class MyXBMCPlayer(xbmc.Player): def __init__( self, *args, **kwargs ): self.is_active = True self.urlplayed = False self.pdialogue=None print "#XBMCPlayer#" #def play(self, url, listitem): # print 'Now im playing... %s' % url ...
44px/redash
refs/heads/master
redash/query_runner/mysql.py
4
import json import logging import os from redash.query_runner import * from redash.settings import parse_boolean from redash.utils import JSONEncoder logger = logging.getLogger(__name__) types_map = { 0: TYPE_FLOAT, 1: TYPE_INTEGER, 2: TYPE_INTEGER, 3: TYPE_INTEGER, 4: TYPE_FLOAT, 5: TYPE_FLOA...
makaimc/txt2react
refs/heads/master
payments/urls.py
1
from django.conf.urls.defaults import * urlpatterns = patterns('payments.views', url(r'^home/purchased/(?P<uid>\d+)/(?P<id>\d+)/$', 'purchased'), # callback url(r'^pay/$', 'stripePayment'), url(r'^receipt/(?P<pid>[0-9]+)/$', 'receipt', name='receipt'), )
linkedin/indextank-service
refs/heads/master
storefront/boto/ec2/elb/loadbalancer.py
2
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.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, modi...
a-parhom/edx-platform
refs/heads/master
cms/djangoapps/contentstore/views/tabs.py
18
""" Views related to course tabs """ from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.http import HttpResponseNotFound from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.http import require_http_methods from o...