repo_name stringlengths 6 100 | path stringlengths 4 294 | copies stringlengths 1 5 | size stringlengths 4 6 | content stringlengths 606 896k | license stringclasses 15
values |
|---|---|---|---|---|---|
golismero/golismero-devel | tools/sqlmap/tamper/space2mysqlblank.py | 8 | 1878 | #!/usr/bin/env python
"""
Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import os
import random
from lib.core.common import singleTimeWarnMessage
from lib.core.enums import DBMS
from lib.core.enums import PRIORITY
__priority__ = PRIORITY.LOW
de... | gpl-2.0 |
ltilve/chromium | tools/multi_process_rss.py | 128 | 3646 | #!/usr/bin/env python
# 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.
# Counts a resident set size (RSS) of multiple processes without double-counts.
# If they share the same page frame, the page frame is ... | bsd-3-clause |
bdelzell/creditcoin-org-creditcoin | qa/rpc-tests/mempool_limit.py | 22 | 2177 | #!/usr/bin/env python3
# Copyright (c) 2014-2016 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 mempool limiting together/eviction with the wallet
from test_framework.test_framework import Bitc... | mit |
Gaia3D/QGIS | python/plugins/processing/algs/lidar/fusion/TinSurfaceCreate.py | 7 | 3452 | # -*- coding: utf-8 -*-
"""
***************************************************************************
Catalog.py
---------------------
Date : June 2014
Copyright : (C) 2014 by Agresta S. Coop
Email : iescamochero at agresta dot org
***********************... | gpl-2.0 |
ZuluPro/libcloud | libcloud/test/test_logging_connection.py | 12 | 2769 | # 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 use ... | apache-2.0 |
pelya/commandergenius | project/jni/python/src/Lib/encodings/cp737.py | 593 | 34937 | """ Python Character Mapping Codec cp737 generated from 'VENDORS/MICSFT/PC/CP737.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_map)
def decode(self,input,errors='strict... | lgpl-2.1 |
xtech9/spksrc | spk/subliminal/src/app/application/auth.py | 42 | 2064 | from collections import namedtuple
from flask import abort, request
from functools import wraps, partial
from subprocess import check_output
import grp
import os
import pwd
__all__ = ['authenticate', 'requires_auth']
def authenticate():
"""Authenticate a user using Synology's authenticate.cgi
If the user i... | bsd-3-clause |
kevintaw/django | tests/postgres_tests/test_ranges.py | 161 | 24567 | import datetime
import json
import unittest
from django import forms
from django.core import exceptions, serializers
from django.db import connection
from django.db.models import F
from django.test import TestCase, override_settings
from django.utils import timezone
from . import PostgreSQLTestCase
from .models impor... | bsd-3-clause |
Big-B702/python-for-android | python3-alpha/python3-src/Lib/importlib/test/test_api.py | 46 | 2976 | from . import util
import imp
import importlib
import sys
import unittest
class ImportModuleTests(unittest.TestCase):
"""Test importlib.import_module."""
def test_module_import(self):
# Test importing a top-level module.
with util.mock_modules('top_level') as mock:
with util.impo... | apache-2.0 |
axelkennedal/dissen | dissenEnv/lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/escsm.py | 2930 | 7839 | ######################## 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... | mit |
TylerB24890/flask | tests/test_appctx.py | 141 | 4034 | # -*- coding: utf-8 -*-
"""
tests.appctx
~~~~~~~~~~~~
Tests the application context.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import pytest
import flask
def test_basic_url_generation():
app = flask.Flask(__name__)
app.config['SERVER_NAME'... | bsd-3-clause |
pnasrat/puppet-codereview | rietveld.py | 1 | 6634 | #!/usr/bin/python
#
# Copyright 2008 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 ag... | apache-2.0 |
xxxIsaacPeralxxx/anim-studio-tools | review_tool/sources/reviewTool/util/diagnosis.py | 5 | 3430 | ##
# \namespace reviewTool.util.diagnosis
#
# \remarks Creates diagnosis information about data
#
# \author eric.hulser@drdstudios.com
# \author Dr. D Studios
# \date 08/16/11
#
import ConfigParser
import os
import subprocess
import sys
import time
from reviewTool import settings
from ... | gpl-3.0 |
F8LEFT/ART | KDE/share/ECM/find-modules/rules_engine.py | 1 | 21090 | #!/usr/bin/env python
#=============================================================================
# Copyright 2016 by Shaheed Haque (srhaque@theiet.org)
# Copyright 2016 Stephen Kelly <steveire@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided th... | gpl-3.0 |
tmhorne/simplewiki | tests/calendar.py | 4 | 7375 | # -*- coding: utf-8 -*-
# Copyright 2008,2014 Jaap Karssenberg <jaap.karssenberg@gmail.com>
from __future__ import with_statement
import tests
from datetime import date as dateclass
import zim.datetimetz
from zim.plugins import PluginManager
from zim.notebook import Path
from zim.templates import get_template
fr... | gpl-2.0 |
ampax/edx-platform | common/djangoapps/edxmako/shortcuts.py | 7 | 5575 | # Copyright (c) 2008 Mikeal Rogers
#
# 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 agre... | agpl-3.0 |
st0ne/gr-OE2AIP | docs/doxygen/doxyxml/doxyindex.py | 223 | 6551 | #
# Copyright 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
#... | gpl-2.0 |
adammenges/statsmodels | statsmodels/tsa/mlemodel.py | 36 | 2101 | """Base Classes for Likelihood Models in time series analysis
Warning: imports numdifftools
Created on Sun Oct 10 15:00:47 2010
Author: josef-pktd
License: BSD
"""
import numpy as np
try:
import numdifftools as ndt
except ImportError:
pass
from statsmodels.base.model import LikelihoodModel
#copied fro... | bsd-3-clause |
Mazecreator/tensorflow | tensorflow/contrib/layers/python/layers/optimizers.py | 12 | 18942 | # 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 |
samdoran/ansible | lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py | 69 | 20312 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | gpl-3.0 |
CamelBackNotation/CarnotKE | jyhton/lib-python/2.7/ctypes/test/test_byteswap.py | 59 | 10893 | import sys, unittest, struct, math, ctypes
from binascii import hexlify
from ctypes import *
def bin(s):
return hexlify(memoryview(s)).upper()
# Each *simple* type that supports different byte orders has an
# __ctype_be__ attribute that specifies the same type in BIG ENDIAN
# byte order, and a __ctype_le__ attri... | apache-2.0 |
vsajip/django | django/db/models/__init__.py | 115 | 1456 | from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured
from django.db import connection
from django.db.models.loading import get_apps, get_app, get_models, get_model, register_models
from django.db.models.query import Q
from django.db.models.expressions import F
fro... | bsd-3-clause |
refeed/coala-bears | bears/java/CheckstyleBear.py | 3 | 4182 | from coalib.bearlib.abstractions.Linter import linter
from coalib.settings.Setting import path
from dependency_management.requirements.DistributionRequirement import (
DistributionRequirement)
_online_styles = {
'android-check-easy': 'https://raw.githubusercontent.com/noveogroup/' +
'android-check/master/... | agpl-3.0 |
YarivCol/mbed-os | tools/compliance/ioper_base.py | 106 | 1992 | """
mbed SDK
Copyright (c) 2011-2015 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 |
tsdmgz/ansible | lib/ansible/modules/network/nxos/nxos_igmp.py | 23 | 5057 | #!/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 |
bsmithyman/pymatsolver | pymatsolver/Tests/test_Triangle.py | 1 | 1715 | import unittest
import numpy as np, scipy.sparse as sp
TOL = 1e-12
class TestMumps(unittest.TestCase):
def setUp(self):
n = 50
nrhs = 20
self.A = sp.rand(n, n, 0.4) + sp.identity(n)
self.sol = np.ones((n, nrhs))
self.rhsU = sp.triu(self.A) * self.sol
self.rhsL = sp... | mit |
mgree/sigplan | www-copy/web/playground/tfidf_testing.py | 4 | 4127 | import nltk
import string
import os
import sys
import codecs
import math
import re
import operator
import unicodedata
from nltk.corpus import stopwords
stemmer = nltk.stem.wordnet.WordNetLemmatizer()
stem = stemmer.lemmatize
def encode_ascii (word):
return word.encode('ascii', 'ignore')
words = ["ponies", "cats... | mit |
havard024/prego | crm/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py | 2762 | 17725 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 R... | mit |
scieloorg/pulsemob_webservices | pulsemob_webservices/webservices/test_webservices.py | 2 | 21640 | __author__ = 'vitor'
from pprint import pprint
from rest_framework import status
from rest_framework.test import APITestCase, APIClient
import json
import ConfigParser
from models import *
config = ConfigParser.ConfigParser()
config.read('webservices/test_webservices.cfg')
facebook_id = config.get("test_webservices"... | bsd-2-clause |
varigit/VAR-SOM-AM33-Kernel-3-14 | Documentation/networking/cxacru-cf.py | 14668 | 1626 | #!/usr/bin/env python
# Copyright 2009 Simon Arlott
#
# 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 i... | gpl-2.0 |
350dotorg/Django | django/utils/module_loading.py | 112 | 2190 | import imp
import os
import sys
def module_has_submodule(package, module_name):
"""See if 'module' is in 'package'."""
name = ".".join([package.__name__, module_name])
if name in sys.modules:
return True
for finder in sys.meta_path:
if finder.find_module(name):
return True
... | bsd-3-clause |
nightjean/Deep-Learning | tensorflow/tools/dist_test/python/mnist_replica.py | 57 | 10810 | # 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 |
ryfeus/lambda-packs | Rasterio_osgeo_shapely_PIL_pyproj_numpy/source/docutils/languages/pt_br.py | 148 | 1982 | # $Id: pt_br.py 5567 2008-06-03 01:11:03Z goodger $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
# transla... | mit |
nwokeo/supysonic | supysonic/lastfm.py | 2 | 3288 | # coding: utf-8
# This file is part of Supysonic.
#
# Supysonic is a Python implementation of the Subsonic server API.
# Copyright (C) 2013 Alban 'spl0k' Féron
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the F... | agpl-3.0 |
ric2b/Vivaldi-browser | chromium/components/policy/tools/make_policy_zip.py | 1 | 2188 | #!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Creates a zip archive with policy template files.
"""
import optparse
import sys
import zipfile
def add_files_to_zip(zip_file,... | bsd-3-clause |
fabianp/scikit-learn | sklearn/externals/joblib/logger.py | 359 | 5135 | """
Helpers for logging.
This module needs much love to become useful.
"""
# Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org>
# Copyright (c) 2008 Gael Varoquaux
# License: BSD Style, 3 clauses.
from __future__ import print_function
import time
import sys
import os
import shutil
import logging
impo... | bsd-3-clause |
gamecredits-project/gmc-dev | qa/rpc-tests/httpbasics.py | 148 | 4755 | #!/usr/bin/env python2
# Copyright (c) 2014 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 REST interface
#
from test_framework import BitcoinTestFramework
from util import *
import base64
t... | mit |
cscott/wikiserver | whoosh/qparser/default.py | 21 | 16570 | # Copyright 2011 Matt Chaput. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the... | gpl-2.0 |
ptisserand/ansible | lib/ansible/modules/network/avi/avi_seproperties.py | 41 | 3649 | #!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# 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 |
seann1/portfolio5 | .meteor/dev_bundle/python/Lib/test/test_shlex.py | 179 | 5300 | # -*- coding: iso-8859-1 -*-
import unittest
import shlex
from test import test_support
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
# The original test data set was from shellwords, by Hartmut Goebel.
data = r"""x|x|
foo bar|foo|bar|
foo bar|foo|bar|
foo bar |foo... | gpl-2.0 |
Solewer/vino-cave | vinocave/settings.py | 1 | 3114 | """
Django settings for vinocave project.
Generated by 'django-admin startproject' using Django 1.11.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import o... | mit |
Dave667/service | plugin.video.pokerstars.tv/html5lib/treewalkers/__init__.py | 133 | 2416 | """A collection of modules for iterating through different kinds of
tree, generating tokens identical to those produced by the tokenizer
module.
To create a tree walker for a new type of tree, you need to do
implement a tree walker object (called TreeWalker by convention) that
implements a 'serialize' method taking a ... | gpl-2.0 |
inovtec-solutions/OpenERP | openerp/addons/account_asset/__init__.py | 446 | 1135 | # -*- encoding: 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 t... | agpl-3.0 |
hachreak/invenio-previewer | tests/test_utils.py | 2 | 2890 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016 CERN.
#
# Invenio is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... | gpl-2.0 |
dagwieers/ansible | lib/ansible/modules/network/avi/avi_gslbapplicationpersistenceprofile.py | 31 | 3686 | #!/usr/bin/python
#
# Created on Aug 25, 2016
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the te... | gpl-3.0 |
wearpants/osf.io | api_tests/nodes/views/test_node_exceptions.py | 30 | 5135 | # -*- coding: utf-8 -*-
from nose.tools import * # flake8: noqa
from api.base.settings.defaults import API_BASE
from tests.base import ApiTestCase
from tests.factories import (
ProjectFactory,
AuthUserFactory
)
class TestExceptionFormatting(ApiTestCase):
def setUp(self):
super(TestExceptionFor... | apache-2.0 |
garbled1/ansible | lib/ansible/modules/cloud/rackspace/rax_clb_nodes.py | 14 | 8227 | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
ylow/SFrame | oss_src/unity/python/sframe/util/lockfile/pidlockfile.py | 488 | 6221 | # -*- coding: utf-8 -*-
# pidlockfile.py
#
# Copyright © 2008–2009 Ben Finney <ben+python@benfinney.id.au>
#
# This is free software: you may copy, modify, and/or distribute this work
# under the terms of the Python Software Foundation License, version 2 or
# later as published by the Python Software Foundation.
# No ... | bsd-3-clause |
jvillacorta/mitmproxy | test/netlib/http/http1/test_read.py | 2 | 11189 | from __future__ import absolute_import, print_function, division
from io import BytesIO
from mock import Mock
import pytest
from netlib.exceptions import HttpException, HttpSyntaxException, HttpReadDisconnect, TcpDisconnect
from netlib.http import Headers
from netlib.http.http1.read import (
read_request, read_re... | mit |
zooba/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/pip/_internal/operations/freeze.py | 5 | 9279 | from __future__ import absolute_import
import collections
import logging
import os
import re
from pip._vendor import six
from pip._vendor.packaging.utils import canonicalize_name
from pip._vendor.pkg_resources import RequirementParseError
from pip._internal.exceptions import BadCommand, InstallationError
from pip._i... | apache-2.0 |
tml/pyxer | src/pyxer/paster/__init__.py | 2 | 2810 | # -*- coding: UTF-8 -*-
#############################################
## (C)opyright by Dirk Holtwick, 2008 ##
## All rights reserved ##
#############################################
from paste import httpserver
from pyxer.app import make_app
#def serve(opt):
# if opt.reload:
# impo... | mit |
pbrady/sympy | sympy/solvers/polysys.py | 103 | 9370 | """Solvers of systems of polynomial equations. """
from __future__ import print_function, division
from sympy.core import S
from sympy.polys import Poly, groebner, roots
from sympy.polys.polytools import parallel_poly_from_expr
from sympy.polys.polyerrors import (ComputationFailed,
PolificationFailed, CoercionFai... | bsd-3-clause |
Poles/Poles | platforms/linux/JsonCpp/scons-local-2.3.0/SCons/Tool/tex.py | 11 | 39943 | """SCons.Tool.tex
Tool-specific initialization for TeX.
Generates .dvi files from .tex files
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, ... | gpl-3.0 |
mustafat/odoo-1 | addons/base_iban/__openerp__.py | 260 | 1724 | # -*- 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 |
toothris/toothris | src/bprofile.py | 1 | 5189 | # Copyright 2008, 2015 Oleg Plakhotniuk
#
# This file is part of Toothris.
#
# Toothris 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 |
PatrikKT/android_kernel_htc_a11ul | 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 |
hilaskis/UAV_MissionPlanner | Lib/site-packages/numpy/f2py/common_rules.py | 51 | 4709 | #!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe"
"""
Build common block mechanism for f2py2e.
Copyright 2000 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the Num... | gpl-2.0 |
PetrDlouhy/django | django/contrib/gis/db/models/query.py | 56 | 36394 | import warnings
from django.contrib.gis.db.models import aggregates
from django.contrib.gis.db.models.fields import (
GeometryField, LineStringField, PointField, get_srid_info,
)
from django.contrib.gis.db.models.lookups import GISLookup
from django.contrib.gis.db.models.sql import (
AreaField, DistanceField, ... | bsd-3-clause |
hslee16/ansible-modules-extras | cloud/lxc/lxc_container.py | 9 | 56696 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Kevin Carter <kevin.carter@rackspace.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... | gpl-3.0 |
FusionSP/android_external_chromium_org | tools/telemetry/telemetry/core/backends/form_based_credentials_backend_unittest_base.py | 26 | 4673 | # 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.
import logging
import os
import unittest
from telemetry import benchmark
from telemetry.core import browser_finder
from telemetry.core import util
from tele... | bsd-3-clause |
vietch2612/phantomjs | src/qt/qtbase/src/3rdparty/freetype/src/tools/docmaker/content.py | 293 | 17668 | # Content (c) 2002, 2004, 2006, 2007, 2008, 2009
# David Turner <david@freetype.org>
#
# This file contains routines used to parse the content of documentation
# comment blocks and build more structured objects out of them.
#
from sources import *
from utils import *
import string, re
# this regular expression... | bsd-3-clause |
u2009cf/spark-radar | examples/src/main/python/mllib/random_rdd_generation.py | 85 | 1940 | #
# 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 |
twitchyliquid64/misc-scripts | s3tool/boto/ec2/autoscale/launchconfig.py | 135 | 10807 | # Copyright (c) 2009 Reza Lotun http://reza.lotun.name/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without... | mit |
wulin9005/cocosbuilder | CocosBuilder/libs/nodejs/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py | 2710 | 5094 | # 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.
"""Visual Studio user preferences file writer."""
import os
import re
import socket # for gethostname
import gyp.common
import gyp.easy_xml as easy_xml
#------... | mit |
drawks/ansible | lib/ansible/modules/cloud/vmware/vmware_guest_vnc.py | 53 | 7341 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018, Armin Ranjbar Daemi <armin@webair.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... | gpl-3.0 |
bearops/ebzl | ebzl/modules/ecs.py | 1 | 4547 | from .. lib import (
ecs,
format as fmt,
parameters
)
from . import (
version
)
import os
import json
import argparse
def get_argument_parser():
parser = argparse.ArgumentParser("ebzl ecs")
parameters.add_profile(parse, required=False)
parameters.add_region(parser, required=False)
... | bsd-3-clause |
egiurleo/appinventor-sources | appinventor/misc/emulator-support/aiWinDaemonService.py | 86 | 1932 | __author__ = 'mckinney'
import win32service
import win32serviceutil
import win32api
import win32con
import win32event
import win32evtlogutil
import os, sys, platform, string, time
import servicemanager
class aservice(win32serviceutil.ServiceFramework):
_svc_name_ = "aiDaemonService"
_svc_display_name_ = "AI ... | apache-2.0 |
rosswhitfield/mantid | qt/python/mantidqt/widgets/sliceviewer/test/test_sliceviewer_presenter.py | 3 | 24997 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
# T... | gpl-3.0 |
SergeyPirogov/ghost | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/math.py | 291 | 93298 | # -*- coding: utf-8 -*-
"""
pygments.lexers.math
~~~~~~~~~~~~~~~~~~~~
Lexers for math languages.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.util import shebang_matches
from pygments.lexer import Lexer, Re... | mit |
xbed/Mixly_Arduino | mixly_arduino/arduino/portable/sketchbook/libraries/Blynk/extras/gen-qr.py | 4 | 1516 | # coding: utf-8
import sys
import pyqrcode
import gzip, zlib
import base64
import json
import re
#data = sys.argv[1]
data = '''{"boardType":"Generic Board","createdAt":1453325389643,"id":17,"isActive":false,"isShared":false,"keepScreenOn":false,"name":"webpage","updatedAt":1453326512172,"widgets":[{"color":616861439,... | apache-2.0 |
schumi2004/NOT_UPDATED_Sick-Beard-Dutch | lib/bs4/tests/test_builder_registry.py | 485 | 5374 | """Tests of the builder registry."""
import unittest
from bs4 import BeautifulSoup
from bs4.builder import (
builder_registry as registry,
HTMLParserTreeBuilder,
TreeBuilderRegistry,
)
try:
from bs4.builder import HTML5TreeBuilder
HTML5LIB_PRESENT = True
except ImportError:
HTML5LIB_PRESENT =... | gpl-3.0 |
inessadl/kinect-2-libras | Kinect2Libras/KinectFingerTracking/Lib/DocXMLRPCServer.py | 250 | 10500 | """Self documenting XML-RPC Server.
This module can be used to create XML-RPC servers that
serve pydoc-style documentation in response to HTTP
GET requests. This documentation is dynamically generated
based on the functions and methods registered with the
server.
This module is built upon the pydoc and SimpleXMLRPCSe... | apache-2.0 |
LeiZeng/shadowsocks | tests/coverage_server.py | 1072 | 1655 | #!/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# 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 |
marcosmodesto/django-testapp | djangoappengine/management/commands/deploy.py | 53 | 2298 | import logging
import time
import sys
from django.conf import settings
from django.core.management import call_command
from django.core.management.base import BaseCommand
from ...boot import PROJECT_DIR
from ...utils import appconfig
PRE_DEPLOY_COMMANDS = ()
if 'mediagenerator' in settings.INSTALLED_APPS:
PRE_D... | bsd-3-clause |
brandonPurvis/osf.io | api/institutions/serializers.py | 4 | 1145 | from rest_framework import serializers as ser
from api.base.serializers import JSONAPISerializer, RelationshipField, LinksField
class InstitutionSerializer(JSONAPISerializer):
filterable_fields = frozenset([
'id',
'name'
])
name = ser.CharField(read_only=True)
id = ser.CharField(read... | apache-2.0 |
tinkerinestudio/Tinkerine-Suite | TinkerineSuite/python/Lib/site-packages/wx-2.8-msw-unicode/wx/lib/pubsub/setuparg1.py | 8 | 1584 | '''
Import this file before the first 'from pubsub import pub' statement
to make pubsub use the *arg1* messaging protocol::
from pubsub import setuparg1
from pubsub import pub
This could be necessary in at least two situations:
1. with a default pubsub installation, where *kwargs* messaging protocol
is t... | agpl-3.0 |
chosener/RunningSheep | cocos2d/download-deps.py | 63 | 12254 | #!/usr/bin/env python
#coding=utf-8
#
# ./download-deps.py
#
# Download Cocos2D-X resources from github (https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin) and extract from ZIP
#
# Helps prevent repo bloat due to large binary files since they can
# be hosted separately.
#
"""*************************************... | gpl-3.0 |
eldarion/kairios | setup.py | 2 | 3037 | from setuptools import find_packages, setup
VERSION = "3.0.0"
LONG_DESCRIPTION = """
.. image:: http://pinaxproject.com/pinax-design/patches/pinax-calendars.svg
:target: https://pypi.python.org/pypi/pinax-calendars/
===============
Pinax Calendars
===============
.. image:: https://img.shields.io/pypi/v/pinax-ca... | bsd-3-clause |
yewang15215/django | django/test/selenium.py | 109 | 3456 | from __future__ import unicode_literals
import sys
import unittest
from contextlib import contextmanager
from django.test import LiveServerTestCase, tag
from django.utils.module_loading import import_string
from django.utils.six import with_metaclass
from django.utils.text import capfirst
class SeleniumTestCaseBase... | bsd-3-clause |
johnkeepmoving/oss-ftp | python27/win32/Lib/site-packages/cffi/setuptools_ext.py | 49 | 6158 | import os
try:
basestring
except NameError:
# Python 3.x
basestring = str
def error(msg):
from distutils.errors import DistutilsSetupError
raise DistutilsSetupError(msg)
def execfile(filename, glob):
# We use execfile() (here rewritten for Python 3) instead of
# __import__() to load the ... | mit |
druuu/django | tests/template_tests/test_custom.py | 152 | 20056 | from __future__ import unicode_literals
import os
from django.template import Context, Engine, TemplateSyntaxError
from django.template.base import Node
from django.template.library import InvalidTemplateLibrary
from django.test import SimpleTestCase, ignore_warnings
from django.test.utils import extend_sys_path
from... | bsd-3-clause |
sudheesh001/oh-mainline | vendor/packages/twisted/doc/conch/examples/sshsimpleserver.py | 18 | 3772 | #!/usr/bin/env python
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.cred import portal, checkers
from twisted.conch import error, avatar
from twisted.conch.checkers import SSHPublicKeyDatabase
from twisted.conch.ssh import factory, userauth, connection, keys, session
from twiste... | agpl-3.0 |
Punchcard123/DMX-AP | Tools/autotest/param_metadata/htmlemit.py | 62 | 2986 | #!/usr/bin/env python
import re
from param import *
from emit import Emit
import cgi
# Emit docs in a form acceptable to the APM wordpress docs site
class HtmlEmit(Emit):
def __init__(self):
html_fname = 'Parameters.html'
self.f = open(html_fname, mode='w')
self.preamble = '''<!-- Dyn... | gpl-3.0 |
wfxiang08/changes | changes/api/diff_build_retry.py | 2 | 3554 | import logging
import uuid
from sqlalchemy.orm import joinedload, subqueryload_all
from changes.api.base import APIView, error
from changes.api.build_index import create_build, get_build_plans
from changes.constants import Cause, Result, Status
from changes.models import (
Build, PhabricatorDiff, Project, Project... | apache-2.0 |
neilhan/tensorflow | tensorflow/python/kernel_tests/spacetobatch_op_test.py | 21 | 24519 | # 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 |
rjungbeck/rasterizer | mupdf12.py | 1 | 2411 | from mupdfbase import MuPdfBase, Matrix, Rect, BBox
from ctypes import cdll,c_float, c_int, c_void_p, Structure, c_char_p,POINTER
FZ_STORE_UNLIMITED=0
class MuPdf(MuPdfBase):
def __init__(self):
self.dll=cdll.libmupdf
self.dll.fz_bound_page.argtypes=[c_void_p, c_void_p, POINTER(Rect)]
self.dll... | agpl-3.0 |
philippeowagner/django-hvad | hvad/tests/queryset_override.py | 6 | 13863 | # -*- coding: utf-8 -*-
from django.utils import translation
from hvad.test_utils.data import QONORMAL
from hvad.test_utils.testcase import HvadTestCase
from hvad.test_utils.project.app.models import QONormal, QOSimpleRelated, QOMany
from hvad.test_utils.fixtures import QONormalFixture
from hvad.manager import Translat... | bsd-3-clause |
donckers/ansible | lib/ansible/module_utils/vca.py | 14 | 11090 | #
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope tha... | gpl-3.0 |
bsmedberg/socorro | socorro/webapi/servers.py | 1 | 3703 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import web
import os
from socorro.webapi.classPartial import classWithPartialInit
from configman import Namespace, Req... | mpl-2.0 |
lgiordani/punch | punch/vcs_repositories/git_flow_repo.py | 1 | 3464 | from __future__ import print_function, absolute_import, division
import subprocess
import os
import six
from punch.vcs_repositories import git_repo as gr
from punch.vcs_repositories.exceptions import (
RepositoryStatusError,
RepositorySystemError
)
class GitFlowRepo(gr.GitRepo):
def __init__(self, work... | isc |
jjz/mezzanine | mezzanine/forms/models.py | 23 | 4797 | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from mezzanine.conf import settings
from mezzanine.core.fields import RichTextField
from mezzanine.core.models import Orderable, Ri... | bsd-2-clause |
freezmeinster/teh-manis | django/contrib/admin/models.py | 228 | 2207 | from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth.models import User
from django.contrib.admin.util import quote
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import smart_unicode
from django.utils.safestring import mark... | bsd-3-clause |
plissonf/scikit-learn | sklearn/linear_model/coordinate_descent.py | 59 | 76336 | # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Olivier Grisel <olivier.grisel@ensta.org>
# Gael Varoquaux <gael.varoquaux@inria.fr>
#
# License: BSD 3 clause
import sys
import warnings
from abc import ABCMeta, abstractmethod
import n... | bsd-3-clause |
signed/intellij-community | python/lib/Lib/wsgiref/util.py | 104 | 5598 | """Miscellaneous WSGI-related Utilities"""
import posixpath
__all__ = [
'FileWrapper', 'guess_scheme', 'application_uri', 'request_uri',
'shift_path_info', 'setup_testing_defaults',
]
class FileWrapper:
"""Wrapper to convert file-like objects to iterables"""
def __init__(self, filelike, blksize=819... | apache-2.0 |
rhurkes/chasegame | venv/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/pkcs12.py | 6 | 1141 | # 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
# distributed under the... | mit |
tudorian/eden | modules/templates/default/parser.py | 18 | 22381 | # -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
""" Message Parsing
Template-specific Message Parsers are defined here.
@copyright: 2012-15 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this softwa... | mit |
adaur/SickRage | lib/chardet/euckrfreq.py | 342 | 13546 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 R... | gpl-3.0 |
rgeleta/odoo | addons/contacts/__openerp__.py | 260 | 1594 | # -*- 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 |
MaisamArif/NEST | backend/tmp_markov_framework/markov_script.py | 1 | 1912 | import numpy as np
import random
def normalize(arr):
s = sum(arr)
if s == 0:
s = 1
arr[0] = 1
for i, val in enumerate(arr):
arr[i] = val/s
def generate(width, height):
matrix = []
for i in range(height):
matrix.append([])
for j in range(width):
... | gpl-3.0 |
infobloxopen/infoblox-netmri | infoblox_netmri/api/broker/v2_7_0/device_filter_broker.py | 14 | 69946 | from ..broker import Broker
class DeviceFilterBroker(Broker):
controller = "device_filters"
def show(self, **kwargs):
"""Shows the details for the specified device filter.
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``requi... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.