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 |
|---|---|---|---|---|---|
aeijdenberg/certificate-transparency | python/ct/crypto/verify_test.py | 1 | 17248 | #!/usr/bin/env python
import gflags
import os
import sys
import unittest
from ct.crypto import cert
from ct.crypto import error
from ct.crypto import verify
from ct.proto import client_pb2
from ct.serialization import tls_message
import mock
FLAGS = gflags.FLAGS
gflags.DEFINE_string("testdata_dir", "../test/testdata... | apache-2.0 |
foursquare/pants | tests/python/pants_test/pants_run_integration_test.py | 1 | 20486 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import configparser
import glob
import os
import shutil
import unittest
from collections ... | apache-2.0 |
frodrigo/osmose-backend | analysers/analyser_merge_healthcare_FR_finess.py | 3 | 7042 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
###########################################################################
## ##
## Copyrights Frédéric Rodrigo 2018 ##
## ... | gpl-3.0 |
nitin-cherian/LifeLongLearning | Python/Experiments/JINJA/RealPython/jinja_env/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py | 359 | 33591 | from __future__ import absolute_import
import errno
import logging
import sys
import warnings
from socket import error as SocketError, timeout as SocketTimeout
import socket
try: # Python 3
from queue import LifoQueue, Empty, Full
except ImportError:
from Queue import LifoQueue, Empty, Full
# Queue is im... | mit |
jschaul/ComplexNetworkSim | examples/Skype_model/model_Skype.py | 1 | 4858 | '''Example model specification for a Skype-like system
@author: Joe Schaul <joe.schaul@gmail.com>
'''
import networkx as nx
from ComplexNetworkSim import NetworkSimulation, AnimationCreator, PlotCreator
from agent_skypeClient import DISABLED, ENABLED, ENABLED_S, DISABLED_S
from agent_skypeClient import Skype ... | bsd-2-clause |
Superjom/NeuralNetworks | logistic_regression.py | 1 | 3887 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on Feb 22, 2014
@author: Chunwei Yan @ PKU
@mail: yanchunwei@outlook.com
'''
import theano
import numpy
from theano import tensor as T
rng = numpy.random
class LogisticRegression(object):
'''
pass in the dataset as a matrix
'''
def __init__(se... | apache-2.0 |
omicsnut/bioconda-recipes | recipes/wtforms-components/setup.py | 63 | 2635 | """
WTForms-Components
------------------
Additional fields, validators and widgets for WTForms.
"""
from setuptools import setup
import os
import re
import sys
HERE = os.path.dirname(os.path.abspath(__file__))
PY3 = sys.version_info[0] == 3
def get_version():
filename = os.path.join(HERE, 'wtforms_components... | mit |
ruibarreira/linuxtrail | usr/lib/python2.7/lib-tk/Tkdnd.py | 198 | 11488 | """Drag-and-drop support for Tkinter.
This is very preliminary. I currently only support dnd *within* one
application, between different windows (or within the same window).
I an trying to make this as generic as possible -- not dependent on
the use of a particular widget or icon type, etc. I also hope that
this wi... | gpl-3.0 |
betoesquivel/fil2014 | build/django/build/lib.linux-x86_64-2.7/django/views/decorators/csrf.py | 228 | 2201 | from django.middleware.csrf import CsrfViewMiddleware, get_token
from django.utils.decorators import decorator_from_middleware, available_attrs
from functools import wraps
csrf_protect = decorator_from_middleware(CsrfViewMiddleware)
csrf_protect.__name__ = "csrf_protect"
csrf_protect.__doc__ = """
This decorator adds ... | mit |
Theer108/invenio | invenio/legacy/bibconvert/registry.py | 16 | 1654 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014, 2015 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 optio... | gpl-2.0 |
ghjm/ansible | lib/ansible/module_utils/common/_collections_compat.py | 115 | 1190 | # Copyright (c), Sviatoslav Sydorenko <ssydoren@redhat.com> 2018
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
"""Collections ABC import shim.
This module is intended only for internal use.
It will go away once the bundled copy of six includes equivalent fun... | gpl-3.0 |
surgebiswas/poker | PokerBots_2017/Johnny/scipy/optimize/nnls.py | 116 | 1423 | from __future__ import division, print_function, absolute_import
from . import _nnls
from numpy import asarray_chkfinite, zeros, double
__all__ = ['nnls']
def nnls(A, b):
"""
Solve ``argmin_x || Ax - b ||_2`` for ``x>=0``. This is a wrapper
for a FORTAN non-negative least squares solver.
Parameters... | mit |
jcai19/smm_gem5 | src/python/m5/util/attrdict.py | 84 | 3421 | # Copyright (c) 2006 The Regents of The University of Michigan
# 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 ... | bsd-3-clause |
jbair34/moose | framework/contrib/nsiqcppstyle/rules/RULE_6_1_A_do_not_omit_function_parameter_names.py | 43 | 5441 | """
Do not ommit function parameter names in the function declaration.
It checks function decls only.
== Violation ==
void functionA(int a, int); <== Violation. The second parameter int has no name.
void functionB(int ); <== Violation. The first parameter in has no name
== Good ==
void functionA(int a... | lgpl-2.1 |
ltilve/chromium | native_client_sdk/src/build_tools/build_projects.py | 19 | 11468 | #!/usr/bin/env python
# Copyright (c) 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 argparse
import multiprocessing
import os
import posixpath
import sys
import urllib2
import buildbot_common
import build_ve... | bsd-3-clause |
eliangidoni/rethinkdb | test/common/http_support/werkzeug/script.py | 147 | 11249 | # -*- coding: utf-8 -*-
r'''
werkzeug.script
~~~~~~~~~~~~~~~
.. admonition:: Deprecated Functionality
``werkzeug.script`` is deprecated without replacement functionality.
Python's command line support improved greatly with :mod:`argparse`
and a bunch of alternative modules.
Most ... | agpl-3.0 |
codrut3/tensorflow | tensorflow/python/keras/_impl/keras/layers/lstm_test.py | 16 | 13149 | # 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 |
cindyyu/kuma | vendor/packages/pygments/lexers/diff.py | 75 | 3243 | # -*- coding: utf-8 -*-
"""
pygments.lexers.diff
~~~~~~~~~~~~~~~~~~~~
Lexers for diff/patch formats.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, include, bygroups
from pygments.token import T... | mpl-2.0 |
sudheesh001/oh-mainline | vendor/packages/python-openid/openid/dh.py | 168 | 1608 | from openid import cryptutil
from openid import oidutil
def strxor(x, y):
if len(x) != len(y):
raise ValueError('Inputs to strxor must have the same length')
xor = lambda (a, b): chr(ord(a) ^ ord(b))
return "".join(map(xor, zip(x, y)))
class DiffieHellman(object):
DEFAULT_MOD = 15517289818147... | agpl-3.0 |
gaurav9991/hk | hooker_analysis/hooker_analysis.py | 2 | 25469 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#+---------------------------------------------------------------------------+
#| |
#| Android's Hooker |
#| ... | gpl-3.0 |
0x0aNL/p2pool-0x0a | p2pool/bitcoin/networks/kittehcoin.py | 10 | 1210 | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = 'c0c0c0c0'.decode('hex') #pchmessagestart
P2P_PORT = 22566
ADDRESS_VERSION = 45 #pubkey_address
RPC_PORT = 22565
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
... | gpl-3.0 |
DoubleNegativeVisualEffects/open-gto | python/gtoContainer/example.py | 6 | 2331 | #!/usr/bin/env python
#
# Copyright (C) 2004 Tweak Films
#
# This library 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 2 of
# the License, or (at your option) any later version.
#
# Th... | bsd-3-clause |
prdsmehmetstc/ozgurlukicin | tema/utils.py | 3 | 8292 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2007 TÜBİTAK UEKAE
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt.
from oi.settings import MEDIA_ROOT,MEDIA_URL
from django.core.cache import get_cache
from django.db.models.fields import FileField
i... | gpl-3.0 |
Navdy/lightblue-0.4 | src/mac/_IOBluetoothUI.py | 82 | 2076 | # Copyright (c) 2009 Bea Lam. All rights reserved.
#
# This file is part of LightBlue.
#
# LightBlue is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | gpl-3.0 |
ianlivingstone/PythonSQLEntity | db.py | 1 | 1138 | """
Database Module
Define your entities and indexes here, along with that handle connecting
to the database(s).
An example entity:
user = Entity('users', 'user_id', {
'username':'joe',
'password':'',
'passkey':'',
'join_date':0.0
})
user.add_index(Index(user,'username... | mit |
cafecivet/django_girls_tutorial | Lib/site-packages/django/db/models/aggregates.py | 89 | 2785 | """
Classes to represent the definitions of aggregate functions.
"""
from django.db.models.constants import LOOKUP_SEP
__all__ = [
'Aggregate', 'Avg', 'Count', 'Max', 'Min', 'StdDev', 'Sum', 'Variance',
]
def refs_aggregate(lookup_parts, aggregates):
"""
A little helper method to check if the lookup_part... | gpl-2.0 |
KaranToor/MA450 | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/compute/client_adapter.py | 2 | 4259 | # Copyright 2016 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... | apache-2.0 |
fulmicoton/pylearn2 | pylearn2/sandbox/cuda_convnet/tests/test_weight_acts.py | 44 | 5133 | from __future__ import print_function
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
from pylearn2.testing.skip import skip_if_no_gpu
skip_if_n... | bsd-3-clause |
adlai/p2pool | SOAPpy/SOAPBuilder.py | 289 | 22852 | """
################################################################################
# Copyright (c) 2003, Pfizer
# Copyright (c) 2001, Cayce Ullman.
# Copyright (c) 2001, Brian Matthews.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provid... | gpl-3.0 |
formath/mxnet | docs/mxdoc.py | 11 | 12953 | # 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 |
cloudnull/ansible | test/units/plugins/strategies/test_strategy_base.py | 62 | 14837 | # (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 |
m-vdb/github-buildservice-boilerplate | buildservice/tests/views/test_api.py | 1 | 3665 | from django.contrib.auth import get_user_model
from django.core.urlresolvers import reverse
from django.test import TestCase, Client, override_settings
from mock import patch
from buildservice.models import Build, Repository
from buildservice.utils.testing import create_user_token
@override_settings(BUILDSERVICE_API... | mit |
alsrgv/tensorflow | tensorflow/python/kernel_tests/sparse_tensor_dense_matmul_op_test.py | 16 | 16170 | # 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 |
mbonsma/studyGroup | lessons/python/matplotlib/hwk3.1.py | 12 | 2149 | # -*- coding: utf-8 -*-
from numpy import float32
from numpy import linspace
from numpy import polyfit
from numpy import polyval
import matplotlib.pyplot as plt
#Read in data from csv
f=open('data.csv','r')
line=f.readlines()
#Empty array for data
FN=[]
EFN=[]
#This loop goes through every line, strips new line chara... | apache-2.0 |
LingyuGitHub/codingofly | python/processmonitor/main.py | 1 | 2670 | #!/usr/bin/env python3
#########################################################################
# File Name: main.py
# Author: lingy
# Created Time: Fri 13 Jan 2017 11:32:15 AM CST
# Description:
#########################################################################
# -*- coding: utf-8 -*-
import... | gpl-3.0 |
mihaisoloi/conpaas | conpaas-services/contrib/libcloud/dns/drivers/route53.py | 5 | 11355 | # 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 ... | bsd-3-clause |
JioCloud/nova_test_latest | nova/tests/unit/servicegroup/test_zk_driver.py | 59 | 4183 | # Copyright (c) AT&T 2012-2013 Yun Mao <yunmao@gmail.com>
# Copyright 2012 IBM Corp.
#
# 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 |
chrismbarnes/ndnSIM | doc/manual/source/conf.py | 75 | 7047 | # -*- coding: utf-8 -*-
#
# ns-3 documentation build configuration file, created by
# sphinx-quickstart on Tue Dec 14 09:00:39 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All co... | gpl-2.0 |
tumbl3w33d/ansible | lib/ansible/parsing/splitter.py | 49 | 11324 | # (c) 2014 James Cammarata, <jcammarata@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... | gpl-3.0 |
stefanweller/ansible-modules-extras | cloud/amazon/ecs_taskdefinition.py | 60 | 7958 | #!/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 |
lmEshoo/st2contrib | packs/cubesensors/sensors/measurements_sensor.py | 2 | 5791 | import time
from rauth import OAuth1Session
from st2common.util import isotime
from st2reactor.sensor.base import PollingSensor
__all__ = [
'CubeSensorsMeasurementsSensor'
]
BASE_URL = 'https://api.cubesensors.com/v1'
FIELD_CONVERT_FUNCS = {
'temp': lambda value: (float(value) / 100)
}
class CubeSensorsMe... | apache-2.0 |
IPMITMO/statan | coala-bears/bears/general/FilenameBear.py | 1 | 4829 | import os.path
from coalib.bears.LocalBear import LocalBear
from coalib.results.Diff import Diff
from coalib.results.Result import Result
from coalib.bearlib.naming_conventions import (
to_camelcase, to_kebabcase, to_pascalcase, to_snakecase, to_spacecase)
class FilenameBear(LocalBear):
LANGUAGES = {'All'}
... | mit |
dmr/validictory | validictory/tests/test_properties.py | 12 | 8736 | from unittest import TestCase
import validictory
class TestProperties(TestCase):
props = {
"prop01": {"type": "string"},
"prop02": {"type": "number", "required": False},
"prop03": {"type": "integer"},
"prop04": {"type": "boolean"},
"prop05": {
"type": "object",... | mit |
kshmirko/sage-reader | convert/converter.py | 1 | 15858 | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 19 10:55:22 2014
@author: Администратор
"""
import netCDF4 as nc
from datetime import datetime, timedelta
import numpy as np
from sage2.sageIItypes import _INDEX, _SPECITEM
import h5py as h5
class NCPack:
def __init__(self, path, format='NETCDF4', ... | gpl-3.0 |
kybriainfotech/iSocioCRM | addons/google_calendar/__openerp__.py | 299 | 1671 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2012 OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 |
WSCU/crazyflie_ros | src/cfclient/ui/dialogs/connectiondialogue.py | 22 | 3978 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 20... | gpl-2.0 |
Edraak/edraak-platform | common/lib/xmodule/setup.py | 5 | 3180 | from setuptools import find_packages, setup
XMODULES = [
"book = xmodule.backcompat_module:TranslateCustomTagDescriptor",
"chapter = xmodule.seq_module:SectionDescriptor",
"conditional = xmodule.conditional_module:ConditionalDescriptor",
"course = xmodule.course_module:CourseDescriptor",
"customtag... | agpl-3.0 |
an7oine/WinVHS | Cygwin/lib/python2.7/xml/dom/xmlbuilder.py | 239 | 12337 | """Implementation of the DOM Level 3 'LS-Load' feature."""
import copy
import xml.dom
from xml.dom.NodeFilter import NodeFilter
__all__ = ["DOMBuilder", "DOMEntityResolver", "DOMInputSource"]
class Options:
"""Features object that has variables set for each DOMBuilder feature.
The DOMBuilder class uses a... | gpl-3.0 |
flwh/KK_mt6589_iq451 | prebuilts/python/linux-x86/2.7.5/lib/python2.7/test/test_contains.py | 136 | 3153 | from test.test_support import have_unicode, run_unittest
import unittest
class base_set:
def __init__(self, el):
self.el = el
class set(base_set):
def __contains__(self, el):
return self.el == el
class seq(base_set):
def __getitem__(self, n):
return [self.el][n]
class TestConta... | gpl-2.0 |
PKRoma/isapi-wsgi | setup.py | 5 | 1211 |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
try:
from distutils.command.build_py import build_py_2to3 as build_py
except ImportError:
from distutils.command.build_py import build_py
try:
from distutils.command.build_scripts import build_scripts_2to3 as bui... | mit |
bplancher/odoo | addons/website_blog/models/website_blog.py | 12 | 12111 | # -*- coding: utf-8 -*-
from datetime import datetime
import lxml
import random
from openerp import tools
from openerp import SUPERUSER_ID
from openerp.addons.website.models.website import slug
from openerp.osv import osv, fields
from openerp.tools.translate import _
from openerp.tools.translate import html_translate... | agpl-3.0 |
bplancher/odoo | addons/stock/wizard/make_procurement_product.py | 10 | 4813 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.osv import fields, osv
class make_procurement(osv.osv_memory):
_name = 'make.procurement'
_description = 'Make Procurements'
def onchange_product_id(self, cr, uid, ids, prod_id, context=N... | agpl-3.0 |
synexxus/synnix | scripts/tracing/draw_functrace.py | 14676 | 3560 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... | gpl-2.0 |
elkingtowa/alphacoin | Bitcoin/ngcccbase-master/ngcccbase/tests/test_asset.py | 5 | 7711 | #!/usr/bin/env python
import unittest
from coloredcoinlib import OBColorDefinition, ColorSet, SimpleColorValue, IncompatibleTypesError
from coloredcoinlib.tests.test_colorset import MockColorMap
from coloredcoinlib.tests.test_txspec import MockUTXO
from ngcccbase.asset import (AssetDefinition, AdditiveAssetValue,
... | mit |
witgo/spark | examples/src/main/python/mllib/latent_dirichlet_allocation_example.py | 27 | 2150 | #
# 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 |
sgraham/nope | third_party/tlslite/tlslite/utils/openssl_rsakey.py | 200 | 4670 | # Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""OpenSSL/M2Crypto RSA implementation."""
from .cryptomath import *
from .rsakey import *
from .python_rsakey import Python_RSAKey
#copied from M2Crypto.util.py, so when we load the local copy of m2
#we can still use i... | bsd-3-clause |
geodynamics/pylith | tests/libtests/feassemble/data/obsolete/ElasticityImplicitLgDeform.py | 1 | 2844 | #!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University of Chicago
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://ge... | mit |
mandli/multilayer-examples | 1d/setplot_shelf.py | 1 | 12827 |
"""
Set up the plot figures, axes, and items to be done for each frame.
This module is imported by the plotting routines and then the
function setplot is called to set the plot parameters.
"""
import numpy as np
# Plot customization
import matplotlib
# Markers and line widths
matplotlib.rcParams['lines.line... | mit |
CLVsol/odoo_addons | clv_insurance_client/wkf/clv_insurance_client_wkf.py | 1 | 2636 | # -*- encoding: utf-8 -*-
################################################################################
# #
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol #
# ... | agpl-3.0 |
iemejia/incubator-beam | sdks/python/apache_beam/internal/gcp/json_value.py | 3 | 6107 | #
# 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 |
catacgc/ansible-modules-core | cloud/linode/linode.py | 60 | 17838 | #!/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 |
denisenkom/django | django/db/backends/mysql/client.py | 84 | 1380 | import os
import sys
from django.db.backends import BaseDatabaseClient
class DatabaseClient(BaseDatabaseClient):
executable_name = 'mysql'
def runshell(self):
settings_dict = self.connection.settings_dict
args = [self.executable_name]
db = settings_dict['OPTIONS'].get('db', settings_... | bsd-3-clause |
ivanbusthomi/inasafe | safe_extras/simplejson/encoder.py | 89 | 24688 | """Implementation of JSONEncoder
"""
from __future__ import absolute_import
import re
from operator import itemgetter
from decimal import Decimal
from .compat import u, unichr, binary_type, string_types, integer_types, PY3
def _import_speedups():
try:
from . import _speedups
return _speedups.encode_... | gpl-3.0 |
totallybradical/temp_servo2 | tests/wpt/harness/wptrunner/wptmanifest/backends/static.py | 190 | 6645 | # 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 operator
from ..node import NodeVisitor
from ..parser import parse
class Compiler(NodeVisitor):
"""Compile... | mpl-2.0 |
hofschroeer/shinysdr | shinysdr/web.py | 1 | 33243 | # Copyright 2013, 2014, 2015 Kevin Reid <kpreid@switchb.org>
#
# This file is part of ShinySDR.
#
# ShinySDR 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 opt... | gpl-3.0 |
transientskp/aartfaac-arthur | arthur/stream.py | 1 | 2792 | import os
from casacore.images import image as casa_image
from PIL import Image
import subprocess
import time
import monotonic
import logging
import atexit
logger = logging.getLogger(__name__)
FPS = 25
cmd = ["ffmpeg",
# for ffmpeg always first set input then output
# silent audio
'-f', 'lavfi'... | gpl-3.0 |
ktkirk/HSSI | IoT/requests/packages/chardet/escprober.py | 2936 | 3187 | ######################## 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... | bsd-2-clause |
DataDog/py-find-injection | setup.py | 2 | 1235 | from setuptools import setup, find_packages
setup(
name="py-find-injection",
version="0.1.1",
author="James Brown",
author_email="jbrown@uber.com",
url="https://github.com/uber/py-find-injection",
description="simple python ast consumer which searches for common SQL injection attacks",
lic... | mit |
picardie-nature/clicnat-qgis | __init__.py | 1 | 1557 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
Clicnat
A QGIS plugin
Plugin Clicnat
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
-------------------
begin ... | gpl-2.0 |
indashnet/InDashNet.Open.UN2000 | android/build/tools/fileslist.py | 14 | 1299 | #!/usr/bin/env python
#
# Copyright (C) 2009 The Android Open Source Project
#
# 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 req... | apache-2.0 |
no2a/ansible | lib/ansible/plugins/callback/timer.py | 6 | 1141 | # Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from datetime import datetime
from ansible.plugins.callback import CallbackBase
class CallbackModule(CallbackBase):
"""
This callback module tells you how long your plays ran for.
"""
... | gpl-3.0 |
le9i0nx/ansible | lib/ansible/modules/storage/zfs/zfs.py | 33 | 9335 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2013, Johan Wiren <johan.wiren.se@gmail.com>
# Copyright: (c) 2017, 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__ = t... | gpl-3.0 |
kamalx/edx-platform | openedx/core/djangoapps/credit/tests/test_models.py | 5 | 3016 | # -*- coding: utf-8 -*-
"""
Tests for credit course models.
"""
import ddt
from django.test import TestCase
from opaque_keys.edx.keys import CourseKey
from openedx.core.djangoapps.credit.models import CreditCourse, CreditRequirement
@ddt.ddt
class CreditEligibilityModelTests(TestCase):
"""
Tests for credit... | agpl-3.0 |
gotlium/django-geoip-redis | geoip/management/commands/update_geo_db.py | 1 | 2560 | # -*- coding: utf-8 -*-
import thread
import time
import sys
import os
from django.contrib.contenttypes.models import ContentType
from django.core.management.base import NoArgsCommand
from django.core.management import call_command
from django.utils.termcolors import colorize
from requests import get
from geoip.red... | gpl-3.0 |
prakritish/ansible | test/sanity/code-smell/ansible-var-precedence-check.py | 27 | 18559 | #!/usr/bin/env python
# A tool to check the order of precedence for ansible variables
# https://github.com/ansible/ansible/blob/devel/test/integration/test_var_precedence.yml
import json
import os
import sys
import shutil
import stat
import subprocess
import tempfile
import yaml
from pprint import pprint
from optpars... | gpl-3.0 |
GuillaumeBadi/Python-App-Engine | lib/requests/packages/chardet/langhebrewmodel.py | 2763 | 11318 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Simon Montagu
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved... | apache-2.0 |
sclabs/sccms-nonrel | django/core/management/commands/shell.py | 230 | 3263 | import os
from django.core.management.base import NoArgsCommand
from optparse import make_option
class Command(NoArgsCommand):
option_list = NoArgsCommand.option_list + (
make_option('--plain', action='store_true', dest='plain',
help='Tells Django to use plain Python, not IPython.'),
)
... | bsd-3-clause |
dominjune/LintCode | Triangle Count.py | 4 | 1265 | """
Given an array of integers, how many three numbers can be found in the array, so that we can build an triangle whose
three edges length is the three numbers that we find?
Example
Given array S = [3,4,6,7], return 3. They are:
[3,4,6]
[3,6,7]
[4,6,7]
Given array S = [4,4,4,4], return 4. They are:
[4(1),4(2),4(3)]... | apache-2.0 |
pombredanne/MOG | nova/tests/integrated/v3/test_extended_volumes.py | 11 | 6023 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | apache-2.0 |
cherrygirl/micronaet7 | product_adr/__openerp__.py | 1 | 1595 | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | agpl-3.0 |
BMJHayward/numpy | numpy/distutils/intelccompiler.py | 20 | 3054 | from __future__ import division, absolute_import, print_function
from distutils.unixccompiler import UnixCCompiler
from numpy.distutils.exec_command import find_executable
from numpy.distutils.msvc9compiler import MSVCCompiler
from numpy.distutils.ccompiler import simple_version_match
class IntelCCompiler(UnixCCompi... | bsd-3-clause |
thaumos/ansible | lib/ansible/modules/cloud/vmware/vmware_guest_find.py | 16 | 4730 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, 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',
... | gpl-3.0 |
gwindes/three.js | utils/exporters/blender/addons/io_three/exporter/io.py | 201 | 2836 | import os
import shutil
from .. import constants, logger
from . import _json
def copy_registered_textures(dest, registration):
"""Copy the registered textures to the destination (root) path
:param dest: destination directory
:param registration: registered textures
:type dest: str
:type registrat... | mit |
TommasoPadovan/Baobab | baobab_nifti/baobab-usingNifti.py | 1 | 2095 | from nifti import NiftiImage
from datetime import datetime
prima=datetime.now()
#FLAGS
#############################
background_threshold=25 #
reverse_YAxis=True #
#############################
nim=NiftiImage("cervello")
print "Processing '%s'" %nim.filename,
nim.load()
d=nim.extent #genearatin a 4-upl... | mit |
mastizada/kuma | vendor/packages/Babel/babel/__init__.py | 71 | 1333 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2008 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.
#
# This software consists... | mpl-2.0 |
jaja14/project4 | lib/werkzeug/local.py | 310 | 14094 | # -*- coding: utf-8 -*-
"""
werkzeug.local
~~~~~~~~~~~~~~
This module implements context-local objects.
:copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from functools import update_wrapper
from werkzeug.wsgi import ClosingIt... | apache-2.0 |
majidaldo/ansible | lib/ansible/utils/module_docs_fragments/files.py | 37 | 2379 | # (c) 2014, Matt Martz <matt@sivel.net>
#
# 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 |
cryptobanana/ansible | lib/ansible/modules/network/mlnxos/mlnxos_mlag_ipl.py | 1 | 6810 | #!/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 |
martastain/dc-caspar | actions.py | 1 | 6436 | import os
import json
import time
from caspar import CasparServer
SESSION_DIR = "sessions"
KEYS = {
"LG01" : 20,
"LG02" : 21,
"LG03" : 22,
"LG04" : 23,
"LG05" : 16,
"LG06" : 17,
"LG07" : 18,
"LG08" : 19,
"LG09" : 12,
"LG10" : 13,
"LG11" : 14,
"L... | mit |
camptocamp/QGIS | python/plugins/processing/algs/VectorLayerHistogram.py | 1 | 2809 | # -*- coding: utf-8 -*-
"""
***************************************************************************
EquivalentNumField.py
---------------------
Date : January 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
*******************... | gpl-2.0 |
camptocamp/QGIS | python/plugins/GdalTools/tools/widgetBatchBase.py | 2 | 5310 | # -*- coding: utf-8 -*-
"""
***************************************************************************
widgetBatchBase.py
---------------------
Date : June 2010
Copyright : (C) 2010 by Giuseppe Sucameli
Email : brush dot tyler at gmail dot com
************... | gpl-2.0 |
IRSO/irsosav | nodejs.git/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py | 2779 | 1665 | # 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.
"""gypsh output module
gypsh is a GYP shell. It's not really a generator per se. All it does is
fire up an interactive Python session with a few local variables... | gpl-3.0 |
microelly2/cadquery-freecad-module | CadQuery/Libs/pygments/lexers/matlab.py | 72 | 29146 | # -*- coding: utf-8 -*-
"""
pygments.lexers.matlab
~~~~~~~~~~~~~~~~~~~~~~
Lexers for Matlab and related languages.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, bygroups, word... | lgpl-3.0 |
pwz3n0/pinball | pinball/persistence/token_data.py | 6 | 1860 | # Copyright 2015, Pinterest, 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 agreed to in writ... | apache-2.0 |
scode/pants | src/python/pants/backend/jvm/tasks/jvm_compile/scala/zinc_analysis.py | 9 | 2544 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from zinc... | apache-2.0 |
CyanogenMod/lge-kernel-omap4 | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | 1935 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... | gpl-2.0 |
LubyRuffy/spiderfoot | ext/stem/descriptor/remote.py | 12 | 26854 | # Copyright 2013-2015, Damian Johnson and The Tor Project
# See LICENSE for licensing information
"""
Module for remotely retrieving descriptors from directory authorities and
mirrors. This is most easily done through the
:class:`~stem.descriptor.remote.DescriptorDownloader` class, which issues
:class:`~stem.descripto... | gpl-2.0 |
alkemics/luigi | examples/foo_complex.py | 8 | 1870 | # -*- 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 |
Ormod/zookeeper | src/contrib/monitoring/test.py | 114 | 8195 | #! /usr/bin/env python
# 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 |
drawks/ansible | test/units/modules/network/aireos/test_aireos_config.py | 68 | 5363 | #
# (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 d... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.