repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
zombieJ/incubator-eagle | refs/heads/master | eagle-external/hadoop_jmx_collector/lib/six/test_six.py | 34 | import operator
import sys
import types
import py
import six
def test_add_doc():
def f():
"""Icky doc"""
pass
six._add_doc(f, """New doc""")
assert f.__doc__ == "New doc"
def test_import_module():
from logging import handlers
m = six._import_module("logging.handlers")
asser... |
SoItGoes33/hellowebapp | refs/heads/master | pycon-tutorial/pycon-project/collection/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
jackTheRipper/iotrussia | refs/heads/master | web_server/src/server/client/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
cherrygirl/micronaet7 | refs/heads/master | accounting_loan/loan.py | 1 | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... |
bmihelac/django-shop | refs/heads/master | shop/tests/__init__.py | 5 | # flake8: noqa
from api import ShopApiTestCase
from cart import CartTestCase
from cart_modifiers import (
CartModifiersTestCase,
TenPercentPerItemTaxModifierTestCase,
)
from order import (
OrderConversionTestCase,
OrderPaymentTestCase,
OrderTestCase,
OrderUtilTestCase,
)
from forms import (
... |
nkgilley/home-assistant | refs/heads/dev | homeassistant/components/homekit/img_util.py | 2 | """Image processing for HomeKit component."""
import logging
SUPPORTED_SCALING_FACTORS = [(7, 8), (3, 4), (5, 8), (1, 2), (3, 8), (1, 4), (1, 8)]
_LOGGER = logging.getLogger(__name__)
def scale_jpeg_camera_image(cam_image, width, height):
"""Scale a camera image as close as possible to one of the supported sca... |
firebase/grpc | refs/heads/master | src/python/grpcio_testing/testing_commands.py | 18 | # Copyright 2018 gRPC 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 applicable law or agreed to in writing... |
Edu-Glez/Bank_sentiment_analysis | refs/heads/master | env/lib/python3.6/site-packages/numpy/distutils/npy_pkg_config.py | 66 | from __future__ import division, absolute_import, print_function
import sys
import re
import os
if sys.version_info[0] < 3:
from ConfigParser import RawConfigParser, NoOptionError
else:
from configparser import RawConfigParser, NoOptionError
__all__ = ['FormatError', 'PkgNotFound', 'LibraryInfo', 'VariableSe... |
danieldmm/minerva | refs/heads/master | models/pytorch2.py | 1 | # -*- coding: utf-8 -*-
#
# task as translation
# now with epochs, features and embeddings
from __future__ import unicode_literals, print_function, division
import os
import random
import numpy as np
np.warnings.filterwarnings('ignore')
import torch
import torch.nn as nn
from torch import optim
import torch.nn.func... |
google/citest | refs/heads/master | tests/base/test_package.py | 5 | # Copyright 2015 Google Inc. 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 applicable law or a... |
adelomana/30sols | refs/heads/master | F5.EGRIN/coregulation.detector.py | 1 | """
this script finds which other genes are present in the ribosomal corems that are not ribosomal genes
"""
import sys
# 0. user defined data
corems2GenesFile='/Volumes/omics4tb/alomana/projects/TLR/data/corem/hsa_c2g.txt'
ribosomalGenesFile='/Volumes/omics4tb/alomana/projects/TLR/data/ribosomalGeneNames.txt'
riboso... |
rbaindourov/v8-inspector | refs/heads/master | Source/chrome/tools/resources/list_resources_removed_by_repack.py | 95 | #!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import re
import sys
usage = """%s BUILDTYPE BUILDDIR
BUILDTYPE: either chromium or chrome.
BUILDDIR: The path to the outp... |
thread/django-directed-edge | refs/heads/master | django_directed_edge/utils.py | 2 | import collections
from directed_edge import Database
from django.db import models
from django.db.models.base import ModelBase
from . import app_settings
def get_database():
return Database(app_settings.USERNAME, app_settings.PASSWORD)
def ident(obj, pk=None):
"""
Converts a Django model or model insta... |
mancoast/CPythonPyc_test | refs/heads/master | cpython/231_test_winsound.py | 7 | # Ridiculously simple test of the winsound module for Windows.
import unittest
from test import test_support
import winsound, time
class BeepTest(unittest.TestCase):
def test_errors(self):
self.assertRaises(TypeError, winsound.Beep)
self.assertRaises(ValueError, winsound.Beep, 36, 75)
sel... |
nesterione/experiments-of-programming | refs/heads/master | Python/db/mongo/test.py | 1 | import pymongo
import datetime
from pymongo import MongoClient
from bson.objectid import ObjectId
# The web framework gets post_id from the URL and passes it as a string
def get(post_id):
# Convert from string to ObjectId:
document = client.db.collection.find_one({'_id': ObjectId(post_id)})
################
#... |
kyleburnett/iris | refs/heads/master | iris.py | 1 | #
# Name: iris.py
# Description: Implementation of an artifical neural network
# for classifying the iris flower types as specified in the
# Iris dataset found at:
#
# http://archive.ics.uci.edu/ml/datasets/Iris
#
# Author(s): Kyle Burnett
#
import random
import math
filename = "iris.data"
basket = []
with ... |
SantosDevelopers/sborganicos | refs/heads/master | venv/lib/python3.5/site-packages/django/utils/translation/__init__.py | 51 | """
Internationalization support.
"""
from __future__ import unicode_literals
import re
import warnings
from django.utils import six
from django.utils.decorators import ContextDecorator
from django.utils.deprecation import RemovedInDjango21Warning
from django.utils.encoding import force_text
from django.utils.functio... |
rhinstaller/anaconda | refs/heads/master | pyanaconda/modules/common/custom_typing.py | 3 | #
# Copyright (C) 2020 Red Hat, Inc. All rights reserved.
#
# 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 p... |
b0ttl3z/SickRage | refs/heads/master | lib/mako/cache.py | 42 | # mako/cache.py
# Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from mako import compat, util
_cache_plugins = util.PluginLoader("mako.cache")
register_plugin = _... |
moondrop-entertainment/django-nonrel-drawp | refs/heads/master | django/contrib/localflavor/at/at_states.py | 537 | # -*- coding: utf-8 -*
from django.utils.translation import ugettext_lazy as _
STATE_CHOICES = (
('BL', _('Burgenland')),
('KA', _('Carinthia')),
('NO', _('Lower Austria')),
('OO', _('Upper Austria')),
('SA', _('Salzburg')),
('ST', _('Styria')),
('TI', _('Tyrol')),
('VO', _('Vorarlberg'... |
arahuja/scikit-learn | refs/heads/master | sklearn/gaussian_process/tests/__init__.py | 12133432 | |
eltonkevani/tempest_el_env | refs/heads/master | tempest/api/orchestration/stacks/__init__.py | 12133432 | |
nikhilprathapani/python-for-android | refs/heads/master | python-modules/twisted/twisted/plugins/twisted_trial.py | 122 |
from zope.interface import implements
from twisted.trial.itrial import IReporter
from twisted.plugin import IPlugin
class _Reporter(object):
implements(IPlugin, IReporter)
def __init__(self, name, module, description, longOpt, shortOpt, klass):
self.name = name
self.module = module
s... |
petroswork/pydantic | refs/heads/master | benchmarks/test_marshmallow.py | 1 | from marshmallow import Schema, fields, validate
class TestMarshmallow:
package = 'marshmallow'
def __init__(self, allow_extra):
class LocationSchema(Schema):
latitude = fields.Float(allow_none=True)
longitude = fields.Float(allow_none=True)
class SkillSchema(Schema):... |
hbrunn/OCB | refs/heads/8.0 | openerp/report/print_xml.py | 338 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... |
caioserra/apiAdwords | refs/heads/master | examples/adspygoogle/dfp/v201311/line_item_service/get_line_items_by_statement.py | 2 | #!/usr/bin/python
#
# Copyright 2013 Google Inc. 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 b... |
micropython/micropython-esp32 | refs/heads/esp32 | tests/basics/object1.py | 110 | # test builtin object()
# creation
object()
# printing
print(repr(object())[:7])
|
ajs124/namebench | refs/heads/master | libnamebench/geoip.py | 171 | # Copyright 2010 Google Inc. 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 applicable law or ... |
mollstam/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/lib2to3/tests/test_util.py | 126 | """ Test suite for the code in fixer_util """
# Testing imports
from . import support
# Python imports
import os.path
# Local imports
from lib2to3.pytree import Node, Leaf
from lib2to3 import fixer_util
from lib2to3.fixer_util import Attr, Name, Call, Comma
from lib2to3.pgen2 import token
def parse(code, strip_leve... |
chris-x86-64/sansyuyu_bot | refs/heads/master | sanchan/__init__.py | 12133432 | |
mbauskar/phrerp | refs/heads/develop | erpnext/accounts/report/sales_register/__init__.py | 12133432 | |
nikolas/lettuce | refs/heads/master | tests/integration/lib/Django-1.3/django/conf/locale/bn/__init__.py | 12133432 | |
bendk/thesquirrel | refs/heads/master | editor/templatetags/__init__.py | 12133432 | |
junhuac/MQUIC | refs/heads/master | src/tools/gyp/test/actions-multiple/src/filter.py | 349 | #!/usr/bin/env python
# Copyright (c) 2011 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.
import sys
data = open(sys.argv[3], 'r').read()
fh = open(sys.argv[4], 'w')
fh.write(data.replace(sys.argv[1], sys.argv[2]))
fh.close()
|
suhailvs/django-quran | refs/heads/master | quran/data/__init__.py | 1 | import re
import unittest
from os import path
import os
from xml.dom.minidom import parse, parseString
from django.db import transaction
from quran.models import *
from quran.buckwalter import *
def path_to(fn):
return path.join(path.dirname(__file__), fn)
@transaction.atomic
def import_quran():
d = parse(p... |
juanalfonsopr/odoo | refs/heads/8.0 | addons/pos_discount/discount.py | 315 | # -*- 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... |
jcurbelo/networkx | refs/heads/master | networkx/algorithms/tests/test_distance_regular.py | 87 | #!/usr/bin/env python
from nose.tools import *
import networkx as nx
class TestDistanceRegular:
def test_is_distance_regular(self):
assert_true(nx.is_distance_regular(nx.icosahedral_graph()))
assert_true(nx.is_distance_regular(nx.petersen_graph()))
assert_true(nx.is_distance_regular(nx.cub... |
ChristianKniep/QNIB | refs/heads/master | serverfiles/usr/local/lib/networkx-1.6/build/lib/networkx/algorithms/tests/test_distance_regular.py | 87 | #!/usr/bin/env python
from nose.tools import *
import networkx as nx
class TestDistanceRegular:
def test_is_distance_regular(self):
assert_true(nx.is_distance_regular(nx.icosahedral_graph()))
assert_true(nx.is_distance_regular(nx.petersen_graph()))
assert_true(nx.is_distance_regular(nx.cub... |
lingdb/CoBL-public | refs/heads/master | ielex/lexicon/migrations/0039_languagebranches_to_sndcomp.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
from django.db import migrations
def forwards_func(apps, schema_editor):
LanguageBranches = apps.get_model('lexicon', 'LanguageBranches')
SndComp = apps.get_model('lexicon', 'SndComp')
print('Creating SndComp from LanguageBran... |
garbled1/ansible | refs/heads/devel | lib/ansible/plugins/lookup/list.py | 53 | # (c) 2012-17 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup: list
author: Ansible core team
versi... |
exofudge/Pocket-Casts | refs/heads/master | setup.py | 1 | import pocketcasts
from setuptools import setup, find_packages
setup(
name="pocketcasts-api",
version=pocketcasts.api.__version__,
description=pocketcasts.api.__doc__,
url=pocketcasts.api.__url__,
author=pocketcasts.api.__author__,
author_email='ferguslongley@live.com',
license='MIT',
... |
mejedi/tarantool | refs/heads/1.7 | test/box-py/snapshot.test.py | 2 | import os
import sys
import yaml
import time
from signal import SIGUSR1
sys.stdout.push_filter(server.vardir, "<dir>")
admin("space = box.schema.space.create('tweedledum', { id = 0 })")
admin("index = space:create_index('primary', { type = 'hash' })")
print """#
# A test case for: http://bugs.launchpad.net/bugs/6864... |
Amechi101/concepteur-market-app | refs/heads/master | venv/lib/python2.7/site-packages/django/conf/locale/he/__init__.py | 12133432 | |
tdickers/mitmproxy | refs/heads/master | test/mitmproxy/script/__init__.py | 12133432 | |
blaze33/django | refs/heads/ticket_19456 | django/template/response.py | 221 | from django.http import HttpResponse
from django.template import loader, Context, RequestContext
from django.utils import six
class ContentNotRenderedError(Exception):
pass
class SimpleTemplateResponse(HttpResponse):
rendering_attrs = ['template_name', 'context_data', '_post_render_callbacks']
def __in... |
shirou/ansible | refs/heads/devel | lib/ansible/module_utils/facts.py | 6 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... |
davidraleigh/cxxtest | refs/heads/master | build_tools/SCons/test/multifile_tests/TestDef.py | 32 |
links = {'cxxtest' : '../../../../'}
|
CYBAI/servo | refs/heads/master | tests/wpt/web-platform-tests/conformance-checkers/tools/dl.py | 107 | # -*- coding: utf-8 -*-
import os
ccdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
template = """<!DOCTYPE html>
<meta charset=utf-8>
"""
errors = {
"dl-in-p": "<p><dl><dt>text<dd>text</dl></p>",
"header-in-dt": "<dl><dt><header>text</header><dd>text</dl>",
"footer-in-dt": "<dl><dt><foot... |
rie-command/skistream-electron | refs/heads/master | node_modules/serialport-electron/node_modules/node-gyp/gyp/buildbot/buildbot_run.py | 270 | #!/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.
"""Argument-less script to select what to run on the buildbots."""
import filecmp
import os
import shutil
import subprocess
import sys
i... |
aselle/tensorflow | refs/heads/master | tensorflow/examples/adding_an_op/zero_out_op_2.py | 190 | # 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... |
astrofrog/glue-3d-viewer | refs/heads/master | glue_vispy_viewers/extern/vispy/ext/cocoapy.py | 21 | # -*- coding: utf-8 -*-
from ctypes import (cdll, util, Structure, cast, byref, POINTER, CFUNCTYPE,
c_int, c_long, c_ulong, c_ushort, c_wchar, c_uint32,
c_double, c_uint, c_float, c_void_p, c_char_p, c_bool,
c_buffer, c_ubyte, c_byte, c_int8, c_int16, c_int32... |
Slezhuk/ansible | refs/heads/devel | lib/ansible/module_utils/dellos9.py | 8 | #
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
# (c) 2017 Red Hat, Inc
#
# Copyright (c) 2016 Dell Inc.
#
# This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamica... |
mlassnig/pilot | refs/heads/master | __init__.py | 12133432 | |
tedelhourani/ansible | refs/heads/devel | test/units/module_utils/facts/hardware/__init__.py | 12133432 | |
indictranstech/erpnext | refs/heads/develop | erpnext/healthcare/doctype/normal_test_items/__init__.py | 12133432 | |
sejust/pykit | refs/heads/master | etcd/client.py | 2 | #!/usr/bin/env python2
# coding: utf-8
import httplib
import logging
import socket
import time
import urllib
import urlparse
from pykit import http
from pykit import utfjson
logger = logging.getLogger(__name__)
class EtcdException(Exception):
pass
class EtcdInternalError(EtcdException):
pass
class NoMo... |
altsen/diandiyun-platform | refs/heads/master | common/djangoapps/dark_lang/models.py | 6 | """
Models for the dark-launching languages
"""
from django.db import models
from config_models.models import ConfigurationModel
class DarkLangConfig(ConfigurationModel):
"""
Configuration for the dark_lang django app
"""
released_languages = models.TextField(
blank=True,
help_text="A... |
dparshin/phantomjs | refs/heads/master | src/breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/reflection.py | 260 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... |
Maccimo/intellij-community | refs/heads/master | python/helpers/pycharm/django_test_runner.py | 23 | from tcunittest import TeamcityTestRunner, TeamcityTestResult
from tcmessages import TeamcityServiceMessages
import sys
from pycharm_run_utils import adjust_django_sys_path
from django.test.utils import get_runner
adjust_django_sys_path()
from django.conf import settings
def is_nosetest(settings):
"""
Checks if ... |
bdero/edx-platform | refs/heads/master | cms/lib/xblock/__init__.py | 12133432 | |
rodrigobraga/informer | refs/heads/master | informer/migrations/__init__.py | 12133432 | |
chaffra/sympy | refs/heads/master | sympy/logic/tests/__init__.py | 12133432 | |
obi-two/Rebelion | refs/heads/master | data/scripts/templates/object/installation/mining_organic/__init__.py | 12133432 | |
openstack/ceilometer | refs/heads/master | ceilometer/meter/__init__.py | 12133432 | |
willthames/ansible | refs/heads/devel | test/units/modules/cloud/amazon/test_cloudformation.py | 89 | # (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dis... |
ovpiNU/ros-dd-extraction-tool | refs/heads/master | driving_data/src/driving_data_tools/scripts/rosbag_data_extract.py | 1 | __author__ = 'patty'
import sys
import os
import rospy
import numpy as np
import cv2
import pcl
import sensor_msgs.point_cloud2 as pc2
from sensor_msgs.msg import Image, PointCloud2
from cv_bridge import CvBridge
from can_msg.msg import CANPacket
from nmea_msgs.msg import Sentence
save_path = None
camera_img_0 = None
... |
cloudbase/neutron-virtualbox | refs/heads/virtualbox_agent | neutron/plugins/ofagent/agent/arp_lib.py | 9 | # Copyright (C) 2014 VA Linux Systems Japan K.K.
# Copyright (C) 2014 Fumihiko Kakuma <kakuma at valinux co jp>
# Copyright (C) 2014 YAMAMOTO Takashi <yamamoto at valinux co jp>
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in complia... |
NokeCodes/noke-platform | refs/heads/master | projects/admin.py | 3 | from django.contrib import admin
from .models import Project
admin.site.register(Project)
|
DMOJ/judge | refs/heads/master | dmoj/commands/__init__.py | 1 | from typing import List, Type
from dmoj.commands.base_command import Command, commands, register_command
from dmoj.commands.diff import DifferenceCommand
from dmoj.commands.help import HelpCommand
from dmoj.commands.problems import ListProblemsCommand
from dmoj.commands.quit import QuitCommand
from dmoj.commands.rejud... |
tjsavage/rototutor_djangononrel | refs/heads/master | django/utils/http.py | 6 | import re
import urllib
import base64
from binascii import Error as BinasciiError
from email.Utils import formatdate
from django.utils.encoding import smart_str, force_unicode
from django.utils.functional import allow_lazy
ETAG_MATCH = re.compile(r'(?:W/)?"((?:\\.|[^"])*)"')
def urlquote(url, safe='/'):
"""
... |
oeeagle/quantum | refs/heads/master | neutron/tests/unit/bigswitch/test_agent_scheduler.py | 13 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Big Switch Networks, 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
#
# Un... |
rnder/data-science-from-scratch | refs/heads/master | code-python3/network_analysis.py | 12 | import math, random, re
from collections import defaultdict, Counter, deque
from linear_algebra import dot, get_row, get_column, make_matrix, magnitude, scalar_multiply, shape, distance
from functools import partial
users = [
{ "id": 0, "name": "Hero" },
{ "id": 1, "name": "Dunn" },
{ "id": 2, "name": "Sue... |
aguegu/flask-oauthprovider | refs/heads/master | examples/init_db.py | 3 | from demoprovider.models import init_db
init_db()
|
qiuzhong/crosswalk-test-suite | refs/heads/master | webapi/tct-cors-w3c-tests/inst.wgt.py | 4 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
import string
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PKG_NAME = os.path.basename(SCRIPT_DIR)
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=... |
cosmoharrigan/pyrolog | refs/heads/master | prolog/interpreter/heap.py | 1 | from rpython.rlib import debug
from prolog.interpreter.term import BindingVar, AttVar
from rpython.rlib import jit
INIT_TRAIL_VAR = []
INIT_TRAIL_BINDING = []
UNROLL_SIZE = 6
class Heap(object):
def __init__(self, prev=None):
self.trail_var = INIT_TRAIL_VAR
debug.make_sure_not_resized(self.trail... |
debugger22/sympy | refs/heads/master | sympy/liealgebras/root_system.py | 76 | # -*- coding: utf-8 -*-
from .cartan_type import CartanType
from sympy.core import Basic
from sympy.core.compatibility import range
class RootSystem(Basic):
"""Represent the root system of a simple Lie algebra
Every simple Lie algebra has a unique root system. To find the root
system, we first consider t... |
piotroxp/scibibscan | refs/heads/master | scib/lib/python3.5/site-packages/numpy/lib/twodim_base.py | 83 | """ Basic functions for manipulating 2d arrays
"""
from __future__ import division, absolute_import, print_function
from numpy.core.numeric import (
asanyarray, arange, zeros, greater_equal, multiply, ones, asarray,
where, int8, int16, int32, int64, empty, promote_types, diagonal,
)
from numpy.core import... |
trungnt13/scikit-learn | refs/heads/master | examples/applications/svm_gui.py | 287 | """
==========
Libsvm GUI
==========
A simple graphical frontend for Libsvm mainly intended for didactic
purposes. You can create data points by point and click and visualize
the decision region induced by different kernels and parameter settings.
To create positive examples click the left mouse button; to create
neg... |
kutuhal/oracle-r12-accounting | refs/heads/master | lib/django/conf/locale/cy/__init__.py | 12133432 | |
temberature/python-data-mining-platform | refs/heads/master | pymining/classifier/__init__.py | 12133432 | |
joshjo/django-sentry | refs/heads/master | sentry/migrations/0003_auto__add_field_message_group__del_field_groupedmessage_server_name.py | 14 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Message.group'
db.add_column('sentry_message', 'group', self.gf('django.db.models.fields.r... |
jendap/tensorflow | refs/heads/master | tensorflow/compiler/tests/clustering_test.py | 13 | # Copyright 2017 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... |
minhtuancn/odoo | refs/heads/8.0 | addons/mrp/wizard/mrp_price.py | 381 | # -*- 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... |
hknyldz/pisitools | refs/heads/master | pisilinux/pisilinux/operations/upgrade.py | 1 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005 - 2007, TUBITAK/UEKAE
#
# 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.
#... |
sjsucohort6/openstack | refs/heads/master | python/venv/lib/python2.7/site-packages/openstackclient/tests/compute/v2/test_server.py | 1 | # Copyright 2013 Nebula 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... |
sburnett/seattle | refs/heads/master | network_semantics_tests/tests/sock.recv/sock_arg.py | 1 | # various tests for socketlikeobj argument semantics
#a dummy waitforconn to connect to
def nothing(rip,rport,sock,th,lh):
while mycontext['keep_testing']:
pass
sock.close()
# a timeout function
def fail_test(sock,handle,thing):
print 'ERROR: recv('+str(thing)+') blocked'
sock.close()
stopcomm(hand... |
SMatsushi/gtest | refs/heads/master | test/gtest_uninitialized_test.py | 2901 | #!/usr/bin/env python
#
# Copyright 2008, 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... |
mKeRix/home-assistant | refs/heads/dev | tests/components/adguard/__init__.py | 30 | """Tests for the AdGuard Home component."""
|
poryfly/scikit-learn | refs/heads/master | sklearn/feature_selection/tests/test_variance_threshold.py | 143 | from sklearn.utils.testing import (assert_array_equal, assert_equal,
assert_raises)
from scipy.sparse import bsr_matrix, csc_matrix, csr_matrix
from sklearn.feature_selection import VarianceThreshold
data = [[0, 1, 2, 3, 4],
[0, 2, 2, 3, 5],
[1, 1, 2, 4, 0]]
def t... |
w15971597/june | refs/heads/master | tests/__init__.py | 12133432 | |
ojengwa/oh-mainline | refs/heads/master | vendor/packages/Django/django/db/backends/postgresql_psycopg2/__init__.py | 12133432 | |
nuagenetworks/tempest | refs/heads/master | tempest/services/image/__init__.py | 12133432 | |
NamedGod/shadowsocks | refs/heads/master | tests/test_udp_src.py | 1009 | #!/usr/bin/python
import socket
import socks
SERVER_IP = '127.0.0.1'
SERVER_PORT = 1081
if __name__ == '__main__':
# Test 1: same source port IPv4
sock_out = socks.socksocket(socket.AF_INET, socket.SOCK_DGRAM,
socket.SOL_UDP)
sock_out.set_proxy(socks.SOCKS5, SERVER_IP, S... |
bigswitch/horizon | refs/heads/master | openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tables.py | 7 | # Copyright 2015, Alcatel-Lucent USA Inc.
# 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 ... |
tcp813/mouTools | refs/heads/master | qt/treeview.py | 1 |
from PyQt5.Qt import *
class Delegate(QStyledItemDelegate):
def __init__(self, parent=None):
QStyledItemDelegate.__init__(self, parent)
class Model(QAbstractItemModel):
def __init__(self, parent=None):
QAbstractItemModel.__init__(self, parent)
def rowCount(self, index):
return ... |
sagarghuge/recurringtask | refs/heads/master | tests/tools/test_dates.py | 2 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Getting Things GNOME! - a personal organizer for the GNOME desktop
# Copyright (c) 2008-2014 - Lionel Dricot & Bertrand Rousseau
#
# This program is free software: you can redistribute it and/or modify it under
# t... |
pavels/pootle | refs/heads/master | pootle/apps/staticpages/migrations/__init__.py | 12133432 | |
Kazade/NeHe-Website | refs/heads/master | django/middleware/__init__.py | 12133432 | |
ksiomelo/cubix | refs/heads/master | fca/compare_context.py | 1 | """ Comparing contexts """
def subseteq_table(table_left, table_right):
"""
Checks whether one binary relation of two sets (presented as bool table) is
subset or equals another. Tables should be given as lists of bool lists and
should have the same dimensions. Result is bool.
table_left ?... |
geekboxzone/lollipop_external_chromium_org | refs/heads/geekbox | tools/perf/benchmarks/tab_switching.py | 34 | # 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.
from telemetry import benchmark
from measurements import tab_switching
import page_sets
@benchmark.Enabled('has tabs')
class TabSwitchingTop10(benchmark.B... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.