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
nicholascapo/powerline-shell
lib/colortrans.py
32
8246
#! /usr/bin/env python """ Code is modified (fairly heavily) by hryanjones@gmail.com from https://gist.github.com/MicahElliott/719710 Convert values between RGB tuples and xterm-256 color codes. Nice long listing of all 256 colors and their codes. Useful for developing console color themes, or even script output sch...
mit
HuaweiSwitch/ansible
lib/ansible/modules/network/dellos6/dellos6_command.py
46
7467
#!/usr/bin/python # # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # # Copyright (c) 2016 Dell Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versi...
gpl-3.0
rugk/threema-msgapi-sdk-python
threema/gateway/key.py
1
3942
""" Contains functions to decode, encode and generate keys. """ import enum import hashlib import hmac import libnacl.public import libnacl.encode __all__ = ('HMAC', 'Key') class HMAC(object): """ A collection of HMAC functions used for the gateway service. """ keys = { 'email': b'\x30\xa5\x...
mit
delta2323/chainer
tests/chainer_tests/functions_tests/activation_tests/test_log_softmax.py
3
3936
import unittest import mock import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import condition @testing.parameterize(*testing.product({ 'shape': [None, (2, 3), (2...
mit
jonathan-beard/edx-platform
common/test/acceptance/pages/xblock/acid.py
172
3445
""" PageObjects related to the AcidBlock """ from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise, BrokenPromise from .utils import wait_for_xblock_initialization class AcidView(PageObject): """ A :class:`.PageObject` representing the rendered view of the :class:`.AcidBlock`....
agpl-3.0
percy-g2/Novathor_xperia_u8500
6.1.1.B.1.54/external/webkit/Tools/QueueStatusServer/__init__.py
15
1155
# Required for Python to search this directory for module files # This __init__.py makes unit testing easier by allowing us to treat the entire server as one big module. # This file is only accessed when not on AppEngine itself. # Make sure that this module will load in that case by including paths to # the default G...
gpl-2.0
mkaluza/external_chromium_org
chrome/test/mini_installer/test_installer.py
27
9487
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This script tests the installer with test cases specified in the config file. For each test case, it checks that the machine states after the execution o...
bsd-3-clause
amian84/commiecc
commiecc/slavelib/utils.py
1
2819
# -*- coding: utf-8 -*- # vim: ts=4 ### # # CommieCC is the legal property of J. Félix Ontañón <felixonta@gmail.com> # Copyright (c) 2009 J. Félix Ontañón # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free...
gpl-3.0
greencoder/mybitly
Test Server/libraries/jinja2/compiler.py
335
63846
# -*- coding: utf-8 -*- """ jinja2.compiler ~~~~~~~~~~~~~~~ Compiles nodes into python code. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from itertools import chain from copy import deepcopy from keyword import iskeyword as is_python_keyword from jinja2...
mit
wziyong/casperfpga
src/scroll.py
1
9054
""" Playing with ncurses in Python to scroll up and down, left and right, through a list of data that is periodically refreshed. Revs: 2010-12-11 JRM Added concat for status line to prevent bailing on small terminals. Code cleanup to prevent modification of external variables. Added le...
gpl-2.0
msassmann/texcavator
services/es.py
1
21842
# -*- coding: utf-8 -*- """Elasticsearch functionality""" import json import logging import os from collections import Counter, defaultdict from datetime import datetime from elasticsearch import Elasticsearch from elasticsearch.client import indices from django.conf import settings from texcavator.utils import dat...
apache-2.0
myerpengine/odoo
addons/account_budget/wizard/__init__.py
444
1196
# -*- 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
chand3040/cloud_that
lms/djangoapps/verify_student/migrations/0009_auto__change_softwaresecurephotoverification_window_id_default_none.py
84
9796
# -*- coding: utf-8 -*- from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self): # Changing field 'SoftwareSecurePhotoVerification.window'. Setting its default value to None if db.backend_name == 'mysql': db.execute('ALTER TAB...
agpl-3.0
chongtianfeiyu/kbengine
kbe/tools/xlsx2py/xlsx2py/py2excel.py
35
9561
# -*- coding: utf-8 -*- """ ***************************************************************************************** 使用方法:python py2excel pyfile(utf-8) readexcelfile, writeexcelfile pyfile请使用utf-8,不支持ANSI, py中的应有字典datas, allDatas(py文件至少有datas) readexcelfile为生成py文件的母表 writeexcelfile 为导出的xlsx文件 ************...
lgpl-3.0
cristianquaglio/odoo
addons/payment_adyen/controllers/main.py
48
2053
# -*- coding: utf-8 -*- try: import simplejson as json except ImportError: import json import logging import pprint import werkzeug from openerp import http, SUPERUSER_ID from openerp.http import request _logger = logging.getLogger(__name__) class AdyenController(http.Controller): _return_url = '/payme...
apache-2.0
jat255/hyperspy
hyperspy/_components/pes_core_line_shape.py
2
3096
# -*- coding: utf-8 -*- # Copyright 2007-2020 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
gpl-3.0
Leoniela/nipype
nipype/interfaces/fsl/tests/test_auto_Complex.py
9
3807
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from nipype.testing import assert_equal from nipype.interfaces.fsl.utils import Complex def test_Complex_inputs(): input_map = dict(args=dict(argstr='%s', ), complex_cartesian=dict(argstr='-complex', position=1, xor=['real_polar', 'real_cartesia...
bsd-3-clause
hkmshb/bottle
test/test_formsdict.py
11
1176
# -*- coding: utf-8 -*- # '瓶' means "Bottle" import unittest from bottle import FormsDict, touni, tob class TestFormsDict(unittest.TestCase): def test_attr_access(self): """ FomsDict.attribute returs string values as unicode. """ d = FormsDict(py2=tob('瓶'), py3=tob('瓶').decode('latin1')) s...
mit
bjmnbraun/icestick_fastio
thirdparty/magma/magma/verilog.py
1
5252
import types import operator from collections import OrderedDict, Sequence from magma.port import INPUT, OUTPUT, INOUT, flip from magma.ref import DefnRef from magma.t import IntegerTypes from magma.bit import BitType, VCC, GND from magma.array import ArrayKind, ArrayType from magma.circuit import * from magma.wire imp...
mit
Matheo13/NsPortal
Back/setup.py
2
1240
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.txt')) as f: README = f.read() with open(os.path.join(here, 'CHANGES.txt')) as f: CHANGES = f.read() requires = [ 'pyramid', 'pypyodbc', 'pyramid_chameleon'...
mit
mdhaman/superdesk-core
superdesk/attachments.py
6
1537
import os import superdesk from flask import current_app from werkzeug.utils import secure_filename from apps.auth import get_user_id RESOURCE = 'attachments' class AttachmentsResource(superdesk.Resource): schema = { 'media': {'type': 'media'}, 'mimetype': {'type': 'string'}, 'filename...
agpl-3.0
ylatuya/gst-plugins-good
tests/examples/rtp/client-PCMA.py
16
4269
#! /usr/bin/env python import pygst pygst.require("0.10") import gst import gobject # # A simple RTP receiver # # receives alaw encoded RTP audio on port 5002, RTCP is received on port 5003. # the receiver RTCP reports are sent to port 5007 # # .-------. .----------. .---------. .-------. ...
lgpl-2.1
fxstein/pubkey
setup.py
1
4472
#!/usr/local/bin/python3 -u # # The MIT License (MIT) # # Copyright (c) 2015 by Oliver Ratzesberger # # 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 li...
mit
YangSongzhou/django
django/utils/ipv6.py
208
7967
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. https://github.com/google/ipaddr-py # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError from django.utils.six.moves import range from django.utils.translation import ugettext_lazy as _...
bsd-3-clause
docprofsky/meggyjr-cncserver
cncserverclient.py
1
6717
import logging import json import os import requests class CNCServerClient: """ Connects to CNCServer and sends commands to the WaterColorBot for drawing purpouses """ hasConnection = False def __init__(self, cncserver_address="http://localhost:4242", cncserver_args=""): # Create Logging i...
gpl-3.0
hrjn/scikit-learn
sklearn/ensemble/base.py
19
5168
""" Base class for ensemble-based estimators. """ # Authors: Gilles Louppe # License: BSD 3 clause import numpy as np import numbers from ..base import clone from ..base import BaseEstimator from ..base import MetaEstimatorMixin from ..utils import _get_n_jobs, check_random_state MAX_RAND_SEED = np.iinfo(np.int32)....
bsd-3-clause
mhdella/scikit-learn
sklearn/linear_model/randomized_l1.py
33
23358
""" Randomized Lasso/Logistic: feature selection based on Lasso and sparse Logistic Regression """ # Author: Gael Varoquaux, Alexandre Gramfort # # License: BSD 3 clause import itertools from abc import ABCMeta, abstractmethod import warnings import numpy as np from scipy.sparse import issparse from scipy import spar...
bsd-3-clause
ridfrustum/lettuce
tests/integration/lib/Django-1.3/django/contrib/gis/gdal/driver.py
411
2411
# prerequisites imports from ctypes import c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi # For more information, see the OGR C API source code: # http://www.gdal.org/ogr/ogr__api_8h.html # # ...
gpl-3.0
shiora/The-Perfect-Pokemon-Team-Balancer
libs/env/Lib/site-packages/sqlalchemy/orm/session.py
76
94634
# orm/session.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Provides the Session class and related utilities.""" import weakref from .. import...
gpl-2.0
gdgellatly/OCB1
openerp/addons/base/__init__.py
64
1117
# -*- coding: 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 the...
agpl-3.0
kohnle-lernmodule/KITexe201based
exe/engine/reflectionidevice.py
6
8153
# =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # Copyright 2004-2008 eXe Project, http://eXeLearning.org/ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
gpl-2.0
mitchellrj/neo4j-rest-client
neo4jrestclient/tests/test_indices.py
3
9478
# -*- coding: utf-8 -*- from datetime import datetime import unittest import os from neo4jrestclient import client from neo4jrestclient.exceptions import NotFoundError, StatusException from neo4jrestclient.utils import PY2 NEO4J_URL = os.environ.get('NEO4J_URL', "http://localhost:7474/db/data/") NEO4J_VERSION = os.e...
gpl-3.0
msabramo/requests
requests/async.py
33
2717
# -*- coding: utf-8 -*- """ requests.async ~~~~~~~~~~~~~~ This module contains an asynchronous replica of ``requests.api``, powered by gevent. All API methods return a ``Request`` instance (as opposed to ``Response``). A list of requests can be sent with ``map()``. """ try: import gevent from gevent import m...
isc
fialakarel/smallClown
lib/pubsubclient-2.6/tests/testcases/mqtt_basic.py
42
1151
import unittest import settings import time import mosquitto import serial def on_message(mosq, obj, msg): obj.message_queue.append(msg) class mqtt_basic(unittest.TestCase): message_queue = [] @classmethod def setUpClass(self): self.client = mosquitto.Mosquitto("pubsubclient_ut", clean_session=Tru...
mit
kennedyshead/home-assistant
tests/components/google_translate/test_tts.py
8
4158
"""The tests for the Google speech platform.""" import os import shutil from unittest.mock import patch from gtts import gTTSError import pytest from homeassistant.components.media_player.const import ( ATTR_MEDIA_CONTENT_ID, DOMAIN as DOMAIN_MP, SERVICE_PLAY_MEDIA, ) import homeassistant.components.tts a...
apache-2.0
google/contentbox
main/templatetags/profile_thumbnail.py
4
1039
# Copyright 2015 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 ...
apache-2.0
Tennyson53/SUR
magnum/tests/unit/db/sqlalchemy/test_types.py
15
2573
# 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, software # d...
apache-2.0
KurtDeGreeff/infernal-twin
build/pip/pip/_vendor/packaging/_compat.py
901
1253
# Copyright 2014 Donald Stufft # # 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, so...
gpl-3.0
vmanoria/bluemix-hue-filebrowser
hue-3.8.1-bluemix/desktop/libs/hadoop/src/hadoop/core_site.py
32
2327
#!/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...
gpl-2.0
sitsbeyou/Django-facebook
docs/docs_env/Lib/encodings/iso2022_jp_3.py
816
1061
# # iso2022_jp_3.py: Python Unicode Codec for ISO2022_JP_3 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp_3') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class Incrementa...
bsd-3-clause
ccomb/OpenUpgrade
openerp/addons/base/module/wizard/base_module_upgrade.py
40
4914
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
sinkuri256/python-for-android
python3-alpha/extra_modules/gdata/exif/__init__.py
45
6980
# -*-*- encoding: utf-8 -*-*- # # This is gdata.photos.exif, implementing the exif namespace in gdata # # $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"); # you may not...
apache-2.0
batxes/4Cin
Six_zebra_models/Six_zebra_models_final_output_0.1_-0.1_13000/Six_zebra_models32405.py
4
13931
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
Yong-Lee/django
django/utils/ipv6.py
225
7971
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. http://code.google.com/p/ipaddr-py/ # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError from django.utils.six.moves import range from django.utils.translation import ugettext_lazy as _...
bsd-3-clause
mobo95/pyload
module/lib/jinja2/filters.py
64
21750
# -*- coding: utf-8 -*- """ jinja2.filters ~~~~~~~~~~~~~~ Bundled jinja filters. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import math from random import choice from operator import itemgetter from itertools import imap, groupby from jinja2....
gpl-3.0
ckundo/nvda
source/NVDAHelper.py
2
20623
import os import sys import _winreg import msvcrt import winKernel import config from ctypes import * from ctypes.wintypes import * from comtypes import BSTR import winUser import eventHandler import queueHandler import api import globalVars from logHandler import log import time import globalVars ...
gpl-2.0
ibmsoe/tensorflow
tensorflow/contrib/keras/python/keras/preprocessing/image_test.py
36
7925
# 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
nitin-cherian/LifeLongLearning
Web_Development_Python/RealPython/flask-hello-world/env/lib/python3.5/site-packages/jinja2/asyncsupport.py
117
7765
# -*- coding: utf-8 -*- """ jinja2.asyncsupport ~~~~~~~~~~~~~~~~~~~ Has all the code for async support which is implemented as a patch for supported Python versions. :copyright: (c) 2017 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import sys import asyncio import inspec...
mit
manumathewthomas/Chat-with-Joey
chatbot/model.py
1
9688
# Copyright 2015 Conchylicultor. All Rights Reserved. # Modifications copyright (C) 2016 Carlos Segura # # 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/L...
apache-2.0
quentinsf/ansible
test/units/plugins/strategies/test_strategy_base.py
7
14666
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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) an...
gpl-3.0
2014c2g3/0623exam
static/Brython3.1.1-20150328-091302/Lib/tempfile_1.py
728
22357
"""Temporary files. This module provides generic, low- and high-level interfaces for creating temporary files and directories. The interfaces listed as "safe" just below can be used without fear of race conditions. Those listed as "unsafe" cannot, and are provided for backward compatibility only. This module also pr...
gpl-3.0
zilantian/p2pool
p2pool/util/datachunker.py
288
1407
import collections class StringBuffer(object): 'Buffer manager with great worst-case behavior' def __init__(self, data=''): self.buf = collections.deque([data]) self.buf_len = len(data) self.pos = 0 def __len__(self): return self.buf_len - self.pos def add...
gpl-3.0
MechCoder/scikit-learn
doc/sphinxext/numpy_ext/docscrape_sphinx.py
408
8061
import re import inspect import textwrap import pydoc from .docscrape import NumpyDocString from .docscrape import FunctionDoc from .docscrape import ClassDoc class SphinxDocString(NumpyDocString): def __init__(self, docstring, config=None): config = {} if config is None else config self.use_plots...
bsd-3-clause
alphagov/notify-api
app/main/views/index.py
1
4218
from flask import jsonify, url_for, current_app from .. import main @main.route('/') def index(): """Entry point for the API, show the resources that are available.""" return jsonify(links={ "user.fetch_user_by_id": { "url": url_for( '.fetch_user_by_id', use...
mit
ximion/dak-dep11
tests/test_process_gpgv_output.py
6
1355
#!/usr/bin/env python from base_test import DakTestCase import unittest from daklib.utils import process_gpgv_output class ProcessGPGVOutputTestCase(DakTestCase): def assertParse(self, input, output): self.assertEqual(process_gpgv_output(input)[0], output) def assertNotParse(self, input): r...
gpl-2.0
WebSpider/headphones
lib/unidecode/x00d.py
252
4121
data = ( '[?]', # 0x00 '[?]', # 0x01 'N', # 0x02 'H', # 0x03 '[?]', # 0x04 'a', # 0x05 'aa', # 0x06 'i', # 0x07 'ii', # 0x08 'u', # 0x09 'uu', # 0x0a 'R', # 0x0b 'L', # 0x0c '[?]', # 0x0d 'e', # 0x0e 'ee', # 0x0f 'ai', # 0x10 '[?]', # 0x11 'o', # 0x12 'oo', # ...
gpl-3.0
BT-ojossen/odoo
addons/portal_project_issue/__openerp__.py
375
1713
# -*- 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
trishnaguha/ansible
lib/ansible/modules/network/junos/junos_l3_interface.py
26
6844
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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', ...
gpl-3.0
teamstoreheddinge/osmc
package/mediacenter-skin-osmc/files/usr/share/kodi/addons/script.module.unidecode/lib/unidecode/x003.py
246
3875
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
gpl-2.0
keithasaurus/django_fun_views
fun_views/views/generic/update/render.py
1
1463
from fun_views.patterns.update.render import update_render_pattern from fun_views.views.utils import (get_context_base, make_base_view, not_set_get_form_class, not_set_get_obj, not_set_get_template_name, prefer_func, ...
mit
arbrandes/edx-platform
lms/djangoapps/discussion/views.py
3
41396
""" Views handling read (GET) requests for the Discussion tab and inline discussions. """ import logging from functools import wraps from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-us...
agpl-3.0
AtonLerin/pymel
pymel/__init__.py
1
1263
# copyright Chad Dombrova chadd@luma-pictures.com # created at luma pictures www.luma-pictures.com """ ******************************* PyMEL ******************************* PyMEL makes python scripting in Maya work the way it should. Maya's command module is a direct translation of MEL commands into p...
bsd-3-clause
zstackio/zstack-woodpecker
integrationtest/vm/mini/test_life_cycle_vm.py
1
3182
''' VM life cycle test for Mini @author: Zhaohao ''' import apibinding.inventory as inventory import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_state as test_state import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.operations.resource_operations as res_ops import zstackwood...
apache-2.0
Myasuka/scikit-learn
examples/exercises/plot_iris_exercise.py
323
1602
""" ================================ SVM Exercise ================================ A tutorial exercise for using different SVM kernels. This exercise is used in the :ref:`using_kernels_tut` part of the :ref:`supervised_learning_tut` section of the :ref:`stat_learn_tut_index`. """ print(__doc__) import numpy as np i...
bsd-3-clause
ressu/SickGear
lib/unidecode/x08b.py
252
4643
data = ( 'Mou ', # 0x00 'Ye ', # 0x01 'Wei ', # 0x02 '[?] ', # 0x03 'Teng ', # 0x04 'Zou ', # 0x05 'Shan ', # 0x06 'Jian ', # 0x07 'Bo ', # 0x08 'Ku ', # 0x09 'Huang ', # 0x0a 'Huo ', # 0x0b 'Ge ', # 0x0c 'Ying ', # 0x0d 'Mi ', # 0x0e 'Xiao ', # 0x0f 'Mi ', # 0x10 'Xi ...
gpl-3.0
manasi24/jiocloud-tempest-qatempest
tempest/api/orchestration/stacks/test_templates.py
11
2099
# 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, software # d...
apache-2.0
OCESS/serverv-py
serverv-py/qb_communication.py
1
4342
"""Helper class to generalize logic of SERVERv.BAS file communication.""" from pathlib import Path, PurePath, PureWindowsPath import filetransforms _client_path = {} _file_vars = {} _file_connectors = [] def parse_sevpath(sevpath_path): """Parse sevpath.RND and set up module state.""" global _...
mit
browseinfo/odoo_saas3_nicolas
addons/crm_partner_assign/wizard/crm_channel_interested.py
263
3795
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
groovecoder/kuma
kuma/users/tests/test_templates.py
12
13923
from django.conf import settings from jingo.helpers import urlparams import mock from nose.tools import eq_, ok_ from pyquery import PyQuery as pq from waffle.models import Flag from kuma.core.urlresolvers import reverse from . import UserTestCase from .test_views import TESTUSER_PASSWORD class SignupTests(UserTest...
mpl-2.0
mlue/discordbridge
node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/styles/autumn.py
135
2144
# -*- coding: utf-8 -*- """ pygments.styles.autumn ~~~~~~~~~~~~~~~~~~~~~~ A colorful style, inspired by the terminal highlighting style. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.to...
mit
Gabriel439/pants
tests/python/pants_test/option/test_options_bootstrapper.py
2
9865
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import unittest from...
apache-2.0
Rio517/pledgeservice
testlib/waitress/buffers.py
21
8627
############################################################################## # # Copyright (c) 2001-2004 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THI...
apache-2.0
15Dkatz/pants
contrib/cpp/src/python/pants/contrib/cpp/tasks/cpp_compile.py
16
3753
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from pant...
apache-2.0
gacarrillor/QGIS
python/PyQt/PyQt5/QtNetwork.py
45
1041
# -*- coding: utf-8 -*- """ *************************************************************************** QtNetwork.py --------------------- Date : March 2016 Copyright : (C) 2016 by Juergen E. Fischer Email : jef at norbit dot de ****************************...
gpl-2.0
zhaodelong/django
tests/template_tests/filter_tests/test_force_escape.py
352
2917
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template.defaultfilters import force_escape from django.test import SimpleTestCase from django.utils.safestring import SafeData from ..utils import setup class ForceEscapeTests(SimpleTestCase): """ Force_escape is applied immediatel...
bsd-3-clause
badlogicmanpreet/nupic
src/nupic/support/datafiles.py
40
7949
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
tszym/ansible
lib/ansible/modules/packaging/os/swupd.py
7
9152
#!/usr/bin/python # (c) 2017, Alberto Murillo <alberto.murillo.silva@intel.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.0', ...
gpl-3.0
drawks/ansible
lib/ansible/modules/windows/win_rds_cap.py
38
4243
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Kevin Subileau (@ksubileau) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'commu...
gpl-3.0
VielSoft/odoo
addons/account/wizard/account_fiscalyear_close.py
222
15660
# -*- 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
vams1991/Security-Tool
app/views.py
1
1823
from flask import render_template, flash, redirect,jsonify from app import app from .forms import LoginForm,Scanner from XSSModule import XSS_Module from urlparse import urlparse from sql import SQL_Module from crawler import main @app.route('/') @app.route('/index') def index(): user = {'nickname': 'hacker'} ...
bsd-3-clause
ff94315/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/encodings/utf_16.py
404
3984
""" Python 'utf-16' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs, sys ### Codec APIs encode = codecs.utf_16_encode def decode(input, errors='strict'): return codecs.utf_16_decode(input, errors, True) class IncrementalEncoder(c...
gpl-2.0
goofwear/raspberry_pwn
src/pentest/metagoofil/hachoir_parser/container/action_script.py
9
12011
""" SWF (Macromedia/Adobe Flash) file parser. Documentation: - Alexis' SWF Reference: http://www.m2osw.com/swf_alexref.html Author: Sebastien Ponce Creation date: 26 April 2008 """ from hachoir_parser import Parser from hachoir_core.field import (FieldSet, ParserError, Bit, Bits, UInt8, UInt32, Int16, UInt1...
gpl-3.0
0/pathintmatmult
examples/pigs_harmonic_oscillator_entangled.py
1
4033
#!/usr/bin/env python3 """ Entangled harmonic oscillators PIGS example. A pair of identical harmonic oscillators with a harmonic interaction potential. """ from argparse import ArgumentParser import numpy as np from pathintmatmult import PIGSIMM from pathintmatmult.constants import HBAR, KB, ME from pathintmatmult...
mit
bgribble/mfp
mfp/gui/modes/enum_control.py
1
4501
#! /usr/bin/env python ''' enum_control.py: EnumControl major mode Copyright (c) 2010-2013 Bill Gribble <grib@billgribble.com> ''' import math from ..input_mode import InputMode from .label_edit import LabelEditMode class EnumEditMode (InputMode): def __init__(self, window, element, label): self.manager ...
gpl-2.0
wwchun123/sumatrapdf
scripts/buildbot.py
15
4207
import sys import os import shutil import time import datetime import cPickle import traceback import s3 import util import util2 import build import subprocess from util import file_remove_try_hard, pretty_print_secs from util import Serializable, create_dir from util import load_config, strip_empty_line...
gpl-3.0
zaina/nova
nova/db/sqlalchemy/migrate_repo/versions/274_update_instances_project_id_index.py
73
1614
# Copyright 2014 Rackspace Hosting # # 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
vcgato29/Tomb
extras/dismissed/pytomb/tomblib/tomb.py
10
3027
''' Module structure: this contain a class, which is indeed just a collection of functions (the methods are all static). It's meant to behave in a way which is similar to the command line, for Notes: consider moving to a more typical usage (instantiate, then use method) to make it more configurable (ie set the to...
gpl-3.0
kamladi/textback-web
twilio/rest/resources/sip_domains.py
1
3185
from twilio.rest.resources import InstanceResource, ListResource class IpAccessControlListMapping(InstanceResource): def delete(self): """ Remove this mapping (disassociate the ACL from the Domain). """ return self.parent.delete_instance(self.name) class IpAccessControlListMappin...
mit
realfastvla/rfpipe
rfpipe/search.py
1
51205
from __future__ import print_function, division, absolute_import, unicode_literals from builtins import bytes, dict, object, range, map, input#, str (numba signature bug) from future.utils import itervalues, viewitems, iteritems, listvalues, listitems from io import open import numpy as np from numba import jit, guvec...
bsd-3-clause
pylessard/python-udsoncan
test/client/test_control_dtc_setting.py
1
5730
from udsoncan.client import Client from udsoncan import services from udsoncan.exceptions import * from test.ClientServerTest import ClientServerTest class TestControlDTCSettings(ClientServerTest): def __init__(self, *args, **kwargs): ClientServerTest.__init__(self, *args, **kwargs) def test_set_on(s...
mit
turian/pitch-detection-echonest
pitch-detection-echonest.py
1
3167
#!/usr/bin/python import os import sys import pyechonest.config as config import echonest.remix.audio as audio import numpy import matplotlib.pyplot as plt from midiutil.MidiFile import MIDIFile config.ECHO_NEST_API_KEY = os.environ["ECHO_NEST_API_KEY"] def normalize_loudness(audiofile): loudness = numpy.array...
bsd-3-clause
iamutkarshtiwari/kivy
kivy/extras/highlight.py
78
1880
'''Pygments lexer for kv language ''' from pygments.lexer import RegexLexer, bygroups, using from pygments.lexers.agile import PythonLexer from pygments import highlight from pygments.token import * from pygments.formatters import get_formatter_by_name import sys class KivyLexer(RegexLexer): name = 'Kivy' ali...
mit
ReachingOut/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
lgarren/spack
var/spack/repos/builtin/packages/perl-bio-perl/package.py
1
3156
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
danielvdende/incubator-airflow
tests/sensors/test_timedelta_sensor.py
15
1750
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
mancoast/CPythonPyc_test
cpython/251_test_scriptpackages.py
43
1366
# Copyright (C) 2003 Python Software Foundation import unittest import os import sys import tempfile from test import test_support import aetools class TestScriptpackages(unittest.TestCase): def _test_scriptpackage(self, package, testobject=1): # Check that we can import the package mod = __impor...
gpl-3.0
chao787/python-libs
rope/refactor/rename.py
59
9359
import warnings from rope.base import exceptions, pyobjects, pynames, taskhandle, evaluate, worder, codeanalyze from rope.base.change import ChangeSet, ChangeContents, MoveResource from rope.refactor import occurrences, sourceutils class Rename(object): """A class for performing rename refactoring It can re...
gpl-2.0
openlabs/trytond-nereid
routing.py
1
15749
# This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from ast import literal_eval import pytz from werkzeug import abort, redirect from wtforms import Form, TextField, PasswordField, validators from nereid import jsonify, flash...
gpl-3.0
mrgloom/convnet-1
py/conv_cpu.py
3
31841
"""Convolution methods on CPU.""" # These are extremely slow. # Their main purpose is testing fast GPU implementations. import numpy as np def DivUp(a, b): return (a + b - 1) / b def ConvUp(images, filters, image_shape, conv_spec): num_images, image_size_x, image_size_y, num_input_channels = image_shape num_ou...
bsd-2-clause
jmimu/lander1
map/map.py
1
28865
ts_palette =[16744703, 0, 16777215, 16384, 32768, 65280, 127, 255, 8421631, 10485760, 12105912, 16744448, 65535, 4342338, 16512, 8388672] tile_base_index = 0 ts_tiles = [] ts_tiles.append([[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0...
gpl-3.0