repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
victor-prado/broker-manager
refs/heads/master
environment/lib/python3.5/site-packages/pytz/exceptions.py
657
''' Custom exceptions raised by pytz. ''' __all__ = [ 'UnknownTimeZoneError', 'InvalidTimeError', 'AmbiguousTimeError', 'NonExistentTimeError', ] class UnknownTimeZoneError(KeyError): '''Exception raised when pytz is passed an unknown timezone. >>> isinstance(UnknownTimeZoneError(), LookupError)...
xin3liang/platform_external_chromium_org
refs/heads/master
tools/telemetry/telemetry/core/backends/chrome/extension_backend.py
16
# 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. import collections from telemetry.core import extension_page from telemetry.core.backends.chrome import inspector_backend_list class ExtensionBackendList(...
anwarMov/android_device_asus_a500cg-1
refs/heads/master
libintelprov/releasetools/mfld_osimage.py
3
#!/usr/bin/env python # Copyright (C) 2011 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/licenses/LICENSE-2.0 # # Unless required by applic...
MattDevo/edk2
refs/heads/master
AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_property.py
9
# Test case for property # more tests are in test_descr import sys import unittest from test.test_support import run_unittest class PropertyBase(Exception): pass class PropertyGet(PropertyBase): pass class PropertySet(PropertyBase): pass class PropertyDel(PropertyBase): pass cla...
SeGarVi/moveon-web
refs/heads/master
osmlineadapters/adapters/emt_palma/tests/test_osm_line.py
1
from osmlineadapters.tests.osm_line_test import OSMLineTest from osmlineadapters.adapters.emt_palma.osm_line import OSMLine class EMTPalmaOSMLineTest(OSMLineTest): def setUp(self): self.concrete_class = OSMLine self.osmid = '5576519' super(EMTPalmaOSMLineTest, self).setUp() ...
thilaire/CodingGameServer
refs/heads/master
CGSserver/BaseClass.py
1
""" * --------------------- * | | | Coding Game Server | | | * --------------------- * Authors: T. Hilaire, J. Brajard Licence: GPL File: WebSocketBase.py Contains the base class to answer to websockets asking for information about the derived class -> defines the gene...
TimurNurlygayanov/mistral
refs/heads/master
mistral/tests/unit/actions/test_std_email_action.py
2
# -*- coding: utf-8 -*- # # Copyright 2014 - Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
snowball-one/addressify
refs/heads/master
setup.py
1
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='addressify', version="0.0.1", url='https://github.com/snowball-one/addressify', author="Jonathan Moss", author_email="open-sourc@snowballone.com.au", description="A Python wrapper around Addressify.com.au's APIs", ...
mapping/OpenClimateGIS
refs/heads/master
src/openclimategis/util/raw_sql.py
7
import os from django.db import connection def execute(sql): cursor = connection.cursor() try: cursor.execute(sql) rows = cursor.fetchall() finally: cursor.close() return(rows) def get_dataset(archive_id,variable_name,scenario_code,time_range,cm_code): sql = """ with clima...
nwjs/chromium.src
refs/heads/nw45-log
third_party/blink/tools/blinkpy/common/checkout/git_unittest.py
2
# Copyright 2016 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 sys import unittest from blinkpy.common.system.executive import Executive, ScriptError from blinkpy.common.system.executive_mock import MockExecutive...
barbuza/django
refs/heads/master
tests/choices/tests.py
526
from django.test import TestCase from .models import Person class ChoicesTests(TestCase): def test_display(self): a = Person.objects.create(name='Adrian', gender='M') s = Person.objects.create(name='Sara', gender='F') self.assertEqual(a.gender, 'M') self.assertEqual(s.gender, 'F')...
KontorConsulting/odoo
refs/heads/8.0
addons/resource/tests/test_resource.py
47
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
heke123/chromium-crosswalk
refs/heads/master
tools/cr/cr/commands/debug.py
113
# 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. """A module for the run command.""" import cr class DebugCommand(cr.Command): """The implementation of the debug command. This is much like the run c...
abaditsegay/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/pythonwin/pywin/framework/editor/__init__.py
17
# __init__ for the Pythonwin editor package. # # We used to support optional editors - eg, color or non-color. # # This really isnt necessary with Scintilla, and scintilla # is getting so deeply embedded that it was too much work. import win32ui, sys, win32con defaultCharacterFormat = (-402653169, 0, 200, 0, 0, 0, 49...
raphaelahrens/doto
refs/heads/master
doto/cli/cmd/punch/in.py
2
# -*- coding: utf-8 -*- """ The command "in" can be used to add a new time record for an event. An example of its use would be $ doto punch in Punched in at 12:14 for Task "Title of task" """ import doto.model.timerecord import doto.cli.parser import doto.cli.cmd.task COMMAND = "in" CONF_DEF = {} def p...
Maspear/odoo
refs/heads/8.0
addons/l10n_be_coda/wizard/account_coda_import.py
255
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2012 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
horance-liu/tensorflow
refs/heads/master
tensorflow/contrib/ndlstm/python/misc_test.py
93
# 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 applicable ...
FederatedAI/FATE
refs/heads/master
python/federatedml/nn/hetero_nn/test/__init__.py
386048
wolfchase/ardets
refs/heads/master
__init__.py
386048
jjffryan/pymtl
refs/heads/master
pclib/fl/QueuePortProxy.py
8
#========================================================================= # QueuePortProxy #========================================================================= # These classes provide part of a standard Python deque interface, but # the implementation essentially turns the popleft() and append() methods # into a...
seagoat/mining
refs/heads/master
mining/controllers/api/cube.py
6
# -*- coding: utf-8 -*- import json from bottle import Bottle from bottle.ext.mongo import MongoPlugin import datetime from mining.utils import conf, parse_dumps from mining.tasks import process from .base import get, post, put, delete collection = 'cube' cube_app = Bottle() mongo = MongoPlugin( uri=conf("mongo...
overtherain/scriptfile
refs/heads/master
software/googleAppEngine/lib/django_1_4/django/conf/locale/es_MX/formats.py
86
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i' YEAR_MONTH_FORMAT = r'F \d\e Y' MONTH_DAY_FORMAT = r'j \d\e F' SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATETIME_FORMAT...
Julius2342/pyvlx
refs/heads/master
test/frame_discover_nodes_ntf_test.py
1
"""Unit tests for FrameDiscoverNodesNotification.""" import unittest from pyvlx.api.frame_creation import frame_from_raw from pyvlx.api.frames import FrameDiscoverNodesNotification class TestFrameDiscoverNodesNotification(unittest.TestCase): """Test class for FrameDiscoverNodesNotification.""" # pylint: dis...
Dingmatt/AMSA
refs/heads/master
Plug-ins/Amsa.bundle/Contents/Libraries/Shared/unidecode/x0cf.py
253
data = ( 'ke', # 0x00 'keg', # 0x01 'kegg', # 0x02 'kegs', # 0x03 'ken', # 0x04 'kenj', # 0x05 'kenh', # 0x06 'ked', # 0x07 'kel', # 0x08 'kelg', # 0x09 'kelm', # 0x0a 'kelb', # 0x0b 'kels', # 0x0c 'kelt', # 0x0d 'kelp', # 0x0e 'kelh', # 0x0f 'kem', # 0x10 'keb', # ...
wfxiang08/changes
refs/heads/master
migrations/versions/4d5d239d53b4_set_on_delete_cascad.py
4
"""Set ON DELETE CASCADE on TestSuite.* Revision ID: 4d5d239d53b4 Revises: 501983249c94 Create Date: 2013-12-23 16:14:08.812850 """ # revision identifiers, used by Alembic. revision = '4d5d239d53b4' down_revision = '501983249c94' from alembic import op def upgrade(): op.drop_constraint('testsuite_project_id_f...
sunzhxjs/JobGIS
refs/heads/master
lib/python2.7/site-packages/selenium/webdriver/support/select.py
67
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
ychab/mymoney-server
refs/heads/master
mymoney/formats/fr/formats.py
1
SHORT_DATE_FORMAT = 'd/m/Y' DATE_FORMAT = 'd-m-Y' DATETIME_FORMAT = 'd-m-Y H:i' SHORT_DATETIME_FORMAT = 'd-m-Y H:i' CURRENCY_PATTERN_FORMAT = '#,##0.00 ¤'
bright-sparks/chromium-spacewalk
refs/heads/master
tools/findit/crash_utils.py
4
# Copyright (c) 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. import cgi import ConfigParser import json import logging import os import time import urllib2 from result import Result INFINITY = float('inf') def...
Sing-Li/go-buildpack
refs/heads/master
builds/runtimes/python-2.7.6/lib/python2.7/lib2to3/fixes/fix_sys_exc.py
327
"""Fixer for sys.exc_{type, value, traceback} sys.exc_type -> sys.exc_info()[0] sys.exc_value -> sys.exc_info()[1] sys.exc_traceback -> sys.exc_info()[2] """ # By Jeff Balogh and Benjamin Peterson # Local imports from .. import fixer_base from ..fixer_util import Attr, Call, Name, Number, Subscript, Node, syms clas...
saurabh6790/medlib
refs/heads/master
core/doctype/workflow_document_state/__init__.py
1129
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt
ccomb/OpenUpgrade
refs/heads/master
addons/auth_openid/__init__.py
443
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
heromod/migrid
refs/heads/master
mig/user/native-https.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # # --- BEGIN_HEADER --- # # native-https - native https access # Copyright (C) 2003-2014 The MiG Project lead by Brian Vinter # # This file is part of MiG. # # MiG is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
chongtianfeiyu/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/abc.py
106
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) according to PEP 3119.""" from _weakrefset import WeakSet def abstractmethod(funcobj): """A decorator indicating abstract methods. Requires that the metaclass is ABCMeta or de...
hip-odoo/odoo
refs/heads/10.0
odoo/addons/test_new_api/tests/test_ui.py
36
import odoo.tests class TestUi(odoo.tests.HttpCase): post_install = True at_install = False def test_01_admin_widget_x2many(self): self.phantom_js("/web#action=test_new_api.action_discussions", "odoo.__DEBUG__.services['web_tour.tour'].run('widget_x2many', 100)", ...
WinawerLab/sco
refs/heads/master
sco/util/plot.py
1
#################################################################################################### # sco/util/plot.py # Plotting functions used in the SCO project # by Noah C. Benson import numpy as np import neuropythy as ny import pyrsistent as pyr import pint, pimms, os def cortical_ima...
astrofrog/ginga
refs/heads/master
ginga/BaseImage.py
1
# # BaseImage.py -- Abstraction of an generic data image. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import math import numpy import logging from ginga.misc impo...
p0psicles/SickGear
refs/heads/master
lib/html5lib/trie/datrie.py
785
from __future__ import absolute_import, division, unicode_literals from datrie import Trie as DATrie from six import text_type from ._base import Trie as ABCTrie class Trie(ABCTrie): def __init__(self, data): chars = set() for key in data.keys(): if not isinstance(key, text_type): ...
googleapis/python-workflows
refs/heads/master
tests/unit/__init__.py
962
# -*- coding: utf-8 -*- # 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...
pelle/talk.org
refs/heads/master
django/newforms/forms.py
2
""" Form classes """ from copy import deepcopy from django.utils.datastructures import SortedDict from django.utils.html import escape from django.utils.encoding import StrAndUnicode, smart_unicode, force_unicode from django.utils.safestring import mark_safe from fields import Field, FileField from widgets import Te...
itsjeyd/edx-platform
refs/heads/master
common/djangoapps/pipeline_mako/tests/test_render.py
23
""" Tests for rendering functions in the mako pipeline. """ import ddt from unittest import skipUnless from django.conf import settings from django.test import TestCase from paver.easy import call_task from pipeline_mako import render_require_js_path_overrides, compressed_css, compressed_js class RequireJSPathOver...
meownoid/tensorfow-rbm
refs/heads/master
tfrbm/util.py
1
import numpy as np import tensorflow as tf def xavier_init(fan_in, fan_out, *, const=1.0, dtype=tf.dtypes.float32): k = const * np.sqrt(6.0 / (fan_in + fan_out)) return tf.random.uniform((fan_in, fan_out), minval=-k, maxval=k, dtype=dtype) def sample_bernoulli(ps): return tf.nn.relu(tf.sign(ps - tf.rand...
AMOboxTV/AMOBox.LegoBuild
refs/heads/master
plugin.video.specto/resources/lib/sources/yify_mv_null.py
6
# -*- coding: utf-8 -*- ''' Specto 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 l...
thjashin/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/confusion_matrix_test.py
52
# 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...
abdoosh00/edx-platform
refs/heads/master
cms/djangoapps/contentstore/management/commands/tests/test_export_convert_format.py
65
""" Test for export_convert_format. """ from unittest import TestCase from django.core.management import call_command, CommandError from tempfile import mkdtemp import shutil from path import path from contentstore.management.commands.export_convert_format import Command, extract_source from xmodule.tests.helpers impor...
molebot/brython
refs/heads/master
www/speed/benchmarks/b.py
17
table = [range(100) for i in range(100)] class a(object): def main(self, table): _buffer = [] _buffer_write = _buffer.append _buffer_write(u'<table xmlns:py="http://spitfire/">') _buffer_write(u'\n') for row in table: _buffer_write(u'<tr>') _buffer_write(u'\n') for column in row...
alvin319/CarnotKE
refs/heads/master
jyhton/lib-python/2.7/test/test_complex.py
94
import unittest from test import test_support from random import random from math import atan2, isnan, copysign INF = float("inf") NAN = float("nan") # These tests ensure that complex math does the right thing class ComplexTest(unittest.TestCase): def assertAlmostEqual(self, a, b): if isinstance(a, comp...
ovnicraft/edx-sga
refs/heads/master
edx_sga/management/commands/__init__.py
48
# pylint: disable=missing-docstring
PurpleMyst/porcupine
refs/heads/master
bump.py
1
#!/usr/bin/env python3 """Bump the Porcupine version number.""" import argparse import os import subprocess from porcupine import version_info as old_info def bump_version(new_info, git_commit_args): path = os.path.join('porcupine', '__init__.py') with open(path, 'r') as f: content = f.read() as...
marcel-dancak/QGIS
refs/heads/master
python/gui/auto_additions/qgscolorbutton.py
56
# The following has been generated automatically from src/gui/qgscolorbutton.h QgsColorButton.Behavior.baseClass = QgsColorButton
UGentPortaal/django-ldapdb-archived
refs/heads/master
ldapdb/backends/ldap/base.py
2
# -*- coding: utf-8 -*- # # django-ldapdb # Copyright (c) 2009-2010, Bolloré telecom # All rights reserved. # # See AUTHORS file for a full list of contributors. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # ...
KasperPRasmussen/bokeh
refs/heads/master
sphinx/source/docs/user_guide/source_examples/interaction_button.py
44
from bokeh.models.widgets import Button from bokeh.io import output_file, show, vform output_file("button.html") button = Button(label="Foo", type="success") show(vform(button))
mbusb/multibootusb
refs/heads/master
scripts/colorama/ansitowin32.py
2
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. import re import sys import os from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style from .winterm import WinTerm, WinColor, WinStyle from .win32 import windll, winapi_test winterm = None if windll is not None: winterm = WinTerm() def ...
p2pjack/beastmode-1.5
refs/heads/bm-wip
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
rosmo/ansible
refs/heads/devel
test/units/module_utils/facts/test_collectors.py
78
# unit tests for ansible fact collectors # -*- coding: utf-8 -*- # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansibl...
kevinkle/semantic
refs/heads/master
superphy/src/upload/python/sparql/genomes.py
1
#!/usr/bin/python from sparql.endpoint import Endpoint from sparql.prefixes import prefixes def get_all_syndromes(): """ input - None output - list of all the unique syndromes """ string = prefixes + """ SELECT ?syndromes WHERE { ?_Syndrome_Uri rdf:type :isolation_syndrom...
stableShip/tornado_async_mysql
refs/heads/master
configs/config.py
6
import ConfigParser import os configParser = ConfigParser.ConfigParser() filePath = os.path.split(os.path.realpath(__file__))[0] configFile = filePath + "/development.conf" configParser.read(configFile)
tttthemanCorp/CardmeleonAppEngine
refs/heads/master
django/contrib/gis/db/models/proxy.py
404
""" The GeometryProxy object, allows for lazy-geometries. The proxy uses Python descriptors for instantiating and setting Geometry objects corresponding to geographic model fields. Thanks to Robert Coup for providing this functionality (see #4322). """ class GeometryProxy(object): def __init__(self, klass, field...
jelly/calibre
refs/heads/master
src/calibre/ebooks/mobi/writer8/tbs.py
2
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' DOC = ''' Tra...
Senseg/Py4A
refs/heads/master
python-build/python-libs/gdata/build/lib/gdata/apps/emailsettings/service.py
143
#!/usr/bin/python # # Copyright (C) 2008 Google, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
zaqwes8811/matlab_ext
refs/heads/master
code-miners/extern/cppclean/cpp/keywords.py
1
# # Copyright 2007 Neal Norwitz # Portions Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
marcuskelly/recover
refs/heads/master
Lib/site-packages/coverage/config.py
5
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Config file for coverage.py""" import collections import os import re import sys from coverage.backward import configparser, iitems, string_class from coverage...
dslomov/intellij-community
refs/heads/master
python/testData/highlighting/unicodeOrByte30.py
83
# no need for from __future__ import unicode_literals z = ( <info descr="null">"simple"</info> <info descr="null">"escaped <info descr="null">\u1234</info> correct"</info> <info descr="null">"escaped <error descr="Invalid escape sequence">\u123z</error> incorrect"</info> <info descr="null">"escaped <in...
harikishen/addons-server
refs/heads/master
src/olympia/addons/urls.py
1
from django.conf.urls import include, url from django.views.decorators.csrf import csrf_exempt from django.shortcuts import redirect from django.views.decorators.cache import cache_page from olympia.stats.urls import stats_patterns from . import buttons from . import views ADDON_ID = r"""(?P<addon_id>[^/<>"']+)""" ...
caseyrollins/osf.io
refs/heads/develop
api_tests/addons_tests/test_addons_list.py
20
import pytest from api.base.settings.defaults import API_BASE @pytest.mark.django_db class TestAddonsList: def test_filter_by_category(self, app): url = '/{}addons/'.format(API_BASE) url_storage = '{}?filter[categories]=storage'.format(url) url_citations = '{}?filter[categories]=citation...
jrmyp/attelo
refs/heads/master
attelo/parser/interface.py
3
""" Basic interface that all parsers should respect """ import numpy as np from abc import ABCMeta, abstractmethod from six import with_metaclass from attelo.table import (Graph, UNKNOWN, UNRELATED) # pylint: disable=too-few-public-methods class Parser(with_metaclass(ABCMeta, object)): """ Parsers follow t...
jaelle/blockly-page-editor
refs/heads/gh-pages
closure-library/closure/bin/labs/code/generate_jsdoc.py
222
#!/usr/bin/env python # # Copyright 2013 The Closure Library 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 ...
milchakov/omim
refs/heads/master
tools/python/data/base.py
4
import os import sys from collections import defaultdict import setuptools module_dir = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(module_dir, "..", "..", "..")) from pyhelpers.setup import chdir from pyhelpers.setup import get_version DATA_PATH = os.path.abspath( os.path.join(o...
h3/django-webcore
refs/heads/master
webcore/contrib/frontadmin/templatetags/frontadmin_tags.py
1
#import re, os, locale, HTMLParser #from decimal import * from django import template from django.template import RequestContext, Context from django.core.urlresolvers import reverse from django.utils.safestring import SafeUnicode from webcore.contrib.frontadmin.conf import settings from webcore.contrib.frontadmin.plu...
John-Boik/Principled-Societies-Project
refs/heads/master
leddaApp/static/brython/src/Lib/unittest/case.py
743
"""Test case implementation""" import sys import functools import difflib import pprint import re import warnings import collections from . import result from .util import (strclass, safe_repr, _count_diff_all_purpose, _count_diff_hashable) __unittest = True DIFF_OMITTED = ('\nDiff is %s charact...
overtherain/scriptfile
refs/heads/master
software/googleAppEngine/google/net/proto2/python/public/message.py
5
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
openplans/shareabouts-miami
refs/heads/master
scripts/ioby_scraperwiki.py
2
#!/usr/bin/env python import json import lxml.html import scraperwiki # Scrape the project list page html = scraperwiki.scrape("http://ioby.org/projects?phrase=&status=All&vols=All&sort_by=title&sort_order=ASC&items_per_page=All") root = lxml.html.fromstring(html) for project in root.cssselect(".project-miniview"): ...
AkA84/edx-platform
refs/heads/master
lms/djangoapps/lti_provider/outcomes.py
50
""" Helper functions for managing interactions with the LTI outcomes service defined in LTI v1.1. """ import logging from lxml import etree from lxml.builder import ElementMaker import requests import requests_oauthlib import uuid from lti_provider.models import GradedAssignment, OutcomeService log = logging.getLogg...
pvagner/orca
refs/heads/master
test/keystrokes/firefox/line_nav_empty_textarea.py
1
#!/usr/bin/python """Test of line navigation.""" from macaroon.playback import * import utils sequence = MacroSequence() # Work around some new quirk in Gecko that causes this test to fail if # run via the test harness rather than manually. sequence.append(KeyComboAction("<Control>r")) sequence.append(utils.StartR...
kerr-huang/python-for-android
refs/heads/master
recipes/android/src/android/__init__.py
37
''' Android module ============== ''' # legacy import from android._android import *
didzis/CAMR
refs/heads/master
stanfordnlp/unidecode/x0d1.py
253
data = ( 'tyal', # 0x00 'tyalg', # 0x01 'tyalm', # 0x02 'tyalb', # 0x03 'tyals', # 0x04 'tyalt', # 0x05 'tyalp', # 0x06 'tyalh', # 0x07 'tyam', # 0x08 'tyab', # 0x09 'tyabs', # 0x0a 'tyas', # 0x0b 'tyass', # 0x0c 'tyang', # 0x0d 'tyaj', # 0x0e 'tyac', # 0x0f 'tyak', # ...
paolodedios/tensorflow
refs/heads/master
tensorflow/python/saved_model/simple_save.py
24
# 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...
luis-rr/saga-python
refs/heads/master
src/saga/adaptors/cpi/advert/__init__.py
10
__author__ = "Andre Merzky" __copyright__ = "Copyright 2013, The SAGA Project" __license__ = "MIT" from saga.adaptors.cpi.advert.entry import Entry from saga.adaptors.cpi.advert.directory import Directory
lightcn/odoo
refs/heads/8.0
addons/mass_mailing/models/mail_mail.py
114
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
yxcoin/yxcoin
refs/heads/master
src/boost_1_55_0/libs/python/pyste/src/Pyste/ClassExporter.py
54
# Copyright Bruno da Silva de Oliveira 2003. Use, modification and # distribution is subject to the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import exporters from Exporter import Exporter from declarations import * from settings ...
sergio-incaser/odoo
refs/heads/8.0
addons/point_of_sale/wizard/pos_confirm.py
343
# -*- 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...
aborrero/pkg-rpmlint
refs/heads/master
test/test_scl.py
1
import os import sys import SCLCheck import Testing # add rpmlint-scl, rpmlint and rpmlint/tools to PATH # also add rpmlint-scl/tools, so this keeps working once merged with rpmlint for directory in ['../rpmlint/tools', '../rpmlint', '../tools', '..']: sys.path.insert(0, os.path.join(os.path.dirname(__file__), d...
gpotter2/scapy
refs/heads/master
scapy/sendrecv.py
2
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ Functions to send and receive packets. """ from __future__ import absolute_import, print_function import itertools from t...
dlacombejr/deepy
refs/heads/master
deepy/conf/nn_config.py
5
#!/usr/bin/env python # -*- coding: utf-8 -*- from deepy.utils import UniformInitializer from config import GeneralConfig import logging as loggers logging = loggers.getLogger(__name__) DEFAULT_NETWORK_SETTING = {} class NetworkConfig(GeneralConfig): """ Network configuration container. """ def __in...
e-democracy/edemsignups
refs/heads/master
lib/gdata/youtube/data.py
115
#!/usr/bin/python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
vitan/hue
refs/heads/master
desktop/core/src/desktop/lib/paginator.py
40
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
adaur/SickRage
refs/heads/master
lib/requests/packages/urllib3/connectionpool.py
61
import errno import logging import sys import warnings from socket import error as SocketError, timeout as SocketTimeout import socket try: # Python 3 from queue import LifoQueue, Empty, Full except ImportError: from Queue import LifoQueue, Empty, Full import Queue as _ # Platform-specific: Windows fr...
xin3liang/platform_external_chromium_org_tools_gyp
refs/heads/master
test/msvs/uldi2010/gyptest-all.py
348
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that uldi can be disabled on a per-project-reference basis in vs2010. """ import TestGyp test = TestGyp.TestGyp(formats=['msv...
mugizico/scikit-learn
refs/heads/master
examples/svm/plot_svm_kernels.py
329
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= SVM-Kernels ========================================================= Three different types of SVM-Kernels are displayed below. The polynomial and RBF are especially useful when the data-points are not linearly sep...
Distrotech/libchamplain
refs/heads/distrotech-libchamplain
demos/launcher-gtk.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from gi.repository import GtkClutter, Clutter GtkClutter.init([]) # Must be initialized before importing those: from gi.repository import GObject, Gtk, Champlain, GtkChamplain, Pango import os, sys os.chdir(os.path.dirname(os.path.abspath(sys.argv[0]))) class LauncherGTK...
lupyuen/RaspberryPiImage
refs/heads/master
home/pi/GrovePi/Software/Python/others/temboo/Library/USPS/DeliveryInformationAPI/__init__.py
5
from temboo.Library.USPS.DeliveryInformationAPI.ExpressMailServiceRequest import ExpressMailServiceRequest, ExpressMailServiceRequestInputSet, ExpressMailServiceRequestResultSet, ExpressMailServiceRequestChoreographyExecution from temboo.Library.USPS.DeliveryInformationAPI.PackageServicesRequest import PackageServicesR...
CZ-NIC/dionaea
refs/heads/master
modules/python/dionaea/memcache/__init__.py
3
import logging from dionaea import ServiceLoader from dionaea.core import connection, incident from dionaea.exception import ServiceConfigError from .command import Command from .var import VarHandler logger = logging.getLogger("memcache") logger.setLevel(logging.DEBUG) class MemcacheService(ServiceLoader): na...
Yaco-Sistemas/yith-library-server
refs/heads/master
yithlibraryserver/oauth2/authorization.py
1
# Yith Library Server is a password storage server. # Copyright (C) 2012-2013 Yaco Sistemas # Copyright (C) 2012-2013 Alejandro Blanco Escudero <alejandro.b.e@gmail.com> # Copyright (C) 2012-2013 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # This file is part of Yith Library Server. # # Yith Library Server is...
Pandaaaa906/ChemErpSystem
refs/heads/master
Product_manage/models.py
1
# -*- coding:utf-8 -*- from __future__ import unicode_literals from django.contrib.auth.models import User from django.db import models from annoying.fields import AutoOneToOneField from myModule.constants import base_permissions from myModule.models import BaseModel, has_Price, has_Measure, is_Plural, has_Readonly ...
HonzaKral/django
refs/heads/master
django/template/loaders/cached.py
12
""" Wrapper class that takes a list of template loaders as an argument and attempts to load templates from them in order, caching the result. """ import hashlib import warnings from inspect import getargspec from django.template import Origin, Template, TemplateDoesNotExist from django.utils.deprecation import Remove...
ingwinlu/pelican-plugins
refs/heads/master
ical/__init__.py
76
from .ical import *
avanzosc/odoo-addons
refs/heads/12.0
partner_language_skill/models/res_partner_lang_skill.py
2
# Copyright 2019 Oihane Crucelaegui - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import api, fields, models class ResPartnerLanguageSkill(models.Model): _name = 'res.partner.lang.skill' _description = 'Partner Language Skill' _rec_name = 'lang_skill_id' partn...
milapour/palm
refs/heads/master
palm/cutoff_parameter_set.py
1
import numpy from palm.base.parameter_set import ParameterSet class CutoffParameterSet(ParameterSet): """ Parameters for a temporal cutoff model. The parameters are `tau` and `N`. Attributes ---------- parameter_dict : dict Parameter values, indexed by parameter names. bounds : dic...
dentaku65/pelisalacarta
refs/heads/master
python/main-classic/lib/mechanize/__init__.py
133
__all__ = [ 'AbstractBasicAuthHandler', 'AbstractDigestAuthHandler', 'BaseHandler', 'Browser', 'BrowserStateError', 'CacheFTPHandler', 'ContentTooShortError', 'Cookie', 'CookieJar', 'CookiePolicy', 'DefaultCookiePolicy', 'DefaultFactory', 'FTPHandler', 'Factory', ...
markusappel/McCode
refs/heads/master
meta-pkgs/windows/Support/gnuplot-py-1.8/utils.py
4
#! /usr/bin/env python # $Id: utils.py 297 2007-03-30 11:25:28Z mhagger $ # Copyright (C) 1998-2003 Michael Haggerty <mhagger@alum.mit.edu> # # This file is licensed under the GNU Lesser General Public License # (LGPL). See LICENSE.txt for details. """utils.py -- Utility functions used by Gnuplot. This module cont...
wanghe4096/website
refs/heads/master
aliyun/api/rest/Ess20140828ModifyScalingGroupRequest.py
1
''' Created by auto_sdk on 2015.04.21 ''' from aliyun.api.base import RestApi class Ess20140828ModifyScalingGroupRequest(RestApi): def __init__(self,domain='ess.aliyuncs.com',port=80): RestApi.__init__(self,domain, port) self.ActiveScalingConfigurationId = None self.DefaultCooldown = None self.MaxSize...