repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
nielsvanoch/django | refs/heads/master | tests/custom_methods/tests.py | 228 | from __future__ import unicode_literals
from datetime import date
from django.test import TestCase
from .models import Article
class MethodsTests(TestCase):
def test_custom_methods(self):
a = Article.objects.create(
headline="Area man programs in Python", pub_date=date(2005, 7, 27)
... |
aldariz/Sick-Beard | refs/heads/torrent_1080_subtitles | lib/requests/packages/chardet/langthaimodel.py | 2929 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
byterom/android_external_chromium_org | refs/heads/12.1 | ppapi/generators/idl_ast.py | 104 | # 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.
"""Nodes for PPAPI IDL AST."""
from idl_namespace import IDLNamespace
from idl_node import IDLNode
from idl_option import GetOption
from idl_visitor imp... |
hejunbok/apm_planner | refs/heads/master | libs/mavlink/share/pyshared/pymavlink/examples/bwtest.py | 34 | #!/usr/bin/env python
'''
check bandwidth of link
'''
import sys, struct, time, os
# allow import from the parent directory, where mavlink.py is
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
import mavutil
from optparse import OptionParser
parser = OptionParser("bwtest.py [opt... |
Hexadorsimal/pynes | refs/heads/master | nes/processors/cpu/instructions/flags/cli.py | 1 | from .clear import ClearInstruction
class Cli(ClearInstruction):
flag_name = 'i'
|
gokudomatic/cobiv | refs/heads/master | cobiv/modules/core/session/session.py | 1 | from collections import deque
from datetime import datetime
import copy
from cobiv.libs.templite import Templite
from cobiv.modules.core.entity import Entity
from cobiv.modules.core.session.cursor import Cursor
class CoreVariables:
def __init__(self, session):
self.session = session
session.fie... |
veger/ansible | refs/heads/devel | lib/ansible/modules/network/panos/panos_admpwd.py | 27 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage PaloAltoNetworks Firewall
# (c) 2016, techbizdev <techbizdev@paloaltonetworks.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publish... |
laszlocsomor/tensorflow | refs/heads/master | tensorflow/python/training/coordinator_test.py | 18 | # 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... |
jjas0nn/solvem | refs/heads/master | tensorflow/lib/python2.7/site-packages/tensorflow/python/framework/__init__.py | 12133432 | |
pdellaert/ansible | refs/heads/devel | lib/ansible/modules/cloud/ovh/ovh_ip_failover.py | 42 | #!/usr/bin/python
# Copyright: 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... |
philcleveland/grpc | refs/heads/master | examples/python/route_guide/route_guide_resources.py | 115 | # Copyright 2015, 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... |
MichaelDrogalis/ansible | refs/heads/devel | test/units/parsing/test_unquote.py | 152 | # coding: utf-8
# (c) 2015, Toshio Kuratomi <tkuratomi@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 o... |
PRJosh/android_kernel_samsung_mondrianwifi | refs/heads/cm-11.0 | scripts/rt-tester/rt-tester.py | 11005 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... |
Jovy23/M919_Kernel | refs/heads/master | scripts/rt-tester/rt-tester.py | 11005 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... |
PapenfussLab/MHC-clogs | refs/heads/master | lib/mungolite/mungoCore.py | 2 | """
mungoCore - abstract base classes and core utilites
"""
import sys
import copy
from useful import smartopen, raiseDeprecated
def attributesToFormat(attributes):
return '\t'.join(['%%(%s)s' % attr for attr in attributes])
class AbstractFeature(object):
"""Feature base class"""
def __init__(self... |
luistorresm/odoo | refs/heads/8.0 | addons/auth_openid/controllers/main.py | 382 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... |
waseem18/oh-mainline | refs/heads/master | vendor/packages/twisted/twisted/words/protocols/jabber/jstrports.py | 68 | # -*- test-case-name: twisted.words.test -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
""" A temporary placeholder for client-capable strports, until we
sufficient use cases get identified """
from twisted.internet.endpoints import _parse
def _parseTCPSSL(factory, domain, port):
""... |
TimoRoth/oggm | refs/heads/master | benchmarks/check_bench.py | 5 | """Utility script to check that the benchmark run.
#FIXME: this should somehow be added to CI
"""
if __name__ == '__main__':
import hef_dynamics
import massbalance
import numerics
import track_model_results
for func in dir(hef_dynamics):
if 'time_' not in func:
continue
... |
soltanmm/grpc | refs/heads/master | src/python/grpcio/grpc/framework/common/style.py | 63 | # Copyright 2015, 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... |
iluminite/argh-examples | refs/heads/master | z/scripts/__init__.py | 12133432 | |
gisce/OCB | refs/heads/7.0 | addons/account_anglo_saxon/purchase.py | 427 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... |
WikipediaLibrary/TWLight | refs/heads/master | TWLight/users/management/commands/user_renewal_notice.py | 1 | from datetime import datetime, timedelta
from django.core.management.base import BaseCommand
from django.urls import reverse
from TWLight.users.signals import Notice
from TWLight.users.models import Authorization, get_company_name
class Command(BaseCommand):
help = "Sends advance notice to users with expiring a... |
aspose-words/Aspose.Words-for-Java | refs/heads/master | Plugins/Aspose_Words_Java_for_Jython/setup.py | 4 | __author__ = 'masood.anwer'
from setuptools import setup, find_packages
setup(
name = 'asposewordsjavajython',
packages = find_packages(),
version = '1.0.0',
description = 'Aspose.Words Java for Jython allows you to use Aspose.Words for Java API in your Jython applications',
author='Masood Anwer',... |
Krylon360/vimeo-graphite-web | refs/heads/master | webapp/graphite/render/datalib.py | 9 | """Copyright 2008 Orbitz WorldWide
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... |
achang97/YouTunes | refs/heads/master | lib/python2.7/site-packages/gunicorn/app/wsgiapp.py | 14 | # -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
import os
import sys
from gunicorn.errors import ConfigError
from gunicorn.app.base import Application
from gunicorn import util
class WSGIApplication(Application):
def init(self, parse... |
codrut3/tensorflow | refs/heads/master | tensorflow/python/debug/wrappers/local_cli_wrapper_test.py | 21 | # 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... |
eestay/edx-platform | refs/heads/master | lms/djangoapps/instructor/enrollment.py | 17 | """
Enrollment operations for use by instructor APIs.
Does not include any access control, be sure to check access before calling.
"""
import json
from django.contrib.auth.models import User
from django.conf import settings
from django.core.urlresolvers import reverse
from django.core.mail import send_mail
from djang... |
relman/sevpn-mgmt-py | refs/heads/master | SevpnMgmtPy/admin_api/rpc_test.py | 1 | # -*- coding: utf-8 -*-
class RpcTest:
def __init__(self, int_val=0, int64_val=0L, str_val='', unistr_val=u''):
self.int_val = int_val
self.int64_val = int64_val
self.str_val = str_val
self.unistr_val = unistr_val
def in_rpc_test(self, pack):
if pack is None:
... |
brijeshkesariya/odoo | refs/heads/8.0 | addons/warning/warning.py | 243 | # -*- 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... |
LittlePeng/redis-monitor | refs/heads/master | src/api/controller/MemoryController.py | 5 | from BaseController import BaseController
import tornado.ioloop
import tornado.web
import dateutil.parser
import datetime
class MemoryController(BaseController):
def get(self):
server = self.get_argument("server")
from_date = self.get_argument("from", None)
to_date = self.get_argument("to... |
storm-computers/odoo | refs/heads/9.0 | addons/l10n_fr/l10n_fr.py | 45 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.osv import fields, osv
class res_company(osv.osv):
_inherit = 'res.company'
_columns = {
'siret': fields.char('SIRET', size=14),
'ape': fields.char('APE'),
}
|
sarvex/django | refs/heads/master | django/contrib/gis/geos/prototypes/misc.py | 483 | """
This module is for the miscellaneous GEOS routines, particularly the
ones that return the area, distance, and length.
"""
from ctypes import POINTER, c_double, c_int
from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOSFuncFactory
from django.contrib.gis.geos.prototypes.errcheck import check_dbl, check_stri... |
brettchien/LeetCode | refs/heads/master | 232_ImplementQueueUsingStacks.py | 1 | class Queue:
# initialize your data structure here.
def __init__(self):
self.stack = []
def size(self):
return len(self.stack)
# @param x, an integer
# @return nothing
def push(self, x):
# push on stack
self.stack.append(x)
# @return nothing
def pop(sel... |
clumsy/intellij-community | refs/heads/master | python/testData/selectWord/slice/after2.py | 83 | "hello world again"[<selection>10:12</selection>] |
gward/buildbot | refs/heads/master | contrib/hg_buildbot.py | 4 | #! /usr/bin/python
# This is a script which delivers Change events from Mercurial to the
# buildmaster each time a changeset is pushed into a repository. Add it to
# the 'incoming' commit hook on your canonical "central" repository, by
# putting something like the following in the .hg/hgrc file of that
# repository:
#... |
hrishioa/Aviato | refs/heads/master | flask/Lib/site-packages/shapely/examples/__init__.py | 25 | # Examples module
|
gr8linux/AdminScripts | refs/heads/master | cidr_mrg.py | 1 | from netaddr import *
import sys
DEBUG = False
def debugger(msg):
if DEBUG:
print msg
if len(sys.argv) < 2:
print "Use "+sys.argv[0]+" IP_LIST.TXT\n"
print " IP list file format should be \n"
print " a.b.c.d\n"
print " or\n"
print " a.b.c.d/w.x.y.z"
exit()
filename = sys.argv[1]
debugger ("Opening "+filename... |
SequencingDOTcom/App-Market-API-integration | refs/heads/master | python/dev/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
SebDieBln/QGIS | refs/heads/master | python/plugins/processing/algs/gdal/rasterize_over.py | 1 | # -*- coding: utf-8 -*-
"""
***************************************************************************
rasterize_over.py
---------------------
Date : September 2013
Copyright : (C) 2013 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
********... |
beni55/sympy | refs/heads/master | sympy/core/basic.py | 4 | """Base class for all the objects in SymPy"""
from __future__ import print_function, division
from .assumptions import ManagedProperties
from .cache import cacheit
from .core import BasicType, C
from .sympify import _sympify, sympify, SympifyError
from .compatibility import (iterable, Iterator, ordered,
string_typ... |
leopardhs/ns3_sdn | refs/heads/master | examples/realtime/realtime-udp-echo.py | 195 | #
# * This program is free software; you can redistribute it and/or modify
# * it under the terms of the GNU General Public License version 2 as
# * published by the Free Software Foundation;
# *
# * This program is distributed in the hope that it will be useful,
# * but WITHOUT ANY WARRANTY; without even the implied w... |
Zhongqilong/kbengine | refs/heads/master | kbe/src/lib/python/Lib/distutils/dep_util.py | 207 | """distutils.dep_util
Utility functions for simple, timestamp-based dependency of files
and groups of files; also, function based entirely on such
timestamp dependency analysis."""
import os
from distutils.errors import DistutilsFileError
def newer (source, target):
"""Return true if 'source' exists and is more... |
jgmize/kuma | refs/heads/master | kuma/users/tests/test_templates.py | 1 | import json
import pytest
import requests_mock
from constance import config as constance_config
from constance.test.utils import override_config
from django.conf import settings
from pyquery import PyQuery as pq
from waffle.models import Flag
from kuma.core.tests import eq_, ok_
from kuma.core.urlresolvers import reve... |
marcsans/cnn-physics-perception | refs/heads/master | phy/lib/python2.7/site-packages/matplotlib/dviread.py | 4 | """
An experimental module for reading dvi files output by TeX. Several
limitations make this not (currently) useful as a general-purpose dvi
preprocessor, but it is currently used by the pdf backend for
processing usetex text.
Interface::
dvi = Dvi(filename, 72)
# iterate over pages (but only one page is support... |
romanzenka/myrimatch | refs/heads/master | freicore/libraries/boost-build/tools/types/asm.py | 3 | # Copyright Craig Rodrigues 2005.
# Copyright (c) 2008 Steven Watanabe
#
# Distributed under 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)
from b2.build import type
def register():
type.register_type('ASM', ['s', 'S',... |
sharhar/USB-Thing | refs/heads/master | UpdaterFiles/Lib/python-3.5.1.amd64/Lib/plat-darwin/IN.py | 109 | # Generated by h2py from /usr/include/netinet/in.h
# Included from sys/appleapiopts.h
# Included from sys/_types.h
# Included from sys/cdefs.h
def __P(protos): return protos
def __STRING(x): return #x
def __P(protos): return ()
def __STRING(x): return "x"
def __attribute__(x): return
def __COPYRIGHT(s): return ... |
CDE-UNIBE/qcat | refs/heads/develop | apps/api/migrations/0004_apptoken.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.26 on 2020-04-29 07:02
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depend... |
digimarc/django | refs/heads/master | tests/migrations/migrations_test_apps/lookuperror_a/migrations/0004_a4.py | 381 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lookuperror_a', '0003_a3'),
]
operations = [
migrations.CreateModel(
name='A4',
fields=[
... |
libvirt/autotest | refs/heads/master | client/tests/kvm/tests/qmp_basic.py | 1 | from autotest_lib.client.common_lib import error
from autotest_lib.client.virt import kvm_monitor
def run_qmp_basic(test, params, env):
"""
QMP Specification test-suite: this checks if the *basic* protocol conforms
to its specification, which is file QMP/qmp-spec.txt in QEMU's source tree.
IMPORTANT ... |
mojeto/django | refs/heads/master | tests/test_client/__init__.py | 12133432 | |
redhat-openstack/sahara | refs/heads/master-patches | sahara/utils/hacking/__init__.py | 12133432 | |
Maccimo/intellij-community | refs/heads/master | python/helpers/tests/generator3_tests/data/SkeletonGeneration/inaccessible_class_attribute_py3/before/sdk_skeletons/existing.py | 12133432 | |
johankaito/fufuka | refs/heads/master | microblog/flask/venv/lib/python2.7/site-packages/scipy/fftpack/tests/gen_fftw_ref.py | 73 | from __future__ import division, print_function, absolute_import
from subprocess import Popen, PIPE, STDOUT
import numpy as np
SZ = [2, 3, 4, 8, 12, 15, 16, 17, 32, 64, 128, 256, 512, 1024]
def gen_data(dt):
arrays = {}
if dt == np.double:
pg = './fftw_double'
elif dt == np.float32:
pg... |
KanchanChauhan/erpnext | refs/heads/develop | erpnext/setup/doctype/global_defaults/global_defaults.py | 38 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
"""Global Defaults"""
import frappe
import frappe.defaults
from frappe.utils import cint
from frappe.custom.doctype.property_setter.property_setter impo... |
campbe13/openhatch | refs/heads/master | vendor/packages/python-openid/openid/test/test_examples.py | 87 | "Test some examples."
import socket
import os.path, unittest, sys, time
from cStringIO import StringIO
import twill.commands, twill.parse, twill.unit
from openid.consumer.discover import \
OpenIDServiceEndpoint, OPENID_1_1_TYPE
from openid.consumer.consumer import AuthRequest
class TwillTest(twill.unit.TestInf... |
ros-infrastructure/ros_buildfarm | refs/heads/master | scripts/status/generate_blocked_releases_page_job.py | 2 | #!/usr/bin/env python3
import argparse
import copy
import sys
from ros_buildfarm.argument import add_argument_config_url
from ros_buildfarm.argument import add_argument_dry_run
from ros_buildfarm.argument import add_argument_rosdistro_name
from ros_buildfarm.common import get_release_job_prefix
from ros_buildfarm.com... |
abaditsegay/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/third_party/python_26/Lib/distutils/command/build_ext.py | 17 | """distutils.command.build_ext
Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP)."""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id: build_ext.py 69317 2009-02-05 22:55:00Z tarek.ziade... |
SrNetoChan/Quantum-GIS | refs/heads/master | python/gui/auto_additions/qgscolorwidgets.py | 56 | # The following has been generated automatically from src/gui/qgscolorwidgets.h
QgsColorTextWidget.ColorTextFormat.baseClass = QgsColorTextWidget
|
goodfeli/pylearn2 | refs/heads/master | pylearn2/datasets/svhn.py | 16 | """
.. todo::
WRITEME
"""
import os
import gc
import warnings
try:
import tables
except ImportError:
warnings.warn("Couldn't import tables, so far SVHN is "
"only supported with PyTables")
import numpy
from theano.compat.six.moves import xrange
from theano import config
from pylearn2.data... |
GbalsaC/bitnamiP | refs/heads/master | venv/lib/python2.7/site-packages/lepl/stream/_test/simple.py | 2 |
# The contents of this file are subject to the Mozilla Public License
# (MPL) Version 1.1 (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.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# b... |
redhat-cip/python-tripleo-wrapper | refs/heads/master | rdomhelper/shell.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Red Hat, 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 req... |
Gheehnest/three.js | refs/heads/master | utils/converters/ctm/join_ctm.py | 399 | """Join multiple binary files into single file and generate JSON snippet with offsets
-------------------------------------
How to use
-------------------------------------
python join_ctm.py -i "part_*.ctm" -o joined.ctm [-j offsets.js]
Will read multiple files following wildcard pattern (ordered lexicographically)... |
cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools | refs/heads/master | git_retry.py | 31 | #!/usr/bin/env python
# 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.
import logging
import optparse
import subprocess
import sys
import threading
import time
from git_common import GIT_EXE, GIT_TRANSIENT... |
chrrrles/ansible-modules-extras | refs/heads/devel | system/firewalld.py | 32 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Adam Miller (maxamillion@fedoraproject.org)
#
# 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 ... |
svenstaro/ansible | refs/heads/devel | test/units/plugins/__init__.py | 12133432 | |
gacarrillor/QGIS | refs/heads/master | tests/src/python/test_qgsproviderconnection_mssql.py | 19 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for MSSQL QgsAbastractProviderConnection API.
.. 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)... |
briandrawert/pyurdme | refs/heads/master | examples/yeast_polarization/polarisome_model.py | 5 | #!/usr/bin/env python
""" pyURDME model file for the model found in Lawson et al. PloS Comp Bio (2013). """
import os
import pyurdme
import dolfin
import math
import matplotlib.pyplot as plt
import numpy
class Cdc42(pyurdme.URDMEDataFunction):
def __init__(self, a=-4*numpy.pi, b=4*numpy.pi, N=160):
""" ... |
lshain-android-source/external-chromium_org-tools-gyp | refs/heads/master | test/same-source-file-name/gyptest-fail-shared.py | 149 | #!/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.
"""
Checks that gyp fails on shared_library targets which have several files with
the same basename.
"""
import TestGyp
test = TestGyp.Tes... |
dforsyth/mesos | refs/heads/master | src/python/interface/src/mesos/interface/__init__.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 u... |
tayfun/django | refs/heads/master | tests/null_fk_ordering/tests.py | 381 | from __future__ import unicode_literals
from django.test import TestCase
from .models import Article, Author, Comment, Forum, Post, SystemInfo
class NullFkOrderingTests(TestCase):
def test_ordering_across_null_fk(self):
"""
Regression test for #7512
ordering across nullable Foreign Key... |
ivan-fedorov/intellij-community | refs/heads/master | python/testData/completion/dunderNext.py | 79 | class C:
def __nex<caret>
|
onecloud/neutron | refs/heads/master | neutron/tests/unit/brocade/test_brocade_plugin.py | 38 | # Copyright (c) 2012 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
andresgz/django | refs/heads/master | tests/fixtures_regress/tests.py | 83 | # -*- coding: utf-8 -*-
# Unittests for fixtures.
from __future__ import unicode_literals
import json
import os
import re
import unittest
import warnings
import django
from django.core import management, serializers
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import Comman... |
nicholas-silveira/art_pipeline | refs/heads/master | maya/packages/oop_maya/tools/animation/ui/__init__.py | 12133432 | |
jimi-c/ansible | refs/heads/devel | test/units/modules/network/dellos9/__init__.py | 12133432 | |
adamkh/kivy | refs/heads/master | kivy/tools/extensions/__init__.py | 12133432 | |
fxa90id/mozillians | refs/heads/master | lib/jinjautils.py | 12 | # TODO: let's see if we can get rid of this, it's garbage
from django.contrib.admin import options, actions, sites
from django.template import loader
import jingo
def django_to_jinja(template_name, context, **kw):
"""
We monkeypatch Django admin's render_to_response to work in our Jinja
environment. We ... |
chouseknecht/ansible | refs/heads/devel | lib/ansible/modules/storage/netapp/netapp_e_amg.py | 21 | #!/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'],
... |
paolodedios/tensorflow | refs/heads/master | tensorflow/python/distribute/custom_training_loop_input_test.py | 5 | # Copyright 2019 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... |
willingc/oh-mainline | refs/heads/master | vendor/packages/twisted/twisted/web/xmlrpc.py | 18 | # -*- test-case-name: twisted.web.test.test_xmlrpc -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
A generic resource for publishing objects via XML-RPC.
Maintainer: Itamar Shtull-Trauring
"""
# System Imports
import sys, xmlrpclib, urlparse
# Sibling Imports
from twisted.web import... |
ongair/yowsup | refs/heads/master | yowsup/layers/protocol_ib/protocolentities/test_dirty_ib.py | 70 | from yowsup.layers.protocol_ib.protocolentities.test_ib import IbProtocolEntityTest
from yowsup.layers.protocol_ib.protocolentities.dirty_ib import DirtyIbProtocolEntity
from yowsup.structs import ProtocolTreeNode
class DirtyIbProtocolEntityTest(IbProtocolEntityTest):
def setUp(self):
super(DirtyIbProtocolE... |
trondhindenes/ansible | refs/heads/devel | test/units/modules/cloud/openstack/test_os_server.py | 60 | import collections
import inspect
import mock
import pytest
import yaml
from ansible.module_utils.six import string_types
from ansible.modules.cloud.openstack import os_server
class AnsibleFail(Exception):
pass
class AnsibleExit(Exception):
pass
def params_from_doc(func):
'''This function extracts th... |
zchking/odoo | refs/heads/8.0 | addons/crm_profiling/wizard/__init__.py | 438 | # -*- 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... |
leifos/simiir | refs/heads/master | simiir/query_generators/tri_term_generator_reversed.py | 1 | from simiir.query_generators.tri_term_generator import TriTermQueryGenerator
class TriTermQueryGeneratorReversed(TriTermQueryGenerator):
"""
Implementing Strategy 3 from Heikki's 2009 paper, generating three-term queries.
The first two terms are drawn from the topic, with the final and third term selected ... |
Lipen/LipenDev | refs/heads/master | Azeroth/Northrend/DOB3/getter.py | 1 | # path = 'seqs/seqERV3-1_macaque_chr2.fasta'
# pos_ltr5 = (96109, 95584)
# pos_ltr3 = (88903, 88379)
# path = 'seqs/seqERV3-1_pan.fasta'
# pos_ltr5 = (579, 1190)
# pos_ltr3 = (9604, 10206)
# path = 'seqs/seqERVIPF-10H.fasta'
# pos_ltr5 = (5377, 4938)
# pos_ltr3 = (1064, 619)
# path = 'seqs/seqERV3-1_macaque_ch... |
eoyilmaz/anima | refs/heads/master | anima/exc.py | 1 | # -*- coding: utf-8 -*-
"""This module contains exceptions
"""
class PublishError(RuntimeError):
"""Raised when the published version is not matching the quality
"""
pass
|
yanheven/cinder | refs/heads/master | cinder/volume/targets/scst.py | 6 | # 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... |
doganov/edx-platform | refs/heads/master | cms/djangoapps/course_creators/tests/__init__.py | 12133432 | |
britcey/ansible | refs/heads/devel | test/runner/lib/delegation.py | 24 | """Delegate test execution to another environment."""
from __future__ import absolute_import, print_function
import os
import re
import sys
import tempfile
import lib.pytar
import lib.thread
from lib.executor import (
SUPPORTED_PYTHON_VERSIONS,
IntegrationConfig,
ShellConfig,
SanityConfig,
Units... |
hubert667/AIR | refs/heads/master | build/billiard/billiard/dummy/connection.py | 9 | #
# Analogue of `multiprocessing.connection` which uses queues instead of sockets
#
# multiprocessing/dummy/connection.py
#
# Copyright (c) 2006-2008, R Oudkerk
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditi... |
slawosz/content-slice | refs/heads/master | public/javascripts/fckeditor/_samples/py/sampleposteddata.py | 22 | #!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... |
shepdelacreme/ansible | refs/heads/devel | test/units/modules/network/ironware/test_ironware_config.py | 30 | #
# (c) 2016 Red Hat Inc.
#
# 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 d... |
kirananto/android_kernel_motorola_msm8916 | refs/heads/aosp-5.1.1 | scripts/gcc-wrapper.py | 580 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011-2012, The Linux Foundation. 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 th... |
imsparsh/python-for-android | refs/heads/master | python-modules/twisted/twisted/python/test/__init__.py | 142 | """
Unit tests for L{twisted.python}.
"""
|
webmasterraj/FogOrNot | refs/heads/master | flask/lib/python2.7/site-packages/flask/testsuite/test_apps/moduleapp/apps/frontend/__init__.py | 628 | from flask import Module, render_template
frontend = Module(__name__)
@frontend.route('/')
def index():
return render_template('frontend/index.html')
|
arjunasuresh3/Mypykoans | refs/heads/master | python 3/libs/mock.py | 38 | # mock.py
# Test tools for mocking and patching.
# Copyright (C) 2007-2009 Michael Foord
# E-mail: fuzzyman AT voidspace DOT org DOT uk
# mock 0.6.0
# http://www.voidspace.org.uk/python/mock/
# Released subject to the BSD License
# Please see http://www.voidspace.org.uk/python/license.shtml
# Scripts maintained at h... |
gangadhar-kadam/verve-erp | refs/heads/v5.0 | erpnext/selling/report/lead_details/__init__.py | 12133432 | |
sophron/wifiphisher | refs/heads/master | wifiphisher/common/__init__.py | 12133432 | |
fabian4/trove | refs/heads/master | trove/tests/unittests/common/test_pagination.py | 2 | # Copyright 2013 OpenStack Foundation
# Copyright 2013 Rackspace Hosting
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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 co... |
wdzhou/mantid | refs/heads/master | Framework/PythonInterface/test/python/plugins/algorithms/PoldiCreatePeaksFromFileTest.py | 3 | # pylint: disable=no-init,invalid-name,too-many-public-methods
from __future__ import (absolute_import, division, print_function)
import unittest
from testhelpers import assertRaisesNothing
from testhelpers.tempfile_wrapper import TemporaryFileHelper
from mantid.kernel import *
from mantid.api import *
from mantid.si... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.