repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
azureplus/hue | refs/heads/master | desktop/core/ext-py/pysaml2-2.4.0/src/saml2/ecp_client.py | 32 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
"""
Contains a class that can do SAML ECP Authentication for other python
programs.
"""
import cookielib
import logging
from saml2 import soap
from saml2 import saml
from saml2 import samlp
from saml2 import SAMLError
from saml2 import BINDING_SOAP
from saml2.client_ba... |
royendgel/django-datatables | refs/heads/master | datatables/demo/demoapp/admin.py | 13848 | from django.contrib import admin
# Register your models here.
|
kenshay/ImageScript | refs/heads/master | Script_Runner/PYTHON/Lib/site-packages/cryptography/hazmat/bindings/__init__.py | 482 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
|
liebannam/pipes | refs/heads/master | testcython.py | 1 | import sys
sys.path.append('/Users/anna/anaconda/lib/python2.7/site-packages')
import numpy as np
from allthethings import *
def main():
print "hello world"
T = 1.
N = 10
D = 1.
L = 1000
M = 10
a = 2
dt = T / M
Mi = 1
p1 = PyPipe_ps(N, D, L, M, a)
print "success?!"
prin... |
infobeisel/mbnwcModSys | refs/heads/master | module_simple_triggers.py | 3 | from header_triggers import *
####################################################################################################################
# Simple triggers are the alternative to old style triggers. They do not preserve state, and thus simpler to maintain.
#
# Each simple trigger contains the following field... |
jay3sh/vispy | refs/heads/master | examples/basics/scene/line_update.py | 17 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""
Demonstration of animated Line visual.
"""
import sys
import numpy as np
from vispy import app, scene
# vertex positions of data to draw
N = 200
pos = np.zeros((N, 2), d... |
muntasirsyed/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/contrib/gis/forms/fields.py | 405 | from django import forms
from django.utils.translation import ugettext_lazy as _
# While this couples the geographic forms to the GEOS library,
# it decouples from database (by not importing SpatialBackend).
from django.contrib.gis.geos import GEOSGeometry
class GeometryField(forms.Field):
"""
This is the bas... |
adaussy/eclipse-monkey-revival | refs/heads/master | plugins/python/org.eclipse.eclipsemonkey.lang.python/Lib/test/bugs/pr178.py | 31 | # fixes PR#178 (sans the reload, which is only necessary w/o the patch
# outlined in PR#195).
from java.util import Date
class Foo(Date):
pass
class Bar(Foo):
pass
|
blaxter/samba | refs/heads/master | third_party/dnspython/dns/tsig.py | 66 | # Copyright (C) 2001-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "... |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/object/tangible/wearables/ithorian/ith_necklace_s08.py | 85615 | import sys
def setup(core, object):
return |
frodopwns/readthedocs.org | refs/heads/master | readthedocs/doc_builder/backends/asciidoc.py | 15 | import os
import logging
from doc_builder.base import BaseBuilder, restoring_chdir
from projects.utils import run
log = logging.getLogger(__name__)
class Builder(BaseBuilder):
"""
Ascii Doctor builder
"""
type = 'asciidoc'
def __init__(self, *args, **kwargs):
super(BaseBuilder, self).__i... |
hamedramzi/tshark | refs/heads/master | tools/ftsanity.py | 25 | #!/usr/bin/env python
"""
Check the sanity of field definitions in Wireshark.
"""
#
# Gilbert Ramirez <gram [AT] alumni.rice.edu>
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org>
# Copyright 1998 Gerald Combs
#
# This program is free software; you can redistribute it and/or
# modify it ... |
Glorf/servo | refs/heads/master | tests/wpt/harness/setup.py | 196 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import glob
import os
import sys
import textwrap
from setuptools import setup, find_packages
here = os.path.split(__fi... |
torypages/luigi | refs/heads/master | luigi/tools/deps.py | 31 | #!/usr/bin/env python
# Finds all tasks and task outputs on the dependency paths from the given downstream task T
# up to the given source/upstream task S (optional). If the upstream task is not given,
# all upstream tasks on all dependancy paths of T will be returned.
# Terms:
# if the execution of Task T depends ... |
FayolChang/vnpy | refs/heads/master | vn.strategy/strategydemo/strategyEngine.py | 46 | # encoding: UTF-8
from datetime import datetime
from pymongo import Connection
from pymongo.errors import *
from eventEngine import *
# 常量定义
OFFSET_OPEN = '0' # 开仓
OFFSET_CLOSE = '1' # 平仓
DIRECTION_BUY = '0' # 买入
DIRECTION_SELL = '1' # 卖出
PRICETYPE_LIMIT = '2' # 限价
####... |
rfdougherty/dipy | refs/heads/master | dipy/reconst/tests/test_peak_finding.py | 10 | from __future__ import division, print_function, absolute_import
import numpy as np
import numpy.testing as npt
from dipy.reconst.recspeed import (local_maxima, remove_similar_vertices,
search_descending)
from dipy.data import get_sphere, get_data
from dipy.core.sphere import unique_... |
robbi/pyload | refs/heads/stable | module/plugins/hoster/FilezyNet.py | 7 | # -*- coding: utf-8 -*-
from ..internal.DeadHoster import DeadHoster
class FilezyNet(DeadHoster):
__name__ = "FilezyNet"
__type__ = "hoster"
__version__ = "0.25"
__status__ = "stable"
__pattern__ = r'http://(?:www\.)?filezy\.net/\w{12}'
__config__ = [] # @TODO: Remove in 0.4.10
__descr... |
Innovahn/odoo.old | refs/heads/master | addons/hr_recruitment/__openerp__.py | 52 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... |
Plain-Andy-legacy/android_external_chromium_org | refs/heads/lp-5.1r1 | tools/valgrind/common.py | 184 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import platform
import os
import signal
import subprocess
import sys
import time
class NotImplementedError(Exception):
pass
class Ti... |
audiodude/court-version-scraper | refs/heads/dependabot/pip/urllib3-1.26.5 | scrape.py | 1 | import os
from lxml import html
import pylibmc
import requests
HEADERS = {
'User-Agent': 'court-version-scraper (2.0) <audiodude@gmail.com>'
}
mc = None
try:
servers = os.environ.get('MEMCACHIER_SERVERS', '').split(',')
user = os.environ.get('MEMCACHIER_USERNAME', '')
passwd = os.environ.get('MEMCACHIER_PA... |
lertech/extra-addons | refs/heads/master | it/__openerp__.py | 2 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Leandro Ezequiel Baldi
# <baldileandro@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Licen... |
AppliedNeuralNetworks/saturnv | refs/heads/master | lib/saturnv/conf.py | 1 | # -*- coding: utf-8 -*-
from __future__ import with_statement
import os
import json
import threading
import yaml
from string import Template
from os.path import exists, join, expanduser
try:
from yaml import CLoader as YAMLLoader
except ImportError:
from yaml import Loader as YAMLLoader
class ConfFileNotFo... |
pkoutsias/SickRage | refs/heads/master | tests/scene_helpers_tests.py | 1 | # coding=utf-8
"""
Test scene helpers
"""
# pylint: disable=line-too-long
import os.path
import sys
import unittest
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), '../lib')))
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from sickbeard import show_nam... |
andmos/ansible | refs/heads/devel | lib/ansible/modules/network/nxos/nxos_bgp.py | 65 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... |
scotthartbti/android_external_chromium_org | refs/heads/kk44 | native_client_sdk/src/build_tools/dsc_info.py | 70 | #!/usr/bin/env python
# Copyright 2013 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.
"""Extracts information from a library.dsc file."""
import optparse
import os
import sys
import parse_dsc
def Error(msg):
print >>... |
GrahamDigital/django-scheduler | refs/heads/gd/master | schedule/templatetags/scheduletags.py | 1 | from __future__ import division
from django.utils.six.moves.builtins import range
import datetime
from django.conf import settings
from django import template
from django.core.urlresolvers import reverse
from django.utils.dateformat import format
from django.utils.html import escape
from django.utils import timezone
fr... |
dmccallie/HelloWorld | refs/heads/master | helloworld/__init__.py | 1 | #__init__.py makes this a package
print "evaluating __init__.py!" |
Hasimir/brython | refs/heads/master | www/src/Lib/urllib/parse.py | 735 | """Parse (absolute and relative) URLs.
urlparse module is based upon the following RFC specifications.
RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding
and L. Masinter, January 2005.
RFC 2732 : "Format for Literal IPv6 Addresses in URL's by R.Hinden, B.Carpenter
and L.Masinter, Decemb... |
Titan-C/sympy | refs/heads/master | sympy/solvers/tests/test_numeric.py | 71 | from sympy import Eq, Matrix, pi, sin, sqrt, Symbol, Integral, Piecewise, symbols
from mpmath import mnorm, mpf
from sympy.solvers import nsolve
from sympy.utilities.lambdify import lambdify
from sympy.utilities.pytest import raises, XFAIL
def test_nsolve():
# onedimensional
x = Symbol('x')
assert nsolve(... |
kyle-long/pyshelf | refs/heads/master | shelf/bulk_update/runner.py | 2 | import multiprocessing
from shelf.bucket_update.utils import update_search_index
class Runner(object):
"""
Responsible for creating processes that will take care of
updating the search index per bucket.
"""
def __init__(self, container):
"""
Args:
contai... |
WeihanSun/python_sample | refs/heads/master | wxPython/src/listbox.py | 1 | # listbox.py
import wx
ID_NEW = 1
ID_RENAME = 2
ID_CLEAR = 3
ID_DELETE = 4
class ListBox(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, size=(350, 220))
panel = wx.Panel(self, -1)
hbox = wx.BoxSizer(wx.HORIZONTAL)
self.listbox = wx.... |
pathway27/servo | refs/heads/master | tests/wpt/web-platform-tests/XMLHttpRequest/resources/invalid-utf8-html.py | 253 | def main(request, response):
headers = [("Content-type", "text/html;charset=utf-8")]
content = chr(0xff)
return headers, content
|
slohse/ansible | refs/heads/devel | test/units/modules/network/f5/test_bigip_wait.py | 10 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks 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
import os
import json
import pytest
import sys
from nose.plugins.skip imp... |
mineta/taskbuster-boilerplate | refs/heads/master | taskbuster/settings/base.py | 1 | # -*- coding: utf-8 -*-
"""
Django settings for taskbuster project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/se... |
fitermay/intellij-community | refs/heads/master | plugins/hg4idea/testData/bin/mercurial/filelog.py | 91 | # filelog.py - file history class for mercurial
#
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import revlog
import re
_mdre = re.compile('\1\n')
def _parsemeta(text):
"... |
radiovisual/radiovisual.github.io | refs/heads/master | dist/archives/unhcr/awards-page/js/mediaelementjs/src/Builder.py | 27 | import sys
import os
import shutil
import re
def remove_console(text):
return re.sub('console.(log|debug)\((.*)\);?', '', text)
me_filename = 'mediaelement'
mep_filename = 'mediaelementplayer'
combined_filename = 'mediaelement-and-player'
# BUILD MediaElement (single file)
print('building MediaElement.js')
me_fil... |
ggould256/libpmp | refs/heads/master | distributions/distribution.py | 1 | # Copyright 2016 Grant Gould
#
# 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, ... |
AutorestCI/azure-sdk-for-python | refs/heads/master | azure-mgmt-servicebus/azure/mgmt/servicebus/models/rule_paged.py | 2 | # 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 ... |
codepython/restcommander | refs/heads/master | play-1.2.4/python/Lib/cookielib.py | 59 | """HTTP cookie handling for web clients.
This module has (now fairly distant) origins in Gisle Aas' Perl module
HTTP::Cookies, from the libwww-perl library.
Docstrings, comments and debug strings in this code refer to the
attributes of the HTTP cookie system as cookie-attributes, to distinguish
them clearly from Pyth... |
felix-dumit/yowsup-tutorial | refs/heads/master | yowsup/layers/protocol_contacts/protocolentities/notification_contact_remove.py | 2 | from yowsup.structs import ProtocolTreeNode
from .notification_contact import ContactNotificationProtocolEntity
class RemoveContactNotificationProtocolEntity(ContactNotificationProtocolEntity):
'''
<notification offline="0" id="{{NOTIFICATION_ID}}" notify="{{NOTIFY_NAME}}" type="contacts"
t="{{TIME... |
kaneawk/shadowsocks | refs/heads/master | shadowsocks/manager.py | 12 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... |
w1ll1am23/home-assistant | refs/heads/dev | tests/components/huisbaasje/__init__.py | 7 | """Tests for the Huisbaasje integration."""
|
fnouama/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/contrib/gis/forms/fields.py | 405 | from django import forms
from django.utils.translation import ugettext_lazy as _
# While this couples the geographic forms to the GEOS library,
# it decouples from database (by not importing SpatialBackend).
from django.contrib.gis.geos import GEOSGeometry
class GeometryField(forms.Field):
"""
This is the bas... |
apixandru/intellij-community | refs/heads/master | python/testData/pyi/inspections/unresolvedModuleAttributes/UnresolvedModuleAttributes.py | 30 | import m1
print(m1.<warning descr="Cannot find reference 'module_only_attr' in 'm1.pyi'">module_only_attr</warning>)
print(m1.provided_attr)
print(m1.<warning descr="Cannot find reference 'not_provided_attr' in 'm1.pyi'">not_provided_attr</warning>)
|
frankrousseau/weboob | refs/heads/master | modules/ipinfodb/module.py | 7 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Julien Veyssier
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at yo... |
gic888/MIEN | refs/heads/master | nmpml/optimizer.py | 1 | #!/usr/bin/env python
## Copyright (C) 2005-2006 Graham I Cummins
## This program is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free Software
## Foundation; either version 2 of the License, or (at your option) any later version.
##... |
eSentire/nessus_join | refs/heads/master | nessjoin.py | 1 | #!/usr/bin/env python
'''
Name: nessjoin.py
Description: Combine multiple Nessus scans into one.
Version: 0.1
Author: Roy Firestein
Date: Feb 4 2013
'''
import os
import xml.dom.minidom
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-d", "--dir", action="store", type="string", dest="d... |
team-xue/xue | refs/heads/master | xue/manage.py | 1 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Project Xue
# customized manage file
# check if it's debug setting...
#from os.path import isfile
from django.core.management import execute_manager
import imp
#DEBUG = isfile('is_debug')
SETTINGS_MODULE_NAME = 'settings' # 'settings_dbg' if DEBUG else 'settings'
try... |
a113n/bcbio-nextgen | refs/heads/master | bcbio/pipeline/alignment.py | 2 | """Pipeline code to run alignments and prepare BAM files.
This works as part of the lane/flowcell process step of the pipeline.
"""
from collections import namedtuple
import glob
import os
import toolz as tz
from bcbio import bam, utils
from bcbio.bam import cram
from bcbio.ngsalign import (bbmap, bowtie, bwa, topha... |
wylieswanson/agilepyfs | refs/heads/master | fs/expose/serve/server.py | 14 | from __future__ import with_statement
import socket
import threading
from packetstream import JSONDecoder, JSONFileEncoder
class _SocketFile(object):
def __init__(self, socket):
self.socket = socket
def read(self, size):
try:
return self.socket.recv(size)
except ... |
abdoosh00/edx-rtl-final | refs/heads/master | lms/djangoapps/courseware/features/openended.py | 28 | #pylint: disable=C0111
#pylint: disable=W0621
from lettuce import world, step
from lettuce.django import django_url
from nose.tools import assert_equals, assert_in # pylint: disable=E0611
from logging import getLogger
logger = getLogger(__name__)
@step('I navigate to an openended question$')
def navigate_to_an_open... |
RPGOne/Skynet | refs/heads/Miho | pytorch-master/torch/legacy/nn/SpatialAveragePooling.py | 1 | import torch
from .Module import Module
class SpatialAveragePooling(Module):
def __init__(self, kW, kH, dW=1, dH=1, padW=0, padH=0):
super(SpatialAveragePooling, self).__init__()
self.kW = kW
self.kH = kH
self.dW = dW
self.dH = dH
self.padW = padW
self.pad... |
NeuPhysics/computational-neutrino-physics | refs/heads/master | docs/_themes/alabaster/support.py | 45 | from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
# Originally based on FlaskyStyle which was based on 'tango'.
class Alabaster(Style):
background_color = "#f8f8f8" # doesn't seem to override... |
godfather1103/WeiboRobot | refs/heads/master | python27/1.0/lib/lib2to3/fixes/fix_set_literal.py | 326 | """
Optional fixer to transform set() calls to set literals.
"""
# Author: Benjamin Peterson
from lib2to3 import fixer_base, pytree
from lib2to3.fixer_util import token, syms
class FixSetLiteral(fixer_base.BaseFix):
BM_compatible = True
explicit = True
PATTERN = """power< 'set' trailer< '('
... |
joopert/home-assistant | refs/heads/dev | homeassistant/components/tplink/config_flow.py | 24 | """Config flow for TP-Link."""
from homeassistant import config_entries
from homeassistant.helpers import config_entry_flow
from .common import async_get_discoverable_devices
from .const import DOMAIN
config_entry_flow.register_discovery_flow(
DOMAIN,
"TP-Link Smart Home",
async_get_discoverable_devices,
... |
WGS-TB/MentaLiST | refs/heads/master | galaxy/data_managers/data_manager_mentalist_build_db/data_manager/mentalist_build_db.py | 1 | #!/usr/bin/env python
from __future__ import print_function
import argparse
import os
import subprocess
import sys
import errno
from json import dumps, loads
DEFAULT_DATA_TABLE_NAMES = ["mentalist_databases"]
def mentalist_build_db( data_manager_dict, database_name, kmer_size, profile, fasta_files, params, target_d... |
MetaPlot/MetaPlot | refs/heads/master | examples/helpertest.py | 1 | import metaplot as mp
def create_master_dict(list):
mydict = dict()
for i in list:
mydict.update(i)
return mydict
a = mp.helpers.get_git_hash()
b = mp.helpers.get_source_code('fakecode.py','.')
c = mp.helpers.svn_information()
mlist = [a,b,c]
md = create_master_dict(mlist)
print('\n')
print('--... |
loli/semisupervisedforests | refs/heads/master | sklearn/tests/test_dummy.py | 27 | from __future__ import division
import warnings
import numpy as np
import scipy.sparse as sp
from sklearn.base import clone
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import a... |
Eureka22/ASM_xf | refs/heads/master | PythonD/bin/python/xpcmd.py | 2 | #!/usr/bin/python
"""
A command-line interface to the xmlproc parser. It continues parsing
even after fatal errors, in order to be find more errors, since this
does not mean feeding data to the application after a fatal error
(which would be in violation of the spec).
"""
usage=\
"""
Usage:
xp... |
JConwayAWT/PGSS14CC | refs/heads/master | lib/python/multimetallics/ase/lattice/hexagonal.py | 10 | """Function-like object creating hexagonal lattices.
The following lattice creators are defined:
* Hexagonal
* HexagonalClosedPacked
* Graphite
* Graphene
Example for using Graphene to create atoms object gra::
from ase.lattice.hexagonal import *
import ase.io as io
from ase import Atoms, Atom
... |
SouthGreenPlatform/scaffhunter | refs/heads/master | bin/matrix2ortho.py | 2 |
#
# Copyright 2014 CIRAD
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distribut... |
radosuav/QGIS | refs/heads/master | python/plugins/processing/gui/__init__.py | 45 | # -*- coding: utf-8 -*-
"""
***************************************************************************
__init__.py
---------------------
Date : August 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
******************************... |
disqus/channels | refs/heads/master | gunicorn.conf.py | 1 | import os
# Sample Gunicorn configuration file.
#
# Server socket
#
# bind - The socket to bind.
#
# A string of the form: 'HOST', 'HOST:PORT', 'unix:PATH'.
# An IP is a valid HOST.
#
# backlog - The number of pending connections. This refers
# to the number of clients that can be waiting to be
... |
nyee/RMG-Py | refs/heads/master | rmgpy/data/kinetics/kineticsTest.py | 6 | import os
import unittest
from external.wip import work_in_progress
from rmgpy import settings
from rmgpy.data.kinetics.database import KineticsDatabase
from rmgpy.data.base import DatabaseError
###################################################
class TestKineticsDatabase(unittest.TestCase):
def testLoadFa... |
jazkarta/edx-platform | refs/heads/master | openedx/core/djangoapps/user_api/tests/test_views.py | 9 | """Tests for the user API at the HTTP request level. """
import datetime
import base64
import json
import re
from unittest import skipUnless, SkipTest
import ddt
import httpretty
from pytz import UTC
import mock
from django.conf import settings
from django.core.urlresolvers import reverse
from django.core import mai... |
DazWorrall/ansible | refs/heads/devel | lib/ansible/modules/packaging/os/rpm_key.py | 16 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Ansible module to import third party repo keys to your rpm db
# (c) 2013, Héctor Acosta <hector.acosta@gazzang.com>
#
# 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_functio... |
RAtechntukan/Sick-Beard | refs/heads/development | lib/hachoir_core/field/new_seekable_field_set.py | 90 | from lib.hachoir_core.field import BasicFieldSet, GenericFieldSet, ParserError, createRawField
from lib.hachoir_core.error import HACHOIR_ERRORS
# getgaps(int, int, [listof (int, int)]) -> generator of (int, int)
# Gets all the gaps not covered by a block in `blocks` from `start` for `length` units.
def getgaps(start,... |
deepak02/rasa_core | refs/heads/master | tests/test_evaluation.py | 1 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import imghdr
import os
from rasa_core.evaluate import run_story_evaluation, \
collect_story_predictions
def test_evaluation_image_creation(tmpdir):
img_path =... |
kensugino/jGEM | refs/heads/master | jgem/collector.py | 1 | """
.. module:: collector
:synopsis: Calculate and collect coverages for all samples against a specific assembly.
.. moduleauthor:: Ken Sugino <ken.sugino@gmail.com>
"""
# system imports
import os
import logging
logging.basicConfig(level=logging.DEBUG)
LOG = logging.getLogger(__name__)
# 3rd party libraries
im... |
akhan7/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/pytest/_pytest/genscript.py | 191 | """ (deprecated) generate a single-file self-contained version of pytest """
import os
import sys
import pkgutil
import py
import _pytest
def find_toplevel(name):
for syspath in sys.path:
base = py.path.local(syspath)
lib = base/name
if lib.check(dir=1):
return lib
mo... |
jeroen92/reclass | refs/heads/master | run_tests.py | 4 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of reclass (http://github.com/madduck/reclass)
#
# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
import unittest
tests = unittest.TestLoader().discover('reclass')
unittest.TextTestR... |
tianzhihen/python-mode | refs/heads/develop | pymode/libs/pylama/lint/pylama_pylint/pylint/checkers/classes.py | 17 | # Copyright (c) 2003-2014 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# 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, o... |
gavin-feng/odoo | refs/heads/8.0 | openerp/addons/base/tests/test_ir_attachment.py | 433 | import hashlib
import os
import openerp
import openerp.tests.common
HASH_SPLIT = 2 # FIXME: testing implementations detail is not a good idea
class test_ir_attachment(openerp.tests.common.TransactionCase):
def setUp(self):
super(test_ir_attachment, self).setUp()
registry, cr, uid = self.regi... |
jbmorse/catkin_ws | refs/heads/master | src/jmorse_lab2/lab2.py | 3 | #!/usr/bin/env python
import rospy, tf
from tf.transformations import euler_from_quaternion
from kobuki_msgs.msg import BumperEvent
from geometry_msgs.msg import Quaternion
from geometry_msgs.msg import Twist
from nav_msgs.msg import Odometry
import time
import math
#This function sequentially calls methods to pe... |
eaas-framework/virtualbox | refs/heads/master | src/VBox/Additions/common/crOpenGL/pack/packspu_beginend.py | 21 | # Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
import sys
import apiutil
apiutil.CopyrightC()
print """/* DO NOT EDIT - AUTOMATICALLY GENERATED BY packspu_beginend.py */
#include "packspu.h"
#include "assert.h"
#include... |
lisael/pg-django | refs/heads/master | django/conf/urls/i18n.py | 97 | from django.conf import settings
from django.conf.urls import patterns
from django.core.urlresolvers import LocaleRegexURLResolver
def i18n_patterns(prefix, *args):
"""
Adds the language code prefix to every URL pattern within this
function. This may only be used in the root URLconf, not in an included
... |
Qalthos/ansible | refs/heads/devel | lib/ansible/modules/clustering/openshift/_oc.py | 29 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Kenneth D. Evensen <kevensen@redhat.com>
# 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_versio... |
cselis86/edx-platform | refs/heads/installer | common/djangoapps/course_about/tests/test_data.py | 19 | """
Tests specific to the Data Aggregation Layer of the Course About API.
"""
import unittest
from datetime import datetime
from django.conf import settings
from nose.tools import raises
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory... |
MRigal/django | refs/heads/master | tests/test_discovery_sample/tests_sample.py | 466 | import doctest
from unittest import TestCase
from django.test import SimpleTestCase, TestCase as DjangoTestCase
from . import doctests
class TestVanillaUnittest(TestCase):
def test_sample(self):
self.assertEqual(1, 1)
class TestDjangoTestCase(DjangoTestCase):
def test_sample(self):
self.... |
zmap/ztag | refs/heads/master | ztag/annotations/roomwizard.py | 1 | from ztag.annotation import *
class RoomWizard(Annotation):
protocol = protocols.HTTP
subprotocol = protocols.HTTP.GET
port = None
def process(self, obj, meta):
if obj["title"].strip() == "RoomWizard(TM)":
meta.global_metadata.manufacturer = Manufacturer.ROOMWIZARD
met... |
minorua/QGIS | refs/heads/master | python/custom_widgets/qgis_customwidgets.py | 37 | # -*- coding: utf-8 -*-
"""
***************************************************************************
customwidgets.py
---------------------
Date : May 2014
Copyright : (C) 2014 by Denis Rouzaud
Email : denis.rouzaud@gmail.com
****************************... |
NeCTAR-RC/nova | refs/heads/nectar/mitaka | nova/tests/functional/api_sample_tests/test_limits.py | 9 | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... |
Yarrick13/hwasp | refs/heads/master | tests/wasp1/AllAnswerSets/choice_6.test.py | 3 | input = """
a v b.
:- a.
"""
output = """
{b}
"""
|
etzhou/edx-platform | refs/heads/master | docs/en_us/platform_api/source/conf.py | 11 | # -*- coding: utf-8 -*-
# pylint: disable=invalid-name
# pylint: disable=redefined-builtin
# pylint: disable=protected-access
# pylint: disable=unused-argument
import os
from path import Path as path
import sys
import mock
MOCK_MODULES = [
'lxml',
'requests',
'xblock',
'fields',
'xblock.fields',
... |
menandmice/mnm-opendnssec | refs/heads/master | suds/xsd/doctor.py | 205 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... |
google-research/google-research | refs/heads/master | sparse_data/data/__init__.py | 1 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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 applicab... |
HouseofCoins/HOC | refs/heads/master | share/qt/extract_strings_qt.py | 2945 | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt4 stringdefs so that
they can be picked up by Qt linguist.
'''
from subprocess import Popen, PIPE
import glob
import operator
OUT_CPP="src/qt/bitcoinstrings.cpp"
EMPTY=['""']
def parse_po(text):
"""
Parse 'po' format produced by x... |
pie-lang/pie | refs/heads/master | vendor/gtest-1.7.0/test/gtest_break_on_failure_unittest.py | 2140 | #!/usr/bin/env python
#
# Copyright 2006, 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... |
yongshengwang/builthue | refs/heads/master | desktop/core/ext-py/lxml/buildlibxml.py | 28 | import os, re, sys
from distutils import log, sysconfig
try:
from urlparse import urlsplit, urljoin
from urllib import urlretrieve
except ImportError:
from urllib.parse import urlsplit
from urllib.request import urlretrieve
## Routines to download and build libxml2/xslt:
LIBXML2_LOCATION = 'ftp://xml... |
EHRI/rspub-gui | refs/heads/master | setup.py | 1 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import setup
from rsapp import version
setup(
name='rspub-gui',
version=version.__version__,
packages=['rsapp.gui'],
url='https://github.com/EHRI/rspub-gui',
license='Apache License 2.0',
author='henk van den berg',
author_emai... |
dongjoon-hyun/electron | refs/heads/master | script/build.py | 30 | #!/usr/bin/env python
import argparse
import os
import subprocess
import sys
from lib.config import get_target_arch
from lib.util import electron_gyp, import_vs_env
CONFIGURATIONS = ['Release', 'Debug']
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
def main():
os.chdir(SOURCE_ROOT)
... |
bootphon/abkhazia | refs/heads/master | abkhazia/utils/jobs.py | 1 | # Copyright 2016 Thomas Schatz, Xuan-Nga Cao, Mathieu Bernard
#
# This file is part of abkhazia: 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.
#
# Abkh... |
steedos/odoo | refs/heads/8.0 | addons/account/wizard/account_report_general_ledger.py | 267 | # -*- 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... |
mozvip/Sick-Beard | refs/heads/development | lib/socks/__init__.py | 138 | """SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... |
pinax/pinax-referrals | refs/heads/master | pinax/__init__.py | 12 | from pkgutil import extend_path
__path__ = extend_path(__path__, __name__) # noqa
|
JackNokia/robotframework | refs/heads/master | src/robot/writer/datafilewriter.py | 22 | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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... |
Permutatrix/servo | refs/heads/master | tests/wpt/update/upstream.py | 36 | import os
import re
import subprocess
import sys
import urlparse
from wptrunner.update.sync import UpdateCheckout
from wptrunner.update.tree import get_unique_name
from wptrunner.update.base import Step, StepRunner, exit_clean, exit_unclean
from .tree import Commit, GitTree, Patch
import github
from .github import Gi... |
nickfrostatx/gitcontrib | refs/heads/master | gitcontrib.py | 1 | #!/usr/bin/env python
"""gitcontrib: Compare the activity of different git contributors."""
from __future__ import print_function
import getopt
import json
import os
import subprocess
import sys
__version__ = '0.1.0'
BOLD = '\033[1m'
CLEAR = '\033[0m'
BLUE = '\033[34m'
GREEN = '\033[32m'
RED = '\033[31m'
def usag... |
lliendo/PyZ80 | refs/heads/master | setup.py | 1 | # -*- coding: utf-8 -*-
"""
This file is part of PyZ80.
PyZ80 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 License, or
(at your option) any later version.
PyZ80 is distributed ... |
tonnie17/flowlight | refs/heads/master | flowlight/tasks/task.py | 1 | from flowlight.utils.signal import Signal
from flowlight.utils.trigger import Trigger
from flowlight.tasks.meta import TaskMeta
import threading
class _Task:
""" A task wrapper on funciton.
:param func: task function called by `Node` lately.
:param run_after: run the task when `run_after` is finish stag... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.