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
realms-team/sol
setup.py
3
1119
import os from setuptools import setup HERE = os.path.abspath(os.path.dirname(__file__)) # Get the long description from the README file with open(os.path.join(HERE, 'README.md'), 'r') as f: long_description = f.read() # Get the long description from the README file with open(os.path.join(HERE, 'license.txt'), '...
bsd-3-clause
postfix/androguard
tools/permissions/create_permissions.py
38
1209
#!/usr/bin/env python from xml.dom import minidom MANIFEST = "tools/permissions/AndroidManifest.xml" STRINGS = "tools/permissions/strings.xml" manifest_document = minidom.parse( MANIFEST ) strings_document = minidom.parse( STRINGS ) dstrings = {} for i in strings_document.getElementsByTagName( "string" ) : try ...
apache-2.0
natecook1000/swift
utils/swift_build_support/swift_build_support/products/product.py
30
1458
# swift_build_support/products/product.py -----------------------*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.tx...
apache-2.0
walac/build-mozharness
configs/b2g/desktop_automation_config.py
1
1352
# This is a template config file for b2g desktop unittest production. import os config = { # mozharness options "application": "b2g", "tooltool_servers": ["http://tooltool.pvt.build.mozilla.org/build/"], "tooltool_cache": "/builds/tooltool_cache", "exes": { 'python': '/tools/buildbot/bin/p...
mpl-2.0
andrew-j-price/contrib
scale-demo/Godeps/_workspace/src/github.com/ugorji/go/codec/test.py
1138
3876
#!/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). # Ensure msgpack-python and cbor are installed first, using: # sudo apt-get install python-dev # sudo apt-g...
apache-2.0
goan15910/ConvDet
src/config/pascal_voc_vgg16_config.py
1
2189
# Author: """Model configuration for pascal dataset""" import numpy as np from config import base_model_config def pascal_voc_vgg16_config(): """Specify the parameters to tune below.""" mc = base_model_config('PASCAL_VOC') mc.DEBUG_MODE = False # Data Augmentation #mc....
bsd-2-clause
codingforfun/Olena-Mirror
swilena/python/swilena.py
2
1073
#! /usr/bin/env python # Copyright (C) 2008, 2009, 2010, 2012, 2013 EPITA Research and Development # Laboratory (LRDE) # # This file is part of Olena. # # Olena 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,...
gpl-2.0
rob-metalinkage/django-gazetteer
gazetteer/models.py
1
9190
from django.db import models from skosxl.models import Concept from .settings import TARGET_NAMESPACE_FT from django.conf import settings from django.utils.translation import ugettext_lazy as _ import datetime SITEURL=settings.SITEURL try: TARGET_NAMESPACE_FT=settings.TARGET_NAMESPACE_FT except: pass # c...
cc0-1.0
jakesyl/pychess
lib/pychess/widgets/analyzegameDialog.py
20
3950
from __future__ import absolute_import import time import threading from . import gamewidget from pychess.Utils.const import * from pychess.System import conf, fident from pychess.System import glock from pychess.System import uistuff from pychess.System.glock import glock_connect_after from pychess.Players.engineNest...
gpl-3.0
andrius-preimantas/odoo
addons/l10n_mx/__init__.py
975
1058
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify #...
agpl-3.0
DecipherOne/Troglodyte
Trog Build Dependencies/Python26/Lib/dumbdbm.py
251
8820
"""A dumb and slow but simple dbm clone. For database spam, spam.dir contains the index (a text file), spam.bak *may* contain a backup of the index (also a text file), while spam.dat contains the data (a binary file). XXX TO DO: - seems to contain a bug when updating... - reclaim free space (currently, space once o...
mit
omprakasha/odoo
addons/stock/report/product_stock.py
376
4868
# -*- 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
edgarli/proj8
env/lib/python3.4/site-packages/rsa/key.py
78
18177
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
artistic-2.0
bhargav2408/python-for-android
python-modules/twisted/twisted/protocols/wire.py
62
2369
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """Implement standard (and unused) TCP protocols. These protocols are either provided by inetd, or are not provided at all. """ # system imports import time, struct from zope.interface import implements # twisted import from twisted.i...
apache-2.0
fighterlyt/bite-project
deps/gdata-python-client/src/gdata/projecthosting/data.py
120
3309
#!/usr/bin/env python # # Copyright 2009 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 ...
apache-2.0
j-carpentier/nova
nova/api/openstack/compute/legacy_v2/contrib/hosts.py
48
14023
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
0Chencc/CTFCrackTools
Lib/Lib/isql.py
30
7098
import dbexts, cmd, sys, os if sys.platform.startswith("java"): import java.lang.String """ Isql works in conjunction with dbexts to provide an interactive environment for database work. """ class IsqlExit(Exception): pass class Prompt: """ This class fixes a problem with the cmd.Cmd class since it uses...
gpl-3.0
jamielennox/tempest
tempest/api/compute/keypairs/test_keypairs_negative.py
2
4011
# Copyright 2012 OpenStack Foundation # Copyright 2013 IBM Corp # 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/LICE...
apache-2.0
kevalds51/sympy
sympy/combinatorics/subsets.py
86
15802
from __future__ import print_function, division from itertools import combinations from sympy.core import Basic from sympy.combinatorics.graycode import GrayCode from sympy.core.compatibility import range class Subset(Basic): """ Represents a basic subset object. We generate subsets using essentially t...
bsd-3-clause
Shanto/ajenti
plugins/squid/main.py
2
1797
from ajenti.ui import * from ajenti.com import implements from ajenti.app.api import ICategoryProvider from ajenti.app.helpers import CategoryPlugin, ModuleContent, EventProcessor, event from ajenti import apis from backend import * class SquidPlugin(apis.services.ServiceControlPlugin): text = 'Squid' icon =...
lgpl-3.0
mavit/ansible
lib/ansible/module_utils/azure_rm_common.py
4
55023
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) import os import re import types import copy import inspect import traceback import json from os.path import e...
gpl-3.0
ega1979/tryLeapMotion
mrdoob-three.js-58e4622/utils/exporters/blender/2.66/scripts/addons/io_mesh_threejs/export_threejs.py
5
74341
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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...
mit
javierTerry/odoo
openerp/tools/config.py
178
36937
#openerp.loggers.handlers. -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program...
agpl-3.0
adamgf/zxing_iphone_pdf_417
cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/g77.py
34
2484
"""engine.SCons.Tool.g77 Tool-specific initialization for g77. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundatio...
apache-2.0
wwj718/ANALYSE
common/lib/xmodule/xmodule/modulestore/tests/test_store_utilities.py
194
2142
""" Tests for store_utilities.py """ import unittest from mock import Mock import ddt from xmodule.modulestore.store_utilities import ( get_draft_subtree_roots, draft_node_constructor ) @ddt.ddt class TestUtils(unittest.TestCase): """ Tests for store_utilities ASCII trees for ONLY_ROOTS and SOME_TRE...
agpl-3.0
HiSPARC/station-software
user/hsmonitor/test/TestForNagiosPushFromHiSparc.py
1
4731
# TODO insert default values for configuration file """A test for the main process of the HiSPARC monitor. This process creates other objects and threads. """ import re import logging import logging.handlers import sys sys.path.append("..") from EConfigParser import EConfigParser import BufferListener from Interpre...
gpl-3.0
tangentlabs/django-fancypages
fancypages/south_migrations/0008_create_uuids_for_existing_models.py
2
18963
# -*- coding: utf-8 -*- import datetime import shortuuid from south.db import db from south.v2 import DataMigration from django.db import models from fancypages.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here....
bsd-3-clause
javachengwc/hue
desktop/core/ext-py/cx_Oracle-5.1.2/test/IntervalVar.py
33
5198
"""Module for testing interval variables.""" import datetime class TestIntervalVar(BaseTestCase): def setUp(self): BaseTestCase.setUp(self) self.rawData = [] self.dataByKey = {} for i in range(1, 11): delta = datetime.timedelta(days = i, hours = i, minutes = i * 2, ...
apache-2.0
shiweihappy/libgdx
extensions/gdx-freetype/jni/freetype-2.5.5/src/tools/docmaker/docmaker.py
146
3202
#!/usr/bin/env python # # docmaker.py # # Convert source code markup to HTML documentation. # # Copyright 2002, 2004, 2008, 2013, 2014 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.T...
apache-2.0
skosukhin/spack
var/spack/repos/builtin/packages/py-asn1crypto/package.py
1
1619
############################################################################## # 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
MoritzS/django
django/contrib/gis/forms/fields.py
53
4114
from django import forms from django.contrib.gis.geos import GEOSException, GEOSGeometry from django.utils.translation import gettext_lazy as _ from .widgets import OpenLayersWidget class GeometryField(forms.Field): """ This is the basic form field for a Geometry. Any textual input that is accepted by G...
bsd-3-clause
izonder/intellij-community
python/testData/MockSdk2.7/python_stubs/datetime.py
44
20386
# encoding: utf-8 # module datetime # from /usr/lib/python2.7/lib-dynload/datetime.so # by generator 1.124 """ Fast implementation of the datetime type. """ # no imports # Variables with simple values MAXYEAR = 9999 MINYEAR = 1 # no functions # classes class date(object): """ date(year, month, day) --> date ob...
apache-2.0
jasonehines/mycroft-core
mycroft/version/__init__.py
1
1712
# Copyright 2016 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core 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 versio...
gpl-3.0
ydhydhjanson/kubernetes
hack/lookup_pull.py
368
1319
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
apache-2.0
arfoll/upm
examples/python/hwxpxx.py
3
2676
#!/usr/bin/python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2016 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 restriction, including # without l...
mit
swails/chemlab
chemlab/graphics/renderers/base.py
6
4096
from OpenGL.GL import (shaders, GL_VERTEX_SHADER, GL_FRAGMENT_SHADER, glUseProgram, GL_FALSE, GLfloat, GL_TRUE) from ctypes import POINTER from ..shaders import set_uniform, compileShader import numpy as np import pkgutil class AbstractRenderer(object): '''Abstract...
gpl-3.0
tlangerak/Multi-Agent-Systems
xmppd/modules/message.py
4
5364
# -*- coding: utf-8 -*- # Distributed under the terms of GPL version 2 or any later # Copyright (C) Kristopher Tate/BlueBridge technologies, 2005 # Help Desk implementation & Remote Administration via message stanzas from xmpp import * from xmppd import * import time class MessageCatcher(PlugIn): """ Message han...
lgpl-2.1
aselle/tensorflow
tensorflow/contrib/layers/python/layers/embedding_ops.py
20
42355
# 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
samdoran/ansible
lib/ansible/modules/cloud/amazon/ec2_eni.py
29
22960
#!/usr/bin/python # # This is a free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This Ansible library is distributed in the hope that i...
gpl-3.0
15101538237ren/restTutorial
tutorial/settings.py
1
2722
""" Django settings for tutorial project. Generated by 'django-admin startproject' using Django 1.8.3. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build pat...
mit
dgwakeman/mne-python
examples/datasets/plot_megsim_data.py
18
1817
""" =========================================== MEGSIM experimental and simulation datasets =========================================== The MEGSIM consists of experimental and simulated MEG data which can be useful for reproducing research results. The MEGSIM files will be dowloaded automatically. The datasets are d...
bsd-3-clause
Jorge-Rodriguez/ansible
lib/ansible/modules/system/known_hosts.py
29
12575
#!/usr/bin/python # Copyright: (c) 2014, Matthew Vernon <mcv21@cam.ac.uk> # 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
UniversalMasterEgg8679/ansible
lib/ansible/modules/network/asa/asa_acl.py
51
7973
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
int19h/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/distutils/command/bdist_msi.py
6
35233
# Copyright (C) 2005, 2006 Martin von Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst """ Implements the bdist_msi command. """ import sys, os from distutils.core import Command from distutils.dir_util import remove_tree from distutils.sysconfig import...
apache-2.0
likelyzhao/mxnet
example/rcnn/rcnn/dataset/imagenet.py
1
19887
""" Pascal VOC database This class loads ground truth notations from standard Pascal VOC XML data formats and transform them into IMDB format. Selective search is used for proposals, see roidb function. Results are written as the Pascal VOC format. Evaluation is based on mAP criterion. """ from __future__ import print...
apache-2.0
llvm-mirror/lldb
packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
5
8002
from __future__ import print_function import gdbremote_testcase from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) AUXV_SUPPORT_...
apache-2.0
azumimuo/family-xbmc-addon
script.module.youtube.dl/lib/yd_private_libs/jsonqueue.py
12
4467
# -*- coding: utf-8 -*- import xbmc, xbmcgui import os, json, hashlib, time class JsonRAFifoQueue(object): def __init__(self,path): self.path = path self.lockPath = os.path.join(os.path.dirname(self.path),os.path.basename(self.path) + '.lock') self.timeout = 5 self._size = 0 de...
gpl-2.0
girish946/yowsup
yowsup/layers/protocol_media/protocolentities/message_media_downloadable_audio.py
39
4229
from yowsup.structs import ProtocolEntity, ProtocolTreeNode from .message_media_downloadable import DownloadableMediaMessageProtocolEntity class AudioDownloadableMediaMessageProtocolEntity(DownloadableMediaMessageProtocolEntity): ''' <message t="{{TIME_STAMP}}" from="{{CONTACT_JID}}" offline="{{OFFLINE...
gpl-3.0
koying/xbmc-vidonme
tools/Fake Episode Maker/main.py
3
2755
# -*- coding: utf-8 -*- # Copyright (C) 2008-2013 Team XBMC # http://www.xbmc.org # # 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, or (at your option) # a...
gpl-2.0
Senseg/Py4A
python-build/python-libs/gdata/src/gdata/base/service.py
166
9638
#!/usr/bin/python # # Copyright (C) 2006 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 ...
apache-2.0
rdio/translate-toolkit
convert/po2rc.py
3
4696
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2002-2006,2008-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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 Fou...
gpl-2.0
fbradyirl/home-assistant
tests/components/recorder/test_init.py
4
7614
"""The tests for the Recorder component.""" # pylint: disable=protected-access import unittest from unittest.mock import patch import pytest from homeassistant.core import callback from homeassistant.const import MATCH_ALL from homeassistant.setup import async_setup_component from homeassistant.components.recorder im...
apache-2.0
bayotop/resdiffcheck
resdiffcheck/initialize.py
1
1903
#!/usr/bin/env python import argparse import logging import os import sys import textwrap from classes.resource import Resource from classes.dbmanager import ResourceStorage import helpers def filter_input(input): for l in input: line = l.strip() if line and not line.startswith("#"): ...
mit
PokeHunterProject/pogom-updated
pogom/pgoapi/protos/POGOProtos/Networking/Requests/Messages/EvolvePokemonMessage_pb2.py
16
2353
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Requests/Messages/EvolvePokemonMessage.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 _mes...
mit
jblackburne/scikit-learn
sklearn/grid_search.py
4
38651
""" The :mod:`sklearn.grid_search` includes utilities to fine-tune the parameters of an estimator. """ from __future__ import print_function # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>, # Gael Varoquaux <gael.varoquaux@normalesup.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # ...
bsd-3-clause
marado/tzmud
tzcontrol.py
3
15859
# Copyright 2008 Lee Harr # # This file is part of TZMud. # # TZMud is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # TZMud is distri...
gpl-3.0
cloakedcode/CouchPotatoServer
libs/requests/packages/chardet2/gb2312prober.py
2994
1681
######################## 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
serxoz/django-rest-auth
rest_auth/views.py
20
5140
from django.contrib.auth import login, logout from django.conf import settings from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.generics import GenericAPIView from rest_framework.permissions import IsAuthenticated, AllowAny from...
mit
Endika/server-tools
base_export_manager/models/ir_exports_line.py
12
2726
# -*- coding: utf-8 -*- # Python source code encoding : https://www.python.org/dev/peps/pep-0263/ ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright : # (c) 2015 Antiun Ingenieria, SL (Madrid, Spain, http://www...
agpl-3.0
kyrias/cjdns
node_build/dependencies/libuv/build/gyp/test/mac/gyptest-identical-name.py
94
1547
#!/usr/bin/env python # Copyright (c) 2014 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 libraries (in identical-names) are properly handeled by xcode. The names for all libraries participating in this build are: li...
gpl-3.0
bbbenja/SickRage
lib/requests/packages/chardet/gb2312prober.py
2994
1681
######################## 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
pnedunuri/scikit-learn
sklearn/datasets/tests/test_svmlight_format.py
228
11221
from bz2 import BZ2File import gzip from io import BytesIO import numpy as np import os import shutil from tempfile import NamedTemporaryFile from sklearn.externals.six import b from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert...
bsd-3-clause
kelseyoo14/Wander
venv_2_7/lib/python2.7/site-packages/Django-1.9-py2.7.egg/django/utils/translation/__init__.py
165
7180
""" Internationalization support. """ from __future__ import unicode_literals import re from django.utils import six from django.utils.decorators import ContextDecorator from django.utils.encoding import force_text from django.utils.functional import lazy __all__ = [ 'activate', 'deactivate', 'override', 'deacti...
artistic-2.0
natanielruiz/android-yolo
jni-build/jni/include/tensorflow/python/kernel_tests/conv1d_test.py
25
1910
# 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
WillianPaiva/ycmd
build.py
1
7204
#!/usr/bin/env python import os import subprocess import os.path as p import sys major, minor = sys.version_info[ 0 : 2 ] if major != 2 or minor < 6: sys.exit( 'The build script requires Python version >= 2.6 and < 3.0; ' 'your version of Python is ' + sys.version ) DIR_OF_THIS_SCRIPT = p.dirname( p.ab...
gpl-3.0
alvaroaleman/ansible
lib/ansible/modules/cloud/vmware/vmware_vmkernel.py
48
7589
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.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 Li...
gpl-3.0
anythingrandom/eclcli
eclcli/storage/storageclient/service_catalog.py
1
2848
import storageclient.exceptions class ServiceCatalog(object): """Helper methods for dealing with a Keystone Service Catalog.""" def __init__(self, resource_dict): self.catalog = resource_dict def get_token(self): return self.catalog['access']['token']['id'] def url_for(self, attr=No...
apache-2.0
mrquim/mrquimrepo
repo/script.video.F4mProxy/lib/hlsDownloader.py
8
24275
""" Simple HTTP Live Streaming client. References: http://tools.ietf.org/html/draft-pantos-http-live-streaming-08 This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Pu...
gpl-2.0
jcpowermac/ansible
test/units/modules/network/netscaler/test_netscaler_ssl_certkey.py
39
22308
# Copyright (c) 2017 Citrix Systems # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
gpl-3.0
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_4_0_0/models/detectedissue.py
1
7690
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/DetectedIssue) on 2019-05-07. # 2019, SMART Health IT. from . import domainresource class DetectedIssue(domainresource.DomainResource): """ Clinical issue with action. Indica...
bsd-3-clause
jomeister15/SGH-I727-kernel
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
802
2710
# Core.py - Python extension for perf trace, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def auto...
gpl-2.0
redhat-openstack/nova
nova/compute/monitors/virt/cpu_monitor.py
13
5606
# Copyright 2013 Intel Corporation. # 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 requir...
apache-2.0
jrbourbeau/cr-composition
write_cluster_wrappers.py
1
1481
#!/usr/bin/env python from __future__ import print_function import os import stat import comptools as comp here = os.path.abspath(os.path.dirname(__file__)) wrapper_path = os.path.join(here, 'wrapper.sh') wrapper_virtualenv_path = os.path.join(here, 'wrapper_virtualenv.sh') wrapper = """#!/bin/bash -e eval `/cvmfs/...
mit
hi-ogawa/hiogawa-blog-ghost
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/formatters/terminal.py
363
4065
# -*- coding: utf-8 -*- """ pygments.formatters.terminal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for terminal output with ANSI sequences. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys from pygments.formatter import Format...
mit
40223103/w16b_test
static/Brython3.1.3-20150514-095342/Lib/sre_parse.py
630
29657
# # Secret Labs' Regular Expression Engine # # convert re-style regular expression to sre pattern # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" # XXX: show string offset and offending ch...
agpl-3.0
z01nl1o02/tests
mxnet/C/extract_feature.py
1
1932
import mxnet as mx import pdb,os,sys import numpy as np import sampleio class FEATUREEXTRACT(object): def __init__(self): self.batch_size = 1 return def load(self,model_prefix, model_epoch, data_layer_name, feature_layer_name, input_size): C,W,H = input_size load_model = mx.mo...
gpl-2.0
jlongever/redfish-client-python
on_http_redfish_1_0/models/computer_system_1_0_0_reset.py
1
3699
# coding: utf-8 """ Copyright 2015 SmartBear Software 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
VM12/android_kernel_oneplus_msm8974
tools/perf/python/twatch.py
7370
1334
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
Universal-Model-Converter/UMC3.0a
data/Python/x86/Lib/site-packages/numpy/core/tests/test_umath_complex.py
6
20535
import sys import platform from numpy.testing import * import numpy.core.umath as ncu import numpy as np # TODO: branch cuts (use Pauli code) # TODO: conj 'symmetry' # TODO: FPU exceptions # At least on Windows the results of many complex functions are not conforming # to the C99 standard. See ticket 1574. # Ditto f...
mit
MaxTyutyunnikov/lino
obsolete/src/sandbox/20030421.py
1
1495
import warnings warnings.filterwarnings("ignore", "DB-API extension", UserWarning, "sqlite") import sqlite conn = sqlite.connect("tmp.db") c = conn.cursor() c.execute("""\ create table Partners ( id int, name char, city_id int...
gpl-3.0
prospwro/odoo
addons/mail/mail_message_subtype.py
387
3094
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
root-11/outscale
tests/basics.py
1
28928
import logging import time from random import randint from collections import deque from maslite import AddNewAgent, RemoveAgent from maslite import Agent, AgentMessage, AlarmMessage, PauseMessage from maslite import GetSubscriptionTopicsMessage, Clock, Scheduler, Sentinel from maslite import SetTimeAndClockSpeedMessag...
mit
antepsis/anteplahmacun
sympy/concrete/delta.py
9
9892
""" This module implements sums and products containing the Kronecker Delta function. References ========== - http://mathworld.wolfram.com/KroneckerDelta.html """ from __future__ import print_function, division from sympy.core import Add, Mul, S, Dummy from sympy.core.cache import cacheit from sympy.core.compatibili...
bsd-3-clause
ArcherSys/ArcherSys
Lib/site-packages/IPython/core/tests/test_completerlib.py
5
5125
# -*- coding: utf-8 -*- """Tests for completerlib. """ from __future__ import absolute_import #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- import os import shutil import sys import tempfile impo...
mit
harding/bitcoin
contrib/testgen/gen_base58_test_vectors.py
1000
4343
#!/usr/bin/env python ''' Generate valid and invalid base58 address and private key test vectors. Usage: gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json ''' # 2012 Wladimir J. van der Laan # R...
mit
Azure/azure-sdk-for-python
sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/_large_person_group_person_operations.py
1
37306
# 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 ...
mit
felix-d/fabric
tests/test_decorators.py
3
5660
from __future__ import with_statement import random from nose.tools import eq_, ok_, assert_true, assert_false, assert_equal import fudge from fudge import Fake, with_fakes, patched_context from fabric import decorators, tasks from fabric.state import env import fabric # for patching fabric.state.xxx from fabric.tas...
bsd-2-clause
deepmind/deepmind-research
curl/utils.py
1
3161
################################################################################ # Copyright 2019 DeepMind Technologies 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 # #...
apache-2.0
direvus/ansible
lib/ansible/parsing/quoting.py
241
1141
# (c) 2014 James Cammarata, <jcammarata@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
gpl-3.0
himanshu-setia/keystone
keystone/trust/routers.py
28
2500
# 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...
apache-2.0
catapult-project/catapult
third_party/google-endpoints/libfuturize/fixes/fix_division_safe.py
62
2242
""" For the ``future`` package. Adds this import line: from __future__ import division at the top and changes any old-style divisions to be calls to past.utils.old_div so the code runs as before on Py2.6/2.7 and has the same behaviour on Py3. If "from __future__ import division" is already in effect, this fixer...
bsd-3-clause
phalf/android_kernel_samsung_mint-vlx-all
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
hplustree/trove
trove/db/sqlalchemy/migrate_repo/versions/021_conductor_last_seen.py
4
1304
# 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 ...
apache-2.0
losnikitos/googleads-python-lib
examples/dfp/v201508/base_rate_service/get_all_base_rates.py
4
1870
#!/usr/bin/python # # 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 b...
apache-2.0
jdelight/django
django/contrib/admin/views/main.py
327
16684
import sys from collections import OrderedDict from django.contrib.admin import FieldListFilter from django.contrib.admin.exceptions import ( DisallowedModelAdminLookup, DisallowedModelAdminToField, ) from django.contrib.admin.options import ( IS_POPUP_VAR, TO_FIELD_VAR, IncorrectLookupParameters, ) from djang...
bsd-3-clause
kimchy/elasticsearch
dev-tools/build_release.py
2
19507
# Licensed to ElasticSearch and Shay Banon 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 use this fil...
apache-2.0
hangtwenty/sqlautocode
sqlautocode/config.py
2
5457
#!python #-*- coding: UTF-8 -*- import optparse import os import sys import re options = None out = sys.stdout err = sys.stderr dburl = None engine = None # TODO: encoding (default utf-8) def create_parser(): parser = optparse.OptionParser( """autocode.py <database_url> [options, ] Generates Python sou...
mit
deepmind/pycolab
pycolab/examples/extraterrestrial_marauders.py
1
11800
# Copyright 2017 the pycolab Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
apex-hughin/LyX
lib/lyx2lyx/LyX.py
1
29783
# This file is part of lyx2lyx # -*- coding: utf-8 -*- # Copyright (C) 2002-2011 The LyX Team # Copyright (C) 2002-2004 Dekel Tsur <dekel@lyx.org> # Copyright (C) 2002-2006 José Matos <jamatos@lyx.org> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Publi...
gpl-2.0
OSSHealth/ghdata
workers/facade_worker/facade_worker/facade07rebuildcache.py
1
30270
#!/usr/bin/env python3 # Copyright 2016-2018 Brian Warner # # 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...
mit