repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
aringh/odl
refs/heads/master
odl/solvers/functional/default_functionals.py
1
# Copyright 2014-2017 The ODL contributors # # This file is part of ODL. # # 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 https://mozilla.org/MPL/2.0/. """Default functionals defined on any space ...
nicky-ji/edx-nicky
refs/heads/master
lms/envs/devplus.py
50
""" This config file tries to mimic the production environment more closely than the normal dev.py. It assumes you're running a local instance of MySQL 5.1 and that you're running memcached. You'll want to use this to test caching and database migrations. Assumptions: * MySQL 5.1 (version important? (askbot breaks on...
v1bri/gnuradio
refs/heads/master
gr-fec/python/fec/polar/channel_construction.py
17
#!/usr/bin/env python # # Copyright 2015 Free Software Foundation, Inc. # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # GNU Radio is...
aventurella/mockingbird
refs/heads/master
tests/__init__.py
12133432
tomchristie/django
refs/heads/master
tests/gis_tests/layermap/__init__.py
12133432
trishnaguha/ansible
refs/heads/devel
lib/ansible/module_utils/network/aireos/__init__.py
12133432
teracyhq/flask-boilerplate
refs/heads/develop
tests/integration/api_1_0/__init__.py
12133432
mosf1k/cocktail
refs/heads/master
cocktail/__init__.py
12133432
SaganBolliger/nupic
refs/heads/master
tests/unit/nupic/research/__init__.py
12133432
sgallagher/anaconda
refs/heads/master
pyanaconda/modules/payloads/payload/live_image/__init__.py
12133432
ababic/wagtailmenus
refs/heads/master
wagtailmenus/migrations/0011_auto_20160415_1519.py
3
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailmenus', '0010_auto_20160201_1558'), ] operations = [ migrations.AlterField( model_name='flatmenuitem', ...
marcuskelly/recover
refs/heads/master
Lib/encodings/shift_jis_2004.py
816
# # shift_jis_2004.py: Python Unicode Codec for SHIFT_JIS_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('shift_jis_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEnc...
KILLER-CHIEF/uqcs-hackathon-2016
refs/heads/master
tornado/backports/__init__.py
253
# This is a Python "namespace package" http://www.python.org/dev/peps/pep-0382/ from pkgutil import extend_path __path__ = extend_path(__path__, __name__)
c22n/ion-channel-ABC
refs/heads/master
docs/examples/hl1/experiments/ikr_generic.py
1
from ionchannelABC import (Experiment, ExperimentData, ExperimentStimProtocol, IonChannelModel) import data.ikr.data_ikr as data import numpy as np from functools import partial from scipy.optimize import OptimizeWarning import myokit mo...
aldenjenkins/foobargamingwebsite
refs/heads/master
paypal/standard/models.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from warnings import warn from django.conf import settings from django.db import models from django.utils.functional import cached_property from paypal.standard.conf import POSTBACK_ENDPOINT, SANDBOX_POSTBACK_ENDPOINT from paypal.s...
foreni-packages/xortool
refs/heads/master
xortool/args.py
8
#!/usr/bin/env python #-*- coding:utf-8 -*- from docopt import docopt from routine import parse_char class ArgError(Exception): pass def parse_parameters(doc, version): p = docopt(doc, version=version) p = {k.lstrip("-"): v for k, v in p.items()} try: return { "input_is_hex": b...
ngageoint/scale
refs/heads/master
scale/job/test/execution/configuration/__init__.py
12133432
Elico-Corp/odoo-addons
refs/heads/8.0
account_prepayment/models/account.py
1
# -*- coding: utf-8 -*- # © 2015 Elico corp (www.elico-corp.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp.osv import osv, fields from openerp.tools.translate import _ class AccountVoucher(osv.osv): _inherit = "account.voucher" _columns = { 'purchase_id': field...
wgwoods/lorax
refs/heads/master
src/pylorax/api/checkparams.py
2
# # Copyright (C) 2018 Red Hat, 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 2 of the License, or # (at your option) any later version. # # This program is distributed ...
lz1988/company-site
refs/heads/master
tests/modeltests/unmanaged_models/models.py
115
""" Models can have a ``managed`` attribute, which specifies whether the SQL code is generated for the table on various manage.py operations. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible # All of these models are created in the database by Django. @python_2_unicode_...
randomtask1155/gpdb
refs/heads/master
src/test/unit/mock/special.py
20
class SpecialFuncs(object): @classmethod def make_body(cls, func): key = 'make_body_' + func.funcname if key in cls.__dict__: return cls.__dict__[key].__get__(None, SpecialFuncs)(func) @staticmethod def make_body_MemoryContextAllocZeroImpl(func): return """ ...
40223101/2015final2
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/unittest/test/test_break.py
785
import gc import io import os import sys import signal import weakref import unittest @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill") @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows") @unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 " "if threa...
freakynit/vertx-web
refs/heads/master
src/test/sockjs-protocol/venv/lib/python2.7/site-packages/setuptools/svn_utils.py
141
import os import re import sys from distutils import log import xml.dom.pulldom import shlex import locale import codecs import unicodedata import warnings from setuptools.compat import unicode from xml.sax.saxutils import unescape try: import urlparse except ImportError: import urllib.parse as...
jvrsantacruz/XlsxWriter
refs/heads/master
xlsxwriter/test/comparison/test_print_area01.py
8
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
torufuru/oolhackathon
refs/heads/hackathon
ryu/services/protocols/vrrp/api.py
48
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
koyuawsmbrtn/eclock
refs/heads/master
windows/kivy/examples/kv/builder_template.py
60
from kivy.lang import Builder from kivy.app import App from kivy.uix.boxlayout import BoxLayout Builder.load_string(''' [BlehItem@BoxLayout]: orientation: 'vertical' Label: text: str(ctx.idx) Button: text: ctx.word ''') class BlehApp(App): def build(self): root = BoxLayout() ...
guziy/basemap
refs/heads/master
examples/plotmap.py
2
from __future__ import (absolute_import, division, print_function) # make plot of etopo bathymetry/topography data on # lambert conformal conic map projection, drawing coastlines, state and # country boundaries, and parallels/meridians. # the data is interpolated to the native projection grid. from mpl_toolkits.base...
elyast/saltstack-formulas
refs/heads/master
_modules/riemann.py
1
import logging import os import re import requests import socket log = logging.getLogger(__name__) def master(): """Gets riemann server FQDN :return: """ return __salt__['search.mine_by_host']('roles:riemann.server')[0] def kafka_jmx_checks(my_host): """Generates jmx checks for kafka brokers ...
clumsy/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/gdal/field.py
264
from ctypes import byref, c_int from datetime import date, datetime, time from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi # For more information, see the OGR C API source code: # http://www.gdal.org/ogr/...
geromath/ToDoMe
refs/heads/master
root/quizzes/admin.py
1
from django.contrib import admin from .models import Question, Category, SubCategory, Quiz, Progress, MCQuestion, Answer from django import forms from django.contrib.admin.widgets import FilteredSelectMultiple from django.utils.translation import ugettext_lazy as _ class AnswerInline(admin.TabularInline): model =...
mr-karan/coala-bears
refs/heads/master
tests/natural_language/AlexBearTest.py
2
from bears.natural_language.AlexBear import AlexBear from tests.LocalBearTestHelper import verify_local_bear good_file = "Their network looks good." bad_file = "His network looks good." AlexBearTest = verify_local_bear(AlexBear, valid_files=(good_file,), ...
arenadata/ambari
refs/heads/branch-adh-1.6
ambari-server/src/main/resources/stacks/ADH/1.5/services/HIVE/package/alerts/alert_hive_thrift_port.py
11
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
xfournet/intellij-community
refs/heads/master
python/testData/inspections/ChainedComparisonWithCommonBinaryExpression_after.py
79
if 3 < x + 1 < 10: pass
huzq/scikit-learn
refs/heads/master
sklearn/experimental/tests/__init__.py
12133432
moreati/django
refs/heads/master
django/contrib/sitemaps/management/__init__.py
12133432
django-nonrel/django
refs/heads/nonrel-1.6
tests/raw_query/__init__.py
12133432
sander76/home-assistant
refs/heads/dev
homeassistant/components/openexchangerates/__init__.py
36
"""The openexchangerates component."""
cheesechoi/Triton
refs/heads/master
cheese/test/crackme_hash_collision.py
1
from triton import * import smt2lib # Triton found several collisions. Example with the first collision: # $ ./samples/crackmes/crackme_hash lrdxq # Win # $ # expr = str() def cafter(instruction): global expr # movzx esi,BYTE PTR [rax] # RAX points on the user password # cheese's modified. # 0...
eliasdorneles/scrapy
refs/heads/master
scrapy/extensions/memusage.py
129
""" MemoryUsage extension See documentation in docs/topics/extensions.rst """ import sys import socket import logging from pprint import pformat from importlib import import_module from twisted.internet import task from scrapy import signals from scrapy.exceptions import NotConfigured from scrapy.mail import MailSen...
lupyuen/RaspberryPiImage
refs/heads/master
home/pi/GrovePi/Software/Python/others/temboo/Library/Twilio/ShortCodes/UpdateShortCode.py
5
# -*- coding: utf-8 -*- ############################################################################### # # UpdateShortCode # Attempts to update an existing short code resource. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you m...
TurBoss/hazzy
refs/heads/master
hazzy/modules/Operation/MDI/mdi.py
2
#!/usr/bin/env python # Copyright (c) 2017 Kurt Jacobson # <kurtcjacobson@gmail.com> # # This file is part of Hazzy. # # Hazzy 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 o...
sdague/home-assistant
refs/heads/dev
tests/components/device_tracker/__init__.py
104
"""The tests for Device tracker platforms."""
ax003d/openerp
refs/heads/master
openerp/addons/account/report/account_financial_report.py
9
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
algiopensource/server-tools
refs/heads/8.0
base_suspend_security/models/ir_model_access.py
26
# -*- coding: utf-8 -*- ############################################################################## # # This module copyright (C) 2015 Therp BV (<http://therp.nl>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
boundlessgeo/QGIS
refs/heads/master
python/plugins/processing/gui/TestTools.py
4
# -*- coding: utf-8 -*- """ *************************************************************************** TestTools.py --------------------- Date : February 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com ***************************...
nippled/dronecoin
refs/heads/master
contrib/wallettools/walletchangepass.py
15
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:10332") pwd = raw_input("Enter old wallet passphrase: ") pwd2 = raw_input("Enter new wallet passphrase: ") access.walletpassphrasechange(pwd, pwd2)
tashaxe/Red-DiscordBot
refs/heads/develop
lib/cffi/api.py
19
import sys, types from .lock import allocate_lock from .error import CDefError from . import model try: callable except NameError: # Python 3.1 from collections import Callable callable = lambda x: isinstance(x, Callable) try: basestring except NameError: # Python 3.x basestring = str c...
TheBoegl/letsencrypt
refs/heads/master
letsencrypt-apache/letsencrypt_apache/tests/configurator_test.py
1
# pylint: disable=too-many-public-methods """Test for letsencrypt_apache.configurator.""" import os import shutil import socket import unittest import mock from acme import challenges from letsencrypt import achallenges from letsencrypt import errors from letsencrypt.tests import acme_util from letsencrypt_apache ...
maximumG/exscript
refs/heads/master
Exscript/protocols/drivers/zte.py
3
# # Copyright (C) 2010-2017 Samuel Abels # The MIT License (MIT) # # 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,...
Laurawly/tvm-1
refs/heads/master
python/tvm/topi/sparse/__init__.py
5
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
GBhack/PFE-VA_Dev
refs/heads/master
components/fl/pb.py
2
""" pb.py Functional Level module : PushButton manager Keeps track of the pushbutton's history Waits for a TCP request on its own port When gets a request, responds with True if the button has been pushed since last request """ #!/usr/bin/python3.5 #-*- coding: utf-8 -*- ###Standard imports :...
mic4ael/indico
refs/heads/master
indico/migrations/versions/20191108_1402_39a25a873063_add_editing_file_types_table.py
5
"""Add editing file_types table Revision ID: 39a25a873063 Revises: bb522e9f9066 Create Date: 2019-11-08 14:02:33.351292 """ import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql from sqlalchemy.sql.ddl import CreateSchema, DropSchema # revision identifiers, used by Alembic. revis...
appleseedhq/gaffer
refs/heads/master
startup/Gaffer/loopCompatibility.py
8
########################################################################## # # Copyright (c) 2018, Image Engine Design 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: # # * Redistrib...
percy-g2/Novathor_xperia_u8500
refs/heads/master
6.1.1.B.0.253/external/webkit/Tools/Scripts/webkitpy/common/net/testoutputset.py
15
#!/usr/bin/env python # 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: # # 1. Redistributions of source code must retain the above copyright # notice, this lis...
mindnervestech/mnrp
refs/heads/master
addons/website_hr/models/__init__.py
439
import hr
Gustry/inasafe
refs/heads/develop
safe/gui/tools/help/needs_manager_help.py
3
# coding=utf-8 """Context help for minimum needs manager dialog.""" from safe.utilities.i18n import tr from safe import messaging as m from safe.messaging import styles from safe.utilities.resources import resources_path SUBSECTION_STYLE = styles.SUBSECTION_LEVEL_3_STYLE INFO_STYLE = styles.BLUE_LEVEL_4_STYLE __auth...
barmalei/scalpel
refs/heads/master
test/gravity/tae/corpora/test_conll.py
2
from gravity.tae.corpora.conll import CoNLL, CoNLL2002, CoNLL2003, CoNLL2000 from gravity.tae.tokenizer import Token import unittest, os, re class TestCoNLL(unittest.TestCase): def test_conll(self): self.assertEqual(os.path.exists(CoNLL.home()), True) def f(): CoNLL.path('ddd') self.as...
nvoron23/statsmodels
refs/heads/master
statsmodels/graphics/functional.py
31
"""Module for functional boxplots.""" from statsmodels.compat.python import combinations, range import numpy as np from scipy import stats from scipy.misc import factorial from . import utils __all__ = ['fboxplot', 'rainbowplot', 'banddepth'] def fboxplot(data, xdata=None, labels=None, depth=None, method='MBD', ...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.6/Lib/encodings/johab.py
816
# # johab.py: Python Unicode Codec for JOHAB # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_kr, codecs import _multibytecodec as mbc codec = _codecs_kr.getcodec('johab') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrement...
barbarubra/Don-t-know-What-i-m-doing.
refs/heads/master
python/src/Lib/test/test_set.py
48
import unittest from test import test_support import gc import weakref import operator import copy import pickle import os from random import randrange, shuffle import sys import collections class PassThru(Exception): pass def check_pass_thru(): raise PassThru yield 1 class BadCmp: def __hash__(self)...
2ndQuadrant/ansible
refs/heads/master
lib/ansible/modules/windows/win_shortcut.py
52
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Dag Wieers (@dagwieers) <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supporte...
thesgc/shergar
refs/heads/master
shergar/shergar/__init__.py
12133432
haad/ansible-modules-extras
refs/heads/devel
univention/__init__.py
12133432
IEEECS-VIT/IEEECS-VIT-Website
refs/heads/master
ieeecsvit/__init__.py
12133432
langner/cclib
refs/heads/master
cclib/bridge/cclib2pyquante.py
3
# -*- coding: utf-8 -*- # # Copyright (c) 2020, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Bridge for using cclib data in PyQuante (http://pyquante.sourceforge.net).""" import numpy from cclib.parser...
miles0411/pm
refs/heads/master
venv/lib/python2.7/site-packages/pip/utils/deprecation.py
271
""" A module that implments tooling to enable easy warnings about deprecations. """ from __future__ import absolute_import import logging import warnings class PipDeprecationWarning(Warning): pass class RemovedInPip8Warning(PipDeprecationWarning, PendingDeprecationWarning): pass class RemovedInPip9Warnin...
akurtakov/Pydev
refs/heads/master
plugins/org.python.pydev.jython/Lib/encodings/iso8859_6.py
593
""" Python Character Mapping Codec iso8859_6 generated from 'MAPPINGS/ISO8859/8859-6.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_table) def decode(self,input,errors='...
acsone/account-financial-reporting
refs/heads/8.0
account_financial_report_horizontal/__openerp__.py
12
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2012 Therp BV (<http://therp.nl>), # Copyright (C) 2013 Agile Business Group sagl # (<http://www.agilebg.com>) (<lorenzo.battistini@...
agileblaze/OpenStackTwoFactorAuthentication
refs/heads/master
horizon/openstack_dashboard/test/integration_tests/pages/admin/system/resource_usage/__init__.py
12133432
zkraime/osf.io
refs/heads/develop
website/addons/citations/__init__.py
12133432
QijunPan/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/qux2/__init__.py
12133432
patjouk/djangogirls
refs/heads/master
story/management/__init__.py
12133432
muntasirsyed/intellij-community
refs/heads/master
python/testData/resolve/multiFile/resolveQualifiedSuperClassInPackage/foo/__init__.py
12133432
mhbu50/frappe
refs/heads/develop
frappe/core/doctype/has_domain/__init__.py
12133432
ssarangi/numba
refs/heads/master
numba/__init__.py
5
""" Expose top-level symbols that are safe for import * """ from __future__ import print_function, division, absolute_import import re from . import testing, decorators from . import errors, special, types, config # Re-export typeof from .special import * from .errors import * from .pycc.decorators import export, exp...
batxes/4Cin
refs/heads/master
SHH_INV_models/SHH_INV_models_final_output_0.2_-0.1_10000/SHH_INV_models28974.py
4
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
adngdb/socorro
refs/heads/master
webapp-django/crashstats/supersearch/tests/test_utils.py
3
import datetime from nose.tools import eq_ from django.utils.timezone import utc from crashstats.crashstats.tests.test_views import BaseTestViews from crashstats.topcrashers.views import get_date_boundaries class TestDateBoundaries(BaseTestViews): def test_get_date_boundaries(self): # Simple test. ...
mnahm5/django-estore
refs/heads/master
src/newsletter/forms.py
43
from django import forms from .models import SignUp class ContactForm(forms.Form): full_name = forms.CharField(required=False) email = forms.EmailField() message = forms.CharField() class SignUpForm(forms.ModelForm): class Meta: model = SignUp fields = ['full_name', 'email'] ### exclude = ['full_name'] ...
hustcalm/seabios-hacking
refs/heads/master
tools/acpi_extract.py
4
#!/usr/bin/python # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin <mst@redhat.com> # # This file may be distributed under the terms of the GNU GPLv3 license. # Process mixed ASL/AML listing (.lst file) produced by iasl -l # Locate and execute ACPI_EXTRACT directives, output offset info # # Documentation of ACP...
devananda/ironic
refs/heads/master
ironic/dhcp/base.py
4
# Copyright 2014 Rackspace, 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 b...
tdeitch/faceoff
refs/heads/master
lib/merge-js-css-html.py
1
import sys import re # look for external script and css etc tags and read in files and insert into output file # this will probably be fairly brittle (ie will most likely only work for this app) html=open(sys.argv[1]) js_re=re.compile(r'<script .*?src=[\'"]([^\'"]*?)[\'"].*?</script>') css_re=re.compile(r'<link .*?hr...
KristianOellegaard/django-filer
refs/heads/develop
filer/server/backends/xsendfile.py
1
#-*- coding: utf-8 -*- from django.http import HttpResponse from filer.server.backends.base import ServerBase class ApacheXSendfileServer(ServerBase): def serve(self, request, file, **kwargs): response = HttpResponse() response['X-Sendfile'] = file.path self.default_headers(request, respon...
acsone/account-analytic
refs/heads/8.0
procurement_analytic/models/procurement.py
2
# -*- coding: utf-8 -*- # © 2016 Carlos Dauden <carlos.dauden@tecnativa.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import fields, models class ProcurementOrder(models.Model): _inherit = 'procurement.order' account_analytic_id = fields.Many2one( comodel_name='ac...
AlexS12/PyFME
refs/heads/master
src/pyfme/aircrafts/tests/test_cessna_310.py
2
# -*- coding: utf-8 -*- """ Python Flight Mechanics Engine (PyFME). Copyright (c) AeroPython Development Team. Distributed under the terms of the MIT License. Created on Sat Jan 9 23:56:51 2016 @author:olrosales@gmail.com @AeroPython """ from numpy.testing import assert_array_almost_equal from pyfm...
jun-wan/scilifelab
refs/heads/master
scilifelab/lims_utils/valitadion_of_LIMS_upgrade.py
4
#!/usr/bin/env python """valitadion_of_LIMS_upgrade.py is a script to compare extraction output from lims stage server and lims production server. The comparison is based on the objects created to build documents in the projects database on status db. A recursive function compares all values in the objects and any ...
aliyun/oss-ftp
refs/heads/master
python27/win32/Lib/test/test_inspect.py
35
import re import sys import types import unittest import inspect import linecache import datetime from UserList import UserList from UserDict import UserDict from test.test_support import run_unittest, check_py3k_warnings with check_py3k_warnings( ("tuple parameter unpacking has been removed", SyntaxWarning),...
alexissmirnov/donomo
refs/heads/master
donomo_archive/deps/reportlab/docs/userguide/ch9_future.py
2
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/docs/userguide/ch9_future.py from reportlab.tools.docco.rl_doc_utils import * heading1("Future Directions") disc("""We have a very long list of thing...
reingart/gui2py
refs/heads/master
samples/chat/chat.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- "Minimal gui2py CHAT application (to be used as skeleton)" from __future__ import with_statement # for python 2.5 compatibility __author__ = "Mariano Reingart (reingart@gmail.com)" __copyright__ = "Copyright (C) 2016 Mariano Reingart" __license__ = "LGPL 3.0" import gui ...
scmsqhn/changhongmall
refs/heads/master
jieba-0.38/jieba/posseg/__init__.py
1
from __future__ import absolute_import, unicode_literals import os import re import sys import jieba import pickle from .._compat import * from .viterbi import viterbi PROB_START_P = "prob_start.p" PROB_TRANS_P = "prob_trans.p" PROB_EMIT_P = "prob_emit.p" CHAR_STATE_TAB_P = "char_state_tab.p" re_han_det...
zturchan/CMPUT410-Lab4
refs/heads/master
env-lab4/lib/python2.7/re.py
4
/usr/lib/python2.7/re.py
currychou/1
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/atexit.py
743
"""allow programmer to define multiple exit functions to be executedupon normal program termination. Two public functions, register and unregister, are defined. """ class __loader__(object): pass def _clear(*args,**kw): """_clear() -> None Clear the list of previously registered exit functions.""" ...
igemsoftware/SYSU-Software2013
refs/heads/master
project/Python27/Lib/site-packages/win32/Demos/rastest.py
17
# rastest.py - test/demonstrate the win32ras module. # Much of the code here contributed by Jethro Wright. import sys import os import win32ras # Build a little dictionary of RAS states to decent strings. # eg win32ras.RASCS_OpenPort -> "OpenPort" stateMap = {} for name, val in win32ras.__dict__.items(): if name[...
saurabh6790/test-med-lib
refs/heads/master
core/doctype/workflow_transition/workflow_transition.py
578
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes class DocType: def __init__(self, d, dl): self.doc, self.doclist = d, dl
KadVenku/google-diff-match-patch
refs/heads/master
python2/diff_match_patch_test.py
319
#!/usr/bin/python2.4 """Test harness for diff_match_patch.py Copyright 2006 Google Inc. http://code.google.com/p/google-diff-match-patch/ 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://...
EvaSDK/sqlalchemy
refs/heads/master
examples/versioned_history/__init__.py
30
""" Illustrates an extension which creates version tables for entities and stores records for each change. The given extensions generate an anonymous "history" class which represents historical versions of the target object. Usage is illustrated via a unit test module ``test_versioning.py``, which can be run via nose:...
kjurek/pyTotalActivation
refs/heads/master
setup.py
2
import os from setuptools import setup, find_packages PACKAGES = find_packages() # Get version and release info, which is all stored in TotalActivation/version.py ver_file = os.path.join('TotalActivation', 'version.py') with open(ver_file) as f: exec(f.read()) opts = dict(name=NAME, maintainer=MAINTAI...
dnxbjyj/python-basic
refs/heads/master
gui/wxpython/wxPython-demo-4.0.1/samples/floatcanvas/GroupDemo.py
1
#!/usr/bin/env python """ A small demo of how to use Groups of Objects """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("..") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): ""...
yamt/neutron
refs/heads/master
quantum/common/__init__.py
32
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira Networks, 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.apach...
RogerioBorba/geonode
refs/heads/master
geonode/people/tests.py
30
######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 #...
Juniper/ceilometer
refs/heads/master
ceilometer/agent/manager.py
1
# # Copyright 2012-2013 eNovance <licensing@enovance.com> # # 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...