repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
gdub/django | django/utils/lru_cache.py | 270 | 7647 | try:
from functools import lru_cache
except ImportError:
# backport of Python's 3.3 lru_cache, written by Raymond Hettinger and
# licensed under MIT license, from:
# <http://code.activestate.com/recipes/578078-py26-and-py30-backport-of-python-33s-lru-cache/>
# Should be removed when Django only sup... | bsd-3-clause |
AlvaroRQ/prototipo | test_objectdetector.py | 1 | 1138 | #!/usr/bin/env python2.7
import os
import argparse
import time
from ownLibraries.object_detection.objectdetect import ObjectDetection
if __name__ == '__main__':
# For pass argument file
parser = argparse.ArgumentParser(description='Add folder to process')
parser.add_argument('-f', '--checkImage', default... | gpl-3.0 |
cooljeanius/emacs | build-aux/vcstocl/frontend_c.py | 1 | 30556 | # The C Parser.
# Copyright (C) 2019-2020 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 versio... | gpl-3.0 |
apbard/scipy | scipy/sparse/linalg/dsolve/setup.py | 43 | 1728 | #!/usr/bin/env python
from __future__ import division, print_function, absolute_import
from os.path import join, dirname
import sys
import os
import glob
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
... | bsd-3-clause |
nathanial/lettuce | tests/integration/lib/Django-1.3/django/contrib/databrowse/sites.py | 329 | 5628 | from django import http
from django.db import models
from django.contrib.databrowse.datastructures import EasyModel
from django.shortcuts import render_to_response
from django.utils.safestring import mark_safe
class AlreadyRegistered(Exception):
pass
class NotRegistered(Exception):
pass
class DatabrowsePlugi... | gpl-3.0 |
bassettsj/dmc-three.js | utils/exporters/blender/2.63/scripts/addons/io_mesh_threejs/import_threejs.py | 23 | 16503 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 distrib... | mit |
hilaskis/UAV_MissionPlanner | Lib/_weakrefset.py | 135 | 6389 | # Access WeakSet through the weakref module.
# This code is separated-out because it is needed
# by abc.py to load everything else at startup.
from _weakref import ref
__all__ = ['WeakSet']
class _IterationGuard(object):
# This context manager registers itself in the current iterators of the
# weak containe... | gpl-2.0 |
goyalankit/po-compiler | object_files/pygraphviz-1.2/setup_egg.py | 2 | 1644 | #!/usr/bin/env python
"""
An alternate setup.py script for setuptools.
If you have setuptools and run this as
>>> python setup_egg.py bdist_egg
you will get a python egg.
Use
>>> python setup_egg.py test
to run the tests.
"""
# local import, might need modification for 2.6/3.0
from setup import *
# must occur... | apache-2.0 |
0Chencc/CTFCrackTools | Lib/Lib/lib2to3/pgen2/token.py | 353 | 1244 | #! /usr/bin/env python
"""Token constants (from "token.h")."""
# Taken from Python (r53757) and modified to include some tokens
# originally monkeypatched in by pgen2.tokenize
#--start constants--
ENDMARKER = 0
NAME = 1
NUMBER = 2
STRING = 3
NEWLINE = 4
INDENT = 5
DEDENT = 6
LPAR = 7
RPAR = 8
LSQB = 9
RSQB = 10
C... | gpl-3.0 |
blackbliss/callme | flask/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/lint.py | 250 | 4062 | from __future__ import absolute_import, division, unicode_literals
from gettext import gettext
_ = gettext
from . import _base
from ..constants import cdataElements, rcdataElements, voidElements
from ..constants import spaceCharacters
spaceCharacters = "".join(spaceCharacters)
class LintError(Exception):
pass
... | mit |
cysuncn/python | spark/crm/PROC_O_LNA_XDXT_CUSTOMER_MEMO.py | 1 | 6179 | #coding=UTF-8
from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext
from pyspark.sql.types import *
from datetime import date, datetime, timedelta
import sys, re, os
st = datetime.now()
conf = SparkConf().setAppName('PROC_O_LNA_XDXT_CUSTOMER_MEMO').setMaster(sys.argv[2])
sc = SparkContext(conf = co... | gpl-3.0 |
linlife/Python | lin_jumper/author_agent/paramiko-1.10.1/paramiko/channel.py | 5 | 46546 | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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.1 of the License, or (a... | apache-2.0 |
mitodl/PyLmod | pylmod/base.py | 1 | 5995 | """
Python class representing interface to MIT Learning Modules Web service.
"""
import json
import logging
import requests
from requests.adapters import HTTPAdapter
log = logging.getLogger(__name__) # pylint: disable=C0103
class Base(object):
"""
Base provides the transport for accessing the MIT Lear... | bsd-2-clause |
slickqa/slickqaweb | slickqaweb/model/systemConfiguration/emailSubscription.py | 1 | 1443 | __author__ = 'jcorbett'
from mongoengine import *
from .types import AllTypes
from .subscriptionInfo import SubscriptionInfo
EmailSubscriptionSystemConfigurationType = "email-subscription"
# this is the default class name, kept for compatibility reasons
EmailSubscriptionSystemConfigurationClassName = "org.tcrun.sl... | apache-2.0 |
Barmaley-exe/scikit-learn | examples/cluster/plot_dict_face_patches.py | 337 | 2747 | """
Online learning of a dictionary of parts of faces
==================================================
This example uses a large dataset of faces to learn a set of 20 x 20
images patches that constitute faces.
From the programming standpoint, it is interesting because it shows how
to use the online API of the sciki... | bsd-3-clause |
Omegaphora/external_chromium_org | chrome/test/chromedriver/archive.py | 25 | 2935 | # 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.
"""Downloads items from the Chromium continuous archive."""
import os
import platform
import urllib
import util
CHROME_35_REVISION = '260135'
CHROME_3... | bsd-3-clause |
benpatterson/edx-platform | pavelib/utils/envs.py | 39 | 6325 | """
Helper functions for loading environment settings.
"""
from __future__ import print_function
import os
import sys
import json
from lazy import lazy
from path import path
import memcache
class Env(object):
"""
Load information about the execution environment.
"""
# Root of the git repository (edx-... | agpl-3.0 |
brandonPurvis/osf.io | framework/exceptions/__init__.py | 6 | 3538 | # -*- coding: utf-8 -*-
'''Custom exceptions for the framework.'''
import copy
import httplib as http
from flask import request
class FrameworkError(Exception):
"""Base class from which framework-related errors inherit."""
pass
class HTTPError(FrameworkError):
error_msgs = {
http.BAD_REQUEST: {
... | apache-2.0 |
alqfahad/odoo | addons/l10n_pe/__openerp__.py | 260 | 1762 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 Cubic ERP - Teradata SAC (<http://cubicerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the... | agpl-3.0 |
aleen42/three.js | utils/converters/msgpack/msgpack/__init__.py | 659 | 1385 | # coding: utf-8
from msgpack._version import version
from msgpack.exceptions import *
from collections import namedtuple
class ExtType(namedtuple('ExtType', 'code data')):
"""ExtType represents ext type in msgpack."""
def __new__(cls, code, data):
if not isinstance(code, int):
raise TypeE... | mit |
w1ll1am23/home-assistant | tests/components/mqtt/test_light_template.py | 3 | 39144 | """The tests for the MQTT Template light platform.
Configuration example with all features:
light:
platform: mqtt_template
name: mqtt_template_light_1
state_topic: 'home/rgb1'
command_topic: 'home/rgb1/set'
command_on_template: >
on,{{ brightness|d }},{{ red|d }}-{{ green|d }}-{{ blue|d }}
command_off... | apache-2.0 |
dpetzold/django | django/conf/locale/en_GB/formats.py | 504 | 2117 | # -*- 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 M Y' # '25 Oc... | bsd-3-clause |
strets123/rdkit | rdkit/Chem/Draw/qtCanvas.py | 4 | 3963 | # $Id$
#
# Copyright (C) 2014 Seiji Matsuoka
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
from rdkit.Chem.Draw.canvasbase import CanvasBase
f... | bsd-3-clause |
charlesccychen/incubator-beam | sdks/python/apache_beam/runners/worker/sdk_worker_main.py | 3 | 7687 | #
# 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 |
nparley/mylatitude | lib/chardet/sjisprober.py | 290 | 3774 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | mit |
chromium2014/src | ppapi/generators/idl_diff.py | 180 | 9073 | #!/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 glob
import os
import subprocess
import sys
from idl_option import GetOption, Option, ParseOptions
from idl_outfile import ... | bsd-3-clause |
goriccardo/pylibconfig | test/testio.py | 1 | 3930 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Riccardo Gori <goriccardo@gmail.com>
# License: GPL-3 http://www.gnu.org/licenses/gpl.txt
def main():
read_test()
write_test()
def read_test():
from pylibconfig import libconfigFile
test = libconfigFile('test/cfgfiles/test.cfg')
appwin = test... | lgpl-3.0 |
rosudrag/Freemium-winner | VirtualEnvironment/Lib/site-packages/pip-7.1.0-py3.4.egg/pip/_vendor/html5lib/treebuilders/dom.py | 920 | 8469 | from __future__ import absolute_import, division, unicode_literals
from xml.dom import minidom, Node
import weakref
from . import _base
from .. import constants
from ..constants import namespaces
from ..utils import moduleFactoryFactory
def getDomBuilder(DomImplementation):
Dom = DomImplementation
class A... | mit |
brandonPurvis/osf.io | website/addons/figshare/messages.py | 24 | 2988 | # MODEL MESSAGES :model.py
BEFORE_PAGE_LOAD_PRIVATE_NODE_MIXED_FS = 'Warning: This OSF {category} is private but figshare project {project_id} may contain some public files or filesets.'
BEFORE_PAGE_LOAD_PUBLIC_NODE_MIXED_FS = 'Warning: This OSF {category} is public but figshare project {project_id} may contain some p... | apache-2.0 |
Gussy/bigcouch | couchjs/scons/scons-local-2.0.1/SCons/Tool/applelink.py | 61 | 2851 | """SCons.Tool.applelink
Tool-specific initialization for the Apple gnu-like linker.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201... | apache-2.0 |
webostin/django-btc | tests/aggregation_regress/tests.py | 9 | 48568 | from __future__ import unicode_literals
import datetime
import pickle
from decimal import Decimal
from operator import attrgetter
from django.core.exceptions import FieldError
from django.contrib.contenttypes.models import ContentType
from django.db.models import Count, Max, Avg, Sum, StdDev, Variance, F, Q
from djan... | bsd-3-clause |
gorcz/mercurial | mercurial/bundle2.py | 2 | 45956 | # bundle2.py - generic container format to transmit arbitrary data.
#
# Copyright 2013 Facebook, Inc.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
"""Handling of the new bundle2 format
The goal of bundle2 is to act as an atomic... | gpl-2.0 |
apechimp/servo | tests/wpt/web-platform-tests/webdriver/javascript/execute_script_test.py | 142 | 5724 | import os
import sys
import unittest
sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../..")))
import base_test
from selenium.webdriver.remote.webelement import WebElement
class ExecuteScriptTest(base_test.WebDriverBaseTest):
def test_ecmascript_translates_null_return_to_none(self):
self.drive... | mpl-2.0 |
Lessica/shadowsocks | shadowsocks/shell.py | 652 | 12736 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 |
kinpa200296/python_labs | lab2/tests/MyCollectionsTests/FilteredCollectionTests.py | 1 | 1548 | #!/usr/bin/env python
from mycollections import FilteredCollection
import unittest
__author__ = 'kinpa200296'
def get_sequence_of_size(sequence, size):
res = []
for x in sequence:
if size > 0:
res.append(x)
else:
return res
size -= 1
class TestFilteredCollec... | mit |
Weicong-Lin/pymo-global | android/pgs4a-0.9.6/python-install/lib/python2.7/encodings/bz2_codec.py | 501 | 2993 | """ Python 'bz2_codec' Codec - bz2 compression encoding
Unlike most of the other codecs which target Unicode, this codec
will return Python string objects for both encode and decode.
Adapted by Raymond Hettinger from zlib_codec.py which was written
by Marc-Andre Lemburg (mal@lemburg.com).
"""
import ... | mit |
yewang15215/django | tests/serializers/models/data.py | 9 | 7680 | """
******** Models for test_data.py ***********
The following classes are for testing basic data marshalling, including
NULL values, where allowed.
The basic idea is to have a model for each Django data type.
"""
from __future__ import unicode_literals
from django.contrib.contenttypes.fields import (
GenericForei... | bsd-3-clause |
shaufi/odoo | openerp/report/preprocess.py | 443 | 4700 | # -*- 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 |
andrewmegaris/APM_OcPoC_Zynq | Tools/ardupilotwaf/cmake.py | 16 | 13101 | #!/usr/bin/env python
# encoding: utf-8
# Copyright (C) 2015-2016 Intel Corporation. All rights reserved.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (... | gpl-3.0 |
aselle/tensorflow | tensorflow/examples/learn/hdf5_classification.py | 75 | 2899 | # 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 appl... | apache-2.0 |
BuildingLink/sentry | src/sentry/api/endpoints/organization_index.py | 2 | 7988 | from __future__ import absolute_import
import six
from django.db import IntegrityError, transaction
from django.db.models import Count, Q, Sum
from rest_framework import serializers, status
from rest_framework.response import Response
from sentry import features, options, roles
from sentry.app import ratelimiter
fro... | bsd-3-clause |
JacobJacob/volatility | volatility/plugins/linux/ifconfig.py | 44 | 3460 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility 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 o... | gpl-2.0 |
kartoza/watchkeeper | django_project/event_mapper/migrations/0015_auto_20150511_0858.py | 5 | 2161 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import django.contrib.gis.db.models.fields
class Migration(migrations.Migration):
dependencies = [
('event_mapper', '0014_auto_20150508_1133'),
]
operations ... | bsd-2-clause |
chenyyx/scikit-learn-doc-zh | examples/zh/linear_model/plot_sparse_logistic_regression_20newsgroups.py | 56 | 4172 | """
=====================================================
Multiclass sparse logisitic regression on newgroups20
=====================================================
Comparison of multinomial logistic L1 vs one-versus-rest L1 logistic regression
to classify documents from the newgroups20 dataset. Multinomial logistic
... | gpl-3.0 |
swilly22/redis-module-graph | tests/flow/base.py | 2 | 3552 | import os
import warnings
from rmtest import ModuleTestCase
class FlowTestsBase(ModuleTestCase(os.path.dirname(os.path.abspath(__file__)) + '/../../src/redisgraph.so')):
def _skip_header_row(self, resultset):
self.assertGreaterEqual(len(resultset), 1)
return resultset[1:]
def _assert_number_... | agpl-3.0 |
timohtey/mediadrop_copy | mediacore_env/Lib/site-packages/setuptools/tests/test_packageindex.py | 377 | 7625 | """Package Index Tests
"""
import sys
import os
import unittest
import pkg_resources
from setuptools.compat import urllib2, httplib, HTTPError, unicode, pathname2url
import distutils.errors
import setuptools.package_index
from setuptools.tests.server import IndexServer
class TestPackageIndex(unittest.TestCase):
d... | gpl-3.0 |
akash1808/nova_test_latest | nova/tests/unit/objects/test_instance_info_cache.py | 40 | 5861 | # 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | apache-2.0 |
javierag/samba | source4/heimdal/lib/wind/rfc3454.py | 88 | 2296 | #!/usr/local/bin/python
# -*- coding: iso-8859-1 -*-
# $Id$
# Copyright (c) 2004 Kungliga Tekniska Högskolan
# (Royal Institute of Technology, Stockholm, Sweden).
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following... | gpl-3.0 |
christoph-buente/phantomjs | src/qt/qtwebkit/Tools/QueueStatusServer/config/queues.py | 116 | 1805 | # Copyright (C) 2013 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 |
jlnaudin/x-drone | MissionPlanner-master/Lib/lib2to3/fixes/fix_raise.py | 327 | 2934 | """Fixer for 'raise E, V, T'
raise -> raise
raise E -> raise E
raise E, V -> raise E(V)
raise E, V, T -> raise E(V).with_traceback(T)
raise E, None, T -> raise E.with_traceback(T)
raise (((E, E'), E''), E'''), V -> raise E(V)
raise "foo", V, T -> warns about string exceptions
CAVEATS:... | gpl-3.0 |
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | python-packages/mne-python-0.10/tutorials/plot_introduction.py | 9 | 13464 | """
.. _intro_tutorial:
Basic MEG and EEG data processing
=================================
MNE-Python reimplements most of MNE-C's (the original MNE command line utils)
functionality and offers transparent scripting.
On top of that it extends MNE-C's functionality considerably (customize events,
compute
contrasts, g... | bsd-3-clause |
anotherpyr/pushmac | pushcast/pcfilter.py | 1 | 1066 | '''
Created on Aug 24, 2015
@author: anotherpyr
'''
class SimpleDescription():
def filter(self, lines):
output = u""
append = False
for k in range(0, len(lines)):
line = lines[k]
# Remove excess URLs from descriptions
if line.find(":... | apache-2.0 |
dl1ksv/gnuradio | gr-digital/python/digital/qa_ofdm_txrx.py | 5 | 6704 | #!/usr/bin/env python
#
# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import random
import numpy
import pmt
from gnuradio import gr, gr_unittest
from gnuradio import digital
from gnuradio import blocks
from gnuradio import channel... | gpl-3.0 |
kll334477/NewsScrapy | thepaper/thepaper/spiders/cnta_spider.py | 2 | 3849 | # -*- coding: utf-8 -*-
__author__ = 'k'
import re
import scrapy
from bs4 import BeautifulSoup
import logging
from thepaper.items import NewsItem
import json
logger = logging.getLogger("NbdSpider")
from thepaper.settings import *
from thepaper.util import judge_news_crawl
class CntaSpider(scrapy.spiders.Spider):
... | lgpl-3.0 |
DJMelonz/basic-blog | django/utils/dateformat.py | 234 | 8956 | """
PHP date() style date formatting
See http://www.php.net/date for format strings
Usage:
>>> import datetime
>>> d = datetime.datetime.now()
>>> df = DateFormat(d)
>>> print df.format('jS F Y H:i')
7th October 2003 11:39
>>>
"""
import re
import time
import calendar
from django.utils.dates import MONTHS, MONTHS_3, ... | bsd-3-clause |
hhm0/supysonic | supysonic/watcher.py | 2 | 7119 | # coding: utf-8
# This file is part of Supysonic.
#
# Supysonic is a Python implementation of the Subsonic server API.
# Copyright (C) 2014 Alban 'spl0k' Féron
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the F... | agpl-3.0 |
mwiebe/blaze | blaze/datadescriptor/tests/test_csv_data_descriptor.py | 2 | 5241 | from __future__ import absolute_import, division, print_function
import unittest
import tempfile
import os
import datashape
from blaze.datadescriptor import (
CSVDataDescriptor, DyNDDataDescriptor, IDataDescriptor, dd_as_py)
# A CSV toy example
csv_buf = u"""k1,v1,1,False
k2,v2,2,True
k3,v3,3,False
"""
csv_sche... | bsd-3-clause |
jmanero/mesos-service | zookeeper-3.4.6/src/contrib/rest/src/python/zkrest.py | 115 | 7227 |
# 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 ... | mit |
krikru/tensorflow-opencl | tensorflow/contrib/tfprof/python/tools/tfprof/tfprof_logger.py | 48 | 5809 | # 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 |
sasukeh/neutron | neutron/tests/unit/api/rpc/handlers/test_dvr_rpc.py | 34 | 2111 | # Copyright (c) 2015 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 |
infoxchange/lettuce | tests/integration/lib/Django-1.2.5/tests/regressiontests/admin_views/tests.py | 38 | 111514 | # coding: utf-8
import re
import datetime
import urlparse
from django.conf import settings
from django.core.exceptions import SuspiciousOperation
from django.core.files import temp as tempfile
from django.core.urlresolvers import reverse
# Register auth models with the admin.
from django.contrib.auth import REDIRECT_... | gpl-3.0 |
unreal666/outwiker | plugins/source/source/pygments/lexers/_openedge_builtins.py | 31 | 48362 | # -*- coding: utf-8 -*-
"""
pygments.lexers._openedge_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Builtin list for the OpenEdgeLexer.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
OPENEDGEKEYWORDS = (
'ABSOLUTE',
'ABS',
... | gpl-3.0 |
sergiocorato/odoomrp-wip | quality_control_tolerance/models/qc_test.py | 11 | 4113 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
class QcTestQuest... | agpl-3.0 |
liorvh/golismero | golismero/api/data/vulnerability/authentication/broken_captcha.py | 8 | 1453 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__license__= """
GoLismero 2.0 - The web knife - Copyright (C) 2011-2014
Golismero project site: https://github.com/golismero
Golismero project mail: contact@golismero-project.com
This program is free software; you can redistribute it and/or
modify it under the terms of ... | gpl-2.0 |
miguelinux/vbox | src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/AutoGen/GenMake.py | 1 | 52497 | ## @file
# Create makefile for MS nmake and GNU make
#
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the l... | gpl-2.0 |
boonchu/pykickstart | tests/commands/ignoredisk.py | 8 | 3720 | #
# Martin Gracik <mgracik@redhat.com>
#
# Copyright 2009 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. This program is distributed in the hope that it
# will be use... | gpl-2.0 |
goliate/sarakha63-persomov | couchpotato/core/notifications/plex/__init__.py | 48 | 1889 | from .main import Plex
def autoload():
return Plex()
config = [{
'name': 'plex',
'groups': [
{
'tab': 'notifications',
'list': 'notification_providers',
'name': 'plex',
'options': [
{
'name': 'enabled',
... | gpl-3.0 |
bouk/redshift_sqlalchemy | tests/test_default_ssl.py | 5 | 1725 | import sqlalchemy as sa
CERT = b"""-----BEGIN CERTIFICATE-----
MIIDeDCCAuGgAwIBAgIJALPHPDcjk979MA0GCSqGSIb3DQEBBQUAMIGFMQswCQYD
VQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHU2VhdHRsZTET
MBEGA1UEChMKQW1hem9uLmNvbTELMAkGA1UECxMCQ00xLTArBgkqhkiG9w0BCQEW
HmNvb2tpZS1tb25zdGVyLWNvcmVAYW1hem9uLmNvbTAeFw0xMjExMDIyMzI0... | mit |
Jgarcia-IAS/SAT | openerp/addons-extra/odoo-pruebas/odoo-server/openerp/addons/base/ir/ir_ui_menu.py | 316 | 20548 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2012 OpenERP SA (<http://openerp.com>).
#
# This program is free software: you can ... | agpl-3.0 |
aifil/odoo | openerp/addons/test_new_api/tests/test_related.py | 39 | 8025 | #
# test cases for related fields, etc.
#
import unittest
from openerp.osv import fields
from openerp.tests import common
class TestRelatedField(common.TransactionCase):
def setUp(self):
super(TestRelatedField, self).setUp()
self.alpha = self.registry('test_new_api.alpha')
self.bravo = se... | gpl-3.0 |
JonathanStein/odoo | addons/sale_margin/__openerp__.py | 261 | 1592 | ##############################################################################
#
# 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 Affero General Public L... | agpl-3.0 |
gomsec/pysecdump | wpc/users.py | 6 | 1807 | from wpc.user import user
import win32net
import wpc.conf
class users():
def __init__(self):
self.users = []
def get_filtered(self, ):
if self.users == []:
#try:
level = 1
resume = 0
while True:
userlist, total, r... | gpl-3.0 |
yining0417/zookeeper | build/zookeeper-3.4.6/contrib/zkpython/src/test/zktestbase.py | 98 | 3572 | #!/usr/bin/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
# "Lic... | apache-2.0 |
Gabriel439/pip | pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py | 2040 | 8935 | # Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
# Passes Python2.7's test suite and incorporates all the latest updates.
# Copyright 2009 Raymond Hettinger, released under the MIT License.
# http://code.activestate.com/recipes/576693/
try:
from thread import get_ident as _get_iden... | mit |
cmdunkers/DeeperMind | PythonEnv/lib/python2.7/site-packages/theano/scalar/tests/test_basic.py | 4 | 16173 | """
These routines are not well-tested. They are also old.
OB says that it is not important to test them well because Scalar Ops
are rarely used by themselves, instead they are the basis for Tensor Ops
(which should be checked thoroughly). Moreover, Scalar will be changed
to use numpy's scalar routines.
If you do want ... | bsd-3-clause |
NL66278/odoo | addons/account_payment/account_invoice.py | 382 | 2377 | # -*- 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 |
hsfzxjy/wisecitymbc | site_packages/django_filters/filterset.py | 2 | 13862 | from __future__ import absolute_import
from __future__ import unicode_literals
from copy import deepcopy
from django import forms
from django.core.validators import EMPTY_VALUES
from django.db import models
from django.db.models.fields import FieldDoesNotExist
from django.db.models.related import RelatedObje... | gpl-2.0 |
aquilesIIIMB/Analisis_Espectral_LFP | analysis-tools/OpenEphys.py | 1 | 27029 | # -*- coding: utf-8 -*-
"""
Created on Sun Aug 3 15:18:38 2014
@author: Dan Denman and Josh Siegle
Loads .continuous, .events, and .spikes files saved from the Open Ephys GUI
Usage:
import OpenEphys
data = OpenEphys.load(pathToFile) # returns a dict with data, timestamps, etc.
"""
import os
import numpy a... | gpl-3.0 |
jchevin/MissionPlanner-master | Lib/site-packages/scipy/signal/tests/test_waveforms.py | 57 | 10585 |
import numpy as np
from numpy.testing import TestCase, assert_almost_equal, assert_equal, assert_, \
assert_raises, run_module_suite
import scipy.signal.waveforms as waveforms
# These chirp_* functions are the instantaneous frequencies of the signals
# returned by chirp().
def chirp_linear(t, f0, f1, t1):
... | gpl-3.0 |
nicky-ji/edx-nicky | lms/djangoapps/bulk_email/migrations/0009_force_unique_course_ids.py | 53 | 6184 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding unique constraint on 'CourseAuthorization', fields ['course_id']
db.create_unique('bulk_email_cours... | agpl-3.0 |
PaddlePaddle/Paddle | python/paddle/fluid/tests/unittests/test_imperative_static_runner_while.py | 2 | 8617 | # Copyright (c) 2020 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 appli... | apache-2.0 |
kawamon/hue | desktop/core/ext-py/gunicorn-19.9.0/gunicorn/six.py | 320 | 27344 | """Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2014 Benjamin Peterson
#
# 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 with... | apache-2.0 |
bieschke/nuffle | lib/python/formencode/context.py | 5 | 5404 | """
A dynamic-scope-like system, aka fluid variables.
The idea behind dynamic scoped variables is for when, at one level,
you want to change the behavior of something you call. Except you
can't pass in any new arguments (e.g., there's some function or object
inbetween you and the thing you want to change), or you can... | gpl-2.0 |
chenjiafan/pjsip | tests/pjsua/scripts-sendto/999_asterisk_err.py | 59 | 1312 | # $Id: 999_asterisk_err.py 2081 2008-06-27 21:59:15Z bennylp $
import inc_sip as sip
import inc_sdp as sdp
# http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2008-June/003426.html:
#
# Report in pjsip mailing list on 27/6/2008 that this message will
# cause pjsip to respond with 500 and then second request will ... | gpl-2.0 |
infoelliex/addons-yelizariev | import_framework/mapper.py | 16 | 13482 | # -*- 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... | lgpl-3.0 |
vvps/pyBackup | bkup.py | 1 | 1258 | import os, sys
import zipfile
from time import *
import datetime
import balloontip as bt
startTime = datetime.datetime.now()
lf = open('C:/pyBackup.log', 'w')
lf.write("Starting backup.. " + strftime("%a, %d %b %Y %H:%M:%S", localtime()) + "\n");
sourceLocation = 'E:'
destinationLocation = 'V:/backupdata'
def zip(sr... | unlicense |
xcasper/python_koans | python3/koans/about_dictionaries.py | 91 | 1948 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Based on AboutHashes in the Ruby Koans
#
from runner.koan import *
class AboutDictionaries(Koan):
def test_creating_dictionaries(self):
empty_dict = dict()
self.assertEqual(dict, type(empty_dict))
self.assertDictEqual({}, empty_dict)
... | mit |
Trust-Code/PySPED | pysped/tabela/servico.py | 9 | 1249 | # -*- coding: utf-8 -*-
from __future__ import division, print_function, unicode_literals, absolute_import
import sys
import os
CURDIR = os.path.dirname(os.path.abspath(__file__))
class _Servico(object):
def __init__(self, codigo='', descricao=''):
self.codigo = codigo
self.descricao = descrica... | lgpl-2.1 |
tensorflow/tpu | models/experimental/resnet50_keras/resnet50_ctl_tf1.py | 1 | 8815 | # Copyright 2018 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 |
kronoscode/Booktype | lib/booktype/apps/edit/utils.py | 7 | 3015 | # -*- coding: utf-8 -*-
"""
Utility functions related with editor app
"""
import sputnik
from lxml import etree
from booktype.utils.plugins import icejs
def clean_chapter_html(content, text_only=False, **kwargs):
"""
Removes icejs contents for now. We could later add more functionality to
this function... | agpl-3.0 |
firerszd/kbengine | kbe/src/lib/python/Lib/test/test_runpy.py | 84 | 29328 | # Test the runpy module
import unittest
import os
import os.path
import sys
import re
import tempfile
import importlib, importlib.machinery, importlib.util
import py_compile
from test.support import (
forget, make_legacy_pyc, run_unittest, unload, verbose, no_tracing,
create_empty_file)
from test.script_helper ... | lgpl-3.0 |
fredericlepied/ansible | lib/ansible/module_utils/gcdns.py | 187 | 2531 | # 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 |
zasdfgbnm/tensorflow | tensorflow/compiler/tests/variable_ops_test.py | 15 | 10467 | # 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 |
tealover/nova | nova/tests/unit/api/openstack/compute/test_api.py | 26 | 5850 | # Copyright 2010 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 |
hrjn/scikit-learn | sklearn/cluster/__init__.py | 364 | 1228 | """
The :mod:`sklearn.cluster` module gathers popular unsupervised clustering
algorithms.
"""
from .spectral import spectral_clustering, SpectralClustering
from .mean_shift_ import (mean_shift, MeanShift,
estimate_bandwidth, get_bin_seeds)
from .affinity_propagation_ import affinity_propagati... | bsd-3-clause |
thanhacun/odoo | addons/report/controllers/main.py | 210 | 6943 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
grupoprog3/proyecto_final | Entrega Final/flask/Lib/encodings/mac_latin2.py | 219 | 14118 | """ Python Character Mapping Codec mac_latin2 generated from 'MAPPINGS/VENDORS/MICSFT/MAC/LATIN2.TXT' with gencodec.py.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
(c) Copyright 2000 Guido van Rossum.
"""#"
import codecs
### Codec APIs
class Codec(codecs.... | apache-2.0 |
bluewish/tiny4412-linux-3.5 | tools/perf/scripts/python/sctop.py | 11180 | 1924 | # system call top
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Periodically displays system-wide system call totals, broken down by
# syscall. If a [comm] arg is specified, only syscalls called by
# [comm] are displayed. If an [interval] arg is specified,... | gpl-2.0 |
surtrstudios/gtest | scripts/pump.py | 2471 | 23673 | #!/usr/bin/env python
#
# Copyright 2008, 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... | bsd-3-clause |
liukaijv/flask | flask/testing.py | 150 | 5081 | # -*- coding: utf-8 -*-
"""
flask.testing
~~~~~~~~~~~~~
Implements test support helpers. This module is lazily imported
and usually not used in production environments.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from contextlib import contextmana... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.