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 |
|---|---|---|---|---|---|
seanli9jan/tensorflow | tensorflow/tools/dist_test/server/parse_cluster_spec_test.py | 147 | 3420 | # 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 |
gerald-yang/ubuntu-iotivity-demo | snappy/grovepi/python-env/lib/python2.7/encodings/cp1251.py | 593 | 13617 | """ Python Character Mapping Codec cp1251 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,in... | apache-2.0 |
rosmo/ansible | lib/ansible/modules/network/fortios/fortios_address.py | 24 | 10246 | #!/usr/bin/python
#
# Ansible module to manage IP addresses on fortios devices
# (c) 2016, Benjamin Jolivot <bjolivot@gmail.com>
# 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_M... | gpl-3.0 |
FranMachio/Plugin.Video.Fran.machio | servers/adfly.py | 41 | 2142 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para adfly (acortador de url)
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os... | gpl-2.0 |
MLnick/spark | examples/src/main/python/ml/max_abs_scaler_example.py | 123 | 1712 | #
# 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 |
kimoonkim/spark | python/pyspark/context.py | 10 | 42895 | #
# 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 |
ging/python-keystoneclient | keystoneclient/auth/identity/v3.py | 1 | 13078 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 |
TheGoldLab/Lab-Matlab-Control | modularTasks/utilities/readPupilLabsData.py | 1 | 1388 | import sys
import scipy.io as scpy
import numpy as np
import msgpack
from file_methods import *
#Python Script to read Eye Data, extract desired information and then create a .mat structure where rows are times, columns are:
# 1. timestamp
# 2. gaze x
# 3. gaze y
# 4. confidence
#input:
#... | apache-2.0 |
jswope00/griffinx | lms/djangoapps/shoppingcart/processors/__init__.py | 215 | 2574 | """
Public API for payment processor implementations.
The specific implementation is determined at runtime using Django settings:
CC_PROCESSOR_NAME: The name of the Python module (in `shoppingcart.processors`) to use.
CC_PROCESSOR: Dictionary of configuration options for specific processor implementations,
... | agpl-3.0 |
ruibarreira/linuxtrail | usr/lib/python2.7/dist-packages/numpy/oldnumeric/rng.py | 13 | 3814 | """Re-create the RNG interface from Numeric.
Replace import RNG with import numpy.oldnumeric.rng as RNG.
It is for backwards compatibility only.
"""
from __future__ import division, absolute_import, print_function
__all__ = ['CreateGenerator', 'ExponentialDistribution', 'LogNormalDistribution',
'NormalDis... | gpl-3.0 |
e-gob/plataforma-kioscos-autoatencion | scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/plugins/action/fetch.py | 42 | 9898 | # (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... | bsd-3-clause |
nomaro/SickBeard_Backup | sickbeard/clients/requests/packages/urllib3/_collections.py | 309 | 2903 | # urllib3/_collections.py
# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from collections import MutableMapping
from threading import Lock
try: # Python 2.7+
... | gpl-3.0 |
fturbak/appinventor-sources | appinventor/misc/buildserver/buildmonitor.py | 90 | 1771 | from subprocess import Popen,PIPE
import time
import signal
import os
import pwd
from logging.handlers import SysLogHandler
import logging
server = None
stopping = False
def main():
'''Start the buildserver and keep track of it, i.e., restart if it fails'''
global server, log
signal.signal(signal.SIGTERM,... | apache-2.0 |
boyuegame/kbengine | kbe/res/scripts/common/Lib/site-packages/setuptools/archive_util.py | 409 | 6601 | """Utilities for extracting common archive formats"""
__all__ = [
"unpack_archive", "unpack_zipfile", "unpack_tarfile", "default_filter",
"UnrecognizedFormat", "extraction_drivers", "unpack_directory",
]
import zipfile, tarfile, os, shutil, posixpath
from pkg_resources import ensure_directory
from distutils.... | lgpl-3.0 |
chvrga/outdoor-explorer | java/play-1.4.4/python/Lib/platform.py | 3 | 53133 | #!/usr/bin/env python
""" This module tries to retrieve as much platform-identifying data as
possible. It makes this information available via function APIs.
If called from the command line, it prints the platform
information concatenated as single string to stdout. The output
format is useable... | mit |
techstormteam/12-vision-connect-ios-linphone | submodules/externals/x264/tools/digress/testing.py | 145 | 18442 | """
Digress testing core.
"""
from digress.errors import SkippedTestError, DisabledTestError, NoSuchTestError, \
FailedTestError, AlreadyRunError, SCMError, \
ComparisonError
from digress.constants import *
from digress.cli import dispatchable
import inspect
impor... | gpl-2.0 |
thaim/ansible | lib/ansible/modules/cloud/google/gcp_compute_instance_template_info.py | 3 | 24320 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | mit |
meletakis/collato | lib/python2.7/site-packages/autocomplete_light/autocomplete/rest_model.py | 5 | 5657 | import urllib
from django import http
try:
import json
except ImportError:
from django.utils import simplejson as json
from .model import AutocompleteModel
class AutocompleteRestModel(AutocompleteModel):
widget_js_attributes = {'bootstrap': 'rest_model'}
@property
def model(self):
ret... | gpl-2.0 |
drawquest/drawquest-web | common/boto/sdb/domain.py | 20 | 14279 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... | bsd-3-clause |
aaleotti-unimore/ComicsScraper | lib/setuptools/msvc.py | 27 | 40576 | """
Improved support for Microsoft Visual C++ compilers.
Known supported compilers:
--------------------------
Microsoft Visual C++ 9.0:
Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64)
Microsoft Windows SDK 6.1 (x86, x64, ia64)
Microsoft Windows SDK 7.0 (x86, x64, ia64)
Microsoft Visual C++ 10.0... | apache-2.0 |
petrutlucian94/nova | nova/tests/unit/db/test_migrations.py | 3 | 33976 | # Copyright 2010-2011 OpenStack Foundation
# Copyright 2012-2013 IBM Corp.
# 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/li... | apache-2.0 |
SatelliteQE/robottelo | robottelo/cli/report_template.py | 3 | 3969 | """
Usage::
hammer report-template [OPTIONS] SUBCOMMAND [ARG] ...
Parameters::
SUBCOMMAND Subcommand
[ARG] ... Subcommand arguments
Subcommands::
clone Clone a template
create Create a report template
dele... | gpl-3.0 |
hochanh/django-xadmin | xadmin/plugins/export.py | 6 | 9363 | import StringIO
import datetime
import sys
from django.http import HttpResponse
from django.template import loader
from django.utils.encoding import force_str, smart_unicode
from django.utils.html import escape
from django.utils.translation import ugettext as _
from django.utils.xmlutils import SimplerXMLGenerator
fro... | bsd-3-clause |
zstackorg/zstack-woodpecker | integrationtest/vm/virtualrouter/template_image/test_crt_temp_image.py | 2 | 3011 | '''
Test Create Image Template from Root Volume for VR Vlan test
@author: Youyk
'''
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.test_state as test_state
import zstackwoodpecker.zstack_test.zstack_test_image as test_image
import zstackw... | apache-2.0 |
manisandro/QGIS | python/plugins/processing/algs/qgis/Rasterize.py | 4 | 11888 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
Rasterize.py
-------------------
begin : 2016-10-05
copyright : (C) 2016 by OPENGIS.ch
email : matthias@opengis.ch
**... | gpl-2.0 |
ProfessionalIT/professionalit-webiste | sdk/google_appengine/lib/django-1.5/django/contrib/formtools/wizard/storage/cookie.py | 125 | 1027 | import json
from django.core.exceptions import SuspiciousOperation
from django.core.signing import BadSignature
from django.contrib.formtools.wizard import storage
class CookieStorage(storage.BaseStorage):
encoder = json.JSONEncoder(separators=(',', ':'))
def __init__(self, *args, **kwargs):
super(... | lgpl-3.0 |
myt00seven/svrg | para_gpu/preprocessing/make_train_val_txt.py | 6 | 2402 | '''
For generating caffe style train and validation label txt files
'''
import os
import yaml
import scipy.io
import numpy as np
with open('paths.yaml', 'r') as f:
paths = yaml.load(f)
meta_clsloc_mat = paths['meta_clsloc_mat']
train_img_dir = paths['train_img_dir']
val_img_dir = paths['val_img_dir']
val_label_f... | mit |
florian-dacosta/OpenUpgrade | addons/website_sale/tests/test_sale_process.py | 23 | 1312 | import os
import openerp.tests
inject = [
("openerp.website.Tour", os.path.join(os.path.dirname(__file__), '../../website/static/src/js/website.tour.js')),
("openerp.website.Tour.ShopTest", os.path.join(os.path.dirname(__file__), "../static/src/js/website.tour.sale.js")),
]
@openerp.tests.common.at_install(F... | agpl-3.0 |
p4datasystems/CarnotKE | jyhton/Lib/test/test_mutants.py | 24 | 8766 | # for Jython's use of CHM, removed pathological case of
# machiavelli. this may or may not legal without some locking in the
# underlying java code, in any event, it's not so interesting right
# now
from test.test_support import verbose, TESTFN
import random
import os
# From SF bug #422121: Insecurities in dict comp... | apache-2.0 |
TribeMedia/sky_engine | sky/tools/webkitpy/thirdparty/mod_pywebsocket/msgutil.py | 658 | 7598 | # Copyright 2011, 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 f... | bsd-3-clause |
spawnedc/MeCanBlog | django/core/cache/backends/dummy.py | 234 | 1218 | "Dummy cache backend"
from django.core.cache.backends.base import BaseCache
class DummyCache(BaseCache):
def __init__(self, host, *args, **kwargs):
BaseCache.__init__(self, *args, **kwargs)
def add(self, key, value, timeout=None, version=None):
key = self.make_key(key, version=version)
... | bsd-3-clause |
samuel1208/scikit-learn | sklearn/manifold/tests/test_isomap.py | 226 | 3941 | from itertools import product
import numpy as np
from numpy.testing import assert_almost_equal, assert_array_almost_equal
from sklearn import datasets
from sklearn import manifold
from sklearn import neighbors
from sklearn import pipeline
from sklearn import preprocessing
from sklearn.utils.testing import assert_less
... | bsd-3-clause |
edmundgentle/schoolscript | SchoolScript/bin/Debug/pythonlib/Lib/sysconfig.py | 3 | 28476 | """Provide access to Python's configuration information.
"""
import sys
import os
from os.path import pardir, realpath
__all__ = [
'get_config_h_filename',
'get_config_var',
'get_config_vars',
'get_makefile_filename',
'get_path',
'get_path_names',
'get_paths',
'get_platf... | gpl-2.0 |
jgeewax/googlepersonfinder | app/photo.py | 1 | 1131 | #!/usr/bin/python2.5
# 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 or ... | apache-2.0 |
pjknkda/werkzeug | examples/shorty/utils.py | 44 | 2500 | from os import path
from urlparse import urlparse
from random import sample, randrange
from jinja2 import Environment, FileSystemLoader
from werkzeug.local import Local, LocalManager
from werkzeug.utils import cached_property
from werkzeug.wrappers import Response
from werkzeug.routing import Map, Rule
from sqlalchemy ... | bsd-3-clause |
tzq668766/python | burness/0013/get_photos.py | 40 | 1039 | import urllib2
from HTMLParser import HTMLParser
from traceback import print_exc
from sys import stderr
class _DeHTMLParser(HTMLParser):
'''
利用HTMLParse来解析网页元素
'''
def __init__(self):
HTMLParser.__init__(self)
self.img_links = []
def handle_starttag(self, tag, attrs):
if tag == 'img':
# print(attrs)
... | mit |
AdrianGaudebert/elmo | lib/auth/backends.py | 1 | 9276 | # 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 ldap
from ldap.filter import filter_format
from django.conf import settings
from django.contrib.auth.models impor... | mpl-2.0 |
mlperf/training_results_v0.7 | Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/tests/python/unittest/test_profiler.py | 3 | 16500 | # 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 |
elkingtonmcb/nupic | src/regions/ImageSensorFilters/Tracking.py | 17 | 11228 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 |
AutorestCI/azure-sdk-for-python | azure-mgmt-storage/azure/mgmt/storage/v2017_10_01/models/storage_account_update_parameters.py | 2 | 4043 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit |
nimzco/Environment | Sublime/Packages/pygments/all/pygments/cmdline.py | 22 | 17312 | # -*- coding: utf-8 -*-
"""
pygments.cmdline
~~~~~~~~~~~~~~~~
Command line interface.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import print_function
import sys
import getopt
from textwrap import dedent
from py... | mit |
ambyte/Vertaler | src/modules/httprequest.py | 1 | 1619 | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# Copyright (c) 2011 Sergey Gulyaev <astraway@gmail.com>
#
# This file is part of Vertaler.
#
# Vertaler is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | gpl-2.0 |
Railk/T3S | Typescript.py | 1 | 23768 | # coding=utf8
import sublime
import sublime_plugin
from queue import Queue
from threading import Thread
from subprocess import Popen, PIPE
import subprocess
import os
import json
import re
import sys
# --------------------------------------- CONSTANT -------------------------------------- #
dirname = os.path.dirnam... | mit |
linjoahow/2015cdaa-w11 | static/Brython3.1.1-20150328-091302/Lib/heapq.py | 628 | 18065 | """Heap queue algorithm (a.k.a. priority queue).
Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for
all k, counting elements from 0. For the sake of comparison,
non-existing elements are considered to be infinite. The interesting
property of a heap is that a[0] is always its smallest element.
Usag... | gpl-3.0 |
Saicheg/omim | 3party/protobuf/python/google/protobuf/descriptor_database.py | 79 | 5075 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... | apache-2.0 |
gustavo-guimaraes/siga | backend/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/mbcharsetprober.py | 2924 | 3268 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | mit |
AkihikoITOH/capybara | capybara/virtualenv/lib/python2.7/site-packages/pip/utils/build.py | 899 | 1312 | from __future__ import absolute_import
import os.path
import tempfile
from pip.utils import rmtree
class BuildDirectory(object):
def __init__(self, name=None, delete=None):
# If we were not given an explicit directory, and we were not given an
# explicit delete option, then we'll default to del... | mit |
ssorgatem/qiime | qiime/categorized_dist_scatterplot.py | 15 | 2484 | #!/usr/bin/env python
# File created on 19 Jan 2010
from __future__ import division
__author__ = "Justin Kuczynski"
__copyright__ = "Copyright 2011, The QIIME Project"
__credits__ = ["Justin Kuczynski"]
__license__ = "GPL"
__version__ = "1.9.1-dev"
__maintainer__ = "Justin Kuczynski"
__email__ = "justinak@gmail.com"
... | gpl-2.0 |
fsquillace/pycious | tests/rc.py | 1 | 2263 | #!/usr/bin/python
from __future__ import division
from pycious.widgets.system import BatteryTextWidget, DateTextWidget, CPUGraphWidget
from pycious.widgets.web import MailTextWidget, GrssTextWidget
from pycious.api.timer import Timer
from pycious.api.widget import ImageBoxWidget
if __name__ == "__main__":
# ... | gpl-2.0 |
CyanogenMod/android_external_chromium_org | tools/licenses.py | 9 | 16671 | #!/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.
"""Utility for checking and processing licensing information in third_party
directories.
Usage: licenses.py <command>
Commands:
... | bsd-3-clause |
Allow2CEO/browser-ios | brave/node_modules/hashset-cpp/vendor/depot_tools/third_party/gsutil/gslib/commands/ls.py | 51 | 23261 | # Copyright 2011 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 a... | mpl-2.0 |
fernandoacorreia/DjangoWAWSLogging | DjangoWAWSLogging/env/Lib/site-packages/django/conf/locale/sr_Latn/formats.py | 655 | 1980 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. F Y.'
TIME_FORMAT = 'H:i'
DATETIME_FORMAT = 'j. F Y. H:i'
YEAR_MONTH_F... | mit |
barneygale/barneymc | barneymc/protocol/packet.py | 1 | 1741 | from time import gmtime, strftime
from data_types import *
from packet_structs import *
import packet_extensions
class Packet:
def __init__(self, **kargs):
self.ident = kargs.get('ident', 0)
self.direction = kargs.get('direction', CLIENT_TO_SERVER)
self.data = kargs.get('data', {}... | mit |
sinbazhou/odoo | addons/website_twitter/controllers/main.py | 355 | 1936 | from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.tools.translate import _
import json
class Twitter(http.Controller):
@http.route(['/twitter_reload'], type='json', auth="user", website=True)
def twitter_reload(self):
return request.website.fetch_favorite_twe... | agpl-3.0 |
MicroMappers/Pybossa | test/test_ckan.py | 5 | 23284 | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | agpl-3.0 |
daleooo/barrelfish | tools/harness/tests/clockdrift.py | 10 | 2168 | ##########################################################################
# Copyright (c) 2009, 2010, ETH Zurich.
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE file.
# If you do not find this file, copies can be found by writing to:
# ETH Zurich D-INFK, Haldeneggsteig 4, C... | mit |
karypun/change-of-address-prototype | node_modules/node-gyp/gyp/pylib/gyp/generator/android.py | 960 | 45344 | # Copyright (c) 2012 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.
# Notes:
#
# This generates makefiles suitable for inclusion into the Android build system
# via an Android.mk file. It is based on make.py, the standard makefile
... | mit |
2ndQuadrant/ansible | test/units/parsing/test_metadata.py | 32 | 9992 | # coding: utf-8
# (c) 2017, Toshio Kuratomi <tkuratomi@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 o... | gpl-3.0 |
collects/mutter | tools/release-wrangler.py | 9 | 12118 | #!/usr/bin/python
#
# release-wrangler.py - very basic release system, primarily for
# Metacity, might be useful for others. In very early stages of
# development.
#
# Copyright (C) 2008 Thomas Thurman
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Publ... | gpl-2.0 |
dinesh8055/django-poll-app-master | mysite/settings.py | 10 | 5485 | import os
# Django settings for mysite project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_p... | bsd-3-clause |
balloob/home-assistant | homeassistant/components/ozw/switch.py | 21 | 1277 | """Representation of Z-Wave switches."""
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN, SwitchEntity
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from .const import DATA_UNSUBSCRIBE, DOMAIN
from .entity import ZWaveDeviceEntity
as... | apache-2.0 |
AunShiLord/sympy | sympy/stats/tests/test_rv.py | 14 | 5021 | from sympy import (EmptySet, FiniteSet, S, Symbol, Interval, exp, erf, sqrt,
symbols, simplify, Eq, cos, And, Tuple, integrate, oo, sin, Sum, Basic,
DiracDelta)
from sympy.stats import (Die, Normal, Exponential, P, E, variance, covariance,
skewness, density, given, independent, dependent, where,... | bsd-3-clause |
pabloborrego93/edx-platform | cms/djangoapps/contentstore/views/tests/test_library.py | 25 | 9381 | """
Unit tests for contentstore.views.library
More important high-level tests are in contentstore/tests/test_libraries.py
"""
from contentstore.tests.utils import AjaxEnabledTestClient, parse_json
from contentstore.utils import reverse_course_url, reverse_library_url
from contentstore.views.component import get_compon... | agpl-3.0 |
gskachkov/phantomjs | src/breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/internal/cpp_message.py | 259 | 21288 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | bsd-3-clause |
groschovskiy/keyczar | cpp/src/tools/swtoolkit/site_scons/site_tools/component_bits.py | 9 | 9460 | #!/usr/bin/python2.4
# Copyright 2009, 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... | apache-2.0 |
ealgis/ealgis | django/ealgis/ealauth/signals.py | 2 | 1305 | from django.dispatch import receiver
from django.db.models.signals import post_save, pre_save
from django.contrib.auth.models import User
from .models import Profile
from .admin import is_private_site
from .mailgun import send_new_user_welcome_mail, send_new_user_signed_up_admin_mail, send_new_user_welcome_awaiting_app... | gpl-3.0 |
ian-garrett/meetMe | env/lib/python3.4/site-packages/pyasn1/type/constraint.py | 382 | 7279 | #
# ASN.1 subtype constraints classes.
#
# Constraints are relatively rare, but every ASN1 object
# is doing checks all the time for whether they have any
# constraints and whether they are applicable to the object.
#
# What we're going to do is define objects/functions that
# can be called unconditionally ... | artistic-2.0 |
henaras/horizon | openstack_dashboard/dashboards/project/databases/forms.py | 34 | 3867 | # Copyright 2014 Tesora 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... | apache-2.0 |
kvar/ansible | lib/ansible/modules/windows/win_domain_membership.py | 51 | 3428 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Red Hat, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'core'}
DOCUMENTATI... | gpl-3.0 |
rvmoura96/projeto-almoxarifado | myvenv/Lib/site-packages/pip/index.py | 336 | 39950 | """Routines related to PyPI, indexes"""
from __future__ import absolute_import
import logging
import cgi
from collections import namedtuple
import itertools
import sys
import os
import re
import mimetypes
import posixpath
import warnings
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.... | mit |
openaid-IATI/OIPA | OIPA/api/codelist/views.py | 1 | 4510 | from django.apps import apps
from django.core.exceptions import FieldError
from rest_framework.exceptions import NotFound
from rest_framework.filters import OrderingFilter
from rest_framework_extensions.cache.mixins import CacheResponseMixin
from api.codelist.filters import AllDjangoFilterBackend
from api.codelist.ser... | agpl-3.0 |
passiweinberger/nupic | examples/opf/experiments/multistep/hotgym_best_sp_5step_16K/description.py | 32 | 3269 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 |
bakkou-badri/dataminingproject | env/lib/python2.7/site-packages/werkzeug/testsuite/local.py | 102 | 4097 | # -*- coding: utf-8 -*-
"""
werkzeug.testsuite.local
~~~~~~~~~~~~~~~~~~~~~~~~
Local and local proxy tests.
:copyright: (c) 2013 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import time
import unittest
from threading import Thread
from werkzeug.testsuite import WerkzeugTestC... | gpl-2.0 |
computersalat/ansible | lib/ansible/plugins/callback/tree.py | 74 | 2351 | # (c) 2012-2014, Ansible, Inc
# (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
DOCUMENTATION = '''
callback: tree
callback_type: notification
requi... | gpl-3.0 |
hamada0021/limbo-android | jni/qemu/roms/seabios/tools/vgafixup.py | 49 | 1267 | #!/usr/bin/env python
# Work around x86emu bugs by replacing problematic instructions.
#
# Copyright (C) 2012 Kevin O'Connor <kevin@koconnor.net>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
# The x86emu code widely used in Linux distributions when running Xorg
# in vesamode is known to ... | gpl-2.0 |
mgit-at/ansible | lib/ansible/modules/storage/infinidat/infini_export.py | 70 | 5122 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Gregory Shulov (gregory.shulov@gmail.com)
# 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': '... | gpl-3.0 |
pombredanne/pulp | server/test/unit/server/async/test_app.py | 4 | 1101 | """
This module contains tests for the pulp.server.async.app module.
"""
import unittest
import mock
from pulp.server.async import app
class InitializeWorkerTestCase(unittest.TestCase):
"""
This class contains tests for the initialize_worker() function.
"""
@mock.patch('pulp.server.async.app.common_... | gpl-2.0 |
sfu-fas/coursys | oldcode/management/commands/crim_import.py | 1 | 5753 | from django.core.management.base import BaseCommand
from django.db import transaction
from django.core.files import File
from optparse import make_option
import csv
import datetime
import os.path
import mimetypes
from advisornotes.models import AdvisorNote
from coredata.models import Person, Unit
from coredata.queries... | gpl-3.0 |
jicruz/heroku-bot | lib/pip/_vendor/lockfile/linklockfile.py | 536 | 2652 | from __future__ import absolute_import
import time
import os
from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout,
AlreadyLocked)
class LinkLockFile(LockBase):
"""Lock access to a file using atomic property of link(2).
>>> lock = LinkLockFile('somefile')
>>> lock = Link... | gpl-3.0 |
shyamalschandra/neon | tests/utils.py | 15 | 2363 | # ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems 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.o... | apache-2.0 |
aligoren/pyalgo | evolutionary_algo.py | 1 | 1389 | from string import letters
from random import choice, random
target = list("METHINKS IT IS LIKE A WEASEL")
charset = letters + ' '
parent = [choice(charset) for _ in range(len(target))]
minmutaterate = .09
C = range(100)
perfectfitness = float(len(target))
def fitness(trial):
'Sum of matching chars by positio... | mit |
jtoppins/beaker | IntegrationTests/src/bkr/inttest/server/tools/test_sync_tasks.py | 2 | 6806 |
# 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.
import sys
import os
import subprocess
from bkr.inttest import Process... | gpl-2.0 |
bhargav2408/python-for-android | python-modules/twisted/twisted/test/test_threadable.py | 61 | 3233 | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
import sys, pickle
try:
import threading
except ImportError:
threading = None
from twisted.trial import unittest
from twisted.python import threadable
from twisted.internet import defer, reactor
class TestObject:
synchroni... | apache-2.0 |
ecosoft-odoo/odoo | addons/stock_account/__openerp__.py | 269 | 2348 | # -*- 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 |
Greennut/ostproject | django/contrib/gis/tests/relatedapp/tests.py | 198 | 14731 | from __future__ import absolute_import
from datetime import date
from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint
from django.contrib.gis.db.models import Collect, Count, Extent, F, Union
from django.contrib.gis.geometry.backend import Geometry
from django.contrib.gis.tests.utils import mysql, orac... | bsd-3-clause |
autrilla/servo | tests/wpt/harness/wptrunner/executors/executorservo.py | 10 | 9252 | # 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 base64
import hashlib
import json
import os
import subprocess
import tempfile
import threading
import urlparse
im... | mpl-2.0 |
openstack/python-glanceclient | glanceclient/tests/unit/test_progressbar.py | 1 | 3006 | # Copyright 2013 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 |
bigdatauniversity/edx-platform | lms/djangoapps/shoppingcart/migrations/0001_initial.py | 50 | 17858 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
import django.db.models.deletion
from django.conf import settings
import model_utils.fields
import xmodule_django.models
class Migration(migrations.Migration):
dependencies = [
... | agpl-3.0 |
aykut/django-oscar | oscar/apps/product/reviews/abstract_models.py | 1 | 5476 | from django.db import models
from django.utils.translation import gettext as _
from django.core.urlresolvers import reverse
from django.core.exceptions import ValidationError
from django.conf import settings
from django.db.models import Sum, Count
from oscar.apps.product.reviews.managers import (ApprovedReviewsManage... | bsd-3-clause |
kennedyshead/home-assistant | homeassistant/components/zwave/websocket_api.py | 8 | 2875 | """Web socket API for Z-Wave."""
import voluptuous as vol
from homeassistant.components import websocket_api
from homeassistant.components.ozw.const import DOMAIN as OZW_DOMAIN
from homeassistant.config_entries import SOURCE_IMPORT
from homeassistant.core import callback
from .const import (
CONF_AUTOHEAL,
CO... | apache-2.0 |
dentaku65/pelisalacarta | python/main-classic/servers/akstream.py | 9 | 4299 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector for akstream.net
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
# by be4t5
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
... | gpl-3.0 |
moble/sympy | sympy/vector/point.py | 42 | 4853 | from sympy.core.compatibility import range
from sympy.core.basic import Basic
from sympy.vector.vector import Vector
from sympy.vector.coordsysrect import CoordSysCartesian
from sympy.vector.functions import _path
from sympy import Symbol
from sympy.core.cache import cacheit
class Point(Basic):
"""
Represents... | bsd-3-clause |
Deepakkothandan/ansible | lib/ansible/modules/web_infrastructure/apache2_mod_proxy.py | 26 | 17140 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Olivier Boukili <boukili.olivier@gmail.com>
# 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':... | gpl-3.0 |
mozilla/kitchensinkserver | kitchensink/device/models.py | 1 | 1115 | """
device.models
-------------
"""
import logging
from django.db import models
from kitchensink.base.models import BaseModel
from kitchensink.device.managers import MakeManager
_log = logging.getLogger('kss.%s' % __name__)
class Make(BaseModel):
""" Which company made the device (i.e. LG)
"""
objects ... | bsd-3-clause |
wonabru/qcoin | contrib/spendfrom/spendfrom.py | 680 | 10053 | #!/usr/bin/env python
#
# Use the raw transactions API to spend bitcoins received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a bitcoind or Bit... | mit |
mnahm5/django-estore | Lib/site-packages/docutils/parsers/rst/languages/nl.py | 128 | 3708 | # $Id: nl.py 7119 2011-09-02 13:00:23Z milde $
# Author: Martijn Pieters <mjpieters@users.sourceforge.net>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be... | mit |
adamgf/zxing_iphone_pdf_417 | cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/ifl.py | 34 | 2808 | """SCons.Tool.ifl
Tool-specific initialization for the Intel Fortran compiler.
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, 2010 The... | apache-2.0 |
kost/volatility | volatility/plugins/mac/memdump.py | 14 | 2436 | # 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 |
aps-sids/zulip | zerver/lib/rate_limiter.py | 115 | 7145 | from __future__ import absolute_import
from django.conf import settings
from zerver.lib.redis_utils import get_redis_client
import redis
import time
import logging
from itertools import izip
# Implement a rate-limiting scheme inspired by the one described here, but heavily modified
# http://blog.domaintools.com/201... | apache-2.0 |
tlatzko/spmcluster | .tox/docs/lib/python2.7/site-packages/jinja2/runtime.py | 335 | 22530 | # -*- coding: utf-8 -*-
"""
jinja2.runtime
~~~~~~~~~~~~~~
Runtime helpers.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD.
"""
import sys
from itertools import chain
from jinja2.nodes import EvalContext, _context_function_types
from jinja2.utils import Markup, soft_unicode, escape, missing... | bsd-2-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.