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 |
|---|---|---|---|---|---|
alsrgv/tensorflow | tensorflow/python/ops/linalg/linear_operator_diag.py | 2 | 9369 | # 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 |
walterbender/story | toolbar_utils.py | 1 | 5567 | # -*- coding: utf-8 -*-
# Copyright (c) 2011, Walter Bender
# Port To GTK3:
# Ignacio Rodriguez <ignaciorodriguez@sugarlabs.org>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 ... | gpl-3.0 |
tbjoern/adventofcode | Thirteen/refined.py | 1 | 2330 | import Queue
import time
import sys
if len(sys.argv) > 1:
try:
seed = int(sys.argv[1])
except ValueError, x:
seed = 1600
width, height = 40,41
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\03... | mit |
yeleman/health_ident | health_ident/management/commands/export_j2me.py | 1 | 2794 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
from __future__ import (unicode_literals, absolute_import,
division, print_function)
import os
import zipfile
from django.conf import settings
from optparse import make_option
from django.core.management.base import ... | unlicense |
sumihai-tekindo/account_sicepat | add_sub_menu/models/check_id.py | 1 | 1245 | from datetime import datetime
from openerp.osv import fields,osv
from openerp.tools.translate import _
class purchase_requisition_line(osv.osv):
_inherit = "purchase.requisition.line"
def stock_out(self, cr, uid, ids,stock_out):
if self.stock_out:
return {
'view_type': 'form',
'flags': {'a... | gpl-3.0 |
ajylee/gpaw-rtxs | doc/devel/parallelization.py | 3 | 3593 | #!/usr/bin/env python
import numpy as np
from gpaw.mpi import world
from gpaw.utilities.dscftools import mpi_debug
W = world.size
N = 32
assert N%W == 0
M = N//W
# Create my share of data
data = np.arange(world.rank*M, (world.rank+1)*M)
# Let's calculate the global sum
slocal = data.sum()
s = world.sum(slocal)
mp... | gpl-3.0 |
nkoep/blaplay | blaplay/formats/wav.py | 1 | 1831 | # blaplay, Copyright (C) 2012 Niklas Koep
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# This program is distribut... | gpl-2.0 |
OptiPop/external_chromium_org | tools/perf/page_sets/intl_es_fr_pt-BR.py | 34 | 1806 | # Copyright 2014 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.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class IntlEsFrPtBrPage(page_module.Page):
def __ini... | bsd-3-clause |
mbauskar/tele-erpnext | erpnext/setup/doctype/item_group/test_item_group.py | 90 | 6962 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import unittest
import frappe
from frappe.utils.nestedset import NestedSetRecursionError, NestedSetMultipleRootsError, \
NestedSetChildExistsError, Nes... | agpl-3.0 |
prutseltje/ansible | lib/ansible/modules/network/aci/aci_tenant_action_rule_profile.py | 12 | 6436 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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 |
HiroIshikawa/21playground | flask-rethink/env/lib/python3.5/site-packages/pip/compat/dictconfig.py | 921 | 23096 | # This is a copy of the Python logging.config.dictconfig module,
# reproduced with permission. It is provided here for backwards
# compatibility for Python versions prior to 2.7.
#
# Copyright 2009-2010 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# docu... | mit |
MickaelBergem/django-allauth | allauth/account/views.py | 3 | 26390 | from django.core.urlresolvers import reverse, reverse_lazy
from django.contrib.sites.models import Site
from django.http import (HttpResponseRedirect, Http404,
HttpResponsePermanentRedirect)
from django.views.generic.base import TemplateResponseMixin, View, TemplateView
from django.views.generi... | mit |
kaushik94/sympy | sympy/printing/tests/test_rcode.py | 7 | 14176 | from sympy.core import (S, pi, oo, Symbol, symbols, Rational, Integer,
GoldenRatio, EulerGamma, Catalan, Lambda, Dummy, Eq)
from sympy.functions import (Piecewise, sin, cos, Abs, exp, ceiling, sqrt,
gamma, sign, Max, Min, factorial, beta)
from sympy.sets import Range... | bsd-3-clause |
Pansanel/cloudkeeper-os | cloudkeeper_os/cloudkeeper_pb2_grpc.py | 2 | 6698 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
import cloudkeeper_pb2 as cloudkeeper__pb2
import google.protobuf.empty_pb2 as google_dot_protobuf_dot_empty__pb2
clas... | apache-2.0 |
40223205/w16b_test- | static/Brython3.1.1-20150328-091302/Lib/multiprocessing/util.py | 696 | 9917 | #
# Module providing various facilities to other parts of the package
#
# multiprocessing/util.py
#
# Copyright (c) 2006-2008, R Oudkerk
# Licensed to PSF under a Contributor Agreement.
#
import sys
import functools
import os
import itertools
import weakref
import atexit
import threading # we want threading to ... | agpl-3.0 |
gplepage/gvar | examples/svdcut.py | 1 | 2303 | """
svdcut.py --- Correlations and SVD Cuts
This code illustrates the use of SVD cuts when calculating
correlations using random samples. See the Case Study in the
documentation for more information.
"""
from __future__ import print_function
import numpy as np
import gvar as gv
try:
# may not be installed, in wh... | gpl-3.0 |
julen/django-allauth | allauth/socialaccount/providers/twitter/south_migrations/0004_auto__del_twitteraccount__del_twitterapp.py | 83 | 1925 | # encoding: utf-8
from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'TwitterAccount'
db.delete_table('twitter_twitteraccount')
# Deleting model 'TwitterApp'
db.delete_table('twitter_twi... | mit |
dvliman/jaikuengine | .google_appengine/lib/protorpc/protorpc/descriptor.py | 13 | 21761 | #!/usr/bin/env python
#
# Copyright 2010 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 |
smcoll/django-rules | tests/testsuite/contrib/test_views.py | 1 | 6234 | from __future__ import absolute_import
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import reverse
from django.http import HttpRequest, Http404
from django.test import TestCase
from django.utils.encoding import force_str
from rules.contrib.views import objectgetter
from testa... | mit |
hsuchie4/TACTIC | src/tactic/ui/panel/search_type_manager_wdg.py | 5 | 48401 | ###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... | epl-1.0 |
nihilus/epanos | pycparser/ply/lex.py | 482 | 40739 | # -----------------------------------------------------------------------------
# ply: lex.py
#
# Copyright (C) 2001-2011,
# 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... | mit |
bubenkoff/pytest | testing/python/metafunc.py | 11 | 31510 |
import pytest, py
from _pytest import python as funcargs
class TestMetafunc:
def Metafunc(self, func):
# the unit tests of this class check if things work correctly
# on the funcarg level, so we don't need a full blown
# initiliazation
class FixtureInfo:
name2fixturedef... | mit |
Sonicbids/django | django/template/loaders/base.py | 45 | 1708 | from django.template.base import Template, TemplateDoesNotExist
class Loader(object):
is_usable = False
# Only used to raise a deprecation warning. Remove in Django 2.0.
_accepts_engine_in_init = True
def __init__(self, engine):
self.engine = engine
def __call__(self, template_name, temp... | bsd-3-clause |
alex-ip/agdc | agdc/landsat_ingester/__main__.py | 1 | 2058 | #!/usr/bin/env python
# ===============================================================================
# Copyright (c) 2014 Geoscience Australia
# 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 |
vFense/vFenseAgent-nix | agent/deps/rpm/Python-2.7.5/lib/python2.7/httplib.py | 59 | 46985 | r"""HTTP/1.1 client library
<intro stuff goes here>
<other stuff, too>
HTTPConnection goes through a number of "states", which define when a client
may legally make another request or fetch the response for a particular
request. This diagram details these state transitions:
(null)
|
| HTTPConnection(... | lgpl-3.0 |
eLBati/odoo | addons/portal/mail_mail.py | 64 | 2342 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
Zeken/audacity | lib-src/lv2/lv2/plugins/eg-metro.lv2/waflib/Tools/kde4.py | 275 | 2007 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import os,sys,re
from waflib import Options,TaskGen,Task,Utils
from waflib.TaskGen import feature,after_method
@feature('msgfmt')
def apply_msgfmt(self):
for lang in self.to_... | gpl-2.0 |
levixie/zulip | zerver/lib/queue.py | 115 | 9789 | from __future__ import absolute_import
from django.conf import settings
import pika
import logging
import ujson
import random
import time
import threading
import atexit
from collections import defaultdict
from zerver.lib.utils import statsd
# This simple queuing library doesn't expose much of the power of
# rabbitmq... | apache-2.0 |
tinkerinestudio/Tinkerine-Suite | TinkerineSuite/python/Lib/email/feedparser.py | 114 | 20606 | # Copyright (C) 2004-2006 Python Software Foundation
# Authors: Baxter, Wouters and Warsaw
# Contact: email-sig@python.org
"""FeedParser - An email feed parser.
The feed parser implements an interface for incrementally parsing an email
message, line by line. This has advantages for certain applications, such as
thos... | agpl-3.0 |
archifix/settings | sublime/Packages/python-markdown/st3/markdown/postprocessors.py | 17 | 3615 | """
POST-PROCESSORS
=============================================================================
Markdown also allows post-processors, which are similar to preprocessors in
that they need to implement a "run" method. However, they are run after core
processing.
"""
from __future__ import absolute_import
from __futu... | mit |
TNT-Samuel/Coding-Projects | DNS Server/Source - Copy/Lib/site-packages/pygments/lexers/ecl.py | 31 | 5875 | # -*- coding: utf-8 -*-
"""
pygments.lexers.ecl
~~~~~~~~~~~~~~~~~~~
Lexers for the ECL language.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, words
from pygments.... | gpl-3.0 |
olof/debian-svtplay-dl | lib/svtplay_dl/service/mtvservices.py | 2 | 1220 | # ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
import copy
import re
import xml.etree.ElementTree as ET
from svtplay_dl.error import ServiceError
from svtplay_dl.fetcher.http import HTTP
from svtplay_dl.service import Service
class Mtvservices(Service):
supported_domains... | mit |
WillieMaddox/scipy | scipy/fftpack/tests/test_import.py | 5 | 1181 | """Test possibility of patching fftpack with pyfftw.
No module source outside of scipy.fftpack should contain an import of
the form `from scipy.fftpack import ...`, so that a simple replacement
of scipy.fftpack by the corresponding fftw interface completely swaps
the two FFT implementations.
Because this simply inspe... | bsd-3-clause |
GAMPTeam/vampyre | demos/mlp/randmlp.py | 1 | 3387 | # -*- coding: utf-8 -*-
"""
randmlp: Random MLP class definitions
@author: Sundeep
"""
import numpy as np
import pickle
"""
Randomly generated multilayer perceptron
"""
class RandomMLP:
"""
Constructor
"""
def __init__(self, nin, nhid, nout, sparse_tgt=[]):
# Get dimensions
self... | mit |
lukaszpiotr/pylama_with_gjslint | pylama/checkers/closure_linter/statetracker.py | 2 | 37219 | #!/usr/bin/env python
#
# Copyright 2007 The Closure Linter 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
#... | lgpl-3.0 |
jlongever/redfish-client-python | on_http_redfish_1_0/models/odata_4_0_0_context.py | 1 | 2489 | # coding: utf-8
"""
Copyright 2015 SmartBear Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applica... | apache-2.0 |
bobcyw/django | django/core/files/temp.py | 462 | 2950 | """
The temp module provides a NamedTemporaryFile that can be reopened in the same
process on any platform. Most platforms use the standard Python
tempfile.NamedTemporaryFile class, but Windows users are given a custom class.
This is needed because the Python implementation of NamedTemporaryFile uses the
O_TEMPORARY f... | bsd-3-clause |
RafaelRMachado/qtwebkit | Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py | 114 | 50422 | # Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
# Copyright (C) 2011 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following ... | gpl-2.0 |
yitian134/chromium | tools/valgrind/asan/asan_symbolize.py | 9 | 4634 | #!/usr/bin/env python
# Copyright (c) 2012 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 os
import re
import sys
import string
import subprocess
pipes = {}
vmaddrs = {}
# TODO(glider): need some refactoring her... | bsd-3-clause |
resmo/ansible | test/integration/targets/shell/connection_plugins/test_connection_override.py | 54 | 1109 | # Copyright (c) 2019 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
DOCUMENTATION = '''
connection: test_connection_override
short_description: test connection plugin u... | gpl-3.0 |
bearstech/ansible | lib/ansible/modules/windows/win_psmodule.py | 22 | 2932 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Daniele Lazzari <lazzari@mailup.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 ... | gpl-3.0 |
chand3040/cloud_that | common/djangoapps/util/password_policy_validators.py | 113 | 3665 | # pylint: disable=no-member
"""
This file exposes a number of password complexity validators which can be optionally added to
account creation
This file was inspired by the django-passwords project at https://github.com/dstufft/django-passwords
authored by dstufft (https://github.com/dstufft)
"""
from __future__ impor... | agpl-3.0 |
hlin117/scikit-learn | doc/sphinxext/github_link.py | 120 | 2672 | from operator import attrgetter
import inspect
import subprocess
import os
import sys
from functools import partial
REVISION_CMD = 'git rev-parse --short HEAD'
def _get_git_revision():
try:
revision = subprocess.check_output(REVISION_CMD.split()).strip()
except (subprocess.CalledProcessError, OSError... | bsd-3-clause |
elvishknight1/Terranova | venv/Lib/site-packages/pip/_vendor/requests/packages/chardet/euctwfreq.py | 3133 | 34872 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | artistic-2.0 |
mspark93/VTK | Rendering/Core/Testing/Python/stereoDresdenMace.py | 20 | 1959 | #!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Create the RenderWindow, Renderer and both Actors
#
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
renWin.StereoCapableWindowOn()
renWin.SetWindowN... | bsd-3-clause |
phracek/preupgrade-assistant | preupg/kickstart/application.py | 2 | 12249 | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
"""
Class creates a kickstart for migration scenario
"""
import base64
import shutil
import os
import imp
from pykickstart.constants import KS_MISSING_IGNORE, KS_SCRIPT_POST
from pykickstart.parser import KickstartParser, KickstartError,... | gpl-3.0 |
servioticy/servioticy-demo | cellphones-wp2demo/brain/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/dom.py | 505 | 1421 | from __future__ import absolute_import, division, unicode_literals
from xml.dom import Node
from . import _base
class TreeWalker(_base.NonRecursiveTreeWalker):
def getNodeDetails(self, node):
if node.nodeType == Node.DOCUMENT_TYPE_NODE:
return _base.DOCTYPE, node.name, node.publicId, node.sy... | apache-2.0 |
xz/cyber-security | api/api/problem_feedback.py | 9 | 2593 | """ Module for handling problem feedback """
import pymongo
import api
from datetime import datetime
from voluptuous import Schema, Required, Length
from api.common import validate, check, safe_fail, InternalException, SevereInternalException, WebException
from api.annotations import log_action
feedback_schema = S... | mit |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Tools/scripts/fixnotice.py | 30 | 3052 | #! /usr/bin/env python
"""(Ostensibly) fix copyright notices in files.
Actually, this script will simply replace a block of text in a file from one
string to another. It will only do this once though, i.e. not globally
throughout the file. It writes a backup file and then does an os.rename()
dance for atomicity.
U... | mit |
acarmel/CouchPotatoServer | libs/pio/api.py | 40 | 8474 | # -*- coding: utf-8 -*-
# Changed
# Removed iso8601 library requirement
# Added CP logging
import os
import re
import json
import webbrowser
from urllib import urlencode
from couchpotato import CPLog
from dateutil.parser import parse
import requests
BASE_URL = 'https://api.put.io/v2'
ACCESS_TOKEN_URL = 'https://api... | gpl-3.0 |
sogis/Quantum-GIS | python/plugins/processing/algs/qgis/RasterLayerStatistics.py | 10 | 4436 | # -*- coding: utf-8 -*-
"""
***************************************************************************
RasterLayerStatistics.py
---------------------
Date : January 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
****************... | gpl-2.0 |
mxjl620/scikit-learn | examples/manifold/plot_mds.py | 261 | 2616 | """
=========================
Multi-dimensional scaling
=========================
An illustration of the metric and non-metric MDS on generated noisy data.
The reconstructed points using the metric MDS and non metric MDS are slightly
shifted to avoid overlapping.
"""
# Author: Nelle Varoquaux <nelle.varoquaux@gmail.... | bsd-3-clause |
chongtianfeiyu/kbengine | kbe/res/scripts/common/Lib/site-packages/pip/_vendor/requests/status_codes.py | 695 | 3136 | # -*- coding: utf-8 -*-
from .structures import LookupDict
_codes = {
# Informational.
100: ('continue',),
101: ('switching_protocols',),
102: ('processing',),
103: ('checkpoint',),
122: ('uri_too_long', 'request_uri_too_long'),
200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'... | lgpl-3.0 |
dongritengfei/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/promptforbugortitle.py | 147 | 2253 | # Copyright (C) 2010 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 th... | bsd-3-clause |
lcostantino/healing-os | healing/tests/base.py | 22 | 1926 | # -*- coding: utf-8 -*-
# Copyright 2010-2011 OpenStack Foundation
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# 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
#
# htt... | apache-2.0 |
znegva/pelican-plugins | gzip_cache/test_gzip_cache.py | 11 | 1791 | # -*- coding: utf-8 -*-
'''Core plugins unit tests'''
import os
import tempfile
import unittest
from contextlib import contextmanager
from tempfile import mkdtemp
from shutil import rmtree
import gzip_cache
@contextmanager
def temporary_folder():
"""creates a temporary folder, return it and delete it afterwards... | agpl-3.0 |
kit-cel/gr-dab | apps/dab_rx_constellation.py | 1 | 6407 | #!/usr/bin/env python2
# -*- coding: utf8 -*-
# Andreas Müller, 2008
# andrmuel@ee.ethz.ch
#
# this code may be freely used under GNU GPL conditions
"""
demodulate DAB signal and ouput to constellation sink
"""
from gnuradio import gr, uhd, blocks
from gnuradio import eng_notation
from gnuradio.eng_option import eng... | gpl-3.0 |
nilmini20s/gem5-2016-08-13 | src/arch/x86/isa/insts/simd128/integer/arithmetic/__init__.py | 91 | 2477 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | bsd-3-clause |
OptimusGitEtna/RestSymf | Python-3.4.2/Lib/lib2to3/tests/data/py2_test_grammar.py | 285 | 30980 | # Python test set -- part 1, grammar.
# This just tests whether the parser accepts them all.
# NOTE: When you run this test as a script from the command line, you
# get warnings about certain hex/oct constants. Since those are
# issued by the parser, you can't suppress them by adding a
# filterwarnings() call to this... | mit |
SnakeJenny/TensorFlow | tensorflow/tools/docs/pretty_docs.py | 12 | 7882 | # 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 |
tiancj/emesene | emesene/e3/papylib/papyon/papyon/sip/extensions/ms_epid.py | 6 | 1242 | # -*- coding: utf-8 -*-
#
# papyon - a python client library for Msn
#
# Copyright (C) 2010 Collabora Ltd.
#
# 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
#... | gpl-3.0 |
kambysese/mne-python | examples/stats/plot_sensor_permutation_test.py | 20 | 2435 | """
=================================
Permutation T-test on sensor data
=================================
One tests if the signal significantly deviates from 0
during a fixed time window of interest. Here computation
is performed on MNE sample dataset between 40 and 60 ms.
"""
# Authors: Alexandre Gramfort <alexandre... | bsd-3-clause |
reliableJARED/python | opencv/video_on_video_overlay_tracked_obj.py | 1 | 4338 | '''
This code will put a video on a colored object (like a green ball)in the main
video stream. It will resize the overlay video on the fly
based on big the tracked object is. The code will not work without
the file: hist_for_tracking.png
that is the 'color calibration' image. The program does allow you
to calibrate... | gpl-3.0 |
izelaciman/node_production | node_modules/meanio/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... | mit |
40423226/2017springcd_bg1 | local_publishconf.py | 64 | 1997 | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# This file is only used if you use `make publish` or
# explicitly specify it as your config file.
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
# 因為 publishconf.py 在 pelicanconf.py 之後, 因此若兩處有相同變數的設定, ... | agpl-3.0 |
grupoprog3/proyecto_final | Entrega Final/flask/Lib/site-packages/click/_bashcomplete.py | 64 | 2423 | import os
import re
from .utils import echo
from .parser import split_arg_string
from .core import MultiCommand, Option
COMPLETION_SCRIPT = '''
%(complete_func)s() {
COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \\
COMP_CWORD=$COMP_CWORD \\
%(autocomplete_var)s=complete $1... | apache-2.0 |
cosmodesi/snsurvey | src/control.py | 1 | 1120 | #!/usr/bin/env python
import numpy
import sncosmo
import scipy.optimize
import matplotlib.pyplot as plt
model=sncosmo.Model(source='salt2-extended')
def f(t ,rlim):
# print t, model.bandflux('desr',t, zp = rlim, zpsys='ab')
return model.bandflux('desr',t, zp = rlim, zpsys='ab')-1.
def controlTime(z,rlim):
... | bsd-3-clause |
prefetchnta/questlab | bin/x64bin/python/37/Lib/html/parser.py | 1 | 18191 | """A parser for HTML and XHTML."""
# This file is based on sgmllib.py, but the API is slightly different.
# XXX There should be a way to distinguish between PCDATA (parsed
# character data -- the normal case), RCDATA (replaceable character
# data -- only char and entity references and end tags are special)
# a... | lgpl-2.1 |
jgraham/treeherder | treeherder/webapp/admin.py | 6 | 1796 | from django.contrib import admin
from django_browserid.admin import site as browserid_admin
from treeherder.model.models import *
class JobTypeAdmin(admin.ModelAdmin):
list_display = ['name', 'job_group', 'symbol', 'description', 'active_status']
list_editable = ['symbol', 'job_group']
class ReferenceDataS... | mpl-2.0 |
spedepekka/testdroid-samples | appium/sample-scripts/python/testdroid_android_hybrid.py | 1 | 9582 | ##
## For help on setting up your machine and configuring this TestScript go to
## http://docs.testdroid.com/appium/
##
import os
import time
import unittest
import subprocess
from time import sleep
from appium import webdriver
from device_finder import DeviceFinder
from selenium.common.exceptions import WebDriverExce... | apache-2.0 |
jlopezmalla/spark | examples/src/main/python/ml/sql_transformer.py | 127 | 1382 | #
# 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 |
raphaelmerx/django | tests/view_tests/tests/test_defaults.py | 286 | 5307 | from __future__ import unicode_literals
import datetime
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.test import TestCase
from django.test.utils import override_settings
from ..models import Article, Author, UrlArticle
@override_settings(ROOT_URLCONF='view_te... | bsd-3-clause |
framon/samba | lib/dnspython/dns/rdtypes/IN/NSAP.py | 100 | 2181 | # Copyright (C) 2003-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 |
kingvuplus/Test-OBH | lib/python/Components/GUIComponent.py | 57 | 2512 | import skin
from enigma import ePoint, eSize
class GUIComponent(object):
""" GUI component """
def __init__(self):
self.instance = None
self.onVisibilityChange = [ ]
self.__visible = 0
self.visible = 1
self.skinAttributes = None
self.deprecationInfo = None
def execBegin(self):
pass
def execEnd(se... | gpl-2.0 |
luogangyi/bcec-nova | nova/tests/fake_crypto.py | 42 | 5284 | # Copyright 2012 Nebula, 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 ... | apache-2.0 |
aykut/django-oscar | oscar/apps/address/abstract_models.py | 1 | 7907 | import zlib
from django.db import models
from django.utils.translation import ugettext_lazy as _
class AbstractAddress(models.Model):
"""
Superclass address object
This is subclassed and extended to provide models for
user, shipping and billing addresses.
The only required fields are last_name... | bsd-3-clause |
glowtree/pybythec | pybythec/__init__.py | 1 | 18150 | # -*- coding: utf-8 -*-
from pybythec import utils
from pybythec.utils import f
from pybythec.utils import PybythecError
from pybythec.BuildStatus import BuildStatus
from pybythec.BuildElements import BuildElements
import os
import sys
import time
from threading import Thread
log = utils.Logger('pybythec')
__author_... | isc |
fw1121/luigi | luigi/six.py | 65 | 29796 | """Utilities for writing code that runs on Python 2 and 3
In luigi, we hard-copy this file into the project itself, to ensure that all
luigi users use the same version of six.
"""
# Copyright (c) 2010-2015 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this so... | apache-2.0 |
wasade/qiime | tests/test_core_microbiome.py | 1 | 4217 | #!/usr/bin/env python
# File created on 08 Jun 2012
from __future__ import division
__author__ = "Greg Caporaso"
__copyright__ = "Copyright 2011, The QIIME project"
__credits__ = ["Greg Caporaso"]
__license__ = "GPL"
__version__ = "1.8.0-dev"
__maintainer__ = "Greg Caporaso"
__email__ = "gregcaporaso@gmail.com"
from... | gpl-2.0 |
natefoo/tools-iuc | tools/deg_annotate/deg_annotate.py | 20 | 8758 | import argparse
import os
from collections import defaultdict
from BCBio import GFF
def strandardize(strand):
if str(strand) == '-1':
strand = '-'
elif str(strand) == '1':
strand = '+'
return strand
def gff_to_dict(f_gff, feat_type, idattr, txattr, attributes, input_type):
"""
I... | mit |
glorotxa/SME | FB15k_exp.py | 6 | 17808 | #! /usr/bin/python
from model import *
# Utils ----------------------------------------------------------------------
def create_random_mat(shape, listidx=None):
"""
This function create a random sparse index matrix with a given shape. It
is useful to create negative triplets.
:param shape: shape of... | bsd-3-clause |
Glottotopia/aagd | moin/local/moin/build/lib.linux-x86_64-2.6/MoinMoin/i18n/strings.py | 2 | 8825 | # -*- coding: iso-8859-1 -*-
"""
MoinMoin - lists of translateable strings
MoinMoin uses some translateable strings that do not appear at other
places in the source code (and thus, are not found by gettext when
extracting translateable strings).
Also, some strings need to be organized someho... | mit |
mach0/QGIS | python/plugins/processing/algs/qgis/TilesXYZ.py | 26 | 25996 | # -*- coding: utf-8 -*-
"""
***************************************************************************
TilesXYZ.py
---------------------
Date : April 2019
Copyright : (C) 2019 by Lutra Consulting Limited
Email : marcel.dancak@lutraconsulting.co.uk
********... | gpl-2.0 |
guorendong/iridium-browser-ubuntu | native_client/toolchain_build/once.py | 7 | 16745 | #!/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.
"""Memoize the data produced by slow operations into Google storage.
Caches computations described in terms of command lines and ... | bsd-3-clause |
firmlyjin/brython | www/tests/unittests/test/test_minidom.py | 28 | 63833 | # test for xml.dom.minidom
import pickle
from test.support import run_unittest, findfile
import unittest
import xml.dom.minidom
from xml.dom.minidom import parse, Node, Document, parseString
from xml.dom.minidom import getDOMImplementation
tstfile = findfile("test.xml", subdir="xmltestdata")
# The tests of Docume... | bsd-3-clause |
ibmsoe/tensorflow | tensorflow/python/debug/cli/analyzer_cli_test.py | 4 | 71233 | # 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 |
tejasnikumbh/AllSATParallel | lib/python2.7/site-packages/numpy/lib/tests/test_utils.py | 149 | 1466 | from __future__ import division, absolute_import, print_function
import sys
from numpy.core import arange
from numpy.testing import (
run_module_suite, assert_, assert_equal, dec
)
from numpy.lib import deprecate
import numpy.lib.utils as utils
if sys.version_info[0] >= 3:
from io import StringIO
else:
... | mit |
javierTerry/odoo | addons/sale_journal/__init__.py | 443 | 1067 | # -*- 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 |
ctruchi/deluge-webui2 | deluge/ui/console/colors.py | 6 | 7687 | #
# colors.py
#
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# Deluge is free software.
#
# You may redistribute it and/or modify it under the terms of the
# GNU General Public License, as published by the Free Software
# Foundation; either version 3 of the License, or (at your option)
# any later versio... | gpl-3.0 |
sid88in/incubator-airflow | airflow/contrib/operators/qubole_operator.py | 12 | 8308 | # -*- 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 |
linjk/mysql-5.6 | plugin/innodb_memcached/daemon_memcached/testsuite/breakdancer/engine_test.py | 183 | 5544 | #!/usr/bin/env python
import breakdancer
from breakdancer import Condition, Effect, Action, Driver
TESTKEY = 'testkey'
######################################################################
# Conditions
######################################################################
class ExistsCondition(Condition):
def... | gpl-2.0 |
zhhf/charging | charging/tests/unit/test_extension_portsecurity.py | 8 | 19563 | # Copyright (c) 2012 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 |
mchristopher/PokemonGo-DesktopMap | app/pylibs/osx64/Cryptodome/Math/Primality.py | 2 | 10969 | # ===================================================================
#
# Copyright (c) 2014, Legrandin <helderijs@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributio... | mit |
PaddlePaddle/Paddle | python/paddle/fluid/tests/unittests/test_allclose_op.py | 2 | 6933 | # 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 |
git-commit/TardisDiff | TardisDiff.py | 1 | 4981 | import sys
import os
import inspect
from PyQt5 import QtWidgets, QtCore, QtGui
import plugnplay
from uptime import boottime
from TardisUtil import TardisOptions, TimeSubmitter
class TardisDiff(QtWidgets.QMainWindow):
def __init__(self):
super(TardisDiff, self).__init__()
self.difference = 0
... | isc |
diego-d5000/MisValesMd | env/lib/site-packages/pip/_vendor/requests/packages/chardet/hebrewprober.py | 2929 | 13359 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#... | mit |
vathpela/blivet | blivet/tsort.py | 5 | 3458 | # tsort.py
# Topological sorting.
#
# Copyright (C) 2010 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distr... | gpl-2.0 |
HuaweiSwitch/ansible | lib/ansible/module_utils/_text.py | 62 | 12325 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | gpl-3.0 |
PPKE-Bioinf/consensx.itk.ppke.hu | consensx/storage/csv.py | 1 | 1205 | class CSVBuffer(object):
"""Class which stores data for values.CSV"""
def __init__(self, my_path):
self.working_dir = my_path
self.max_resnum = -1
self.min_resnum = 100000
self.csv_data = []
def add_data(self, data):
self.csv_data.append(data)
def write_csv(sel... | mit |
osungjin/livechat | lib/flask/config.py | 781 | 6234 | # -*- coding: utf-8 -*-
"""
flask.config
~~~~~~~~~~~~
Implements the configuration related objects.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import imp
import os
import errno
from werkzeug.utils import import_string
from ._compat import string_type... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.