repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
kiddhustle/wiardfmblog | refs/heads/master | django/contrib/gis/management/commands/ogrinspect.py | 126 | import os
from optparse import make_option
from django.contrib.gis import gdal
from django.core.management.base import LabelCommand, CommandError
def layer_option(option, opt, value, parser):
"""
Callback for `make_option` for the `ogrinspect` `layer_key`
keyword option which may be an integer or a string.... |
pshen/ansible | refs/heads/devel | lib/ansible/modules/windows/win_msg.py | 24 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
#
# 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, eith... |
wdzhou/mantid | refs/heads/master | buildconfig/cmakelists_utils.py | 4 | from __future__ import (absolute_import, division, print_function, unicode_literals)
import datetime
import os
import re
import sys
#======================================================================================
def find_basedir(project, subproject):
""" Returns the base directory. If the subproject is kn... |
ralphbean/monroe | refs/heads/master | wsgi/tg2app/tg2app/model/foreclosure.py | 1 | # -*- coding: utf-8 -*-
"""Sample model module."""
import sqlalchemy as sa
from sqlalchemy import *
from sqlalchemy.orm import mapper, relation
from sqlalchemy.orm.attributes import InstrumentedAttribute
from sqlalchemy import Table, ForeignKey, Column
from sqlalchemy.types import Integer, Unicode, Float, Boolean, Dat... |
synconics/odoo | refs/heads/8.0 | addons/website/models/website.py | 25 | # -*- coding: utf-8 -*-
import cStringIO
import contextlib
import datetime
import hashlib
import inspect
import logging
import math
import mimetypes
import unicodedata
import os
import re
import time
import urlparse
from PIL import Image
from sys import maxint
import werkzeug
# optional python-slugify import (https:/... |
liukaijv/XlsxWriter | refs/heads/master | xlsxwriter/test/worksheet/test_write_sheet_pr.py | 8 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
import unittest
from ...compatibility import StringIO
from ...worksheet import Worksheet
class TestWriteSheetPr(unittest.TestCase):
"""
T... |
johmathe/keras | refs/heads/master | keras/models.py | 1 | from __future__ import absolute_import
from __future__ import print_function
import cPickle as pickle
import numpy as np
import theano
import theano.tensor as T
import warnings, time, copy, pprint
from six.moves import range
import six
from . import optimizers
from . import objectives
from . import regularizers
from .... |
AunShiLord/sympy | refs/heads/master | sympy/matrices/expressions/tests/test_slice.py | 119 | from sympy.matrices.expressions.slice import MatrixSlice
from sympy.matrices.expressions import MatrixSymbol
from sympy.abc import a, b, c, d, k, l, m, n
from sympy.utilities.pytest import raises, XFAIL
from sympy.functions.elementary.integers import floor
from sympy.assumptions import assuming, Q
X = MatrixSymbol('X... |
DESHRAJ/fjord | refs/heads/master | vendor/packages/polib/tests/tests.py | 3 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import os
import subprocess
import sys
import tempfile
import unittest
sys.path.insert(1, os.path.abspath('.'))
import polib
from polib import u
class TestFunctions(unittest.TestCase):
def test_pofile_and_mofile1(self):
"""
Test bad u... |
JT5D/scikit-learn | refs/heads/master | examples/tree/plot_tree_regression.py | 8 | """
===================================================================
Decision Tree Regression
===================================================================
A 1D regression with decision tree.
The :ref:`decision trees <tree>` is
used to fit a sine curve with addition noisy observation. As a result, it
learns ... |
dfdx2/django | refs/heads/master | tests/migrations/migrations_test_apps/lookuperror_c/migrations/0002_c2.py | 133 | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lookuperror_a', '0002_a2'),
('lookuperror_c', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='C2',
fields=[
('id', models.Aut... |
georgeyk/quickstartup | refs/heads/master | testproject/testapp.py | 1 | # coding: utf-8
from django.conf.urls import url
from django.http.response import HttpResponse
from django.shortcuts import render
def index(request):
return render(request, "apps/index.html")
urlpatterns = [
url(r"^", index, name="index"),
]
|
smuzaffar/root | refs/heads/master | interpreter/llvm/src/utils/lint/common_lint.py | 147 | #!/usr/bin/python
#
# Common lint functions applicable to multiple types of files.
import re
def VerifyLineLength(filename, lines, max_length):
"""Checks to make sure the file has no lines with lines exceeding the length
limit.
Args:
filename: the file under consideration as string
lines: contents of t... |
macobo/documentation | refs/heads/master | code_snippets/results/result.api-monitor-create.py | 1 | {'creator': {'email': 'matt@example.com',
'handle': 'matt@example.com',
'id': 1896,
'name': u'Matt'},
'id': 2081,
'message': 'We may need to add web hosts if this is consistently high.',
'name': 'Bytes received on host0',
'tags': ['app:webserver', 'frontend'],
'options': {'no_data_timeframe': 20,
'notify_a... |
gnowxilef/Wox | refs/heads/master | PythonHome/Lib/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py | 1731 | from __future__ import absolute_import, division, unicode_literals
from . import _base
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
class Filter(_base.Filter):
def __iter__(self):
for token in _base.Filter.__iter__(self):
if token["... |
globau/servo | refs/heads/master | tests/wpt/web-platform-tests/2dcontext/tools/specextract.py | 75 | import html5lib
import html5lib.treebuilders.dom
# Expected use:
# curl --compressed http://www.whatwg.org/specs/web-apps/current-work/ >current-work
# python specextract.py
#
# Generates current-work-canvas.xhtml, for use by gentest.py to create the annotated spec document
def extract():
parser = html5lib.ht... |
Alberto-Beralix/Beralix | refs/heads/master | i386-squashfs-root/usr/lib/python2.7/dist-packages/telepathy/_generated/Connection_Interface_Service_Point.py | 2 | ../../../../../share/pyshared/telepathy/_generated/Connection_Interface_Service_Point.py |
alexcuellar/odoo | refs/heads/8.0 | openerp/report/render/rml.py | 457 | # -*- 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 GNU... |
mgit-at/ansible | refs/heads/devel | test/sanity/code-smell/no-underscore-variable.py | 23 | #!/usr/bin/env python
# Only needed until we can enable a pylint test for this. We may have to write
# one or add it to another existing test (like the one to warn on inappropriate
# variable names). Adding to an existing test may be hard as we may have many
# other things that are not compliant with that test.
imp... |
mandli/coastal | refs/heads/master | examples/geoclaw/benchmark_2/setplot.py | 1 |
"""
Set up the plot figures, axes, and items to be done for each frame.
This module is imported by the plotting routines and then the
function setplot is called to set the plot parameters.
"""
import os
from numpy import loadtxt
slope = 1. / 19.85
print "slope = ",slope
E = loadtxt("file2.txt",skiprows=5)
comp... |
durden/frappy | refs/heads/master | frappy/core/api.py | 1 | """
Base implementation of Frappy framework.
"""
from frappy.core.auth import NoAuth
import requests
try:
import json
except ImportError:
import simplejson as json
class APIHTTPError(Exception):
"""
Base Exception thrown by the APICall object when there is a
general error interacting with the A... |
ol-loginov/intellij-community | refs/heads/master | python/testData/inspections/AugmentAssignmentWithContext.py | 83 | class A:
x = 3
a = A()
<weak_warning descr="Assignment can be replaced with augmented assignment">a.x = a.x +<caret> 1</weak_warning> |
MHatmaker/maplinkr | refs/heads/master | node_modules/meanio/node_modules/npm/node_modules/node-gyp/gyp/tools/graphviz.py | 2679 | #!/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.
"""Using the JSON dumped by the dump-dependency-json generator,
generate input suitable for graphviz to render a dependency graph of
targets... |
kiwitcms/Kiwi | refs/heads/master | tcms/rpc/api/tag.py | 2 | # -*- coding: utf-8 -*-
from django.conf import settings
from modernrpc.core import rpc_method
from tcms.management.models import Tag
from tcms.rpc.decorators import permissions_required
@permissions_required("management.view_tag")
@rpc_method(name="Tag.filter")
def filter(query): # pylint: disable=redefined-builti... |
hansenmakangiras/disperindag | refs/heads/master | static/assets/node_modules/grunt-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/MSVSToolFile.py | 2736 | # 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.
"""Visual Studio project reader/writer."""
import gyp.common
import gyp.easy_xml as easy_xml
class Writer(object):
"""Visual Studio XML tool file writer."""
... |
abaditsegay/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/build/gyp/pylib/gyp/MSVSToolFile.py | 2736 | # 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.
"""Visual Studio project reader/writer."""
import gyp.common
import gyp.easy_xml as easy_xml
class Writer(object):
"""Visual Studio XML tool file writer."""
... |
frishberg/django | refs/heads/master | django/conf/locale/el/formats.py | 58 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd/m/Y'
TIME_FORMAT = 'P'
DATETIME... |
GHackAnonymous/ninja-ide | refs/heads/master | ninja_ide/intellisensei/analyzer/analyzer_daemon.py | 7 | # -*- coding: utf-8 -*-
#
# This file is part of NINJA-IDE (http://ninja-ide.org).
#
# NINJA-IDE 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
# any later version.
#
# NIN... |
GlobalBoost/GlobalBoost | refs/heads/master | test/functional/feature_config_args.py | 3 | #!/usr/bin/env python3
# Copyright (c) 2017-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test various command line arguments and configuration file parameters."""
import os
from test_framewo... |
vibhorag/scikit-learn | refs/heads/master | examples/neural_networks/plot_rbm_logistic_classification.py | 258 | """
==============================================================
Restricted Boltzmann Machine features for digit classification
==============================================================
For greyscale image data where pixel values can be interpreted as degrees of
blackness on a white background, like handwritten... |
adityaduggal/erpnext | refs/heads/develop | erpnext/domains/retail.py | 12 | data = {
'desktop_icons': [
'POS',
'Item',
'Customer',
'Sales Invoice',
'Purchase Order',
'Accounts',
'Task',
'ToDo'
],
'set_value': [
['Stock Settings', None, 'show_barcode_field', 1]
],
'default_portal_role': 'Customer'
}
|
JamesonFinney/librenms | refs/heads/master | poller-service.py | 11 | #! /usr/bin/env python
"""
poller-service A service to wrap SNMP polling. It will poll up to $threads devices at a time, and will not re-poll
devices that have been polled within the last $poll_frequency seconds. It will prioritize devices based
on the last time polled. If resources ar... |
AnhellO/DAS_Sistemas | refs/heads/development | Ago-Dic-2019/Ejemplos/Design Patterns/Simple Factory/Client.py | 1 | from SimpleFactory import SimpleFactory
def main():
instancia = SimpleFactory.makeConcreteClassPersonaje(
tipo='Mago',
nombre='Merlin',
hab_especial='Transmutación'
)
print(instancia)
if __name__ == '__main__':
main() |
onyxfish/csvkit | refs/heads/master | tests/test_utilities/test_in2csv.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import six
try:
from mock import patch
except ImportError:
from unittest.mock import patch
from csvkit.utilities.in2csv import In2CSV, launch_new_instance
from tests.utils import CSVKitTestCase, EmptyFileTests, stdin_as_string
class TestIn... |
pbrod/numpy | refs/heads/master | numpy/typing/tests/data/fail/arrayprint.py | 9 | from typing import Callable, Any
import numpy as np
AR: np.ndarray
func1: Callable[[Any], str]
func2: Callable[[np.integer[Any]], str]
np.array2string(AR, style=None) # E: Unexpected keyword argument
np.array2string(AR, legacy="1.14") # E: incompatible type
np.array2string(AR, sign="*") # E: incompatible type
np.a... |
jarvys/django-1.7-jdb | refs/heads/master | tests/model_options/test_tablespaces.py | 34 | from __future__ import unicode_literals
from django.apps import apps
from django.conf import settings
from django.db import connection
from django.core.management.color import no_style
from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature
from .models.tablespaces import (Article, ArticleRef, Authors,... |
holmes/intellij-community | refs/heads/master | python/testData/inspections/PyUnresolvedReferencesInspection/baseStringCheck.py | 78 | def repl(s):
if not isinstance(s, basestring):
return s
return s.replace(s.replace('a', 'b'), s)
|
DarrienG/Server-Automation | refs/heads/master | automate.py | 1 | #!/usr/bin/env python
__author__ = 'Darrien'
# sys is needed to skip the python script when updating
# os is needed for changing the working directory, and making folders
import sys
import os
# Kills the script in order to return to the bash script that called it.
def update_kill():
print "Killing m... |
Vladimirek/DPexamples | refs/heads/master | omronDemo/py/www2plc.py | 1 | from dataplicity.client.task import Task, onsignal
from omronTcpFins import OmronPLC
class Www2plc(Task):
"""PLC data writer"""
def pre_startup(self):
"""Called prior to running the project"""
# self.conf contains the data- constants from the conf
self.livecfg = self.conf.get('valsetco... |
ashemedai/ansible | refs/heads/devel | lib/ansible/modules/utilities/logic/async_wrapper.py | 89 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either ... |
vitaly4uk/django | refs/heads/master | tests/m2o_recursive/models.py | 282 | """
Relating an object to itself, many-to-one
To define a many-to-one relationship between a model and itself, use
``ForeignKey('self', ...)``.
In this example, a ``Category`` is related to itself. That is, each
``Category`` has a parent ``Category``.
Set ``related_name`` to designate what the reverse relationship i... |
FHannes/intellij-community | refs/heads/master | python/testData/mover/simple_afterUp.py | 91 | a = 1
b = 2
|
oseledets/pybtex | refs/heads/master | pybtex/tests/plugin_test.py | 1 | # Copyright (c) 2014 Matthias C. M. Troffaes
#
# 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, pub... |
Juniper/contrail-dev-neutron | refs/heads/master | neutron/openstack/common/local.py | 378 | # 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 req... |
commonwealth-of-puerto-rico/lean | refs/heads/master | paart/apps/workflows/migrations/0008_auto__chg_field_workflowinstancehistory_workflow_instance.py | 2 | # -*- coding: 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):
# Changing field 'WorkflowInstanceHistory.workflow_instance'
db.alter_column('workflows_workflowinstancehis... |
anivk/riceai-traffic | refs/heads/master | speeds/json_to_mongo.py | 1 | from os import listdir
from os.path import isfile, join
mypath = "C:\\flow"
for folder in listdir(mypath):
if not isfile(join(mypath,folder)):
folder_path = join(mypath,folder)
for json_file in listdir(folder_path):
if json_file.endswith('.json'):
json_file_path = join(f... |
WSDC-NITWarangal/django | refs/heads/master | django/conf/locale/nl/__init__.py | 12133432 | |
Kami/libcloud | refs/heads/trunk | integration/driver/__init__.py | 12133432 | |
rhertzog/django | refs/heads/master | django/contrib/sessions/management/commands/__init__.py | 12133432 | |
bols-blue/ansible | refs/heads/devel | test/units/__init__.py | 267 |
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
|
IronLanguages/ironpython2 | refs/heads/master | Src/StdLib/Lib/test/test_fcntl.py | 45 | """Test program for the fcntl C module.
OS/2+EMX doesn't support the file locking operations.
"""
import os
import struct
import sys
import unittest
from test.test_support import (verbose, TESTFN, unlink, run_unittest,
import_module, cpython_only)
# Skip test if no fcntl module.
fcntl = import_module('fcntl')
... |
skomski/duktape | refs/heads/master | examples/alloc-logging/pool_simulator.py | 11 | #!/usr/bin/python
#
# Simulate pool allocator behavior against a memory allocation log written
# by duk_alloc_logging.c or in matching format. Provide commands to provide
# statistics and graphs, and to optimize pool counts for single or multiple
# application profiles.
#
# The pool allocator simulator incorporat... |
mlf4aiur/payslip | refs/heads/master | libs/xlrd/timemachine.py | 64 | # -*- coding: cp1252 -*-
##
# <p>Copyright © 2006-2008 Stephen John Machin, Lingfo Pty Ltd</p>
# <p>This module is part of the xlrd package, which is released under a BSD-style licence.</p>
##
# timemachine.py -- adaptation for earlier Pythons e.g. 2.1
# usage: from timemachine import *
# 2008-02-08 SJM Generalised ... |
216software/Profiles | refs/heads/dev | communityprofiles/profiles/oldmigrations/0055_auto__add_flatvalue.py | 2 | # 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 model 'FlatValue'
db.create_table(u'profiles_flatvalue', (
(u'id', self.gf('django.db... |
Lujeni/ansible | refs/heads/devel | lib/ansible/modules/system/parted.py | 16 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Fabrizio Colonna <colofabrix@tin.it>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_versi... |
thedanotto/thedanotto | refs/heads/master | thedanotto/urls.py | 1 | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.views.generic import RedirectView
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {
... |
zerc/django | refs/heads/master | tests/migrations/migrations_test_apps/unspecified_app_with_conflict/migrations/0002_conflicting_second.py | 425 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("unspecified_app_with_conflict", "0001_initial")]
operations = [
migrations.CreateModel(
"Something",
[
... |
Zhongqilong/kbengine | refs/heads/master | kbe/src/lib/python/Lib/xml/sax/saxutils.py | 76 | """\
A library of useful helper classes to the SAX classes, for the
convenience of application and driver writers.
"""
import os, urllib.parse, urllib.request
import io
import codecs
from . import handler
from . import xmlreader
def __dict_replace(s, d):
"""Replace substrings of a string using a dictionary."""
... |
rahulrrixe/WRAN | refs/heads/master | db_repository/versions/__init__.py | 12133432 | |
ashishnitinpatil/django_appengine_project_template | refs/heads/master | django/core/handlers/__init__.py | 12133432 | |
rajexp/stepMuzic | refs/heads/master | allauth/socialaccount/providers/spotify/__init__.py | 12133432 | |
IndraVikas/scikit-learn | refs/heads/master | sklearn/linear_model/tests/test_bayes.py | 299 | # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
#
# License: BSD 3 clause
import numpy as np
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import SkipTest
from sklearn.linear_model.bayes import BayesianRidge, ARDRegres... |
nikhil18/lightning-kernel | refs/heads/lightning-10.6.A.0.454 | scripts/gcc-wrapper.py | 234 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011-2012, The Linux Foundation. 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 th... |
wooga/airflow | refs/heads/master | airflow/providers/amazon/aws/operators/sagemaker_transform.py | 1 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
natefoo/pulsar | refs/heads/master | pulsar/client/destination.py | 2 |
from re import match
from .util import filter_destination_params
SUBMIT_PREFIX = "submit_"
def url_to_destination_params(url):
"""Convert a legacy runner URL to a job destination
>>> params_simple = url_to_destination_params("http://localhost:8913/")
>>> params_simple["url"]
'http://localhost:8913... |
CedarLogic/readthedocs.org | refs/heads/master | readthedocs/donate/migrations/0001_initial.py | 36 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... |
edum1978/eduengage | refs/heads/master | testrunner.py | 24 | #!/usr/bin/python
import optparse
import sys
import unittest
import os
USAGE = """%prog SDK_PATH TEST_PATH
Run unit test for App Engine apps.
SDK_PATH Path to the SDK installation
TEST_PATH Path to package containing test modules"""
def main(sdk_path, test_path):
sys.path.insert(0, os.path.join(os.path.dir... |
pdrobek/polcoin-core | refs/heads/1.6.2.1 | qa/rpc-tests/invalidateblock.py | 1 | #!/usr/bin/env python2
# Copyright (c) 2014 The Polcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test InvalidateBlock code
#
from test_framework import PolcoinTestFramework
from polcoinrpc.authproxy imp... |
lfeldkam/AliPhysics | refs/heads/master | PWGJE/EMCALJetTasks/Tracks/analysis/write/RawSpectrumWriter.py | 41 | #**************************************************************************
#* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
#* *
#* Author: The ALICE Off-line Project. *
#* Contributors ... |
gnu-sandhi/sandhi | refs/heads/master | modules/gr36/gr-blocks/python/qa_add_mult_v.py | 11 | #!/usr/bin/env python
#
# Copyright 2004,2007,2010,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at ... |
Leits/robot_tests | refs/heads/master | op_robot_tests/__init__.py | 9480 | #
|
clonemeagain/cloudprint | refs/heads/master | ez_setup.py | 276 | #!python
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools... |
YihaoLu/statsmodels | refs/heads/master | statsmodels/genmod/families/family.py | 19 | '''
The one parameter exponential family distributions used by GLM.
'''
# TODO: quasi, quasibinomial, quasipoisson
# see http://www.biostat.jhsph.edu/~qli/biostatistics_r_doc/library/stats/html/family.html
# for comparison to R, and McCullagh and Nelder
import numpy as np
from scipy import special
from . import links ... |
hackolite/PRJ-medtec_sigproc | refs/heads/master | echopen-leaderboard/bootcamp/feeds/migrations/__init__.py | 12133432 | |
blmlove409/python-goose | refs/heads/master | tests/configuration.py | 22 | # -*- coding: utf-8 -*-
"""\
This is a python port of "Goose" orignialy licensed to Gravity.com
under one or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.
Python port was written by Xavier Grangier for Recrutae
Gravity.co... |
charles-vdulac/xapian-haystack | refs/heads/master | xapian_backend.py | 1 | from __future__ import unicode_literals
import datetime
import pickle
import os
import re
import shutil
import sys
from django.utils import six
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.encoding import force_text
from haystack import connections
from h... |
lokeshjindal15/pd-gem5 | refs/heads/master | ext/ply/test/yacc_error1.py | 174 | # -----------------------------------------------------------------------------
# yacc_error1.py
#
# Bad p_error() function
# -----------------------------------------------------------------------------
import sys
if ".." not in sys.path: sys.path.insert(0,"..")
import ply.yacc as yacc
from calclex import tokens
# ... |
fangeugene/the-blue-alliance | refs/heads/master | database/dict_converters/event_details_converter.py | 2 | from collections import defaultdict
from database.dict_converters.converter_base import ConverterBase
class EventDetailsConverter(ConverterBase):
SUBVERSIONS = { # Increment every time a change to the dict is made
3: 3,
}
@classmethod
def _convert(cls, event_details, dict_version):
C... |
jnovinger/django | refs/heads/master | django/views/csrf.py | 437 | from django.conf import settings
from django.http import HttpResponseForbidden
from django.template import Context, Engine
from django.utils.translation import ugettext as _
from django.utils.version import get_docs_version
# We include the template inline since we need to be able to reliably display
# this error mes... |
marcuschia/ShaniXBMCWork | refs/heads/master | other/jsunpackMM.py | 12 | """
urlresolver XBMC Addon
Copyright (C) 2011 t0mm0
Updated by Shani_08 for muchmovies, here they have done the double encrypt.
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 Founda... |
CrushAndRun/Cloudbot-Fluke | refs/heads/master | cloudbot/plugin.py | 5 | import asyncio
import glob
import importlib
import inspect
import logging
import os
import re
import sqlalchemy
from cloudbot.event import Event
from cloudbot.util import botvars
logger = logging.getLogger("cloudbot")
def find_hooks(parent, module):
"""
:type parent: Plugin
:type module: object
:rt... |
jpaton/xen-4.1-LJX1 | refs/heads/master | tools/xm-test/tests/pause/01_pause_basic_pos.py | 42 | #!/usr/bin/python
# Copyright (C) International Business Machines Corp., 2005
# Author: Paul Larson <pl@us.ibm.com>
# Description:
# Positive Tests:
# Tests for xm pause
# 1) Create domain, verify it's up with console
# 2) pause the domain
# 3) verify it's paused by failure to connect console
import time
import com... |
rezometz/django-paiji2-infoconcert | refs/heads/master | paiji2_infoconcert/models.py | 84 | # from django.db import models
# Create your models here.
|
cloudbase/nova-virtualbox | refs/heads/virtualbox_driver | nova/tests/unit/keymgr/test_conf_key_mgr.py | 71 | # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# 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/... |
junhuac/MQUIC | refs/heads/master | src/tools/gyp/test/ios/gyptest-framework.py | 3 | #!/usr/bin/env python
# Copyright 2016 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 ios app frameworks are built correctly.
"""
import TestGyp
import TestMac
import subprocess
import sys
if sys.platform == 'd... |
gm2211/vpnAlfredWorkflow | refs/heads/develop | src/alp/request/requests/sessions.py | 3 | # -*- coding: utf-8 -*-
"""
requests.session
~~~~~~~~~~~~~~~~
This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).
"""
import os
from datetime import datetime
from .compat import cookielib
from .cookies import cookiejar_from_dict, extract_cookies_to_jar
from... |
trungdtbk/faucet | refs/heads/master | faucet/watcher_conf.py | 2 | """Gauge watcher configuration."""
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2019 The Contributors
#
# Licensed under the Apac... |
normtown/SickRage | refs/heads/master | lib/unidecode/x08c.py | 251 | data = (
'Yu ', # 0x00
'Shui ', # 0x01
'Shen ', # 0x02
'Diao ', # 0x03
'Chan ', # 0x04
'Liang ', # 0x05
'Zhun ', # 0x06
'Sui ', # 0x07
'Tan ', # 0x08
'Shen ', # 0x09
'Yi ', # 0x0a
'Mou ', # 0x0b
'Chen ', # 0x0c
'Die ', # 0x0d
'Huang ', # 0x0e
'Jian ', # 0x0f
'Xie ', # ... |
endlessm/chromium-browser | refs/heads/master | third_party/grpc/src/src/python/grpcio_status/grpc_status/__init__.py | 90 | # Copyright 2018 The 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 writ... |
kk9599/django-cms | refs/heads/develop | cms/test_utils/project/urls_2.py | 47 | from cms.utils.conf import get_cms_setting
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.i18n import i18n_patterns
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
admin.autodiscover()
urlpatterns = [
url(r'^m... |
RachitKansal/scikit-learn | refs/heads/master | sklearn/datasets/olivetti_faces.py | 198 | """Modified Olivetti faces dataset.
The original database was available from (now defunct)
http://www.uk.research.att.com/facedatabase.html
The version retrieved here comes in MATLAB format from the personal
web page of Sam Roweis:
http://www.cs.nyu.edu/~roweis/
There are ten different images of each of 40... |
m-ober/byceps | refs/heads/master | byceps/services/news/models/__init__.py | 12133432 | |
tugluck/galah | refs/heads/v0.2dev | galah/sheep/utility/__init__.py | 12133432 | |
gerrive/horizon | refs/heads/master | openstack_dashboard/dashboards/project/networks/ports/__init__.py | 12133432 | |
dhorelik/django-cms | refs/heads/develop | cms/tests/test_signals.py | 23 | # -*- coding: utf-8 -*-
from __future__ import with_statement
from contextlib import contextmanager
from django.conf import settings
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.test.utils import override_settings
from cms.api import create_page
from cms.models import ... |
adityapb/pyspace | refs/heads/master | pyspace/tests/test_vtk.py | 1 | from pyspace.utils import dump_vtk
import numpy
from pyspace.planet import PlanetArray
from pyspace.simulator import BruteForceSimulator
import unittest
class TestVTK(unittest.TestCase):
def setUp(self):
x, y, z = numpy.mgrid[0:1:0.04, 0:1:0.04, 0:1:0.04]
self.x = x.ravel(); self.y = y.ravel(); sel... |
cenkbircanoglu/similarityPy | refs/heads/master | tests/algorihtm_tests/standart_deviation_test.py | 2 | from unittest import TestCase
from similarityPy.algorithms.standart_deviation import StandartDeviation
from tests import test_logger
__author__ = 'cenk'
class StandartDeviationTest(TestCase):
def setUp(self):
pass
def test_algorithm_with_list(self):
test_logger.debug("StandartDeviationTest... |
pinterb/st2 | refs/heads/master | st2debug/st2debug/cmd/submit_debug_info.py | 2 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... |
SimenB/thefuck | refs/heads/master | tests/rules/test_brew_update_formula.py | 4 | import pytest
from thefuck.types import Command
from thefuck.rules.brew_update_formula import get_new_command, match
output = ("Error: This command updates brew itself, and does not take formula"
" names.\nUse 'brew upgrade thefuck'.")
def test_match():
command = Command('brew update thefuck', output)... |
michaelBenin/autopep8 | refs/heads/master | test/acid_github.py | 1 | #!/usr/bin/env python
"""Run acid test against latest repositories on Github."""
import os
import re
import subprocess
import sys
import acid
TMP_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'github_tmp')
def latest_repositories():
"""Return names of latest released re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.