repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
TheTypoMaster/my-vim-set-mac
refs/heads/master
.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/waitress/waitress/server.py
31
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
westerhofffl/appengine-mapreduce
refs/heads/master
python/src/mapreduce/datastore_range_iterators.py
24
#!/usr/bin/env python """Helpers iterators for input_readers.DatastoreInputReader.""" # pylint: disable=g-bad-name import itertools from google.appengine.datastore import datastore_query from google.appengine.datastore import datastore_rpc from google.appengine.ext import db from google.appengine.ext import key_rang...
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Pygments-2.0.2/pygments/cmdline.py
43
# -*- coding: utf-8 -*- """ pygments.cmdline ~~~~~~~~~~~~~~~~ Command line interface. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import sys import getopt from textwrap import dedent from py...
iabdalkader/micropython
refs/heads/master
tests/float/math_isclose.py
15
# test math.isclose (appeared in Python 3.5) try: from math import isclose except ImportError: print("SKIP") raise SystemExit def test(a, b, **kwargs): print(isclose(a, b, **kwargs)) def test_combinations(a, b, **kwargs): test(a, a, **kwargs) test(a, b, **kwargs) test(b, a, **kwargs) ...
SCSSG/Odoo-SCS
refs/heads/master
addons/crm_claim/report/__init__.py
446
# -*- 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...
Jusedawg/SickRage
refs/heads/develop
lib/stevedore/example2/setup.py
32
from setuptools import setup, find_packages setup( name='stevedore-examples2', version='1.0', description='Demonstration package for stevedore', author='Doug Hellmann', author_email='doug@doughellmann.com', url='http://git.openstack.org/cgit/openstack/stevedore', classifiers=['Developme...
luistorresm/odoo
refs/heads/8.0
addons/website_report/controllers/__init__.py
7372
import main
pepetreshere/odoo
refs/heads/patch-2
addons/google_recaptcha/models/ir_http.py
3
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import requests from odoo import api, models, _ from odoo.http import request from odoo.exceptions import UserError, ValidationError logger = logging.getLogger(__name__) class Http(models.AbstractModel)...
mrquim/repository.mrquim
refs/heads/master
script.module.unidecode/lib/unidecode/x07b.py
252
data = ( 'Mang ', # 0x00 'Zhu ', # 0x01 'Utsubo ', # 0x02 'Du ', # 0x03 'Ji ', # 0x04 'Xiao ', # 0x05 'Ba ', # 0x06 'Suan ', # 0x07 'Ji ', # 0x08 'Zhen ', # 0x09 'Zhao ', # 0x0a 'Sun ', # 0x0b 'Ya ', # 0x0c 'Zhui ', # 0x0d 'Yuan ', # 0x0e 'Hu ', # 0x0f 'Gang ', # 0x10 ...
akanimax/CL-2_lab_2016
refs/heads/master
Assignment_B4/NN.py
1
''' Implementation of simple NN without tool ''' ''' Coded by botMan ''' import csv import random import math import operator def loadDataset(filename, split, trainingSet=[] , testSet=[]): with open(filename, 'rb') as csvfile: lines = csv.reader(csvfile) dataset = list(lines) for x in range(len(data...
hexpl0it/plugin.video.genesi-ita
refs/heads/master
resources/lib/sources/yify_mv.py
3
# -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda 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 ...
Open-Party/python-beaver
refs/heads/master
beaver/transports/sqs_transport.py
4
# -*- coding: utf-8 -*- import boto.sqs import uuid from boto.sqs.message import Message from beaver.transports.base_transport import BaseTransport from beaver.transports.exception import TransportException class SqsTransport(BaseTransport): def __init__(self, beaver_config, logger=None): super(SqsTrans...
ChenJunor/hue
refs/heads/master
desktop/core/ext-py/kazoo-2.0/kazoo/tests/test_gevent_handler.py
36
import unittest from nose import SkipTest from nose.tools import eq_ from nose.tools import raises from kazoo.client import KazooClient from kazoo.exceptions import NoNodeError from kazoo.protocol.states import Callback from kazoo.testing import KazooTestCase from kazoo.tests import test_client class TestGeventHand...
waynesun09/virt-test
refs/heads/master
virttest/libvirt_xml/devices/input.py
6
""" input device support class(es) http://libvirt.org/formatdomain.html#elementsInput """ from virttest.libvirt_xml.devices import base class Input(base.TypedDeviceBase): # TODO: Write this class __metaclass__ = base.StubDeviceMeta _device_tag = 'input' _def_type_name = 'mouse'
tima/ansible
refs/heads/devel
lib/ansible/plugins/lookup/aws_service_ip_ranges.py
16
# (c) 2016 James Turner <turnerjsm@gmail.com> # (c) 2017 Ansible Project # 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 DOCUMENTATION = """ lookup: aws_service_ip_ranges author: - Jam...
wxkdesky/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/python.py
120
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and...
RyanYoung25/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/gradient_checker_test.py
1
# 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...
darkleons/lama
refs/heads/master
openerp/addons/test_convert/__openerp__.py
437
{ 'name': 'test_convert', 'description': "Data for xml conversion tests", 'version': '0.0.1', }
idlead/scikit-learn
refs/heads/master
sklearn/decomposition/nmf.py
5
""" Non-negative matrix factorization """ # Author: Vlad Niculae # Lars Buitinck <L.J.Buitinck@uva.nl> # Mathieu Blondel <mathieu@mblondel.org> # Tom Dupre la Tour # Author: Chih-Jen Lin, National Taiwan University (original projected gradient # ...
silvio-giuliani/steam-userstatistics
refs/heads/master
run.py
1
from api.controllers import routes app = routes.app if __name__ == "__main__": app.run()
wasade/networkx
refs/heads/master
networkx/algorithms/approximation/matching.py
85
# -*- coding: utf-8 -*- """ ************** Graph Matching ************** Given a graph G = (V,E), a matching M in G is a set of pairwise non-adjacent edges; that is, no two edges share a common vertex. http://en.wikipedia.org/wiki/Matching_(graph_theory) """ # Copyright (C) 2011-2012 by # Nicholas Mancuso <nick.m...
yprez/python-social-auth
refs/heads/master
social/backends/flickr.py
76
""" Flickr OAuth1 backend, docs at: http://psa.matiasaguirre.net/docs/backends/flickr.html """ from social.backends.oauth import BaseOAuth1 class FlickrOAuth(BaseOAuth1): """Flickr OAuth authentication backend""" name = 'flickr' AUTHORIZATION_URL = 'https://www.flickr.com/services/oauth/authorize' ...
aptivate/ckanext-mapactionimporter
refs/heads/staging
ckanext/mapactionimporter/commands.py
1
import ckan.plugins.toolkit as toolkit import paste.script from ckanext.mapactionimporter.plugin import ( create_product_themes ) class MapactionImporterCommand(toolkit.CkanCommand): """ ckanext-mapactionimporter management commands Usage:: paster mapactionimporter create_product_themes ...
ingve/IncludeOS
refs/heads/master
test/hw/integration/serial/test.py
1
#!/usr/bin/python import sys import os includeos_src = os.environ.get('INCLUDEOS_SRC', os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))).split('/test')[0]) sys.path.insert(0,includeos_src) from subprocess import call from vmrunner import vmrunner # Get an auto-cr...
HousekeepLtd/django
refs/heads/master
tests/middleware_exceptions/urls.py
390
from django.conf.urls import url from . import views urlpatterns = [ url(r'^middleware_exceptions/view/$', views.normal_view), url(r'^middleware_exceptions/not_found/$', views.not_found), url(r'^middleware_exceptions/error/$', views.server_error), url(r'^middleware_exceptions/null_view/$', views.null_...
bdh1011/wau
refs/heads/master
venv/lib/python2.7/site-packages/ipykernel/embed.py
13
"""Simple function for embedding an IPython kernel """ #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- import sys from IPython.utils.frame import extract_module_locals from .kernelapp import IPKern...
Leo-g/Flask-Skeleton
refs/heads/master
app/__init__.py
3
from flask import Flask #http://flask.pocoo.org/docs/0.10/patterns/appfactories/ def create_app(config_filename): app = Flask(__name__) app.config.from_object(config_filename) from app.users.models import db db.init_app(app) #Blueprints from app.users.views import users app.register_blue...
swamireddy/python-cinderclient
refs/heads/master
cinderclient/tests/v2/test_quota_classes.py
6
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
infraredbg/Lenovo_A820_kernel_kk
refs/heads/upstream
bionic/libc/kernel/tools/update_all.py
5
#!/usr/bin/env python # import sys, cpp, kernel, glob, os, re, getopt, clean_header from defaults import * from utils import * def usage(): print """\ usage: %(progname)s [kernel-original-path] this program is used to update all the auto-generated clean headers used by the Bionic C library. it assumes t...
omouse/staykat
refs/heads/master
app/dateplanner/tests.py
24123
from django.test import TestCase # Create your tests here.
lduarte1991/edx-platform
refs/heads/master
common/test/acceptance/pages/lms/peer_grade.py
40
""" Students grade peer submissions. """ from bok_choy.page_object import PageObject from bok_choy.promise import Promise class PeerGradePage(PageObject): """ Students grade peer submissions. """ url = None def is_browser_on_page(self): def _is_correct_page(): is_present = (...
CTSRD-SOAAP/chromium-42.0.2311.135
refs/heads/master
tools/gyp/test/mac/gyptest-bundle-resources.py
193
#!/usr/bin/env python # Copyright (c) 2013 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 things related to bundle resources. """ import TestGyp import os import stat import sys def check_attribs(path, expected_ex...
rrpg/engine
refs/heads/master
core/commands/attack.py
1
# -*- coding: utf-8 -*- import core.command from core.fight import fight from core.localisation import _ class attack(core.command.command): """ Fight command """ def run(self): """ Attack someone in the same area """ f = fight.getFight() if f is None: raise core.command.exception(_('ERROR_FIGHT_NO...
v1bri/gnuradio
refs/heads/master
gr-blocks/python/blocks/qa_endian_swap.py
47
#!/usr/bin/env python # # Copyright 2011-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 optio...
DavidResin/aps-aalto
refs/heads/master
stitch/cv/lib/python3.4/site-packages/pip/_vendor/html5lib/_trie/py.py
1323
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from bisect import bisect_left from ._base import Trie as ABCTrie class Trie(ABCTrie): def __init__(self, data): if not all(isinstance(x, text_type) for x in data.keys()): raise TypeError...
mdakin/engine
refs/heads/master
third_party/mesa/redirectoutput.py
167
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import os.path import subprocess import sys if len(sys.argv) < 3: print "Usage: %s OUTPUTFILE SCRIPTNAME ARGUMENTS" % sys.argv[0] print "R...
badjr/pysal
refs/heads/master
pysal/core/IOHandlers/geoda_txt.py
14
import pysal.core.Tables as Tables __author__ = "Charles R Schmidt <schmidtc@gmail.com>" __all__ = ['GeoDaTxtReader'] class GeoDaTxtReader(Tables.DataTable): """GeoDa Text File Export Format """ __doc__ = Tables.DataTable.__doc__ FORMATS = ['geoda_txt'] MODES = ['r'] def __init__(self, *args...
fitermay/intellij-community
refs/heads/master
python/testData/psi/Nonlocal.py
83
nonlocal a, b
william-os4y/fapws3
refs/heads/master
fapws/__init__.py
12133432
stochasticHydroTools/RigidMultiblobsWall
refs/heads/master
read_input/__init__.py
12133432
DvA-leopold/CrAB
refs/heads/dev
crypto/__init__.py
12133432
initNirvana/Easyphotos
refs/heads/master
env/lib/python3.4/site-packages/PIL/ImageFilter.py
20
# # The Python Imaging Library. # $Id$ # # standard filters # # History: # 1995-11-27 fl Created # 2002-06-08 fl Added rank and mode filters # 2003-09-15 fl Fixed rank calculation in rank filter; added expand call # # Copyright (c) 1997-2003 by Secret Labs AB. # Copyright (c) 1995-2002 by Fredrik Lundh. # # See t...
timabbott/zulip
refs/heads/master
zerver/migrations/0206_stream_rendered_description.py
7
from django.db import migrations, models from django.db.backends.postgresql.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from zerver.lib.actions import render_stream_description def render_all_stream_descriptions(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None: ...
mKeRix/home-assistant
refs/heads/dev
homeassistant/components/input_number/__init__.py
12
"""Support to set a numeric value from a slider or text box.""" import logging import typing import voluptuous as vol from homeassistant.const import ( ATTR_EDITABLE, ATTR_MODE, ATTR_UNIT_OF_MEASUREMENT, CONF_ICON, CONF_ID, CONF_MODE, CONF_NAME, SERVICE_RELOAD, ) from homeassistant.cor...
andrew-inglis/cern-atlas-mmOptical
refs/heads/master
code/run.py
1
# # run.py - the base code that is run # # # some hardcoded locations for things # import os from sys import argv from math import copysign import matplotlib.pyplot as plt import pickle import numpy # Hard coded directories. Please change these accordingly. imageJjarName = '/Users/ainglis/Applications/ImageJ-platI...
acourtney2015/boto
refs/heads/develop
tests/unit/ec2containerservice/__init__.py
12133432
oliverhr/odoo
refs/heads/8.0-pos-pademobile-payment
addons/hr_gamification/wizard/__init__.py
388
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
js0701/chromium-crosswalk
refs/heads/master
build/android/gn/zip.py
25
#!/usr/bin/env python # # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Archives a set of files. """ import ast import optparse import os import sys sys.path.append(os.path.join(os.path.dirname(__file...
peterlauri/django
refs/heads/master
tests/auth_tests/models/custom_user.py
36
from django.contrib.auth.models import ( AbstractBaseUser, AbstractUser, BaseUserManager, Group, Permission, PermissionsMixin, UserManager, ) from django.db import models from django.utils.encoding import python_2_unicode_compatible # The custom User uses email as the unique identifier, and requires # that ev...
GoogleCloudPlatform/professional-services-data-validator
refs/heads/develop
samples/bq_result_handler.py
1
# 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 agreed to in writing, ...
grayark/osquery
refs/heads/master
tools/tests/test_base.py
14
#!/usr/bin/env python # Copyright (c) 2014, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from...
LumPenPacK/NetworkExtractionFromImages
refs/heads/master
win_build/nefi2_win_amd64_msvc_2015/site-packages/numpy/distutils/fcompiler/compaq.py
82
#http://www.compaq.com/fortran/docs/ from __future__ import division, absolute_import, print_function import os import sys from numpy.distutils.fcompiler import FCompiler from numpy.distutils.compat import get_exception from distutils.errors import DistutilsPlatformError compilers = ['CompaqFCompiler'] if os.name !...
jfterpstra/bluebottle
refs/heads/develop
bluebottle/payments_mock/__init__.py
12133432
benschmaus/catapult
refs/heads/master
third_party/gsutil/gslib/third_party/__init__.py
12133432
giovaneliberato/python_birds_fp
refs/heads/simples
fases/rodar_fase_exemplo.py
12
# -*- coding: utf-8 -*- from os import path import sys project_dir = path.dirname(__file__) project_dir = path.join('..') sys.path.append(project_dir) from atores import PassaroAmarelo, PassaroVermelho, Obstaculo, Porco from fase import Fase from placa_grafica_tkinter import rodar_fase if __name__ == '__main__': ...
phlax/pootle
refs/heads/master
pootle/apps/virtualfolder/receivers.py
7
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from django.db.models.signals import post_sa...
fabian4/ceilometer
refs/heads/master
ceilometer/tests/unit/image/__init__.py
12133432
lgscofield/odoo
refs/heads/8.0
addons/mrp/tests/test_multicompany.py
374
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
freesmartphone/framework
refs/heads/master
framework/subsystems/odeviced/audio.py
1
#!/usr/bin/env python """ Open Device Daemon - A plugin for audio device peripherals (C) 2008-2009 Michael 'Mickey' Lauer <mlauer@vanille-media.de> (C) 2008 Openmoko, Inc. GPLv2 or later Package: odeviced Module: audio """ MODULE_NAME = "odeviced.audio" __version__ = "0.5.9.11" from framework.config import config f...
beheadedmyway/gity
refs/heads/master
python/erroremail.py
2
# Copyright Aaron Smith 2009 # # This file is part of Gity. # # Gity 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. # # Gity is dis...
AMOboxTV/AMOBox.LegoBuild
refs/heads/master
plugin.program.super.favourites/launcher.py
18
# # Copyright (C) 2014 # Sean Poyser (seanpoyser@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 version 2, or (at your option) # any later version. # # This...
peterlauri/django
refs/heads/master
tests/signed_cookies_tests/tests.py
28
from __future__ import unicode_literals from django.core import signing from django.http import HttpRequest, HttpResponse from django.test import SimpleTestCase, override_settings from django.test.utils import freeze_time class SignedCookieTest(SimpleTestCase): def test_can_set_and_read_signed_cookies(self): ...
albertomurillo/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase_facts.py
13
#!/usr/bin/python # # Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.com> # # 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', ...
justintweaver/mtchi-cert-game
refs/heads/master
makahiki/apps/utils/__init__.py
9
"""utility module."""
b-carter/numpy
refs/heads/master
numpy/linalg/info.py
264
"""\ Core Linear Algebra Tools ------------------------- Linear algebra basics: - norm Vector or matrix norm - inv Inverse of a square matrix - solve Solve a linear system of equations - det Determinant of a square matrix - lstsq Solve linear least-squares problem...
Grirrane/odoo
refs/heads/master
addons/analytic/wizard/account_analytic_cost_ledger_for_journal_report.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 GNU...
Ditmar/plugin.video.pelisalacarta
refs/heads/master
servers/userporn.py
33
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para userporn # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import os,re import base64 from core import scrapertools ...
NSnietol/Py
refs/heads/master
PythonIntermediate/Regex/ejercicio1.py
2
#-*- coding: utf-8 -*- import re """ Palabras con a lo sumo una pareja de 0's consecutivos y a lo sumo una pareja de 1's consecutivos. Cadenas en las que toda pareja de 0's contiguos aparece antes de cualquier pareja de 1's contiguos. Cadenas que no contienen a 101 como subcadena. Cadenas equilibr...
psiinon/addons-server
refs/heads/master
src/olympia/bandwagon/migrations/0001_initial.py
7
# Generated by Django 2.2.5 on 2019-09-12 13:35 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import olympia.amo.fields import olympia.amo.models import olympia.translations.fields class Migration(migrations.Migration): in...
pythonprobr/pythonpro-website
refs/heads/master
pythonpro/cohorts/__init__.py
12133432
tareqalayan/ansible
refs/heads/devel
lib/ansible/modules/cloud/rackspace/__init__.py
12133432
luci/luci-py
refs/heads/master
client/third_party/infra_libs/experiments.py
7
# Copyright 2015 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. """Tools for gradually enabling a feature on a deterministic set of machines. Add a flag to your program to control the percentage of machines that a new fe...
hachreak/invenio-oaiharvester
refs/heads/master
invenio_oaiharvester/manage.py
1
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 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...
shujunqiao/cocos2d-python
refs/heads/master
cocos/actions/tiledgrid_actions.py
3
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2012 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # Copyright (c) 2009-2014 Richard Jones, Claudio Canepa # All rights reserved. # # Redistribution and use in source and binary forms, with o...
zanderle/django
refs/heads/master
tests/defer/tests.py
338
from __future__ import unicode_literals from django.db.models.query_utils import DeferredAttribute, InvalidQuery from django.test import TestCase from .models import ( BigChild, Child, ChildProxy, Primary, RefreshPrimaryProxy, Secondary, ) class AssertionMixin(object): def assert_delayed(self, obj, num): ...
mcecchi/SuperOcto
refs/heads/master
roboOctoprint/src/octoprint/server/api/connection.py
6
# coding=utf-8 from __future__ import absolute_import, division, print_function __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" fr...
shownomercy/django
refs/heads/master
tests/webdesign_tests/tests.py
251
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template import Context, Template from django.test import SimpleTestCase, modify_settings @modify_settings(INSTALLED_APPS={'append': 'django.contrib.webdesign'}) class WebdesignTest(SimpleTestCase): def test_lorem_tag(self): t =...
intel-ctrlsys/actsys
refs/heads/master
actsys/control/commands/services/tests/test_services_start.py
1
# -*- coding: utf-8 -*- # # Copyright (c) 2016 Intel Corp. # """ Test the ServicesCheckCommand Plugin. """ import unittest from mock import patch, MagicMock from .. import ServicesStartCommand from ....plugin.manager import PluginManager class TestServicesStartCommand(unittest.TestCase): """Test case for the Serv...
OCA/l10n-brazil
refs/heads/12.0
l10n_br_account_payment_order/models/__init__.py
1
# Copyright (C) 2016-Today - KMEE (<http://kmee.com.br>). # Luis Felipe Miléo - mileo@kmee.com.br # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import res_company from . import account_invoice from . import account_journal from . import account_move from . import l10n_br_cnab_change_methods f...
darfire/screp
refs/heads/master
screp/termactions.py
1
import lxml from lxml.etree import ( XPath, ) from lxml.cssselect import CSSSelector import re from .utils import ( raise_again, generic_translator, preprocess_selector, ) class BaseTermAction(object): in_type = None out_type = None @staticmethod def _...
glyph/cryptography
refs/heads/master
cryptography/hazmat/bindings/openssl/opensslv.py
1
# 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 # distributed under the...
heeraj123/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/test/test_error.py
18
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest from twisted.internet import error import socket class TestStringification(unittest.TestCase): """Test that the exceptions have useful stringifications. """ listOfTests = [ #(output, except...
igemsoftware/SYSU-Software2013
refs/heads/master
project/Python27_32/Lib/site-packages/pypm/client/store.py
2
# Copyright (c) 2010 ActiveState Software Inc. All rights reserved. """ pypm.client.store ~~~~~~~~~~~~~~~~~ Store contains two things: 1) repository index cache (~/.pypm/idx/<url-md5>/index) 2) installed database (<pyenv>/_pypm/installed.db) """ import logging from datetime import datetime f...
Itxaka/st2
refs/heads/master
st2client/st2client/formatters/doc.py
7
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
svanschalkwyk/datafari
refs/heads/master
windows/python/Lib/test/test_coercion.py
122
import copy import unittest from test.test_support import run_unittest, TestFailed, check_warnings # Fake a number that implements numeric methods through __coerce__ class CoerceNumber: def __init__(self, arg): self.arg = arg def __repr__(self): return '<CoerceNumber %s>' % repr(self.arg) ...
unnikrishnankgs/va
refs/heads/master
venv/lib/python3.5/site-packages/tensorflow/python/ops/gen_sparse_ops.py
3
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. """ import collections as _collections from google.protobuf import text_format as _text_format from tensorflow.core.framework import op_def_pb2 as _op_def_pb2 # Needed to trigger the call to _set_call_cpp_shape_fn. from tensorfl...
GreatFruitOmsk/nativeconfig
refs/heads/master
test/configs/__init__.py
1
from abc import ABC, abstractmethod import json import os from unittest.mock import MagicMock from nativeconfig.options import StringOption, IntOption, ArrayOption, DictOption, ValueSource from nativeconfig.exceptions import DeserializationError, ValidationError class ConfigMixin(ABC): CONFIG_TYPE = None de...
praserocking/google-gtags
refs/heads/master
gtags.py
7
#!/usr/bin/python2.4 # # Copyright 2004 Google Inc. # All Rights Reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later vers...
xxsergzzxx/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/plat-os2emx/IN.py
57
# Generated by h2py from f:/emx/include/netinet/in.h # Included from sys/param.h PAGE_SIZE = 0x1000 HZ = 100 MAXNAMLEN = 260 MAXPATHLEN = 260 def htonl(X): return _swapl(X) def ntohl(X): return _swapl(X) def htons(X): return _swaps(X) def ntohs(X): return _swaps(X) IPPROTO_IP = 0 IPPROTO_ICMP = 1 IPPROTO_IGMP = 2 ...
wanghe4096/website
refs/heads/master
aliyun/api/rest/Rds20130528DescribeDBInstancesRequest.py
1
''' Created by auto_sdk on 2015.04.21 ''' from aliyun.api.base import RestApi class Rds20130528DescribeDBInstancesRequest(RestApi): def __init__(self,domain='rds.aliyuncs.com',port=80): RestApi.__init__(self,domain, port) self.DBInstanceId = None self.DBInstanceNetType = None self.DBInstanceStatus = N...
tseaver/google-cloud-python
refs/heads/master
securitycenter/google/cloud/securitycenter_v1beta1/proto/asset_pb2.py
2
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/securitycenter_v1beta1/proto/asset.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf impo...
paplorinc/intellij-community
refs/heads/master
python/testData/resolve/multiFile/fromImportStarReassignment/FromImportStarReassignment.py
83
from m1 import * foo = foo # <ref>
ennoborg/gramps
refs/heads/master
gramps/plugins/db/dbapi/test/__init__.py
12133432
Gaurav-S-Thakur/PythonSqlFlask
refs/heads/master
Demos/Module 5 - MVATrivia/TriviaMVAApp/models/__init__.py
12133432
snowcloud/django-flatpagewiki
refs/heads/master
flatpagewiki/__init__.py
12133432
chromium/chromium
refs/heads/master
third_party/blink/web_tests/external/wpt/webdriver/tests/get_window_handles/__init__.py
12133432
mayfield/shellish
refs/heads/master
test/rendering.py
1
import itertools import unittest from shellish import rendering as R class VTMLBufferTests(unittest.TestCase): def test_overclip_plain(self): startval = 'A' * 10 s = R.vtmlrender(startval) self.assertEqual(s.clip(11), startval) self.assertEqual(s.clip(11).text(), startval) ...
jypeitao/cppcheck
refs/heads/master
addons/cppcheckdata.py
9
## @mainpage cppcheckdata # # @brief This is a Python module that helps you access Cppcheck dump data.<br><br> # # License: No restrictions, use this as you need.<br><br> # import xml.etree.ElementTree as ET ## Token class. Contains information about each token in the source code. # # The CppcheckData.tokenlist is a ...
srkiyengar/NewGripper
refs/heads/master
src/shutter.py
1
import serial import struct import time # j = 2 means open, j = 1 means close shutter def command_shutter(port, j): # first, start the serial port to communicate with the arduino if port.isOpen(): print "port open" port.write(struct.pack('>B', j)) return 1 else: return 0 ...
napalm-automation/napalm-yang
refs/heads/develop
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_external_reachability/__init__.py
1
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...