repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
roselleebarle04/django
refs/heads/master
django/db/backends/postgresql_psycopg2/creation.py
465
from ..postgresql.creation import * # NOQA
weisongchen/flaskapp
refs/heads/master
venv/lib/python2.7/site-packages/flask/app.py
46
# -*- coding: utf-8 -*- """ flask.app ~~~~~~~~~ This module implements the central WSGI application object. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys from threading import Lock from datetime import timedelta from itertools import ...
RyokoAkizuki/mtasa-blue
refs/heads/master
vendor/google-breakpad/src/tools/gyp/test/ninja/normalize-paths-win/gyptest-normalize-paths.py
165
#!/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. """ Make sure paths are normalized with VS macros properly expanded on Windows. """ import TestGyp import sys if sys.platform == 'win32':...
openhatch/oh-mainline
refs/heads/master
vendor/packages/gdata/tests/gdata_tests/youtube_test.py
128
#!/usr/bin/python # # Copyright (C) 2006 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 ...
gerrive/horizon
refs/heads/master
openstack_dashboard/test/test_plugins/panel_group_config/_10_admin_add_panel_group.py
124
# The name of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'plugin_panel_group' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = 'Plugin Panel Group' # The name of the dashboard the PANEL_GROUP associated with. Required. PANEL_GROUP_DASHBOARD = 'admin'
d10genes/gensim
refs/heads/develop
gensim/corpora/dictionary.py
35
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ This module implements the concept of Dictionary -- a mapping between words and their integer ids. Dictionaries can be created fro...
Universal-Model-Converter/UMC3.0a
refs/heads/master
data/Python/x86/Lib/site-packages/OpenGL/GL/VERSION/GL_3_2.py
2
'''OpenGL extension VERSION.GL_3_2 This module customises the behaviour of the OpenGL.raw.GL.VERSION.GL_3_2 to provide a more Python-friendly API The official definition of this extension is available here: http://www.opengl.org/registry/specs/VERSION/GL_3_2.txt ''' from OpenGL import platform, constants, constant,...
open-pli/enigma2
refs/heads/master
lib/python/Components/VariableValue.py
132
class VariableValue(object): """VariableValue can be used for components which have a variable value (like eSlider), based on any widget with setValue call""" def __init__(self): self.__value = 0 def setValue(self, value): self.__value = value if self.instance: try: self.instance.setValue(self.__value...
youdonghai/intellij-community
refs/heads/master
python/helpers/py3only/docutils/utils/math/latex2mathml.py
46
#!/usr/bin/env python # -*- coding: utf-8 -*- # :Id: $Id: latex2mathml.py 7668 2013-06-04 12:46:30Z milde $ # :Copyright: © 2010 Günter Milde. # Based on rst2mathml.py from the latex_math sandbox project # © 2005 Jens Jørgen Mortensen # :License: Released under the terms of the `2-Clause BSD li...
mskrzypkows/servo
refs/heads/master
tests/wpt/web-platform-tests/XMLHttpRequest/resources/inspect-headers.py
187
def main(request, response): headers = [] if "cors" in request.GET: headers.append(("Access-Control-Allow-Origin", "*")) headers.append(("Access-Control-Allow-Credentials", "true")) headers.append(("Access-Control-Allow-Methods", "GET, POST, PUT, FOO")) headers.append(("Access-Co...
sitdh/com-prog
refs/heads/master
ch02_04.py
1
start_hour = int(input()) start_minute = int(input()) stop_hour = int(input()) stop_minute = int(input()) hour_diff = stop_hour - start_hour min_diff = stop_minute - start_minute parking_price = 0; ''' Out of service ''' if not(start_hour in range(7, 24) and stop_hour in range(7, 24)): ex...
0ge/Risk-It
refs/heads/develop
sim/WorldMap.py
1
import xml.etree.ElementTree as ET import Territory import Continent import sys class WorldMap(object): name = "" territories = [] continents = [] def is_valid_territories(self): names = [] for t in self.territories: names.append(t.name) for n in t.nei...
stephendade/ardupilot
refs/heads/master
Tools/scripts/playback_log_fg.py
31
#!/usr/bin/env python ''' play back an onboard log as a FlightGear FG NET stream Useful for visualising flights ''' from builtins import object import sys import time from pymavlink import fgFDM from pymavlink import mavutil from argparse import ArgumentParser parser = ArgumentParser(description=__doc__) parser....
fjcapdevila/django-helpdesk
refs/heads/master
helpdesk/akismet.py
10
# Version 0.2.0 # 2009/06/18 # Copyright Michael Foord 2005-2009 # akismet.py # Python interface to the akismet API # E-mail fuzzyman@voidspace.org.uk # http://www.voidspace.org.uk/python/modules.shtml # http://akismet.com # Released subject to the BSD License # See http://www.voidspace.org.uk/python/license.shtml ...
RuudBurger/CouchPotatoServer
refs/heads/master
libs/CodernityDB/database_safe_shared.py
37
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011-2013 Codernity (http://codernity.com) # # 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/L...
alikins/ansible
refs/heads/devel
lib/ansible/modules/cloud/docker/docker_volume.py
45
#!/usr/bin/python # coding: utf-8 # # Copyright 2017 Red Hat | Ansible, Alex Grönholm <alex.gronholm@nextday.fi> # 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 = {'meta...
ProfessorX/Config
refs/heads/master
.PyCharm30/system/python_stubs/-1247972723/PyQt4/QtGui/__init__/QPictureIO.py
2
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QPictureIO(): # skipped bases: <type 'sip.simplewrapper'> """ QPictureIO() QPictureIO(QIODevice, str) QPictureIO(QString, s...
GRArmstrong/invenio-inspire-ops
refs/heads/prod
modules/docextract/lib/refextract_kbs.py
12
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of t...
alexsandrohaag/odoo-website-addons
refs/heads/master
website_crm_lead_creation/controllers/__init__.py
2
''' Created on 09/08/2015 @author: danimar ''' from . import main
siosio/intellij-community
refs/heads/master
python/testData/intentions/PyConvertCollectionLiteralIntentionTest/convertOneElementIncompleteListToTuple.py
37
[42
pkappesser/youtube-dl
refs/heads/master
devscripts/make_supportedsites.py
39
#!/usr/bin/env python from __future__ import unicode_literals import io import optparse import os import sys # Import youtube_dl ROOT_DIR = os.path.join(os.path.dirname(__file__), '..') sys.path.insert(0, ROOT_DIR) import youtube_dl def main(): parser = optparse.OptionParser(usage='%prog OUTFILE.md') optio...
superdesk/Live-Blog
refs/heads/master
plugins/superdesk-verification/superdesk/verification/impl/status.py
2
''' Created on Oct 3, 2013 @package: superdesk post verification @copyright: 2013 Sourcefabric o.p.s. @license: http://www.gnu.org/licenses/gpl-3.0.txt @author: Ioan v. Pocol Contains the SQL alchemy implementation for post verification status API. ''' from ..api.status import IVerificationStatusService from ..meta....
andrew-szymanski/gae_django
refs/heads/master
django/contrib/gis/db/models/proxy.py
404
""" The GeometryProxy object, allows for lazy-geometries. The proxy uses Python descriptors for instantiating and setting Geometry objects corresponding to geographic model fields. Thanks to Robert Coup for providing this functionality (see #4322). """ class GeometryProxy(object): def __init__(self, klass, field...
nikesh-mahalka/nova
refs/heads/master
nova/vnc/xvp_proxy.py
16
#!/usr/bin/env python # Copyright (c) 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/LICEN...
kitanaisia/SDR
refs/heads/master
SDRByKeyword.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys sys.path.append("../python_lib/") import codecs import vital import mecabutil import feature import scipy.spatial.distance import os from gensim.models import word2vec sys.path.append("./config/") from textquery import Environment # 文字列出力時にencode("utf-8")して出力す...
lxki/pjsip
refs/heads/master
tests/pjsua/scripts-sendto/201_ice_mismatch_2.py
59
# $Id: 201_ice_mismatch_2.py 2392 2008-12-22 18:54:58Z bennylp $ import inc_sip as sip import inc_sdp as sdp sdp = \ """ v=0 o=- 0 0 IN IP4 127.0.0.1 s=pjmedia c=IN IP4 127.0.0.1 t=0 0 m=audio 4000 RTP/AVP 0 101 a=rtcp:4382 IN IP4 192.168.0.4 a=ice-ufrag:1234 a=ice-pwd:5678 a=rtpmap:0 PCMU/8000 a=sendrecv a=rtpmap:101...
ku3o/coala-bears
refs/heads/master
bears/c_languages/CPPCleanBear.py
5
from coalib.bearlib.abstractions.Linter import linter from coalib.bears.requirements.PipRequirement import PipRequirement @linter(executable='cppclean', output_format='regex', output_regex=r'.+:(?P<line>\d+):(?P<message>.*)') class CPPCleanBear: """ Find problems in C++ source code that slow d...
duqiao/django
refs/heads/master
tests/db_functions/models.py
245
""" Tests for built in Function expressions. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=50) alias = models.CharField(max_leng...
DPaaS-Raksha/horizon
refs/heads/master
horizon/forms/fields.py
12
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
Danielhiversen/home-assistant
refs/heads/master
tests/components/alarm_control_panel/test_manual_mqtt.py
2
"""The tests for the manual_mqtt Alarm Control Panel component.""" from datetime import timedelta import unittest from unittest.mock import patch, Mock from homeassistant.setup import setup_component from homeassistant.const import ( STATE_ALARM_DISARMED, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_AWAY, STATE_A...
RalphBariz/RalphsDotNet
refs/heads/master
Old/RalphsDotNet.Apps.OptimizationStudio/Resources/PyLib/scipy/special/tests/test_mpmath.py
53
""" Test Scipy functions versus mpmath, if available. """ import sys import re import numpy as np from numpy.testing import dec import scipy.special as sc from scipy.special._testutils import FuncData, assert_func_equal if sys.platform == 'cli': mpmath = None else: try: import mpmath except Impor...
MissionCriticalCloud/marvin
refs/heads/master
marvin/cloudstackAPI/removeFromGlobalLoadBalancerRule.py
1
"""Removes a load balancer rule association with global load balancer rule""" from baseCmd import * from baseResponse import * class removeFromGlobalLoadBalancerRuleCmd (baseCmd): typeInfo = {} def __init__(self): self.isAsync = "true" """The ID of the load balancer rule""" """Require...
bitesofcode/pyramid_restful
refs/heads/master
tests/test_endpoints.py
1
import pytest def test_put_login_from_class_not_found(basics, pyramid_app): r = pyramid_app.put('/api/v1/login', params='username=bob', expect_errors=True) assert r.status_code == 404 def test_get_null_login(basics, pyramid_app): r = pyramid_app.get('/api/v1/login') assert r.json is None def test_set...
fernand/scipy
refs/heads/master
scipy/special/orthogonal.py
57
""" A collection of functions to find the weights and abscissas for Gaussian Quadrature. These calculations are done by finding the eigenvalues of a tridiagonal matrix whose entries are dependent on the coefficients in the recursion formula for the orthogonal polynomials with the corresponding weighting function over ...
Mhynlo/SickRage
refs/heads/master
lib/fanart/immutable.py
65
class Immutable(object): _mutable = False def __setattr__(self, name, value): if self._mutable or name == '_mutable': super(Immutable, self).__setattr__(name, value) else: raise TypeError("Can't modify immutable instance") def __delattr__(self, name): if sel...
tquizzle/Sick-Beard
refs/heads/development
lib/hachoir_parser/image/png.py
90
""" PNG picture file parser. Documents: - RFC 2083 http://www.faqs.org/rfcs/rfc2083.html Author: Victor Stinner """ from lib.hachoir_parser import Parser from lib.hachoir_core.field import (FieldSet, Fragment, ParserError, MissingField, UInt8, UInt16, UInt32, String, CString, Bytes, RawBytes, B...
safwanrahman/linuxdesh
refs/heads/master
kitsune/inproduct/admin.py
22
from django.contrib import admin from kitsune.inproduct.models import Redirect class RedirectAdmin(admin.ModelAdmin): list_display = ('product', 'version', 'platform', 'locale', 'topic', 'target') list_display_links = ('topic', 'target') list_filter = ('product', 'version', 'platform'...
aisipos/django
refs/heads/master
tests/signed_cookies_tests/tests.py
26
from __future__ import unicode_literals from django.core import signing from django.http import HttpRequest, HttpResponse from django.test import SimpleTestCase, override_settings from django.test.utils import freeze_time class SignedCookieTest(SimpleTestCase): def test_can_set_and_read_signed_cookies(self): ...
jk1/intellij-community
refs/heads/master
python/testData/formatter/blankLinesAfterTopLevelImportsBeforeClass_after.py
24
import sys class C: x = sys.path
ajs124/esp-idf
refs/heads/master
components/idf_test/integration_test/TestCaseScript/WiFiStress/__init__.py
15
__all__ = ["WifiJAP", ]
p4l1ly/currency_converter
refs/heads/master
setup.py
1
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.rst') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='currency', version='0.1.0', description='Currency converter', long_description=readme, author='Pavol Vargovčík', ...
sparkslabs/kamaelia
refs/heads/master
Sketches/MPS/BugReports/FixTests/Kamaelia/Examples/Contrib/Kamaelia.Apps.SA/PeriodicTick.1.py
6
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Vers...
zhangwenyu/packages
refs/heads/master
brick/brick/openstack/common/local.py
5
# Copyright 2011 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 # # U...
sauloal/pycluster
refs/heads/master
pypy-1.9_64/lib-python/2.7/test/test_iterlen.py
121
""" Test Iterator Length Transparency Some functions or methods which accept general iterable arguments have optional, more efficient code paths if they know how many items to expect. For instance, map(func, iterable), will pre-allocate the exact amount of space required whenever the iterable can report its length. T...
Wingless-Archangel/CustomCommand
refs/heads/master
Python Practice/learn_django/lib/python3.6/site-packages/setuptools/command/test.py
130
import os import operator import sys import contextlib import itertools from distutils.errors import DistutilsError, DistutilsOptionError from distutils import log from unittest import TestLoader import six from six.moves import map, filter from pkg_resources import (resource_listdir, resource_exists, normalize_path,...
htwenhe/DJOA
refs/heads/master
env/Lib/site-packages/pip/utils/__init__.py
323
from __future__ import absolute_import from collections import deque import contextlib import errno import io import locale # we have a submodule named 'logging' which would shadow this if we used the # regular name: import logging as std_logging import re import os import posixpath import shutil import stat import su...
vtemian/kademlia
refs/heads/master
kademlia/networking/udp_client.py
1
import json import socket from kademlia.node import Node from .base import BaseClient class KademliaUDPClient(BaseClient): def start(self): self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) def send(self, node, data, loop=None): if isinstance(node, Node): address = ...
sf-wind/caffe2
refs/heads/master
caffe2/experiments/python/tt_contraction_op_test.py
4
# Copyright (c) 2016-present, Facebook, 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...
jsalva/ndim
refs/heads/master
ndim/ndim/models.py
10644
from django.db import models # Create your models here.
jyotsna1820/django
refs/heads/master
tests/raw_query/tests.py
10
from __future__ import unicode_literals from datetime import date from django.db.models.query_utils import InvalidQuery from django.test import TestCase, skipUnlessDBFeature from .models import Author, Book, Coffee, Reviewer, FriendlyAuthor class RawQueryTests(TestCase): fixtures = ['raw_query_books.json'] ...
qedi-r/home-assistant
refs/heads/dev
tests/components/dsmr/__init__.py
36
"""Tests for the dsmr component."""
dimara/synnefo
refs/heads/develop
snf-pithos-app/pithos/api/resources.py
10
# Copyright (C) 2010-2014 GRNET S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed i...
toannhu/Simple-English-draughts-AI
refs/heads/master
src/checker/checkers_playerB.py
1
# ======================== Class Player ======================================= import copy import string DEPTH_LIMIT = 5 # wrapper for alpha-beta info # v = [move_value, move, max tree depth, # child nodes, # max/beta cutoff, # min/alpha cutoff] class AB_Value: def __init__(self, move_value, move, max_depth, chi...
gdimitris/ChessPuzzlerBackend
refs/heads/master
Virtual_Environment/lib/python2.7/site-packages/pip/commands/completion.py
435
from __future__ import absolute_import import sys from pip.basecommand import Command BASE_COMPLETION = """ # pip %(shell)s completion start%(script)s# pip %(shell)s completion end """ COMPLETION_SCRIPTS = { 'bash': """ _pip_completion() { COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\ CO...
UTSA-ICS/keystone-SID
refs/heads/master
keystone/tests/test_v2_controller.py
5
# -*- coding: utf-8 -*- # Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
nvoron23/netmiko
refs/heads/master
netmiko/__init__.py
1
from ssh_dispatcher import ssh_dispatcher __version__ = '0.1.3'
doganaltunbay/odoo
refs/heads/8.0
openerp/addons/test_documentation_examples/extension.py
366
# -*- coding: utf-8 -*- from openerp import models, fields class Extension0(models.Model): _name = 'extension.0' name = fields.Char(default="A") class Extension1(models.Model): _inherit = 'extension.0' description = fields.Char(default="Extended")
amirrpp/django-oscar
refs/heads/master
src/oscar/apps/dashboard/reports/__init__.py
59
default_app_config = ( 'oscar.apps.dashboard.reports.config.ReportsDashboardConfig')
dturner-tw/pants
refs/heads/master
tests/python/pants_test/reporting/test_linkify.py
17
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import shu...
limodou/uliweb-admin
refs/heads/master
demo/setup.py
1
import uliweb from uliweb.utils.setup import setup import apps __doc__ = """doc""" setup(name='demo', version=apps.__version__, description="Description of your project", package_dir = {'demo':'apps'}, packages = ['demo'], include_package_data=True, zip_safe=False, ) ...
amondot/QGIS
refs/heads/master
python/plugins/MetaSearch/dialogs/maindialog.py
5
# -*- coding: utf-8 -*- ############################################################################### # # CSW Client # --------------------------------------------------------- # QGIS Catalogue Service client. # # Copyright (C) 2010 NextGIS (http://nextgis.org), # Alexander Bruy (alexander.bruy@gma...
cmelange/ansible
refs/heads/devel
lib/ansible/modules/utilities/logic/pause.py
6
# -*- mode: python -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distr...
jaxkodex/odoo
refs/heads/8.0
openerp/addons/test_workflow/__init__.py
2074
# -*- coding: utf-8 -*- import models # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
histogrammar/histogrammar-python
refs/heads/master
histogrammar/pycparser/yacctab.py
1
# yacctab.py # This file is automatically generated. Do not edit. _tabversion = '3.8' _lr_method = 'LALR' _lr_signature = 'D2705E65EE696DA6F2458A2993EC37A4' _lr_action_items = {'VOID':([0,1,2,3,5,6,9,10,11,12,13,14,15,17,18,19,21,22,23,24,26,27,28,30,32,33,34,36,37,38,39,40,41,43,44,45,46,47,49,50,51,56,57,58,5...
PressLabs/z3
refs/heads/master
z3/snap.py
1
from __future__ import print_function import argparse import functools import logging import operator import os import subprocess import sys from collections import OrderedDict import boto from z3.config import get_config def cached(func): @functools.wraps(func) def cacheing_wrapper(self, *a, **kwa): ...
arunhotra/tensorflow
refs/heads/master
tensorflow/python/training/learning_rate_decay_test.py
5
"""Functional test for learning rate decay.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.python.platform from tensorflow.python.framework import test_util from tensorflow.python.framework import types from tensorflow.python.ops impor...
2014c2g23/2015cd_midterm-
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/pkgdata.py
603
"""pkgdata is a simple, extensible way for a package to acquire data file resources. The getResource function is equivalent to the standard idioms, such as the following minimal implementation:: import sys, os def getResource(identifier, pkgname=__name__): pkgpath = os.path.dirname(sys.modules[p...
ging/keystone
refs/heads/master
keystone/tests/test_v3_assignment.py
2
# 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 # distributed under t...
shubhamgupta123/erpnext
refs/heads/master
erpnext/patches/v5_0/repost_requested_qty.py
90
# 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 def execute(): from erpnext.stock.stock_balance import update_bin_qty, get_indented_qty count=0 for item_code, warehouse in frappe...
public/flake8-import-order
refs/heads/master
tests/test_cases/wrong_from_import_order_cryptography.py
2
# cryptography from A import a, A # I101 from B import A, a, B # I101 from C import b, a # I101
danielvdende/incubator-airflow
refs/heads/master
airflow/api/common/experimental/get_dag_runs.py
18
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
nivertech/libsnark
refs/heads/master
src/gadgetlib1/gadgets/hashes/knapsack/tests/generate_knapsack_tests.py
5
#!/usr/bin/env python ## # @author This file is part of libsnark, developed by SCIPR Lab # and contributors (see AUTHORS). # @copyright MIT license (see LICENSE file) import random import hashlib import struct import math def bitlength(p): return int(math.ceil(math.log(p, 2))) def SHA512_prng(i,...
anryko/ansible
refs/heads/devel
lib/ansible/modules/remote_management/ucs/ucs_ip_pool.py
18
#!/usr/bin/python # -*- coding: utf-8 -*- # 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'], ...
leiferikb/bitpop
refs/heads/master
build/scripts/slave/recipe_modules/gpu/test_api.py
1
# 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. from slave import recipe_test_api import common class GpuTestApi(recipe_test_api.RecipeTestApi): @property def dummy_swarm_hashes(self): return dic...
jtyr/ansible
refs/heads/devel
lib/ansible/plugins/doc_fragments/validate.py
24
# -*- coding: utf-8 -*- # Copyright: (c) 2015, Ansible, 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 class ModuleDocFragment(object): # Standard documentation fragment D...
ahamilton55/ansible
refs/heads/devel
lib/ansible/modules/cloud/webfaction/webfaction_app.py
63
#!/usr/bin/python # # Create a Webfaction application using Ansible and the Webfaction API # # Valid application types can be found by looking here: # http://docs.webfaction.com/xmlrpc-api/apps.html#application-types # # ------------------------------------------ # # (c) Quentin Stafford-Fraser 2015, with contributions...
hainn8x/gnuradio
refs/heads/master
gr-vocoder/examples/alaw_audio_loopback.py
58
#!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
couchbase/moxi
refs/heads/master
t/moxi_mock_a2a.py
4
import sys import string import socket import select import unittest import threading import time import re import moxi_mock_server # Before you run moxi_mock_a2a.py, start a moxi like... # # ./moxi -z 11333=localhost:11311 -p 0 -U 0 -vvv -t 1 # -Z downstream_max=1,downstream_conn_max=0 # # Or, if you're u...
Philippe12/external_chromium_org
refs/heads/kitkat
chrome/test/functional/apptest.py
70
# 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 pyauto_functional # must be imported before pyauto import pyauto class PyAutoEventsTest(pyauto.PyUITest): """Tests using the event queue.""" ...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/isosurface/colorbar/_thicknessmode.py
1
import _plotly_utils.basevalidators class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="isosurface.colorbar", **kwargs ): super(ThicknessmodeValidator, self).__init__( plotly_name=plotly_name,...
autrilla/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/example/bench_wsh.py
495
# Copyright 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 f...
QuantumQuadrate/CsPyController
refs/heads/master
python/digital_waveform.py
1
"""this files contains the workings to store a digital waveform and plot it using Matplotlib""" from __future__ import division __author__ = 'Martin Lichtman' import logging logger = logging.getLogger(__name__) from atom.api import Member, Typed, observe from enaml.application import deferred_call from ins...
EstherLacan/jiangfw
refs/heads/master
python/primary/func_doc.py
1
#!/usr/bin/python # Filename: func_doc.py def printMax(x, y): '''Prints the maximum of two numbers. The two values must be integers.''' x = int(x) # convert to integers, if possible y = int(y) if x > y: print (x, 'is maximum') else: print (y, 'is maximum') printMax(3, 5...
mblondel/scikit-learn
refs/heads/master
sklearn/preprocessing/tests/test_label.py
26
import numpy as np from scipy.sparse import issparse from scipy.sparse import coo_matrix from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.sparse import dok_matrix from scipy.sparse import lil_matrix from sklearn.utils.multiclass import type_of_target from sklearn.utils.testing impor...
syphar/django
refs/heads/master
django/conf/locale/hr/formats.py
504
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y.' TIME_FORMAT = 'H:i' DATE...
cloudbearings/vitess
refs/heads/master
py/vtdb/db_object_custom_sharded.py
10
"""Module containing base class for tables in custom sharded keyspace. Vitess sharding scheme is range-sharded. Vitess supports routing for other sharding schemes by allowing explicit shard_name addressing. This implementation is not fully complete as yet. """ from vtdb import db_object from vtdb import dbexceptions f...
cloud9ers/gurumate
refs/heads/master
environment/lib/python2.7/site-packages/MySQL_python-1.2.4c1-py2.7-linux-x86_64.egg/MySQLdb/constants/ER.py
118
"""MySQL ER Constants These constants are error codes for the bulk of the error conditions that may occur. """ HASHCHK = 1000 NISAMCHK = 1001 NO = 1002 YES = 1003 CANT_CREATE_FILE = 1004 CANT_CREATE_TABLE = 1005 CANT_CREATE_DB = 1006 DB_CREATE_EXISTS = 1007 DB_DROP_EXISTS = 1008 DB_DROP_DELETE = 1009 DB_DROP_RMDIR =...
sharkykh/SickRage
refs/heads/develop
lib/sqlalchemy/orm/exc.py
79
# orm/exc.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """SQLAlchemy ORM exceptions.""" from .. import exc as sa_exc, util NO_STATE = (AttributeE...
dkubiak789/odoo
refs/heads/8.0
addons/account_voucher/__init__.py
358
# -*- 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...
xbsd/CS109
refs/heads/master
content_raj/labs/lab4/data/images/query_bing_images.py
40
from bs4 import BeautifulSoup import requests import re import urllib2 import os import sys def get_soup(url): return BeautifulSoup(requests.get(url).text) query = sys.argv[1] image_type = '_'.join(query.split()) print query, image_type url = "http://www.bing.com/images/search?q=" + query + "&qft=+filterui:color...
atmark-techno/atmark-dist
refs/heads/master
user/python/Lib/test/test_mmap.py
10
import mmap import string, os, re, sys PAGESIZE = mmap.PAGESIZE def test_both(): "Test mmap module on Unix systems and Windows" # Create an mmap'ed file f = open('foo', 'w+') # Write 2 pages worth of data to the file f.write('\0'* PAGESIZE) f.write('foo') f.write('\0'* (PAGESIZE...
captiosus/treadmill
refs/heads/master
tests/supervisor/s6_test.py
1
"""Unit test for S6 services. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import io import os import shutil import tempfile import unittest import mock from treadmill.supervisor import s6 from treadmill.supe...
ScaleXY/speedby
refs/heads/master
speedby/transaction/migrations/0008_auto_20160414_1930.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-04-14 19:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('transaction', '0007_auto_20160414_1922'), ] operations = [ migrations.AlterF...
netmarkjp/myvardiff
refs/heads/master
myvardump.py
1
#!/usr/bin/env python #coding: utf-8 """myvardump - dump mysql variables to json (for myvardiff) https://github.com/netmarkjp/myvardump This program was inspired by myprofiler( https://github.com/methane/myprofiler ) """ import os import sys import json import time from ConfigParser import SafeConfigParser from opt...
mglukhikh/intellij-community
refs/heads/master
python/testData/completion/heavyStarPropagation/lib/_pkg1/_pkg1_0/_pkg1_0_1/_pkg1_0_1_1/__init__.py
30
from ._pkg1_0_1_1_0 import * from ._pkg1_0_1_1_1 import *
phantasien/falkor
refs/heads/master
deps/bastian/deps/v8/tools/testrunner/objects/workpacket.py
123
# Copyright 2012 the V8 project authors. 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 conditi...
lombritz/odoo
refs/heads/8.0
addons/website_event_track/models/__init__.py
926
import event
waynecoulson/TV-Show-Downloader
refs/heads/master
lib/hachoir_parser/container/asn1.py
90
""" Abstract Syntax Notation One (ASN.1) parser. Technical informations: * PER standard http://www.tu.int/ITU-T/studygroups/com17/languages/X.691-0207.pdf * Python library http://pyasn1.sourceforge.net/ * Specification of Abstract Syntax Notation One (ASN.1) ISO/IEC 8824:1990 Information Technology * Specificati...
william-richard/moto
refs/heads/master
moto/codecommit/exceptions.py
2
from moto.core.exceptions import JsonRESTError class RepositoryNameExistsException(JsonRESTError): code = 400 def __init__(self, repository_name): super(RepositoryNameExistsException, self).__init__( "RepositoryNameExistsException", "Repository named {0} already exists".format...
vivekanand1101/bodhi
refs/heads/develop
bodhi/tests/test_utils.py
3
# This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...