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
fxia22/ASM_xf
PythonD/lib/python2.4/distutils/version.py
7
11485
# # distutils/version.py # # Implements multiple version numbering conventions for the # Python Module Distribution Utilities. # # $Id: version.py,v 1.7 2002/11/14 02:25:42 akuchling Exp $ # """Provides classes to represent module version numbers (one class for each style of version numbering). There are currently tw...
gpl-2.0
HomeRad/TorCleaner
wc/proxy/auth/ntlm.py
1
21629
# -*- coding: iso-8859-1 -*- # Used parts form NTLM auth proxy server and NTLM.py # NTLM.pm - An implementation of NTLM. In this version, I only # implemented the client side functions that calculates the NTLM response. # I will add the corresponding server side functions in the next version. # # This implementation w...
gpl-2.0
thaddeustaylor/catkin
cmake/test/run_tests.py
9
1533
#!/usr/bin/env python from __future__ import print_function import argparse import os import sys import subprocess from catkin.test_results import ensure_junit_result_exist, remove_junit_result def main(argv=sys.argv[1:]): parser = argparse.ArgumentParser(description='Runs the test command passed as an argumen...
bsd-3-clause
zhengjue/mytornado
study/3/rrdtool/graph.py
1
2712
#!/usr/bin/env python # _*_ coding:utf-8 _*-_ ############################ # File Name: graph.py # Author: lza # Created Time: 2016-09-02 14:29:41 ############################ import rrdtool import time #定义图表上方大标题 title="Server network traffic flow(" + time.strftime('%Y-%m-%d', time.localtime(time.time())) + ")" # 重...
gpl-3.0
viewdy/phantomjs2
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/applywatchlist.py
132
2983
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
TarquinQ/email-rule-enforcer
email-rule-enforcer/modules/settings/supportingfunctions_xml.py
1
2690
import xml.etree.ElementTree as ET from modules.supportingfunctions import text_to_bool_force def set_value_if_xmlnode_exists(configdict, key, Node, xpath): """Set a config value only if the value is in the xml""" if isinstance(Node, ET.Element): node_found = Node.find(xpath) else: node_fo...
gpl-3.0
jyotikamboj/container
django/contrib/gis/shortcuts.py
197
1129
import zipfile from io import BytesIO from django.conf import settings from django.http import HttpResponse from django.template import loader def compress_kml(kml): "Returns compressed KMZ from the given KML string." kmz = BytesIO() zf = zipfile.ZipFile(kmz, 'a', zipfile.ZIP_DEFLATED) zf.writestr('d...
mit
mocidis/pjproject
pjsip-apps/src/pygui/chatgui.py
28
12324
# $Id: chatgui.py 4757 2014-02-21 07:53:31Z nanang $ # # pjsua Python GUI Demo # # Copyright (C)2013 Teluu Inc. (http://www.teluu.com) # # 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 ve...
gpl-2.0
jrbl/invenio
modules/webmessage/lib/webmessage_tests.py
15
5414
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 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 yo...
gpl-2.0
kmpf/uap
include/steps/identify_adapters.py
1
2404
from logging import getLogger from abstract_step import AbstractStep logger = getLogger('uap_logger') class IdentifyAdapters(AbstractStep): ''' Uses AdapterRemoval to identify adapter sequences from paired read data. AdapterRemoval (ver. 2.1.7) This program searches for and removes remnant adapter s...
gpl-3.0
zhuyongyong/crosswalk-test-suite
embeddingapi/embedding-asyncapi-android-tests/inst.apk.py
3
3300
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARAMETERS = None ADB_CMD = "adb" def doCMD(cmd): # Do not need handle timeout in this short script, let tool...
bsd-3-clause
rbrito/pkg-youtube-dl
youtube_dl/extractor/rottentomatoes.py
64
1281
from __future__ import unicode_literals from .common import InfoExtractor from .internetvideoarchive import InternetVideoArchiveIE class RottenTomatoesIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?rottentomatoes\.com/m/[^/]+/trailers/(?P<id>\d+)' _TEST = { 'url': 'http://www.rottentomatoes.co...
unlicense
maryklayne/Funcao
sympy/plotting/pygletplot/util.py
21
4551
from __future__ import print_function, division from pyglet.gl import * from sympy.core import S from sympy.core.compatibility import xrange def get_model_matrix(array_type=c_float, glGetMethod=glGetFloatv): """ Returns the current modelview matrix. """ m = (array_type*16)() glGetMethod(GL_MODELV...
bsd-3-clause
ktriponis/ansible-modules-core
cloud/google/gce_pd.py
32
9419
#!/usr/bin/python # Copyright 2013 Google Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later vers...
gpl-3.0
MoamerEncsConcordiaCa/tensorflow
tensorflow/python/training/momentum.py
22
4501
# 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
MeshCollider/bitcoin
test/functional/wallet_resendwallettransactions.py
22
3380
#!/usr/bin/env python3 # Copyright (c) 2017-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test that the wallet resends transactions periodically.""" import time from test_framework.blocktools ...
mit
christianurich/VIBe2UrbanSim
3rdparty/opus/src/biocomplexity/opus_core/random_choices.py
2
2533
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.choices import Choices from opus_core.sampling_toolbox import sample_choice from numpy import concatenate from numpy import reshape from numpy import sum class random_choices(...
gpl-2.0
keyurpatel076/MissionPlannerGit
packages/IronPython.StdLib.2.7.4/content/Lib/heapq.py
75
17331
# -*- coding: latin-1 -*- """Heap queue algorithm (a.k.a. priority queue). Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for all k, counting elements from 0. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of a heap is that a[0] is always ...
gpl-3.0
pepijndevos/PyMouse
pymouse/base.py
2
2513
# -*- coding: iso-8859-1 -*- # Copyright 2010 Pepijn de Vos # # 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
jacobjwebber/software-development
src/app/gamerules.py
1
1949
""" This module contains the game rules. """ import json import config def form_to_band(requestform): """ This function takes in a HTTP request and returns a band object. """ print(requestform) bandname = requestform['bandname'] capspec = requestform['capspec'] capskill = requestform...
mit
ArchAssault-Project/archassaultweb
public/tests.py
5
1072
from django.test import TestCase class PublicTest(TestCase): def test_index(self): response = self.client.get('/') self.assertEqual(response.status_code, 200) def test_about(self): response = self.client.get('/about/') self.assertEqual(response.status_code, 200) def test...
gpl-2.0
repotvsupertuga/repo
plugin.video.jami/resources/lib/resolvers/googlepicasa.py
23
2529
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
gpl-2.0
DdragonEver/flasky
app/auth/forms.py
111
3139
from flask.ext.wtf import Form from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import Required, Length, Email, Regexp, EqualTo from wtforms import ValidationError from ..models import User class LoginForm(Form): email = StringField('Email', validators=[Required(),...
mit
hazelcast-incubator/pyhzclient
hzclient/codec/transactionalqueuecodec.py
2
1199
__author__ = 'Jonathan Brodie' import ctypes from hzclient.clientmessage import ClientMessage from util import util ''' OFFER ''' def offerEncode(): msg=ClientMessage() msg.optype=0x1401 util.raiseNotDefined() def offerDecode(bytesobject): servermsg=ClientMessage.decodeMessage(bytesobject) util.rais...
apache-2.0
tjsavage/djangononrel-starter
djangoappengine/storage.py
110
5599
import os try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.files.base import File from django.core.files.storage import Storage from django.core.files.uploadedfile import UploadedFile from django.core.files.uploadhandler im...
bsd-3-clause
bennettp123/CouchPotatoServer
libs/tempita/_looper.py
140
4161
""" Helper for looping over sequences, particular in templates. Often in a loop in a template it's handy to know what's next up, previously up, if this is the first or last item in the sequence, etc. These can be awkward to manage in a normal Python loop, but using the looper you can get a better sense of the context....
gpl-3.0
40123210/2015cd-midterm2
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/SDL.py
603
1813
from browser import document SDL_INIT_VIDEO=0 SDL_GL_DOUBLEBUFFER=1 SDL_GL_DEPTH_SIZE=2 SDL_DOUBLEBUF=3 SDL_ANYFORMAT=4 SDL_ACTIVEEVENT=5 SDL_ALLEVENTS=5 SDL_KEYDOWN=6 SDL_KEYUP=7 SDL_MOUSEMOTION=8 SDL_MOUSEBUTTONDOWN=9 SDL_MOUSEBUTTONUP=10 SDL_JOYAXISMOTION=11 SDL_JOYBALLMOTION=12 SDL_JOYHATMOTION=13 SDL_JOYBUTTON...
agpl-3.0
xyzz/vcmi-build
project/jni/python/src/Demo/turtle/tdemo_peace.py
32
1112
#!/usr/bin/python """ turtle-example-suite: tdemo_peace.py A very simple drawing suitable as a beginner's programming example. Uses only commands, which are also available in old turtle.py. Intentionally no variables are used except for the colorloop: """ from turtle import * def main(): p...
lgpl-2.1
xiaoguoai/ec-dev-swift
test/unit/common/middleware/test_keystoneauth.py
3
17545
# Copyright (c) 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
rhyolight/nupic.research
projects/location_layer/memorize_math_pooled_tm/generate_sdrs.py
7
5157
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2017, 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...
gpl-3.0
lordmuffin/aws-cfn-plex
functions/credstash/boto3/resources/action.py
5
9497
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
mit
alikins/ansible
lib/ansible/modules/notification/catapult.py
49
4362
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Jonathan Mainguy <jon@soh.re> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # # basis of code taken from the ansible twillio and nexmo modules from __future__ import absolute_import, division, print_function __metacla...
gpl-3.0
zstackorg/zstack-woodpecker
integrationtest/vm/mn_ha/test_destroy_mn_vm_create_vm.py
2
3103
''' Integration Test for creating KVM VM in MN HA mode after destroying MN VM. @author: Mirabel ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_state as test_state import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.operations.node_operations as node_ops im...
apache-2.0
Dellware78/mtasa-blue
vendor/google-breakpad/src/tools/gyp/test/generator-output/gyptest-relocate.py
216
1670
#!/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. """ Verifies that a project hierarchy created with the --generator-output= option can be built even when it's relocated to a different path....
gpl-3.0
romain-li/edx-platform
openedx/core/djangoapps/content/block_structure/factory.py
24
3901
""" Module for factory class for BlockStructure objects. """ from .block_structure import BlockStructureModulestoreData, BlockStructureBlockData class BlockStructureFactory(object): """ Factory class for BlockStructure objects. """ @classmethod def create_from_modulestore(cls, root_block_usage_key...
agpl-3.0
40223119/2015w13-1
static/Brython3.1.3-20150514-095342/Lib/ui/slider.py
603
2394
from . import widget from browser import doc,html class Slider(widget.Widget): def __init__(self, id=None, label=False): self._div_shell=html.DIV(Class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all") widget.Widget.__init__(self, self._div_shell, 'slider', id) self._h...
gpl-3.0
dexterx17/nodoSocket
clients/Python-2.7.6/Lib/plat-mac/lib-scriptpackages/Netscape/Text.py
81
3120
"""Suite Text: Level 0, version 0 Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2 AETE/AEUT resource version 1/0, language 0, script 0 """ import aetools import MacOS _code = 'TEXT' from StdSuites.Text_Suite import * class Text_Events(Te...
mit
kawamon/hue
desktop/core/ext-py/SQLAlchemy-1.3.17/test/aaa_profiling/test_compiler.py
4
2742
from sqlalchemy import Column from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import select from sqlalchemy import String from sqlalchemy import Table from sqlalchemy.engine import default from sqlalchemy.testing import AssertsExecutionResults from sqlalchemy.testing import fixtures from ...
apache-2.0
JimCircadian/ansible
lib/ansible/modules/network/avi/avi_wafpolicy.py
26
5675
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIB...
gpl-3.0
Allow2CEO/browser-ios
brave/node_modules/hashset-cpp/vendor/depot_tools/tests/git_rebase_update_test.py
13
14340
#!/usr/bin/env python # 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. """Unit tests for git_rebase_update.py""" import os import sys DEPOT_TOOLS_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__f...
mpl-2.0
rjw57/bitsbox
migrations/env.py
557
2883
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig import logging # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config ...
mit
pedromes/mbed
workspace_tools/synch.py
17
11521
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
apache-2.0
dwf/numpy
numpy/core/tests/test_records.py
10
5761
from os import path import numpy as np from numpy.testing import * from numpy.compat import asbytes, asunicode import warnings class TestFromrecords(TestCase): def test_fromrecords(self): r = np.rec.fromrecords([[456, 'dbe', 1.2], [2, 'de', 1.3]], names='col1,col2,col3') ...
bsd-3-clause
markgw/pimlico
src/python/pimlico/core/modules/map/multiproc.py
1
16068
# This file is part of Pimlico # Copyright (C) 2020 Mark Granroth-Wilding # Licensed under the GNU LGPL v3.0 - https://www.gnu.org/licenses/lgpl-3.0.en.html """ Document map modules can in general be easily parallelized using multiprocessing. This module provides implementations of a pool and base worker processes tha...
gpl-3.0
johankaito/fufuka
microblog/old-flask/lib/python2.7/encodings/iso8859_3.py
593
13345
""" Python Character Mapping Codec iso8859_3 generated from 'MAPPINGS/ISO8859/8859-3.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
apache-2.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/pip/_vendor/chardet/escprober.py
289
3950
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
gpl-3.0
sunils34/buffer-django-nonrel
django/contrib/gis/sitemaps/views.py
250
4342
from django.http import HttpResponse, Http404 from django.template import loader from django.contrib.sites.models import get_current_site from django.core import urlresolvers from django.core.paginator import EmptyPage, PageNotAnInteger from django.contrib.gis.db.models.fields import GeometryField from django.db import...
bsd-3-clause
paolodoz/timesheet
cherrypy/process/servers.py
1
15336
""" Starting in CherryPy 3.1, cherrypy.server is implemented as an :ref:`Engine Plugin<plugins>`. It's an instance of :class:`cherrypy._cpserver.Server`, which is a subclass of :class:`cherrypy.process.servers.ServerAdapter`. The ``ServerAdapter`` class is designed to control other servers, as well. Multiple servers/p...
gpl-2.0
hickford/youtube-dl
youtube_dl/extractor/swrmediathek.py
165
3660
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import parse_duration class SWRMediathekIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?swrmediathek\.de/(?:content/)?player\.htm\?show=(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}...
unlicense
russellb/amiutils
amioriginate.py
1
6828
#!/usr/bin/env python # # Copyright (C) 2012, Russell Bryant # # 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 applic...
apache-2.0
christer155/FacebookExperiments
project/old_academic_project/test_profiles_info.py
3
1947
# -*- coding: utf-8 -*- import json from pprint import pprint from sets import Set json_data=open("C:\\Users\\Heschoon\\Dropbox\\ULB\\Current trends of artificial intelligence\\Trends_project\\profiles.json") profiles = json.load(json_data) json_data.close() fields=Set() for id in profiles: for field in profiles[...
mit
chaen/DIRAC
Resources/Catalog/FileCatalogFactory.py
9
2630
""" FileCatalogFactory class to create file catalog client objects according to the configuration description """ from DIRAC import gLogger, gConfig, S_OK, S_ERROR from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getCatalogPath from DIRAC.Resources.Catalog.FileCatalogProxyClient import FileCatalogPr...
gpl-3.0
rumo/textfsm
setup.py
8
1280
#!/usr/bin/python # # Copyright 2010 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 a...
apache-2.0
hakatashi/youtube-dl
youtube_dl/extractor/gfycat.py
1
3936
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, float_or_none, qualities, ExtractorError, ) class GfycatIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?gfycat\.com/(?:ru/|ifr/|gifs/detail/)?(?P<id>[^-/?#]+)' _TE...
unlicense
syscoin/syscoin
contrib/seeds/generate-seeds.py
1
4754
#!/usr/bin/env python3 # Copyright (c) 2014-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the ...
mit
UG-Proto/conferenceroom
requests/packages/chardet/mbcharsetprober.py
2924
3268
######################## 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...
gpl-3.0
soravux/slc
tests/test_basic.py
1
10888
import time import threading import struct import pytest from slc import Communicator as Comm from slc import (COMP_ZLIB_DEFAULT, COMP_ZLIB_MAX, SER_PICKLE_HIGHEST) data = [ b'Not all those who wander are lost.', b'Time is a drug. Too much of it kills you.', 'The mirror does not reflect evil, but create...
lgpl-3.0
paulluo/linux
scripts/checkkconfigsymbols.py
299
15887
#!/usr/bin/env python3 """Find Kconfig symbols that are referenced but not defined.""" # (c) 2014-2017 Valentin Rothberg <valentinrothberg@gmail.com> # (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de> # # Licensed under the terms of the GNU GPL License version 2 import argparse import difflib import os import re...
gpl-2.0
Odingod/mne-python
examples/preprocessing/plot_ica_from_raw.py
5
3700
""" ================================== Compute ICA components on raw data ================================== ICA is fit to MEG raw data. The sources matching the ECG and EOG are automatically found and displayed. Subsequently, artifact detection and rejection quality are assessed. """ # Authors: Denis Engemann <denis....
bsd-3-clause
telwertowski/Books-Mac-OS-X
Import Plugins/TemplateImporter/PyZ3950/PyZ3950_parsetab.py
30
2032
# PyZ3950_parsetab.py # This file is automatically generated. Do not edit. _lr_method = 'SLR' _lr_signature = '\xfc\xb2\xa8\xb7\xd9\xe7\xad\xba"\xb2Ss\'\xcd\x08\x16' _lr_action_items = {'QUOTEDVALUE':([5,26,0,19,16,],[1,1,1,1,1,]),'LOGOP':([3,25,4,14,9,6,27,23,13,20,22,1,],[-5,-9,-14,-13,16,-8,16,-7,16,-6,-4,-12,])...
mit
nextgis/NextGIS_QGIS_open
python/pyplugin_installer/qgsplugininstallerrepositorydialog.py
11
2059
# -*- coding:utf-8 -*- """ /*************************************************************************** qgsplugininstallerrepositorydialog.py Plugin Installer module ------------------- Date : June 2013 Copyright ...
gpl-2.0
KanaoReeves/KeanuFromBehind
keanu/routes/orders.py
1
3041
#!/usr/bin/env python import json import requests from datetime import datetime from flask import Blueprint, jsonify, request, g from flask_autodoc import Autodoc order_api = Blueprint('orderApi', __name__) auto = Autodoc() @order_api.route('/order/spec', strict_slashes=False) def order_doc(): """ Documenta...
gpl-3.0
weolar/miniblink49
v8_5_7/testing/gmock/scripts/gmock_doctor.py
346
24131
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
apache-2.0
follow99/django
django/templatetags/cache.py
471
3389
from __future__ import unicode_literals from django.core.cache import InvalidCacheBackendError, caches from django.core.cache.utils import make_template_fragment_key from django.template import ( Library, Node, TemplateSyntaxError, VariableDoesNotExist, ) register = Library() class CacheNode(Node): def __in...
bsd-3-clause
winxos/python
spider/wanga_games_update.py
1
6434
#------------------------------------------------------------------------------- # Name: wanga_update # Purpose: wanga游戏update # # Author: winxos # # Created: 31/12/2011 # Copyright: (c) winxos 2011 # Licence: free #-----------------------------------------------------------------------------...
mit
leonardocsantoss/ehventos
lib/uni_form/helpers.py
1
8075
# -*- coding:utf-8 -*- """ Utilities for helping developers use python for adding various attributes, elements, and UI elements to forms generated via the uni_form template tag. """ from django.core.urlresolvers import reverse, NoReverseMatch from django.forms.forms import BoundField from django.template.loade...
gpl-2.0
smrjan/seldon-server
python/build/lib/seldon/sklearn_estimator.py
3
2924
from sklearn.feature_extraction import DictVectorizer from seldon.pipeline.pandas_pipelines import BasePandasEstimator from collections import OrderedDict import io from sklearn.utils import check_X_y from sklearn.utils import check_array from sklearn.base import BaseEstimator,ClassifierMixin import pandas as pd clas...
apache-2.0
webmasterraj/GaSiProMo
flask/lib/python2.7/site-packages/pandas/io/excel.py
4
49188
""" Module parse to/from Excel """ #---------------------------------------------------------------------- # ExcelFile class import os import datetime import abc import numpy as np from pandas.io.parsers import TextParser from pandas.io.common import _is_url, _urlopen from pandas.tseries.period import Period from pan...
gpl-2.0
horacio3/troposphere
troposphere/elasticsearch.py
3
2190
# Copyright (c) 2012-2015, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSProperty, AWSObject from .validators import boolean, integer, integer_range, positive_integer VALID_VOLUME_TYPES = ('standard', 'gp2', 'io1') try: from awacs.aws import Policy p...
bsd-2-clause
gavinp/chromium
native_client_sdk/src/build_tools/install_boost/install_boost.py
4
3617
#! -*- 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. """Install boost headers into a list of toolchains, in such a way that it gets pulled into the SDK installer. Note that this script ...
bsd-3-clause
davidzchen/tensorflow
tensorflow/compiler/tests/binary_ops_test.py
2
61113
# Copyright 2017 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
SteveHNH/ansible
test/units/module_utils/test_aci.py
15
13638
# -*- coding: utf-8 -*- # Copyright 2017 Dag Wieers <dag@wieers.com> # This file is part of Ansible by Red Hat # # 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 ...
gpl-3.0
dbcli/pgcli
setup.py
1
2277
import platform from setuptools import setup, find_packages from pgcli import __version__ description = "CLI for Postgres Database. With auto-completion and syntax highlighting." install_requirements = [ "pgspecial>=1.11.8", "click >= 4.1", "Pygments >= 2.0", # Pygments has to be Capitalcased. WTF? ...
bsd-3-clause
DJMelonz/basic-blog
django/contrib/formtools/wizard.py
158
12104
""" FormWizard class -- implements a multi-page form, validating between each step and storing the form's state as HTML hidden fields so that no state is stored on the server side. """ import cPickle as pickle from django import forms from django.conf import settings from django.contrib.formtools.utils import securit...
bsd-3-clause
kevinmel2000/sl4a
python/src/Tools/scripts/texi2html.py
54
69823
#! /usr/bin/env python # Convert GNU texinfo files into HTML, one file per node. # Based on Texinfo 2.14. # Usage: texi2html [-d] [-d] [-c] inputfile outputdirectory # The input file must be a complete texinfo file, e.g. emacs.texi. # This creates many files (one per info node) in the output directory, # overwriting e...
apache-2.0
shepdelacreme/ansible
lib/ansible/modules/network/panos/_panos_security_policy.py
32
17366
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
gpl-3.0
tdtrask/ansible
lib/ansible/modules/network/f5/bigip_device_group_member.py
24
7714
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks 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
dmolina/pyreal
outils.py
1
5605
#cython: boundscheck=False #cython: wraparound=False import numpy as np from numpy import random import math from scipy import weave import earandom as random #def distance(np.array[double,ndim=1] ind1, np.array[double,ndim=1] ind2): # """ # Euclidean distance # ind1 -- first array to compare # ind2 -- sec...
gpl-3.0
NetDBNCKU/GAE-Conference-Web-App
django/db/utils.py
80
6421
import os from threading import local from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module DEFAULT_DB_ALIAS = 'default' # Define some exceptions that mirror the PEP249 interface. # We will rethrow any backend-specific errors using ...
bsd-3-clause
Unofficial-Extend-Project-Mirror/openfoam-extend-Breeder-other-scripting-PyFoam
PyFoam/Applications/InitVCSCase.py
3
4959
""" Application-class that implements pyFoamInitVCSCase.py """ from optparse import OptionGroup from .PyFoamApplication import PyFoamApplication from PyFoam.RunDictionary.SolutionDirectory import SolutionDirectory from PyFoam.Basics.GeneralVCSInterface import getVCS from os import path from glob import glob ruleLi...
gpl-2.0
pshen/ansible
contrib/inventory/vmware_inventory.py
20
26110
#!/usr/bin/env python # Requirements # - pyvmomi >= 6.0.0.2016.4 # TODO: # * more jq examples # * optional folder heriarchy """ $ jq '._meta.hostvars[].config' data.json | head { "alternateguestname": "", "instanceuuid": "5035a5cd-b8e8-d717-e133-2d383eb0d675", "memoryhotaddenabled": false, "guestfullna...
gpl-3.0
ahnqirage/spark
examples/src/main/python/ml/correlation_example.py
52
1792
# # 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
rbuffat/pyidf
tests/test_condenserequipmentlist.py
1
5638
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.plant import CondenserEquipmentList log = logging.getLogger(__name__) class TestCondenserEquipmentList(unittest.TestCase): def setUp(self): self.fd, self.path = tem...
apache-2.0
lotaku/pytest-2.3.5
_pytest/main.py
2
22859
""" core implementation of testing process: init, session, runtest loop. """ import py import pytest, _pytest import inspect import os, sys, imp try: from collections import MutableMapping as MappingMixin except ImportError: from UserDict import DictMixin as MappingMixin from _pytest.mark import MarkInfo tra...
mit
nvoron23/hue
desktop/core/ext-py/pysqlite/doc/sphinx/conf.py
40
4026
# -*- coding: utf-8 -*- # # pysqlite documentation build configuration file, created by # sphinx-quickstart.py on Sat Mar 22 02:47:54 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pic...
apache-2.0
dstanek/keystone
keystone/tests/unit/test_versions.py
3
44819
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
rosudrag/Freemium-winner
VirtualEnvironment/Lib/site-packages/sqlalchemy/__init__.py
7
2112
# sqlalchemy/__init__.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 from .sql import ( alias, and_, asc, between, bindparam,...
mit
mozilla/app-validator
tests/js/test_expressions.py
6
3128
from nose.tools import eq_ from js_helper import TestCase class TestBinaryOperators(TestCase): """Test that all of the binary operators in JS work as expected.""" def do_expr(self, expr, output): self.setUp() self.run_script("var x = %s" % expr) self.assert_var_eq("x", output) d...
bsd-3-clause
sahana/Turkey
modules/tests/volunteer/create_volunteer_job_title.py
25
2080
""" Sahana Eden Automated Test - HRM001 Create Job Title @copyright: 2011-2012 (c) Sahana Software Foundation @license: MIT 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 wit...
mit
Benjamin-Marks/mit-tab
mittab/libs/tests/helpers.py
2
4912
"""Collection of useful methods for manipulating pairing data""" from mittab.apps.tab.models import Round, RoundStats import random # Speaks every quarter point speak_range = [23 + .25 * i for i in range(17)] def generate_speaks_for_debater(debater, is_forfeit=False): """ Generates a fake speak for a debater...
mit
Electroscholars/P.E.E.R.S
MainWindowArrowTest/youtube_dl/extractor/muzu.py
147
2224
from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urllib_parse, ) class MuzuTVIE(InfoExtractor): _VALID_URL = r'https?://www\.muzu\.tv/(.+?)/(.+?)/(?P<id>\d+)' IE_NAME = 'muzu.tv' _TEST = { 'url': 'http://www.muzu.tv/defected/marcashken-f...
mit
kasra83/moose
gui/gui/OptionsGUI.py
34
1400
#!/usr/bin/python try: from PyQt4 import QtCore, QtGui QtCore.Signal = QtCore.pyqtSignal QtCore.Slot = QtCore.pyqtSlot except ImportError: try: from PySide import QtCore, QtGui QtCore.QString = str except ImportError: raise ImportError("Cannot load either PyQt or PySide") f...
lgpl-2.1
pombredanne/parakeet
test/core_language/test_args.py
2
2146
from parakeet.testing_helpers import expect, run_local_tests def varargs_return(*x): return x def test_varargs_return(): expect(varargs_return, [1,2], (1,2)) def varargs_add(*x): return x[0] + x[1] def test_varargs_add(): expect(varargs_add, [1,2], 3) def call_varargs_add(x,y): local_tuple = (x,y) retu...
bsd-3-clause
cycladesnz/graph_lm-sensors
TemperatureGraphs.py
1
2161
#!/usr/bin/python import time, MySQLdb, pygal, yaml, sys with open(sys.argv[1], 'r') as ymlfile: credentials = yaml.load(ymlfile) UTime = str(time.strftime("%H:%M:%S", time.gmtime())) print UTime db = MySQLdb.connect(host=credentials['mysql']['host'], user=credentials['mysql']['user'], pas...
apache-2.0
Designist/pybuilder
src/unittest/python/plugins/ronn_manpage_plugin_tests.py
6
3012
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2015 PyBuilder Team # # 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/l...
apache-2.0
thejens/luigi
test/contrib/hdfs/webhdfs_client_test.py
27
1650
# -*- coding: utf-8 -*- # # Copyright 2015 VNG Corporation # # 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...
apache-2.0
JoeriHermans/Intelligent-Automation-System
scripts/python/environment.py
1
7932
# # An implementation of the environment technology. This technology # is responsible for reporting sensor data on the weather, sun, and # other environmental conditions. # # Author: Joeri Hermans # import sys import socket import struct import requests import time from threading import Thread # Global...
apache-2.0
nkgilley/home-assistant
homeassistant/components/luftdaten/__init__.py
6
6326
"""Support for Luftdaten stations.""" import logging from luftdaten import Luftdaten from luftdaten.exceptions import LuftdatenError import voluptuous as vol from homeassistant.config_entries import SOURCE_IMPORT from homeassistant.const import ( CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONF_MONITORED_CONDIT...
apache-2.0
EmanueleCannizzaro/scons
test/implicit-cache/DualTargets.py
1
3974
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 us...
mit
rcbrgs/tuna
tuna/plugins/__init__.py
1
3693
"""This namespace aggregates modules related to Tuna's plugin system. Why have a plugin system? ------------------------- In a sense, Tuna is both a toolkit and a framework. When used as a library, the tools, models and structural pieces of Tuna can be used by external programs, just like any other Python module. As ...
gpl-3.0