repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
wengole/eveonline-assistant
refs/heads/master
eveonline-assistant/plans/__init__.py
12133432
robclark/chromium
refs/heads/master
tools/json_schema_compiler/highlighters/__init__.py
12133432
kcpawan/django
refs/heads/master
tests/migration_test_data_persistence/__init__.py
12133432
gigitux/lollypop
refs/heads/master
src/selectionlist.py
2
# Copyright (c) 2014-2015 Cedric Bellegarde <cedric.bellegarde@adishatz.org> # 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 later vers...
caseyrollins/osf.io
refs/heads/develop
tests/test_webtests.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """Functional tests using WebTest.""" import datetime as dt import httplib as http import logging import unittest import markupsafe import mock import pytest from nose.tools import * # flake8: noqa (PEP8 asserts) import re from addons.wiki.utils import to_mongo_key from ...
michalskrivanek/cockpit
refs/heads/master
test/common/testlib.py
2
# -*- coding: utf-8 -*- # This file is part of Cockpit. # # Copyright (C) 2013 Red Hat, Inc. # # Cockpit is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your...
ingokegel/intellij-community
refs/heads/master
python/testData/refactoring/move/baseClass/after/src/a.py
83
from b import B class C(B): def __init__(self): super(C, self).__init__()
hgl888/chromium-crosswalk-efl
refs/heads/efl/crosswalk-10/39.0.2171.19
native_client_sdk/src/tools/tests/chrome_mock.py
107
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import optparse import sys import time import urllib2 def PrintAndFlush(s): print s sys.stdout.flush() def main(args): pars...
teamtuga4/teamtuga4ever.repository
refs/heads/master
plugin.video.pancas/genesisresolvers.py
266
# -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any ...
vinayan3/clpricehistory
refs/heads/master
django/contrib/localflavor/ro/forms.py
273
# -*- coding: utf-8 -*- """ Romanian specific form helpers. """ import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError, Field, RegexField, Select from django.utils.translation import ugettext_lazy as _ class ROCIFField(RegexField): """ A Romanian fiscal identity co...
jborean93/ansible
refs/heads/devel
hacking/build_library/build_ansible/__init__.py
12133432
ryanjmccall/nupic
refs/heads/master
tests/integration/nupic/algorithms/monitor_mixin/__init__.py
12133432
vishwaprakashmishra/xmatrix
refs/heads/master
vumi/transports/httprpc/tests/__init__.py
12133432
ltilve/ChromiumGStreamerBackend
refs/heads/master
tools/chrome_proxy/integration_tests/__init__.py
12133432
ingenieroariel/geonode
refs/heads/master
geonode/contrib/api_basemaps/tests.py
12133432
40223144/2015cdafinal
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/xml/sax/saxutils.py
730
"""\ A library of useful helper classes to the SAX classes, for the convenience of application and driver writers. """ import os, urllib.parse, urllib.request import io from . import handler from . import xmlreader def __dict_replace(s, d): """Replace substrings of a string using a dictionary.""" for key, val...
lthurlow/Network-Grapher
refs/heads/master
proj/external/networkx-1.7/networkx/algorithms/tests/test_distance_regular.py
87
#!/usr/bin/env python from nose.tools import * import networkx as nx class TestDistanceRegular: def test_is_distance_regular(self): assert_true(nx.is_distance_regular(nx.icosahedral_graph())) assert_true(nx.is_distance_regular(nx.petersen_graph())) assert_true(nx.is_distance_regular(nx.cub...
rversteegen/commandergenius
refs/heads/sdl_android
project/jni/python/src/Lib/bsddb/test/test_lock.py
33
""" TestCases for testing the locking sub-system. """ import time import unittest from test_all import db, test_support, verbose, have_threads, \ get_new_environment_path, get_new_database_path if have_threads : from threading import Thread import sys if sys.version_info[0] < 3 : from thr...
Arulselvanmadhavan/Artist_Recognition_from_Audio_Features
refs/heads/master
MRTasks/parsingTasks/listS3Files.py
2
import sys __author__ = 'arul' from boto.s3.connection import S3Connection if __name__ == '__main__': access_key = sys.argv[1] access_secret = sys.argv[2] conn = S3Connection(access_key,access_secret) bucket = conn.get_bucket('cs6240_msd') for key in bucket.list(prefix='cs6240_msd/'): pr...
reunition/reunition
refs/heads/master
reunition/settings/development.py
1
from .base import * DEBUG = True INTERNAL_IPS = ["127.0.0.1"] SECRET_KEY = "secret" CACHES = { "default": { "BACKEND": "django.core.cache.backends.dummy.DummyCache" } } EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" ## DJANGO DEBUG TOOLBAR SETTINGS # https://django-debug-toolbar...
CloudWareChile/OpenChile
refs/heads/master
openerp/addons/mrp_repair/wizard/__init__.py
445
# -*- 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...
Celedhrim/persomov
refs/heads/master
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/twitch.py
19
# coding: utf-8 from __future__ import unicode_literals import itertools import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( ExtractorError, parse_iso8601, ) class TwitchIE(InfoExtractor): # TODO: One broadcast ma...
pyhmsa/pyhmsa
refs/heads/master
pyhmsa/type/test_numerical.py
1
""" """ # Standard library modules. import unittest import logging import pickle # Third party modules. import numpy as np # Local modules. from pyhmsa.type.numerical import convert_value, validate_dtype, convert_unit # Globals and constants variables. class TestModule(unittest.TestCase): def setUp(self): ...
ovnicraft/odoo
refs/heads/8.0
addons/crm_profiling/crm_profiling.py
333
# -*- 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...
mhvk/astropy
refs/heads/placeholder
astropy/wcs/tests/conftest.py
8
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from astropy import wcs from . helper import SimModelTAB @pytest.fixture(scope='module') def tab_wcs_2di(): model = SimModelTAB(nx=150, ny=200) # generate FITS HDU list: hdulist = model.hdulist # cre...
yamt/tempest
refs/heads/master
tempest/api/object_storage/test_container_services.py
11
# 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...
sudheerchintala/LearnEraPlatForm
refs/heads/master
common/djangoapps/track/tracker.py
239
""" Module that tracks analytics events by sending them to different configurable backends. The backends can be configured using Django settings as the example below:: TRACKING_BACKENDS = { 'tracker_name': { 'ENGINE': 'class.name.for.backend', 'OPTIONS': { 'host': ... , ...
qgis/QGIS
refs/heads/master
python/core/additions/fromfunction.py
57
# -*- coding: utf-8 -*- """ *************************************************************************** fromfunction.py --------------------- Date : May 2018 Copyright : (C) 2018 by Denis Rouzaud Email : denis@opengis.ch ************************************...
aYukiSekiguchi/ACCESS-Chromium
refs/heads/master
tools/code_coverage/coverage_posix.py
9
#!/usr/bin/env python # Copyright (c) 2011 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. """Generate and process code coverage. TODO(jrg): rename this from coverage_posix.py to coverage_all.py! Written for and tested o...
Maccimo/intellij-community
refs/heads/master
python/testData/intentions/PyInvertIfConditionIntentionTest/commentsNoinspectionNoElseReturnFollowup.py
10
def func(): value = "not-none" <caret>if value is None: print("None") return # noinspection SomeInspection print(value)
thomashaw/SecGen
refs/heads/master
modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/MyHTTPServer.py
2
#!/usr/bin/env python import SimpleHTTPServer import SocketServer import os import sys PORT = 80 class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): #log_file = open('myhttplogfile.txt', 'w') log_file = open('/var/log/myhttplogfile.txt', 'w') def log_message(self, format, *args): self...
keen99/SickRage
refs/heads/master
lib/sqlalchemy/dialects/postgresql/psycopg2.py
75
# postgresql/psycopg2.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: postgresql+psycopg2 :name: psycopg2 :dbapi: psycopg2 ...
diegoguimaraes/django
refs/heads/master
django/contrib/gis/gdal/prototypes/generation.py
100
""" This module contains functions that generate ctypes prototypes for the GDAL routines. """ from ctypes import c_char_p, c_double, c_int, c_void_p from django.contrib.gis.gdal.prototypes.errcheck import ( check_arg_errcode, check_errcode, check_geom, check_geom_offset, check_pointer, check_srs, check_str_a...
liushuaikobe/evermd
refs/heads/master
lib/evernote/api/__init__.py
12133432
olegpshenichniy/Booktype
refs/heads/master
lib/booktypecontrol/migrations/__init__.py
12133432
c-rhodes/hack2014
refs/heads/master
hack2014/category/__init__.py
12133432
moreati/django
refs/heads/master
django/core/checks/security/__init__.py
12133432
nlchap0/nlcpython
refs/heads/master
pywip/bin/example5.py
1
#!/usr/bin/env python # A plot showing how to use different panels from pywip import * viewport(0.2,0.9,0.3,0.8) # Set the viewport default(size=1.1) # Set the default character size panel(1,nx=2,ny=2,gapx=3) # Note that this curve will not appear in the legend plot([3],[0],color='w',limits=(-0.1,6.4,-1.3,1.3),text...
shashlik/android-skia
refs/heads/shashlik-kitkat
tools/test_pictures.py
67
''' Compares the rendererings of serialized SkPictures to expected images. Launch with --help to see more information. Copyright 2012 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. ''' # common Python modules import os import optparse import sys import ...
kmatzen/ansible
refs/heads/devel
lib/ansible/plugins/shell/__init__.py
1
# (c) 2016 RedHat # # This file is part of Ansible. # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribu...
macs03/demo-cms
refs/heads/master
cms/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py
328
# urllib3/response.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import logging import zlib import io from ._collections import HTTPHeaderDict from .exceptio...
Zerknechterer/pyload
refs/heads/stable
module/plugins/hoster/SpeedLoadOrg.py
1
# -*- coding: utf-8 -*- from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo class SpeedLoadOrg(DeadHoster): __name__ = "SpeedLoadOrg" __type__ = "hoster" __version__ = "1.02" __pattern__ = r'http://(?:www\.)?speedload\.org/(?P<ID>\w+)' __config__ = [] #@TODO: Remove...
saurabh6790/omni-apps
refs/heads/master
stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import flt def execute(filters=None): if not filters: filters = {} columns = get_columns(filters) item_map ...
huor/incubator-hawq
refs/heads/master
src/test/unit/mock/mocker.py
7
#!/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 # "...
podgorskiy/TinyFEM
refs/heads/master
libs/cegui/cegui/src/ScriptModules/Python/bindings/distutils/setup.py
14
import sys CEGUI_BASEDIR = "C:\\Users\\Admin\\Devel\\CEGUI\\cegui_mk2" is_64bits = sys.maxsize > 2**32 BOOST_BASEDIR = "C:\\Program Files (x86)\\boost\\boost_1_46_1" if is_64bits else "C:\\Program Files\\boost\\boost_1_46_1" from distutils.core import setup, Extension from distutils.sysconfig import get_python_inc i...
y-usuzumi/survive-the-course
refs/heads/master
leetcode/40.Combination_Sum_II/test.py
1
import unittest from main import Solution class SolutionTest(unittest.TestCase): def setUp(self): self.sol = Solution() def test_1(self): self.assertEqual( sorted(self.sol.combinationSum2([10, 1, 2, 7, 6, 1, 5], 8)), sorted([ [1, 7], [1,...
numenta-ci/nupic
refs/heads/master
src/nupic/datafiles/extra/secondOrder/makeDataset.py
34
#! /usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions...
titilambert/alignak
refs/heads/develop
alignak/objects/macromodulation.py
2
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak 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, ei...
nazo/ansible
refs/heads/devel
lib/ansible/modules/utilities/logic/async_wrapper.py
89
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others # # 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 ...
cpennington/edx-platform
refs/heads/master
lms/djangoapps/certificates/tests/test_queue.py
4
# -*- coding: utf-8 -*- """Tests for the XQueue certificates interface. """ import json from contextlib import contextmanager from datetime import datetime, timedelta import ddt import freezegun import pytz import six from django.conf import settings from django.test import TestCase from django.test.utils import ove...
mewtaylor/django
refs/heads/master
tests/m2o_recursive/models.py
282
""" Relating an object to itself, many-to-one To define a many-to-one relationship between a model and itself, use ``ForeignKey('self', ...)``. In this example, a ``Category`` is related to itself. That is, each ``Category`` has a parent ``Category``. Set ``related_name`` to designate what the reverse relationship i...
kalahbrown/HueBigSQL
refs/heads/master
desktop/core/ext-py/pyformance-0.3.2/setup.py
31
import os import functools import platform from setuptools import setup, find_packages _IN_PACKAGE_DIR = functools.partial(os.path.join, "pyformance") with open(_IN_PACKAGE_DIR("__version__.py")) as version_file: exec(version_file.read()) install_requires = [] # optional: ["blinker==1.2"] if platform.python_ver...
Thortoise/Super-Snake
refs/heads/master
Blender/animation_nodes-master/nodes/matrix/matrix_math.py
1
import bpy from bpy.props import * from ... events import executionCodeChanged from ... base_types.node import AnimationNode operationItems = [("MULTIPLY", "Multiply", "")] class MatrixMathNode(bpy.types.Node, AnimationNode): bl_idname = "an_MatrixMathNode" bl_label = "Matrix Math" operation = EnumProper...
darina/omim
refs/heads/master
tools/python/maps_generator/maps_generator.py
4
import logging from typing import AnyStr from typing import Iterable from typing import Optional from maps_generator.generator import stages_declaration as sd from maps_generator.generator.env import Env from maps_generator.generator.generation import Generation from .generator.stages import Stage logger = logging.ge...
Scille/umongo
refs/heads/master
umongo/template.py
1
from .abstract import BaseMarshmallowSchema class MetaTemplate(type): def __new__(cls, name, bases, nmspc): # If user has passed parent documents as implementation, we need # to retrieve the original templates cooked_bases = [] for base in bases: if issubclass(base, Im...
mahak/nova
refs/heads/master
nova/tests/unit/api/openstack/compute/test_console_output.py
3
# Copyright 2011 Eldar Nugaev # 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 ...
google/neural-logic-machines
refs/heads/master
scripts/graph/learn_graph_tasks.py
1
#! /usr/bin/env python3 # # Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
open-pli/enigma2
refs/heads/master
lib/python/Tools/ISO639.py
79
# -*- coding: iso-8859-2 -*- LanguageCodes = { } LanguageCodes["aar"] = LanguageCodes["aa"] = ("Afar", "Hamitic") LanguageCodes["abk"] = LanguageCodes["ab"] = ("Abkhazian", "Ibero-caucasian") LanguageCodes["ace"] = ("Achinese", "") LanguageCodes["ach"] = ("Acoli", "") LanguageCodes["ada"] = ("Adangme", "") LanguageCod...
mwalli/spark-cloudant
refs/heads/master
examples/python/CloudantDF.py
3
#******************************************************************************* # Copyright (c) 2015 IBM Corp. # # 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...
jakobabesser/pymus
refs/heads/master
pymus/sisa/f0_tracking/f0_tracking_peak_tracking.py
1
from scipy.signal import decimate import numpy as np from ...transform.transformer import Transformer __author__ = 'Jakob Abesser' class F0TrackerPeakTrackingAbesserDAFX2014: def __init__(self, blocksize=2048, hopsize=128, zero_padding_factor=8, ...
bonitadecker77/python-for-android
refs/heads/master
python-modules/twisted/twisted/test/process_reader.py
166
"""Script used by test_process.TestTwoProcesses""" # run until stdin is closed, then quit import sys while 1: d = sys.stdin.read() if len(d) == 0: sys.exit(0)
ivan-fedorov/intellij-community
refs/heads/master
python/testData/intentions/beforeParamTypeInGoogleDocStringOnlySummary.py
106
def f(<caret>x, y): """ Summary. """
dietrichc/streamline-ppc-reports
refs/heads/master
examples/dfp/v201411/inventory_service/create_ad_units.py
4
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
repotvsupertuga/tvsupertuga.repository
refs/heads/master
script.module.cryptolib/lib/Crypto/Hash/SHA.py
16
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
mancoast/CPythonPyc_test
refs/heads/master
crash/342_test_sys_settrace.py
99
# Testing the line trace facility. from test import support import unittest import sys import difflib import gc # A very basic example. If this fails, we're in deep trouble. def basic(): return 1 basic.events = [(0, 'call'), (1, 'line'), (1, 'return')] # Many of the tests below ...
andrewsosa/hackfsu_com
refs/heads/master
api/webapp/views/links/index.py
2
""" Quick links """ from hackfsu_com.views.generic import PageView class LinksPage(PageView): template_name = 'links/index.html'
WillisXChen/django-oscar
refs/heads/master
oscar/lib/python2.7/site-packages/PIL/WalImageFile.py
52
# The Python Imaging Library. # $Id$ # # WAL file handling # # History: # 2003-04-23 fl created # # Copyright (c) 2003 by Fredrik Lundh. # # See the README file for information on usage and redistribution. # # NOTE: This format cannot be automatically recognized, so the reader # is not registered for use with Image....
Yukarumya/Yukarum-Redfoxes
refs/heads/master
testing/mozharness/configs/mediatests/buildbot_windows_config.py
1
import os import sys import mozharness external_tools_path = os.path.join( os.path.abspath(os.path.dirname(os.path.dirname(mozharness.__file__))), 'external_tools', ) config = { "virtualenv_python_dll": 'c:/mozilla-build/python27/python27.dll', "virtualenv_path": 'venv', "exes": { 'python'...
xiaoixa/python
refs/heads/master
NKUCodingCat/0013/0013.py
40
import requests,os,re,urllib from lxml import etree src = requests.get("""http://tieba.baidu.com/p/2166231880""").content path = os.path.split(os.path.realpath(__file__))[0]+"/img/" for i in etree.HTML(src.decode('utf-8', 'ignore')).xpath(u"//img"): url = i.attrib["src"] proto, rest = urllib.splittype(url) host, r...
erwilan/ansible
refs/heads/devel
lib/ansible/modules/cloud/ovirt/ovirt_users.py
45
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # 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 #...
razvanphp/arangodb
refs/heads/devel
3rdParty/V8-3.31.74.1/build/gyp/test/mac/gyptest-bundle-resources.py
193
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies things related to bundle resources. """ import TestGyp import os import stat import sys def check_attribs(path, expected_ex...
LynxyssCZ/Flexget
refs/heads/develop
flexget/tests/test_misc.py
6
# pylint: disable=no-self-use from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.utils import text_type import os import stat import pytest from flexget.entry import EntryUnicodeError, Entry class TestDisab...
Inter-Actief/alexia
refs/heads/master
alexia/apps/general/templatetags/jsonize.py
1
import json from django.template import Library from django.utils.safestring import mark_safe register = Library() @register.filter def jsonize(obj): return mark_safe(json.dumps(obj))
mdespriee/spark
refs/heads/master
examples/src/main/python/streaming/stateful_network_wordcount.py
51
# # 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 us...
saurabh6790/omnit-app
refs/heads/master
hr/doctype/job_applicant/job_applicant.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import webnotes from utilities.transaction_base import TransactionBase from webnotes.utils import ...
schleichdi2/OPENNFR-6.0-CORE
refs/heads/master
bitbake/lib/toaster/tests/browser/test_all_projects_page.py
4
#! /usr/bin/env python # ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- # # BitBake Toaster Implementation # # Copyright (C) 2013-2016 Intel Corporation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
NitishT/minio-py
refs/heads/master
minio/error.py
1
# -*- coding: utf-8 -*- # Minio Python Library for Amazon S3 Compatible Cloud Storage, # (C) 2015, 2016, 2017 Minio, 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.ap...
rafaelvieiras/script.pseudotv.live
refs/heads/master
resources/lib/language.py
3
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2011-2014 Martijn Kaijser # # 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 ...
haozhangphd/genx-py3
refs/heads/master
genx/filehandling.py
1
'''I/O functions for GenX. These include loading of initilazation files. Also included is the config object. File started by: Matts Bjorck $Rev:: $: Revision of last commit $Author:: $: Author of last commit $Date:: $: D...
navrasio/mxnet
refs/heads/master
example/autoencoder/autoencoder.py
18
# 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...
clouserw/olympia
refs/heads/master
apps/sharing/forms.py
22
from django import forms from amo.helpers import absolutify from translations.helpers import truncate class ShareForm(forms.Form): """Only used for the field clean methods. Doesn't get exposed to user.""" title = forms.CharField() url = forms.CharField() description = forms.CharField(required=False) ...
xiaoyuanW/gem5
refs/heads/master
src/arch/x86/isa/insts/simd128/floating_point/arithmetic/simultaneous_addition_and_subtraction.py
46
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
MobinRanjbar/hue
refs/heads/master
desktop/core/ext-py/lxml-3.3.6/src/lxml/doctestcompare.py
43
""" lxml-based doctest output comparison. Note: normally, you should just import the `lxml.usedoctest` and `lxml.html.usedoctest` modules from within a doctest, instead of this one:: >>> import lxml.usedoctest # for XML output >>> import lxml.html.usedoctest # for HTML output To use this module directly, yo...
ActiveState/code
refs/heads/master
recipes/Python/305267_Basics_heapq__wpyth24/recipe-305267.py
1
an unordered list of numbers the_list=[903, 10, 35, 69, 933, 485, 519, 379, 102, 402, 883, 1] #standard list.sort() techniques #to get lowest element which is 1, sort and pop the_list.sort() print the_list.pop(0) >>> 1 #if you get more data, you need to sort again before popping the_list.append(0) print the_list.pop(...
xuanyuanking/spark
refs/heads/master
examples/src/main/python/mllib/summary_statistics_example.py
27
# # 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 us...
sadmansk/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/webdriver/webdriver/__init__.py
20
# flake8: noqa from client import ( Cookies, Element, Find, Frame, Session, Timeouts, Window) from error import ( ElementNotSelectableException, ElementNotVisibleException, InvalidArgumentException, InvalidCookieDomainException, InvalidElementCoordinatesException, In...
blaze33/django
refs/heads/ticket_19456
tests/modeltests/many_to_many/tests.py
109
from __future__ import absolute_import from django.test import TestCase from django.utils import six from .models import Article, Publication class ManyToManyTests(TestCase): def setUp(self): # Create a couple of Publications. self.p1 = Publication.objects.create(id=None, title='The Python Jour...
BrianVermeire/PyFR
refs/heads/develop
pyfr/solvers/baseadvecdiff/__init__.py
8
# -*- coding: utf-8 -*- from pyfr.solvers.baseadvecdiff.system import BaseAdvectionDiffusionSystem from pyfr.solvers.baseadvecdiff.elements import BaseAdvectionDiffusionElements from pyfr.solvers.baseadvecdiff.inters import (BaseAdvectionDiffusionBCInters, BaseAdvectionDi...
lflrocha/ebc.monitoramento
refs/heads/master
ebc/monitoramento/portlets/__init__.py
9480
#
avicizhu/Load-balancer
refs/heads/master
.waf-1.6.11-30618c54883417962c38f5d395f83584/waflib/Tools/glib2.py
14
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os from waflib import Task,Utils,Options,Errors,Logs from waflib.TaskGen import taskgen_method,before_method,after_method,feature def add_marshal_file(self,filename,pre...
NLeSC/pointcloud-benchmark
refs/heads/master
python/pointcloud/run/results/plot_io.py
1
#!/usr/bin/env python ################################################################################ # Created by Oscar Martinez # # o.rubi@esciencecenter.nl # #######################################################...
camptocamp/QGIS
refs/heads/master
python/plugins/processing/gdal/__init__.py
12133432
SerCeMan/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/conf/locale/eu/__init__.py
12133432
data-tsunami/smoke
refs/heads/master
smoke/services/__init__.py
12133432
dex4er/django
refs/heads/1.6.x
django/conf/locale/mn/__init__.py
12133432
takaakiaoki/PyFoam
refs/heads/master
PyFoam/Paraview/SimpleSources.py
2
# ICE Revision: $Id$ """ Simple sources Builds and displays simple sources. Grants easy access to the actual source and the representation objects""" from paraview import servermanager from PyFoam.Paraview import proxyManager as pm from PyFoam.Paraview import renderView as rv from PyFoam.Paraview import characteri...
yongshengwang/hue
refs/heads/master
build/env/lib/python2.7/site-packages/ipython-0.10-py2.7.egg/IPython/kernel/tests/tasktest.py
6
#!/usr/bin/env python # encoding: utf-8 __docformat__ = "restructuredtext en" #------------------------------------------------------------------------------- # Copyright (C) 2008 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distribut...
kaday/rose
refs/heads/master
lib/python/rose/env.py
1
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # (C) British Crown Copyright 2012-6 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
cwurld/django_tracker
refs/heads/master
tracker_demo/test_project/login_required_middleware.py
1
from django.conf import settings from django.http import HttpResponseRedirect import re # Make re patterns URLS = tuple([re.compile(url) for url in settings.LOGIN_NOT_REQUIRED_URLS]) class RequireLoginMiddleware(object): def __init__(self, get_response): self.get_response = get_response def __call_...
nonemaw/MATRIX_01
refs/heads/master
COMP9041/ass1/examples/3/l.py
1
#!/usr/bin/python2.7 -u import subprocess import sys # l [file|directories...] - list files # written by andrewt@cse.unsw.edu.au as a COMP2041 example subprocess.call(['ls', '-las'] + sys.argv[1:])