repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
brain-tec/stock-logistics-workflow | refs/heads/8.0 | stock_lock_lot/tests/test_locking.py | 5 | # -*- coding: utf-8 -*-
# © 2015 Numérigraphe
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.addons.stock.tests.common import TestStockCommon
from openerp import exceptions
class TestLockingUnlocking(TestStockCommon):
def setUp(self):
super(TestLockingUnlocking, self).s... |
antepsis/anteplahmacun | refs/heads/master | sympy/physics/quantum/boson.py | 22 | """Bosonic quantum operators."""
from sympy import Mul, Integer, exp, sqrt, conjugate
from sympy.physics.quantum import Operator
from sympy.physics.quantum import HilbertSpace, FockSpace, Ket, Bra, IdentityOperator
from sympy.functions.special.tensor_functions import KroneckerDelta
__all__ = [
'BosonOp',
'Bo... |
dkarakats/edx-platform | refs/heads/master | common/test/acceptance/tests/studio/test_studio_acid_xblock.py | 14 | """
Acceptance tests for Studio related to the acid xblock.
"""
from unittest import skip
from bok_choy.web_app_test import WebAppTest
from ...pages.studio.auto_auth import AutoAuthPage
from ...pages.studio.overview import CourseOutlinePage
from ...pages.xblock.acid import AcidView
from ...fixtures.course import Cours... |
omarkohl/pytest | refs/heads/master | testing/cx_freeze/install_cx_freeze.py | 182 | """
Installs cx_freeze from source, but first patching
setup.py as described here:
http://stackoverflow.com/questions/25107697/compiling-cx-freeze-under-ubuntu
"""
import glob
import tarfile
import os
import sys
import platform
import py
if __name__ == '__main__':
if 'ubuntu' not in platform.version... |
ClodoCorp/debian-ganglia | refs/heads/master | gmond/python_modules/network/traffic1.py | 9 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import threading
import time
descriptors = list()
Desc_Skel = {}
_Worker_Thread = None
_Lock = threading.Lock() # synchronization lock
Debug = False
def dprint(f, *v):
if Debug:
print >> sys.stderr, "DEBUG: "+f % v
class UpdateTraffic... |
isislovecruft/torflow | refs/heads/master | NetworkScanners/BwAuthority/bwauthority.py | 1 | #!/usr/bin/env python
from sys import argv as s_argv
from sys import path
from sys import exit
from subprocess import Popen
path.append("../../")
from TorCtl.TorUtil import plog as plog
from TorCtl.TorUtil import get_git_version as get_git_version
from signal import signal, SIGTERM, SIGKILL
# exit code to indicate sc... |
knehez/edx-platform | refs/heads/memooc | lms/djangoapps/verify_student/services.py | 27 | """
Implementation of "reverification" service to communicate with Reverification XBlock
"""
import logging
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.db import IntegrityError
from opaque_keys.edx.keys import CourseKey
from verify_student.models im... |
mathspace/django | refs/heads/master | tests/test_runner/__init__.py | 12133432 | |
keiserlab/e3fp-paper | refs/heads/master | e3fp_paper/sea_utils/__init__.py | 12133432 | |
brutalic/pynet_brutal | refs/heads/master | class8/DJANGOX/djproject/net_system/migrations/__init__.py | 12133432 | |
noironetworks/neutron | refs/heads/master | neutron/tests/unit/agent/ovsdb/native/__init__.py | 12133432 | |
noironetworks/neutron | refs/heads/master | neutron/conf/db/__init__.py | 12133432 | |
gangadhar-kadam/helpdesk-frappe | refs/heads/develop | frappe/patches/__init__.py | 12133432 | |
atmtools/typhon | refs/heads/master | typhon/tests/math/__init__.py | 12133432 | |
darjeeling/django | refs/heads/master | tests/gis_tests/distapp/models.py | 71 | from django.contrib.gis.db import models
from ..utils import gisfield_may_be_null
class NamedModel(models.Model):
name = models.CharField(max_length=30)
class Meta:
abstract = True
def __str__(self):
return self.name
class SouthTexasCity(NamedModel):
"City model on projected coord... |
seanfisk/buzzword-bingo-server | refs/heads/master | django/conf/locale/et/formats.py | 316 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# 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 = 'G:i:s'
# DATETIME_FORMAT =
# YEAR_MONTH_FORMAT =
... |
CS-SI/QGIS | refs/heads/master | python/plugins/processing/algs/qgis/Orthogonalize.py | 16 | # -*- coding: utf-8 -*-
"""
***************************************************************************
Orthogonalize.py
----------------
Date : December 2016
Copyright : (C) 2016 by Nyall Dawson
Email : nyall dot dawson at gmail dot com
*******************... |
OpenLD/enigma2-wetek | refs/heads/master | lib/python/Plugins/Extensions/StartKodi/plugin.py | 1 | ### Start Kodi
### check for space and whether installed
### main work done in enigma2.sh, here we do just a touch
### TODO: installation error checking is missing, network state...
from Screens.Screen import Screen
from Components.ActionMap import ActionMap
from Components.Label import Label
from Plugins.Plugin impo... |
devs1991/test_edx_docmode | refs/heads/master | venv/lib/python2.7/site-packages/babel/localtime/_unix.py | 160 | from __future__ import with_statement
import os
import re
import sys
import pytz
import subprocess
_systemconfig_tz = re.compile(r'^Time Zone: (.*)$(?m)')
def _tz_from_env(tzenv):
if tzenv[0] == ':':
tzenv = tzenv[1:]
# TZ specifies a file
if os.path.exists(tzenv):
with open(tzenv, 'rb')... |
bgris/ODL_bgris | refs/heads/master | lib/python3.5/site-packages/pip/vcs/subversion.py | 343 | from __future__ import absolute_import
import logging
import os
import re
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip.index import Link
from pip.utils import rmtree, display_path
from pip.utils.logging import indent_log
from pip.vcs import vcs, VersionControl
_svn_xml_url_re = re.compile... |
anish/buildbot | refs/heads/master | master/buildbot/test/integration/interop/test_integration_secrets.py | 1 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... |
BaxterStockman/ansible-modules-core | refs/heads/devel | windows/win_get_url.py | 4 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Paul Durivage <paul.durivage@rackspace.com>, and others
#
# 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, eithe... |
NINAnor/QGIS | refs/heads/master | python/plugins/processing/algs/qgis/ui/__init__.py | 12133432 | |
PiperProject/piper | refs/heads/master | src/core/__init__.py | 12133432 | |
jboss-dockerfiles/dogen | refs/heads/develop | dogen/schema/__init__.py | 12133432 | |
AlperSaltabas/OR_Tools_Google_API | refs/heads/master | documentation/tutorials/python/chap2/cp_is_fun4.py | 37 | # Copyright 2010-2011 Google
# 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, so... |
marcoantoniooliveira/labweb | refs/heads/master | tests/dynamic_fixtures.py | 57 | from django_dynamic_fixture.ddf import DataFixture
from django_dynamic_fixture.fixture_algorithms.sequential_fixture import \
SequentialDataFixture
class OscarDynamicDataFixtureClass(SequentialDataFixture):
"""
This is need to support Oscar's PhoneNumberField: it's a custom type, so we
must provide val... |
peak6/st2 | refs/heads/master | st2stream/tests/__init__.py | 12133432 | |
danithaca/berrypicking | refs/heads/master | django/advanced/advanced/__init__.py | 12133432 | |
hguemar/cinder | refs/heads/master | cinder/volume/targets/__init__.py | 12133432 | |
mrrrgn/build-mozharness | refs/heads/master | mozharness/lib/__init__.py | 12133432 | |
saeki-masaki/cinder | refs/heads/master | cinder/tests/unit/api/openstack/__init__.py | 12133432 | |
pybrain/pybrain | refs/heads/master | pybrain/tests/unittests/rl/__init__.py | 12133432 | |
eggsandbeer/scheduler | refs/heads/master | db/dao/__init__.py | 12133432 | |
MiltosD/CEFELRC | refs/heads/master | lib/python2.7/site-packages/django_jenkins/tasks/run_pep8.py | 3 | # -*- coding: utf-8 -*-
import re
import os
import sys
import pep8
from optparse import make_option
from django_jenkins.functions import relpath
from django_jenkins.tasks import BaseTask, get_apps_locations
class Task(BaseTask):
option_list = [make_option("--pep8-exclude",
dest="pep... |
hiearth/langstyle | refs/heads/master | langstyle/entity/user.py | 1 | #!/usr/bin/env python
class User:
def __init__(self,user_id=None, user_name=None, password=None, email=None, language_map_id=None):
self.id = user_id
self.name = user_name
self.password = password
self.email = email
self.language_map_id = language_map_id |
proxysh/Safejumper-for-Mac | refs/heads/master | buildlinux/env32/lib/python2.7/site-packages/Crypto/Random/_UserFriendlyRNG.py | 111 | # -*- coding: utf-8 -*-
#
# Random/_UserFriendlyRNG.py : A user-friendly random number generator
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that ... |
LorenzReinhart/ONOSnew | refs/heads/master | tools/test/topos/newFuncTopo.py | 29 | #!/usr/bin/python
"""
Custom topology for Mininet
"""
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.node import Host, RemoteController
from mininet.node import Node
from mininet.node import CPULimitedHost
from mininet.link import TCLink
from mininet.cli import CLI
from mininet.log import s... |
newvem/pytz | refs/heads/master | pytz/zoneinfo/HST.py | 9 | '''tzinfo timezone information for HST.'''
from pytz.tzinfo import StaticTzInfo
from pytz.tzinfo import memorized_timedelta as timedelta
class HST(StaticTzInfo):
'''HST timezone definition. See datetime.tzinfo for details'''
zone = 'HST'
_utcoffset = timedelta(seconds=-36000)
_tzname = 'HST'
HST = HST... |
hlin117/statsmodels | refs/heads/master | statsmodels/tools/print_version.py | 23 | #!/usr/bin/env python
from __future__ import print_function
from statsmodels.compat.python import reduce
import sys
from os.path import dirname
def safe_version(module, attr='__version__'):
if not isinstance(attr, list):
attr = [attr]
try:
return reduce(getattr, [module] + attr)
except Att... |
tempbottle/pykafka | refs/heads/master | pykafka/client.py | 2 | """
Author: Keith Bourgoin, Emmett Butler
"""
__license__ = """
Copyright 2015 Parse.ly, 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 ... |
sloe/metric | refs/heads/metric | models/5_debug.py | 1 |
if request.env.HTTP_HOST.split(':')[0] in ('127.0.0.1', 'localhost'):
# Reload changed modules in development deployments
from gluon.custom_import import track_changes
track_changes(True)
|
NatKarmios/beam-interactive-python-unofficial | refs/heads/master | beam_interactive_unofficial/exceptions.py | 1 | class InvalidAuthenticationError(ValueError):
"""Raised if the auth details you pass into '.start()' are incorrectly formatted."""
pass
class ConnectionFailedError(Exception):
"""Raised if the connection to Beam fails - this is often due to your auth details being incorrect."""
pass
class ClientNotC... |
nazo/ansible | refs/heads/devel | test/runner/lib/classification.py | 23 | """Classify changes in Ansible code."""
from __future__ import absolute_import, print_function
import os
import time
from lib.target import (
walk_module_targets,
walk_integration_targets,
walk_units_targets,
walk_compile_targets,
walk_sanity_targets,
load_integration_prefixes,
)
from lib.ut... |
Conjuror/fxos-certsuite | refs/heads/master | mcts/web-platform-tests/tests/tools/pywebsocket/src/test/test_stream_hixie75.py | 496 | #!/usr/bin/env python
#
# 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... |
pavelgolik/netr | refs/heads/master | nn.py | 2 | #!/usr/bin/env python
# This file is part of netr.
#
# netr is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License 3 as published by
# the Free Software Foundation.
#
# netr is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without e... |
karstenw/nodebox-pyobjc | refs/heads/master | examples/Extended Application/matplotlib/examples/images_contours_and_fields/custom_cmap.py | 1 | """
=========================================
Creating a colormap from a list of colors
=========================================
Creating a colormap from a list of colors can be done with the `from_list`
method of `LinearSegmentedColormap`. You must pass a list of RGB tuples that
define the mixture of colors from 0 t... |
stuyCTF/stuyCTF-Platform | refs/heads/master | api/api/__init__.py | 1 | """
Imports and setup functionality
"""
import api.logger
import api.setup
import api.user
import api.team
import api.group
import api.annotations
import api.auth
import api.common
import api.cache
import api.problem
import api.stats
import api.utilities
import api.autogen
import api.autogen_tools
import api.admin
# ... |
adversary-org/pyme3 | refs/heads/master | examples/encrypt-to-all.py | 1 | #!/usr/bin/env python3
# $Id$
# Copyright (C) 2008 Igor Belyi <belyi@users.sourceforge.net>
# Copyright (C) 2002 John Goerzen <jgoerzen@complete.org>
#
# 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 Softwa... |
Michagogo/bitcoin | refs/heads/master | share/rpcuser/rpcuser.py | 115 | #!/usr/bin/env python2
# Copyright (c) 2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import hashlib
import sys
import os
from random import SystemRandom
import base64
import hmac
if len(sys.a... |
danuzclaudes/robottelo | refs/heads/master | tests/foreman/ui/test_dashboard.py | 4 | """Test module for Dashboard UI"""
from robottelo.decorators import stubbed, tier1, tier2
from robottelo.test import UITestCase
class DashboardTestCase(UITestCase):
"""Tests for Dashboard UI"""
@stubbed()
@tier1
def test_positive_save(self):
"""Save the Dashboard UI
@Feature: Dashboa... |
notforhire/Yup | refs/heads/master | share/qt/make_spinner.py | 563 | #!/usr/bin/env python
# W.J. van der Laan, 2011
# Make spinning animation from a .png
# Requires imagemagick 6.7+
from __future__ import division
from os import path
from PIL import Image
from subprocess import Popen
SRC='img/reload.png'
TMPDIR='../../src/qt/res/movies/'
TMPNAME='spinner-%03i.png'
NUMFRAMES=35
FRAMERA... |
vgrem/Office365-REST-Python-Client | refs/heads/master | office365/projectserver/__init__.py | 12133432 | |
tbs1980/otkpp | refs/heads/master | pyotk/pyotk/resultstable.py | 1 | """Implements tools for printing result tables.
This module implements functions for printing statistical
information such as number of iterations, function iterations,
etc. about iteration results.
"""
from native import *
import sys
from testproblems import *
def print_table(T, num_rows, num_cols, column_widths,... |
lsinfo/odoo | refs/heads/8.0 | openerp/addons/test_access_rights/tests/__init__.py | 404 | import test_ir_rules
|
konstruktoid/ansible-upstream | refs/heads/devel | test/units/modules/network/dellos6/test_dellos6_config.py | 46 | #
# (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... |
nzavagli/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/plat-mac/Carbon/Sndihooks.py | 82 | from _Sndihooks import *
|
mSenyor/sl4a | refs/heads/master | python/src/Mac/Modules/file/filesupport.py | 34 | # This script generates a Python interface for an Apple Macintosh Manager.
# It uses the "bgen" package to generate C code.
# The function specifications are generated by scanning the mamager's header file,
# using the "scantools" package (customized for this particular manager).
#
# XXXX TO DO:
# - Implement correct m... |
GaneshmKumar/Alertify | refs/heads/master | alertify/exception.py | 1 | class InvalidArgument():
def __init__(self, arg):
self.args = arg
class PassArgument():
def __init__(self, arg):
self.args = arg
|
drkitty/cyder | refs/heads/master | cyder/cydns/ptr/tests/__init__.py | 12133432 | |
ccn-2m/django | refs/heads/master | tests/modeltests/get_or_create/__init__.py | 12133432 | |
flp9001/eveggie | refs/heads/master | eveggie/orders/__init__.py | 12133432 | |
pwong-mapr/private-hue | refs/heads/HUE-1096-abe | desktop/core/ext-py/Django-1.4.5/django/core/cache/backends/__init__.py | 12133432 | |
siskin/bluetooth-next | refs/heads/feature-rpl | scripts/gdb/linux/__init__.py | 2010 | # nothing to do for the initialization of this package
|
twneale/vertica-python | refs/heads/master | vertica_python/vertica/messages/backend_messages/empty_query_response.py | 3 |
from vertica_python.vertica.messages.message import BackendMessage
class EmptyQueryResponse(BackendMessage):
pass
EmptyQueryResponse._message_id(b'I')
|
rdhyee/osf.io | refs/heads/develop | admin_tests/base/test_forms.py | 41 | from nose.tools import * # flake8: noqa
from tests.base import AdminTestCase
from admin.base.forms import GuidForm
class TestGuidForm(AdminTestCase):
def setUp(self):
super(TestGuidForm, self).setUp()
def test_valid_data(self):
guid = '12345'
form = GuidForm({
'guid': g... |
temmeand/scikit-rf | refs/heads/master | examples/oneport_calibration_example/cal.py | 14 | import skrf as rf
from pylab import *
cal = rf.Calibration(\
measured = [\
rf.Network('measured/short.s1p'),
rf.Network('measured/delay short 132um.s1p'),
rf.Network('measured/delay short 85um.s1p'),
rf.Network('measured/load.s1p'),
... |
captivo/linux-captivo | refs/heads/captivo-picture | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... |
johnmgregoire/JCAPdatavis | refs/heads/master | echem_plate_math.py | 2 | import numpy, scipy, scipy.optimize, scipy.interpolate
import os, os.path, time, copy, pylab, operator
from scipy import interp
def myeval(c):
if c=='None':
c=None
elif c=='nan' or c=='NaN':
c=numpy.nan
else:
temp=c.lstrip('0')
if (temp=='' or temp=='.') and '0' in c:
... |
jamesbulpin/xcp-xen-4.1 | refs/heads/master | tools/python/xen/xend/XendPSCSI.py | 43 | #============================================================================
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope th... |
ArianeFire/HaniCam | refs/heads/master | facerec-master/py/facerec/model.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) Philipp Wagner. All rights reserved.
# Licensed under the BSD license. See LICENSE file in the project root for full license information.
from facerec.feature import AbstractFeature
from facerec.classifier import AbstractClassifier
class PredictableModel(... |
felixfontein/ansible | refs/heads/devel | test/units/cli/test_galaxy.py | 18 | # -*- coding: utf-8 -*-
# (c) 2016, Adrian Likins <alikins@redhat.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 you... |
sarvex/django | refs/heads/master | django/contrib/gis/geos/__init__.py | 164 | """
The GeoDjango GEOS module. Please consult the GeoDjango documentation
for more details: https://docs.djangoproject.com/en/dev/ref/contrib/gis/geos/
"""
from .collections import ( # NOQA
GeometryCollection, MultiLineString, MultiPoint, MultiPolygon,
)
from .error import GEOSException # NOQA
from .factory impo... |
scroggo/skia | refs/heads/master | tools/skp/page_sets/skia_twitter_desktop.py | 9 | # 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.
# pylint: disable=W0401,W0614
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class SkiaBuildbotDesk... |
JesseLivezey/plankton | refs/heads/plankton | pylearn2/sandbox/cuda_convnet/weight_acts.py | 49 | """
A theano / pylearn2 wrapper for cuda-convnet's convFilterActs function.
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2013, Universite de Montreal"
__credits__ = ["Ian Goodfellow and David Warde-Farley"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegro... |
tareqalayan/ansible | refs/heads/devel | lib/ansible/modules/cloud/heroku/heroku_collaborator.py | 74 | #!/usr/bin/python
# Copyright: (c) 2018, 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': ['pr... |
iniju/ankidroid-triage | refs/heads/master | mapreduce/control.py | 1 | #!/usr/bin/env python
#
# Copyright 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 o... |
revanthkolli/osf.io | refs/heads/develop | scripts/consistency/ensure_backrefs.py | 55 | """
Add missing backrefs where needed.
"""
import time
from website.app import init_app
from website import models
from modularodm.storedobject import ensure_backrefs
import logging
logging.basicConfig(level=logging.DEBUG)
app = init_app()
def clean_backrefs_files():
for record in models.NodeFile.find():
... |
sitian/wing | refs/heads/master | services/whub/dev/monitor.py | 1 | # monitor.py
#
# Copyright (C) 2013 Yi-Wei Ci <ciyiwei@hotmail.com>
#
# 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
# ... |
gersolar/factopy | refs/heads/master | factopy/tests/units/adapters.py | 1 | # -*- coding: utf-8 -*-
from factopy.models import Stream, Adapt
from django.test import TestCase
class TestAdapters(TestCase):
fixtures = ['initial_data.yaml', '*']
def setUp(self):
self.stream = Stream()
self.stream.save()
self.adapter = Adapt.objects.get_or_create(name='abstract on... |
tbachman/group-based-policy | refs/heads/master | gbpservice/neutron/services/grouppolicy/common/constants.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
# d... |
intgr/django | refs/heads/master | tests/from_db_value/models.py | 26 | import decimal
from django.db import models
class Cash(decimal.Decimal):
currency = 'USD'
def __str__(self):
s = super().__str__(self)
return '%s %s' % (s, self.currency)
class CashField(models.DecimalField):
def __init__(self, **kwargs):
kwargs['max_digits'] = 20
kwarg... |
redondomarco/useradm | refs/heads/master | doc/Mayoral/RPC/Auth.py | 1 | # -*- coding: utf8 -*-
"""
Autenticación en servidor RPC
"""
import Mayoral.RPC.Server
import ldap
from Mayoral.config import config
class RequestHandler(Mayoral.RPC.Server.RequestHandler):
rpc_paths = ('/RPC2',)
def setup(self):
Mayoral.RPC.Server.RequestHandler.setup(self)
RequestHandler.i... |
igemsoftware/SYSU-Software2013 | refs/heads/master | project/Python27_32/Lib/lib2to3/fixes/fix_map.py | 327 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Fixer that changes map(F, ...) into list(map(F, ...)) unless there
exists a 'from future_builtins import map' statement in the top-level
namespace.
As a special case, map(None, X) is changed into list(X). (This is
... |
12520054/pybot | refs/heads/master | chatterbot/input/__init__.py | 4 | from .input_adapter import InputAdapter
from .microsoft import Microsoft
from .gitter import Gitter
from .hipchat import HipChat
from .mailgun import Mailgun
from .terminal import TerminalAdapter
from .variable_input_type_adapter import VariableInputTypeAdapter |
arnaud-morvan/QGIS | refs/heads/master | python/plugins/db_manager/db_plugins/plugin.py | 2 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
Name : DB Manager
Description : Database manager plugin for QGIS
Date : May 23, 2011
copyright : (C) 2011 by Giuseppe Sucameli
email : brush.tyler@... |
chdecultot/erpnext | refs/heads/develop | erpnext/healthcare/doctype/healthcare_service_unit_type/test_healthcare_service_unit_type.py | 14 | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import unittest
class TestHealthcareServiceUnitType(unittest.TestCase):
pass
|
luotao1/Paddle | refs/heads/develop | python/paddle/optimizer/optimizer.py | 1 | # Copyright (c) 2019 PaddlePaddle 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 appli... |
teran/bootloader-web | refs/heads/master | examples/scripts/delete-deployments.py | 1 | #!/usr/bin/env python
import os
import requests
import sys
try:
API_TOKEN = os.environ['API_TOKEN']
BOOTLOADER_URL = os.environ['BOOTLOADER_URL']
except KeyError as e:
print("""
API_TOKEN and BOOTLOADER_URL must be passed as environment variables
Example:
export API_TOKEN=<token>
export B... |
cswiercz/sympy | refs/heads/master | sympy/strategies/tests/test_tree.py | 59 | from sympy.strategies.tree import treeapply, greedy, allresults, brute
from sympy.core.compatibility import reduce
from functools import partial
def test_treeapply():
tree = ([3, 3], [4, 1], 2)
assert treeapply(tree, {list: min, tuple: max}) == 3
add = lambda *args: sum(args)
mul = lambda *args: reduc... |
kingvuplus/xx-v | refs/heads/master | tools/create_picon_links.py | 192 | #
# create links for picon
# usage: create_picon_links lamedb
# run in picon directory.
# It will read the servicenames from the lamedb and create symlinks
# for the servicereference names.
import os, sys
f = open(sys.argv[1]).readlines()
f = f[f.index("services\n")+1:-3]
while len(f):
ref = [int(x, 0x10) for x ... |
stwunsch/gnuradio | refs/heads/master | gr-blocks/python/blocks/qa_throttle.py | 57 | #!/usr/bin/env python
#
# Copyright 2013 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)
# ... |
jorik041/glances | refs/heads/master | glances/core/glances_client.py | 12 | # -*- coding: utf-8 -*-
#
# This file is part of Glances.
#
# Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com>
#
# Glances 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 3 of the Lic... |
farhi-naz/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/bot/queueengine_unittest.py | 120 | # Copyright (c) 2009 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... |
jsoref/django | refs/heads/master | django/core/management/commands/migrate.py | 19 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
from collections import OrderedDict
from importlib import import_module
from django.apps import apps
from django.core.management.base import BaseCommand, CommandError
from django.core.management.sql import (
emit_post_migrate_signal, emit... |
stevekuznetsov/ansible | refs/heads/devel | lib/ansible/modules/cloud/cloudstack/cs_role.py | 38 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.net>
#
# 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 Lice... |
vmanoria/bluemix-hue-filebrowser | refs/heads/master | hue-3.8.1-bluemix/desktop/core/ext-py/Django-1.6.10/django/contrib/formtools/tests/forms.py | 123 | from django import forms
class TestForm(forms.Form):
field1 = forms.CharField()
field1_ = forms.CharField()
bool1 = forms.BooleanField(required=False)
date1 = forms.DateField(required=False)
class HashTestForm(forms.Form):
name = forms.CharField()
bio = forms.CharField()
class HashTestBlankFo... |
TiVo/kafka | refs/heads/trunk | tests/kafkatest/services/security/__init__.py | 84 | # 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 use ... |
rtindru/django | refs/heads/master | tests/model_options/models/default_related_name.py | 140 | from django.db import models
class Author(models.Model):
first_name = models.CharField(max_length=128)
last_name = models.CharField(max_length=128)
class Editor(models.Model):
name = models.CharField(max_length=128)
bestselling_author = models.ForeignKey(Author)
class Book(models.Model):
title... |
freevo/freevo1 | refs/heads/master | src/plugins/screensaver/__init__.py | 1 | # -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------
# screensaver/__init__.py - the Freevo Screensaver
# -----------------------------------------------------------------------
# $Id$
#
# Notes:
#
# Todo:
#
#
# ----------------------------------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.