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
EaterOA/fortunebot
tests/test_bot.py
1
2234
#! /usr/bin/env python # -*- coding: utf-8 -*- import six import mock import irc from fortunebot import bot MODULE = 'fortunebot.botrunner' EXAMPLE_CHANNEL = "#test" EXAMPLE_NICK = "fortunebot" EXAMPLE_MSG = "abcdefg" EXAMPLE_MSG2 = "星空" EXAMPLE_SCRIPT_RETURN = EXAMPLE_MSG2 class TestFortunebot(object): def s...
gpl-3.0
Mirantis/swift-encrypt
swift/common/middleware/tempurl.py
2
19737
# Copyright (c) 2010-2012 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
UbiCastTeam/candies
candies2/dropdown.py
1
24647
#!/usr/bin/env python # -*- coding: utf-8 -* import clutter import common from container import BaseContainer from roundrect import RoundRectangle from text import TextContainer from box import VBox from autoscroll import AutoScrollPanel class OptionLine(BaseContainer): __gtype_name__ = 'OptionLine' """ ...
lgpl-3.0
hughsie/libhif
data/tests/modules/specs/_create_modulemd.py
4
3503
#!/usr/bin/python import os import json import hashlib import gi gi.require_version('Modulemd', '1.0') from gi.repository import Modulemd MODULES_DIR = os.path.join(os.path.dirname(__file__), "..", "modules") SPECS_DIR = os.path.join(os.path.dirname(__file__), "..", "specs") def parse_module_id(module_id): r...
lgpl-2.1
40223234/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/re.py
626
15140
# # Secret Labs' Regular Expression Engine # # re-compatible interface for the sre matching engine # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # This version of the SRE library can be redistributed under CNRI's # Python 1.6 license. For any other use, please contact Secret Labs # AB (info@py...
gpl-3.0
V155/qutebrowser
qutebrowser/components/zoomcommands.py
1
3262
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2018 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 Softwa...
gpl-3.0
Glasgow2015/team-10
env/lib/python2.7/site-packages/cms/utils/urlutils.py
46
2683
# -*- coding: utf-8 -*- import re from django.conf import settings from django.core.urlresolvers import reverse from django.utils.encoding import force_text from django.utils.http import urlencode from django.utils.six.moves.urllib.parse import urlparse from cms.utils.conf import get_cms_setting # checks validity of...
apache-2.0
HarborYuan/cashier
env/Lib/site-packages/pkg_resources/_vendor/packaging/markers.py
228
8248
# 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 operator import os import platform import sys from pkg_resources.e...
mit
sysalexis/kbengine
kbe/src/lib/python/Lib/asyncio/proactor_events.py
63
18098
"""Event loop using a proactor and related classes. A proactor is a "notify-on-completion" multiplexer. Currently a proactor is only implemented on Windows with IOCP. """ __all__ = ['BaseProactorEventLoop'] import socket from . import base_events from . import constants from . import futures from . import transpor...
lgpl-3.0
yg257/Pangea
templates/root/ec2/lib/boto-2.34.0/boto/mashups/interactive.py
148
2783
# Copyright (C) 2003-2007 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # # Paramiko 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 op...
apache-2.0
SCOAP3/invenio
invenio/legacy/websubmit/functions/Send_APP_Mail.py
13
12240
# This file is part of Invenio. # Copyright (C) 2004, 2005, 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, or (at your o...
gpl-2.0
bocajspear1/vulnfeed
vulnfeed/sender.py
1
6613
# This is the part of the code that sends the emails import os import threading from datetime import datetime, timedelta, date import calendar import re import time from util.email_sender import send_email from database.user import get_users, User from database.feed import get_feed_reports from database.rules import...
gpl-3.0
40223137/cdag7test37
static/Brython3.1.3-20150514-095342/Lib/test/pystone.py
718
7379
#! /usr/bin/python3.3 """ "PYSTONE" Benchmark Program Version: Python/1.1 (corresponds to C/1.1 plus 2 Pystone fixes) Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013. Translated from ADA to C by Rick Richardson. Every method to preserve ADA-likeness ha...
gpl-3.0
srsman/odoo
addons/account_sequence/__init__.py
433
1104
# -*- 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
r0mai/metashell
3rd/templight/llvm/examples/Kaleidoscope/MCJIT/complete/split-lib.py
35
3846
#!/usr/bin/env python from __future__ import print_function class TimingScriptGenerator: """Used to generate a bash script which will invoke the toy and time it""" def __init__(self, scriptname, outputname): self.shfile = open(scriptname, 'w') self.timeFile = outputname self.shfile.wri...
gpl-3.0
mmalorni/server-tools
__unported__/server_environment/system_info.py
6
2161
# -*- coding: utf-8 -*- ############################################################################## # # Adapted by Nicolas Bessi. Copyright Camptocamp SA # Based on Florent Xicluna original code. Copyright Wingo SA # # This program is free software: you can redistribute it and/or modify # it under the te...
agpl-3.0
FireBladeNooT/Medusa_1_6
lib/sqlalchemy/orm/interfaces.py
34
21552
# orm/interfaces.py # Copyright (C) 2005-2016 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 """ Contains various base classes used throughout the ORM. Defines some key base...
gpl-3.0
jkstrick/samba
buildtools/wafsamba/configure_file.py
24
1312
# handle substitution of variables in .in files import Build, sys, Logs from samba_utils import * def subst_at_vars(task): '''substiture @VAR@ style variables in a file''' env = task.env src = task.inputs[0].srcpath(env) tgt = task.outputs[0].bldpath(env) f = open(src, 'r') s = f.read() ...
gpl-3.0
google-code/android-scripting
python/src/Lib/plat-mac/aetools.py
33
11587
"""Tools for use in AppleEvent clients and servers. pack(x) converts a Python object to an AEDesc object unpack(desc) does the reverse packevent(event, parameters, attributes) sets params and attrs in an AEAppleEvent record unpackevent(event) returns the parameters and attributes from an AEAppleEvent record Plus... ...
apache-2.0
JVillella/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/conditional_transformed_distribution_test.py
78
2980
# 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
philippbosch/django-tellafriend
docs/source/conf.py
1
7092
# -*- coding: utf-8 -*- # # django-tellafriend documentation build configuration file, created by # sphinx-quickstart on Fri Aug 6 20:14:06 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated fi...
mit
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/SQLAlchemy-1.0.6/lib/sqlalchemy/inspection.py
81
3093
# sqlalchemy/inspect.py # Copyright (C) 2005-2015 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 """The inspection module provides the :func:`.inspect` function, which deliver...
mit
samuelcolvin/mkdocs
mkdocs/config/base.py
22
4969
from __future__ import unicode_literals import logging import os from mkdocs import exceptions from mkdocs import utils log = logging.getLogger('mkdocs.config') class ValidationError(Exception): """Raised during the validation process of the config on errors.""" class Config(utils.UserDict): """ MkDo...
bsd-2-clause
SerCeMan/intellij-community
python/testData/inspections/PyUnusedLocalVariableInspection/test.py
44
6251
def foo1(): <weak_warning descr="Local variable 'aaa' value is not used">aaa</weak_warning> = 1 #fail <weak_warning descr="Local variable 'aaa' value is not used">aaa</weak_warning> = 2 #fail bbb = 1 #pass return bbb def bar(<weak_warning descr="Parameter 'self' value is not used">self</weak_warning>): #fail ...
apache-2.0
AndyDiamondstein/vitess
py/vttest/run_local_database.py
1
5488
#!/usr/bin/env python """Command-line tool for starting a local Vitess database for testing. USAGE: $ run_local_database --port 12345 \ --topology test_keyspace/-80:test_keyspace_0,test_keyspace/80-:test_keyspace_1 \ --schema_dir /path/to/schema/dir It will run the tool, logging to stderr. On stdout, a sm...
bsd-3-clause
keerts/home-assistant
tests/components/test_rfxtrx.py
17
5523
"""The tests for the Rfxtrx component.""" # pylint: disable=protected-access import unittest import pytest from homeassistant.core import callback from homeassistant.bootstrap import setup_component from homeassistant.components import rfxtrx as rfxtrx from tests.common import get_test_home_assistant @pytest.mark.s...
apache-2.0
jhawkesworth/ansible
lib/ansible/plugins/lookup/hiera.py
84
2509
# (c) 2017, Juan Manuel Parrilla <jparrill@redhat.com> # (c) 2012-17 Ansible Project # 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 DOCUMENTATION = ''' author: - Juan Manuel P...
gpl-3.0
ping/youtube-dl
youtube_dl/extractor/hark.py
60
1341
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class HarkIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?hark\.com/clips/(?P<id>.+?)-.+' _TEST = { 'url': 'http://www.hark.com/clips/mmbzyhkgny-obama-beyond-the-afghan-theater-we-only-target-al-qaeda-on-ma...
unlicense
flyingbanana1024102/transmission-line-simulator
src/views/contextmenu.py
1
3701
# # Transmission Line Simulator # # Author(s): Jiacong Xu # Created: Jul-10-2017 # from materialwidget import MaterialWidget from materialbutton import MaterialButton from kivy.properties import * from kivy.lang.builder import Builder from util.constants import * from kivy.animation import Animation from kivy.clock i...
mit
phobson/statsmodels
statsmodels/sandbox/examples/example_crossval.py
33
2232
import numpy as np from statsmodels.sandbox.tools import cross_val if __name__ == '__main__': #A: josef-pktd import statsmodels.api as sm from statsmodels.api import OLS #from statsmodels.datasets.longley import load from statsmodels.datasets.stackloss import load from statsmodels.iolib.tab...
bsd-3-clause
AndyHuu/flocker
flocker/route/_interfaces.py
15
2768
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Definitions of interfaces related to network configuration. """ from zope.interface import Attribute, Interface class INetwork(Interface): """ An ``INetwork`` can have proxies configured on it. """ logger = Attribute( "An ``eli...
apache-2.0
ewah/consul-template
vendor/github.com/hashicorp/go-msgpack/codec/msgpack_test.py
1232
3478
#!/usr/bin/env python # This will create golden files in a directory passed to it. # A Test calls this internally to create the golden files # So it can process them (so we don't have to checkin the files). import msgpack, msgpackrpc, sys, os, threading def get_test_data_list(): # get list with all primitive typ...
mpl-2.0
mitsuse/salada
tests/test_segmenter.py
1
1418
#!/usr/bin/env python # coding: utf-8 from salada import language from salada import segmenter class TestDefault: def test_segment_text_by_sequence_of_spaces(self): text = ' foo \n \n\n bar \t\n baz ' expectation = [ language.Segment('', True, False), language.Segmen...
mit
owlzhou/ttornado
env/Lib/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py
2769
1967
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
apache-2.0
dhermes/google-cloud-python
dataproc/google/cloud/dataproc_v1beta2/proto/workflow_templates_pb2.py
2
119850
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1beta2/proto/workflow_templates.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _me...
apache-2.0
Onager/plaso
plaso/containers/tasks.py
1
6551
# -*- coding: utf-8 -*- """Task related attribute container definitions.""" import time import uuid from plaso.containers import interface from plaso.containers import manager from plaso.lib import definitions class Task(interface.AttributeContainer): """Task attribute container. A task describes a piece of wo...
apache-2.0
TitasNandi/Summer_Project
gensim-0.12.4/gensim/corpora/textcorpus.py
68
4188
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Text corpora usually reside on disk, as text files in one format or another In a common scenario, we need to build a dictionary (a `word->integer id` mapping), which is then used to construct ...
apache-2.0
nagyistoce/edx-platform
common/djangoapps/static_replace/test/test_static_replace.py
98
6009
import re from nose.tools import assert_equals, assert_true, assert_false # pylint: disable=no-name-in-module from static_replace import ( replace_static_urls, replace_course_urls, _url_replace_regex, process_static_urls, make_static_urls_absolute ) from mock import patch, Mock from opaque_keys.e...
agpl-3.0
benfinke/ns_python
nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslvserver_ecccurve_binding.py
3
6895
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
rsvip/Django
tests/model_validation/models.py
166
1314
from django.db import models class ThingItem(object): def __init__(self, value, display): self.value = value self.display = display def __iter__(self): return (x for x in [self.value, self.display]) def __len__(self): return 2 class Things(object): def __iter__(se...
bsd-3-clause
sergev/mraa
tests/gpio_checks.py
34
3506
#!/usr/bin/env python # Author: Costin Constantin <costin.c.constantin@intel.com> # Copyright (c) 2015 Intel Corporation. # # 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 restrictio...
mit
holvi/python-stdnum
stdnum/es/iban.py
1
2510
# iban.py - functions for handling Spanish IBANs # coding: utf-8 # # Copyright (C) 2016 Arthur de Jong # # This library 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 Licens...
lgpl-2.1
rohitwaghchaure/alec_frappe5_erpnext
erpnext/accounts/doctype/account/chart_of_accounts/import_from_openerp.py
87
8747
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt """ Import chart of accounts from OpenERP sources """ from __future__ import unicode_literals import os, json import ast from xml.etree import ElementTree as ET from frappe.utils.csvutils imp...
agpl-3.0
schroeder-dewitt/polyomino-self-assembly
test/SearchSpaceAdv/main_spec.test16a.py
6
13518
import pycuda.autoinit import pycuda.driver as drv import numpy import time from pycuda.compiler import SourceModule from jinja2 import Environment, PackageLoader def main(): numpy.set_printoptions(precision=4, threshold=10000, linewidth=150) #Set up global timer...
apache-2.0
MattsFleaMarket/python-for-android
python-build/python-libs/gdata/build/lib/gdata/geo/__init__.py
249
6006
# -*-*- encoding: utf-8 -*-*- # # This is gdata.photos.geo, implementing geological positioning in gdata structures # # $Id: __init__.py 81 2007-10-03 14:41:42Z havard.gulldahl $ # # Copyright 2007 Håvard Gulldahl # Portions copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License");...
apache-2.0
Azure/azure-sdk-for-python
sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_06_01/models/_models.py
1
2367
# 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
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.3.0/Lib/idlelib/CodeContext.py
128
8353
"""CodeContext - Extension to display the block context above the edit window Once code has scrolled off the top of a window, it can be difficult to determine which block you are in. This extension implements a pane at the top of each IDLE edit window which provides block structure hints. These hints are the lines w...
mit
birkelbach/python-canfix
tests/dataconversion.py
1
4708
# Copyright (c) 2018 Phil Birkelbach # # 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 distrib...
gpl-2.0
RTHMaK/RPGOne
deep_qa-master/deep_qa/data/instances/instance.py
1
15041
""" This module contains the base ``Instance`` classes that concrete classes inherit from. Specifically, there are three classes: 1. ``Instance``, that just exists as a base type with no functionality 2. ``TextInstance``, which adds a ``words()`` method and a method to convert strings to indices using a DataIndexer...
apache-2.0
willo12/spacegrids
spacegrids/_iosg.py
1
5429
#encoding:utf-8 """ io related """ import numpy as np from _config import * import warnings warnings.formatwarning = warning_on_one_line # use_scientificio is set in config #use_scientificio = False # fallback is always scipy.io: least dependencies # cdf_lib set in _config.py and determines which library to use ...
bsd-3-clause
jetskijoe/SickGear
sickbeard/notifiers/tweet.py
2
6050
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickGear. # # SickGear 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,...
gpl-3.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.4.3/Lib/plat-mac/lib-scriptpackages/Finder/Standard_Suite.py
9
12415
"""Suite Standard Suite: Common terms that most applications should support Level 1, version 1 Generated from /System/Library/CoreServices/Finder.app AETE/AEUT resource version 0/144, language 0, script 0 """ import aetools import MacOS _code = 'CoRe' from StdSuites.Standard_Suite import * class Standard_Suite_Even...
mit
defionscode/ansible
lib/ansible/modules/net_tools/exoscale/exo_dns_record.py
57
9700
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.net> # 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
TEAM-Gummy/platform_external_chromium_org
tools/sort-headers.py
53
6193
#!/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. """Given a filename as an argument, sort the #include/#imports in that file. Shows a diff and prompts for confirmation before doin...
bsd-3-clause
UrsusPilot/mavlink
pymavlink/scanwin32.py
48
8214
#!/usr/bin/env python # this is taken from the pySerial documentation at # http://pyserial.sourceforge.net/examples.html import ctypes import re def ValidHandle(value): if value == 0: raise ctypes.WinError() return value NULL = 0 HDEVINFO = ctypes.c_int BOOL = ctypes.c_int CHAR = ctypes.c_char PCTSTR...
lgpl-3.0
bionikspoon/django-extensions
django_extensions/management/commands/sqldiff.py
24
48057
""" sqldiff.py - Prints the (approximated) difference between models and database TODO: - better support for relations - better support for constraints (mainly postgresql?) - support for table spaces with postgresql - when a table is not managed (meta.managed==False) then only do a one-way sqldiff ? show differ...
mit
coding-happily/FlaskTest
venv/lib/python3.5/site-packages/werkzeug/_internal.py
254
13709
# -*- coding: utf-8 -*- """ werkzeug._internal ~~~~~~~~~~~~~~~~~~ This module provides internally used helpers and constants. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import string import inspect from weakre...
mit
yongshengwang/hue
build/env/lib/python2.7/site-packages/ipython-0.10-py2.7.egg/IPython/dtutils.py
7
3422
"""Doctest-related utilities for IPython. For most common uses, all you should need to run is:: from IPython.dtutils import idoctest See the idoctest docstring below for usage details. """ import doctest import sys import IPython.ipapi ip = IPython.ipapi.get() def rundoctest(text,ns=None,eraise=False): """R...
apache-2.0
jordotech/satchmofork
satchmo/apps/payment/modules/paypal/views.py
6
9584
from decimal import Decimal from django.conf import settings from django.core import urlresolvers from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from django.utils.http import urlencode from django.utils.translation im...
bsd-3-clause
JoonghyunCho/crosswalk-tizen
tools/gyp/pylib/gyp/generator/ninja_test.py
260
1672
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Unit tests for the ninja.py file. """ import gyp.generator.ninja as ninja import unittest import StringIO import sys import TestCommon ...
apache-2.0
kmee/account-invoicing
account_invoice_merge/__init__.py
20
1024
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010-2011 Elico Corp. All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
walterdejong/synctool
src/synctool/main/config.py
1
13961
# # synctool.main.config.py WJ109 # # synctool Copyright 2015 Walter de Jong <walter@heiho.net> # # synctool COMES WITH NO WARRANTY. synctool IS FREE SOFTWARE. # synctool is distributed under terms described in the GNU General Public # License. # '''show elements of the synctool.conf file This program is nic...
gpl-2.0
Icenowy/MissionPlanner
Lib/encodings/rot_13.py
88
2697
#!/usr/bin/env python """ Python Character Mapping Codec for ROT13. See http://ucsub.colorado.edu/~kominek/rot13/ for details. Written by Marc-Andre Lemburg (mal@lemburg.com). """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): ...
gpl-3.0
oso/qgis-etri
ui/inference_results.py
1
5734
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/inference_results.ui' # # Created: Tue Nov 19 19:57:44 2013 # by: PyQt4 UI code generator 4.10.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 ...
gpl-3.0
vicgc/bitcurator
python/bc_genrep_gui.py
1
13484
#!/usr/bin/python # -*- coding: utf-8 -*- # coding=UTF-8 # # Created: Sun May 26 15:35:39 2013 # by: PyQt4 UI code generator 4.9.1, modified manually # import os from PyQt4 import QtCore, QtGui import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.uic import * from generate_report import *...
gpl-3.0
dpetzold/django
tests/sessions_tests/tests.py
33
31244
import base64 import os import shutil import string import sys import tempfile import unittest from datetime import timedelta from django.conf import settings from django.contrib.sessions.backends.cache import SessionStore as CacheSession from django.contrib.sessions.backends.cached_db import \ SessionStore as Cac...
bsd-3-clause
eloquence/unisubs
libs/markdown/__init__.py
17
21514
""" Python Markdown =============== Python Markdown converts Markdown to HTML and can be used as a library or called from the command line. ## Basic usage as a module: import markdown md = Markdown() html = md.convert(your_text_string) ## Basic use from the command line: python markdown.py source.t...
agpl-3.0
molmod/yaff
yaff/external/test/test_lammpsio.py
1
2291
# -*- coding: utf-8 -*- # YAFF is yet another force-field code. # Copyright (C) 2011 Toon Verstraelen <Toon.Verstraelen@UGent.be>, # Louis Vanduyfhuys <Louis.Vanduyfhuys@UGent.be>, Center for Molecular Modeling # (CMM), Ghent University, Ghent, Belgium; all rights reserved unless otherwise # stated. # # This file is pa...
gpl-3.0
bnmalcabis/testpy
python2/koans/about_tuples.py
1
2415
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutTuples(Koan): def test_creating_a_tuple(self): count_of_three = (1, 2, 5) self.assertEqual(5, count_of_three[2]) def test_tuples_are_immutable_so_item_assignment_is_not_possible(self): count_of_three =...
mit
hlkline/SU2
SU2_PY/SU2/util/which.py
2
2563
#!/usr/bin/env python ## \file which.py # \brief looks for where a program is # \author T. Lukaczyk, F. Palacios # \version 6.1.0 "Falcon" # # The current SU2 release has been coordinated by the # SU2 International Developers Society <www.su2devsociety.org> # with selected contributions from the open-source communi...
lgpl-2.1
jolevq/odoopub
addons/l10n_be_coda/wizard/account_coda_import.py
12
21390
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2012 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
nerith/servo
components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py
276
1292
def WebIDLTest(parser, harness): threw = False try: parser.parse(""" interface OneNullableInUnion { void foo((object? or DOMString?) arg); }; """) results = parser.finish() except: threw = True harness.ok(threw, "Two ...
mpl-2.0
banmoy/ns3
src/applications/bindings/modulegen__gcc_LP64.py
34
691920
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
0dataloss/ansible-modules-core
utilities/logic/assert.py
80
1392
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.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 Lice...
gpl-3.0
jhjguxin/blogserver
lib/python2.7/site-packages/django/utils/feedgenerator.py
151
15436
""" Syndication feed generation library -- used for generating RSS, etc. Sample usage: >>> from django.utils import feedgenerator >>> feed = feedgenerator.Rss201rev2Feed( ... title=u"Poynter E-Media Tidbits", ... link=u"http://www.poynter.org/column.asp?id=31", ... description=u"A group Weblog by the shar...
mit
hfp/tensorflow-xsmm
tensorflow/contrib/metrics/python/ops/histogram_ops.py
159
10459
# 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
jsoref/django
django/core/management/color.py
309
1807
""" Sets up the terminal color scheme. """ import os import sys from django.utils import lru_cache, termcolors def supports_color(): """ Returns True if the running system's terminal supports color, and False otherwise. """ plat = sys.platform supported_platform = plat != 'Pocket PC' and (pl...
bsd-3-clause
mathDR/BP-AR-HMM
OLDPY/compute_likelihood_unnorm.py
1
1820
import numpy as np def compute_likelihood_unnorm(data_struct,theta,obsModelType,Kz_inds,Kz,Ks): #function log_likelihood = # compute_likelihood_unnorm(data_struct,theta,obsModelType,Kz_inds,Kz,Ks) if obsModelType == 'Gaussian': invSigma = theta.invSigma mu = theta.mu dimu, T = (data_struct.obs).sh...
mit
ltilve/ChromiumGStreamerBackend
tools/telemetry/third_party/gsutilz/third_party/boto/tests/integration/dynamodb2/test_cert_verification.py
125
1564
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All rights reserved. # # 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 withou...
bsd-3-clause
ampax/edx-platform
lms/startup.py
9
5429
""" Module for code that should run during LMS startup """ import django from django.conf import settings # Force settings to run so that the python path is modified settings.INSTALLED_APPS # pylint: disable=pointless-statement from openedx.core.lib.django_startup import autostartup import edxmako import logging im...
agpl-3.0
skuda/client-python
kubernetes/client/models/v1_downward_api_volume_file.py
1
6558
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
apache-2.0
hezuoguang/ZGVL
WLServer/site-packages/requests/packages/chardet/sbcsgroupprober.py
2936
3291
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
apache-2.0
freakboy3742/django
tests/queries/test_explain.py
13
5190
import unittest from django.db import NotSupportedError, connection, transaction from django.db.models import Count from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature from django.test.utils import CaptureQueriesContext from .models import Tag @skipUnlessDBFeature('supports_explaining_query_execu...
bsd-3-clause
ruckuus/BuildRoot
toolchain/mklibs/mklibs.py
58
21879
#! /usr/bin/python # mklibs.py: An automated way to create a minimal /lib/ directory. # # Copyright 2001 by Falk Hueffner <falk@debian.org> # & Goswin Brederlow <goswin.brederlow@student.uni-tuebingen.de> # # mklibs.sh by Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> # used as template # # T...
gpl-2.0
kennedyshead/home-assistant
homeassistant/components/lupusec/switch.py
14
1055
"""Support for Lupusec Security System switches.""" from datetime import timedelta import lupupy.constants as CONST from homeassistant.components.switch import SwitchEntity from . import DOMAIN as LUPUSEC_DOMAIN, LupusecDevice SCAN_INTERVAL = timedelta(seconds=2) def setup_platform(hass, config, add_entities, dis...
apache-2.0
f0rki/cb-multios
original-challenges/Multicast_Chat_Server/poller/for-release/machine.py
1
11856
#!/usr/bin/env python # # Copyright (C) 2015 Narf Industries <info@narfindustries.com> # # 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 # th...
mit
mpasternak/michaldtz-fix-552
pyglet/font/win32.py
9
19585
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
bsd-3-clause
Rycieos/Minecraft-Overviewer
contrib/rerenderBlocks.py
8
2035
#!/usr/bin/python ''' Generate a region list to rerender certain chunks This is used to force the regeneration of any chunks that contain a certain blockID. The output is a chunklist file that is suitable to use with the --chunklist option to overviewer.py. Example: python contrib/rerenderBlocks.py --ids=46,79,91 ...
gpl-3.0
jaywreddy/django
tests/postgres_tests/test_unaccent.py
328
1884
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import modify_settings from . import PostgreSQLTestCase from .models import CharFieldModel, TextFieldModel @modify_settings(INSTALLED_APPS={'append': 'django.contrib.postgres'}) class UnaccentTest(PostgreSQLTestCase): Model = Char...
bsd-3-clause
shsingh/ansible
lib/ansible/modules/cloud/azure/azure_rm_virtualmachineextension.py
23
11656
#!/usr/bin/python # # Copyright (c) 2017 Sertac Ozercan <seozerca@microsoft.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
chrislyon/django_ds1
django_ds1/ds/models.py
1
2352
from django.db import models from ckeditor.fields import RichTextField # Create your models here. ## ------------------------------------------------- ## Meta Class contenant certaines donnees de bases ## ------------------------------------------------- DEF_TFAC='DEFAUT' class HoroDatage(models.Model): h_datcre ...
gpl-2.0
shuggiefisher/crowdstock
django/contrib/sessions/backends/cache.py
268
1881
from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.cache import cache class SessionStore(SessionBase): """ A cache-based session store. """ def __init__(self, session_key=None): self._cache = cache super(SessionStore, self).__init__(session_key) ...
bsd-3-clause
ccrook/Quantum-GIS
python/plugins/processing/gui/BatchAlgorithmDialog.py
4
8901
# -*- coding: utf-8 -*- """ *************************************************************************** BatchAlgorithmDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******************...
gpl-2.0
Epirex/android_external_chromium_org
build/android/pylib/uiautomator/test_runner.py
23
2442
# 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. """Class for running uiautomator tests on a single device.""" from pylib import constants from pylib.instrumentation import test_options as instr_test_o...
bsd-3-clause
shaufi/odoo
addons/payment/models/payment_acquirer.py
29
27188
# -*- coding: utf-'8' "-*-" import logging from openerp.osv import osv, fields from openerp.tools import float_round, float_repr from openerp.tools.translate import _ _logger = logging.getLogger(__name__) def _partner_format_address(address1=False, address2=False): return ' '.join((address1 or '', address2 or ...
agpl-3.0
jhawkesworth/ansible
lib/ansible/modules/network/dellos10/dellos10_config.py
42
13211
#!/usr/bin/python # # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # Copyright (c) 2017 Dell 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_vers...
gpl-3.0
peihe/incubator-beam
sdks/python/apache_beam/examples/complete/autocomplete_test.py
8
1858
# # 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...
apache-2.0
ChenJunor/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/gdal/prototypes/generation.py
219
3967
""" 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...
apache-2.0
cscott/wikiserver
whoosh/support/dawg.py
1
19568
# Copyright 2009 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
gpl-2.0
Oi-Android/android_kernel_xiaomi_ferrari
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