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 |
|---|---|---|---|---|---|
publicRoman/spark | python/pyspark/ml/recommendation.py | 37 | 17093 | #
# 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 |
endlessm/chromium-browser | third_party/llvm/lldb/test/API/functionalities/rerun/TestRerun.py | 8 | 1958 | """
Test that argdumper is a viable launching strategy.
"""
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class TestRerun(TestBase):
mydir = TestBase.compute_mydir(__file__)
def test(self):
self.build()
exe = s... | bsd-3-clause |
miipl-naveen/optibizz | addons/hr_timesheet_invoice/report/account_analytic_profit.py | 281 | 5811 | # -*- 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 |
edlunde-dnastar/StarCluster | starcluster/volume.py | 14 | 15640 | # Copyright 2009-2014 Justin Riley
#
# This file is part of StarCluster.
#
# StarCluster is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later ... | gpl-3.0 |
MebiusHKU/flask-web | flask/lib/python2.7/site-packages/sqlalchemy/events.py | 44 | 43719 | # sqlalchemy/events.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
"""Core event interfaces."""
from . import event, exc
from .pool import Pool
f... | bsd-3-clause |
zerkrx/zerkbox | lib/discord/calls.py | 18 | 5286 | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-2016 Rapptz
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 u... | gpl-3.0 |
kyleofori/Anki-Android | tools/lib/googlecode_upload.py | 304 | 8912 | #!/usr/bin/env python
#
# Copyright 2006, 2007 Google Inc. All Rights Reserved.
# Author: danderson@google.com (David Anderson)
#
# Script for uploading files to a Google Code project.
#
# This is intended to be both a useful script for people who want to
# streamline project uploads and a reference implementation for
... | gpl-3.0 |
mmlr/qemu-haiku | scripts/qapi-types.py | 22 | 10985 | #
# QAPI types generator
#
# Copyright IBM, Corp. 2011
#
# Authors:
# Anthony Liguori <aliguori@us.ibm.com>
#
# This work is licensed under the terms of the GNU GPL, version 2.
# See the COPYING file in the top-level directory.
from ordereddict import OrderedDict
from qapi import *
import sys
import os
import getopt
... | gpl-2.0 |
flccrakers/dj-tango | bin/pydub/scipy_effects.py | 4 | 2231 | """
This module provides scipy versions of high_pass_filter, and low_pass_filter
as well as an additional band_pass_filter.
Of course, you will need to install scipy for these to work.
When this module is imported the high and low pass filters from this module
will be used when calling audio_segment.high_pass_filter(... | gpl-3.0 |
mazz/kifu | tests/tests.py | 1 | 1568 | import unittest
import transaction
from pyramid import testing
from default.models.mymodel import DBSession
class TestMyViewSuccessCondition(unittest.TestCase):
def setUp(self):
self.config = testing.setUp()
from sqlalchemy import create_engine
engine = create_engine('sqlite://')
... | mit |
sugarguo/Flask_Blog | ext_lib/pip/_vendor/requests/packages/urllib3/response.py | 316 | 10537 | # urllib3/response.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import logging
import zlib
import io
from .exceptions import DecodeError
from .packages.six ... | gpl-3.0 |
mwiebe/numpy | numpy/ma/timer_comparison.py | 138 | 15592 | from __future__ import division, absolute_import, print_function
import timeit
from functools import reduce
import numpy as np
from numpy import float_
import numpy.core.fromnumeric as fromnumeric
from numpy.testing.utils import build_err_msg
# Fixme: this does not look right.
np.seterr(all='ignore')
pi = np.pi
... | bsd-3-clause |
steebchen/youtube-dl | youtube_dl/extractor/inc.py | 40 | 1539 | from __future__ import unicode_literals
from .common import InfoExtractor
from .kaltura import KalturaIE
class IncIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?inc\.com/(?:[^/]+/)+(?P<id>[^.]+).html'
_TESTS = [{
'url': 'http://www.inc.com/tip-sheet/bill-gates-says-these-5-books-will-make-you-s... | unlicense |
jsteemann/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/encodings/cp1255.py | 593 | 12722 | """ Python Character Mapping Codec cp1255 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1255.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,in... | apache-2.0 |
jiangzhuo/kbengine | kbe/src/lib/python/Lib/encodings/cp1258.py | 272 | 13364 | """ Python Character Mapping Codec cp1258 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1258.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,in... | lgpl-3.0 |
aseigneurin/ansible-modules-core | files/template.py | 60 | 2808 | # this is a virtual module that is entirely implemented server side
DOCUMENTATION = '''
---
module: template
version_added: historical
short_description: Templates a file out to a remote server.
description:
- Templates are processed by the Jinja2 templating language
(U(http://jinja.pocoo.org/docs/)) - doc... | gpl-3.0 |
django-stars/dash2011 | presence/apps/shout/views.py | 1 | 2081 | import logging
import json
from django.shortcuts import render_to_response
from django.http import Http404
from django.template import RequestContext
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.http import HttpResponseForbidden
from django.shortcuts import redirect
fro... | bsd-3-clause |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Pillow-2.9.0/PIL/PpmImagePlugin.py | 52 | 4581 | #
# The Python Imaging Library.
# $Id$
#
# PPM support for PIL
#
# History:
# 96-03-24 fl Created
# 98-03-06 fl Write RGBA images (as RGB, that is)
#
# Copyright (c) Secret Labs AB 1997-98.
# Copyright (c) Fredrik Lundh 1996.
#
# See the README file for information on usage and redistribution.
#
_... | mit |
dprince/tripleo-heat-templates | extraconfig/post_deploy/clouds_yaml.py | 1 | 2821 | #!/usr/bin/env python
import os
import yaml
AUTH_URL = os.environ['auth_url']
ADMIN_PASSWORD = os.environ['admin_password']
CLOUD_NAME = os.environ['cloud_name']
HOME_DIR = os.environ['home_dir']
IDENTITY_API_VERSION = os.environ['identity_api_version']
PROJECT_NAME = os.environ['project_name']
PROJECT_DOMAIN_NAME = ... | apache-2.0 |
OpenPLi/enigma2 | lib/python/Components/ConditionalWidget.py | 7 | 1701 | from GUIComponent import GUIComponent
from enigma import eTimer
class ConditionalWidget(GUIComponent):
def __init__(self, withTimer=True):
GUIComponent.__init__(self)
self.setConnect(None)
if withTimer:
self.conditionCheckTimer = eTimer()
self.conditionCheckTimer.callback.append(self.update)
self.co... | gpl-2.0 |
joshelser/accumulo | test/system/bench/cloudstone3/cloudstone3.py | 6 | 1543 | # 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 |
Tocknicsu/nctuoj | backend/test/api/bulletin/admin_cross.py | 1 | 2124 | #!/usr/bin/env python3
import sys
import requests
import json
import unittest
import datetime
from util import TestCase
import config
import common
class TestApiBulletinAdminCross(TestCase):
url = '%s/api/groups/1/bulletins/'%(config.base_url)
cross_url = None
token = common.get_user_info({'account': confi... | mit |
JaviMerino/lisa | libs/utils/analysis/frequency_analysis.py | 1 | 24894 | # SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2015, ARM Limited and contributors.
#
# 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
#
# ... | apache-2.0 |
drawquest/drawquest-web | common/boto/mturk/connection.py | 2 | 36822 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# 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 use, copy, modi... | bsd-3-clause |
martinghunt/ariba | ariba/tests/aln_to_metadata_test.py | 2 | 17407 | import unittest
import os
import filecmp
import pyfastaq
from ariba import aln_to_metadata, sequence_variant
modules_dir = os.path.dirname(os.path.abspath(aln_to_metadata.__file__))
data_dir = os.path.join(modules_dir, 'tests', 'data')
class TestAlnToMetadata(unittest.TestCase):
def test_load_aln_file(self):
... | gpl-3.0 |
kamenim/samba-old | third_party/dnspython/dns/rdtypes/IN/IPSECKEY.py | 100 | 5993 | # Copyright (C) 2006, 2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... | gpl-3.0 |
cburmeister/flask-bones | app/commands.py | 1 | 1163 | from faker import Faker
import click
from app.database import db
from app.user.models import User
@click.option('--num_users', default=5, help='Number of users.')
def populate_db(num_users):
"""Populates the database with seed data."""
fake = Faker()
users = []
for _ in range(num_users):
user... | mit |
avivgr/diffview | lib/werkzeug/contrib/limiter.py | 319 | 1333 | # -*- coding: utf-8 -*-
"""
werkzeug.contrib.limiter
~~~~~~~~~~~~~~~~~~~~~~~~
A middleware that limits incoming data. This works around problems with
Trac_ or Django_ because those directly stream into the memory.
.. _Trac: http://trac.edgewall.org/
.. _Django: http://www.djangoproject.com/
... | apache-2.0 |
tecwebjoao/TecWeb-TF-2T-B-SI | venv/Lib/encodings/palmos.py | 219 | 13519 | """ Python Character Mapping Codec for PalmOS 3.5.
Written by Sjoerd Mullender (sjoerd@acm.org); based on iso8859_15.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,i... | apache-2.0 |
kjagoo/wger_stark | wger/core/migrations/0003_auto_20150217_1554.py | 3 | 1671 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('core', '0002_auto_20141225_1512'),
]
operations = [
migrations.AddField(
model_nam... | agpl-3.0 |
rbuffat/pyidf | tests/test_shadingsite.py | 1 | 2163 | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.thermal_zones_and_surfaces import ShadingSite
log = logging.getLogger(__name__)
class TestShadingSite(unittest.TestCase):
def setUp(self):
self.fd, self.path = temp... | apache-2.0 |
nlgcoin/guldencoin-official | test/functional/interface_rest.py | 2 | 14644 | #!/usr/bin/env python3
# Copyright (c) 2014-2019 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 the REST API."""
import binascii
from decimal import Decimal
from enum import Enum
from io import... | mit |
heena23/Millionaire | test/functional/decodescript.py | 35 | 13470 | #!/usr/bin/env python3
# Copyright (c) 2015-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 decoding scripts via decodescript RPC command."""
from test_framework.test_framework import Bitco... | mit |
mitmedialab/MediaCloud-Web-Tools | server/views/topics/topiccreate.py | 1 | 3535 | import logging
from flask import jsonify, request
import flask_login
import mediacloud.error
from server import app, mc
from server.auth import user_mediacloud_client
from server.util.request import form_fields_required, api_error_handler, json_error_response, arguments_required
from server.views.topics.topic import ... | apache-2.0 |
atmark-techno/atmark-dist | user/python/Tools/idle/FrameViewer.py | 4 | 1313 | from repr import Repr
from Tkinter import *
class FrameViewer:
def __init__(self, root, frame):
self.root = root
self.frame = frame
self.top = Toplevel(self.root)
self.repr = Repr()
self.repr.maxstring = 60
self.load_variables()
def load_variables(self):
... | gpl-2.0 |
LumiGuide/nixops | nixops/resources/s3_bucket.py | 12 | 4966 | # -*- coding: utf-8 -*-
# Automatic provisioning of AWS S3 buckets.
import time
import boto.s3.connection
import nixops.util
import nixops.resources
import nixops.ec2_utils
class S3BucketDefinition(nixops.resources.ResourceDefinition):
"""Definition of an S3 bucket."""
@classmethod
def get_type(cls):
... | lgpl-3.0 |
jeffsilverm/presentation | whats_new_in_python_3.6/type_hints_complicated.py | 1 | 1308 | #! /usr/bin/python3.6
# -*- coding: utf-8 -*-
import time
import sys
assert sys.version_info.major == 3 and sys.version_info.minor == 6, "Not running python 3.6, running {}".format(
sys.version_info)
class A(object):
def __init__(self, instance_mark) -> None:
self.instance_mark_A = instance_mark
... | gpl-2.0 |
OptiPop/external_chromium_org | third_party/google_appengine_cloudstorage/cloudstorage/api_utils.py | 102 | 10048 | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | bsd-3-clause |
Ensembles/ert | python/python/ert/util/double_vector.py | 2 | 5138 | # Copyright (C) 2014 Statoil ASA, Norway.
#
# The file 'double_vector.py' is part of ERT - Ensemble based Reservoir Tool.
#
# ERT 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 ... | gpl-3.0 |
lorenzo-stoakes/linux-historical | scripts/gdb/linux/cpus.py | 997 | 3560 | #
# gdb helper commands and functions for Linux kernel debugging
#
# per-cpu tools
#
# Copyright (c) Siemens AG, 2011-2013
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
from linux import tasks, utils
MAX_CPUS = 4096
def get_cu... | gpl-2.0 |
adngdb/socorro | socorro/unittest/external/postgresql/test_crash_data.py | 2 | 8309 | # 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 os
from nose.tools import eq_, ok_, assert_raises
from configman import ConfigurationManager, Namespace
from moc... | mpl-2.0 |
hortonworks/hortonworks-sandbox | desktop/core/ext-py/Twisted/twisted/protocols/pcp.py | 3 | 7265 | # -*- test-case-name: twisted.test.test_pcp -*-
#
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""Producer-Consumer Proxy."""
__version__ = '$Revision: 1.4 $'[11:-2]
import operator
from zope.interface import implements
from twisted.internet import interfaces
class BasicProd... | apache-2.0 |
anryko/ansible | test/units/modules/network/fortios/test_fortios_system_replacemsg_sslvpn.py | 21 | 8461 | # Copyright 2019 Fortinet, Inc.
#
# 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 later version.
#
# This program is distributed in the... | gpl-3.0 |
saleemjaveds/https-github.com-openstack-nova | nova/api/ec2/ec2utils.py | 12 | 14634 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | apache-2.0 |
paulfitz/phantomjs | src/breakpad/src/tools/gyp/pylib/gyp/input.py | 137 | 84791 | #!/usr/bin/python
# Copyright (c) 2009 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.
from compiler.ast import Const
from compiler.ast import Dict
from compiler.ast import Discard
from compiler.ast import List
from compiler.ast im... | bsd-3-clause |
apache/thrift | lib/py/src/transport/TSSLSocket.py | 13 | 16389 | #
# 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 u... | apache-2.0 |
koyuawsmbrtn/eclock | windows/Python27/Lib/encodings/cp874.py | 593 | 12851 | """ Python Character Mapping Codec cp874 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP874.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,inpu... | gpl-2.0 |
lispc/Paddle | python/paddle/v2/dataset/tests/cifar_test.py | 16 | 1874 | # Copyright (c) 2016 PaddlePaddle 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 applic... | apache-2.0 |
Crowdcomputer/CC | crowdcomputer/init_db.py | 1 | 1613 | '''
Created on Nov 26, 2012
@author: stefanotranquillini
'''
from django.contrib.auth.models import User, Group
from rest_framework.authtoken.models import Token
from general.models import Application
from uuid import uuid4
def init():
initAppsAndCC()
def initAppsAndCC():
try:
user, c = User.objects... | apache-2.0 |
qizenguf/MLC-STT | ext/ply/ply/lex.py | 96 | 40694 | # -----------------------------------------------------------------------------
# ply: lex.py
#
# Copyright (C) 2001-2009,
# David M. Beazley (Dabeaz LLC)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions ar... | bsd-3-clause |
DailyActie/Surrogate-Model | 01-codes/numpy-master/numpy/matrixlib/defmatrix.py | 1 | 34262 | from __future__ import division, absolute_import, print_function
__all__ = ['matrix', 'bmat', 'mat', 'asmatrix']
import sys
import numpy.core.numeric as N
from numpy.core.numeric import concatenate, isscalar, binary_repr, identity, asanyarray
from numpy.core.numerictypes import issubdtype
# make translation table
_n... | mit |
bwrsandman/OpenUpgrade | addons/website_membership/controllers/main.py | 115 | 9181 | # -*- coding: utf-8 -*-
from openerp import SUPERUSER_ID
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.addons.website.models.website import unslug
from openerp.tools.translate import _
import werkzeug.urls
class WebsiteMembership(http.Controller):
_references_per_pa... | agpl-3.0 |
mammique/django | django/contrib/gis/tests/geogapp/tests.py | 100 | 4117 | """
Tests for geography support in PostGIS 1.5+
"""
from __future__ import absolute_import
import os
from django.contrib.gis import gdal
from django.contrib.gis.measure import D
from django.test import TestCase
from django.utils._os import upath
from .models import City, County, Zipcode
class GeographyTest(TestCas... | bsd-3-clause |
habemus-papadum/binutils-gdb | gdb/testsuite/gdb.perf/gmonster-select-file.py | 13 | 1592 | # Copyright (C) 2015-2016 Free Software Foundation, Inc.
# 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 later version.
#
# This progr... | gpl-2.0 |
Cysu/open-reid | reid/datasets/__init__.py | 2 | 1338 | from __future__ import absolute_import
import warnings
from .cuhk01 import CUHK01
from .cuhk03 import CUHK03
from .dukemtmc import DukeMTMC
from .market1501 import Market1501
from .viper import VIPeR
__factory = {
'viper': VIPeR,
'cuhk01': CUHK01,
'cuhk03': CUHK03,
'market1501': Market1501,
'duke... | mit |
RuudBurger/CouchPotatoServer | libs/suds/xsd/__init__.py | 205 | 3007 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | gpl-3.0 |
valkyriesavage/invenio | modules/websubmit/lib/functions/Allocate_ALEPH_SYS.py | 35 | 21404 | ## This file is part of Invenio.
## Copyright (C) 2006, 2007, 2008, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any ... | gpl-2.0 |
jaywink/social-federation | federation/entities/matrix/django/views.py | 2 | 1500 | import logging
# noinspection PyPackageRequirements
from django.http import JsonResponse
# noinspection PyPackageRequirements
from django.views import View
from federation.utils.django import get_function_from_config
from federation.utils.matrix import get_matrix_configuration
logger = logging.getLogger("federation"... | bsd-3-clause |
bloyl/mne-python | mne/__init__.py | 1 | 5917 | """MNE software for MEG and EEG data analysis."""
# PEP0440 compatible formatted version, see:
# https://www.python.org/dev/peps/pep-0440/
#
# Generic release markers:
# X.Y
# X.Y.Z # For bugfix releases
#
# Admissible pre-release markers:
# X.YaN # Alpha release
# X.YbN # Beta release
# X.YrcN # Rele... | bsd-3-clause |
pasiegel/SickGear | lib/imdb/__init__.py | 9 | 42078 | """
imdb package.
This package can be used to retrieve information about a movie or
a person from the IMDb database.
It can fetch data through different media (e.g.: the IMDb web pages,
a SQL database, etc.)
Copyright 2004-2014 Davide Alberani <da@erlug.linux.it>
This program is free software; you can redistribute i... | gpl-3.0 |
nerevu/frappe | frappe/model/delete_doc.py | 3 | 7793 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import frappe.model.meta
import frappe.defaults
from frappe.utils.file_manager import remove_all
from frappe import _
from rename_doc import dynamic_link_queries
fr... | mit |
jnwng/django-pipeline | pipeline/manifest.py | 3 | 2120 | import os
try:
from staticfiles.finders import get_finders
except ImportError:
from django.contrib.staticfiles.finders import get_finders # noqa
from pipeline.conf import settings
from manifesto import Manifest
from pipeline.packager import Packager
class PipelineManifest(Manifest):
def __init__(self... | mit |
raycarnes/odoomrp-wip | partner_risk_insurance/models/__init__.py | 30 | 1086 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Albert Cervera i Areny (http://www.nan-tic.com).
# All Rights Reserved
# Copyright (c) 2014 Factor Libre SL. All Rights Reserved
#
# T... | agpl-3.0 |
ProjectSWGCore/NGECore2 | scripts/mobiles/yavin4/geonosian_bunker/enhanced_kliknik.py | 2 | 1688 | import sys
from services.spawn import MobileTemplate
from services.spawn import WeaponTemplate
from resources.datatables import WeaponType
from resources.datatables import Difficulty
from resources.datatables import Options
from java.util import Vector
def addTemplate(core):
mobileTemplate = MobileTemplate... | lgpl-3.0 |
aospan/media_tree | scripts/checkkconfigsymbols.py | 92 | 15782 | #!/usr/bin/env python2
"""Find Kconfig symbols that are referenced but not defined."""
# (c) 2014-2015 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 difflib
import os
import re
import signal
i... | gpl-2.0 |
chadspratt/AveryDB | filetypes/libraries/xlwt/examples/formulas.py | 46 | 1358 | #!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Kiseliov Roman
from xlwt import *
w = Workbook()
ws = w.add_sheet('F')
ws.write(0, 0, Formula("-(1+1)"))
ws.write(1, 0, Formula("-(1+1)/(-2-2)"))
ws.write(2, 0, Formula("-(134.8780789+1)"))
ws.write(3, 0, Formula("-(134.8780789e-10+1)"))
ws.wr... | apache-2.0 |
Septima/qgis-qlrbrowser | src/QlrBrowser/mysettings/qgissettingmanager/types/bool.py | 1 | 3112 | #-----------------------------------------------------------
#
# QGIS setting manager is a python module to easily manage read/write
# settings and set/get corresponding widgets.
#
# Copyright : (C) 2013 Denis Rouzaud
# Email : denis.rouzaud@gmail.com
#
#-------------------------------------------------------... | gpl-2.0 |
realms-team/basestation-fw | libs/sol-REL-1.7.5.0/sensorobjectlibrary/SolUtils.py | 3 | 4757 | import time
import logging
import traceback
import threading
import ConfigParser
#============================ logging =========================================
log = logging.getLogger(__name__)
#============================ helpers =========================================
def currentUtcTime():
""" Returns th... | bsd-3-clause |
akretion/connector-ecommerce | __unported__/connector_ecommerce/event.py | 7 | 2675 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Joel Grand-Guillaume
# Copyright 2013 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... | agpl-3.0 |
vhernandez/pygtksheet | examples/complex_test.py | 1 | 11754 | import sys
sys.path += ['/usr/local/lib/python2.6/dist-packages/gtk-2.0']
import gtk
from gtk import gdk
import pango
import gtksheet
from bordercombo import BorderCombo
#from gtkextra import BorderCombo
#import gtkextra
class TestSheet(gtksheet.Sheet):
def __init__(self):
gtksheet.Sheet.__init__(self, 20,... | gpl-2.0 |
kdrone/crazyflie-python-client | lib/cflib/drivers/__init__.py | 40 | 1166 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 20... | gpl-2.0 |
ryfeus/lambda-packs | Tensorflow_Pandas_Numpy/source3.6/tensorflow/contrib/tpu/python/tpu/tpu.py | 14 | 22966 | # 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... | mit |
MattCCS/PyVault | site-packages/setuptools/lib2to3_ex.py | 907 | 1998 | """
Customized Mixin2to3 support:
- adds support for converting doctests
This module raises an ImportError on Python 2.
"""
from distutils.util import Mixin2to3 as _Mixin2to3
from distutils import log
from lib2to3.refactor import RefactoringTool, get_fixers_from_package
import setuptools
class DistutilsRefactorin... | mit |
Wattpad/luigi | test/contrib/redis_test.py | 76 | 2130 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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 |
creationix/gyp | pylib/gyp/MSVSSettings_test.py | 42 | 65827 | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for the MSVSSettings.py file."""
import StringIO
import unittest
import gyp.MSVSSettings as MSVSSettings
class TestSequence... | bsd-3-clause |
LightningZap/kernel_shamu-lz | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
michaelgallacher/intellij-community | python/lib/Lib/site-packages/django/core/servers/fastcgi.py | 289 | 6402 | """
FastCGI (or SCGI, or AJP1.3 ...) server that implements the WSGI protocol.
Uses the flup python package: http://www.saddi.com/software/flup/
This is a adaptation of the flup package to add FastCGI server support
to run Django apps from Web servers that support the FastCGI protocol.
This module can be run standalo... | apache-2.0 |
yan12125/youtube-dl | youtube_dl/extractor/bet.py | 64 | 2783 | from __future__ import unicode_literals
from .mtv import MTVServicesInfoExtractor
from ..utils import unified_strdate
class BetIE(MTVServicesInfoExtractor):
_VALID_URL = r'https?://(?:www\.)?bet\.com/(?:[^/]+/)+(?P<id>.+?)\.html'
_TESTS = [
{
'url': 'http://www.bet.com/news/politics/2014/... | unlicense |
nash-x/hws | nova/huawei/scheduler/filters/disk_filter.py | 1 | 2145 | # Copyright (c) 2012 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 |
hobarrera/django | django/core/cache/backends/memcached.py | 26 | 6953 | "Memcached cache backend"
import pickle
import time
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
from django.utils import six
from django.utils.encoding import force_str
from django.utils.functional import cached_property
class BaseMemcachedCache(BaseCache):
def __init__(self, server, ... | bsd-3-clause |
alxgu/ansible | test/units/modules/network/dellos6/dellos6_module.py | 52 | 2516 | # (c) 2016 Red Hat 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 version.
#
# Ansible is dis... | gpl-3.0 |
antepsis/anteplahmacun | sympy/matrices/expressions/determinant.py | 92 | 1848 | from __future__ import print_function, division
from sympy import Basic, Expr, S, sympify
from .matexpr import ShapeError
class Determinant(Expr):
"""Matrix Determinant
Represents the determinant of a matrix expression.
>>> from sympy import MatrixSymbol, Determinant, eye
>>> A = MatrixSymbol('A', ... | bsd-3-clause |
pglomski/shopnotes | drill_speed_chart.py | 1 | 2778 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''Produce a custom twist drill plot'''
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
plt.rc('text', usetex=True)
# set some rcParams
mpl.rcParams['font.weight'] = 'bold'
mpl.rcParams['xtick.major.pad'] = 10
mpl.rcParams['xtick.direction'] =... | agpl-3.0 |
sencha/chromium-spacewalk | third_party/markdown/extensions/abbr.py | 109 | 4690 | # markdown is released under the BSD license
# Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later)
# Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
# Copyright 2004 Manfred Stienstra (the original version)
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or... | bsd-3-clause |
eayunstack/python-neutronclient | neutronclient/tests/unit/fw/test_cli20_firewallpolicy.py | 3 | 10188 | # Copyright 2013 Big Switch Networks 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 r... | apache-2.0 |
robertnishihara/ray | python/ray/dashboard/dashboard.py | 1 | 37612 | try:
import aiohttp.web
except ImportError:
print("The dashboard requires aiohttp to run.")
import sys
sys.exit(1)
import argparse
import copy
import datetime
import errno
import json
import logging
import os
import platform
import threading
import time
import traceback
import yaml
import uuid
import g... | apache-2.0 |
raghavrv/scikit-learn | examples/decomposition/plot_pca_iris.py | 49 | 1511 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=========================================================
PCA example with Iris Data-set
=========================================================
Principal Component Analysis applied to the Iris dataset.
See `here <https://en.wikipedia.org/wiki/Iris_flower_data_set>`_ f... | bsd-3-clause |
crmorse/weewx-waterflow | bin/weedb/mysql.py | 1 | 9153 | #
# Copyright (c) 2012 Tom Keffer <tkeffer@gmail.com>
#
# See the file LICENSE.txt for your full rights.
#
# $Revision$
# $Author$
# $Date$
#
"""Driver for the MySQL database"""
import decimal
import MySQLdb
import _mysql_exceptions
from weeutil.weeutil import to_bool
import weedb
def connect(host='l... | gpl-3.0 |
yeming233/horizon | openstack_dashboard/test/integration_tests/tests/test_credentials.py | 2 | 3438 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 |
papaloizouc/peacehack | peacehack/theapp/migrations/0001_initial.py | 1 | 5492 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='CrazyObject',
fields=[
('id', models.AutoField(... | gpl-2.0 |
Hellowlol/PyTunes | libs/mako/ext/beaker_cache.py | 19 | 2393 | """Provide a :class:`.CacheImpl` for the Beaker caching system."""
from mako import exceptions
from mako.cache import CacheImpl
_beaker_cache = None
class BeakerCacheImpl(CacheImpl):
"""A :class:`.CacheImpl` provided for the Beaker caching system.
This plugin is used by default, based on the default
... | gpl-3.0 |
frankiecjunle/yunblog | venv/lib/python2.7/site-packages/pygments/lexers/hdl.py | 363 | 16209 | # -*- coding: utf-8 -*-
"""
pygments.lexers.hdl
~~~~~~~~~~~~~~~~~~~
Lexers for hardware descriptor languages.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, bygroups, include, using, t... | mit |
fangxingli/hue | desktop/core/ext-py/Django-1.6.10/django/contrib/staticfiles/handlers.py | 106 | 2440 | from django.conf import settings
from django.core.handlers.base import get_path_info
from django.core.handlers.wsgi import WSGIHandler
from django.utils.six.moves.urllib.parse import urlparse
from django.utils.six.moves.urllib.request import url2pathname
from django.contrib.staticfiles import utils
from django.contrib... | apache-2.0 |
ashishtilokani/Cloaking-Detection-Tool | googleBot/googleBot/spiders/scrape2.py | 1 | 1236 | from scrapy.selector import HtmlXPathSelector
from scrapy.spider import Spider
import html2text
import re
import os.path
class scrape(Spider):
name = "googleBot2"
start_urls = []
with open('/home/ashish/Desktop/CloakingDetectionTool/url.txt','r') as f:
for line in f:
l=line.replac... | mit |
caioserra/apiAdwords | examples/adspygoogle/dfp/v201302/creative_wrapper_service/update_creative_wrappers.py | 3 | 2479 | #!/usr/bin/python
#
# Copyright 2013 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 |
aioue/ansible | lib/ansible/modules/monitoring/zabbix_host.py | 35 | 22650 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013-2014, Epic Games, 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
# (... | gpl-3.0 |
qsnake/gmpy | test2/test_mpz_args.py | 12 | 1944 | # Test a wide variety of input values to the commonly used mpz operations.
# This test should be run whenever optimizations are made to the handling of
# arguments.
import sys
import gmpy2 as gmpy
if sys.version.startswith('3'):
intTypes = (int,)
else:
intTypes = (int, long)
def writeln(s):
sys.stdout.wr... | gpl-3.0 |
svenstaro/ansible | lib/ansible/modules/identity/ipa/ipa_hbacrule.py | 71 | 14942 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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 |
lihui7115/ChromiumGStreamerBackend | tools/telemetry/third_party/pyserial/serial/tools/miniterm.py | 145 | 27451 | #!/usr/bin/env python
# Very simple serial terminal
# (C)2002-2011 Chris Liechti <cliechti@gmx.net>
# Input characters are sent directly (only LF -> CR/LF/CRLF translation is
# done), received characters are displayed as is (or escaped trough pythons
# repr, useful for debug purposes)
import sys, os, serial, thread... | bsd-3-clause |
onitake/ansible | lib/ansible/modules/crypto/openssl_certificate.py | 7 | 44685 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016-2017, Yanis Guenane <yanis+ansible@guenane.org>
# (c) 2017, Markus Teufelberger <mteufelberger+ansible@mgit.at>
# 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_func... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.