repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
s40523142/2017springwcm_g5 | refs/heads/gh-pages | plugin/liquid_tags/diag.py | 270 | """
Blockdiag Tag
---------
This tag implements a liquid style tag for blockdiag [1]. You can use different
diagram types like blockdiag, seqdiag, packetdiag etc. [1]
[1] http://blockdiag.com/en/blockdiag/
Syntax
------
{% blockdiag {
<diagramm type> {
<CODE>
}
}
%}
Examples
-------... |
giorgosera/quar | refs/heads/master | config/urls.py | 1 | from django.conf.urls.defaults import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(adm... |
tomduijf/home-assistant | refs/heads/master | homeassistant/const.py | 1 | # coding: utf-8
""" Constants used by Home Assistant components. """
__version__ = "0.7.5"
# Can be used to specify a catch all when registering state or event listeners.
MATCH_ALL = '*'
# If no name is specified
DEVICE_DEFAULT_NAME = "Unnamed Device"
# #### CONFIG ####
CONF_LATITUDE = "latitude"
CONF_LONGITUDE = "... |
soumyajitpaul/Soumyajit-Github-Byte-3 | refs/heads/master | lib/jinja2/tests.py | 336 | # -*- coding: utf-8 -*-
"""
jinja2.tests
~~~~~~~~~~~~
Jinja test functions. Used with the "is" operator.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import re
from collections import Mapping
from jinja2.runtime import Undefined
from jinja2._compat impor... |
MozillaSecurity/laniakea | refs/heads/master | laniakea/core/providers/ec2/__init__.py | 2 | # coding: utf-8
# 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/.
"""Amazon Elastic Cloud Computing CLI"""
import os
import json
import logging
import argparse
import bot... |
pixo/badtools | refs/heads/master | badtools/test.py | 1 | import badass.core as core
def pub():
path = "/badass/users/pixo/projects/prj/chr/mickey/mod/a/bb"
core.push(doc_id="prj_chr_mickey_mod_a", path=path, comment="unit test")
def release():
core.release(doc_id="prj_chr_mickey_mod_a", version=138)
if __name__ == '__main__':
# pub()
release()
|
Bysmyyr/chromium-crosswalk | refs/heads/master | tools/perf/page_sets/five_blank_pages.py | 32 | # 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 telemetry.page import page as page_module
from telemetry import story
# The PageSet searches for pages relative to the directory the page class is
# de... |
zhenzhai/edx-platform | refs/heads/master | openedx/core/djangoapps/content/course_overviews/migrations/0004_courseoverview_org.py | 81 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('course_overviews', '0003_courseoverviewgeneratedhistory'),
]
operations = [
migrations.AddField(
model_name='cou... |
preete-dixit-ck/incubator-airflow | refs/heads/master | airflow/utils/dag_processing.py | 7 | # -*- coding: utf-8 -*-
#
# 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
... |
hurricup/intellij-community | refs/heads/master | python/testData/refactoring/extractmethod/BinaryExpression.after.py | 70 | def foo():
return bbb
aaa = foo() and ccc |
kennedyshead/home-assistant | refs/heads/dev | homeassistant/components/lcn/binary_sensor.py | 5 | """Support for LCN binary sensors."""
import pypck
from homeassistant.components.binary_sensor import (
DOMAIN as DOMAIN_BINARY_SENSOR,
BinarySensorEntity,
)
from homeassistant.const import CONF_ADDRESS, CONF_DOMAIN, CONF_ENTITIES, CONF_SOURCE
from . import LcnEntity
from .const import BINSENSOR_PORTS, CONF_D... |
SummerCamp17/Gymkhana-Nominations | refs/heads/master | nomi/migrations/0124_auto_20170805_1524.py | 2 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-08-05 15:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('nomi', '0123_merge_20170805_1300'),
]
operations = [
migrations.AlterField(... |
elkingtonmcb/h2o-2 | refs/heads/master | py/testdir_multi_jvm/test_many_cols_and_types.py | 9 | import unittest, random, sys, time, os
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_exec as h2e
# do a random shuffle of 0 thru COLCASES-1, to say what case a column uses
COLCASES = 12
def write_syn_dataset(csvPathname, rowCount, colCount, SEEDPERFILE):
l... |
combust-ml/mleap | refs/heads/master | python/mleap/sklearn/tree/tree.py | 2 | #
# 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 us... |
PetePriority/home-assistant | refs/heads/dev | tests/components/weather/__init__.py | 86 | """The tests for Weather platforms."""
|
yubang/urlHander | refs/heads/master | classes/test/unit.py | 1 | #coding:UTF-8
class Unit():
def __init__(self,request,data):
pass
def text(self):
pass |
chrisxue815/leetcode_python | refs/heads/master | problems/test_0068.py | 1 | import unittest
class Solution:
def fullJustify(self, words, maxWidth):
"""
:type words: List[str]
:type maxWidth: int
:rtype: List[str]
"""
lines = []
lo = 0
line_len = len(words[0])
for hi in range(1, len(words)):
word = words[... |
raimon49/fabric | refs/heads/master | fabfile/utils.py | 27 | from __future__ import with_statement
from contextlib import contextmanager
from fabric.api import hide, puts
@contextmanager
def msg(txt):
puts(txt + "...", end='', flush=True)
with hide('everything'):
yield
puts("done.", show_prefix=False, flush=True)
|
zrax/moul-scripts | refs/heads/master | Python/system/encodings/cp1140.py | 593 | """ Python Character Mapping Codec cp1140 generated from 'python-mappings/CP1140.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,errors='stri... |
TNT-Samuel/Coding-Projects | refs/heads/master | DNS Server/Source - Copy/Lib/encodings/mac_latin2.py | 219 | """ Python Character Mapping Codec mac_latin2 generated from 'MAPPINGS/VENDORS/MICSFT/MAC/LATIN2.TXT' with gencodec.py.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
(c) Copyright 2000 Guido van Rossum.
"""#"
import codecs
### Codec APIs
class Codec(codecs.... |
sgzsh269/django | refs/heads/master | django/conf/locale/da/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. F Y'
TIME_FORMAT = 'H:i'
DATET... |
brianwoo/django-tutorial | refs/heads/master | build/Django/django/core/management/sql.py | 86 | from __future__ import unicode_literals
import io
import os
import re
import warnings
from django.apps import apps
from django.conf import settings
from django.core.management.base import CommandError
from django.db import models, router
from django.utils.deprecation import RemovedInDjango19Warning
from django.utils.... |
ingokegel/intellij-community | refs/heads/master | python/testData/resolve/ImportedTypingListInheritor.py | 20 | from b import A
A().append()
# <ref> |
lakshmi-kannan/st2 | refs/heads/master | st2common/st2common/validators/api/action.py | 8 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... |
ar7z1/ansible | refs/heads/devel | lib/ansible/modules/network/meraki/meraki_config_template.py | 28 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net>
# 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 = {
... |
pforret/python-for-android | refs/heads/master | python-modules/twisted/twisted/conch/ssh/factory.py | 49 | # Copyright (c) 2001-2010 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
A Factory for SSH servers, along with an OpenSSHFactory to use the same
data sources as OpenSSH.
Maintainer: Paul Swartz
"""
from twisted.internet import protocol
from twisted.python import log
from twisted.python.reflect import qu... |
akesandgren/easybuild-framework | refs/heads/main | test/framework/modulestool.py | 2 | # #
# Copyright 2014-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (... |
2013Commons/HUE-SHARK | refs/heads/master | desktop/core/ext-py/Django-1.2.3/django/contrib/messages/storage/session.py | 456 | from django.contrib.messages.storage.base import BaseStorage
class SessionStorage(BaseStorage):
"""
Stores messages in the session (that is, django.contrib.sessions).
"""
session_key = '_messages'
def __init__(self, request, *args, **kwargs):
assert hasattr(request, 'session'), "The sessi... |
rolandmansilla/microblog | refs/heads/master | flask/lib/python2.7/site-packages/whoosh/lang/snowball/german.py | 96 | from .bases import _StandardStemmer
from whoosh.compat import u
class GermanStemmer(_StandardStemmer):
"""
The German Snowball stemmer.
:cvar __vowels: The German vowels.
:type __vowels: unicode
:cvar __s_ending: Letters that may directly appear before a word final 's'.
:type __s_ending: un... |
idlesign/uwsgiconf | refs/heads/master | tests/test_config.py | 1 | import os
from tempfile import NamedTemporaryFile, gettempdir
import pytest
from uwsgiconf.config import Section, Configuration
from uwsgiconf.presets.nice import Section as NiceSection
from uwsgiconf.exceptions import ConfigurationError
def test_section_basics(assert_lines):
assert_lines('set-placeholder = one... |
softwaremechanic/Miscellaneous | refs/heads/master | nnmodels/read_data.py | 1 | import Augmentor
import keras
import numpy as np
import os
import shutil
import subprocess
from sklearn.model_selection import train_test_split
from PIL import Image
import settings
class DataGenerator(keras.utils.Sequence):
"""Generates data for Keras
# Taken from https://stanford.edu/~shervine/blog/keras-h... |
vitan/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/conditional_processing/__init__.py | 389 | # -*- coding:utf-8 -*-
|
klmitch/neutron | refs/heads/master | neutron/tests/common/net_helpers.py | 2 | # Copyright (c) 2015 Thales Services SAS
#
# 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 l... |
raydtang/pcl | refs/heads/master | doc/advanced/content/conf.py | 65 | # All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# -- General configuration -----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext... |
xfournet/intellij-community | refs/heads/master | python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_0/__init__.py | 30 | from ._pkg0_1_0_0 import *
from ._pkg0_1_0_1 import * |
AustinRoy7/Pomodoro-timer | refs/heads/master | venv/Lib/site-packages/pyglet/input/__init__.py | 3 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... |
GarySparrow/mFlaskWeb | refs/heads/master | venv/Lib/site-packages/wheel/test/test_keys.py | 565 | import tempfile
import os.path
import unittest
import json
from wheel.signatures import keys
wheel_json = """
{
"verifiers": [
{
"scope": "+",
"vk": "bp-bjK2fFgtA-8DhKKAAPm9-eAZcX_u03oBv2RlKOBc"
},
{
"scope": "+",
"vk": "KAHZBfyqFW3OcFDbLSG4nPCjXxUPy72phP9I4Rn9MAo"
},
... |
uberamd/NGECore2 | refs/heads/master | scripts/object/tangible/hair/bothan/hair_bothan_female_s06.py | 85615 | import sys
def setup(core, object):
return |
letolab/cookiecutter | refs/heads/master | tests/skipif_markers.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
skipif_markers
--------------
Contains pytest skipif markers to be used in the suite.
"""
import pytest
import os
try:
os.environ[u'TRAVIS']
except KeyError:
travis = False
else:
travis = True
try:
os.environ[u'DISABLE_NETWORK_TESTS']
except KeyErr... |
Scarygami/ancient-societies | refs/heads/master | lib/httplib2/iri2uri.py | 706 | """
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The character... |
Yelp/paasta | refs/heads/master | tests/cli/test_cmds_cook_image.py | 1 | # Copyright 2015-2016 Yelp 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... |
darkpaw/camrap | refs/heads/master | tools/gensquares_lines.py | 1 |
#%%BoundingBox: 0 0 1190 842
print """%!PS-Adobe-1.0
%%EndComments
%%EndProlog
gsave
/f {findfont exch scalefont setfont} bind def
/s {show} bind def
/ps {true charpath} bind def
/l {lineto} bind def
/m {newpath moveto} bind def
matrix currentmatrix /originmat exch def
/umatrix {originmat matrix concatm... |
ahb0327/intellij-community | refs/heads/master | python/testData/codeInsight/controlflow/fortrycontinue.py | 83 | tests = "foo"
for t in tests:
try:
for t in []:
print t
except Exception:
continue
|
h2educ/scikit-learn | refs/heads/master | sklearn/feature_selection/tests/test_chi2.py | 221 | """
Tests for chi2, currently the only feature selection function designed
specifically to work with sparse matrices.
"""
import numpy as np
from scipy.sparse import coo_matrix, csr_matrix
import scipy.stats
from sklearn.feature_selection import SelectKBest, chi2
from sklearn.feature_selection.univariate_selection im... |
Jeff88Ho/python-bitcoinlib | refs/heads/master | bitcoin/tests/test_rpc.py | 25 | # Copyright (C) 2013-2014 The python-bitcoinlib developers
#
# This file is part of python-bitcoinlib.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-bitcoinlib, including this file, may be copied, modified,
# propagated, or dist... |
sinbazhou/odoo | refs/heads/8.0 | addons/procurement_jit/procurement_jit.py | 244 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2013 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
open-synergy/account-financial-tools | refs/heads/8.0 | account_credit_control/partner.py | 7 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi, Guewen Baconnier
# Copyright 2012-2014 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publi... |
cloudtools/troposphere | refs/heads/master | tests/test_yaml.py | 1 | import unittest
from troposphere import Output, Ref, Sub, Template, s3
from troposphere.cloudformation import WaitCondition
s3_bucket_yaml = """\
Description: S3 Bucket Example
Outputs:
BucketName:
Description: Name of S3 bucket to hold website content
Value: !Ref 'S3Bucket'
Resources:
S3Bucket:
Prope... |
rohitw1991/smartfrappe | refs/heads/develop | frappe/core/doctype/version/test_version.py | 30 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# See license.txt
import frappe
import unittest
test_records = frappe.get_test_records('Version')
class TestVersion(unittest.TestCase):
pass
|
sbuss/pydockerfile | refs/heads/master | tests/fixtures.py | 1 | import pytest
from pydockerfile.parser import DockerfileParser
DOCKERFILE_PATH = 'tests/dockerfiles/basic.Dockerfile'
DOCKERFILE_LINE_CONT_PATH = 'tests/dockerfiles/line-cont.Dockerfile'
DOCKERFILE_WITH_COMMENTS_PATH = 'tests/dockerfiles/with-comments.Dockerfile'
@pytest.fixture
def dockerfile_str():
with open... |
Moriadry/tensorflow | refs/heads/master | tensorflow/contrib/framework/python/framework/tensor_util.py | 48 | # Copyright 2015 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... |
PyCon/pycon | refs/heads/master | pycon/tutorials/models.py | 6 | import datetime
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from pycon.models import PyConTutorialProposal
class PyConTutorialMessage(models.Model):
"""Message attached to a tutorial."""
tutorial = models.ForeignKey(PyConTutorialPropo... |
raeeschachar/edx-e2e-mirror | refs/heads/master | regression/pages/studio/__init__.py | 1 | """
Create base url for studio page objects.
While creating the url, basic authentication
username and basic authentication password
should be used.
"""
import os
from regression.pages import BASIC_AUTH_USERNAME, BASIC_AUTH_PASSWORD
LOGIN_BASE_URL = 'https://{}:{}@studio.stage.edx.org'.format(
BASIC_AUTH_USERNAM... |
wilvk/ansible | refs/heads/devel | lib/ansible/plugins/lookup/config.py | 20 | # (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: config
author: Ansible Core
version_added: "2.5"
short_description:... |
hortonworks/hortonworks-sandbox | refs/heads/master | desktop/core/ext-py/Twisted/twisted/manhole/ui/__init__.py | 81 |
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""Twisted Manhole UI: User interface for direct manipulation in Twisted.
"""
|
jaggu303619/asylum | refs/heads/master | openerp/addons/account_test/account_test.py | 46 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id: product_expiry.py 4304 2006-10-25 09:54:51Z ged $
#
# WARNING: This program as such is intended to be used by professional
# prog... |
Oscarlsson/kaggle-scikit | refs/heads/master | code/svm.py | 1 | import pandas as pd
from sklearn.svm import LinearSVC
def svm(xTrain, yTrain, xTest):
svmmodel = LinearSVC()
svmmodel.fit(xTrain, yTrain)
return svmmodel.predict(xTest)
def print_output(yTest, filename):
output = {'Id': range(1, (len(yTest)+1)), 'Solution': yTest}
withcounter = pd.DataFrame(outp... |
mdanielwork/intellij-community | refs/heads/master | python/testData/inspections/PyProtectedMemberInspection/selfField.py | 83 | class B:
def __call__(self, event):
self._call_on_plugins("foo") |
tzhaoredhat/automation | refs/heads/master | pdc/apps/package/__init__.py | 8 | #
# Copyright (c) 2015 Red Hat
# Licensed under The MIT License (MIT)
# http://opensource.org/licenses/MIT
#
default_app_config = 'pdc.apps.package.apps.PackageConfig'
|
stephane-martin/salt-debian-packaging | refs/heads/master | salt-2016.3.3/salt/utils/network.py | 2 | # -*- coding: utf-8 -*-
'''
Define some generic socket functions for network modules
'''
# Import python libs
from __future__ import absolute_import
import os
import re
import socket
import logging
from string import ascii_letters, digits
# Import 3rd-party libs
import salt.ext.six as six
from salt.ext.six.moves impo... |
andreaso/ansible | refs/heads/devel | lib/ansible/module_utils/dellos9.py | 51 | #
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
# (c) 2017 Red Hat, Inc
#
# Copyright (c) 2016 Dell Inc.
#
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamica... |
pratikmallya/heat | refs/heads/master | heat/objects/stack_lock.py | 4 | #
# 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 the ... |
caseyrygt/osf.io | refs/heads/develop | website/addons/figshare/views/config.py | 52 | # -*- coding: utf-8 -*-
import httplib as http
from flask import request
from framework.exceptions import HTTPError
from framework.auth.decorators import must_be_logged_in
from website.util import web_url_for
from website.project.decorators import (
must_have_addon, must_be_addon_authorizer,
must_have_permi... |
sametmax/Django--an-app-at-a-time | refs/heads/master | ignore_this_directory/django/db/models/indexes.py | 1 | from django.db.backends.utils import names_digest, split_identifier
from django.db.models.query_utils import Q
from django.db.models.sql import Query
__all__ = ['Index']
class Index:
suffix = 'idx'
# The max length of the name of the index (restricted to 30 for
# cross-database compatibility with Oracle)... |
dcaune/lib_python_enum | refs/heads/master | test/tools.py | 62 | # -*- coding: utf-8 -*-
# test/tools.py
# Part of enum, a package providing enumerated types for Python.
#
# Copyright © 2007–2009 Ben Finney <ben+python@benfinney.id.au>
# This is free software; you may copy, modify and/or distribute this work
# under the terms of the GNU General Public License, version 2 or later
# ... |
alanjw/GreenOpenERP-Win-X86 | refs/heads/7.0 | python/Lib/test/test_dummy_threading.py | 14 | from test import test_support
import unittest
import dummy_threading as _threading
import time
class DummyThreadingTestCase(unittest.TestCase):
class TestThread(_threading.Thread):
def run(self):
global running
global sema
global mutex
# Uncomm... |
sinotradition/sinoera | refs/heads/master | sinoera/tst/ganzhi/test_yimao33.py | 1 | #!/usr/bin/python
#coding=utf-8
'''This is test module
@author: sheng
@contact: sinotradition@gmail.com
@copyright: License according to the project license.
'''
import unittest
from sinoera.ganzhi import yimao33
TestYimao33Functions(unittest.TestCase):
def setUp(self):
pass
def test_XXX(self):
... |
LeslieW/protobuf | refs/heads/master | python/google/protobuf/reflection.py | 31 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... |
nosamanuel/cottonmouth | refs/heads/master | cottonmouth/constants.py | 1 | HTML_VOID_TAGS = [
u'area',
u'base',
u'br',
u'col',
u'command',
u'embed',
u'hr',
u'img',
u'input',
u'keygen',
u'link',
u'meta',
u'param',
u'source',
u'track',
u'wbr',
]
HTML_TAGS = [
u'a',
u'address',
u'applet',
u'area',
u'article',
... |
mgit-at/ansible | refs/heads/devel | test/units/module_utils/basic/test_log.py | 120 | # -*- coding: utf-8 -*-
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import syslog
from itertools... |
dancingdan/tensorflow | refs/heads/master | tensorflow/contrib/estimator/python/estimator/export.py | 6 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
huiren/ece511 | refs/heads/master | src/cpu/testers/traffic_gen/TrafficGen.py | 19 | # Copyright (c) 2012, 2016 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the function... |
vicky2135/lucious | refs/heads/master | src/oscar/apps/partner/strategy.py | 1 | from collections import namedtuple
from decimal import Decimal as D
from oscar.core.compat import user_is_authenticated
from oscar.core.loading import get_class
Unavailable = get_class('partner.availability', 'Unavailable')
Available = get_class('partner.availability', 'Available')
StockRequiredAvailability = get_cla... |
DataDog/integrations-core | refs/heads/master | datadog_checks_dev/datadog_checks/dev/tooling/commands/env/prune.py | 1 | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import click
from ...e2e.config import get_configured_checks, get_configured_envs, remove_env_data, remove_env_root
from ..console import CONTEXT_SETTINGS, abort, echo_info, echo_success, echo_waiting, ec... |
FNCS/ns-3.26 | refs/heads/master | src/dsr/bindings/modulegen__gcc_ILP32.py | 30 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... |
stephenpascoe/esgf-pyclient | refs/heads/master | pyesgf/search/constraints.py | 2 | from .consts import OPERATOR_NEQ
class GeospatialConstraint(object):
"""
Class to encapsulate all geospatial constraints in the ESGF Search API
"""
def __init__(self, lat=None, lon=None, bbox=None, location=None,
radius=None, polygon=None):
self.lat, self.lon = lat, lon
... |
bsmr-eve/Pyfa | refs/heads/master | eos/effects/freightermaxvelocitybonusa1.py | 2 | # freighterMaxVelocityBonusA1
#
# Used by:
# Ship: Providence
type = "passive"
def handler(fit, ship, context):
fit.ship.boostItemAttr("maxVelocity", ship.getModifiedItemAttr("freighterBonusA1"), skill="Amarr Freighter")
|
raven47git/pyspider | refs/heads/master | pyspider/database/sqlite/resultdb.py | 75 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2014-10-13 17:08:43
import re
import time
import json
from .sqlitebase import SQLiteMixin, SplitTableMixin
from pyspider.database.base.resultdb import Res... |
dahlstrom-g/intellij-community | refs/heads/master | python/testData/packaging/PyPackageUtil/SetuptoolsSetupPyRequiresIntroduction/setup.py | 35 | from setuptools import setup
tests_require = [
'mynose'
]
setup(name='foo',
version=0.1,
tests_require=tests_require,
setup_requires=[
'numpy'
]) |
KellyChan/Python | refs/heads/master | javascript/backbone/backbone-templates/backbone-fileupload/venvs/lib/python2.7/site-packages/django/contrib/gis/geos/libgeos.py | 87 | """
This module houses the ctypes initialization procedures, as well
as the notice and error handler function callbacks (get called
when an error occurs in GEOS).
This module also houses GEOS Pointer utilities, including
get_pointer_arr(), and GEOM_PTR.
"""
import os
import re
import sys
from ctypes import c_char... |
rbalda/neural_ocr | refs/heads/master | env/lib/python2.7/site-packages/django/conf/locale/en/formats.py | 1007 | # -*- 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 = 'N j, Y'
TIME_FORMAT = 'P'
DATETIM... |
mpalomer/micropython | refs/heads/master | tests/micropython/native_misc.py | 95 | # tests for natively compiled functions
# basic test
@micropython.native
def native_test(x):
print(1, [], x)
native_test(2)
# check that GC doesn't collect the native function
import gc
gc.collect()
native_test(3)
# native with 2 args
@micropython.native
def f(a, b):
print(a + b)
f(1, 2)
# native with 3 arg... |
CospanDesign/nysa-nyx-platform | refs/heads/master | set_platform_path.py | 1 | #! /usr/bin/python
import site
import os
import sys
import json
import datetime
PATH_NAME = "paths.json"
BOARD_NAME = "nyx"
SITE_NYSA = os.path.join(site.getuserbase(), "nysa")
SITE_PATH = os.path.join(SITE_NYSA, PATH_NAME)
PLATFORM_PATH = os.path.abspath(os.path.dirname(__file__))
CONFIG_PATH = os.path.join(PLATFORM... |
dhilgarth/boxstarter | refs/heads/master | BuildPackages/example-light/tools/sublime/Packages/PowershellUtils/setup.py | 20 | # encoding: utf-8
"""Commands to build and manage .sublime-package archives with distutils."""
import sys
import os, string
from types import *
from glob import glob
from distutils import log, dir_util, dep_util, file_util, archive_util
from distutils.core import Command
from distutils.core import setup
f... |
eul-721/The-Perfect-Pokemon-Team-Balancer | refs/heads/master | libs/env/Lib/site-packages/pip/_vendor/html5lib/constants.py | 249 | from __future__ import absolute_import, division, unicode_literals
import string
import gettext
_ = gettext.gettext
EOF = None
E = {
"null-character":
_("Null character in input stream, replaced with U+FFFD."),
"invalid-codepoint":
_("Invalid codepoint in stream."),
"incorrectly-placed-so... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_shared_keys_operations.py | 1 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
libstorage/libstoragemgmt | refs/heads/master | python_binding/lsm/_transport.py | 5 | # Copyright (C) 2011-2013 Red Hat, Inc.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or any later version.
#
# This library is distributed in the h... |
garyfeng/pybrain | refs/heads/master | examples/supervised/evolino/lib/data_generator.py | 25 | __author__ = 'Michael Isik'
from pybrain.datasets.sequential import SequentialDataSet
from numpy import array, sin, apply_along_axis, ones
class SuperimposedSine(object):
""" Small class for generating superimposed sine signals
"""
def __init__(self, lambdas=[1.]):
self.lambdas = array(lambda... |
yetsky/extra | refs/heads/master | packages/my-application/python-all/files/usr/lib/python2.7/hotshot/__init__.py | 215 | """High-perfomance logging profiler, mostly written in C."""
import _hotshot
from _hotshot import ProfilerError
from warnings import warnpy3k as _warnpy3k
_warnpy3k("The 'hotshot' module is not supported in 3.x, "
"use the 'profile' module instead.", stacklevel=2)
class Profile:
def __init__(self, logf... |
GoogleChrome/chromium-dashboard | refs/heads/main | scripts/oauth2client/tools.py | 6 | # Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... |
pasiegel/SickGear | refs/heads/master | autoProcessTV/mediaToSickbeard.py | 4 | #!/usr/bin/env python2
from __future__ import print_function
import sys
import os
import time
import ConfigParser
import logging
sickbeardPath = os.path.split(os.path.split(sys.argv[0])[0])[0]
sys.path.insert(1, os.path.join(sickbeardPath, 'lib'))
sys.path.insert(1, sickbeardPath)
configFilename = os.path.join(sickbea... |
Datera/cinder | refs/heads/datera_queens_backport | cinder/db/sqlalchemy/migrate_repo/versions/095_placeholder.py | 75 | # 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
# d... |
joachimmetz/dfvfs | refs/heads/main | tests/vfs/cpio_file_entry.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the file entry implementation using the CPIOArchiveFile."""
import unittest
from dfvfs.lib import definitions
from dfvfs.path import factory as path_spec_factory
from dfvfs.resolver import context
from dfvfs.vfs import cpio_file_entry
from dfvfs.vfs import cp... |
Naeka/vosae-app | refs/heads/develop | www/notification/migrations/0002_date_and_datetime_fields.py | 1 | # -*- coding: utf-8 -*-
from south.v2 import DataMigration
from notification.models import Notification
class Migration(DataMigration):
def forwards(self, orm):
# Notification
Notification.objects.all().update(__raw__={"$rename": {"send_date": "sent_at"}})
def backwards(self, orm):
... |
Moriadry/tensorflow | refs/heads/master | tensorflow/contrib/distributions/python/ops/mixture.py | 22 | # 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... |
postrational/django | refs/heads/master | tests/null_fk/models.py | 115 | """
Regression tests for proper working of ForeignKey(null=True).
"""
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
class SystemDetails(models.Model):
details = models.TextField()
class SystemInfo(models.Model):
system_details = models.ForeignKey(SystemDetails)
... |
xs2maverick/adhocracy3.mercator | refs/heads/master | src/sdidemo/sdidemo/resources.py | 2 | import colander
import deform.widget
from persistent import Persistent
from zope.interface import (
Interface,
implementer,
)
from substanced.content import content
from substanced.property import PropertySheet
from substanced.schema import (
Schema,
NameSchemaNode,
MultireferenceIdSchemaNode... |
SnappleCap/oh-mainline | refs/heads/master | vendor/packages/twisted/doc/core/howto/tutorial/listings/finger/finger08.py | 21 | # Read username, output from non-empty factory, drop connections
# Use deferreds, to minimize synchronicity assumptions
from twisted.internet import protocol, reactor, defer
from twisted.protocols import basic
class FingerProtocol(basic.LineReceiver):
def lineReceived(self, user):
d = self.factory.getUser... |
wanglei828/apollo | refs/heads/master | modules/tools/open_space_visualization/hybrid_a_star_python_interface.py | 1 | #!/usr/bin/env python
###############################################################################
# Copyright 2018 The Apollo 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 ... |
wwj718/ANALYSE | refs/heads/master | common/lib/xmodule/xmodule/editing_module.py | 96 | """Descriptors for XBlocks/Xmodules, that provide editing of atrributes"""
from pkg_resources import resource_string
from xmodule.mako_module import MakoModuleDescriptor
from xblock.fields import Scope, String
import logging
log = logging.getLogger(__name__)
class EditingFields(object):
"""Contains specific tem... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.