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 |
|---|---|---|---|---|---|
hooman/swift | benchmark/scripts/compare_perf_tests.py | 10 | 16354 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ===--- compare_perf_tests.py -------------------------------------------===//
#
# 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... | apache-2.0 |
jiumutazhao/Flask-web-Development | app/models.py | 1 | 1264 | from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from . import db, login_manager
class Role(db.Model):
__tablename__ = 'roles'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64), unique=True)
users = db.relationship('U... | mit |
jonhadfield/ansible | test/units/executor/test_play_iterator.py | 44 | 4158 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 |
ButterflyNetwork/bazel | third_party/py/abseil/absl/flags/_flagvalues.py | 15 | 45530 | # Copyright 2017 The Abseil 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | apache-2.0 |
aschampion/CATMAID | django/applications/catmaid/control/roi.py | 5 | 9438 | import json
import os.path
from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import redirect
from django.core.cache import cache
from catmaid.control import cropping
from catmaid.control.authentication import requires_user_role
from catmaid.control.common import urljoin
from ... | gpl-3.0 |
sporttech/phantomjs | src/breakpad/src/tools/gyp/test/defines/gyptest-defines-env-regyp.py | 151 | 1312 | #!/usr/bin/env 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.
"""
Verifies build of an executable with C++ define specified by a gyp define, and
the use of the environment during regeneration when the g... | bsd-3-clause |
senthil10/scilifelab | scilifelab/pm/__init__.py | 4 | 1657 | """
Project Management Tools
"""
__import__('pkg_resources').declare_namespace(__name__)
import os
import sys
import re
import argparse
import textwrap
import subprocess
from cStringIO import StringIO
from cement.core import foundation, controller, handler, backend, output, hook
from scilifelab.pm.core import comma... | mit |
MathieuR/ardupilot | Tools/autotest/apm_unit_tests/dev/arducopter_AP_Limits.py | 227 | 2098 | import arducopter
import util, pexpect, sys, time, math, shutil, os
from common import *
import mavutil, mavwp, random
def unit_test(mavproxy, mav):
'''A scripted flight plan for testing AP_Limits'''
time.sleep(5)
print "# Setting AP_Limits parameters"
mavproxy.send('param set LIM_ENABLED 1\n')
... | gpl-3.0 |
mshafiq9/django | tests/template_tests/test_response.py | 199 | 14388 | from __future__ import unicode_literals
import pickle
import time
from datetime import datetime
from django.conf import settings
from django.template import Context, engines
from django.template.response import (
ContentNotRenderedError, SimpleTemplateResponse, TemplateResponse,
)
from django.test import (
Re... | bsd-3-clause |
KrzyHonk/bpmn-python | bpmn_python/graph/classes/root_element/callable_element_type.py | 2 | 1075 | # coding=utf-8
"""
Class used for representing tCallableElement of BPMN 2.0 graph
"""
import graph.classes.root_element.root_element_type as root_element
class CallableElement(root_element.RootElement):
"""
Class used for representing tCallableElement of BPMN 2.0 graph.
"""
def __init__(self):
... | gpl-3.0 |
capitalone/cloud-custodian | tests/test_simpledb.py | 1 | 1242 | # Copyright 2016-2017 Capital One Services, LLC
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from .common import BaseTest
class SimpleDB(BaseTest):
def test_delete(self):
session_factory = self.replay_flight_data("test_simpledb_delete")
p = self.load_policy(
... | apache-2.0 |
sputnick-dev/weboob | modules/gdfsuez/module.py | 7 | 3510 | # -*- coding: utf-8 -*-
# Copyright(C) 2013 Mathieu Jourdan
#
# This file is part of weboob.
#
# weboob 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 Free Software Foundation, either version 3 of the License, or
# (at your op... | agpl-3.0 |
tysonclugg/django | tests/expressions_case/models.py | 55 | 2542 | from django.db import models
try:
from PIL import Image
except ImportError:
Image = None
class CaseTestModel(models.Model):
integer = models.IntegerField()
integer2 = models.IntegerField(null=True)
string = models.CharField(max_length=100, default='')
big_integer = models.BigIntegerField(nul... | bsd-3-clause |
alex/django-old | setup.py | 8 | 4087 | from distutils.core import setup
from distutils.command.install_data import install_data
from distutils.command.install import INSTALL_SCHEMES
import os
import sys
class osx_install_data(install_data):
# On MacOS, the platform-specific lib dir is /System/Library/Framework/Python/.../
# which is wrong. Python 2... | bsd-3-clause |
nkuhlen/replication-study-financial-macro | .mywaflib/waflib/Node.py | 3 | 19062 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2005-2010 (ita)
"""
Node: filesystem structure, contains lists of nodes
#. Each file/folder is represented by exactly one node.
#. Some potential class properties are stored on :py:class:`waflib.Build.BuildContext` : nodes to depend on, etc.
Unused class memb... | gpl-3.0 |
sexroute/commandergenius | project/jni/python/src/Lib/Bastion.py | 298 | 5744 | """Bastionification utility.
A bastion (for another object -- the 'original') is an object that has
the same methods as the original but does not give access to its
instance variables. Bastions have a number of uses, but the most
obvious one is to provide code executing in restricted mode with a
safe interface to an ... | lgpl-2.1 |
messagebird/python-rest-api | examples/voice_recording_view.py | 1 | 1148 | #!/usr/bin/env python
import messagebird
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
parser.add_argument('--callID', help='identifier for the call', type=str, required=True)
parser.add_argument('--legID', help='id... | bsd-2-clause |
mooniak/animager | src/genImages.py | 1 | 1174 | ### generate temporary images using GIT commits
### dependencies : imagemagick
import os
def genTempImage( gitImage, options,
outputName, outputExt, outputDir ):
os.system( 'convert ' + gitImage
+ ' ' + options
+ ' ' + outputDir
+ outputName
... | gpl-3.0 |
hlerebours/lambda-calculus | lambdax/builtins_as_lambdas.py | 1 | 2296 | """ Expose most of the built-in functions and classes but suffixed with '_λ'
and to be only used in λ-abstractions.
See module `lambdax.builtins_overridden` to keep built-in names and have a mixed behavior,
working as expected both inside and outside λ-abstractions.
"""
import builtins
from lambdax.lambda_calculus im... | mit |
ghchinoy/tensorflow | tensorflow/java/maven/tensorflow-android/update.py | 27 | 3972 | # 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 appl... | apache-2.0 |
aschampion/CATMAID | django/applications/catmaid/migrations/0042_add_reviewer_whitelist.py | 3 | 37027 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'ReviewerWhitelist'
db.create_table('reviewer_whitelist', ... | gpl-3.0 |
russss/Diamond | src/collectors/apcupsd/apcupsd.py | 31 | 3108 | # coding=utf-8
"""
Collects the complete status of most American Power Conversion Corp. (APC) UPSes
provided you have the apcupsd daemon installed, properly configured and
running. It can access status information from any APC UPS attached to the
localhost or attached to any computer on the network which is running
ap... | mit |
petewarden/tensorflow | tensorflow/python/debug/cli/cli_shared.py | 25 | 15940 | # 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 |
yannikbehr/spectroscopy | src/spectroscopy/flux/watcher.py | 2 | 17856 | #Copyright (C) Nial Peters 2014
#
#This file is part of plumetrack.
#
#plumetrack 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.
#
#plume... | gpl-3.0 |
nico202/pyNeMo | WorkerInit.py | 1 | 3502 | #!/usr/bin/env python2
# A worker. Waits for incoming connection on port 10666
# When data are received, process them, and sends back to host (using requests), port 10665
import web #Listen for requests
from libs.web import ip_port, get_self_ip
web.config.debug = False
import requests #Answer to requests when data ... | gpl-2.0 |
rotofly/odoo | addons/membership/wizard/membership_invoice.py | 380 | 3229 | # -*- 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 |
jpautom/scikit-learn | examples/text/document_clustering.py | 230 | 8356 | """
=======================================
Clustering text documents using k-means
=======================================
This is an example showing how the scikit-learn can be used to cluster
documents by topics using a bag-of-words approach. This example uses
a scipy.sparse matrix to store the features instead of ... | bsd-3-clause |
GrumpyPaw/google-appengine-wx-launcher | launcher/app.py | 28 | 8520 | #!/usr/bin/env 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 o... | apache-2.0 |
FireWRT/OpenWrt-Firefly-Libraries | staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python2.7/formatter.py | 252 | 14911 | """Generic output formatting.
Formatter objects transform an abstract flow of formatting events into
specific output events on writer objects. Formatters manage several stack
structures to allow various properties of a writer object to be changed and
restored; writers need not be able to handle relative changes nor an... | gpl-2.0 |
MyRookie/SentimentAnalyse | venv/lib/python2.7/site-packages/numpy/lib/ufunclike.py | 173 | 4844 | """
Module of functions that are like ufuncs in acting on arrays and optionally
storing results in an output array.
"""
from __future__ import division, absolute_import, print_function
__all__ = ['fix', 'isneginf', 'isposinf']
import numpy.core.numeric as nx
def fix(x, y=None):
"""
Round to nearest integer ... | mit |
minorua/QGIS | python/plugins/processing/core/defaultproviders.py | 45 | 1178 | # -*- coding: utf-8 -*-
"""
***************************************************************************
defaultproviders.py
---------------------
Date : May 2016
Copyright : (C) 2016 by Victor Olaya
Email : volayaf at gmail dot com
*************************... | gpl-2.0 |
lowrie/pyRouterJig | doc.py | 1 | 6098 | ###########################################################################
#
# Copyright 2015-2018 Robert B. Lowrie (http://github.com/lowrie)
#
# This file is part of pyRouterJig.
#
# pyRouterJig is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as publishe... | gpl-3.0 |
jollyroger/debian-buildbot | buildbot/status/progress.py | 2 | 12005 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 |
Jgarcia-IAS/ReporsitorioVacioOdoo | openerp/loglevels.py | 380 | 3930 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 |
goodwinnk/intellij-community | python/helpers/pydev/_pydev_bundle/pydev_ipython_console.py | 3 | 3684 | import traceback
import sys
from _pydev_bundle.pydev_console_utils import BaseInterpreterInterface
from _pydev_bundle.pydev_ipython_console_011 import get_pydev_frontend
from _pydevd_bundle.pydevd_constants import dict_iter_items
# Uncomment to force PyDev standard shell.
# raise ImportError()
#====================... | apache-2.0 |
c-amr/camr | stanfordnlp/unidecode/x016.py | 252 | 4140 | data = (
'kka', # 0x00
'kk', # 0x01
'nu', # 0x02
'no', # 0x03
'ne', # 0x04
'nee', # 0x05
'ni', # 0x06
'na', # 0x07
'mu', # 0x08
'mo', # 0x09
'me', # 0x0a
'mee', # 0x0b
'mi', # 0x0c
'ma', # 0x0d
'yu', # 0x0e
'yo', # 0x0f
'ye', # 0x10
'yee', # 0x11
'yi', # 0x12
'ya... | gpl-2.0 |
tadashi-aikawa/gemini | jumeaux/addons/judgement/same.py | 1 | 1698 | # -*- coding:utf-8 -*-
from owlmixin import OwlMixin, TList, TOption
from jumeaux.addons.judgement import JudgementExecutor
from jumeaux.addons.utils import when_filter
from jumeaux.logger import Logger
from jumeaux.models import JudgementAddOnPayload, JudgementAddOnReference
logger: Logger = Logger(__name__)
LOG_PR... | mit |
lisael/pg-django | django/test/simple.py | 1 | 16207 | import unittest as real_unittest
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models import get_app, get_apps
from django.db.models.loading import unregister_app
from django.test import _doctest as doctest
from django.test.utils import setup_test_environment, ... | bsd-3-clause |
t0in4/django | django/conf/locale/de/formats.py | 504 | 1100 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y'
TIME_FORMAT = 'H:i'
DATET... | bsd-3-clause |
edgarRd/incubator-airflow | tests/contrib/hooks/test_jira_hook.py | 15 | 1863 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 |
hecchi777/S3-SlaacSecuritySolution | impacket-0.9.11/impacket/testcases/dot11/test-RadioTap.py | 4 | 25693 | #!/usr/bin/env python
# sorry, this is very ugly, but I'm in python 2.5
import sys
sys.path.insert(0,"../..")
from dot11 import Dot11,Dot11Types,Dot11DataFrame,RadioTap
from ImpactPacket import Data
from binascii import hexlify
import unittest
class TestRadioTap(unittest.TestCase):
def setUp(self):
# Ra... | apache-2.0 |
bop/rango | lib/python2.7/site-packages/django/contrib/auth/tests/signals.py | 227 | 3278 | from django.contrib.auth import signals
from django.contrib.auth.models import User
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.test import TestCase
from django.test.client import RequestFactory
from django.test.utils import override_settings
@skipIfCustomUser
@override_settings(USE_TZ=Fa... | gpl-2.0 |
jallohm/django | tests/model_meta/results.py | 254 | 27061 | from .models import AbstractPerson, BasePerson, Person, Relating, Relation
TEST_RESULTS = {
'get_all_field_names': {
Person: [
'baseperson_ptr',
'baseperson_ptr_id',
'content_type_abstract',
'content_type_abstract_id',
'content_type_base',
... | bsd-3-clause |
spacewalkproject/spacewalk | backend/server/test/TestProxy.py | 14 | 1090 | #
# Copyright (c) 2008--2015 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | gpl-2.0 |
Ishiihara/kafka | tests/kafkatest/services/replica_verification_tool.py | 15 | 4103 | # 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 |
thunderhoser/GewitterGefahr | gewittergefahr/scripts/run_bwo_for_swirlnet.py | 1 | 11719 | """Runs backwards optimization on Swirlnet model."""
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
import argparse
import numpy
from keras import backend as K
from keras.models import load_model as load_keras_model
from gewittergefahr.deep_learning import model_interpretation
from gewittergefahr.deep_learning im... | mit |
shubhamgupta123/erpnext | erpnext/stock/doctype/item/item_dashboard.py | 4 | 1149 | from __future__ import unicode_literals
from frappe import _
def get_data():
return {
'heatmap': True,
'heatmap_message': _('This is based on stock movement. See {0} for details')\
.format('<a href="#query-report/Stock Ledger">' + _('Stock Ledger') + '</a>'),
'fieldname': 'item_code',
'non_standard_fieldna... | gpl-3.0 |
stefanv/scipy3 | scipy/sparse/sparsetools/coo.py | 2 | 8185 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 1.3.36
#
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
import _coo
import new
new_instancemethod = new.instancemethod
try:
_swig_property = property
exc... | bsd-3-clause |
akosyakov/intellij-community | python/helpers/pydev/pydev_ipython/matplotlibtools.py | 52 | 5401 |
import sys
backends = {'tk': 'TkAgg',
'gtk': 'GTKAgg',
'wx': 'WXAgg',
'qt': 'Qt4Agg', # qt3 not supported
'qt4': 'Qt4Agg',
'osx': 'MacOSX'}
# We also need a reverse backends2guis mapping that will properly choose which
# GUI support to activate based on the... | apache-2.0 |
jhaux/tensorflow | tensorflow/python/util/protobuf/compare_test.py | 165 | 19171 | # 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 |
tragiclifestories/django | django/forms/formsets.py | 362 | 17988 | from __future__ import unicode_literals
from django.core.exceptions import ValidationError
from django.forms import Form
from django.forms.fields import BooleanField, IntegerField
from django.forms.utils import ErrorList
from django.forms.widgets import HiddenInput
from django.utils import six
from django.utils.encodi... | bsd-3-clause |
karpathy/simple-amt | launch_hits.py | 2 | 1876 | import argparse, json
from boto.mturk.price import Price
from boto.mturk.question import HTMLQuestion
from boto.mturk.connection import MTurkRequestError
import simpleamt
if __name__ == '__main__':
parser = argparse.ArgumentParser(parents=[simpleamt.get_parent_parser()])
parser.add_argument('--hit_properties_fil... | mit |
caterzy/JackPlayer | TFTest/TFSaver_Meta.py | 1 | 1116 | # This Python file uses the following encoding: utf-8
__author__ = 'JackRao'
import tensorflow as tf
import os
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data", one_hot=True)
x = tf.placeholder(tf.float32, [None, 784])
W = tf.Variable(tf.zeros([784, 10]))
b =... | gpl-2.0 |
cohortfsllc/cohort-cocl2-sandbox | pnacl/unsupported/objdump-arm-canonicalizer.py | 12 | 1944 | #!/usr/bin/python
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A simple tool for making objdump's disassemble dumps
for arm more canonical.
If two binaries have been generated with an almost... | bsd-3-clause |
smurfix/HomEvenT | irrigation/rainman/models/__init__.py | 1 | 2120 | # -*- coding: utf-8 -*-
## Copyright © 2012, Matthias Urlichs <matthias@urlichs.de>
##
## 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 op... | gpl-3.0 |
dfang/odoo | addons/procurement_jit/__manifest__.py | 40 | 1102 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Just In Time Scheduling',
'version': '1.0',
'category': 'Warehouse',
'description': """
This module will automatically reserve the picking from stock when a sale order is confirmed
===========... | agpl-3.0 |
awkspace/ansible | test/units/modules/network/f5/test_bigip_gtm_topology_region.py | 17 | 4038 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import pytest
import sys
if sys.version_info < (2... | gpl-3.0 |
alexsmx/coto_frictionless | boilerplate/external/babel/messages/frontend.py | 67 | 51292 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
... | lgpl-3.0 |
strahlc/exaile | plugins/replaygain/__init__.py | 3 | 4405 | # Copyright (C) 2009-2010 Aren Olson
#
# 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)
# any later version.
#
# This program is distributed in the hope that... | gpl-2.0 |
simonwydooghe/ansible | lib/ansible/modules/net_tools/nios/nios_dns_view.py | 68 | 4192 | #!/usr/bin/python
# Copyright (c) 2018 Red Hat, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview... | gpl-3.0 |
efeguney/gemmlowp | meta/generators/transform_kernels_arm_32.py | 7 | 1385 | # Copyright 2016 The Gemmlowp 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 applicable... | apache-2.0 |
khosrow/metpx | sarracenia/sarra/plugins/msg_sundew_pxroute.py | 1 | 2902 | #!/usr/bin/env python3
"""
Implement message filtering based on a routing table from MetPX-Sundew.
Make it easier to feed clients exactly the same products with sarracenia,
that they are used to with sundew.
the pxrouting option must be set in the configuration before the on_message
plugin is configured, ... | gpl-2.0 |
jonlooney/jxmlease | jxmlease/_parsehandler.py | 1 | 8605 | #!/usr/bin/env python
# Copyright (c) 2015-2016, Juniper Networks, Inc.
# All rights reserved.
#
# Copyright (C) 2012 Martin Blech and individual contributors.
#
# See the LICENSE file for further information.
"""Internal module that provides a common parsing handler."""
from __future__ import absolute_import
from . i... | mit |
dmitry-r/incubator-airflow | tests/api/client/test_local_client.py | 20 | 5654 | # -*- coding: utf-8 -*-
#
# 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
... | apache-2.0 |
ff94315/hiwifi-openwrt-HC5661-HC5761 | staging_dir/host/lib/python2.7/test/test_datetime.py | 72 | 134923 | """Test date/time type.
See http://www.zope.org/Members/fdrake/DateTimeWiki/TestCases
"""
from __future__ import division
import sys
import pickle
import cPickle
import unittest
from test import test_support
from datetime import MINYEAR, MAXYEAR
from datetime import timedelta
from datetime import tzinfo
from datetim... | gpl-2.0 |
klahnakoski/TestFailures | pyLibrary/queries/containers/list_usingSQLite.py | 1 | 85283 | # encoding: utf-8
#
#
# 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/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import absolute_import
from _... | mpl-2.0 |
ThomasZh/legend-club-wxpub | foo/wx/xml_parser.py | 1 | 5757 | #!/usr/bin/env python
# _*_ coding: utf-8_*_
#
# Copyright 2016 planc2c.com
# thomas@time2box.com
#
# 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/LICENS... | apache-2.0 |
ClarkYan/msc-thesis | code/query_provider/get_key.py | 3 | 1185 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Author: ClarkYAN -*-
from flask import Flask, request
from werkzeug.utils import secure_filename
import os
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = 'keypair/'
app.config['ALLOWED_EXTENSIONS'] = set(['png', 'jpg', 'jpeg', 'gif', 'xls', 'xlsx', 'pdf', 'p'])... | apache-2.0 |
EmreAtes/spack | var/spack/repos/builtin/packages/xscope/package.py | 5 | 1727 | ##############################################################################
# Copyright (c) 2013-2018, 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 |
thaumos/ansible | hacking/aws_config/build_iam_policy_framework.py | 25 | 11861 | # Requires pandas, bs4, html5lib, and lxml
#
# Call script with the output from aws_resource_actions callback, e.g.
# python build_iam_policy_framework.py ['ec2:AuthorizeSecurityGroupEgress', 'ec2:AuthorizeSecurityGroupIngress', 'sts:GetCallerIdentity']
#
# The sample output:
# {
# "Version": "2012-10-17",
# "S... | gpl-3.0 |
lrocheWB/navitia | source/navitiacommon/navitiacommon/launch_exec.py | 12 | 3684 | # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public tr... | agpl-3.0 |
petermat/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py | 123 | 7521 | # Copyright (C) 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause |
dmS0Zq/ganeti_webmgr | ganeti_webmgr/django_test_tools/views.py | 3 | 9453 | # Copyright (C) 2011 Oregon State University et al.
#
# 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 |
Floobits/floobits-vim | plugin/floo/common/reactor.py | 2 | 4414 | import socket
import select
try:
from . import api, msg
from .. import editor
from ..common.exc_fmt import str_e, pp_e
from ..common.handlers import tcp_server
assert msg and tcp_server
except (ImportError, ValueError):
from floo.common.exc_fmt import str_e, pp_e
from floo.common.handlers i... | apache-2.0 |
edx/django-oauth2-provider | provider/oauth2/views.py | 1 | 6130 | from datetime import timedelta
import json
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpResponseBadRequest, HttpResponse
from django.urls import reverse
from django.views.generic import View
from provider import constants
from provider.oauth2.backends import BasicClientBackend, Re... | mit |
nexusz99/boto | boto/ec2/autoscale/activity.py | 152 | 3058 | # Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/
#
# 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, mod... | mit |
baidu/Paddle | python/paddle/fluid/tests/unittests/test_ir_graph.py | 5 | 4755 | # Copyright (c) 2018 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 app... | apache-2.0 |
evertonaleixo/tarp | DeepLearning/deep-belief-network-example.py | 1 | 1185 | # coding=utf-8
from sklearn.datasets import load_digits
from sklearn.cross_validation import train_test_split
from sklearn.metrics.classification import accuracy_score
import numpy as np
from dbn import SupervisedDBNClassification
# Loading dataset
digits = load_digits()
X, Y = digits.data, digits.target
# Data sc... | apache-2.0 |
oliverhr/odoo | openerp/addons/test_documentation_examples/tests/test_delegation.py | 366 | 1299 | # -*- coding: utf-8 -*-
from openerp.tests import common
class TestDelegation(common.TransactionCase):
def setUp(self):
super(TestDelegation, self).setUp()
env = self.env
record = env['delegation.parent'].create({
'child0_id': env['delegation.child0'].create({'field_0': 0}).id,... | agpl-3.0 |
abhattad4/Digi-Menu | django/contrib/gis/gdal/srs.py | 82 | 12095 | """
The Spatial Reference class, represents OGR Spatial Reference objects.
Example:
>>> from django.contrib.gis.gdal import SpatialReference
>>> srs = SpatialReference('WGS84')
>>> print(srs)
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY... | bsd-3-clause |
myarjunar/QGIS | python/plugins/processing/gui/ExtentSelectionPanel.py | 1 | 5956 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ExtentSelectionPanel.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
******************... | gpl-2.0 |
mrjaydee82/SinLessKernel-4.4.4 | toolchains/491/share/gdb/python/gdb/FrameIterator.py | 126 | 1577 | # Copyright (C) 2013-2014 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 |
waterponey/scikit-learn | sklearn/datasets/tests/test_base.py | 13 | 8907 | import os
import shutil
import tempfile
import warnings
import numpy
from pickle import loads
from pickle import dumps
from sklearn.datasets import get_data_home
from sklearn.datasets import clear_data_home
from sklearn.datasets import load_files
from sklearn.datasets import load_sample_images
from sklearn.datasets im... | bsd-3-clause |
bregman-arie/ansible | lib/ansible/modules/network/cnos/cnos_backup.py | 35 | 11398 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
#
# Copyright (C) 2017 Lenovo, 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 Licens... | gpl-3.0 |
Bismarrck/tensorflow | tensorflow/contrib/kernel_methods/python/kernel_estimators.py | 10 | 13797 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
sileht/deb-openstack-keystone | keystone/service.py | 1 | 21260 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# 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 requ... | apache-2.0 |
kevinmel2000/brython | www/src/Lib/sys.py | 2 | 5195 | # hack to return special attributes
from _sys import *
_getframe = Getframe
from javascript import JSObject
has_local_storage=__BRYTHON__.has_local_storage
has_session_storage = __BRYTHON__.has_session_storage
has_json=__BRYTHON__.has_json
brython_debug_mode = __BRYTHON__.debug
argv = ['__main__']
base_exec_prefix =... | bsd-3-clause |
iagcl/data_pipeline | tests/stream/test_json_oracle.py | 1 | 3105 | # 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 |
lesserwhirls/scipy-cwt | scipy/weave/examples/object.py | 12 | 1619 | """ Attribute and method access on Python objects from C++.
Note: std::cout type operations currently crash python...
Not sure what is up with this...
"""
import scipy.weave as weave
#----------------------------------------------------------------------------
# get/set attribute and call methods exampl... | bsd-3-clause |
aequitas/home-assistant | homeassistant/components/thingspeak/__init__.py | 7 | 1978 | """Support for submitting data to Thingspeak."""
import logging
from requests.exceptions import RequestException
import voluptuous as vol
from homeassistant.const import (
CONF_API_KEY, CONF_ID, CONF_WHITELIST, STATE_UNAVAILABLE, STATE_UNKNOWN)
from homeassistant.helpers import event, state as state_helper
import... | apache-2.0 |
telwertowski/QGIS | python/plugins/processing/algs/gdal/Datasources2Vrt.py | 4 | 4979 | # -*- coding: utf-8 -*-
"""
***************************************************************************
Datasources2Vrt.py
---------------------
Date : May 2015
Copyright : (C) 2015 by Luigi Pirelli
Email : luipir at gmail dot com
**************************... | gpl-2.0 |
otherness-space/myProject | my_project_001/lib/python2.7/site-packages/django/contrib/gis/geos/prototypes/__init__.py | 314 | 1305 | """
This module contains all of the GEOS ctypes function prototypes. Each
prototype handles the interaction between the GEOS library and Python
via ctypes.
"""
# Coordinate sequence routines.
from django.contrib.gis.geos.prototypes.coordseq import (create_cs, get_cs,
cs_clone, cs_getordinate, cs_setordinate, cs... | mit |
niltonlk/nest-simulator | pynest/nest/logic/hl_api_logic.py | 20 | 1815 | # -*- coding: utf-8 -*-
#
# hl_api_logic.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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, o... | gpl-2.0 |
Alwnikrotikz/visvis | backends/backend_gtk.py | 3 | 13118 | # -*- coding: utf-8 -*-
# Copyright (C) 2012, Robert Schroll
#
# Visvis is distributed under the terms of the (new) BSD License.
# The full license can be found in 'license.txt'.
""" The GTK backend.
"""
import os, sys
import visvis
from visvis import BaseFigure, events, constants
from visvis.core.misc import getRes... | bsd-3-clause |
person142/scipy | scipy/linalg/tests/test_sketches.py | 9 | 3968 | """Tests for _sketches.py."""
import numpy as np
from numpy.testing import assert_, assert_equal
from scipy.linalg import clarkson_woodruff_transform
from scipy.linalg._sketches import cwt_matrix
from scipy.sparse import issparse, rand
from scipy.sparse.linalg import norm
class TestClarksonWoodruffTransform(object):... | bsd-3-clause |
tpbarron/rlflow | rlflow/memories/experience_replay.py | 1 | 1772 | import collections
import random
import numpy as np
class ExperienceReplay(object):
SARS = collections.namedtuple('SARS', ['S1', 'A', 'R', 'S2', 'T'])
def __init__(self, state_shape=(1,), max_size=1000000):
self.max_size = max_size
self.cur_size = 0
self.next_ind = 0
self.S1 ... | mit |
it-projects-llc/misc-addons | odoo_backup_sh/models/res_config_settings.py | 1 | 2915 | # Copyright 2019 Dinar Gabbasov <https://it-projects.info/team/GabbasovDinar>
# Copyright 2019 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# License MIT (https://opensource.org/licenses/MIT).
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.confi... | mit |
berendkleinhaneveld/VTK | ThirdParty/Twisted/twisted/test/test_jelly.py | 30 | 18360 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for L{jelly} object serialization.
"""
import datetime
import decimal
from twisted.spread import jelly, pb
from twisted.trial import unittest
from twisted.test.proto_helpers import StringTransport
class TestNode(object, jelly.Je... | bsd-3-clause |
leva2020/cineco-admin | web/js/jquery.vectormaps/converter/simplifier.py | 234 | 5985 | import argparse
import sys
import os
from osgeo import ogr
from osgeo import osr
import anyjson
import shapely.geometry
import shapely.ops
import codecs
import time
format = '%.8f %.8f'
tolerance = 0.01
infile = '/Users/kirilllebedev/Maps/50m-admin-0-countries/ne_50m_admin_0_countries.shp'
outfile = 'map.shp'
# Open... | mit |
carlmw/oscar-wager | django/middleware/transaction.py | 447 | 1090 | from django.db import transaction
class TransactionMiddleware(object):
"""
Transaction middleware. If this is enabled, each view function will be run
with commit_on_response activated - that way a save() doesn't do a direct
commit, the commit is done when a successful response is created. If an
exc... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.