repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
lancezlin/pyjs | refs/heads/master | examples/treeitemcheckbox/TreeItemTest.py | 6 | # Copyright (C) 2011 Vsevolod Fedorov <vsevolod.fedorov@gmail.com>
# License: Apache2
# demonstrates issue #628 http://code.google.com/p/pyjamas/issues/detail?id=638
import pyjd # this is dummy in pyjs.
from pyjamas import Window
from pyjamas.ui.Tree import Tree
from pyjamas.ui.TreeItem import TreeItem
from pyjamas.ui... |
171121130/SWI | refs/heads/master | venv/Lib/encodings/cp865.py | 272 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP865.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors='strict'):
... |
ondrejmular/pcs | refs/heads/master | pcs_test/tier0/lib/commands/tag/test_tag_update.py | 3 | from unittest import TestCase
from pcs.common import reports
from pcs.lib.commands import tag as cmd_tag
from pcs_test.tier0.lib.commands.tag.tag_common import (
fixture_resouces_for_reference_ids,
fixture_tags_xml,
)
from pcs_test.tools import fixture
from pcs_test.tools.command_env import get_env_tools
# T... |
anentropic/django-exclusivebooleanfield | refs/heads/master | tests/py26-dj13_testproject/settings.py | 4 | # Django settings for dj13_testproject project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'test.db', # Or path to database file if usin... |
PinkInk/esp32 | refs/heads/master | lib/main.py | 1 | import machine, ssd1306
d = ssd1306.SSD1306(machine.I2C(scl=machine.Pin(4), sda=machine.Pin(5))) |
aagm/gfw-api | refs/heads/master | lib/ee_/imagecollection.py | 5 | """Representation for an Earth Engine ImageCollection."""
# Using lowercase function naming to match the JavaScript names.
# pylint: disable=g-bad-name
import apifunction
import collection
import computedobject
import ee_exception
import ee_types
import image
class ImageCollection(collection.Collection):
"""Rep... |
Kast0rTr0y/ansible | refs/heads/devel | lib/ansible/modules/storage/zfs/zfs.py | 37 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Johan Wiren <johan.wiren.se@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of th... |
chirilo/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/QueueStatusServer/model/queuepropertymixin.py | 143 | # Copyright (C) 2010 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 ... |
alexherns/biotite-scripts | refs/heads/master | taxo_table_parser.py | 1 | #!/usr/bin/env python2.7
import sys, getopt
def usage():
print '''
Useful script for extracting lines of interest from taxonomy table file as downloaded from ggkbase
Usage: taxo_table_parser.py <tab_sep_taxo_table> <options>
-h, --help Print this help dialog
<ARGUMENTS>
--min_gc=<float> Default 0
--max... |
xaviercobain88/framework-python | refs/heads/master | build/lib.linux-i686-2.7/openerp/addons/sale_order_dates/sale_order_dates.py | 47 | # -*- 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... |
0sc0d3r/enigma2 | refs/heads/master | lib/python/Components/Converter/ConverterRotator.py | 68 | #
# ConverterRotator Converter for Enigma2 (ConverterRotator.py)
# Coded by vlamo (c) 2012
#
# Version: 0.1 (26.01.2012 04:05)
# Support: http://dream.altmaster.net/
#
from Converter import Converter
from Poll import Poll
from Components.Element import cached
class ConverterRotator(Poll, Converter, object):
"""Stati... |
gibxxi/nzbToMedia | refs/heads/master | libs/unidecode/x0c0.py | 253 | data = (
'bbweok', # 0x00
'bbweot', # 0x01
'bbweop', # 0x02
'bbweoh', # 0x03
'bbwe', # 0x04
'bbweg', # 0x05
'bbwegg', # 0x06
'bbwegs', # 0x07
'bbwen', # 0x08
'bbwenj', # 0x09
'bbwenh', # 0x0a
'bbwed', # 0x0b
'bbwel', # 0x0c
'bbwelg', # 0x0d
'bbwelm', # 0x0e
'bbwelb', # 0x... |
raildo/python-keystoneclient | refs/heads/master | keystoneclient/openstack/common/jsonutils.py | 3 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
#... |
ekwoodrich/nirha | refs/heads/master | nirhalib/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/hebrewprober.py | 2928 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#... |
Perkville/django-autocomplete-light | refs/heads/v2 | test_project/select2_generic_m2m/test_functional.py | 3 | from dal.test import case, stories
from dal_select2.test import Select2Story
from .models import TestModel
class AdminGenericM2MBase(object):
field_name = 'test'
inline_related_name = 'inline_test_models'
def setUp(self):
super(AdminGenericM2MBase, self).setUp()
self.get(url=self.get_mo... |
wberrier/meson | refs/heads/master | test cases/windows/8 msvc dll versioning/copyfile.py | 100 | #!/usr/bin/env python3
import sys
import shutil
shutil.copyfile(sys.argv[1], sys.argv[2])
|
technologiescollege/Blockly-rduino-communication | refs/heads/master | scripts_XP/Lib/site-packages/jinja2/constants.py | 220 | # -*- coding: utf-8 -*-
"""
jinja.constants
~~~~~~~~~~~~~~~
Various constants.
:copyright: (c) 2017 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
#: list of lorem ipsum words used by the lipsum() helper function
LOREM_IPSUM_WORDS = u'''\
a ac accumsan ad adipiscing aenean a... |
cuker/python-usps | refs/heads/master | usps/addressinformation/base.py | 1 | '''
See http://www.usps.com/webtools/htm/Address-Information.htm for complete documentation of the API
'''
import urllib, urllib2
try:
from xml.etree import ElementTree as ET
except ImportError:
from elementtree import ElementTree as ET
def utf8urlencode(data):
ret = dict()
for key, value in data.iter... |
tensorflow/tpu | refs/heads/master | tools/dataset_profiler/__init__.py | 1 | # Copyright 2020 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
lancezlin/ml_template_py | refs/heads/master | lib/python2.7/site-packages/numpy/polynomial/chebyshev.py | 30 | """
Objects for dealing with Chebyshev series.
This module provides a number of objects (mostly functions) useful for
dealing with Chebyshev series, including a `Chebyshev` class that
encapsulates the usual arithmetic operations. (General information
on how this module represents and works with such polynomials is in... |
puttarajubr/commcare-hq | refs/heads/master | hqscripts/models.py | 7 | # This file is only here so that django will recognize that
# this is a valid app and run the associated unit tests.
|
peter1000/subuser | refs/heads/master | logic/subuserlib/classes/describable.py | 1 | #!/usr/bin/env python
# This file should be compatible with both Python 2 and 3.
# If it is not, please file a bug report.
"""
If you want to print a description of an object to standard output, make that object describable.
"""
#external imports
import abc
#internal imports
#import ...
class Describable(object):
... |
namccart/gnuradio | refs/heads/master | gr-blocks/python/blocks/qa_regenerate.py | 57 | #!/usr/bin/env python
#
# Copyright 2007,2010,2013 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 ... |
rruebner/odoo | refs/heads/master | addons/mrp/report/workcenter_load.py | 437 | # -*- 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... |
omnirom/android_external_chromium-org | refs/heads/android-5.1 | chrome/common/extensions/docs/examples/apps/hello-python/main.py | 148 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from google.appengine.api import users
from go... |
kamyu104/LeetCode | refs/heads/master | Python/remove-element.py | 2 | from __future__ import print_function
# Time: O(n)
# Space: O(1)
#
# Given an array and a value, remove all instances of that value in place and return the new length.
#
# The order of elements can be changed. It doesn't matter what you leave beyond the new length.
#
class Solution:
# @param A a list of ... |
chirilo/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/filesystem_mock.py | 122 | # Copyright (C) 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... |
Korkki/django | refs/heads/master | tests/save_delete_hooks/models.py | 409 | """
Adding hooks before/after saving and deleting
To execute arbitrary code around ``save()`` and ``delete()``, just subclass
the methods.
"""
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Person(... |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/commands/me_reckless_stimulation_3.py | 2 | import sys
from services.command import CombatCommand
def setup(core, actor, buff):
return
def run(core, actor, target, commandString):
combatSvc = core.combatService
weapon = core.objectService.getObject(actor.getWeaponId())
if not weapon:
weapon = actor.getSlottedObject('default_weapon')
command = c... |
cowlicks/dask | refs/heads/master | dask/dataframe/tests/test_categorical.py | 1 | import pandas as pd
import pandas.util.testing as tm
import pytest
import dask
from dask.async import get_sync
import dask.dataframe as dd
from dask.dataframe.utils import make_meta
def test_categorize():
dsk = {('x', 0): pd.DataFrame({'a': ['Alice', 'Bob', 'Alice'],
'b': ['C',... |
srmagura/goodnight-lead | refs/heads/master | gl_site/migrations/0014_dashboardtext.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import ckeditor.fields
class Migration(migrations.Migration):
dependencies = [
('gl_site', '0013_siteconfig'),
]
operations = [
migrations.CreateModel(
name='DashboardTex... |
OBA-code/tgstation | refs/heads/master | tools/midi2piano/midi/midi.py | 102 | #! /usr/bin/python3
# unsupported 20091104 ...
# ['set_sequence_number', dtime, sequence]
# ['raw_data', dtime, raw]
r'''
This module offers functions: concatenate_scores(), grep(),
merge_scores(), mix_scores(), midi2opus(), midi2score(), opus2midi(),
opus2score(), play_score(), score2midi(), score2opus(), sco... |
droveio/drove | refs/heads/master | doc/source/conf.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# drove.io documentation build configuration file, created by
# sphinx-quickstart on Thu Nov 13 12:16:47 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# a... |
noam09/deluge-telegramer | refs/heads/master | telegramer/include/libfuturize/fixes/fix_division.py | 11 | """
UNFINISHED
For the ``future`` package.
Adds this import line:
from __future__ import division
at the top so the code runs identically on Py3 and Py2.6/2.7
"""
from libpasteurize.fixes.fix_division import FixDivision
|
wiltonlazary/arangodb | refs/heads/devel | 3rdParty/V8/V8-5.0.71.39/build/gyp/test/win/gyptest-link-pdb.py | 181 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that the 'ProgramDatabaseFile' attribute in VCLinker is extracted
properly.
"""
import TestGyp
import os
import sys
if sys.... |
40223226/2015cdbg8 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/decimal.py | 623 | # Copyright (c) 2004 Python Software Foundation.
# All rights reserved.
# Written by Eric Price <eprice at tjhsst.edu>
# and Facundo Batista <facundo at taniquetil.com.ar>
# and Raymond Hettinger <python at rcn.com>
# and Aahz <aahz at pobox.com>
# and Tim Peters
# This module should be kept in sync with ... |
dominikl/openmicroscopy | refs/heads/develop | components/tools/test_setup.py | 14 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
PyTest command class
setup.py files in each package should include a cmdclass mapping
from "test" to PyTest.
Copyright 2007-2013 Glencoe Software, Inc. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
"""
import os
import s... |
momm3/WelcomeBot | refs/heads/master | welcomebot/Lib/site-packages/urllib3/util/url.py | 203 | from __future__ import absolute_import
from collections import namedtuple
from ..exceptions import LocationParseError
url_attrs = ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment']
# We only want to normalize urls with an HTTP(S) scheme.
# urllib3 infers URLs without a scheme (None) to be http.
NORMALI... |
tuhangdi/django | refs/heads/master | tests/template_tests/filter_tests/test_rjust.py | 521 | from django.template.defaultfilters import rjust
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class RjustTests(SimpleTestCase):
@setup({'rjust01': '{% autoescape off %}.{{ a|rjust:"5" }}. .{{ b|rjust:"5" }}.{% endautoescape %}'})
def test_rju... |
leviroth/praw | refs/heads/master | tests/unit/models/reddit/test_redditor.py | 1 | import pickle
import pytest
from praw.models import Redditor
from ... import UnitTest
class TestRedditor(UnitTest):
def test_equality(self):
redditor1 = Redditor(self.reddit, _data={"name": "dummy1", "n": 1})
redditor2 = Redditor(self.reddit, _data={"name": "Dummy1", "n": 2})
redditor3 =... |
alirizakeles/zato | refs/heads/dsuch-f-gh723-add-exe-agent | code/alembic/versions/0018_ed18fc6a_gh284_smtp.py | 7 | """gh284 smtp
Revision ID: 0018_ed18fc6a
Revises: 0017_7baa0602
Create Date: 2014-07-18 15:07:05
"""
# revision identifiers, used by Alembic.
revision = '0018_ed18fc6a'
down_revision = '0017_7baa0602'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.schema import CreateSequence, DropSequence
# Zato
f... |
Teamxrtc/webrtc-streaming-node | refs/heads/master | third_party/webrtc/src/chromium/src/tools/gyp/test/rules-rebuild/src/make-sources.py | 337 | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
assert len(sys.argv) == 4, sys.argv
(in_file, c_file, h_file) = sys.argv[1:]
def write_file(filename, contents):
open(filenam... |
jluissandovalm/lammps_smd | refs/heads/luis | lib/smd/scripts/relicense.py | 315 | # This file is part of Eigen, a lightweight C++ template library
# for linear algebra.
#
# Copyright (C) 2012 Keir Mierle <mierle@gmail.com>
#
# 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://m... |
atechnicolorskye/Freebase-Query | refs/heads/master | Freebase_Query.py | 1 | """
FreeBase_Query.py
Description
-----------
The methods Search_Instance, Topic_Instance and Get_Instance enables users to search for a specific instance of a Freebase
relation in Freebase, obtain the description and Freebase relations of a instance, and perform the previous two methods for
multiple queries with the ... |
Deltares/aqua-monitor | refs/heads/master | app/pyasn1_modules/__init__.py | 72 | # http://www.python.org/dev/peps/pep-0396/
__version__ = '0.0.8'
|
EthanBlackburn/sync-engine | refs/heads/master | inbox/api/err.py | 2 | from flask import jsonify, make_response
class APIException(Exception):
pass
class InputError(APIException):
"""Raised on invalid user input (missing required parameter, value too
long, etc.)"""
status_code = 400
def __init__(self, message):
self.message = message
class NotFoundError(... |
hdmetor/scikit-learn | refs/heads/master | examples/feature_selection/feature_selection_pipeline.py | 342 | """
==================
Pipeline Anova SVM
==================
Simple usage of Pipeline that runs successively a univariate
feature selection with anova and then a C-SVM of the selected features.
"""
print(__doc__)
from sklearn import svm
from sklearn.datasets import samples_generator
from sklearn.feature_selection imp... |
k0st1an/beetlejuice | refs/heads/master | apps/mailer/migrations/0001_initial.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-24 19:26
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Crea... |
enthought/pyside | refs/heads/master | tests/QtDeclarative/bug_951.py | 6 | from PySide.QtDeclarative import QDeclarativeItem, qmlRegisterType, QDeclarativeView
from PySide.QtCore import QUrl
from helper import adjust_filename, TimedQApplication
import unittest
class MyItem(QDeclarativeItem):
COMPONENT_COMPLETE_CALLED = False
def __init__(self,parent=None):
super(MyI... |
anhstudios/swganh | refs/heads/develop | data/scripts/templates/object/weapon/melee/sword/shared_sword_lightsaber_obi.py | 2 | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Weapon()
result.template = "object/weapon/melee/sword/shared_sword_lightsaber_obi.iff"
result.attribute_template_... |
OpusVL/odoo | refs/heads/master | addons/account_analytic_plans/report/__init__.py | 8 | # -*- 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... |
fldc/CouchPotatoServer | refs/heads/custom | libs/subliminal/services/subscenter.py | 7 | # -*- coding: utf-8 -*-
# Copyright 2012 Ofir Brukner <ofirbrukner@gmail.com>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of the ... |
dje42/gdb | refs/heads/master | gdb/testsuite/gdb.python/source2.py | 34 | # This testcase is part of GDB, the GNU debugger.
# Copyright 2008-2013 Free Software Foundation, Inc.
# 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
... |
vlinhart/django_shares_count | refs/heads/master | shares_count/admin.py | 1 | from django.contrib import admin
from shares_count.models import Share
class ShareAdmin(admin.ModelAdmin):
list_display = ('created', 'modified', 'shares', 'content_object')
admin.site.register(Share, ShareAdmin)
|
seanli9jan/tensorflow | refs/heads/master | tensorflow/compiler/tests/binary_ops_test.py | 2 | # 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... |
timj/scons | refs/heads/master | test/Exit.py | 1 | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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,
... |
EnderCheng/pyspider | refs/heads/master | tests/test_run.py | 3 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<roy@binux.me>
# http://binux.me
# Created on 2014-11-21 22:32:35
import os
import six
import json
import shutil
import unittest2 as unittest
from pyspider import run
from pyspider.libs.utils import... |
leejw51/BumblebeeNet | refs/heads/master | Test/MeanSquared.py | 1 | import numpy as np
def mean_squared_error(y,t):
return 0.5* np.sum((y-t)**2)
t = np.array( [0, 0, 1, 0,0,0, 0,0,0,0] )
y = np.array( [0.1, 0.05, 0.6, 0, 0.05, 0.1, 0, 0.1, 0,0] )
print(t)
print(y)
m = mean_squared_error(y,t)
print("t shape=", t.shape)
print("y shape=", y.shape)
print(m)
|
ludwiktrammer/odoo | refs/heads/9.0 | openerp/addons/test_assetsbundle/tests/test_assetsbundle.py | 26 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.tests import HttpCase
from openerp.tests.common import TransactionCase
from openerp.addons.base.ir.ir_qweb import AssetsBundle
from openerp.modules.module import get_resource_path
from mock import patch
fro... |
jrhege/restaq | refs/heads/master | restaq/models.py | 1 | """ The models module contains database-agnostic descriptors of collections,
collection components, and database operations
"""
import weakref
import exc
import expressions
from helpers import Lookup
class DatabaseOperation(object):
""" Generic operation to be performed against the database """
def __init... |
loop1024/pymo-global | refs/heads/master | android/pgs4a-0.9.6/python-install/lib/python2.7/distutils/msvc9compiler.py | 32 | """distutils.msvc9compiler
Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.
The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
"""
# Written by Perry Stoll
# hacked by Robin B... |
otherness-space/myProject | refs/heads/master | my_project_001/lib/python2.7/site-packages/pip/status_codes.py | 1002 | from __future__ import absolute_import
SUCCESS = 0
ERROR = 1
UNKNOWN_ERROR = 2
VIRTUALENV_NOT_FOUND = 3
PREVIOUS_BUILD_DIR_ERROR = 4
NO_MATCHES_FOUND = 23
|
rohitwaghchaure/alec_frappe5_erpnext | refs/heads/develop | erpnext/hr/doctype/expense_claim/test_expense_claim.py | 27 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
test_records = frappe.get_test_records('Expense Claim')
class TestExpenseClaim(unittest.TestCase):
def test_total_expense_claim_for_project(se... |
croxis/allegiance2 | refs/heads/master | server.py | 1 | # ## Python 3 look ahead imports ###
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from direct.directnotify.DirectNotify import DirectNotify
import spacedrive
from networking.server_net import NetworkSystem
__author... |
naousse/odoo | refs/heads/8.0 | addons/l10n_cl/__init__.py | 2120 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com).
#
# WARNING: This program as such is intended to be used by professional
# programmers who take t... |
wangxuan007/flasky | refs/heads/master | venv/lib/python2.7/site-packages/sqlalchemy/engine/__init__.py | 20 | # engine/__init__.py
# Copyright (C) 2005-2016 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""SQL connections, SQL execution and high-level DB-API interface.
The engine pa... |
slohse/ansible | refs/heads/devel | lib/ansible/modules/network/nxos/nxos_acl.py | 52 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... |
UNINETT/nav | refs/heads/master | python/nav/eventengine/plugins/maintenancestate.py | 2 | #
# Copyright (C) 2012 Uninett AS
#
# This file is part of Network Administration Visualized (NAV).
#
# NAV is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 3 as published by
# the Free Software Foundation.
#
# This program is distributed in the hope... |
wglas85/math | refs/heads/master | tests/test/mathx/tegral_tests.py | 1 | '''
Created on 19.10.2015
@author: michi
'''
import logging
import unittest
from mathx.tegral import tegral
import math
handler = logging.StreamHandler(open('/dev/stderr', 'w'))
formatter = logging.Formatter( '%(asctime)s %(levelname)s %(message)s')
handler.setFormatter(formatter)
root_logger = logging.getLogger... |
SPIhub/hummingbird | refs/heads/master | tests/test_examples.py | 2 | from test_basics import run_hummingbird
from test_imports import test_import_backend_lcls
import os, sys, warnings
__thisdir__ = os.path.dirname(os.path.realpath(__file__))
# Testing basic examples
def test_dummy_example():
run_hummingbird(conf=__thisdir__ + '/../examples/basic/dummy.py')
def test_simulation_examp... |
egenerat/gae-django | refs/heads/master | django/contrib/formtools/models.py | 13 | """ models.py (even empty) currently required by the runtests.py to enable unit tests """
|
meetsandeepan/meetsandeepan.github.io | refs/heads/master | node_modules/pygmentize-bundled/vendor/pygments/pygments/__init__.py | 269 | # -*- coding: utf-8 -*-
"""
Pygments
~~~~~~~~
Pygments is a syntax highlighting package written in Python.
It is a generic syntax highlighter for general use in all kinds of software
such as forum systems, wikis or other applications that need to prettify
source code. Highlights are:
* a ... |
go-bears/rally | refs/heads/master | rally/plugins/openstack/context/network/existing_network.py | 3 | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#... |
mancoast/CPythonPyc_test | refs/heads/master | fail/333_test_urllib.py | 24 | """Regresssion tests for urllib"""
import urllib.parse
import urllib.request
import urllib.error
import http.client
import email.message
import io
import unittest
from test import support
import os
import sys
import tempfile
from nturl2path import url2pathname, pathname2url
from base64 import b64encode
import collect... |
tensorflow/tpu | refs/heads/master | models/official/detection/dataloader/maskrcnn_parser_with_copy_paste.py | 1 | # Copyright 2019 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... |
eriser/picasso-graphic | refs/heads/master | tools/gyp/pylib/gyp/easy_xml_test.py | 2698 | #!/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.
""" Unit tests for the easy_xml.py file. """
import gyp.easy_xml as easy_xml
import unittest
import StringIO
class TestSequenceFunctions(... |
racker/service-registry | refs/heads/master | node_modules/rproxy/node_modules/cluster2/node_modules/npm/node_modules/node-gyp/gyp/test/variants/gyptest-variants.py | 240 | #!/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.
"""
Verify handling of build variants.
TODO: Right now, only the SCons generator supports this, so the
test case is SCons-specific. In pa... |
EliotBerriot/django | refs/heads/master | django/contrib/admin/templatetags/admin_list.py | 173 | from __future__ import unicode_literals
import datetime
import warnings
from django.contrib.admin.templatetags.admin_static import static
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters
from django.contrib.admin.utils import (
display_for_field, display_for_value, label_for_field, l... |
cloudtools/troposphere | refs/heads/master | tests/test_apigateway.py | 1 | import unittest
from troposphere import Join
from troposphere.apigateway import GatewayResponse, Model
class TestModel(unittest.TestCase):
def test_schema(self):
# Check with no schema
model = Model(
"schema",
RestApiId="apiid",
)
model.validate()
... |
TheWardoctor/Wardoctors-repo | refs/heads/master | script.module.nanscrapers/lib/nanscrapers/scraperplugins/mfree.py | 6 | import re
import urlparse
import requests
from BeautifulSoup import BeautifulSoup
from ..common import clean_title, random_agent
from ..scraper import Scraper
import xbmc
from nanscrapers.modules import cfscrape
class Mfree(Scraper):
domains = ['m4ufree.info']
name = "M4U"
def __init__(self):
sel... |
h4ck3rm1k3/gcc-python-plugin-1 | refs/heads/master | tests/cpychecker/refcounts/attributes/sets-exception/correct-usage/script.py | 206 | # -*- coding: utf-8 -*-
# Copyright 2011 David Malcolm <dmalcolm@redhat.com>
# Copyright 2011 Red Hat, Inc.
#
# 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 3 of the License, o... |
dimtion/jml | refs/heads/master | outputFiles/statistics/archives/ourIA/improved_closest_v2.py/0.8/5/player1.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
####################################################################################################################################################################################################################################
############################################... |
GitHublong/hue | refs/heads/master | desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf3/config.py | 56 | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2007 Søren Roug, European Environment Agency
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at you... |
hanlind/nova | refs/heads/master | nova/db/sqlalchemy/migrate_repo/versions/300_migration_context.py | 44 | # 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... |
Esri/utilities-solution-data-automation | refs/heads/master | solutionreporttools/csvexport.py | 1 | """
@author: ArcGIS for Gas Utilities
@contact: ArcGISTeamUtilities@esri.com
@company: Esri
@version: 1.0
@description: Class is used to export a feature into CSV using field alias
@requirements: Python 2.7.x, ArcGIS 10.2
@copyright: Esri, 2015
@original source of script is from http://m... |
CloudBoltSoftware/cloudbolt-forge | refs/heads/master | actions/cloudbolt_plugins/sample_set_group_by_datastore/set_group_by_datastore.py | 1 | """
An example CloudBolt post-sync-vms hook script that sets the group on newly
synced servers that are on the associated datastore.
To use, first create a parameter for the group with a name that matches the
GROUP_DATASTORE_REGEX_CF value below. The term CF used throughout stands for
Custom Field, which is the same a... |
yl565/statsmodels | refs/heads/master | statsmodels/tsa/tests/test_ar.py | 1 | """
Test AR Model
"""
import statsmodels.api as sm
from statsmodels.compat.python import range
from statsmodels.tsa.ar_model import AR
from numpy.testing import (assert_almost_equal, assert_allclose, assert_)
from statsmodels.tools.testing import assert_equal
from .results import results_ar
import numpy as np
import nu... |
40023154/2015cd_midterm2 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/_sre.py | 622 | # NOT_RPYTHON
"""
A pure Python reimplementation of the _sre module from CPython 2.4
Copyright 2005 Nik Haldimann, licensed under the MIT license
This code is based on material licensed under CNRI's Python 1.6 license and
copyrighted by: Copyright (c) 1997-2001 by Secret Labs AB
"""
MAXREPEAT = 2147483648
#import ar... |
Eagles2F/sync-engine | refs/heads/master | migrations/versions/017_haspublicid.py | 11 | """HasPublicID
Revision ID: 2c9f3a06de09
Revises: 5093433b073
Create Date: 2014-04-26 04:05:57.715053
"""
from __future__ import division
# revision identifiers, used by Alembic.
revision = '2c9f3a06de09'
down_revision = '5093433b073'
import sys
from gc import collect as garbage_collect
from alembic import op
imp... |
d40223223/2015cdbg6-40223223 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/base.py | 603 | #!/usr/bin/env python
## https://bitbucket.org/pygame/pygame/raw/2383b8ab0e2273bc83c545ab9c18fee1f3459c64/pygame/base.py
'''Pygame core routines
Contains the core routines that are used by the rest of the
pygame modules. Its routines are merged directly into the pygame
namespace. This mainly includes the auto-initia... |
erasilva/namebench | refs/heads/master | nb_third_party/jinja2/utils.py | 189 | # -*- coding: utf-8 -*-
"""
jinja2.utils
~~~~~~~~~~~~
Utility functions.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import re
import sys
import errno
try:
from thread import allocate_lock
except ImportError:
from dummy_thread import allocate_lo... |
Entropy512/kernel_n8013_ics | refs/heads/master | scripts/tracing/draw_functrace.py | 14679 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... |
ryandxter/SM-G900H_KK_Opensource_Update3 | refs/heads/master | scripts/tracing/draw_functrace.py | 14679 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... |
ninotoshi/tensorflow | refs/heads/master | tensorflow/contrib/distributions/python/kernel_tests/gaussian_conjugate_posteriors_test.py | 5 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
WilliamRen/oceanbase | refs/heads/master | oceanbase_0.4/tests/mergeserver/olap/distribute_range.py | 13 | #!/usr/bin/env python
import os
import sys
import re
import optparse
import textwrap
import shutil
import time
from optparse import OptionParser
def main():
parser = OptionParser()
parser.add_option("-f", "--file", action="store", dest = "range_file", help = "input range file")
parser.add_option("-o", "--out... |
vizual54/MissionPlanner | refs/heads/master | Lib/lib2to3/fixes/__init__.py | 201 | # Dummy file to make this directory a package.
|
miroag/mfs | refs/heads/master | tests/test_navsource.py | 1 | import pytest
from mfs.navsource import NavSourceScraper
def test_model_wrong_url():
with pytest.raises(AttributeError):
scraper = NavSourceScraper('very wrong url') # noqa
def test_live_navsource():
scraper = NavSourceScraper('http://www.navsource.narod.ru/photos/02/020/index.html').scan()
a... |
xome4ok/vkbackup | refs/heads/master | vkbackup/html_backup.py | 1 | from datetime import datetime
import os
from jinja2 import Environment, PackageLoader, select_autoescape
from typing import List, Dict
def html_repr(msgs: List[Dict], participants: Dict) -> List[Dict]:
"""Html representation of conversation.
:param msgs: messages list
:param participants: participants d... |
wallarelvo/TopoPRM | refs/heads/master | tvd/postman.py | 2 | #!/usr/bin/env python2.7
import networkx as nx
__author__ = 'Ralf Kistner'
def pairs(lst, circular=False):
i = iter(lst)
first = prev = item = i.next()
for item in i:
yield prev, item
prev = item
if circular:
yield item, first
def graph_components(graph):
components = li... |
pcastanha/frame | refs/heads/master | src/softframe/database/__init__.py | 1 | from .connection import DatabaseConnector
__all__ = ['DatabaseConnector']
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.