repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
sunqb/oa_qian | refs/heads/master | flask/Lib/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py | 2930 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
lnielsen/cookiecutter-invenio-module | refs/heads/master | docs/conf.py | 2 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015, 2017 CERN.
#
# Invenio 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... |
KitKatXperience/platform_external_chromium_org | refs/heads/kk | tools/json_schema_compiler/highlighters/__init__.py | 12133432 | |
virtool/virtool | refs/heads/master | tests/groups/__init__.py | 12133432 | |
levilucio/SyVOLT | refs/heads/master | ECore_Copier_MM/properties/positive/himesis/__init__.py | 12133432 | |
zhangjunli177/sahara | refs/heads/master | sahara/tests/unit/service/edp/workflow_creator/__init__.py | 12133432 | |
Fansion/crawltwitter | refs/heads/master | crawltwitter/controllers/__init__.py | 12133432 | |
DONIKAN/django | refs/heads/master | django/contrib/gis/serializers/__init__.py | 12133432 | |
valkjsaaa/sl4a | refs/heads/master | python/src/Lib/test/test_normalization.py | 55 | from test.test_support import run_unittest, open_urlresource
import unittest
import sys
import os
from unicodedata import normalize, unidata_version
TESTDATAFILE = "NormalizationTest" + os.extsep + "txt"
TESTDATAURL = "http://www.unicode.org/Public/" + unidata_version + "/ucd/" + TESTDATAFILE
if os.path.exists(TESTD... |
ZECTBynmo/notnode-gyp | refs/heads/master | gyp/test/mac/gyptest-depend-on-bundle.py | 303 | #!/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.
"""
Verifies that a dependency on a bundle causes the whole bundle to be built.
"""
import TestGyp
import sys
if sys.platform == 'darwin'... |
robinro/ansible | refs/heads/devel | lib/ansible/modules/network/f5/bigip_command.py | 37 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2016 F5 Networks 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
# ... |
dgarros/ansible | refs/heads/devel | lib/ansible/modules/packaging/os/homebrew.py | 60 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Andrew Dunham <andrew@du.nham.ca>
# (c) 2013, Daniel Jaouen <dcj24@cornell.edu>
# (c) 2015, Indrajit Raychaudhuri <irc+code@indrajit.com>
#
# Based on macports (Jimmy Tang <jcftang@gmail.com>)
#
# This module is free software: you can redistribute it and/or modify
... |
lym/allura-git | refs/heads/master | ForgeChat/forgechat/command.py | 2 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... |
okfn/ckanext-project | refs/heads/master | ckanext/project/logic/converters.py | 4 | import ckan.model as model
import ckan.lib.navl.dictization_functions as df
from ckan.common import _
def convert_package_name_or_id_to_title_or_name(package_name_or_id, context):
'''
Return the package title, or name if no title, for the given package name
or id.
:returns: the name of the package wi... |
windyuuy/opera | refs/heads/master | chromium/src/third_party/python_26/Tools/pynche/ChipViewer.py | 94 | """Chip viewer and widget.
In the lower left corner of the main Pynche window, you will see two
ChipWidgets, one for the selected color and one for the nearest color. The
selected color is the actual RGB value expressed as an X11 #COLOR name. The
nearest color is the named color from the X11 database that is closest ... |
zachriggle/pwndbg | refs/heads/master | pwndbg/commands/config.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Dumps all pwndbg-specific configuration points.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import pwndbg.commands
import pwndbg.config
from pwndbg.color import... |
errbotio/errbot | refs/heads/master | tests/poller_test.py | 1 | import time
from os import path
CURRENT_FILE_DIR = path.dirname(path.realpath(__file__))
extra_plugin_dir = path.join(CURRENT_FILE_DIR, "poller_plugin")
def test_delayed_hello(testbot):
assert "Hello, world!" in testbot.exec_command("!hello")
time.sleep(1)
delayed_msg = "Hello world! was sent 5 seconds a... |
bambuste/qgis-vfk-plugin | refs/heads/master | vfkDocument.py | 2 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
vfkPluginDialog
A QGIS plugin
Plugin umoznujici praci s daty katastru nemovitosti
-------------------
begin : 2015-06-11
... |
deepakkv07/Implementation-of-UDP-Lite-in-ns-3 | refs/heads/master | src/lte/bindings/callbacks_list.py | 3 | callback_classes = [
['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Packet>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bo... |
maximmaxim345/Sheep-it-blender-plugin | refs/heads/master | selenium/webdriver/firefox/firefox_profile.py | 24 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
jonathanwcrane/netaddr | refs/heads/rel-0.7.x | docs/source/conf.py | 4 | # -*- coding: utf-8 -*-
#
# netaddr documentation build configuration file, created by
# sphinx-quickstart on Sun May 27 22:23:51 2012.
#
# 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... |
Fusion-Rom/android_external_chromium_org | refs/heads/lp5.1 | chrome/common/extensions/docs/server2/compiled_file_system.py | 26 | # 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 sys
from docs_server_utils import ToUnicode
from file_system import FileNotFoundError
from future import Future
from path_util import AssertIsDir... |
printerpam/Stormy | refs/heads/master | desktop_gui/Stormy/controllers/helpController.py | 2 | __author__ = 'phpgeek'
import webbrowser
class HelpController():
def __init__(self, mainWidget):
self.mainWidget = mainWidget
def showHelp(self):
# cek for other installation in progress. will show popup and stop execution
if self.mainWidget.otherInstallationOnProgress() :
... |
shasha79/pysolr | refs/heads/master | tests/client.py | 2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import sys
from pysolr import (Solr, Results, SolrError, unescape_html, safe_urlencode,
force_unicode, force_bytes, sanitize, json, ET, IS_PY3,
clean_xml_string)
try:
import unittest2 as unitte... |
snowdj/research_public | refs/heads/master | template_algorithms/basic_pairs_trade_optimize_template.py | 2 | """
This is a basic pairs trading algorithm that uses the optimize
WARNING: THIS IS A LEARNING EXAMPLE ONLY. DO NOT TRY TO TRADE SOMETHING THIS SIMPLE.
https://www.quantopian.com/workshops
https://www.quantopian.com/lectures
For any questions, email max@quantopian.com
"""
import numpy as np
import pandas as pd
import... |
rockneurotiko/madness-things | refs/heads/master | Python/tailrec.py | 1 |
import sys
class TailRecurseException(Exception):
def __init__(self, args, kwargs):
self.args = args
self.kwargs = kwargs
def tail_call_optimized(g):
"""
This function decorates a function with tail call
optimization. It does this by throwing an exception
if it is it's own grandparent, and catching... |
pcmoritz/Strada.jl | refs/heads/master | deps/src/caffe/python/apollocaffe/models/googlenet.py | 1 | import os
from apollocaffe import layers
def weights_file():
filename = os.path.normpath('%s/../../../models/bvlc_googlenet/bvlc_googlenet.caffemodel' % os.path.dirname(os.path.realpath(__file__)))
if not os.path.exists(filename):
download_script = os.path.normpath('%s/../../../scripts/download_model_... |
bunnyitvn/webptn | refs/heads/master | build/lib.linux-i686-2.7/django/contrib/staticfiles/utils.py | 322 | import os
import fnmatch
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
def matches_patterns(path, patterns=None):
"""
Return True or False depending on whether the ``path`` should be
ignored (if it matches any pattern in ``ignore_patterns``).
"""
if patter... |
infphilo/hisat2 | refs/heads/master | evaluation/get_programs.py | 1 | #!/usr/bin/env python
import sys, os
use_message = '''
'''
def get_aligners():
mac = (sys.platform == "darwin")
if not os.path.exists("aligners"):
os.mkdir("aligners")
os.chdir("aligners")
if not os.path.exists("bin"):
os.mkdir("bin")
programs = ["HISAT", "Bowtie2", "Bowtie", "TopH... |
K-3D/k3d | refs/heads/master | tests/mesh/mesh.source.QuadricParaboloid.py | 2 | #python
import testing
setup = testing.setup_mesh_source_test("QuadricParaboloid")
testing.require_valid_mesh(setup.document, setup.source.get_property("output_mesh"))
testing.require_similar_mesh(setup.document, setup.source.get_property("output_mesh"), "mesh.source.QuadricParaboloid", 1)
|
ftomassetti/intellij-community | refs/heads/master | python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_filter.py | 326 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Fixer that changes filter(F, X) into list(filter(F, X)).
We avoid the transformation if the filter() call is directly contained
in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or
for V in <>:.
NOTE: This... |
jinyu121/Canteen | refs/heads/master | CanteenWebsite/tests.py | 72 | # -*- coding: utf-8 -*-
from django.test import TestCase
# Create your tests here.
|
nagyistoce/odoo-dev-odoo | refs/heads/8.0 | openerp/addons/base/tests/test_search.py | 290 | import unittest2
import openerp.tests.common as common
class test_search(common.TransactionCase):
def test_00_search_order(self):
registry, cr, uid = self.registry, self.cr, self.uid
# Create 6 partners with a given name, and a given creation order to
# ensure the order of their ID. So... |
roxyboy/bokeh | refs/heads/master | sphinx/source/docs/tutorials/solutions/olympics.py | 23 | import numpy as np
from bokeh.plotting import figure, output_file, show, VBox
from bokeh.sampledata.olympics2014 import data
data = { d['abbr']: d['medals'] for d in data['data'] if d['medals']['total'] > 0}
# pull out just the data we care about
countries = sorted(
data.keys(),
key=lambda x: ... |
KrzysztofStachanczyk/Sensors-WWW-website | refs/heads/master | www/env/lib/python2.7/site-packages/django/db/backends/mysql/schema.py | 37 | from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from django.db.models import NOT_PROVIDED
class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
sql_rename_table = "RENAME TABLE %(old_table)s TO %(new_table)s"
sql_alter_column_null = "MODIFY %(column)s %(type)s NULL"
sql_alter_column_... |
40223105/w17test | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/zipfile.py | 620 | """
Read and write ZIP files.
XXX references to utf-8 need further investigation.
"""
import io
import os
import re
import imp
import sys
import time
import stat
import shutil
import struct
import binascii
try:
import zlib # We may need its compression method
crc32 = zlib.crc32
except ImportError:
zlib =... |
mindbender-studio/setup | refs/heads/master | bin/windows/python36/Lib/site-packages/pip/_vendor/distlib/database.py | 334 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2016 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""PEP 376 implementation."""
from __future__ import unicode_literals
import base64
import codecs
import contextlib
import hashlib
import logging
import os
import posixpath
import sys
import z... |
aboutsajjad/Bridge | refs/heads/master | app_packages/youtube_dl/extractor/mofosex.py | 14 | from __future__ import unicode_literals
from ..utils import (
int_or_none,
str_to_int,
unified_strdate,
)
from .keezmovies import KeezMoviesIE
class MofosexIE(KeezMoviesIE):
_VALID_URL = r'https?://(?:www\.)?mofosex\.com/videos/(?P<id>\d+)/(?P<display_id>[^/?#&.]+)\.html'
_TESTS = [{
'url... |
bbozhev/flask-test | refs/heads/master | flask/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/py.py | 1323 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type
from bisect import bisect_left
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
if not all(isinstance(x, text_type) for x in data.keys()):
raise TypeError... |
nypdmax/NUMA | refs/heads/master | tools/qemu-xen/scripts/tracetool/format/events_h.py | 95 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Generate .h for event description.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajn... |
Southpaw-TACTIC/TACTIC | refs/heads/4.7 | src/tactic/command/project_template_cmd.py | 1 | ###########################################################
#
# Copyright (c) 2010, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... |
poljeff/odoo | refs/heads/8.0 | addons/website/tests/test_converter.py | 280 | # -*- coding: utf-8 -*-
import textwrap
import unittest2
from lxml import etree, html
from lxml.builder import E
from openerp.tests import common
from openerp.addons.base.ir import ir_qweb
from openerp.addons.website.models.ir_qweb import html_to_text
from openerp.addons.website.models.website import slugify, unslug
... |
hopeall/odoo | refs/heads/8.0 | addons/stock_account/wizard/stock_valuation_history.py | 91 |
from openerp import tools
from openerp.osv import fields, osv
from openerp.tools.translate import _
class wizard_valuation_history(osv.osv_memory):
_name = 'wizard.valuation.history'
_description = 'Wizard that opens the stock valuation history table'
_columns = {
'choose_date': fields.boolean('C... |
qedsoftware/commcare-hq | refs/heads/master | corehq/tabs/__init__.py | 2 | __all__ = ['MENU_TABS']
|
timoschwarzer/blendworks | refs/heads/master | BlendWorks Server/python/Lib/test/test_code.py | 94 | """This module includes tests of the code object representation.
>>> def f(x):
... def g(y):
... return x + y
... return g
...
>>> dump(f.__code__)
name: f
argcount: 1
kwonlyargcount: 0
names: ()
varnames: ('x', 'g')
cellvars: ('x',)
freevars: ()
nlocals: 2
flags: 3
consts: ('None', '<code object g>',... |
espadrine/opera | refs/heads/master | chromium/src/third_party/webdriver/pylib/test/selenium/webdriver/common/select_element_handling_tests.py | 28 | #!/usr/bin/python
# Copyright 2008-2009 WebDriver committers
# Copyright 2008-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-... |
pansapiens/mytardis | refs/heads/develop | tardis/apps/oaipmh/provider/base.py | 5 | import oaipmh.error
import oaipmh.interfaces
class BaseProvider(oaipmh.interfaces.IOAI, object):
"""
A base provider which roughly implements the PyOAI interface for OAI-PMH
servers.
Extend this if you're writing your own provider for a new type or a
different metadata format.
"""
def __i... |
vipul-sharma20/oh-mainline | refs/heads/master | vendor/packages/twisted/twisted/application/__init__.py | 60 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
"""
Configuration objects for Twisted Applications
"""
|
lindzey/pelican-plugins | refs/heads/master | textile_reader/textile_reader.py | 59 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
from pelican import signals
from pelican.readers import BaseReader
from pelican.utils import pelican_open
try:
from textile import textile
except ImportError:
textile = False
class TextileReader(BaseReader):
"""Reader for Te... |
jimtyhurst/team-budget | refs/heads/master | budget_proj/budget_app/tests.py | 1 | from django.test import TestCase, Client
# NOTE: disabled these for now but expect they'll be used in the near future
# from django.urls import reverse
# from budget_app.models import OCRB
# from mixer.backend.django import mixer
# from rest_framework import status
# from rest_framework.test import APITestCase
# Other... |
laszlocsomor/tensorflow | refs/heads/master | tensorflow/contrib/training/python/training/resample_test.py | 107 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
MobinRanjbar/hue | refs/heads/master | desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/set_fake_passwords.py | 35 | """
set_fake_passwords.py
Reset all user passwords to a common value. Useful for testing in a
development environment. As such, this command is only available when
setting.DEBUG is True.
"""
from optparse import make_option
from django.conf import settings
from django.core.management.base import NoArgsCo... |
atmark-techno/atmark-dist | refs/heads/master | user/python/Lib/encodings/koi8_r.py | 4 | """ Python Character Mapping Codec generated from 'KOI8-R.TXT'.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(i... |
abhisg/scikit-learn | refs/heads/master | doc/tutorial/text_analytics/data/movie_reviews/fetch_data.py | 278 | """Script to download the movie review dataset"""
import os
import tarfile
try:
from urllib import urlopen
except ImportError:
from urllib.request import urlopen
URL = ("http://www.cs.cornell.edu/people/pabo/"
"movie-review-data/review_polarity.tar.gz")
ARCHIVE_NAME = URL.rsplit('/', 1)[1]
DATA_FOLDE... |
vineethguna/heroku-buildpack-libsandbox | refs/heads/master | vendor/distribute-0.6.34/setuptools/command/__init__.py | 210 | __all__ = [
'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop',
'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts',
'sdist', 'setopt', 'test', 'upload', 'install_egg_info', 'install_scripts',
'register', 'bdist_wininst', 'upload_docs',
]
from setuptools.comman... |
michaelaye/vispy | refs/heads/master | examples/tutorial/visuals/T02_measurements.py | 17 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... |
leanhhao86/cafe_management | refs/heads/master | oo/test.py | 1 | import sys
try:
untrusted.execute()
except:
e = sys.exc_info()
print(e)
|
lokeshpancharia/BuildingMachineLearningSystemsWithPython | refs/heads/master | ch10/thresholded_figure.py | 21 | import mahotas as mh
import numpy as np
from matplotlib import pyplot as plt
# Load image & convert to B&W
image = mh.imread('../SimpleImageDataset/scene00.jpg')
image = mh.colors.rgb2grey(image, dtype=np.uint8)
plt.imshow(image)
plt.gray()
plt.title('original image')
thresh = mh.thresholding.otsu(image)
print('Otsu ... |
bj-yinyan/beets | refs/heads/master | beetsplug/fetchart.py | 4 | # This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# 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, ... |
tuxun/smw-funwiki | refs/heads/master | vendor/justinrainbow/json-schema/docs/conf.py | 74 | # -*- coding: utf-8 -*-
#
# JsonSchema documentation build configuration file, created by
# sphinx-quickstart on Sat Dec 10 15:34:44 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.
#
# ... |
mjiang-27/django_learn | refs/heads/master | form_basic/calc/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
RiccardoPecora/MP | refs/heads/master | Lib/md5.py | 62 | # $Id$
#
# Copyright (C) 2005 Gregory P. Smith (greg@krypto.org)
# Licensed to PSF under a Contributor Agreement.
import warnings
warnings.warn("the md5 module is deprecated; use hashlib instead",
DeprecationWarning, 2)
from hashlib import md5
new = md5
blocksize = 1 # legacy v... |
rguillebert/CythonCTypesBackend | refs/heads/ctypes_backend | tests/run/import_error_T734.py | 2 | # mode: run
# ticket: 734
def test_import_error():
"""
>>> test_import_error()
Traceback (most recent call last):
ImportError: cannot import name xxx
"""
from sys import xxx
|
rwillmer/django | refs/heads/master | django/contrib/sites/migrations/0002_alter_domain_unique.py | 170 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django.contrib.sites.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sites', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='... |
kzvyahin/cfme_tests | refs/heads/master | cfme/tests/services/test_rest_services.py | 1 | # -*- coding: utf-8 -*-
import datetime
import fauxfactory
import pytest
from cfme.rest import dialog as _dialog
from cfme.rest import services as _services
from cfme.rest import service_catalogs as _service_catalogs
from cfme.rest import service_templates as _service_templates
from cfme import test_requirements
from ... |
thaumos/ansible | refs/heads/devel | test/runner/lib/target.py | 14 | """Test target identification, iteration and inclusion/exclusion."""
from __future__ import absolute_import, print_function
import collections
import os
import re
import errno
import itertools
import abc
import sys
from lib.util import (
ApplicationError,
display,
read_lines_without_comments,
)
MODULE_E... |
biocommons/hgvs | refs/heads/main | tests/test_hgvs_posedit.py | 1 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import unittest
import pytest
import hgvs.edit
import hgvs.location
import hgvs.posedit
@pytest.mark.quick
@pytest.mark.models
class Test_PosEdit(unittest.TestCase):
def test_PosEdit(self):
pos = ... |
youprofit/NewsBlur | refs/heads/master | utils/tlnbt.py | 9 | #!/usr/bin/env python
import tlnb
import sys
if __name__ == "__main__":
role = "task"
if len(sys.argv) > 1:
role = sys.argv[1]
tlnb.main(role=role, role2="ec2task")
|
Byron/bgui | refs/heads/master | src/python/bprocessg/qt/res/__init__.py | 1 | #-*-coding:utf-8-*-
"""
@package bprocess.gui.ui
@brief Contains all compiled .ui packages
@author Sebastian Thiel
@copyright [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl.html)
"""
from .package_ui import *
from .viewer_ui import *
|
hugolouzada/ImpeachmentPrediction | refs/heads/master | Prediction/SplitTrainValid/__init__.py | 12133432 | |
Pingmin/linux | refs/heads/master | scripts/gdb/linux/__init__.py | 2010 | # nothing to do for the initialization of this package
|
BaskerShu/typeidea | refs/heads/master | typeidea/comment/adminforms.py | 1 | # -*- coding: utf-8 -*-
from django import forms
class CommentAdminForm(forms.ModelForm):
content = forms.CharField(widget=forms.Textarea, max_length=2000)
|
ptcrypto/p2pool-adaptive | refs/heads/master | p2pool/networks/lennycoin.py | 2 | from p2pool.bitcoin import networks
PARENT = networks.nets['lennycoin']
SHARE_PERIOD = 10 # seconds
CHAIN_LENGTH = 12*60*60//10 # shares
REAL_CHAIN_LENGTH = 12*60*60//10 # shares
TARGET_LOOKBEHIND = 20 # shares
SPREAD = 50 # blocks
IDENTIFIER = 'c1e2b3c4e0b5fefe'.decode('hex')
PREFIX = 'e2e3c4c5b7b9e1ec'.decode('hex')... |
Distrotech/intellij-community | refs/heads/master | python/edu/interactive-learning-python/resources/com/jetbrains/python/edu/user_tester.py | 41 | import sys
import imp
import os
import subprocess
USER_TESTS = "userTests"
TEST_FAILED = "FAILED"
TEST_PASSED = "PASSED"
INPUT = "input"
OUTPUT = "output"
def get_index(logical_name, full_name):
logical_name_len = len(logical_name)
if full_name[:logical_name_len] == logical_name:
return int(full_n... |
AICP/external_chromium_org | refs/heads/lp5.0 | tools/telemetry/telemetry/core/gpu_device_unittest.py | 38 | # 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.
import unittest
from telemetry.core import gpu_device
class TestGPUDevice(unittest.TestCase):
def testConstruction(self):
device = gpu_device.GPUDevic... |
Tesla-Redux-Devices/android_kernel_samsung_msm8930-common | refs/heads/lp5.1 | 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.
... |
hoosteeno/fjord | refs/heads/master | fjord/base/plugin_utils.py | 6 | import logging
from django.utils.module_loading import import_string
def load_providers(provider_list, logger=None):
"""Loads providers in the provided list
:arg provider_list: list of Python dotted module paths; the provider
class should be the last name in the path
:arg logger: (optional) log... |
trungdtbk/faucet | refs/heads/master | tests/unit/faucet/test_valveapp_smoke.py | 2 | #!/usr/bin/env python
"""Unit tests run as PYTHONPATH=../../.. python3 ./test_valveapp_smoke.py."""
# Copyright (C) 2015 Research and Innovation Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2019 The Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file... |
superr/android_kernel_502_falcon | refs/heads/super | 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.
... |
MayOneUS/pledgeservice | refs/heads/master | testlib/setuptools/tests/server.py | 452 | """Basic http server for tests to simulate PyPI or custom indexes
"""
import sys
import time
import threading
from setuptools.compat import BaseHTTPRequestHandler
from setuptools.compat import (urllib2, URLError, HTTPServer,
SimpleHTTPRequestHandler)
class IndexServer(HTTPServer):
""... |
OpenMined/PySyft | refs/heads/master | packages/syft/tests/syft/lib/python/bool/serde_test.py | 1 | # syft absolute
import syft as sy
from syft.lib.python.bool import Bool
from syft.proto.lib.python.bool_pb2 import Bool as Bool_PB
def test_serde() -> None:
syft_bool = Bool(True)
serialized = syft_bool._object2proto()
assert isinstance(serialized, Bool_PB)
deserialized = Bool._proto2object(proto=s... |
aware-why/multithreaded_crawler | refs/heads/master | threaded_spider/logger.py | 1 | """
Logger based on logging and basic.log module.
"""
from __future__ import with_statement
import logging, logging.handlers
import os, sys
from threaded_spider.basic import log
from threaded_spider.basic.util import unicode_to_str
from threaded_spider.basic.threadable import threadingmodule
# Logging levels
NOTSET... |
jalexvig/tensorflow | refs/heads/master | tensorflow/python/training/basic_loops.py | 32 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
MayOneUS/pledgeservice | refs/heads/master | lib/requests/packages/urllib3/util/__init__.py | 306 | # urllib3/util/__init__.py
# Copyright 2008-2014 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from .connection import is_connection_dropped
from .request import make_headers
from .res... |
openweave/openweave-core | refs/heads/master | src/test-apps/happy/topologies/__init__.py | 12133432 | |
City-of-Bloomington/green-rental | refs/heads/master | south/tests/fakeapp/__init__.py | 12133432 | |
pythonvietnam/scikit-learn | refs/heads/master | sklearn/tree/tests/__init__.py | 12133432 | |
potash/scikit-learn | refs/heads/master | sklearn/ensemble/tests/__init__.py | 12133432 | |
ayushagrawal288/zamboni | refs/heads/master | mkt/abuse/tests/__init__.py | 12133432 | |
air805ronin/homestead | refs/heads/master | homestead/crafting.py | 12133432 | |
yimun/Algorithm | refs/heads/master | LeetCode/105.Different Ways to Add Parentheses/diffways.py | 1 | #!/usr/bin/env
class Solution(object):
def diffWaysToCompute(self, input):
if input.isdigit():
return [int(input)]
res = []
for i in xrange(len(input)):
if input[i] in "-+*":
res1 = self.diffWaysToCompute(input[:i])
res2 = self.diffWa... |
gymnasium/edx-platform | refs/heads/open-release/hawthorn.master | common/djangoapps/third_party_auth/migrations/0012_auto_20170626_1135.py | 24 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('third_party_auth', '0011_auto_20170616_0112'),
]
operations = [
migrations.AddField(
model_name='ltiproviderconf... |
ramielrowe/magnum | refs/heads/master | magnum/objects/replicationcontroller.py | 8 | # Copyright 2015 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 by applicable law or agreed t... |
ruchee/vimrc | refs/heads/master | vimfiles/bundle/vim-python/submodules/pylint/tests/functional/u/useless/useless_super_delegation_py38.py | 2 | # pylint: disable=missing-docstring,too-few-public-methods
from typing import Any
class Egg:
def __init__(self, first: Any, /, second: Any) -> None:
pass
class Spam(Egg):
def __init__(self, first: float, /, second: float) -> None:
super().__init__(first, second)
class Ham(Egg):
def __i... |
huntxu/fuel-library | refs/heads/master | deployment/puppet/nailgun/files/cobbler/fence_ssh.centos7.py | 2 | #!/usr/bin/python
import atexit
import exceptions
import pexpect
import sys
import time
sys.path.append("/usr/share/fence")
from fencing import all_opt
from fencing import atexit_handler
from fencing import check_input
from fencing import fence_action
from fencing import fence_login
from fencing import process_input
... |
bhargav2408/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/_pyio.py | 45 | """
Python implementation of the io module.
"""
import os
import abc
import codecs
import warnings
# Import _thread instead of threading to reduce startup cost
try:
from _thread import allocate_lock as Lock
except ImportError:
from _dummy_thread import allocate_lock as Lock
import io
from io import (__all__, ... |
ikbelkirasan/Arduino | refs/heads/master | arduino-core/src/processing/app/i18n/python/requests/packages/charade/euckrfreq.py | 3120 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
alisidd/tensorflow | refs/heads/asgd-dc | tensorflow/contrib/learn/python/learn/utils/inspect_checkpoint.py | 123 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
puttarajubr/commcare-hq | refs/heads/master | corehq/apps/accounting/subscription_changes.py | 1 | import json
import logging
import datetime
from django.core.urlresolvers import reverse
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _, ungettext
from corehq import privileges, Domain, toggles
from corehq.apps.accounting.utils import get_active_reminders_by_domain_... |
TheFraserLab/ASEr | refs/heads/master | ASEr/cluster.py | 2 | """
Submit jobs to slurm or torque, or with multiprocessing.
============================================================================
AUTHOR: Michael D Dacre, mike.dacre@gmail.com
ORGANIZATION: Stanford University
LICENSE: MIT License, property of Stanford, use as you wish
CREATED: 2016-44... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.