repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
sodafree/backend | refs/heads/master | build/lib.linux-i686-2.7/django/contrib/gis/admin/options.py | 83 | from django.contrib.admin import ModelAdmin
from django.contrib.gis.admin.widgets import OpenLayersWidget
from django.contrib.gis.gdal import OGRGeomType
from django.contrib.gis.db import models
class GeoModelAdmin(ModelAdmin):
"""
The administration options class for Geographic models. Map settings
may be... |
qwattash/mpm | refs/heads/master | conf.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Minecraft Package Manager documentation build configuration file, created by
# sphinx-quickstart on Wed May 13 23:19:08 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are pr... |
lakshayg/tensorflow | refs/heads/master | tensorflow/contrib/distributions/python/kernel_tests/bijectors/reshape_test.py | 9 | # 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... |
konono/equlipse | refs/heads/master | openstack-install/charm/trusty/charm-keystone/tests/charmhelpers/contrib/openstack/__init__.py | 43 | # Copyright 2014-2015 Canonical Limited.
#
# 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 ... |
onaio/django-guardian | refs/heads/devel | guardian/migrations/0001_initial.py | 15 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0001_initial'),
('auth', '0001_initial'),
migrations.swappable_dependency(se... |
spbguru/repo1 | refs/heads/master | tests/integration/py2/nupic/opf/opf_checkpoint_test/experiments/backwards_compatibility/a/description.py | 14 |
# ----------------------------------------------------------------------
# Copyright (C) 2011 Numenta Inc. All rights reserved.
#
# The information and source code contained herein is the
# exclusive property of Numenta Inc. No part of this software
# may be used, reproduced, stored or distributed in any form,
# ... |
talishte/ctigre | refs/heads/master | env/lib/python2.7/site-packages/django/contrib/sessions/backends/signed_cookies.py | 288 | from django.conf import settings
from django.core import signing
from django.contrib.sessions.backends.base import SessionBase
class SessionStore(SessionBase):
def load(self):
"""
We load the data from the key itself instead of fetching from
some external data store. Opposite of _get_ses... |
msabramo/kallithea | refs/heads/master | kallithea/controllers/forks.py | 2 | # -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that... |
jeroanan/GameCollection | refs/heads/master | UI/Tests/Handlers/TestChangePasswordHandler.py | 1 | # Copyright (C) 2015 David Wilson
# Icarus 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.
# Icarus is distributed in the hope that it... |
ElDeveloper/qiita | refs/heads/master | qiita_pet/handlers/artifact_handlers/tests/__init__.py | 76 | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... |
macdiesel/mongo-python-driver | refs/heads/master | test/test_bulk.py | 7 | # Copyright 2014-2015 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... |
40223148/finaltest | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/importlib/machinery.py | 635 | """The machinery of importlib: finders, loaders, hooks, etc."""
import _imp
from ._bootstrap import (SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES,
OPTIMIZED_BYTECODE_SUFFIXES, #BYTECODE_SUFFIXES,
EXTENSION_SUFFIXES)
from ._bootstrap import BuiltinImporter
from ._bootstrap... |
rsjohnco/rez | refs/heads/resources2 | src/rez/backport/ordereddict.py | 1047 | # Copyright (c) 2009 Raymond Hettinger
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish,... |
BT-fgarbely/odoo | refs/heads/8.0 | addons/account_voucher/account_voucher.py | 132 | # -*- 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... |
hy-2013/scrapy | refs/heads/master | tests/test_mail.py | 129 | import unittest
from io import BytesIO
from scrapy.mail import MailSender
class MailSenderTest(unittest.TestCase):
def test_send(self):
mailsender = MailSender(debug=True)
mailsender.send(to=['test@scrapy.org'], subject='subject', body='body', _callback=self._catch_mail_sent)
assert self... |
dsavoiu/kafe2 | refs/heads/master | kafe2/core/__init__.py | 1 | """Core API: core components for fitting with kafe2
"""
|
shahbaz17/zamboni | refs/heads/master | mkt/purchase/management/__init__.py | 12133432 | |
wathsalav/xos | refs/heads/master | xos/core/migrations/__init__.py | 12133432 | |
chengsoonong/crowdastro | refs/heads/master | crowdastro/crowd/__init__.py | 12133432 | |
kionetworks/openstack-dashboard-havana | refs/heads/master | openstack_dashboard/dashboards/project/images_and_snapshots/snapshots/__init__.py | 12133432 | |
madmath/sous-chef | refs/heads/dev | src/billing/migrations/0001_initial.py | 3 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-12 19:23
from __future__ import unicode_literals
import annoying.fields
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('order', '0008_auto_20160912_1509'),
]
oper... |
mancoast/CPythonPyc_test | refs/heads/master | cpython/234_test_types.py | 2 | # Python test set -- part 6, built-in types
from test.test_support import *
print '6. Built-in types'
print '6.1 Truth value testing'
if None: raise TestFailed, 'None is true instead of false'
if 0: raise TestFailed, '0 is true instead of false'
if 0L: raise TestFailed, '0L is true instead of false'
if 0.0: raise Te... |
cpcloud/odo | refs/heads/master | odo/tests/test_core.py | 2 | from __future__ import absolute_import, division, print_function
import warnings
from odo.core import NetworkDispatcher, path, FailedConversionWarning
from datashape import discover
d = NetworkDispatcher('foo')
@d.register(float, int, cost=1.0)
def f(x, **kwargs):
return float(x)
@d.register(str, float, cost=1.... |
stoewer/nixpy | refs/heads/master | nixio/file.py | 1 | # Copyright (c) 2014, German Neuroinformatics Node (G-Node)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICENSE file in the root of the Project.
from __future__ import (absolute_import, division, ... |
JioCloud/oslo.config | refs/heads/master | tests/test_warning.py | 2 | # 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, software
# d... |
adedayo/intellij-community | refs/heads/master | python/testData/quickdoc/CallFunc.py | 83 | # directly in function
def foo():
"<the_doc>Doc of foo."
pass
<the_ref>foo()
|
40223114/w16 | refs/heads/master | static/Brython3.1.3-20150514-095342/Lib/site-packages/pygame/draw.py | 603 | from javascript import console
from browser import timer
import math
class Queue:
def __init__(self):
self._list=[]
def empty(self):
return len(self._list) == 0
def put(self, element):
self._list.append(element)
def get(self):
if len(self._list) == 0:
raise BaseError
... |
nekohayo/meld | refs/heads/master | meld/melddoc.py | 2 | ### Copyright (C) 2002-2006 Stephen Kennedy <stevek@gnome.org>
### Copyright (C) 2011 Kai Willadsen <kai.willadsen@gmail.com>
### 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 versio... |
dcroc16/skunk_works | refs/heads/master | google_appengine/lib/django-1.3/django/contrib/localflavor/is_/is_postalcodes.py | 438 | # -*- coding: utf-8 -*-
IS_POSTALCODES = (
('101', u'101 Reykjavík'),
('103', u'103 Reykjavík'),
('104', u'104 Reykjavík'),
('105', u'105 Reykjavík'),
('107', u'107 Reykjavík'),
('108', u'108 Reykjavík'),
('109', u'109 Reykjavík'),
('110', u'110 Reykjavík'),
('111', u'111 Reykjavík'... |
horance-liu/tensorflow | refs/heads/master | tensorflow/contrib/quantize/python/fold_batch_norms_test.py | 8 | # 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... |
django-bmf/django-bmf | refs/heads/develop | djangobmf/contrib/project/migrations/0001_initial.py | 2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operati... |
XiaosongWei/crosswalk-test-suite | refs/heads/master | usecase/usecase-wrt-auto-tests/samples/ApkBuildTemporary/projectdir.py | 5 | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... |
fabioz/PyDev.Debugger | refs/heads/master | tests_python/resources/_debugger_case_import_main.py | 15 | import _debugger_case_import_imported # break here
print('TEST SUCEEDED')
|
camptocamp/odoo | refs/heads/master | openerp/addons/test_workflow/tests/test_workflow.py | 46 | # -*- coding: utf-8 -*-
import openerp
from openerp import SUPERUSER_ID
from openerp.tests import common
class test_workflows(common.TransactionCase):
def check_activities(self, model_name, i, names):
""" Check that the record i has workitems in the given activity names.
"""
instance = se... |
azureplus/chromium_depot_tools | refs/heads/master | third_party/coverage/templite.py | 123 | """A simple Python template renderer, for a nano-subset of Django syntax."""
# Coincidentally named the same as http://code.activestate.com/recipes/496702/
import re, sys
class Templite(object):
"""A simple template renderer, for a nano-subset of Django syntax.
Supported constructs are extended variable acc... |
TheTypoMaster/chromium-crosswalk | refs/heads/master | tools/telemetry/third_party/pyserial/serial/urlhandler/protocol_hwgrep.py | 159 | #! python
#
# Python Serial Port Extension for Win32, Linux, BSD, Jython
# see __init__.py
#
# This module implements a special URL handler that uses the port listing to
# find ports by searching the string descriptions.
#
# (C) 2011 Chris Liechti <cliechti@gmx.net>
# this is distributed under a free software license, ... |
mancoast/CPythonPyc_test | refs/heads/master | cpython/263_test_wsgiref.py | 55 | from __future__ import nested_scopes # Backward compat for 2.1
from unittest import TestCase
from wsgiref.util import setup_testing_defaults
from wsgiref.headers import Headers
from wsgiref.handlers import BaseHandler, BaseCGIHandler
from wsgiref import util
from wsgiref.validate import validator
from wsgiref.simple... |
ryfeus/lambda-packs | refs/heads/master | Tensorflow_LightGBM_Scipy_nightly/source/setuptools/windows_support.py | 1015 | import platform
import ctypes
def windows_only(func):
if platform.system() != 'Windows':
return lambda *args, **kwargs: None
return func
@windows_only
def hide_file(path):
"""
Set the hidden attribute on a file or directory.
From http://stackoverflow.com/questions/19622133/
`path` ... |
NaturalHistoryMuseum/inselect | refs/heads/master | inselect/gui/views/boxes/box_item.py | 1 | import sys
from itertools import chain
from PyQt5.QtCore import Qt, QRect, QRectF
from PyQt5.QtGui import QPen
from PyQt5.QtWidgets import QGraphicsItem, QGraphicsRectItem
from inselect.lib.utils import debug_print
from inselect.gui.colours import colour_scheme_choice
from inselect.gui.utils import painter_state
fr... |
modulexcite/PTVS | refs/heads/master | Python/Product/TestAdapter/visualstudio_py_testlauncher.py | 13 | # ############################################################################
#
# Copyright (c) Microsoft Corporation.
#
# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
# copy of the license can be found in the License.html file at the root of this distribution... |
virneo/opencog | refs/heads/master | opencog/python/pln_old/__init__.py | 32 | from agents import InferenceAgent, TestInferenceAgent, \
BackwardInferenceAgent, ForwardInferenceAgent
|
lykahb/aeson | refs/heads/master | benchmarks/bench-parse.py | 22 | #!/usr/bin/env python
import os, re, subprocess, sys
result_re = re.compile(r'^\s*(\d+) good, (\d+\.\d+)s$', re.M)
if len(sys.argv) > 1:
parser_exe = sys.argv[1]
else:
parser_exe = ('dist/build/aeson-benchmark-aeson-parse/' +
'aeson-benchmark-aeson-parse')
def run(count, filename):
pri... |
crossgovernmentservices/people | refs/heads/master | application/home_blueprint/views.py | 1 | from flask import (
Blueprint,
)
from flask.ext.pushrod import pushrod_view
blueprint = Blueprint(
'home',
__name__,
template_folder='templates')
@blueprint.route('/')
@pushrod_view(jinja_template='index.html')
def index():
return {'msg':'todo home page stuff'}
|
kcpawan/django | refs/heads/master | tests/user_commands/management/commands/transaction.py | 553 | from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Say hello."
args = ''
output_transaction = True
def handle(self, *args, **options):
return 'Hello!'
|
r-lyeh/scriptorium | refs/heads/master | python/micropython/tests/io/file_seek.py | 18 | f = open("io/data/file1", "rb")
print(f.seek(6))
print(f.read(5))
print(f.seek(0, 1))
print(f.read(4))
print(f.seek(-6, 2))
print(f.read(20))
print(f.seek(0, 0))
print(f.read(5))
f.close()
# test text mode
f = open("io/data/file1", "rt")
print(f.seek(6))
print(f.read(5))
f.close()
|
badbytes/pymeg | refs/heads/master | meg/leadfield_parallel.py | 1 | # Copyright 2008 Dan Collins
# This 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.
# And is distributed in the hope that it will be ... |
olegpshenichniy/Booktype | refs/heads/master | lib/booktype/importer/utils.py | 7 |
import os
import urllib
import importlib
from booktype.utils import config
from booktype.utils.misc import booktype_slugify
def convert_file_name(file_name):
name = os.path.basename(file_name)
if name.rfind('.') != -1:
_np = name[:name.rfind('.')]
_ext = name[name.rfind('.'):]
name ... |
dashea/pykickstart | refs/heads/master | pykickstart/commands/btrfs.py | 2 | #
# Chris Lumens <clumens@redhat.com>
# David Lehman <dlehman@redhat.com>
#
# Copyright 2005, 2006, 2007, 2011 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2. This pro... |
googleapis/python-bigquery-datatransfer | refs/heads/master | google/cloud/bigquery_datatransfer_v1/types/transfer.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... |
vadimtk/chrome4sdp | refs/heads/master | tools/telemetry/telemetry/internal/backends/chrome/extension_backend.py | 32 | # 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 collections
from telemetry.internal.backends.chrome_inspector import inspector_backend_list
from telemetry.internal.browser import extension_page
c... |
Jaironlanda/yowsup | refs/heads/master | yowsup/layers/protocol_groups/protocolentities/iq_groups_participants_add_success.py | 61 | from yowsup.structs import ProtocolTreeNode
from yowsup.layers.protocol_iq.protocolentities import ResultIqProtocolEntity
class SuccessAddParticipantsIqProtocolEntity(ResultIqProtocolEntity):
'''
<iq type="result" from="{{group_jid}}" id="{{id}}">
<add type="success" participant="{{jid}}"></add>
... |
Filechaser/nzbToMedia | refs/heads/master | core/nzbToMediaConfig.py | 2 | # coding=utf-8
from six import iteritems
import os
import shutil
import copy
import core
from configobj import *
from core import logger
from itertools import chain
class Section(configobj.Section, object):
def isenabled(section):
# checks if subsection enabled, returns true/false if subsection specifie... |
siosio/intellij-community | refs/heads/master | python/testData/inspections/PyUnresolvedReferencesInspection/DynamicDunderAll/a.py | 24 | from m1 import *
print(m1m1)
from m2 import *
print(m2m1)
from m3 import *
print(m3m1)
from m4 import *
print(m4m1)
from m5 import *
print(m5m1) |
nemesisdesign/django | refs/heads/master | tests/utils_tests/test_ipv6.py | 46 | from __future__ import unicode_literals
import unittest
from django.utils.ipv6 import clean_ipv6_address, is_valid_ipv6_address
class TestUtilsIPv6(unittest.TestCase):
def test_validates_correct_plain_address(self):
self.assertTrue(is_valid_ipv6_address('fe80::223:6cff:fe8a:2e8a'))
self.assertT... |
iulian787/spack | refs/heads/develop | var/spack/repos/builtin/packages/r-biomartr/package.py | 5 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RBiomartr(RPackage):
"""Perform large scale genomic data retrieval and functional annotati... |
GehenHe/Recognize-Face-on-Android | refs/heads/master | tensorflow/python/user_ops/__init__.py | 12133432 | |
zWingz/webbasketball | refs/heads/master | apps/admin/__init__.py | 12133432 | |
w1r0x/ansible-modules-core | refs/heads/devel | database/__init__.py | 12133432 | |
ESSolutions/ESSArch_Core | refs/heads/master | ESSArch_Core/tests/__init__.py | 12133432 | |
cparawhore/ProyectoSubastas | refs/heads/master | site-packages/django/conf/locale/tr/__init__.py | 12133432 | |
pitomba/pitomba-site | refs/heads/master | pitomba/settings.py | 1 | from settings_base import *
from os.path import dirname, abspath, join
DEBUG = True
PORT = 9082
SERVER_NAME = 'http://0.0.0.0:%s' % PORT
UPLOAD_PATH = get_path_to('uploads')
|
sander76/home-assistant | refs/heads/dev | homeassistant/components/demo/__init__.py | 6 | """Set up the demo environment that mimics interaction with devices."""
import asyncio
from homeassistant import bootstrap, config_entries
from homeassistant.const import ATTR_ENTITY_ID, EVENT_HOMEASSISTANT_START
import homeassistant.core as ha
DOMAIN = "demo"
COMPONENTS_WITH_CONFIG_ENTRY_DEMO_PLATFORM = [
"air_... |
CenterForOpenScience/SHARE | refs/heads/develop | tests/share/regulate/steps/test_deduplicate.py | 2 | import pytest
from share.regulate.steps.deduplicate import Deduplicate
from tests.share.normalize.factories import (
CreativeWork,
Preprint,
Registration,
Subject,
WorkIdentifier,
)
class TestDeduplicate:
@pytest.mark.parametrize('input', [
[Preprint(0, identifiers=[WorkIdentifier(1)... |
DMOJ/onemirror | refs/heads/master | onemirror/main.py | 1 | import argparse
import logging
from onemirror.mirror import OneDriveMirror
def main():
parser = argparse.ArgumentParser(description='OneDrive mirroring program: create a complete '
'mirror of OneDrive contents')
parser.add_argument('remote', nargs='?', default... |
asedunov/intellij-community | refs/heads/master | python/testData/surround/SurroundWithIf.py | 150 | def foo():
<selection>print "hello"</selection>
|
magul/pywikibot-core | refs/heads/master | pywikibot/interwiki_graph.py | 1 | # -*- coding: utf-8 -*-
"""Module with the Graphviz drawing calls."""
#
# (C) Pywikibot team, 2006-2016
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, unicode_literals
import itertools
import threading
try:
import pydot
except ImportError as e:
pydot = e
import ... |
FoamyGuy/MatterMaker | refs/heads/master | makematter_server/admin.py | 1 | from django.contrib import admin
# Register your models here.
from makematter_server.models import MatterObject, MatterTemplate, MatterTemplateVar
admin.site.register(MatterObject)
admin.site.register(MatterTemplate)
admin.site.register(MatterTemplateVar) |
charlesvdv/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/pywebsocket/src/test/testdata/handlers/blank_wsh.py | 499 | # Copyright 2009, 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 of conditions and the f... |
40223202/2015cdb_g2 | refs/heads/master | 2015scrum-3a6fed94d45237e506e5e1539e27a2c9e89e6740/static/Brython3.1.1-20150328-091302/Lib/browser/timer.py | 610 | from browser import window
def wrap(func):
# Transforms a function f into another function that prints a
# traceback in case of exception
def f(*args, **kw):
try:
return func(*args, **kw)
except Exception as exc:
sys.stderr.write(exc)
return f
clear_interval = w... |
indictranstech/buyback-erp | refs/heads/master | erpnext/utilities/doctype/note/test_note.py | 38 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt
import frappe
import unittest
test_records = frappe.get_test_records('Note')
class TestNote(unittest.TestCase):
pass
|
GREO/GNU-Radio | refs/heads/master | gr-wxgui/src/python/constants.py | 1 | #
# Copyright 2008,2010 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 your option)
# any later version... |
ipazc/oculus-crawl | refs/heads/master | main/dataset/__init__.py | 9 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Ivan de Paz Centeno"
|
switowski/invenio | refs/heads/master | invenio/modules/upgrader/upgrades/invenio_2013_01_08_new_goto_table.py | 15 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013 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 later... |
mheap/ansible | refs/heads/devel | lib/ansible/modules/clustering/znode.py | 55 | #!/usr/bin/python
# Copyright 2015 WP Engine, Inc. All rights reserved.
# 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_version': '1.1',
... |
dsprenkels/servo | refs/heads/master | tests/wpt/harness/wptrunner/config.py | 196 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import ConfigParser
import os
import sys
from collections import OrderedDict
here = os.path.split(__file__)[0]
class C... |
jetty840/ReplicatorG | refs/heads/master | skein_engines/skeinforge-47/fabmetheus_utilities/miscellaneous/fabricate/frank_davies/bring_to_temp.py | 24 | # bring reprap to temperature
# Frank Davies
import serial
import time
import sys
def out_rep(out_string):
ser.write(out_string)
print out_string
#print "waiting for OK"
start_time=time.clock()
while (ser.inWaiting()==0) and (time.clock()<start_time+40):
c=2
line=ser.readline() # read a '\n' te... |
yangwii/graphql_py_client | refs/heads/master | app/utils/utils.py | 1 | # -*- coding: utf-8 -*-
import json
from gql import Client, gql
from gql.transport.requests import RequestsHTTPTransport
def send(host, port, data):
client = Client(
retries=3,
transport=RequestsHTTPTransport(url=host + ':' + port)
)
query = gql(data)
response = client.execute(query)... |
kblauer/cs-outreach | refs/heads/master | server_django/server_django/tests.py | 1 | from django.test import TestCase
from django.test import Client
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
# These are tests designed to ensure the base URL structure is setup and working as desired.
class SurveyorRootTests(TestCase):
def setUp(self):
"""... |
openmv/micropython | refs/heads/master | tests/basics/bytes_subscr.py | 96 | # test [...] of bytes
print(b'123'[0])
print(b'123'[1])
print(b'123'[-1])
try:
b'123'[1] = 4
except TypeError:
print('TypeError')
try:
del b'123'[1]
except TypeError:
print('TypeError')
|
TeXitoi/navitia | refs/heads/dev | source/jormungandr/jormungandr/timezone.py | 11 | # encoding: utf-8
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobilit... |
SergiuMir/python-phonenumbers | refs/heads/dev | python/tests/testdata/region_SE.py | 4 | """Auto-generated file, do not edit by hand. SE metadata"""
from phonenumbers.phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_SE = PhoneMetadata(id='SE', country_code=46, international_prefix='00',
general_desc=PhoneNumberDesc(),
fixed_line=PhoneNumberDesc(),
mobile=PhoneNu... |
kastnermario/yaml-cpp | refs/heads/master | test/gmock-1.7.0/scripts/generator/cpp/__init__.py | 12133432 | |
vaginessa/wifuzzit | refs/heads/master | requests/ndmp.py | 10 | from sulley import *
import struct
import time
ndmp_messages = \
[
# Connect Interface
0x900, # NDMP_CONNECT_OPEN
0x901, # NDMP_CONECT_CLIENT_AUTH
0x902, # NDMP_CONNECT_CLOSE
0x903, # NDMP_CONECT_SERVER_AUTH
# Config Interface
0x100, # NDMP_CONFIG_GET_HOST_INFO
0x... |
wkschwartz/django | refs/heads/stable/3.2.x | tests/admin_widgets/test_autocomplete_widget.py | 11 | from django import forms
from django.contrib import admin
from django.contrib.admin.widgets import AutocompleteSelect
from django.forms import ModelChoiceField
from django.test import TestCase, override_settings
from django.utils import translation
from .models import Album, Band, ReleaseEvent, VideoStream
class Alb... |
pasinskim/integration | refs/heads/master | tests/tests/test_fault_tolerance.py | 1 | #!/usr/bin/python
# Copyright 2017 Northern.tech AS
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... |
raghavrv/scikit-learn | refs/heads/master | examples/covariance/plot_covariance_estimation.py | 4 | """
=======================================================================
Shrinkage covariance estimation: LedoitWolf vs OAS and max-likelihood
=======================================================================
When working with covariance estimation, the usual approach is to use
a maximum likelihood estimator,... |
blaze/distributed | refs/heads/master | distributed/cli/utils.py | 1 | from tornado.ioloop import IOLoop
py3_err_msg = """
Warning: Your terminal does not set locales.
If you use unicode text inputs for command line options then this may cause
undesired behavior. This is rare.
If you don't use unicode characters in command line options then you can safely
ignore this message. This i... |
clchiou/garage | refs/heads/master | shipyard/rules/py/cryptography/build.py | 1 | from templates import py
py.define_pip_package(
package='cryptography',
version='2.3.1',
patterns=[
'cryptography',
# And its dependencies.
'asn1crypto',
'cffi',
'_cffi_backend*',
'.libs_cffi_backend*',
'idna',
'pycparser',
'six.py',
... |
hiei23/servo | refs/heads/master | tests/wpt/web-platform-tests/resource-timing/SyntheticResponse.py | 61 | import urllib
import time
def main(request, response):
index = request.request_path.index("?")
args = request.request_path[index+1:].split("&")
headersSent = 0
for arg in args:
if arg.startswith("ignored"):
continue
elif arg.endswith("ms"):
time.sleep(float(arg[0... |
servo/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/websockets/src/websockets/__init__.py | 17 | # This relies on each of the submodules having an __all__ variable.
from .auth import * # noqa
from .client import * # noqa
from .exceptions import * # noqa
from .protocol import * # noqa
from .server import * # noqa
from .typing import * # noqa
from .uri import * # noqa
from .version import version as __versio... |
jjffryan/pymtl | refs/heads/master | pymtl/tools/deprecated/ast_typer.py | 8 | #=========================================================================
# ast_typer.py
#=========================================================================
# Create a simplified representation of the Python AST for help with
# source to source translation.
from __future__ import print_function
import ast, _a... |
saurabh6790/omnisys-app | refs/heads/master | patches/may_2013/p05_update_cancelled_gl_entries.py | 30 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cint
def execute():
aii_enabled = cint(webnotes.defaults.get_global_default("auto_accounting_for_stock")... |
teslaji/homebase | refs/heads/master | venv/HomeBase/lib/python3.5/site-packages/wheel/archive.py | 239 | """
Archive tools for wheel.
"""
import logging
import os.path
import zipfile
log = logging.getLogger("wheel")
def archive_wheelfile(base_name, base_dir):
'''Archive all files under `base_dir` in a whl file and name it like
`base_name`.
'''
olddir = os.path.abspath(os.curdir)
base_name = os.path... |
reinhrst/panda | refs/heads/master | usr/lib/python2.7/shutil.py | 32 | """Utility functions for copying and archiving files and directory trees.
XXX The functions here don't copy the resource fork or other metadata on Mac.
"""
import os
import sys
import stat
from os.path import abspath
import fnmatch
import collections
import errno
try:
from pwd import getpwnam
except ImportError... |
zephyrplugins/zephyr | refs/heads/master | zephyr.plugin.jython/jython2.5.2rc3/Lib/test/test_hmac.py | 10 | import hmac
import sha
import hashlib
import unittest
from test import test_support
class TestVectorsTestCase(unittest.TestCase):
def test_md5_vectors(self):
# Test the HMAC module against test vectors from the RFC.
def md5test(key, data, digest):
h = hmac.HMAC(key, data)
... |
jswope00/griffinx | refs/heads/master | common/djangoapps/enrollment/urls.py | 14 | """
URLs for the Enrollment API
"""
from django.conf import settings
from django.conf.urls import patterns, url
from .views import (
EnrollmentView,
EnrollmentListView,
EnrollmentCourseDetailView
)
USER_PATTERN = '(?P<user>[\w.@+-]+)'
urlpatterns = patterns(
'enrollment.views',
url(
r'^e... |
wd5/jangr | refs/heads/master | sorl/thumbnail/engines/pgmagick_engine.py | 11 | from pgmagick import Blob, ColorspaceType, Geometry, Image, ImageType
from pgmagick import InterlaceType, OrientationType
from sorl.thumbnail.engines.base import EngineBase
try:
from pgmagick._pgmagick import get_blob_data
except ImportError:
from base64 import b64decode
def get_blob_data(blob):
re... |
devinbalkind/eden | refs/heads/master | tests/unit_tests/modules/s3/s3gis/WFSLayer.py | 43 |
s3gis_tests = load_module("tests.unit_tests.modules.s3.s3gis")
def test_WFSLayer():
s3gis_tests.layer_test(
db,
db.gis_layer_wfs,
dict(
name = "Test WFS",
description = "Test WFS layer",
enabled = True,
created_on = datetime.datetime.now(),
... |
sebastien-forestier/explaupoppydiva | refs/heads/master | scripts/cogsci2016/analysis_mvt.py | 1 | import numpy as np
import matplotlib.pylab as plt
from explaupoppydiva.environment.cogsci2016 import CogSci2016Environment
env_cfg = dict(
max_params=[500, 500, 500, 500, 500, 500, 500, 500, 1, 1, 1, 1],
gui=True)
env = CogSci2016Environment(**env_cfg)
m = [0.02]*12
# m = [ 0.489816... |
zenefits/sentry | refs/heads/master | src/sentry/utils/db.py | 10 | """
sentry.utils.db
~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import six
from django.conf import settings
from django.db import connections, DEFAULT_DB_ALIAS
from django.db.models... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.