repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
gnu3ra/SCC15HPCRepast
INSTALLATION/mpich2-1.4.1p1/src/pm/mpd/mpdchkpyver.py
2
1463
#!/usr/bin/env python # # (C) 2001 by Argonne National Laboratory. # See COPYRIGHT in top-level directory. # """ This program is not to be executed from the command line. It is exec'd by mpdroot to verify the version of python before executing a 'regular' mpd pgm, e.g. mpdallexit. """ from sys import versio...
bsd-3-clause
zclfly/cgt
cgt/ez.py
20
1622
import cgt from cgt import core class EasyCustomOp(core.Op): """ Will provide an easier method to define a custom Op, where you just have to create one class and write the numerical forward and backpropagation methods currently broken / untested """ return_type = "byval" def __init__(self, ...
mit
jakobzhao/wbcrawler3
backup/multiharvest.py
1
5411
# !/usr/bin/python # -*- coding: utf-8 -*- import threading import urllib import sqlite3 import sys import os from pyquery import PyQuery as pq reload(sys) sys.setdefaultencoding('utf-8') num = 1 tmp_num = num headers = { "User-Agent" : "Mozilla/5.3 (X11; U; FreeBSD i386; en-US; rv:1.8.1.14) Gecko/2008060...
mit
pstjohn/cobrapy
cobra/flux_analysis/single_deletion.py
3
7065
from warnings import warn from six import string_types, iteritems from ..manipulation import delete_model_genes, undelete_model_genes from ..manipulation.delete import find_gene_knockout_reactions from ..solvers import solver_dict, get_solver_name try: import scipy except ImportError: moma = None else: fr...
gpl-2.0
sonali0901/zulip
zproject/dev_settings.py
2
1650
# For the Dev VM environment, we use the same settings as the # sample prod_settings.py file, with a few exceptions. from .prod_settings_template import * import os LOCAL_UPLOADS_DIR = 'var/uploads' # Default to subdomains disabled in development until we can update # the development documentation to make sense with ...
apache-2.0
ondras/TeaJS
deps/v8/tools/testrunner/server/status_handler.py
123
4154
# Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
bsd-3-clause
caasiu/plugin.video.bdyun
resources/modules/rsa/randnum.py
82
2643
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Un...
gpl-3.0
dkodnik/Ant
addons/account_asset/__init__.py
446
1135
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
marcydoty/geraldo
site/newsite/django_1_0/django/utils/timesince.py
16
2546
import datetime import time from django.utils.tzinfo import LocalTimezone from django.utils.translation import ungettext, ugettext def timesince(d, now=None): """ Takes two datetime objects and returns the time between d and now as a nicely formatted string, e.g. "10 minutes". If d occurs after now, ...
lgpl-3.0
axinging/chromium-crosswalk
ios/build/bots/scripts/find_xcode.py
9
5072
#!/usr/bin/python # 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. """Finds Xcode installations, optionally switching to a desired version. Usage: ./find_xcode.py -j /tmp/out.json -v 6.0.1 Finds Xcode...
bsd-3-clause
gladsonvm/haystackdemo
lib/python2.7/site-packages/django/contrib/syndication/views.py
85
7622
from django.conf import settings from django.contrib.sites.models import get_current_site from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import HttpResponse, Http404 from django.template import loader, TemplateDoesNotExist, RequestContext from django.utils import feedgenera...
mit
partofthething/home-assistant
homeassistant/components/arlo/alarm_control_panel.py
16
4769
"""Support for Arlo Alarm Control Panels.""" import logging import voluptuous as vol from homeassistant.components.alarm_control_panel import ( PLATFORM_SCHEMA, AlarmControlPanelEntity, ) from homeassistant.components.alarm_control_panel.const import ( SUPPORT_ALARM_ARM_AWAY, SUPPORT_ALARM_ARM_HOME, ...
mit
neoareslinux/neutron
neutron/context.py
21
4591
# 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 req...
apache-2.0
jjmleiro/hue
desktop/core/src/desktop/management/commands/runcherrypyserver.py
10
3958
#!/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...
apache-2.0
gylian/sickbeard
lib/subliminal/services/podnapisiweb.py
8
8716
# -*- coding: utf-8 -*- # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal 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 3 of...
gpl-3.0
rfaulkner/wikipedia_user_metrics
scripts/helper/e3_experiment_definitions.py
3
17549
""" Used to store data definitions for E3 experiments and related tables and log files. As new experiments are initiated the data definition over different storage mediums can be matained using the `experiment` hash """ __author__ = "ryan faulkner" __date__ = "18/11/2012" __license__ = "GPL (version 2 or...
bsd-3-clause
sportorg/pysport
sportorg/config.py
1
3084
import logging.config import os import sys from pydantic import BaseSettings from sportorg.common.version import Version class Env(BaseSettings): DEBUG: bool = False class Config: env_file = '.env' NAME = 'SportOrg' VERSION = Version(1, 5, 0, 0, 'v') def is_executable(): return hasattr(sys,...
gpl-3.0
shackra/thomas-aquinas
old-lib/scenemanager.py
1
11650
# coding: utf-8 # This file is part of Thomas Aquinas. # # Thomas Aquinas 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. # # Thomas Aq...
bsd-3-clause
ftomassetti/intellij-community
python/helpers/pydev/tests_runfiles/test_runfiles.py
54
19242
import os.path import sys IS_JYTHON = sys.platform.find('java') != -1 try: this_file_name = __file__ except NameError: # stupid jython. plain old __file__ isnt working for some reason import test_runfiles #@UnresolvedImport - importing the module itself this_file_name = test_runfiles.__file__ desir...
apache-2.0
kuntzer/SALSA-public
3c_angle_usage.py
1
2662
''' 3c_angle_usage.py ========================= AIM: Plots the diagonistic angle usage of the PST in SALSA. Requires the monitor_angle_usage=True in 1_compute_<p>.py and log_all_data = .true. in straylight_<orbit_id>_<p>/CODE/parameter. INPUT: files: - <orbit_id>_misc/orbits.dat - <orbit_id>_flux/angles_<orbit_n...
bsd-3-clause
OpenNetworkingFoundation/Snowmass-ONFOpenTransport
RI/flask_server/tapi_server/models/inline_object31.py
4
1738
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from tapi_server.models.base_model_ import Model from tapi_server.models.tapi_oam_updateoamservice_input import TapiOamUpdateoamserviceInput # noqa: F401,E501 from tap...
apache-2.0
resmo/ansible
lib/ansible/modules/storage/netapp/na_ontap_firewall_policy.py
21
14883
#!/usr/bin/python # (c) 2018-2019, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
diofeher/django-nfa
build/lib/django/http/__init__.py
4
15616
import os from Cookie import SimpleCookie, CookieError from pprint import pformat from urllib import urlencode from urlparse import urljoin try: # The mod_python version is more efficient, so try importing it first. from mod_python.util import parse_qsl except ImportError: from cgi import parse_qsl from dj...
bsd-3-clause
mderomph-coolblue/dd-agent
dogstatsd.py
7
17915
#!/opt/datadog-agent/embedded/bin/python """ A Python Statsd implementation with some datadog special sauce. """ # set up logging before importing any other components from config import initialize_logging # noqa initialize_logging('dogstatsd') from utils.proxy import set_no_proxy_settings # noqa set_no_proxy_sett...
bsd-3-clause
keyboardio/Kaleidoscope
testing/googletest/googletest/test/googletest-list-tests-unittest.py
122
6522
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
gpl-3.0
davidfischer/readthedocs.org
readthedocs/settings/base.py
2
12656
# -*- coding: utf-8 -*- # pylint: disable=missing-docstring from __future__ import ( absolute_import, division, print_function, unicode_literals) import os from celery.schedules import crontab from readthedocs.core.settings import Settings try: import readthedocsext # noqa ext = True except ImportErr...
mit
JohnGarbutt/TaskFlow
taskflow/patterns/linear_workflow.py
1
1173
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Yahoo! 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 # # ...
apache-2.0
bd339/servo
tests/wpt/web-platform-tests/tools/py/testing/io_/test_saferepr.py
162
2388
# -*- coding: utf-8 -*- from __future__ import generators import py import sys saferepr = py.io.saferepr class TestSafeRepr: def test_simple_repr(self): assert saferepr(1) == '1' assert saferepr(None) == 'None' def test_maxsize(self): s = saferepr('x'*50, maxsize=25) assert l...
mpl-2.0
zakuro9715/lettuce
tests/integration/lib/Django-1.3/django/utils/functional.py
307
14218
# License for code in this file that was taken from Python 2.5. # PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 # -------------------------------------------- # # 1. This LICENSE AGREEMENT is between the Python Software Foundation # ("PSF"), and the Individual or Organization ("Licensee") accessing and # otherwise usin...
gpl-3.0
ddico/project
project_stage_state/__openerp__.py
13
1425
# -*- coding: utf-8 -*- ############################################################################## # # Daniel Reis, 2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, eith...
agpl-3.0
luther07/dak
dak/metadata.py
3
3780
#!/usr/bin/env python """ Import data for Package/Sources files from .deb and .dsc files @copyright: 2011 Torsten Werner <twerner@debian.org> @copyright: 2011 Mark Hymers <mhy@debian.org> @license: GNU General Public License version 2 or later """ #######################################################################...
gpl-2.0
MinFu/iScript
91porn.py
18
5704
#!/usr/bin/env python2 # vim: set fileencoding=utf8 import os import sys import requests import urlparse import re import argparse import random import select ############################################################ # wget exit status wget_es = { 0: "No problems occurred.", 2: "User interference.", 1<...
mit
thonkify/thonkify
src/lib/apitools/base/py/credentials_lib_test.py
11
3854
import re import mock import six from six.moves import http_client import unittest2 from apitools.base.py import credentials_lib from apitools.base.py import util def CreateUriValidator(uri_regexp, content=''): def CheckUri(uri, headers=None): if 'X-Google-Metadata-Request' not in headers: r...
mit
caseyclements/bokeh
bokeh/crossfilter/plugins.py
42
11734
from __future__ import absolute_import import numpy as np from ..models import FactorRange, DataRange1d, Range1d, BoxSelectTool from ..plotting import figure from .plotting import make_continuous_bar_source, make_categorical_bar_source class CrossFilterPlugin(object): """An adapter class between CrossFilter a...
bsd-3-clause
ImageEngine/gaffer
python/GafferArnoldUI/ArnoldMeshLightUI.py
6
4035
########################################################################## # # Copyright (c) 2016, 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...
bsd-3-clause
ccn-2m/django
tests/regressiontests/defer_regress/tests.py
27
10473
from __future__ import absolute_import from operator import attrgetter from django.contrib.contenttypes.models import ContentType from django.contrib.sessions.backends.db import SessionStore from django.db.models import Count from django.db.models.loading import cache from django.test import TestCase from django.test...
bsd-3-clause
hoosteeno/kuma
kuma/core/urlresolvers.py
25
4994
import threading from django.conf import settings from django.test.client import RequestFactory from django.core.urlresolvers import reverse as django_reverse from django.utils.translation.trans_real import parse_accept_lang_header # Thread-local storage for URL prefixes. Access with (get|set)_url_prefix. _locals = ...
mpl-2.0
useabode/redash
tests/handlers/test_alerts.py
7
7370
from tests import BaseTestCase from redash.models import AlertSubscription, Alert, db class TestAlertResourceGet(BaseTestCase): def test_returns_200_if_allowed(self): alert = self.factory.create_alert() rv = self.make_request('get', "/api/alerts/{}".format(alert.id)) self.assertEqual(rv.s...
bsd-2-clause
arante/pyloc
microblog/flask/lib/python3.5/site-packages/pkg_resources/_vendor/packaging/specifiers.py
1107
28025
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import functools import itertools import re from ._compat impo...
gpl-3.0
napkindrawing/ansible
lib/ansible/utils/plugin_docs.py
44
6418
# (c) 2012, Jan-Piet Mens <jpmens () gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
gpl-3.0
erdincay/pyload
module/plugins/hooks/LinkdecrypterComHook.py
13
1246
# -*- coding: utf-8 -*- import re from module.plugins.internal.MultiHook import MultiHook class LinkdecrypterComHook(MultiHook): __name__ = "LinkdecrypterComHook" __type__ = "hook" __version__ = "1.07" __status__ = "testing" __config__ = [("activated" , "bool" , "Activa...
gpl-3.0
oliverlee/sympy
sympy/physics/quantum/tests/test_cartesian.py
129
3856
"""Tests for cartesian.py""" from sympy import S, Interval, symbols, I, DiracDelta, exp, sqrt, pi from sympy.physics.quantum import qapply, represent, L2, Dagger from sympy.physics.quantum import Commutator, hbar from sympy.physics.quantum.cartesian import ( XOp, YOp, ZOp, PxOp, X, Y, Z, Px, XKet, XBra, PxKet, Px...
bsd-3-clause
hslatman/spiderfoot
ext/stem/util/test_tools.py
12
10810
# Copyright 2015, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Helper functions for testing. .. versionadded:: 1.2.0 :: clean_orphaned_pyc - delete *.pyc files without corresponding *.py is_pyflakes_available - checks if pyflakes is available is_pep8_available - checks if pe...
gpl-2.0
Eksmo/calibre
src/calibre/gui2/dialogs/scheduler.py
2
21809
from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' ''' Scheduler for automated recipe downloads ''' from datetime import timedelta import calendar, textwrap from collections import OrderedDict from PyQt4.Qt imp...
gpl-3.0
stur86/herdgame
node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
1355
44604
# 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. """cmake output module This module is under development and should be considered experimental. This module produces cmake (2.8.8+) input as its output. One CMake...
gpl-3.0
anoopsarkar/nlp-class-hw
zhsegment/check.py
1
5504
""" First run `python3 zipout.py` to create your output zipfile `output.zip` and output directory `./output` Then run: python3 check.py It will print out a score of all your outputs that matched the testcases with a reference output file (typically `./references/dev/*.out`). In some cases the output is supposed ...
apache-2.0
EKiefer/edge-starter
py34env/Lib/site-packages/django/core/serializers/xml_serializer.py
184
15662
""" XML serializer. """ from __future__ import unicode_literals from collections import OrderedDict from xml.dom import pulldom from xml.sax import handler from xml.sax.expatreader import ExpatParser as _ExpatParser from django.apps import apps from django.conf import settings from django.core.serializers import bas...
mit
cuboxi/android_external_chromium_org
android_webview/buildbot/generate_local_manifest.py
114
3782
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generate local manifest in an Android repository. This is used to generate a local manifest in an Android repository. The purpo...
bsd-3-clause
patrickm/chromium.src
third_party/libxml/src/check-relaxng-test-suite2.py
343
10578
#!/usr/bin/python import sys import time import os import string import StringIO sys.path.insert(0, "python") import libxml2 # Memory debug specific libxml2.debugMemory(1) debug = 0 quiet = 1 # # the testsuite description # CONF=os.path.join(os.path.dirname(__file__), "test/relaxng/testsuite.xml") LOG="check-relaxng-...
bsd-3-clause
sunqb/oa_qian
flask/Lib/site-packages/wtforms/csrf/core.py
174
3157
from wtforms.validators import ValidationError from wtforms.fields import HiddenField __all__ = ('CSRFTokenField', 'CSRF') class CSRFTokenField(HiddenField): """ A subclass of HiddenField designed for sending the CSRF token that is used for most CSRF protection schemes. Notably different from a norm...
apache-2.0
adazey/Muzez
libs/youtube_dl/extractor/hbo.py
6
5522
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( xpath_text, xpath_element, int_or_none, parse_duration, ) class HBOBaseIE(InfoExtractor): _FORMATS_INFO = { '1920': { 'width': 1280, 'height':...
gpl-3.0
shokuan/TiEnvPackage
plugins/ti.alloy/plugin.py
1729
5251
import os, sys, subprocess, hashlib import subprocess def check_output(*popenargs, **kwargs): r"""Run command with arguments and return its output as a byte string. Backported from Python 2.7 as it's implemented as pure python on stdlib. >>> check_output(['/usr/bin/python', '--version']) Python 2.6....
apache-2.0
cyberden/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/wat.py
35
5369
# coding: utf-8 from __future__ import unicode_literals import re import hashlib from .common import InfoExtractor from ..utils import ( ExtractorError, unified_strdate, ) class WatIE(InfoExtractor): _VALID_URL = r'http://www\.wat\.tv/video/(?P<display_id>.*)-(?P<short_id>.*?)_.*?\.html' IE_NAME = '...
gpl-3.0
adamlatchem/toolchest
GUIApplication.py
2
5671
#!/usr/bin/env python # # Base class for a GUI Application using Tk # from __future__ import generators, print_function, unicode_literals import sys if sys.version_info[0] < 3: str = unicode import Tkinter as tkinter import tkMessageBox as messagebox else: import tkinter import tkinter.messagebox as...
apache-2.0
jhseu/tensorflow
tensorflow/python/kernel_tests/summary_v1_tensor_op_test.py
21
6094
# 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...
apache-2.0
Kamik423/uni_plan
plan/plan/lib64/python3.4/site-packages/setuptools/archive_util.py
320
6613
"""Utilities for extracting common archive formats""" import zipfile import tarfile import os import shutil import posixpath import contextlib from distutils.errors import DistutilsError from pkg_resources import ensure_directory, ContextualZipFile __all__ = [ "unpack_archive", "unpack_zipfile", "unpack_tarfile"...
apache-2.0
fnp/pylucene
samples/LuceneInAction/lia/indexing/VerboseIndexing.py
1
1594
# ==================================================================== # 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 re...
apache-2.0
Qalthos/ansible
test/units/modules/remote_management/oneview/test_oneview_fc_network_facts.py
47
1715
# Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from units.compat import unittest from oneview_module_loader import FcNetworkFactsModule from hpe_test_utils import FactsParamsTestCase ERROR_MSG = 'Fake mes...
gpl-3.0
huyhg/runtimes-common
integration_tests/testsuite/test_logging_standard.py
1
2636
#!/usr/bin/python # Copyright 2017 Google Inc. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applica...
apache-2.0
reachedu14/traininginstitute
coursebuilder/tests/functional/actions.py
4
24930
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
RAtechntukan/CouchPotatoServer
libs/suds/umx/basic.py
210
1394
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
gpl-3.0
dhruvagarwal/django
tests/gis_tests/geoapp/feeds.py
367
1841
from __future__ import unicode_literals from django.contrib.gis import feeds from .models import City class TestGeoRSS1(feeds.Feed): link = '/city/' title = 'Test GeoDjango Cities' def items(self): return City.objects.all() def item_link(self, item): return '/city/%s/' % item.pk ...
bsd-3-clause
mrquim/repository.mrquim
plugin.video.mrpiracy/resources/lib/js2py/prototypes/jsstring.py
71
9689
# -*- coding: utf-8 -*- from .jsregexp import Exec import re DIGS = set('0123456789') WHITE = u"\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF" def replacement_template(rep, source, span, npar): """Takes t...
gpl-2.0
jhona22baz/blog-flask
python2.7/lib/python2.7/site-packages/sqlalchemy/orm/descriptor_props.py
17
15439
# orm/descriptor_props.py # Copyright (C) 2005-2012 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 """Descriptor properties are more "auxiliary" properties that exist as configu...
mit
CyanogenMod/android_external_chromium_org
third_party/closure_linter/setup.py
131
1323
#!/usr/bin/env python # # Copyright 2010 The Closure Linter 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 #...
bsd-3-clause
lpsinger/astropy
astropy/io/fits/hdu/compressed.py
5
87677
# Licensed under a 3-clause BSD style license - see PYFITS.rst import ctypes import gc import itertools import math import re import time import warnings from contextlib import suppress import numpy as np from .base import DELAYED, ExtensionHDU, BITPIX2DTYPE, DTYPE2BITPIX from .image import ImageHDU from .table impo...
bsd-3-clause
kost/volatility
volatility/plugins/joblinks.py
12
6448
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
gpl-2.0
nicoddemus/backtrader
tests/test_ind_kama.py
4
1611
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
gpl-3.0
Edu-Glez/Bank_sentiment_analysis
env/lib/python3.6/site-packages/prompt_toolkit/contrib/regular_languages/lexer.py
23
3402
""" `GrammarLexer` is compatible with Pygments lexers and can be used to highlight the input using a regular grammar with token annotations. """ from __future__ import unicode_literals from prompt_toolkit.document import Document from prompt_toolkit.layout.lexers import Lexer from prompt_toolkit.layout.utils import spl...
apache-2.0
KaranToor/MA450
google-cloud-sdk/lib/surface/kms/cryptokeys/versions/describe.py
2
1882
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
ryanGT/sympy
sympy/plotting/plot_axes.py
8
8214
from pyglet.gl import * from pyglet import font from plot_object import PlotObject from util import strided_range, billboard_matrix from util import get_direction_vectors from util import dot_product, vec_sub, vec_mag from sympy.core.basic import S class PlotAxes(PlotObject): def __init__(self, *args, **kwargs):...
bsd-3-clause
h4ck3rm1k3/binutils-gdb
gdb/python/lib/gdb/printer/bound_registers.py
26
1386
# Pretty-printers for bounds registers. # Copyright (C) 2013-2016 Free Software Foundation, 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 3 of the License, or # (at your o...
gpl-2.0
tpsatish95/Python-Workshop
Python Environment Setup/Alternate/1. Python/1. Installer/Python-3.4.0(Linux)/Lib/lib2to3/fixes/fix_sys_exc.py
203
1034
"""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...
apache-2.0
isandlaTech/cohorte-devtools
qualifier/deploy/cohorte-home/repo/pelix/remote/transport/commons.py
3
11764
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Pelix remote services: Abstract RPC implementation :author: Thomas Calmant :copyright: Copyright 2016, Thomas Calmant :license: Apache License 2.0 :version: 0.6.4 .. Copyright 2016 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "L...
apache-2.0
batisteo/pasportaservo
hosting/migrations/0044_finalize_visibility.py
4
1623
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-07-17 10:47 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('hosting', '0043_update_visibility'), ] operations ...
agpl-3.0
jvehent/MozDef
cron/correlateUserMacAddress.py
9
9062
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # Contributors: # Jeff Bryner jbryner@mozilla.com impo...
mpl-2.0
sibiryakov/frontera
frontera/tests/scrapy_spider/settings.py
7
1319
#-------------------------------------------------------------------------- # Scrapy Settings #-------------------------------------------------------------------------- BOT_NAME = 'scrapy_spider' SPIDER_MODULES = ['frontera.tests.scrapy_spider.spiders'] NEWSPIDER_MODULE = 'frontera.tests.scrapy_spider.spiders' HTTPC...
bsd-3-clause
blaze225/zulip
zerver/migrations/0060_move_avatars_to_be_uid_based.py
18
4545
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-27 17:03 from __future__ import unicode_literals from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from django.core.files.uploadedfile import Si...
apache-2.0
stdweird/aquilon
lib/python2.6/aquilon/worker/commands/show_switch_all.py
2
2385
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2013 Contributor # # 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 t...
apache-2.0
JioCloud/nova_test_latest
plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py
16
15462
# Copyright (c) 2012 OpenStack Foundation # # 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 ...
apache-2.0
freddierice/volatility
volatility/plugins/overlays/windows/win2003_sp12_x86_syscalls.py
45
32088
# Volatility # Copyright (c) 2008-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
gpl-2.0
stanleyatala/IoTGateway
Libraries/Python/pyserial-2.7/serial/tools/list_ports_osx.py
141
6489
#!/usr/bin/env python # portable serial port access with python # # This is a module that gathers a list of serial ports including details on OSX # # code originally from https://github.com/makerbot/pyserial/tree/master/serial/tools # with contributions from cibomahto, dgs3, FarMcKon, tedbrandston # and modifications ...
gpl-3.0
DasIch/pyalysis
tests/test_analysers/test_ast.py
1
4162
# coding: utf-8 """ tests.test_analysers.test_ast ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: 2014 by Daniel Neuhäuser and Contributors :license: BSD, see LICENSE.rst for details """ import textwrap from io import BytesIO import pytest from pyalysis.analysers import ASTAnalyser from pyalysis.warnings i...
bsd-3-clause
mapr/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/flatpages/views.py
115
2843
from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import get_current_site from django.http import Http404, HttpResponse, HttpResponsePermanentRedirect from django.shortcuts import get_object_or_404 from django.template import loader, RequestContext fr...
apache-2.0
cloudbase/os-windows
os_windows/tests/utils/test_vmutils.py
2
31477
# Copyright 2014 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
apache-2.0
RydrDojo/Ridr_app
pylotVenv/lib/python2.7/site-packages/werkzeug/test.py
116
34255
# -*- coding: utf-8 -*- """ werkzeug.test ~~~~~~~~~~~~~ This module implements a client to WSGI applications for testing. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import sys import mimetypes from time import time from...
mit
etherkit/OpenBeacon2
macos/venv/lib/python3.8/site-packages/altgraph/GraphAlgo.py
4
5645
""" altgraph.GraphAlgo - Graph algorithms ===================================== """ from altgraph import GraphError def dijkstra(graph, start, end=None): """ Dijkstra's algorithm for shortest paths `David Eppstein, UC Irvine, 4 April 2002 <http://www.ics.uci.edu/~eppstein/161/python/>`_ `Pyt...
gpl-3.0
simod/geonode
geonode/invitations/forms.py
9
3321
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2018 OSGeo # # 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 ver...
gpl-3.0
mosbasik/buzhug
javasrc/lib/Jython/Lib/test/test_richcmp.py
24
11476
# Tests for rich comparisons import unittest from test import test_support import operator class Number: def __init__(self, x): self.x = x def __lt__(self, other): return self.x < other def __le__(self, other): return self.x <= other def __eq__(self, other): return...
bsd-3-clause
izonder/intellij-community
python/lib/Lib/user.py
102
1511
"""Hook to allow user-specified customization code to run. As a policy, Python doesn't run user-specified code on startup of Python programs (interactive sessions execute the script specified in the PYTHONSTARTUP environment variable if it exists). However, some programs or sites may find it convenient to allow users...
apache-2.0
factorlibre/OCB
addons/l10n_fr/report/compute_resultant_report.py
374
4004
# -*- coding: utf-8 -*- # # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # consequences resulting from its eventual inadequacies and bugs # End users w...
agpl-3.0
dhalleine/tensorflow
tensorflow/python/training/coordinator.py
1
15073
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
roberzguerra/scout_mez
mezzanine_people/views.py
3
1967
from django.http import Http404 from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.shortcuts import get_object_or_404 #from django import VERSION from .models import Person, PersonCategory from mezzanine.conf import settings from mezzanine.generic.models ...
gpl-2.0
elsigh/browserscope
third_party/closure/bin/build/jscompiler.py
285
2337
# Copyright 2010 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 # # Unless required by a...
apache-2.0
ergoithz/browsepy
browsepy/widget.py
2
2012
''' WARNING: deprecated module. API defined in this module has been deprecated in version 0.5 will likely be removed at 0.6. ''' import warnings from markupsafe import Markup from flask import url_for from .compat import deprecated warnings.warn('Deprecated module widget', category=DeprecationWarning) class Widg...
mit
flavour/helios
tests/selenium/scripts/HTMLTestRunner.py
31
24360
""" A TestRunner for use with the Python unit testing framework. It generates a HTML report to show the result at a glance. The simplest way to use this is to invoke its main method. E.g. import unittest import HTMLTestRunner ... define your tests ... if __name__ == '__main__': HTMLTestRunne...
mit
xin3liang/platform_external_chromium_org_third_party_WebKit
Tools/Scripts/webkitpy/common/webkit_finder.py
39
5149
# Copyright (c) 2012 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
hieukypc/ERP
openerp/addons/fleet/fleet.py
15
44849
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time import datetime from dateutil.relativedelta import relativedelta import openerp from openerp import tools from openerp.exceptions import UserError from openerp.osv import fields, osv from openerp.tools.trans...
gpl-3.0
Wilbeibi/rethinkdb
external/v8_3.30.33.16/testing/gtest/scripts/upload.py
2511
51024
#!/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...
agpl-3.0
erickt/hue
desktop/core/ext-py/kazoo-2.0/kazoo/interfaces.py
54
6363
"""Kazoo Interfaces .. versionchanged:: 1.4 The classes in this module used to be interface declarations based on `zope.interface.Interface`. They were converted to normal classes and now serve as documentation only. """ # public API class IHandler(object): """A Callback Handler for Zookeeper comp...
apache-2.0