repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
erh3cq/hyperspy
refs/heads/RELEASE_next_minor
hyperspy/tests/component/test_arctan.py
3
# -*- coding: utf-8 -*- # Copyright 2007-2020 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
smi96/django-blog_website
refs/heads/master
lib/python2.7/site-packages/django/conf/locale/cy/formats.py
504
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' # '25 Hy...
UHBiocomputation/pelican-plugins
refs/heads/master
collate_content/__init__.py
72
""" __init__.py =========== Edward J. Stronge (c) 2014 Imports collate_content to facilitate Pelican's plugin loading process. """ from .collate_content import *
gauravbose/digital-menu
refs/heads/master
django/contrib/gis/gdal/__init__.py
130
""" This module houses ctypes interfaces for GDAL objects. The following GDAL objects are supported: CoordTransform: Used for coordinate transformations from one spatial reference system to another. Driver: Wraps an OGR data source driver. DataSource: Wrapper for the OGR data source object, supports OGR-su...
Kato4imoto/armani-kk-kernel
refs/heads/master
tools/perf/util/setup.py
4998
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
hbrunn/OCB
refs/heads/8.0
addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py
386
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
hopeall/odoo
refs/heads/8.0
addons/account_followup/tests/test_account_followup.py
247
import datetime from openerp import tools from openerp.tests.common import TransactionCase from openerp.osv import fields class TestAccountFollowup(TransactionCase): def setUp(self): """ setUp ***""" super(TestAccountFollowup, self).setUp() cr, uid = self.cr, self.uid self...
webmasterraj/FogOrNot
refs/heads/master
flask/lib/python2.7/site-packages/pip/req/req_file.py
239
""" Requirements file parsing """ from __future__ import absolute_import import os import re import shlex import optparse from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor.six.moves import filterfalse import pip from pip.download import get_file_content from pip.req.req_install import ...
srivassumit/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pytest/_pytest/junitxml.py
168
""" report test results in JUnit-XML format, for use with Jenkins and build integration servers. Based on initial code from Ross Lawley. """ # Output conforms to https://github.com/jenkinsci/xunit-plugin/blob/master/ # src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd import py impo...
lokeshbv/TizenRT
refs/heads/mymaster
external/iotivity/iotivity_1.2-rel/build_common/iotivityconfig/compiler/configuration.py
64
# ------------------------------------------------------------------------ # Copyright 2015 Intel Corporation # # 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/li...
iandees/all-the-places
refs/heads/master
locations/spiders/dominos_pizza.py
1
# -*- coding: utf-8 -*- import scrapy import json import re from scrapy.selector import Selector from locations.items import GeojsonPointItem from locations.hours import OpeningHours DAY_MAPPING = { "Sunday": "Su", "Monday": "Mo", "Tuesday": "Tu", "Wednesday": "We", "Thursday": "Th", "Friday":...
LandRegistry/digital-register-api
refs/heads/develop
service/models.py
1
from sqlalchemy.dialects.postgresql import JSON, ARRAY # type: ignore from sqlalchemy import Index # type: ignore from service import db # N.B.: 'Index' is only used if *additional* index required! # [Index is created automatically per 'primary_key' setting]. class TitleRegisterData(db.Mod...
konstruktoid/ansible-upstream
refs/heads/devel
lib/ansible/modules/monitoring/logentries.py
122
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Ivan Vanderbyl <ivan@app.io> # 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', ...
varunarya10/nova_test_latest
refs/heads/master
nova/compute/monitors/cpu/virt_driver.py
15
# Copyright 2013 Intel 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 requir...
windinthew/audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg-sampler.lv2/waflib/Tools/gxx.py
196
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file from waflib.Tools import ccroot,ar from waflib.Configure import conf @conf def find_gxx(conf): cxx=conf.find_program(['g++','c++'],var='CXX') cxx=conf.cmd_to_list(cxx) conf...
Salat-Cx65/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/decimal.py
46
# 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 ...
LouisPlisso/visemo
refs/heads/master
rtmplite/rtmpclient.py
3
# Copyright (c) 2009-2011, Kundan Singh. All rights reserved. see README for details. # WARNING:This is currently incomplete. Especially the quality is poor, and HTTP is not yet implemented. ''' This is a simple implementation of a Flash RTMP client to perform remote copy similar to secure copy (scp) application. It s...
muadibbm/gini
refs/heads/master
frontend/src/gbuilder/UI/ExportWindow.py
11
"""The export window to save as image""" from PyQt4 import QtCore, QtGui from Core.globals import options, mainWidgets class ExportWindow(QtGui.QDialog): def __init__(self, parent = None): """ Create an export window to save the current canvas as an image. """ QtGui.QDial...
siddhika1889/Pydev-Dependencies
refs/heads/master
bin/pysrc/extendable/searching/mod2.py
11
from extendable.searching.mod1.foo import Foo
idjaw/keystone
refs/heads/master
keystone/token/providers/fernet/utils.py
9
# 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 t...
shangvven/Wox
refs/heads/master
PythonHome/Lib/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py
310
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type import gettext _ = gettext.gettext try: from functools import reduce except ImportError: pass from ..constants import voidElements, booleanAttributes, spaceCharacters from ..constants import rcdataElement...
ingokegel/intellij-community
refs/heads/master
python/testData/pyi/type/instanceAttributeAnnotation/InstanceAttributeAnnotation.py
21
class C: def __init__(self): self.attr = None C().at<caret>tr
narasimhan-v/avocado-misc-tests-1
refs/heads/master
io/disk/fs_mark.py
4
#!/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 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that ...
nutnut/p2pool
refs/heads/master
p2pool/test/util/test_skiplist.py
287
from p2pool.util import skiplist class NotSkipList(object): def __call__(self, start, *args): pos = start sol = self.initial_solution(start, args) while True: decision = self.judge(sol, args) if decision > 0: raise AssertionError() elif de...
rva-data/rvaconnect
refs/heads/master
rvaconnect/places/views.py
1
from django.views.generic import DetailView, ListView from .models import Place class PlaceDetail(DetailView): """ A detail view for places which should fetch the place based on the passed ID. """ queryset = Place.active.all() template_name = "places/place_detail.html" context_object_name...
thundernet8/WRGameVideos-Server
refs/heads/master
venv/lib/python2.7/site-packages/flask/testsuite/test_apps/flaskext/oldext_simple.py
629
ext_id = 'oldext_simple'
wgmueller1/unicorn
refs/heads/master
app/admin_view.py
1
from flask import Flask from flask.ext.admin import Admin, AdminIndexView, BaseView, expose from flask.ext.admin.contrib.sqla import ModelView from wtforms.fields import PasswordField from flask.ext.login import current_user from flask import redirect from app import flask_bcrypt from app.models import User, Organizat...
puzan/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/qux2/quuz.py
298
data = 'qux2:quuz'
plumgrid/plumgrid-nova
refs/heads/master
nova/virt/hyperv/livemigrationutils.py
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cloudbase Solutions Srl # 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.ap...
Cojacfar/Maker
refs/heads/master
comm/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/sbcharsetprober.py
2926
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
neharejanjeva/techstitution
refs/heads/master
app/logs/venv/lib/python2.7/site-packages/setuptools/command/build_py.py
231
from glob import glob from distutils.util import convert_path import distutils.command.build_py as orig import os import fnmatch import textwrap import io import distutils.errors import itertools from setuptools.extern import six from setuptools.extern.six.moves import map, filter, filterfalse try: from setuptool...
jhseu/tensorflow
refs/heads/master
tensorflow/python/training/tracking/base_test.py
16
# 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...
rimoldisimone/asdproragusa
refs/heads/master
phpMyAdmin/doc/_ext/configext.py
121
from sphinx.locale import l_, _ from sphinx.domains import Domain, ObjType from sphinx.roles import XRefRole from sphinx.domains.std import GenericObject, StandardDomain from sphinx.directives import ObjectDescription from sphinx.util.nodes import clean_astext, make_refnode from sphinx.util import ws_re from sphinx imp...
flyingfish007/tempest
refs/heads/master
tempest/api/compute/volumes/test_volumes_get.py
3
# Copyright 2012 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 requ...
lokeshchdhry/AndroidToolsUpdate-node
refs/heads/master
node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
578
# 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. from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard from compiler.ast import List from compiler.ast import Module from co...
mdaniel/intellij-community
refs/heads/master
python/testData/inspections/PyPropertyAccessInspection/overrideAssignment.py
83
def test_property_override_assignment(): class B(object): @property def foo(self): return 0 @property def bar(self): return -1 @property def baz(self): return -2 class C(B): foo = 'foo' def baz(self): ...
Tiggels/opencog
refs/heads/master
opencog/python/pln_old/examples/socrates_demo/socrates_agent.py
31
""" Testing PLN inference on socrates-r2l.scm input """ from opencog.cogserver import MindAgent from opencog.atomspace import types from pln.chainers import Chainer from pln.rules import * __author__ = 'Cosmo Harrigan' class SocratesAgent(MindAgent): def __init__(self): self.chainer = None def cre...
maxwell-demon/grpc
refs/heads/master
src/python/grpcio/grpc/framework/foundation/later.py
47
# Copyright 2015, 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...
soarpenguin/ansible
refs/heads/devel
lib/ansible/modules/cloud/lxd/lxd_container.py
9
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Hiroaki Nakamura <hnakamur@gmail.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.0'...
azureplus/chromium_depot_tools
refs/heads/master
third_party/boto/provider.py
51
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright 2010 Google Inc. # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011, Nexenta Systems Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated document...
dslomov/intellij-community
refs/heads/master
python/testData/optimizeImports/orderByType.py
80
from __future__ import with_statement import foo import sys from bar import * import datetime sys.path datetime.datetime foo.bar()
mikalstill/nova
refs/heads/master
nova/notifications/objects/exception.py
3
# 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...
andreasplesch/QGIS-X3D-Processing
refs/heads/master
scripts/serve_and_open_html.py
1
''' QGIS Processing script (c) 2017 Andreas Plesch serve html file and show in browser ''' ##X3D=group ##serve_and_open_html=name ##input_html=file ##server_port=number 8000 ##open_in_browser=boolean False ##html_file_name=output string import shutil import webbrowser from PyQt4.QtCore import QUrl, QFileInfo port = i...
reedloden/ansible
refs/heads/devel
test/units/module_utils/basic/test_safe_eval.py
6
# -*- coding: utf-8 -*- # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.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...
Plain-Andy-legacy/android_external_chromium_org
refs/heads/lp-5.1r1
tools/perf/profile_creators/theme_profile_creator.py
43
# Copyright 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. from profile_creators import extensions_profile_creator class ThemeProfileCreator(extensions_profile_creator.ExtensionsProfileCreator): """Install a them...
vanpact/scipy
refs/heads/master
benchmarks/benchmarks/linalg_solve_toeplitz.py
106
"""Benchmark the solve_toeplitz solver (Levinson recursion) """ from __future__ import division, absolute_import, print_function import numpy as np try: import scipy.linalg except ImportError: pass from .common import Benchmark class SolveToeplitz(Benchmark): params = ( ('float64', 'complex128'...
moijes12/oh-mainline
refs/heads/master
vendor/packages/Django/tests/modeltests/user_commands/models.py
284
""" 38. User-registered management commands The ``manage.py`` utility provides a number of useful commands for managing a Django project. If you want to add a utility command of your own, you can. The user-defined command ``dance`` is defined in the management/commands subdirectory of this test application. It is a s...
jreback/pandas
refs/heads/master
pandas/tests/extension/base/ops.py
3
from typing import Optional, Type import pytest import pandas as pd import pandas._testing as tm from pandas.core import ops from .base import BaseExtensionTests class BaseOpsUtil(BaseExtensionTests): def get_op_from_name(self, op_name): return tm.get_op_from_name(op_name) def check_opname(self, s...
jing-bao/pa-chromium
refs/heads/master
build/gyp_helper.py
57
# 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. # This file helps gyp_chromium and landmines correctly set up the gyp # environment from chromium.gyp_env on disk import os SCRIPT_DIR = os.path.dirnam...
AdoHe/kubernetes
refs/heads/master
cluster/juju/layers/kubernetes-worker/reactive/kubernetes_worker.py
1
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
KarelJakubec/pip
refs/heads/develop
tests/functional/test_install.py
15
import os import textwrap import glob from os.path import join, curdir, pardir import pytest from pip.utils import appdirs, rmtree from tests.lib import (pyversion, pyversion_tuple, _create_test_package, _create_svn_repo, path_to_url) from tests.lib.local_repos import local_checkout from test...
nhomar/odoo
refs/heads/8.0
addons/website_project/__init__.py
409
import models import controllers
makinacorpus/odoo
refs/heads/8.0
addons/google_account/__init__.py
238
# -*- 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...
laosiaudi/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/tests/dataframe/transform_test.py
29
# Copyright 2016 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...
frodejohansen/codebrag
refs/heads/master
scripts/dist/lib/s3cmd-1.5.0-alpha1/S3/SimpleDB.py
7
## Amazon SimpleDB library ## Author: Michal Ludvig <michal@logix.cz> ## http://www.logix.cz/michal ## License: GPL Version 2 """ Low-level class for working with Amazon SimpleDB """ import time import urllib import base64 import hmac import sha import httplib from logging import debug, info, warning, error ...
iamutkarshtiwari/kivy
refs/heads/master
doc/sources/sphinxext/autodoc.py
73
# -*- coding: utf-8 -*- from sphinx.ext.autodoc import Documenter, ClassDocumenter from sphinx.ext.autodoc import setup as core_setup from sphinx.locale import _ class KivyClassDocumenter(ClassDocumenter): def add_directive_header(self, sig): if self.doc_as_attr: self.directivetype = 'attribut...
iwm911/plaso
refs/heads/master
plaso/formatters/mac_document_versions.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014 The Plaso Project Authors. # Please see the AUTHORS file for details on individual authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the L...
xujb/odoo
refs/heads/8.0
addons/stock_account/product.py
166
# -*- 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...
benthomasson/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gce_img.py
8
#!/usr/bin/python # Copyright 2015 Google Inc. All Rights Reserved. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type """An Ansible module to utilize GCE image resources.""" ANSIBLE_METAD...
sudheesh001/oh-mainline
refs/heads/master
vendor/packages/docutils/test/test_viewlist.py
18
#! /usr/bin/env python # $Id: test_viewlist.py 7463 2012-06-22 19:49:51Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Test module for the ViewList class from statemachine.py. """ import unittest import sys import re from DocutilsTestSupport i...
jmartinezchaine/OpenERP
refs/heads/master
openerp/addons/hr_expense/__init__.py
9
# -*- 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...
Clpsplug/thefuck
refs/heads/master
thefuck/rules/vagrant_up.py
4
from thefuck.shells import shell from thefuck.utils import for_app @for_app('vagrant') def match(command): return 'run `vagrant up`' in command.output.lower() def get_new_command(command): cmds = command.script_parts machine = None if len(cmds) >= 3: machine = cmds[2] start_all_instance...
yawnosnorous/python-for-android
refs/heads/master
sl4atools/fullscreenwrapper2/py3/fullscreenwrapper2demo.py
44
''' @copyright: Hariharan Srinath, 2012 @license: This work is licensed under a Creative Commons Attribution 3.0 Unported License. http://creativecommons.org/licenses/by/3.0/ ''' xmldata = """<?xml version="1.0" encoding="utf-8"?> <LinearLayout android:layout_width="fill_parent" android:layout_height="...
amarian12/e-pool.net
refs/heads/master
p2pool/util/switchprotocol.py
280
from twisted.internet import protocol class FirstByteSwitchProtocol(protocol.Protocol): p = None def dataReceived(self, data): if self.p is None: if not data: return serverfactory = self.factory.first_byte_to_serverfactory.get(data[0], self.factory.default_serverfactory) ...
dgnorth/drift-config
refs/heads/develop
driftconfig/schemautil.py
1
# -*- coding: utf-8 -*- ''' Schema Util - Helpers to pretty print Json schema errors and other bits. ''' import logging import jsonschema from json import dumps from six import StringIO from click import echo log = logging.getLogger(__name__) def check_schema(json_object, schema, title=None): ...
Alexander-M-Waldman/local_currency_site
refs/heads/master
lib/python2.7/site-packages/guardian/testapp/tests/test_other.py
1
from __future__ import unicode_literals import mock import unittest from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import Group from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.core.exceptions import Validati...
hopeall/odoo
refs/heads/8.0
addons/mass_mailing/models/mass_mailing_report.py
364
# -*- coding: utf-8 -*- from openerp.osv import fields, osv from openerp import tools class MassMailingReport(osv.Model): _name = 'mail.statistics.report' _auto = False _description = 'Mass Mailing Statistics' _columns = { 'scheduled_date': fields.datetime('Scheduled Date', readonly=True), ...
KaranToor/MA450
refs/heads/master
google-cloud-sdk/lib/googlecloudsdk/third_party/apis/bigtableclusteradmin/v1/__init__.py
415
"""Package marker file.""" import pkgutil __path__ = pkgutil.extend_path(__path__, __name__)
algiopensource/server-tools
refs/heads/8.0
base_import_match/tests/test_import.py
10
# -*- coding: utf-8 -*- # © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from os import path from openerp.tests.common import TransactionCase PATH = path.join(path.dirname(__file__), "import_data", "%s.csv") OPTIONS = { "heade...
tangyiyong/odoo
refs/heads/8.0
openerp/report/render/simple.py
324
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
mxamin/youtube-dl
refs/heads/master
youtube_dl/extractor/c56.py
91
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import js_to_json class C56IE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www|player)\.)?56\.com/(?:.+?/)?(?:v_|(?:play_album.+-))(?P<textid>.+?)\.(?:html|swf)' IE_NAME = '56.com' _TESTS = ...
scalyr/scalyr-agent-2
refs/heads/master
scalyr_agent/third_party/pysnmp/carrier/asynsock/dispatch.py
2
# Obsolete, compatibility interface from pysnmp.carrier.asyncore.dispatch import * AsynsockDispatcher = AsyncoreDispatcher
itsjustshana/project2
refs/heads/master
lib/werkzeug/serving.py
309
# -*- coding: utf-8 -*- """ werkzeug.serving ~~~~~~~~~~~~~~~~ There are many ways to serve a WSGI application. While you're developing it you usually don't want a full blown webserver like Apache but a simple standalone one. From Python 2.5 onwards there is the `wsgiref`_ server in the standa...
atmark-techno/atmark-dist
refs/heads/master
user/python/Tools/scripts/rgrep.py
3
#! /usr/bin/env python """Reverse grep. Usage: rgrep [-i] pattern file """ import sys import re import string import getopt def main(): bufsize = 64*1024 reflags = 0 opts, args = getopt.getopt(sys.argv[1:], "i") for o, a in opts: if o == '-i': reflags = reflags | re.IGNORECASE ...
srluge/SickRage
refs/heads/master
lib/hachoir_parser/archive/ar.py
86
""" GNU ar archive : archive file (.a) and Debian (.deb) archive. """ from hachoir_parser import Parser from hachoir_core.field import (FieldSet, ParserError, String, RawBytes, UnixLine) from hachoir_core.endian import BIG_ENDIAN class ArchiveFileEntry(FieldSet): def createFields(self): yield UnixLine...
x2nie/odoo
refs/heads/8.0
addons/website_hr_recruitment/models/__init__.py
390
import hr_job
RHInception/re-worker-emailnotify
refs/heads/master
replugin/emailnotify/__init__.py
1
# Copyright (C) 2014 SEE AUTHORS FILE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distr...
Cazomino05/Test1
refs/heads/master
vendor/google-breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/internal/service_reflection_test.py
559
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
vfulco/ansible
refs/heads/devel
test/units/plugins/vars/__init__.py
7690
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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 the License, or # (at your option) an...
ol-loginov/intellij-community
refs/heads/master
python/testData/intentions/PyStringConcatenationToFormatIntentionTest/escapingPy3.py
83
string = "string" some_string = "some \\ \" escaping " <caret>+ string
teochenglim/ansible-modules-extras
refs/heads/devel
cloud/vmware/vsphere_copy.py
47
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2015 Dag Wieers <dag@wieers.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 Lice...
saydulk/newfies-dialer
refs/heads/develop
newfies/callcenter/models.py
4
# # Newfies-Dialer License # http://www.newfies-dialer.org # # 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/. # # Copyright (C) 2011-2015 Star2Billing S.L. # # The primar...
python-openxml/python-docx
refs/heads/master
tests/text/test_font.py
1
# encoding: utf-8 """ Test suite for the docx.text.run module """ from __future__ import ( absolute_import, division, print_function, unicode_literals ) from docx.dml.color import ColorFormat from docx.enum.text import WD_COLOR, WD_UNDERLINE from docx.shared import Pt from docx.text.font import Font import pyte...
ombt/analytics
refs/heads/master
apex/python/ofc_online_python_tutorial/ch8_error_exceptions/print_out_exception.py
1
#!/usr/bin/python3 try: raise Exception('spam', 'eggs') except Exception as inst: print(type(inst)) # the exception instance print(inst.args) # arguments stored in .args print(inst) # __str__ allows args to be printed directly, # but may be overridden in excepti...
mojones/Axelrod
refs/heads/master
axelrod/tests/unit/test_qlearner.py
3
"""Test for the qlearner strategy.""" import random import axelrod from axelrod import simulate_play, Game from .test_player import TestPlayer, test_responses C, D = axelrod.Actions.C, axelrod.Actions.D class TestRiskyQLearner(TestPlayer): name = 'Risky QLearner' player = axelrod.RiskyQLearner expect...
tschaume/pymatgen
refs/heads/master
pymatgen/vis/structure_vtk.py
2
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module contains classes to wrap Python VTK to make nice molecular plots. """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2011, The Materials Project" __version__ = "0.1" __maintainer__ =...
kamyu104/LeetCode
refs/heads/master
Python/add-two-numbers-ii.py
2
# Time: O(m + n) # Space: O(m + n) # You are given two linked lists representing two non-negative numbers. # The most significant digit comes first and each of their nodes contain # a single digit. # Add the two numbers and return it as a linked list. # # You may assume the two numbers do not contain any leading zero...
Jajcus/pyxmpp2
refs/heads/master
pyxmpp2/error.py
1
# # (C) Copyright 2003-2011 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be u...
jameslegg/boto
refs/heads/develop
tests/integration/support/test_cert_verification.py
9
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
keyurpatel076/MissionPlannerGit
refs/heads/master
Lib/site-packages/scipy/linalg/tests/test_matfuncs.py
51
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" # # Created by: Pearu Peterson, March 2002 # """ Test functions for linalg.matfuncs module """ from numpy import array, identity, dot, sqrt from numpy.testing import TestCase, run_module_suite, assert_array_almost_equ...
PeterWangPo/Django-facebook
refs/heads/master
docs/docs_env/Scripts/easy_install-script.py
25
#!c:\workspace\django_facebook\docs\docs_env\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==0.6c11','console_scripts','easy_install' __requires__ = 'setuptools==0.6c11' import sys from pkg_resources import load_entry_point sys.exit( load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_insta...
lz1988/company-site
refs/heads/master
tests/regressiontests/views/tests/debug.py
44
# -*- coding: utf-8 -*- # This coding header is significant for tests, as the debug view is parsing # files to search for such a header to decode the source file content from __future__ import absolute_import, unicode_literals import inspect import os import sys from django.core import mail from django.core.files.upl...
TheSimoms/Felleshoelet
refs/heads/master
spotifyconnector/venv/lib/python3.6/site-packages/pip/_vendor/requests/help.py
54
"""Module containing bug report helper(s).""" from __future__ import print_function import json import platform import sys import ssl from pip._vendor import idna from pip._vendor import urllib3 from pip._vendor import chardet from . import __version__ as requests_version try: from pip._vendor.urllib3.contrib i...
PhilHarnish/forge
refs/heads/master
src/data/anagram/anagram_set.py
1
import collections import heapq from typing import ItemsView, Iterable, List, Optional, Set, Tuple from data.graph import bloom_mask WorkQueue = List[Tuple[int, int, tuple]] class _AnagramIndex(object): def __init__(self, choices: List[str]) -> None: assert len(choices) < 63 self._choices = {} self._c...
AkA84/edx-platform
refs/heads/master
cms/djangoapps/contentstore/tasks.py
150
""" This file contains celery tasks for contentstore views """ import json import logging from celery.task import task from celery.utils.log import get_task_logger from datetime import datetime from pytz import UTC from django.contrib.auth.models import User from contentstore.courseware_index import CoursewareSearchI...
jinzekid/codehub
refs/heads/master
python/py3_6venv/encryption/rsa_encrypt_decrypt.py
1
# Author: Jason Lu # coding: utf-8 from Crypto import Random from Crypto.Hash import SHA from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5 from Crypto.Signature import PKCS1_v1_5 as Signature_pkcs1_v1_5 from Crypto.PublicKey import RSA import base64 DATA = 'hello ghost, this is a4 plian text' PUBLIC_KEY_PEM =...
vicenteneto/flask-celery-sample
refs/heads/master
flask_celery_sample/app.py
1
from flask import Flask from flask_celery_sample.index.views import blueprint def create_app(): app = Flask('flask_celery_sample') app.register_blueprint(blueprint) return app
thjashin/tensorflow
refs/heads/master
tensorflow/python/summary/event_file_inspector_test.py
48
# Copyright 2015 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...
vwvww/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/set_sys_path.py
496
# Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
kennethcc2005/travel_with_friends
refs/heads/master
city_trip.py
1
import helpers import psycopg2 import os import ast import json from sklearn.cluster import KMeans current_path= os.getcwd() with open(current_path + '/api_key_list.config') as key_file: api_key_list = json.load(key_file) api_key = api_key_list["distance_api_key_list"] conn_str = api_key_list["conn_str"] def get_...