repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
Slezhuk/ansible
lib/ansible/modules/network/dnsmadeeasy.py
30
14042
#!/usr/bin/python # 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 distributed...
gpl-3.0
datalogics/scons
test/option--lw.py
2
1407
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
mit
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/sphinx/locale/__init__.py
5
6173
# -*- coding: utf-8 -*- """ sphinx.locale ~~~~~~~~~~~~~ Locale utilities. :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys import gettext import UserString class _TranslationProxy(UserString.UserString, object): """ ...
agpl-3.0
haad/ansible
lib/ansible/utils/module_docs_fragments/dimensiondata_wait.py
192
1429
# -*- coding: utf-8 -*- # # Copyright (c) 2016 Dimension Data # # This module 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. # # This ...
gpl-3.0
bitmazk/django-calendarium
calendarium/south_migrations/0009_auto__add_field_eventcategory_slug.py
4
7999
# flake8: noqa # -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'EventCategory.slug' db.add_column('calendarium_eventcategory', 'slug', ...
mit
hgupta2/floodlight2
src/main/python/PythonClient.py
152
1167
#!/usr/bin/env python import sys sys.path.append('../../../target/gen-py') from packetstreamer import PacketStreamer from packetstreamer.ttypes import * from thrift import Thrift from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol try: # Make...
apache-2.0
pearsonlab/nipype
nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSLmkTransform.py
12
1533
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from .....testing import assert_equal from ..brains import BRAINSLmkTransform def test_BRAINSLmkTransform_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ignore_exception=dict(nohash=True, ...
bsd-3-clause
WhySoGeeky/DroidPot
venv/lib/python2.7/site-packages/snowballstemmer/english_stemmer.py
19
35043
# self file was generated automatically by the Snowball to Python interpreter from .basestemmer import BaseStemmer from .among import Among class EnglishStemmer(BaseStemmer): ''' self class was automatically generated by a Snowball to Python interpreter It implements the stemming algorithm defined by a s...
mit
alvin319/CarnotKE
jyhton/lib-python/2.7/bsddb/__init__.py
51
15988
#---------------------------------------------------------------------- # Copyright (c) 1999-2001, Digital Creations, Fredericksburg, VA, USA # and Andrew Kuchling. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following c...
apache-2.0
RandallDW/Aruba_plugin
plugins/org.python.pydev/pysrc/tests_python/test_additional_thread_info.py
14
3874
import sys import os from _pydev_bundle import pydev_monkey sys.path.insert(0, os.path.split(os.path.split(__file__)[0])[0]) from _pydevd_bundle.pydevd_constants import Null import unittest try: import thread except: import _thread as thread # @UnresolvedImport try: xrange except: xrange = range #=...
epl-1.0
HarmonyEnterpriseSolutions/harmony-platform
src/gnue/common/datasources/drivers/ldap/Connection.py
1
5525
# GNU Enterprise Common Library - Generic DBSIG2 database driver - Connection # # Copyright 2000-2007 Free Software Foundation # # This file is part of GNU Enterprise. # # GNU Enterprise is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public # License as published by the ...
gpl-2.0
topxiaoke/myedx
common/lib/symmath/symmath/formula.py
46
25839
#!/usr/bin/python # -*- coding: utf-8 -*- """ Flexible python representation of a symbolic mathematical formula. Acceptes Presentation MathML, Content MathML (and could also do OpenMath). Provides sympy representation. """ # # File: formula.py # Date: 04-May-12 (creation) # Author: I. Chuang <ichuang@mit.edu> # im...
agpl-3.0
darolt/ndnSIMQoS
src/mpi/bindings/modulegen__gcc_ILP32.py
10
177690
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
samuelstjean/dipy
scratch/very_scratch/diffusion_sphere_stats.py
20
18082
import nibabel import os import numpy as np import dipy as dp #import dipy.core.generalized_q_sampling as dgqs import dipy.reconst.gqi as dgqs import dipy.reconst.dti as ddti import dipy.reconst.recspeed as rp import dipy.io.pickles as pkl import scipy as sp from matplotlib.mlab import find #import dipy.core.sphere_pl...
bsd-3-clause
yxcoin/yxcoin
src/boost_1_55_0/libs/mpi/test/python/scan_test.py
64
1125
# Copyright (C) 2006 Douglas Gregor <doug.gregor -at- gmail.com>. # 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) # Test scan() collective. import boost.parallel.mpi as mpi from gen...
mit
ShownX/incubator-mxnet
example/rcnn/rcnn/tools/reeval.py
25
2273
# 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...
apache-2.0
throwable-one/teamcity-messages
teamcity/flake8_v2_plugin.py
25
2304
try: import pycodestyle as pep8 except ImportError: import pep8 import re from teamcity.messages import TeamcityServiceMessages from teamcity import __version__, is_running_under_teamcity enable_teamcity = is_running_under_teamcity() class TeamcityReport(pep8.StandardReport): name = 'teamcity' ver...
apache-2.0
doraemonext/wechat-platform
wechat_platform/system/response/models.py
1
7805
# -*- coding: utf-8 -*- import logging from time import time from django.db import models from wechat_sdk.messages import EventMessage from system.official_account.models import OfficialAccount logger_response = logging.getLogger(__name__) class ResponseManager(models.Manager): """ 微信服务器响应消息记录表 Manager ...
bsd-2-clause
nubark/odoo
addons/hr_recruitment/models/hr_job.py
37
5037
# Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import _, api, fields, models class Job(models.Model): _inherit = "hr.job" _name = "hr.job" _inherits = {'mail.alias': 'alias_id'} @api.model def _default_address_id(self): return self.env.user.compan...
gpl-3.0
PolicyStat/django
tests/forms_tests/tests/test_regressions.py
34
8085
# -*- coding: utf-8 -*- from __future__ import unicode_literals import warnings from django.forms import ( CharField, ChoiceField, Form, HiddenInput, IntegerField, ModelForm, ModelMultipleChoiceField, MultipleChoiceField, RadioSelect, Select, TextInput, ) from django.test import TestCase from django.utils...
bsd-3-clause
blab/antibody-response-pulse
bcell-array/code/Virus_Bcell_IgM_IgG_Landscape.py
1
11385
# coding: utf-8 # # Antibody Response Pulse # https://github.com/blab/antibody-response-pulse # # ### B-cells evolution --- cross-reactive antibody response after influenza virus infection or vaccination # ### Adaptive immune response for repeated infection # In[1]: ''' author: Alvason Zhenhua Li date: 04/09/201...
gpl-2.0
jiangzhw/SPF
spf/core/portscan.py
9
2044
#!/usr/bin/env python # Original code borrowed from http://code.activestate.com/recipes/286240-python-portscanners/ # Modified as needed by Adam Compton import socket import sys import threading, Queue MAX_THREADS = 10 TIMEOUT = 0.5 # Threaded Scanner class class Scanner(threading.Thread): def __init__(self, in...
bsd-3-clause
rmcgibbo/scipy
scipy/cluster/vq.py
20
28103
""" ==================================================================== K-means clustering and vector quantization (:mod:`scipy.cluster.vq`) ==================================================================== Provides routines for k-means clustering, generating code books from k-means models, and quantizing vectors ...
bsd-3-clause
moyogo/ufo2ft
Lib/ufo2ft/outlineCompiler.py
1
55408
import logging import math from collections import Counter, namedtuple from io import BytesIO from types import SimpleNamespace from fontTools.cffLib import ( CharStrings, GlobalSubrsIndex, IndexedStrings, PrivateDict, SubrsIndex, TopDict, TopDictIndex, ) from fontTools.misc.arrayTools impo...
mit
harmy/kbengine
kbe/res/scripts/common/Lib/xdrlib.py
3
5694
"""Implements (a subset of) Sun XDR -- eXternal Data Representation. See: RFC 1014 """ import struct from io import BytesIO __all__ = ["Error", "Packer", "Unpacker", "ConversionError"] # exceptions class Error(Exception): """Exception class for this module. Use: except xdrlib.Error, var: ...
lgpl-3.0
onceuponatimeforever/oh-mainline
vendor/packages/twisted/twisted/lore/test/test_man2lore.py
17
5760
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.lore.man2lore}. """ from StringIO import StringIO from twisted.trial.unittest import TestCase from twisted.lore.man2lore import ManConverter _TRANSITIONAL_XHTML_DTD = ("""\ <?xml version="1.0"?> <!DOCTYPE html PUBLIC ...
agpl-3.0
onceuponatimeforever/oh-mainline
vendor/packages/PyYaml/lib3/yaml/constructor.py
190
25554
__all__ = ['BaseConstructor', 'SafeConstructor', 'Constructor', 'ConstructorError'] from .error import * from .nodes import * import collections, datetime, base64, binascii, re, sys, types class ConstructorError(MarkedYAMLError): pass class BaseConstructor: yaml_constructors = {} yaml_multi_constr...
agpl-3.0
follow99/django
tests/project_template/test_settings.py
274
1083
import unittest from django.test import TestCase from django.utils import six @unittest.skipIf(six.PY2, 'Python 2 cannot import the project template because ' 'django/conf/project_template doesn\'t have an __init__.py file.') class TestStartProjectSettings(TestCase): def test_middleware_classes_headers(...
bsd-3-clause
echoi/snac_bmi
pythia-0.8/packages/pyre/pyre/geometry/solids/__init__.py
2
1159
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # <LicenseText> # # ~~~~~~~~~~~...
gpl-2.0
shreyasp/erpnext
erpnext/schools/doctype/program_enrollment/program_enrollment.py
10
1966
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import msgprint, _ from frappe.model.document import Document from frappe.utils import comma_and class ProgramEnrollment(Document): ...
gpl-3.0
bollu/sandhi
modules/gr36/gnuradio-core/src/python/gnuradio/gr/qa_short_to_float.py
18
2172
#!/usr/bin/env python # # Copyright 2011,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your optio...
gpl-3.0
only4hj/fast-rcnn
lib/roi_data_layer/minibatch.py
1
22641
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Compute minibatch blobs for training a Fast R-CNN network.""" impor...
mit
Princeton-CDH/derrida-django
derrida/outwork/migrations/0001_initial.py
1
1186
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-17 18:44 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import mezzanine.core.fields class Migration(migrations.Migration): initial = True dependencies = [ ('people', '...
apache-2.0
raybuhr/python-docs-samples
bigquery/samples/load_data_by_post.py
2
4574
# Copyright 2015, 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 or agreed to in writing, s...
apache-2.0
196510921/openwrt-mtk
tools/b43-tools/files/b43-fwsquash.py
494
4767
#!/usr/bin/env python # # b43 firmware file squasher # Removes unnecessary firmware files # # Copyright (c) 2009 Michael Buesch <mb@bu3sch.de> # # Licensed under the GNU/GPL version 2 or (at your option) any later version. # import sys import os def usage(): print("Usage: %s PHYTYPES COREREVS /path/to/extracted/firm...
gpl-2.0
bluechiptechnology/Rx3_linux_3.0.35_4.0.0
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
adamdanielczyk/pybikes
pybikes/mvgmeinrad.py
4
2045
# -*- coding: utf-8 -*- import json from .base import BikeShareSystem, BikeShareStation from . import utils, exceptions __all__ = ['Mvgmeinrad', 'MvgmeinradStation'] class Mvgmeinrad(BikeShareSystem): sync = True meta = { 'system': 'Mvgmeinrad', 'company': ['Mainzer Verkehrsgesellschaft mbH...
lgpl-3.0
Nicop06/ansible
lib/ansible/modules/notification/hall.py
29
3364
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Billy Kimble <basslines@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
akvo/akvo-watercompass
dsp/dsp/dsp-static/admin/js/compress.py
784
1896
#!/usr/bin/env python import os import optparse import subprocess import sys here = os.path.dirname(__file__) def main(): usage = "usage: %prog [file1..fileN]" description = """With no file paths given this script will automatically compress all jQuery-based files of the admin app. Requires the Google Closure...
agpl-3.0
phalcon/readthedocs.org
readthedocs/vcs_support/backends/hg.py
1
3235
import csv from StringIO import StringIO from projects.exceptions import ProjectImportError from vcs_support.base import BaseVCS, VCSVersion class Backend(BaseVCS): supports_tags = True supports_branches = True fallback_branch = 'default' def update(self): super(Backend, self).update() ...
mit
neerajvashistha/pa-dude
lib/python2.7/site-packages/ebooklib/utils.py
4
1224
# This file is part of EbookLib. # Copyright (c) 2013 Aleksandar Erkalovic <aerkalov@gmail.com> # # EbookLib is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
mit
Pexego/odoo
addons/stock_account/__init__.py
384
1060
# -*- 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...
agpl-3.0
cloudera/hue
desktop/core/ext-py/celery-4.2.1/celery/contrib/testing/manager.py
2
7585
"""Integration testing utilities.""" from __future__ import absolute_import, print_function, unicode_literals import socket import sys from collections import defaultdict from functools import partial from itertools import count from kombu.utils.functional import retry_over_time from celery import states from celery...
apache-2.0
franek/weboob
modules/phpbb/browser.py
2
6682
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
agpl-3.0
aviaryan/open-event-orga-server
migrations/versions/a946e9a677e1_.py
10
1157
"""empty message Revision ID: a946e9a677e1 Revises: abda2e67f7c3 Create Date: 2016-06-24 12:15:14.410470 """ # revision identifiers, used by Alembic. revision = 'a946e9a677e1' down_revision = 'abda2e67f7c3' from alembic import op import sqlalchemy as sa import sqlalchemy_utils def upgrade(): ### commands auto...
gpl-3.0
Crystalnix/house-of-life-chromium
chrome/test/functional/chromeos_security.py
1
1213
#!/usr/bin/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. import os import pyauto_functional import pyauto class ChromeosSecurity(pyauto.PyUITest): """Security tests for chrome on ChromeOS...
bsd-3-clause
Huskerboy/startbootstrap-freelancer
freelancer_env/Lib/encodings/iso2022_kr.py
816
1053
# # iso2022_kr.py: Python Unicode Codec for ISO2022_KR # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_kr') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncod...
mit
clumsy/intellij-community
python/lib/Lib/posixpath.py
80
15555
"""Common operations on Posix pathnames. Instead of importing this module directly, import os and refer to this module as os.path. The "os.path" name is an alias for this module on Posix systems; on other systems (e.g. Mac, Windows), os.path provides the same operations in a manner specific to that platform, and is a...
apache-2.0
takahirox/three.js
utils/exporters/blender/addons/io_three/exporter/__init__.py
119
2708
import os import sys import traceback from .. import constants, logger, exceptions, dialogs from . import scene, geometry, api, base_classes def _error_handler(func): def inner(filepath, options, *args, **kwargs): level = options.get(constants.LOGGING, constants.DISABLED) version = options.ge...
mit
sotlampr/personal-site
app/blog/views.py
1
3882
from datetime import datetime from flask import abort, flash, request, render_template, redirect, url_for from flask.ext.login import login_required, current_user from sqlalchemy import desc from . import blog from .forms import PostForm, DeleteForm from ..models import db, Post @blog.route('/') @blog.route('/inde...
mit
khalibartan/Antidote-DM
Antidotes DM/youtube_dl/extractor/everyonesmixtape.py
17
2819
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, sanitized_Request, ) class EveryonesMixtapeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?everyonesmixtape\.com/#/mix/(?P<id>[0-9a-zA-Z]+)(?:/(?P<songnr>[0-9]))?$' _TESTS ...
gpl-2.0
accomac/namebench
libnamebench/charts_test.py
175
5898
#!/usr/bin/env python # Copyright 2009 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...
apache-2.0
bmwiedemann/linuxcnc-mirror
lib/python/rs274/author.py
39
12537
# This is a component of emc2 # Copyright 2007 Jeff Epler <jepler@unpythonic.net> # # 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 yo...
lgpl-2.1
b-jazz/stravamous
src/converter.py
1
1697
import logging import os import subprocess def out_for_in(in_path): return '{0}.gpx'.format(os.path.splitext(os.path.basename(in_path))[0]) class Converter(object): def __init__(self, config, input_path): self.config = config self.logger = logging.getLogger() self.input_file = input...
lgpl-3.0
celiafish/VisTrails
vistrails/packages/tabledata/write/write_numpy.py
2
4235
import numpy from vistrails.core.modules.vistrails_module import Module from ..read.read_numpy import NumPyArray class WriteNumPy(Module): """Writes a list as a Numpy file. NumPy can use one of two schemes: either 'plain' binary arrays, i.e. just the binary representation of the data format (in this ca...
bsd-3-clause
fkolacek/FIT-VUT
bp-revok/python/lib/python2.7/test/test_compare.py
194
1488
import unittest from test import test_support class Empty: def __repr__(self): return '<Empty>' class Coerce: def __init__(self, arg): self.arg = arg def __repr__(self): return '<Coerce %s>' % self.arg def __coerce__(self, other): if isinstance(other, Coerce): ...
apache-2.0
ChopChopKodi/pelisalacarta
python/main-classic/servers/depositfiles.py
6
1984
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para depositfiles # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re from core import logger from core import scr...
gpl-3.0
pedrobaeza/odoo
addons/account_anglo_saxon/product.py
384
3035
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
agpl-3.0
atomic83/youtube-dl
youtube_dl/extractor/appleconnect.py
139
1848
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( str_to_int, ExtractorError ) class AppleConnectIE(InfoExtractor): _VALID_URL = r'https?://itunes\.apple\.com/\w{0,2}/?post/idsa\.(?P<id>[\w-]+)' _TEST = { 'url': 'https://itunes.app...
unlicense
mohamed--abdel-maksoud/chromium.src
tools/auto_bisect/bisect_state_test.py
58
1254
# 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 unittest from bisect_state import BisectState class BisectStateTest(unittest.TestCase): def testCreatesRevisionsStateAfterAReferenceRevision(sel...
bsd-3-clause
tlatzko/spmcluster
.tox/docs/lib/python2.7/site-packages/sphinx/search/ja.py
4
30846
# -*- coding: utf-8 -*- """ sphinx.search.ja ~~~~~~~~~~~~~~~~ Japanese search language: includes routine to split words. :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ # Python Version of TinySegmenter # (http://chasen.org/~taku/softwa...
bsd-2-clause
jesonyang001/qarepo
askbot/__init__.py
1
3117
""" :synopsis: the Django Q&A forum application Functions in the askbot module perform various basic actions on behalf of the forum application """ import os import platform VERSION = (0, 7, 51) #keys are module names used by python imports, #values - the package qualifier to use for pip REQUIREMENTS = { 'akisme...
gpl-3.0
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/markdown/extensions/html_tidy.py
21
2295
#!/usr/bin/env python """ HTML Tidy Extension for Python-Markdown ======================================= Runs [HTML Tidy][] on the output of Python-Markdown using the [uTidylib][] Python wrapper. Both libtidy and uTidylib must be installed on your system. Note than any Tidy [options][] can be passed in as extensio...
agpl-3.0
kawamon/hue
desktop/core/ext-py/Django-1.11.29/tests/view_tests/tests/test_defaults.py
12
5797
from __future__ import unicode_literals import datetime from django.contrib.sites.models import Site from django.http import Http404 from django.template import TemplateDoesNotExist from django.test import RequestFactory, TestCase from django.test.utils import override_settings from django.views.defaults import ( ...
apache-2.0
vmendez/DIRAC
AccountingSystem/Client/Types/WMSHistory.py
13
1456
# $HeadURL$ __RCSID__ = "$Id$" from DIRAC.AccountingSystem.Client.Types.BaseAccountingType import BaseAccountingType class WMSHistory( BaseAccountingType ): def __init__( self ): BaseAccountingType.__init__( self ) self.definitionKeyFields = [ ( 'Status', "VARCHAR(128)" ), ...
gpl-3.0
OmeGak/indico-plugins
vc_vidyo/indico_vc_vidyo/api/cache.py
1
1207
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
gpl-3.0
Djabbz/wakatime
wakatime/packages/pygments_py3/pygments/lexers/pawn.py
75
8094
# -*- coding: utf-8 -*- """ pygments.lexers.pawn ~~~~~~~~~~~~~~~~~~~~ Lexers for the Pawn languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer from pygments.token import Text, Comment, Opera...
bsd-3-clause
analurandis/Tur
backend/venv/Lib/site-packages/tests/test_build_latex.py
7
3216
# -*- coding: utf-8 -*- """ test_build_latex ~~~~~~~~~~~~~~~~ Test the build process with LaTeX builder with the test root. :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import sys from StringIO import StringIO fro...
mit
Guidobelix/pyload
module/database/UserDatabase.py
41
3447
# -*- coding: utf-8 -*- """ 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 version. This program is distributed in ...
gpl-3.0
bukalov/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py
115
10262
# vim: set fileencoding=utf-8 : # Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, t...
bsd-3-clause
pombredanne/pyjs
pyjswidgets/pyjamas/ui/TabPanel.py
7
4960
# Copyright 2006 James Tauber and contributors # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # # 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/...
apache-2.0
sontek/rethinkdb
external/v8_3.30.33.16/build/gyp/test/subdirectory/gyptest-SYMROOT-default.py
399
1260
#!/usr/bin/env python # Copyright (c) 2009 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 building a target and a subsidiary dependent target from a .gyp file in a subdirectory, without specifying an explicit output b...
agpl-3.0
AustinRoy7/Pomodoro-timer
venv/Lib/encodings/ptcp154.py
219
14015
""" Python Character Mapping Codec generated from 'PTCP154.txt' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,err...
mit
vijayanandnandam/youtube-dl
youtube_dl/extractor/ehow.py
195
1518
from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urllib_parse_unquote class EHowIE(InfoExtractor): IE_NAME = 'eHow' _VALID_URL = r'https?://(?:www\.)?ehow\.com/[^/_?]*_(?P<id>[0-9]+)' _TEST = { 'url': 'http://www.ehow.com/video_12245069_hardwoo...
unlicense
yannrouillard/weboob
modules/mangafox/backend.py
5
1483
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Noé Rubinstein # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
agpl-3.0
Saicheg/omim
3party/protobuf/python/google/protobuf/internal/message_factory_test.py
74
5913
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
apache-2.0
Xhanim/libgdx
extensions/gdx-freetype/jni/freetype-2.6.2/src/tools/docmaker/tohtml.py
55
23387
# # tohtml.py # # A sub-class container of the `Formatter' class to produce HTML. # # Copyright 2002-2015 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.TXT. By continuing to use, mo...
apache-2.0
AndrewGoldstein/grasshopper
tests/test_models.py
1
1954
# -*- coding: utf-8 -*- """Model unit tests.""" import datetime as dt import pytest from grasshopper.user.models import Role, User from .factories import UserFactory @pytest.mark.usefixtures('db') class TestUser: """User tests.""" def test_get_by_id(self): """Get user by ID.""" user = User...
bsd-3-clause
roboime/pyroboime
roboime/core/skills/gotolooking.py
1
1250
# # Copyright (C) 2013-2015 RoboIME # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distrib...
agpl-3.0
rodluger/everest
docs/mcmc.py
1
2721
"""MCMC example for transit fitting.""" import matplotlib.pyplot as pl from everest import Everest, TransitModel import numpy as np import emcee from tqdm import tqdm from corner import corner def lnprior(x): """Return the log prior given parameter vector `x`.""" per, t0, b = x if b < -1 or b > 1: ...
mit
gkwatson/lab
python/random_agent.py
2
6608
# Copyright 2016 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the ho...
gpl-2.0
svn2github/suds
tests/builtin.py
64
18063
# 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 ...
lgpl-3.0
wnesl/gnuradio-IA
grc/gui/MainWindow.py
17
10676
""" Copyright 2008, 2009, 2011 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option...
gpl-3.0
cxcsds/ciao-contrib
crates_contrib/images.py
1
4630
# # Copyright (C) 2012, 2015, 2016, 2019 # Smithsonian Astrophysical Observatory # # # 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 you...
gpl-3.0
MRigal/django
django/db/backends/postgresql_psycopg2/introspection.py
326
10060
from __future__ import unicode_literals from collections import namedtuple from django.db.backends.base.introspection import ( BaseDatabaseIntrospection, FieldInfo, TableInfo, ) from django.utils.encoding import force_text FieldInfo = namedtuple('FieldInfo', FieldInfo._fields + ('default',)) class DatabaseIntr...
bsd-3-clause
marinho/django-plus
djangoplus/test_utils.py
1
3702
"""Utilities for test modules""" import os, unittest, doctest from django.core.serializers import deserialize from django.db.models import get_apps from django.test.simple import get_tests from django.core import management try: set except: from sets import Set as set def load_fixture(path, file_type='json')...
lgpl-3.0
fiete201/qutebrowser
qutebrowser/commands/command.py
2
23485
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
acsone/hr
hr_department_sequence/tests/test_hr_department.py
13
2140
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2010 - 2014 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it a...
agpl-3.0
xinity/cabot
cabot/cabotapp/migrations/0007_auto__add_instancestatussnapshot.py
14
14160
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'InstanceStatusSnapshot' db.create_table('cabotapp_instancestatussnapshot', ( ('i...
mit
maxsocl/django
django/contrib/sessions/backends/signed_cookies.py
383
2895
from django.conf import settings from django.contrib.sessions.backends.base import SessionBase from django.core import signing class SessionStore(SessionBase): def load(self): """ We load the data from the key itself instead of fetching from some external data store. Opposite of _get_sess...
bsd-3-clause
evernym/zeno
plenum/test/node_request/test_order/test_ordering_when_pre_prepare_not_received.py
2
2139
import types from stp_core.loop.eventually import eventually from plenum.test import waits from plenum.test.delayers import ppDelay, pDelay from plenum.test.helper import sdk_send_random_request from plenum.test.test_node import getNonPrimaryReplicas def testOrderingWhenPrePrepareNotReceived(looper, txnPoolNodeSet,...
apache-2.0
nburn42/tensorflow
tensorflow/python/keras/optimizers.py
1
29041
# 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
shaded-enmity/ansible-modules-extras
network/lldp.py
31
2795
#!/usr/bin/python -tt # 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 distrib...
gpl-3.0
hifly/OpenUpgrade
addons/base_action_rule/__init__.py
438
1098
# -*- 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...
agpl-3.0
gnowledge/ncert_nroer
gstudio/tests/sitemaps.py
3
5924
# Copyright (c) 2011, 2012 Free Software Foundation # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later vers...
agpl-3.0
acigna/pywez
zsi/test/wsdl2py/test_FinancialService.py
2
2096
#!/usr/bin/env python ############################################################################ # Joshua R. Boverhof, LBNL # See LBNLCopyright for copyright notice! # Tests for Holger's Square Service # ########################################################################### import sys, unittest from ServiceTest...
mit
ccnmtl/lettuce
tests/integration/lib/Django-1.3/django/contrib/auth/admin.py
153
6848
from django.db import transaction from django.conf import settings from django.contrib import admin from django.contrib.auth.forms import UserCreationForm, UserChangeForm, AdminPasswordChangeForm from django.contrib.auth.models import User, Group from django.contrib import messages from django.core.exceptions import Pe...
gpl-3.0
nharraud/b2share
invenio/modules/formatter/format_elements/bfe_xml_record.py
6
1646
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. # # Invenio 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,...
gpl-2.0
lintrace/GravityFalls3
gravity_falls.py
1
1529
#!/usr/bin/python3 """ Главный файл для запуска Решение шифрограмм из книги "Дневник Гравити Фоллз 3" """ import atbash_chiper, caesar_cipher, vigenere_cipher print('='*80) print('Зашифровано шифром Цезаря, см. коментарии к строкам выше (место в книге)') print('='*80) for line in open('caesar.txt'): if line[0] ==...
gpl-3.0
Azure/azure-sdk-for-python
sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py
1
30361
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit