repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
SmartPeople/zulip | refs/heads/master | zerver/migrations/0045_realm_waiting_period_threshold.py | 33 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('zerver', '0044_reaction'),
]
operations = [
migrations.AddField(
model_name='realm',
name='waiting_p... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/__init__.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 may ... |
ammarkhann/FinalSeniorCode | refs/heads/master | lib/python2.7/site-packages/scipy/ndimage/__init__.py | 81 | """
=========================================================
Multi-dimensional image processing (:mod:`scipy.ndimage`)
=========================================================
.. currentmodule:: scipy.ndimage
This package contains various functions for multi-dimensional image
processing.
Filters
=======
.. autos... |
Batterfii/django | refs/heads/master | tests/migrations/test_migrations_no_ancestor/0001_initial.py | 2995 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
operations = [
migrations.CreateModel(
"Author",
[
("id", models.AutoField(primary_key=True)),
("name",... |
fingi/csipsimple | refs/heads/master | jni/pjsip/sources/tests/pjsua/scripts-sendto/110_tel_uri.py | 59 | # $Id: 110_tel_uri.py 2451 2009-02-13 10:13:08Z bennylp $
import inc_sip as sip
import inc_sdp as sdp
# Handling of incoming tel: URI.
complete_msg = \
"""INVITE tel:+2065551212 SIP/2.0
Via: SIP/2.0/UDP $LOCAL_IP:$LOCAL_PORT;rport;x-route-tag="tgrp:cococisco1";branch=z9hG4bK61E05
From: <tel:12345>$FROM_TAG
To: <tel:+2... |
rosmo/boto | refs/heads/develop | boto/sqs/attributes.py | 223 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... |
christopher-henderson/Experiments | refs/heads/master | structures/BinaryTree/binaryTree.py | 2 | from functools import wraps
from BinaryTreeExceptions import *
from Node import Node
def NotEmpty(function):
@wraps(function)
def wrapper(self, *args, **kwargs):
if self.isEmpty():
raise EmptyTree()
else:
return function(self, *args, **kwargs)
return wrapper
class B... |
frdb194/django | refs/heads/master | tests/test_discovery_sample/tests/tests.py | 641 | from unittest import TestCase
class Test(TestCase):
def test_sample(self):
pass
|
roryk/tiny-test-data | refs/heads/master | scripts/fastq_convert.py | 2 | from argparse import ArgumentParser
import sys
from Bio import SeqIO
QUALITY_CONVERSION_TYPES = ["fastq-sanger", "fastq-solexa", "fastq-illumina"]
def main(in_file, in_format, out_format):
with open(in_file, "r") as in_handle:
SeqIO.convert(in_handle, in_format, sys.stdout, out_format)
if __name__ == "_... |
cdondrup/teaching | refs/heads/indigo-devel | pyperplan/src/search/__init__.py | 2 | #
# This file is part of pyperplan.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in... |
hoangt/u-boot | refs/heads/openrisc | tools/buildman/test.py | 31 | #
# Copyright (c) 2012 The Chromium OS Authors.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# 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
#... |
cs-au-dk/Artemis | refs/heads/master | contrib/ajaxinterface/requestpatterns/__init__.py | 1 | """
Copyright 2013 Aarhus University
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,... |
ojengwa/grr | refs/heads/master | lib/data_stores/fake_data_store_test.py | 2 | #!/usr/bin/env python
"""Tests the fake data store - in memory implementation."""
# pylint: disable=unused-import,g-bad-import-order
from grr.lib import server_plugins
# pylint: enable=unused-import,g-bad-import-order
from grr.lib import data_store_test
from grr.lib import flags
from grr.lib import test_lib
class... |
igor-toga/knob2 | refs/heads/master | knob/common/auth.py | 1 | # Copyright 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 l... |
Pathel/deuterium | refs/heads/master | src/comms/models.py | 2 | """
Models for the comsystem. The Commsystem is intended to be
used by Players (thematic IC communication is probably
best handled by custom commands instead).
The comm system could take the form of channels, but can also
be adopted for storing tells or in-game mail.
The comsystem's main component is the Message (Msg... |
FujiZ/ns-3 | refs/heads/master | src/antenna/bindings/modulegen__gcc_LP64.py | 38 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... |
jackxiang/jaikuengine | refs/heads/master | common/test/domain.py | 34 | # Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
was4444/chromium.src | refs/heads/nw15 | third_party/mesa/generate_git_sha1.py | 167 | # Copyright (c) 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.
import os
import os.path
import sys
output = sys.argv[1]
parentdir = os.path.abspath(os.path.join(output, os.pardir))
#The original body of this file i... |
bobrathbone/piradio | refs/heads/master | piface_remote.py | 1 | #!/usr/bin/env python
#
# Raspberry Pi PiFace remote control daemon
# $Id: piface_remote.py,v 1.6 2015/03/14 13:21:18 bob Exp $
#
# Author : Bob Rathbone
# Site : http://www.bobrathbone.com
#
# This program uses the piface CAD libraries
# See http://www.piface.org.uk/products/piface_control_and_display/
#
# ... |
ChinaQuants/PTVS | refs/heads/master | Python/Tests/TestData/VirtualEnv/env/Lib/site.py | 25 | """Append module search paths for third-party packages to sys.path.
****************************************************************
* This module is automatically imported during initialization. *
****************************************************************
In earlier versions of Python (up to 1.5a3), scripts or... |
saurabh6790/omni-apps | refs/heads/master | setup/page/setup_wizard/test_setup_wizard.py | 30 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from setup.page.setup_wizard.test_setup_data import args
from setup.page.setup_wizard.setup_wizard import setup_account
if __name__... |
837468220/python-for-android | refs/heads/master | python-build/python-libs/gdata/build/lib/gdata/tlslite/integration/IntegrationHelper.py | 286 |
class IntegrationHelper:
def __init__(self,
username=None, password=None, sharedKey=None,
certChain=None, privateKey=None,
cryptoID=None, protocol=None,
x509Fingerprint=None,
x509TrustList=None, x509CommonName=None,
setti... |
Maximilian-Reuter/SickRage-1 | refs/heads/master | lib/js2py/translators/jsregexps.py | 33 | from pyjsparserdata import *
REGEXP_SPECIAL_SINGLE = {'\\', '^', '$', '*', '+', '?', '.'}
NOT_PATTERN_CHARS = {'^', '$', '\\', '.', '*', '+', '?', '(', ')', '[', ']', '|'} # what about '{', '}', ???
CHAR_CLASS_ESCAPE = {'d', 'D', 's', 'S', 'w', 'W'}
CONTROL_ESCAPE_CHARS = {'f', 'n', 'r', 't', 'v'}
CONTROL_LETTERS... |
LimeTheCoder/teammates | refs/heads/master | BackupFiles/download_data.py | 24 | #This script should be placed in the GAE Python SDK directory.
#The path of the SDK will look like C:\Program Files (x86)\Google\google_appengine
#The script is to be used in conjunction with the generated_bulkloader.yaml file
#The script will download all types of entities from the GAE datastore except the StudentPro... |
papouso/odoo | refs/heads/8.0 | addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py | 337 | # -*- coding: 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
# ... |
Rudloff/youtube-dl | refs/heads/master | youtube_dl/extractor/uplynk.py | 1 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
float_or_none,
ExtractorError,
)
class UplynkIE(InfoExtractor):
IE_NAME = 'uplynk'
_VALID_URL = r'https?://.*?\.uplynk\.com/(?P<path>ext/[0-9a-f]{32}/(?P<external_id>[^/?&]+)|(?P... |
hasgeek/funnel | refs/heads/master | funnel/forms/notification.py | 1 | from __future__ import annotations
from collections import namedtuple
from flask import url_for
from baseframe import __
import baseframe.forms as forms
from ..models import User, notification_type_registry
from ..transports import platform_transports
__all__ = [
'transport_labels',
'UnsubscribeForm',
... |
lordmuffin/aws-cfn-plex | refs/heads/master | functions/credstash/botocore/docs/bcdoc/docstringparser.py | 19 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... |
axt/angr | refs/heads/master | angr/pathprioritizer.py | 13 | import logging
import networkx
l = logging.getLogger("angr.pathprioritizer")
class PathPrioritizer(object):
def __init__(self, cfg, target):
self._cfg = cfg
self._target = target
self._shortest_path_length_dict = {}
self._construct()
def __getstate__(self):
state = {... |
yanivpas/choice | refs/heads/master | utils/sync/sync.py | 1 | from optparse import OptionParser
def client(options):
#create an INET, STREAMing socket
s = socket.socket(
socket.AF_INET, socket.SOCK_STREAM)
#now connect to the web server on port 80
# - the normal http port
s.connect((options.ip, int(options.port)))
def server(options):
#create an ... |
gopchandani/ryu | refs/heads/master | ryu/contrib/ovs/daemon.py | 3 | # Copyright (c) 2010, 2011 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... |
LordDarkula/polypy | refs/heads/master | test/test_product.py | 1 | from polypy.base import x
def test_call():
f = 2 * x
assert f(2) == 4
f = 3 * x ** 2
assert f(3) == 27
def test_str():
f = 2 * x
assert str(f) == "2x"
f = x * 2
assert str(f) == "2x"
def test_square():
f = x
assert f * x == x ** 2
f = 3 * x
assert f ** 2 == 9 * x... |
mcrowson/django | refs/heads/master | tests/flatpages_tests/test_models.py | 342 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.flatpages.models import FlatPage
from django.test import SimpleTestCase
from django.test.utils import override_script_prefix
class FlatpageModelTests(SimpleTestCase):
def test_get_absolute_url_urlencodes(self):
pf = Fla... |
hgl888/chromium-crosswalk-efl | refs/heads/efl/crosswalk-10/39.0.2171.19 | tools/memory_inspector/memory_inspector/classification/results.py | 108 | # 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.
"""This module owns the logic for classifying and aggregating data in buckets.
This complements the structure defined in the rules module. Symmetrically, th... |
bsmitty83/kernel_omap | refs/heads/test-tuna-3.4 | tools/perf/scripts/python/net_dropmonitor.py | 1258 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... |
alcherk/mal | refs/heads/master | rpython/step3_env.py | 50 | #import sys, traceback
import mal_readline
import mal_types as types
from mal_types import (MalSym, MalInt, MalStr,
_symbol, _keywordu,
MalList, _list, MalVector, MalHashMap, MalFunc)
import reader, printer
from env import Env
# read
def READ(str):
return reader.read_s... |
sunqb/oa_qian | refs/heads/master | flask/Lib/site-packages/sqlalchemy/testing/assertsql.py | 32 | # testing/assertsql.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from ..engine.default import DefaultDialect
from .. import util
import re
cla... |
elmartinezinfo/three.js | refs/heads/master | utils/exporters/blender/2.65/scripts/addons/io_mesh_threejs/__init__.py | 9 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... |
pquerna/tls-client-hello-stats | refs/heads/master | third_party/dpkt/dpkt/ssl.py | 1 | # $Id: ssl.py 84 2012-08-24 18:44:00Z andrewflnr@gmail.com $
# Portion Copyright 2012 Google Inc. All rights reserved.
"""Secure Sockets Layer / Transport Layer Security."""
import dpkt
import ssl_ciphersuites
import struct
import binascii
import traceback
import datetime
#
# Note from April 2011: cde...@gmail.com a... |
draperjames/bokeh | refs/heads/master | examples/app/export_csv/main.py | 4 | from os.path import dirname, join
import pandas as pd
from bokeh.layouts import row, widgetbox
from bokeh.models import ColumnDataSource, CustomJS
from bokeh.models.widgets import Slider, Button, DataTable, TableColumn, NumberFormatter
from bokeh.io import curdoc
df = pd.read_csv(join(dirname(__file__), 'salary_data... |
strk/QGIS | refs/heads/master | tests/src/python/test_provider_memory.py | 5 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for the memory layer provider.
.. 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) any later vers... |
webdev1001/ansible | refs/heads/devel | v2/ansible/utils/debug.py | 16 | import os
import time
import sys
from multiprocessing import Lock
from ansible import constants as C
global_debug_lock = Lock()
def debug(msg):
if C.DEFAULT_DEBUG:
global_debug_lock.acquire()
print("%6d %0.5f: %s" % (os.getpid(), time.time(), msg))
sys.stdout.flush()
global_debug_... |
Intel-tensorflow/tensorflow | refs/heads/master | tensorflow/examples/speech_commands/accuracy_utils.py | 16 | # 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... |
agry/NGECore2 | refs/heads/master | scripts/mobiles/endor/frenzied_marauder.py | 2 | import sys
from services.spawn import MobileTemplate
from services.spawn import WeaponTemplate
from resources.datatables import WeaponType
from resources.datatables import Difficulty
from resources.datatables import Options
from java.util import Vector
def addTemplate(core):
mobileTemplate = MobileTemplate... |
looooo/pivy | refs/heads/master | scons/scons-local-1.2.0.d20090919/SCons/Tool/gas.py | 2 | """SCons.Tool.gas
Tool-specific initialization for as, the Gnu assembler.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foun... |
Michael-Pizzileo/lichee-3.0.8-leaked | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... |
kouk/boto | refs/heads/develop | tests/integration/gs/util.py | 101 | # Copyright (c) 2012, Google, Inc.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify... |
aliakseis/LIII | refs/heads/master | src/3rdparty/torrent-rasterbar/tools/parse_memory_log.py | 3 | #!/usr/bin/env python
import os, sys, time
# usage: memory.log memory_index.log
lines = open(sys.argv[1], 'rb').readlines()
index = open(sys.argv[2], 'rb').readlines()
# logfile format:
# #<allocation-point> <time(ms)> <key ('A' | 'F')> <address> <size> <total-size> <total-space-time> <peak-total-size>
# example:
# ... |
justajeffy/arsenalsuite | refs/heads/master | cpp/lib/epa/__init__.py | 211 | import build |
kivy-garden/garden.geartick | refs/heads/master | __init__.py | 1 | from geartick import GearTick
|
DOTOCA/plugin.video.netflixbmc | refs/heads/master | resources/lib/pyasn1/type/constraint.py | 382 | #
# ASN.1 subtype constraints classes.
#
# Constraints are relatively rare, but every ASN1 object
# is doing checks all the time for whether they have any
# constraints and whether they are applicable to the object.
#
# What we're going to do is define objects/functions that
# can be called unconditionally ... |
andrewleech/plugin.video.netflixbmc | refs/heads/master | resources/lib/pyasn1/type/constraint.py | 382 | #
# ASN.1 subtype constraints classes.
#
# Constraints are relatively rare, but every ASN1 object
# is doing checks all the time for whether they have any
# constraints and whether they are applicable to the object.
#
# What we're going to do is define objects/functions that
# can be called unconditionally ... |
BaconPancakes/valor | refs/heads/master | lib/youtube_dl/downloader/dash.py | 8 | from __future__ import unicode_literals
import os
from .fragment import FragmentFD
from ..compat import compat_urllib_error
from ..utils import (
sanitize_open,
encodeFilename,
)
class DashSegmentsFD(FragmentFD):
"""
Download segments in a DASH manifest
"""
FD_NAME = 'dashsegments'
def... |
jshackley/darkstar | refs/heads/master | migrations/migrate.py | 33 | import MySQLdb
import re
import spell_blobs_to_spell_table
credentials = {}
db = None
cur = None
def connect():
print("Loading conf/map_darkstar.conf")
# Grab mysql credentials
filename = "../conf/map_darkstar.conf"
global credentials
global db
global cur
with open(filename) as f:
... |
HybridF5/nova | refs/heads/master | nova/api/openstack/compute/quota_sets.py | 32 | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py | 1 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
ruuk/script.web.viewer2 | refs/heads/master | lib/webviewer/cssutils/tests/test_cssutils.py | 2 | # -*- coding: utf-8 -*-
"""Testcases for cssutils.css.CSSCharsetRule"""
from __future__ import with_statement
import basetest
import codecs
import cssutils
import os
import sys
import tempfile
import xml.dom
try:
import mock
except ImportError:
mock = None
print "install mock library to run all tests"
c... |
Pantynopants/pyGraph | refs/heads/master | using_alg/TSP.py | 1 | from models import *
import utils
import pandas as pd
import numpy as np
import sys
reload(sys)
sys.setdefaultencoding( "utf-8" )
# get all shorest path of the map first
# using ford
# as a matrix, all point are arrivable
# http://python.jobbole.com/81457/
# http://blog.csdn.net/duzuokanyunqi1/article/de... |
coolsvap/sos | refs/heads/master | sos/plugins/virsh.py | 8 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but... |
Zephor5/zspider | refs/heads/master | docs/conf.py | 1 | # -*- coding: utf-8 -*-
#
# zspider documentation build configuration file, created by
# sphinx-quickstart on Thu Dec 24 16:40:17 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... |
jwren/intellij-community | refs/heads/master | python/testData/debug/test_multiprocess_process.py | 12 | import time
import multiprocessing
def run(name):
print(name)
if __name__ == '__main__':
multiprocessing.Process(target=run, args=("subprocess",)).start()
while True:
time.sleep(0.1)
|
squirrelo/qiime | refs/heads/master | scripts/print_qiime_config.py | 15 | #!/usr/bin/env python
from __future__ import division
__author__ = "Jens Reeder"
__copyright__ = "Copyright 2011, The QIIME Project"
__credits__ = ["Jens Reeder", "Dan Knights", "Antonio Gonzalez Pena",
"Justin Kuczynski", "Jai Ram Rideout", "Greg Caporaso",
"Emily TerAvest"]
__license__ ... |
WladimirSidorenko/SentiLex | refs/heads/master | scripts/measure_corpus_agreement.py | 1 | #!/usr/bin/env python2.7
# -*- coding: utf-8-unix; mode: python; -*-
"""
DESCRIPTION:
============
Script for measuring the inter-annotator agreement on MMAX corpus.
USAGE:
======
measure_corpus_agreement.py [OPTIONS] basedata_dir markables_dir1 markables_dir2
EXAMPLE:
========
(envoke from the top directory of the ... |
mF2C/COMPSs | refs/heads/master | compss/programming_model/bindings/python/src/pycompss/api/dummy/__init__.py | 12 | #!/usr/bin/python
#
# Copyright 2002-2019 Barcelona Supercomputing Center (www.bsc.es)
#
# 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
... |
hyperized/ansible | refs/heads/devel | lib/ansible/modules/web_infrastructure/ansible_tower/tower_inventory_source.py | 38 | #!/usr/bin/python
# coding: utf-8 -*-
# Copyright: (c) 2018, Adrien Fleury <fleu42@gmail.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 = {'status': ['preview'],
... |
goulu/networkx | refs/heads/master | networkx/readwrite/tests/test_pajek.py | 6 | #!/usr/bin/env python
"""
Pajek tests
"""
from nose.tools import assert_equal
from networkx import *
import os,tempfile
from io import open
from networkx.testing import *
class TestPajek(object):
def setUp(self):
self.data="""*network Tralala\n*vertices 4\n 1 "A1" 0.0938 0.0896 ellipse x_fact 1... |
eciis/web | refs/heads/dev | backend/test/model_test/invite_user_adm_test.py | 1 | # -*- coding: utf-8 -*-
"""Invite User Adm Test."""
from .. import mocks
from ..test_base import TestBase
from models import Institution
from models import InviteUserAdm
from models import User
from custom_exceptions import NotAuthorizedException
class InviteUserAdmTest(TestBase):
"""Test invite user adm model... |
willu47/smif | refs/heads/develop | src/smif/data_layer/memory_interface.py | 1 | """Memory-backed store implementations
"""
from collections import OrderedDict
from copy import copy, deepcopy
from smif.data_layer.abstract_config_store import ConfigStore
from smif.data_layer.abstract_data_store import DataStore
from smif.data_layer.abstract_metadata_store import MetadataStore
from smif.data_layer.d... |
benoitsteiner/tensorflow-xsmm | refs/heads/master | tensorflow/python/kernel_tests/pooling_ops_test.py | 19 | # 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... |
dsajkl/123 | refs/heads/master | common/test/acceptance/pages/studio/settings_group_configurations.py | 10 | """
Course Group Configurations page.
"""
from bok_choy.promise import EmptyPromise
from .course_page import CoursePage
from .utils import confirm_prompt
class GroupConfigurationsPage(CoursePage):
"""
Course Group Configurations page.
"""
url_path = "group_configurations"
def is_browser_on_page(... |
agati/chimera | refs/heads/master | src/chimera/core/tests/managerhelperwithinitexception.py | 6 |
from chimera.core.chimeraobject import ChimeraObject
class ManagerHelperWithInitException (ChimeraObject):
def __init__ (self):
ChimeraObject.__init__(self)
raise Exception("oops in __init__")
def __start__ (self):
return True
def foo (self):
return 42
... |
vpodzime/pyparted | refs/heads/master | tests/test__ped_constraint.py | 6 | #
# Copyright (C) 2009-2011 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in the hope that it wi... |
openstack/octavia | refs/heads/master | octavia/controller/worker/v2/flows/pool_flows.py | 1 | # Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# 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... |
nijinashok/sos | refs/heads/master | sos/plugins/lustre.py | 1 | # This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU General Public License.
#
# See the LICENSE file in the source distribution ... |
lidavidm/mathics-heroku | refs/heads/master | venv/lib/python2.7/site-packages/pip/vendor/html5lib/treebuilders/etree.py | 79 | from __future__ import absolute_import, division, unicode_literals
from pip.vendor.six import text_type
import re
from . import _base
from .. import ihatexml
from .. import constants
from ..constants import namespaces
from ..utils import moduleFactoryFactory
tag_regexp = re.compile("{([^}]*)}(.*)")
def getETreeBui... |
sbellem/django | refs/heads/master | django/core/urlresolvers.py | 59 | """
This module converts requested URLs to callback view functions.
RegexURLResolver is the main class here. Its resolve() method takes a URL (as
a string) and returns a tuple in this format:
(view_function, function_args, function_kwargs)
"""
from __future__ import unicode_literals
import functools
import re
im... |
hj3938/panda3d | refs/heads/master | direct/src/showbase/EventManager.py | 9 | """Undocumented Module"""
__all__ = ['EventManager']
from MessengerGlobal import *
from direct.directnotify.DirectNotifyGlobal import *
from direct.task.TaskManagerGlobal import taskMgr
from panda3d.core import PStatCollector, EventQueue, EventHandler
class EventManager:
notify = None
# delayed import, si... |
romain-li/edx-platform | refs/heads/master | common/djangoapps/util/tests/test_milestones_helpers.py | 16 | """
Tests for the milestones helpers library, which is the integration point for the edx_milestones API
"""
import ddt
from mock import patch
from milestones.exceptions import InvalidCourseKeyException, InvalidUserException
from util import milestones_helpers
from xmodule.modulestore.tests.django_utils import ModuleS... |
ckprice/bedrock | refs/heads/master | docs/conf.py | 10 | # -*- coding: utf-8 -*-
#
# playdoh documentation build configuration file, created by
# sphinx-quickstart on Tue Jan 4 15:11:09 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... |
jdemeyer/sagenb | refs/heads/master | sagenb/notebook/user_conf.py | 6 | # -*- coding: utf-8 -*
"""nodoctest
"""
import os, copy
import server_conf
from conf import (Configuration, POS, DESC, GROUP, TYPE, CHOICES, T_BOOL,
T_INTEGER, T_CHOICE, T_REAL, T_COLOR, T_STRING, T_LIST)
from sagenb.misc.misc import SAGENB_ROOT, get_languages
from flask.ext.babel import lazy_gettext... |
cloudnsru/PyCloudNS | refs/heads/master | setup.py | 2 | #!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md')) as f:
long_description = f.read()
setup(
name='PyCloudNS',
version='3.0.0',
autho... |
orionrobots/micropython | refs/heads/master | tests/basics/parser.py | 62 | # parser tests
try:
compile
except NameError:
print("SKIP")
import sys
sys.exit()
# completely empty string
# uPy and CPy differ for this case
#try:
# compile("", "stdin", "single")
#except SyntaxError:
# print("SyntaxError")
try:
compile("", "stdin", "eval")
except SyntaxError:
print("S... |
krisys/django | refs/heads/master | django/core/handlers/base.py | 5 | from __future__ import unicode_literals
import logging
import sys
import types
import warnings
from django import http
from django.conf import settings
from django.core import signals
from django.core.exceptions import (
MiddlewareNotUsed, PermissionDenied, SuspiciousOperation,
)
from django.db import connections... |
AlexYang1949/FuturesMeasure | refs/heads/master | data/dataSpider.py | 1 | #-*-coding:utf-8-*-
import datetime
from bs4 import BeautifulSoup
import re
import urllib
from data.dataProvider import DataProvider
from utils.utils import utils
from database import Database
class DataSpider():
def __init__(self,name):
self.name = name
self.tablename = utils.getShort(self.name)+'... |
muravjov/ansible-modules-core | refs/heads/devel | packaging/os/rhn_register.py | 77 | #!/usr/bin/python
# (c) James Laska
#
# 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.
#
# A... |
zifeo/nest-simulator | refs/heads/master | pynest/examples/brunel_exp_multisynapse_nest.py | 9 | # -*- coding: utf-8 -*-
#
# brunel_exp_multisynapse_nest.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 o... |
karmix/blivet | refs/heads/master | tests/devicelibs_test/mdraid_test.py | 6 | import unittest
import blivet.devicelibs.mdraid as mdraid
class MDRaidTestCase(unittest.TestCase):
def testMDRaid(self):
##
## level lookup
##
self.assertEqual(mdraid.RAID_levels.raidLevel("stripe").name, "raid0")
self.assertEqual(mdraid.RAID_levels.raidLevel("mirror").na... |
iam-TJ/node-gyp | refs/heads/master | gyp/test/variables/commands/gyptest-commands-ignore-env.py | 330 | #!/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.
"""
Test that environment variables are ignored when --ignore-environment is
specified.
"""
import os
import TestGyp
test = TestGyp.TestG... |
RobertABT/heightmap | refs/heads/master | build/matplotlib/lib/mpl_toolkits/mplot3d/__init__.py | 7 | from axes3d import Axes3D
|
rlowrance/python-unified-containers | refs/heads/master | src/puc-old.py | 1 | '''Python Uniform Containers that mimic K's container types'''
# TODO: write documentation for V, H, T, KT
# goal: assure that the API is easy to describe
import abc
import collections
import numpy as np
import pandas as pd
import pdb
import unittest
class PUC(object):
__metaclass__ = abc.ABCMeta
pass
cla... |
albertz/music-player | refs/heads/master | mac/pyobjc-core/PyObjCTest/test_bundleFunctions.py | 2 | from __future__ import absolute_import, unicode_literals
import objc
from . import fnd as Foundation
from PyObjCTools.TestSupport import *
import os
NSObject = objc.lookUpClass('NSObject')
def S(*args):
return b''.join(args)
FUNCTIONS=[
( 'NSHomeDirectory', S(objc._C_ID)),
( 'NSIsFreedObject', S(objc._C_... |
UnicronNL/vyos-kernel-clearfog | refs/heads/current | scripts/gdb/linux/lists.py | 630 | #
# gdb helper commands and functions for Linux kernel debugging
#
# list tools
#
# Copyright (c) Thiebaud Weksteen, 2015
#
# Authors:
# Thiebaud Weksteen <thiebaud@weksteen.fr>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
from linux import utils
list_head = utils.CachedType("st... |
jamesblunt/sympy | refs/heads/master | sympy/printing/python.py | 118 | # -*- coding: utf-8 -*-
from __future__ import print_function, division
import keyword as kw
import sympy
from .repr import ReprPrinter
from .str import StrPrinter
# A list of classes that should be printed using StrPrinter
STRPRINT = ("Add", "Infinity", "Integer", "Mul", "NegativeInfinity",
"Pow", "Zero... |
powerlim2/project_free_insight | refs/heads/master | data_api/venv/lib/python2.7/site-packages/pip/compat/ordereddict.py | 141 | # Copyright (c) 2009 Raymond Hettinger
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish,... |
pignacio/python-nvd3 | refs/heads/develop | examples/LineChart.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Examples for Python-nvd3 is a Python wrapper for NVD3 graph library.
NVD3 is an attempt to build re-usable charts and chart components
for d3.js without taking away the power that d3.js gives you.
Project location : https://github.com/areski/python-nvd3
"""
from nvd3.lin... |
fibbo/DIRAC | refs/heads/integration | StorageManagementSystem/Agent/RequestPreparationAgent.py | 7 | # $HeadURL$
__RCSID__ = "$Id$"
from DIRAC import gLogger, S_OK
from DIRAC.Core.Base.AgentModule import AgentModule
from DIRAC.Resources.Catalog.FileCatalog import FileCatalog
from DIRAC.DataManagementSystem.Client.DataIntegrityClient import DataIntegrityClie... |
bodi000/odoo | refs/heads/master | addons/project_issue/project_issue.py | 33 | #-*- 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... |
dscdac/Proyecto-IV-modulo2 | refs/heads/master | lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py | 1093 | # Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.
# Copyright 2009 Raymond Hettinger, released under the MIT License.
# http://code.activestate.com/recipes/576693/
try:
from thread import get_ident as _get_ide... |
antiface/audiolazy | refs/heads/master | examples/dft_pitch.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of AudioLazy, the signal processing Python package.
# Copyright (C) 2012-2014 Danilo de Jesus da Silva Bellini
#
# AudioLazy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# ... |
md2/pyhomelib | refs/heads/master | pyhomelib/statisticsdialog.py | 1 | # -*- coding: utf-8 -*-
# vim: ts=4 sw=4 et tw=79 sts=4 ai si
from PyQt4 import QtCore, QtGui
from ui.statisticsdialog import Ui_StatisticsDialog
class StatisticsDialog(QtGui.QDialog, Ui_StatisticsDialog):
def __init__(self, db, parent=None):
super(StatisticsDialog, self).__init__(parent)
self.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.