repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
hernanramirez/venezuela | refs/heads/master | venezuela_project/estados_app/views.py | 6445 | from django.shortcuts import render
# Create your views here.
|
djenniex/CouchPotatoServer | refs/heads/master | libs/requests/models.py | 69 | # -*- coding: utf-8 -*-
"""
requests.models
~~~~~~~~~~~~~~~
This module contains the primary objects that power Requests.
"""
import collections
import datetime
from io import BytesIO, UnsupportedOperation
from .hooks import default_hooks
from .structures import CaseInsensitiveDict
from .auth import HTTPBasicAuth
... |
SK-Yang/peepdf | refs/heads/master | ccitt.py | 43 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ccitt.py
TODO
http://tools.ietf.org/pdf/rfc804.pdf
http://code.google.com/p/origami-pdf/source/browse/lib/origami/filters/ccitt.rb
"""
__author__ = 'Binjo'
__version__ = '0.1'
__date__ = '2012-04-08 14:30:05'
class BitWriterException(Exception):
pass
class B... |
webuildcity/wbc | refs/heads/master | wbc/process/migrations/0001_initial.py | 2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('region', '__first__'),
]
operations = [
migrations.CreateModel(
name='Place',
fields=[
... |
lzw120/django | refs/heads/master | django/db/models/sql/aggregates.py | 195 | """
Classes to represent the default SQL aggregate functions
"""
from django.db.models.fields import IntegerField, FloatField
# Fake fields used to identify aggregate types in data-conversion operations.
ordinal_aggregate_field = IntegerField()
computed_aggregate_field = FloatField()
class Aggregate(object):
"""... |
yodalee/servo | refs/heads/master | tests/jquery/run_jquery.py | 215 | #!/usr/bin/env python
# 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 os
import re
import subprocess
import sys
import BaseHTTPServer
import SimpleHTTPServer
im... |
akhmadMizkat/odoo | refs/heads/master | addons/website_event_questions/report/__init__.py | 75 | # -*- coding: utf-8 -*-
import report_event_registrations_questions
|
jaimeMF/youtube-dl | refs/heads/master | youtube_dl/extractor/viewster.py | 15 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
compat_HTTPError,
compat_urllib_parse,
compat_urllib_parse_unquote,
)
from ..utils import (
determine_ext,
ExtractorError,
int_or_none,
parse_iso8601,
sanitized_Request,
... |
Kazade/NeHe-Website | refs/heads/master | google_appengine/lib/django-1.2/django/contrib/gis/db/backends/postgis/creation.py | 308 | from django.conf import settings
from django.db.backends.postgresql.creation import DatabaseCreation
class PostGISCreation(DatabaseCreation):
geom_index_type = 'GIST'
geom_index_opts = 'GIST_GEOMETRY_OPS'
def sql_indexes_for_field(self, model, f, style):
"Return any spatial index creation SQL for ... |
rbaindourov/v8-inspector | refs/heads/master | Source/chrome/tools/gyp/test/win/gyptest-link-aslr.py | 344 | #!/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.
"""
Make sure aslr setting is extracted properly.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = TestGyp.TestGyp(form... |
meissnert/StarCluster-Plugins | refs/heads/master | STARFUSION_0_8.py | 1 | from starcluster.clustersetup import ClusterSetup
from starcluster.logger import log
class STARFUSIONInstaller(ClusterSetup):
def run(self, nodes, master, user, user_shell, volumes):
for node in nodes:
log.info("Installing STAR-FUSION 0.8 on %s" % (node.alias))
node.ssh.execute('wget -c -P /opt/software/star-... |
starbucks2010/N915F_kernel_permissive | refs/heads/master | tools/perf/scripts/python/netdev-times.py | 11271 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... |
samboiki/smap-data | refs/heads/master | python/smap/drivers/modbus.py | 4 | """
Copyright (c) 2011, 2012, Regents of the University of California
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 l... |
spreeker/democracygame | refs/heads/master | external_apps/docutils-snapshot/test/test_parsers/test_rst/test_block_quotes.py | 19 | #! /usr/bin/env python
# $Id: test_block_quotes.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
Tests for states.py.
"""
from __init__ import DocutilsTestSupport
def suite():
s = DocutilsTestSupport.ParserTest... |
ehigh2014/esp_iot_rtos_sdk | refs/heads/master | tools/gen_appbin.py | 18 | #!/usr/bin/python
#
# File : gen_appbin.py
# This file is part of Espressif's generate bin script.
# Copyright (C) 2013 - 2016, Espressif Systems
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of version 3 of the GNU General Public License as
# published by the Free Softwa... |
clavery/selenium | refs/heads/master | py/selenium/webdriver/firefox/service.py | 27 | #!/usr/bin/python
#
# Copyright 2011 Webdriver_name committers
# Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... |
Spleen64/Sick-Beard | refs/heads/master | sickbeard/notifiers/prowl.py | 49 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 Lice... |
upeu-jul-20161-epis-ads2/MedicFast | refs/heads/master | apps/params/migrations/0001_initial.py | 4 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Person',
fields=[
('id', models.AutoField(verbo... |
KJin99/zulip | refs/heads/master | zilencer/management/commands/create_deployment.py | 115 | from __future__ import absolute_import
from optparse import make_option
import sys
from django.core.management.base import BaseCommand
from zerver.models import get_realm
from zerver.lib.create_user import random_api_key
from zerver.management.commands.create_realm import Command as CreateRealm
from zilencer.models ... |
alu0100207385/dsi_3Django | refs/heads/master | build/lib.linux-i686-2.7/django/contrib/humanize/templatetags/humanize.py | 98 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import re
from datetime import date, datetime
from decimal import Decimal
from django import template
from django.conf import settings
from django.template import defaultfilters
from django.utils.encoding import force_text
from django.utils.formats imp... |
poolio/thunder | refs/heads/master | thunder/extraction/block/base.py | 7 | from thunder.extraction.extraction import SourceExtractionMethod
from thunder.rdds.images import Images
from thunder.rdds.imgblocks.blocks import Blocks, PaddedBlocks
class BlockMethod(SourceExtractionMethod):
"""
Extract sources from spatiotemporal data by independently processing blocks.
A block method... |
KiChjang/servo | refs/heads/master | tests/wpt/webgl/tests/deqp/functional/gles3/shaderindexing/shaderindexing_test_generator.py | 51 | #!/usr/bin/env python
# Copyright (c) 2016 The Khronos Group Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and/or associated documentation files (the
# "Materials"), to deal in the Materials without restriction, including
# without limitation the rights to use... |
dkubiak789/OpenUpgrade | refs/heads/8.0 | addons/l10n_mx/__init__.py | 975 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
#... |
ericfc/django | refs/heads/master | django/core/serializers/python.py | 140 | """
A Python "serializer". Doesn't do much serializing per se -- just converts to
and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for
other serializers.
"""
from __future__ import unicode_literals
from collections import OrderedDict
from django.apps import apps
from django.conf impor... |
Instanssi/effectserver | refs/heads/master | examples/python.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Yksinkertainen UDP-paketti Instanssin valojen ohjailuun Pythonilla.
UDP-paketti koostuu speksin versiosta, nick-tagista sekä yhdestä tai
useammasta tehostekäskystä.
Tämä ei ole mitenkään Python spesifinen tapa toteuttaa valojen ohjausta.
Vastaava onnistuu aivan yhtä hel... |
kosgroup/odoo | refs/heads/10.0 | addons/mrp/models/mrp_unbuild.py | 2 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class MrpUnbuild(models.Model):
_name = "mrp.unbuild"
_description = "Unbuild Order"
_inherit = ['mail.thread']
_order = 'id... |
Gchorba/Ask | refs/heads/master | lib/python2.7/site-packages/gunicorn/workers/gaiohttp.py | 101 | # -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
import sys
if sys.version_info >= (3, 3):
try:
import aiohttp # NOQA
except ImportError:
raise RuntimeError("You need aiohttp installed to use this worker.")
else... |
kaka19ace/kkutil | refs/heads/master | kkutil/config/__init__.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
from .config import Config
|
total-impact/depsy | refs/heads/master | scripts/github_users.py | 3 | __author__ = 'jay'
from pathlib import Path
import os
import json
import requests
data_dir = Path(__file__, "../../data").resolve()
usernames_path = Path(data_dir, "github_usernames.json")
users_path = Path(data_dir, "github_users.json")
users_url_template = "https://api.github.com/users/%s"
class RateLimitExceptio... |
HydPy/HydPy-meetups | refs/heads/master | 2016/2016-10-22/Example/decorator_example.py | 1 |
def tag(x):
def trace(f):
print 'x',x
def inner(*args):
print 'func f called {0} args'.format(args)
for arg in args:
if not isinstance(arg, int):
raise TypeError('All the values should be Integer type')
result = f(*args)
print 'result'... |
t11e/django | refs/heads/master | django/contrib/gis/tests/geoapp/test_sitemaps.py | 35 | import unittest, zipfile, cStringIO
from xml.dom import minidom
from django.test import Client
from models import City, Country
class GeoSitemapTest(unittest.TestCase):
client = Client()
def assertChildNodes(self, elem, expected):
"Taken from regressiontests/syndication/tests.py."
actual = se... |
RDCH106/linearizator | refs/heads/master | linearizator/__init__.py | 1 | # -*- coding: utf-8 -*-
from . import linearizator
class Metadata:
def __init__(self):
self.__version__ = '0.1.1'
self.__author__ = 'Rubén de Celis Hernández'
def get_version(self):
return self.__version__
def get_author(self):
return self.__author__ |
boompieman/iim_project | refs/heads/master | project_python2/lib/python2.7/site-packages/nbconvert/writers/tests/test_debug.py | 12 | """
Module with tests for debug
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#---------... |
mrnamingo/vix4-34-enigma2-mips | refs/heads/master | lib/python/Tools/LoadPixmap.py | 118 | from enigma import loadPNG, loadJPG
def LoadPixmap(path, desktop = None, cached = False):
if path[-4:] == ".png":
ptr = loadPNG(path)
elif path[-4:] == ".jpg":
ptr = loadJPG(path)
elif path[-1:] == ".":
alpha = loadPNG(path + "a.png")
ptr = loadJPG(path + "rgb.jpg", alpha)
else:
raise Exception("neither ... |
bjvoth/oppia | refs/heads/develop | core/domain/exp_domain_test.py | 9 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... |
aitormendez/iconos-506 | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py | 2354 | # Unmodified from http://code.activestate.com/recipes/576693/
# other than to add MIT license header (as specified on page, but not in code).
# Linked from Python documentation here:
# http://docs.python.org/2/library/collections.html#collections.OrderedDict
#
# This should be deleted once Py2.7 is available on all bot... |
jondo/shogun | refs/heads/develop | src/shogun/base/class_list.cpp.py | 11 | #!/usr/bin/env python
# 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.
#
# Written (W) 2008-2009 Soeren Sonnenburg
# Cop... |
keulraesik/pyelftools | refs/heads/master | elftools/dwarf/lineprogram.py | 9 | #-------------------------------------------------------------------------------
# elftools: dwarf/lineprogram.py
#
# DWARF line number program
#
# Eli Bendersky (eliben@gmail.com)
# This code is in the public domain
#-------------------------------------------------------------------------------
import os
import copy
... |
rrrrrr8/vnpy | refs/heads/master | vnpy/api/fcoin/vnfcoin.py | 1 | # encoding: UTF-8
from __future__ import print_function
import hashlib
import hmac
import json
import ssl
import traceback
import base64
from queue import Queue, Empty
from multiprocessing.dummy import Pool
from time import time
from urlparse import urlparse
from copy import copy
from urllib import urlencode
from thr... |
gagoncal/Selenium | refs/heads/master | Selenium with python/Selenium_with_python_config_files/setuptools-12.0.1/setup.py | 1 | #!/usr/bin/env python
"""Distutils setup file, used to install or test 'setuptools'"""
import io
import os
import sys
import textwrap
# Allow to run setup.py from another directory.
os.chdir(os.path.dirname(os.path.abspath(__file__)))
src_root = None
from distutils.util import convert_path
command_ns = {}
init_path... |
dou800/php-buildpack-legacy | refs/heads/master | builds/runtimes/python-2.7.6/lib/python2.7/test/test_weakref.py | 46 | import gc
import sys
import unittest
import UserList
import weakref
import operator
from test import test_support
# Used in ReferencesTestCase.test_ref_created_during_del() .
ref_from_del = None
class C:
def method(self):
pass
class Callable:
bar = None
def __call__(self, x):
self.bar ... |
yurychu/business_manager | refs/heads/master | business_manager/profiles/apps.py | 28 | from django.apps import AppConfig
class ProfilesConfig(AppConfig):
name = 'profiles'
|
louietsai/python-for-android | refs/heads/master | python-modules/twisted/twisted/test/reflect_helper_IE.py | 120 |
# Helper for a test_reflect test
import idonotexist
|
luzeduardo/antonov225 | refs/heads/master | flyer/flyerapp/urls.py | 1 | __author__ = 'eduardoluz'
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns = patterns('',
# url( r'^/?$', 'flyerapp.views.index_view', name='home' ),
url(r'^$', 'flyerapp.views.index', name='home'), # NOQA
url(r'^edit/', 'f... |
zenn1989/scoria-interlude | refs/heads/master | L2Jscoria-Game/data/scripts/quests/408_PathToElvenwizard/__init__.py | 1 | # Maked by Mr. Have fun! Version 0.2
# Shadow Weapon Coupons contributed by BiTi for the Official L2J Datapack Project
# Visit http://forum.l2jdp.com for more details
import sys
from com.l2scoria.gameserver.model.quest import State
from com.l2scoria.gameserver.model.quest import QuestState
from com.l2scoria.gameserver.... |
yanheven/python_koans | refs/heads/master | python2/runner/path_to_enlightenment.py | 75 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# The path to enlightenment starts with the following:
import unittest
from koans.about_asserts import AboutAsserts
from koans.about_strings import AboutStrings
from koans.about_none import AboutNone
from koans.about_lists import AboutLists
from koans.about_list_assignme... |
halberom/ansible | refs/heads/devel | lib/ansible/modules/cloud/rackspace/rax_files_objects.py | 50 | #!/usr/bin/python
# (c) 2013, Paul Durivage <paul.durivage@rackspace.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
# (a... |
RPGOne/Skynet | refs/heads/Miho | scikit-learn-c604ac39ad0e5b066d964df3e8f31ba7ebda1e0e/examples/covariance/plot_outlier_detection.py | 14 | """
==========================================
Outlier detection with several methods.
==========================================
When the amount of contamination is known, this example illustrates two
different ways of performing :ref:`outlier_detection`:
- based on a robust estimator of covariance, which is assumin... |
JackDandy/SickGear | refs/heads/master | lib/hachoir_py2/parser/guess.py | 2 | """
Parser list managment:
- createParser() find the best parser for a file.
"""
import os
from hachoir_py2.core.error import warning, info
from hachoir_py2.parser import ValidateError, HachoirParserList
from hachoir_py2.stream import FileInputStream
from hachoir_py2.core.i18n import _
import weakref
class QueryPars... |
ViktorMarinov/get-a-room | refs/heads/master | get_a_room/accounts/test_models.py | 1 | from accounts.models import User
from django.test import TestCase
class UserTests(TestCase):
def test_create_user(self):
User.objects.create_user(username='test1', password='test1')
self.assertIsNotNone(User.objects.get(username='test1'))
def test_adding_user_to_student_group(self):
... |
henriknacka/p2pool-xiv | refs/heads/master | p2pool/test/test_node.py | 198 | from __future__ import division
import base64
import random
import tempfile
from twisted.internet import defer, reactor
from twisted.python import failure
from twisted.trial import unittest
from twisted.web import client, resource, server
from p2pool import data, node, work
from p2pool.bitcoin import data as bitcoin... |
albertomurillo/ansible | refs/heads/devel | lib/ansible/modules/network/panos/_panos_check.py | 41 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage PaloAltoNetworks Firewall
# (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish... |
codesparkle/youtube-dl | refs/heads/master | youtube_dl/extractor/hgtv.py | 13 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
int_or_none,
js_to_json,
smuggle_url,
)
class HGTVIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?hgtv\.ca/[^/]+/video/(?P<id>[^/]+)/video.html'
_TEST = {
'url': 'http://ww... |
wfxiang08/django185 | refs/heads/master | django/contrib/gis/db/models/__init__.py | 110 | from django.core.exceptions import ImproperlyConfigured
# Want to get everything from the 'normal' models package.
from django.db.models import * # NOQA
from django.utils.version import get_docs_version
from django.contrib.gis.geos import HAS_GEOS
if not HAS_GEOS:
raise ImproperlyConfigured(
"GEOS is re... |
jlegendary/servo | refs/heads/master | tests/wpt/web-platform-tests/XMLHttpRequest/resources/inspect-headers.py | 187 | def main(request, response):
headers = []
if "cors" in request.GET:
headers.append(("Access-Control-Allow-Origin", "*"))
headers.append(("Access-Control-Allow-Credentials", "true"))
headers.append(("Access-Control-Allow-Methods", "GET, POST, PUT, FOO"))
headers.append(("Access-Co... |
VRciF/springy | refs/heads/master | src/node_modules/node-ninja/gyp/pylib/gyp/generator/msvs_test.py | 2687 | #!/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.
""" Unit tests for the msvs.py file. """
import gyp.generator.msvs as msvs
import unittest
import StringIO
class TestSequenceFunctions(uni... |
tlecomte/friture | refs/heads/master | sandbox/2dpainting.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
############################################################################
##
## Copyright (C) 2006-2006 Trolltech ASA. All rights reserved.
##
## This file is part of the example classes of the Qt Toolkit.
##
## This file may be used under the terms of the GNU General P... |
chriskmanx/qmole | refs/heads/master | QMOLEDEV/boost_1_49_0/tools/build/v2/test/alias.py | 20 | #!/usr/bin/python
# Copyright 2003 Dave Abrahams
# Copyright 2003 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
import BoostBuild
###########################################################################... |
tealover/nova | refs/heads/master | nova/api/openstack/compute/schemas/v3/attach_interfaces.py | 81 | # Copyright 2014 NEC Corporation. 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 ... |
lukeweber/gyp-override | refs/heads/master | test/toplevel-dir/gyptest-toplevel-dir.py | 249 | #!/usr/bin/env python
# Copyright (c) 2009 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 building a subsidiary dependent target from a .gyp file in a
subdirectory, without specifying an explicit output build director... |
queid7/hma | refs/heads/master | modules/ys_gui/seSimpleViewer.py | 1 | from fltk import *
import sys
if '..' not in sys.path:
sys.path.append('..')
import Motion.ysMotion as ym
import GUI.ysBaseUI as ybu
import GUI.seViewer3 as yv3
import GUI.tree as tree
import Mesh.ysMesh as yms
# EVENTS
EV_addRenderer = 0
EV_setRendererVisible = 1
EV_addObject = 2
EV_sele... |
albertrdixon/CouchPotatoServer | refs/heads/master | libs/pyutil/test/current/test_assertutil.py | 106 | #!/usr/bin/env python
# Copyright (c) 2002-2009 Zooko Wilcox-O'Hearn
# portions Copyright (c) 2001 Autonomous Zone Industries
# This file is part of pyutil; see README.rst for licensing terms.
# Python Standard Library modules
import unittest
from pyutil import assertutil
class Testy(unittest.TestCase):
def ... |
cro-ki/pypog | refs/heads/master | tests/test_grid.py | 2 | '''
** By Cro-Ki l@b, 2017 **
'''
import unittest
from pypog.geometry_objects import SquareGeometry, FHexGeometry, BoundingRect
from pypog.grid_objects import BaseGrid, SquareGrid, FHexGrid
class Test(unittest.TestCase):
def assertObjEquals(self, obj1, obj2):
self.assertEqual(obj1.__dict__, obj2.__... |
Metaswitch/calico-nova | refs/heads/calico-readme | nova/api/openstack/compute/contrib/flavor_swap.py | 79 | # Copyright 2012 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... |
1haodian/spark | refs/heads/master | python/pyspark/__init__.py | 31 | #
# 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 us... |
Changaco/oh-mainline | refs/heads/master | vendor/packages/Django/tests/regressiontests/urlpatterns_reverse/included_urls.py | 150 | from __future__ import absolute_import
from django.conf.urls import patterns, url
from .views import empty_view
urlpatterns = patterns('',
url(r'^$', empty_view, name="inner-nothing"),
url(r'^extra/(?P<extra>\w+)/$', empty_view, name="inner-extra"),
url(r'^(?P<one>\d+)|(?P<two>\d+)/$', empty_view, name=... |
zetaops/SpiffWorkflow | refs/heads/master | tests/SpiffWorkflow/bpmn/ParallelTest.py | 3 | # -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import, division
from __future__ import division
import unittest
import logging
import sys
from SpiffWorkflow.Task import Task
from SpiffWorkflow.bpmn.BpmnWorkflow import BpmnWorkflow
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnW... |
mropert/conan | refs/heads/develop | conans/test/command/imports_test.py | 1 | import unittest
from conans.test.utils.tools import TestClient
import os
from conans.client.importer import IMPORTS_MANIFESTS
from conans.util.files import load
from conans.model.manifest import FileTreeManifest
from conans.test.utils.test_files import temp_folder
conanfile = """
from conans import ConanFile
from con... |
azampagl/ai-ml-improved-bridgecut | refs/heads/master | dbc/src/bridgecut/versions/vertexc.py | 1 | """
Vertex Bridging Centrality.
@package bridgecut
@author Aaron Zampaglione <azampagl@my.fit.edu>
@copyright 2011 Aaron Zampaglione
@license MIT
"""
from bridgecut.core import BridgeCut
class VertexCBridgeCut(BridgeCut):
def split(self, graph, d):
"""
@see parent
"""
# Get al... |
dednal/chromium.src | refs/heads/nw12 | components/test/data/password_manager/automated_tests/environment.py | 35 | # 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.
"""The testing Environment class."""
import logging
import shutil
import sys
import time
import traceback
from xml.etree import ElementTree
from xml.sax.sax... |
Go-In/go-coup | refs/heads/master | web/index/models.py | 10644 | from django.db import models
# Create your models here.
|
MalloyPower/parsing-python | refs/heads/master | front-end/testsuite-python-lib/Python-2.3/Lib/test/test_email.py | 43 | # Copyright (C) 2001,2002 Python Software Foundation
# email package unit tests
import unittest
# The specific tests now live in Lib/email/test
from email.test.test_email import suite
from test.test_support import run_suite
def test_main():
run_suite(suite())
if __name__ == '__main__':
test_main()
|
etxc/namebench | refs/heads/master | nb_third_party/dns/exception.py | 250 | # Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... |
agry/NGECore2 | refs/heads/master | scripts/object/static/item/wp_rifle_ewok_crossbow.py | 85615 | import sys
def setup(core, object):
return |
albertomurillo/ansible | refs/heads/devel | test/units/module_utils/network/aci/test_aci.py | 22 | # -*- coding: utf-8 -*-
# Copyright 2017 Dag Wieers <dag@wieers.com>
# This file is part of Ansible by Red Hat
#
# 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
... |
benjyz/python-bitcoinlib | refs/heads/master | examples/ssl-rpc-connection.py | 7 | #!/usr/bin/env python3
# Copyright (C) 2014 The python-bitcoinlib developers
#
# This file is part of python-bitcoinlib.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-bitcoinlib, including this file, may be copied, modified,
# ... |
nickmoline/feedsanitizer | refs/heads/master | django/contrib/comments/__init__.py | 423 | from django.conf import settings
from django.core import urlresolvers
from django.core.exceptions import ImproperlyConfigured
from django.contrib.comments.models import Comment
from django.contrib.comments.forms import CommentForm
from django.utils.importlib import import_module
DEFAULT_COMMENTS_APP = 'django.contrib.... |
Matthie456/Bon_DenDuijn | refs/heads/master | SpatialDecision/external/networkx/algorithms/vitality.py | 72 | """
Vitality measures.
"""
# Copyright (C) 2012 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
__author__ = "\n".join(['Aric Hagberg (hagberg@lanl.gov)',
'Renato... |
chengdh/openerp-ktv | refs/heads/master | openerp/pychart/afm/Courier_Bold.py | 15 | # -*- coding: utf-8 -*-
# AFM font Courier-Bold (path: /usr/share/fonts/afms/adobe/pcrb8a.afm).
# Derived from Ghostscript distribution.
# Go to www.cs.wisc.edu/~ghost to get the Ghostcript source code.
import dir
dir.afm["Courier-Bold"] = (500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,... |
RedTea/gaedav | refs/heads/master | pyxml/dom/__init__.py | 4 | ########################################################################
#
# File Name: __init__.py
#
#
"""
WWW: http://4suite.org/4DOM e-mail: support@4suite.org
Copyright (c) 2000 Fourthought Inc, USA. All Rights Reserved.
See http://4suite.org/COPYRIGHT for license and copyright information
"... |
davidhax0r/Rocket | refs/heads/master | flask/lib/python2.7/site-packages/pip/commands/show.py | 344 | import os
from pip.basecommand import Command
from pip.log import logger
from pip._vendor import pkg_resources
class ShowCommand(Command):
"""Show information about one or more installed packages."""
name = 'show'
usage = """
%prog [options] <package> ..."""
summary = 'Show information about in... |
chauhanhardik/populo_2 | refs/heads/master | lms/djangoapps/certificates/migrations/0005_auto__add_field_generatedcertificate_name.py | 188 | # 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 'GeneratedCertificate.name'
db.add_column('certificates_generatedcertificate', 'name', self.gf('dj... |
remi128/vertx-apex_old | refs/heads/master | src/test/sockjs-protocol/venv/lib/python2.7/site-packages/setuptools/tests/__init__.py | 412 | """Tests for the 'setuptools' package"""
import sys
import os
import unittest
from setuptools.tests import doctest
import distutils.core
import distutils.cmd
from distutils.errors import DistutilsOptionError, DistutilsPlatformError
from distutils.errors import DistutilsSetupError
from distutils.core import Extension
fr... |
kidaa30/spacewalk | refs/heads/master | client/rhel/rhnlib/test/24-ssl-memleak.py | 21 | #!/usr/bin/python
#
#
# USAGE: $0 SERVER CERT
"""
Tests a memory leak in the applet
"""
import sys
import string
from rhn import rpclib
def main():
server_name = "xmlrpc.rhn.redhat.com"
ca_cert = "/usr/share/rhn/RHNS-CA-CERT"
try:
server_name = sys.argv[1]
ca_cert = sys.argv[2]
except... |
sktjdgns1189/android_kernel_samsung_frescolteskt | refs/heads/cm-12.1 | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... |
connoranderson/Speechables | refs/heads/master | mechanize-0.2.5/test/test_opener.py | 22 | #!/usr/bin/env python
import os
import math
import stat
import unittest
import mechanize
import mechanize._response as _response
import mechanize._sockettimeout as _sockettimeout
def killfile(filename):
try:
os.remove(filename)
except OSError:
if os.name=='nt':
try:
... |
TuSimple/mxnet | refs/heads/master | example/ssd/symbol/legacy_vgg16_ssd_512.py | 41 | # 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 u... |
bealdav/OpenUpgrade | refs/heads/8.0 | addons/point_of_sale/report/pos_order_report.py | 46 | # -*- 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... |
meabsence/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/xdrlib.py | 46 | """Implements (a subset of) Sun XDR -- eXternal Data Representation.
See: RFC 1014
"""
import struct
from io import BytesIO
__all__ = ["Error", "Packer", "Unpacker", "ConversionError"]
# exceptions
class Error(Exception):
"""Exception class for this module. Use:
except xdrlib.Error, var:
# var has... |
protwis/protwis | refs/heads/master | protein/migrations/0009_auto_20200511_1818.py | 1 | # Generated by Django 3.0.4 on 2020-05-11 16:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('protein', '0008_auto_20200422_1636'),
]
operations = [
migrations.RemoveField(
model_name='proteingproteinpair',
nam... |
shaulkf/bitcoin | refs/heads/master | qa/rpc-tests/disablewallet.py | 14 | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Exercise API with -disablewallet.
#
from test_framework.test_framework import BitcoinTestFramework
from t... |
chafique-delli/OpenUpgrade | refs/heads/master | addons/website_hr/__init__.py | 3964 | import controllers
import models
|
Maikflow/django_test | refs/heads/master | lib/python2.7/site-packages/Django-1.7.1-py2.7.egg/django/contrib/auth/tests/__init__.py | 742 | # The password for the fixture data users is 'password'
|
wuzhy/autotest | refs/heads/io_throttling | client/bin/os_dep.py | 3 | import os
"""
One day, when this module grows up, it might actually try to fix things.
'apt-cache search | apt-get install' ... or a less terrifying version of
the same. With added distro-independant pixie dust.
"""
def command(cmd):
# this could use '/usr/bin/which', I suppose. But this seems simpler
for dir... |
kevinmel2000/sl4a | refs/heads/master | python/src/Lib/plat-irix5/cddb.py | 66 | # This file implements a class which forms an interface to the .cddb
# directory that is maintained by SGI's cdman program.
#
# Usage is as follows:
#
# import readcd
# r = readcd.Readcd()
# c = Cddb(r.gettrackinfo())
#
# Now you can use c.artist, c.title and c.track[trackno] (where trackno
# starts at 1). When the CD... |
Exrik/tabell | refs/heads/master | www-src/css/libs/ionicons/builder/scripts/eotlitetool.py | 374 | #!/usr/bin/env python
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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.mozil... |
kmokstad/IFEM-2 | refs/heads/master | 3rdparty/gtest/test/gtest_xml_output_unittest.py | 336 | #!/usr/bin/env python
#
# Copyright 2006, 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... |
bitreserve/bitcoin | refs/heads/master | contrib/seeds/generate-seeds.py | 55 | #!/usr/bin/env python3
# Copyright (c) 2014-2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the dir... |
xaviercobain88/framework-python | refs/heads/master | openerp/addons/product_expiry/__init__.py | 442 | ##############################################################################
#
# 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 Affero General Publ... |
cristianquaglio/odoo | refs/heads/master | addons/auth_oauth/__openerp__.py | 300 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.