repo_name stringlengths 5 100 | path stringlengths 4 294 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
objarni/splinter | splinter/driver/webdriver/firefox.py | 7 | 1689 | # -*- coding: utf-8 -*-
# Copyright 2012 splinter 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 selenium.webdriver import Firefox
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from splinter.driver.webdri... | bsd-3-clause |
kaiweifan/horizon | openstack_dashboard/openstack/common/rpc/impl_zmq.py | 19 | 27330 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Cloudscaling Group, 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/LI... | apache-2.0 |
refnode/django-material | tests/urls.py | 10 | 2701 | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views import generic
from django.shortcuts import render
from formtools.wizard.views import SessionWizardView
from material.frontend import urls as frontend_urls
from . import forms
def index_view(... | bsd-3-clause |
baloo/shinken | shinken/modules/nagios_retention_file_scheduler.py | 1 | 14015 | #!/usr/bin/python
#Copyright (C) 2009 Gabes Jean, naparuba@gmail.com
#
#This file is part of Shinken.
#
#Shinken 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 yo... | agpl-3.0 |
hspencer77/calyptos | calyptos/plugins/validator/storage.py | 3 | 2489 | from calyptos.plugins.validator.validatorplugin import ValidatorPlugin
class Storage(ValidatorPlugin):
def validate(self):
self.topology = self.environment['default_attributes']['eucalyptus']['topology']
if 'system-properties' in self.environment['default_attributes']['eucalyptus']:
sel... | bsd-2-clause |
lantz/nox-tutorial | src/nox/netapps/data/datacache_impl.py | 10 | 1317 | #
# Copyright 2009 (C) Nicira, Inc.
#
import logging
from nox.lib.core import Component
from nox.netapps.data.pydatacache import PyData_cache, Principal_delete_event
lg = logging.getLogger('nox.netapps.data.datacache')
class DataCache(Component):
def __init__(self, ctxt):
Component.__init__(self, ctxt)... | gpl-3.0 |
pleaseproject/python-for-android | python-modules/zope/zope/interface/tests/test_verify.py | 50 | 4612 | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... | apache-2.0 |
leighpauls/k2cro4 | v8/tools/testrunner/objects/context.py | 9 | 2331 | # Copyright 2012 the V8 project authors. 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 conditi... | bsd-3-clause |
job/pdns | pdns/dnsdistdist/docs/conf.py | 4 | 5977 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# dnsdist documentation build configuration file, created by
# sphinx-quickstart on Thu Feb 9 00:08:08 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# au... | gpl-2.0 |
GerritCodeReview/git-repo | subcmds/prune.py | 5 | 1970 | # -*- coding:utf-8 -*-
#
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | apache-2.0 |
petricm/DIRAC | FrameworkSystem/Client/UserProfileClient.py | 7 | 4566 |
import re
from DIRAC import S_OK, S_ERROR
from DIRAC.Core.DISET.RPCClient import RPCClient
from DIRAC.Core.Utilities import DEncode, Time
class UserProfileClient:
def __init__( self, profile, rpcClientFunctor = False ):
if rpcClientFunctor:
self.rpcClientFunctor = rpcClientFunctor
else:
self.rp... | gpl-3.0 |
larrybradley/astropy | astropy/table/tests/test_row.py | 8 | 12241 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import sys
import pytest
import numpy as np
from astropy import table
from astropy.table import Row
from astropy import units as u
from .conftest import MaskedTable
def test_masked_row_with_object_col():
"""
Numpy < 1.8 has a bug in masked arr... | bsd-3-clause |
Mako-kun/mangaki | mangaki/irl/migrations/0004_event_attendees.py | 3 | 1151 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-24 18:50
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('irl', '0003_auto_20160124_1... | agpl-3.0 |
ruiaylin/percona-xtrabackup | storage/innobase/xtrabackup/test/kewpie/percona_tests/xtrabackup_disabled/ib_basic_test.py | 24 | 4748 | #! /usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; -*-
# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
#
# Copyright (C) 2011 Patrick Crews
#
#
# 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 Softwar... | gpl-2.0 |
charleszheng44/cctools | prune/examples/hep/hep.py | 4 | 2059 | #!/usr/bin/env cctools_python
# CCTOOLS_PYTHON_VERSION 2.7 2.6
# Copyright (c) 2010- The University of Notre Dame.
# This software is distributed under the GNU General Public License.
# See the file COPYING for details.
from prune import client
from os.path import expanduser
HOME = expanduser("~")
prune = client.Co... | gpl-2.0 |
meteorfox/PerfKitBenchmarker | tests/windows_packages/ntttcp_test.py | 7 | 2436 | # Copyright 2015 PerfKitBenchmarker 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 |
stephane-martin/salt-debian-packaging | salt-2016.3.3/salt/cloud/clouds/scaleway.py | 1 | 12629 | # -*- coding: utf-8 -*-
'''
Scaleway Cloud Module
=====================
.. versionadded:: 2015.8.0
The Scaleway cloud module is used to interact with your Scaleway BareMetal
Servers.
Use of this module only requires the ``api_key`` parameter to be set. Set up
the cloud configuration at ``/etc/salt/cloud.providers`` ... | apache-2.0 |
savoirfairelinux/shinken | shinken/contactdowntime.py | 9 | 4255 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part of Shinken.
#
# Shinken is free software: you c... | agpl-3.0 |
rwanyoike/time2relax | tests/test_utils.py | 1 | 2826 | import pytest
from time2relax import exceptions, utils
def test_encode_uri_component():
assert utils.encode_uri_component('escaped%2F1') == 'escaped%252F1'
assert utils.encode_uri_component('a/b/c') == 'a%2Fb%2Fc'
assert utils.encode_uri_component('az09_$()+-') == 'az09_%24()%2B-'
def test_encode_attac... | mit |
sabas/openaddresses | scripts/at/split.py | 38 | 1591 | # -*- coding: utf-8 -*-
import __future__
import csv, sys, json, copy, datetime, time
def main(address_filename, street_filename):
timestamp = datetime.datetime.now().strftime('%Y%m%d')
streets = {}
with open(street_filename) as f:
reader = csv.reader(f, delimiter=';')
next(reader)
... | bsd-3-clause |
valkyriesavage/invenio | modules/webbasket/lib/webbasket_templates.py | 1 | 179905 | ## This file is part of Invenio.
## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your ... | gpl-2.0 |
izakp/hokusai | hokusai/commands/push.py | 1 | 1727 | import os
from hokusai.lib.command import command
from hokusai.lib.config import config
from hokusai.services.ecr import ECR
from hokusai.lib.common import print_green, shout
from hokusai.lib.exceptions import HokusaiError
from hokusai.services.docker import Docker
@command()
def push(tag, local_tag, build, filename,... | mit |
mburakergenc/Malware-Detection-using-Machine-Learning | cuckoo/modules/processing/suricata.py | 1 | 10407 | # Copyright (C) 2010-2013 Claudio Guarnieri.
# Copyright (C) 2014-2016 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import json
import logging
import os
import shutil
import subprocess
import time
from lib.cuckoo.common.a... | mit |
motmot/libcamiface | prosilica_help.py | 1 | 1097 | """check the installed Prosilica GigE SDK version number"""
import ctypes, sys
global _libprosilica
_libprosilica = None
ULong = ctypes.c_long # XXX should be unsigned long
def _load_libprosilica():
"""load the prosilica shared library"""
global _libprosilica
if _libprosilica is None:
if sys.pla... | bsd-2-clause |
yanheven/horizon | openstack_dashboard/dashboards/admin/flavors/panel.py | 46 | 1059 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 |
datenbetrieb/odoo | openerp/addons/test_impex/tests/test_import.py | 231 | 30712 | # -*- coding: utf-8 -*-
import openerp.modules.registry
import openerp
from openerp.tests import common
from openerp.tools.misc import mute_logger
def ok(n):
""" Successful import of ``n`` records
:param int n: number of records which should have been imported
"""
return n, 0, 0, 0
def error(row, me... | agpl-3.0 |
openstack/cinder | tools/config/generate_cinder_opts.py | 2 | 10022 | #!/usr/bin/env python3
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | apache-2.0 |
odoo-turkiye/odoo | addons/mrp/report/__init__.py | 378 | 1122 | # -*- 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 |
lebedov/hide_my_python | ez_setup.py | 18 | 10476 | #!/usr/bin/env python
"""Bootstrap setuptools installation
To use setuptools in your package's setup.py, include this
file in the same directory and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
To require a specific version of setuptools, set a download
mirror, ... | gpl-3.0 |
newerthcom/savagerebirth | libs/python-2.72/Lib/profile.py | 84 | 23466 | #! /usr/bin/env python
#
# Class for profiling python code. rev 1.0 6/2/94
#
# Based on prior profile module by Sjoerd Mullender...
# which was hacked somewhat by: Guido van Rossum
"""Class for profiling Python code."""
# Copyright 1994, by InfoSeek Corporation, all rights reserved.
# Written by James Roskind
#
# ... | gpl-2.0 |
shownomercy/django | django/views/static.py | 190 | 5142 | """
Views and functions for serving static files. These are only to be used
during development, and SHOULD NOT be used in a production setting.
"""
from __future__ import unicode_literals
import mimetypes
import os
import posixpath
import re
import stat
from django.http import (
FileResponse, Http404, HttpRespons... | bsd-3-clause |
RaspberryPiFi/PiCode | lib/eyed3/plugins/statistics.py | 3 | 16127 | # -*- coding: utf-8 -*-
################################################################################
# Copyright (C) 2009 Travis Shirk <travis@pobox.com>
#
# 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 So... | gpl-2.0 |
codrut3/tensorflow | tensorflow/contrib/tensor_forest/hybrid/python/models/nn.py | 190 | 1567 | # 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 |
hiepthai/django-activity-stream | actstream/migrations/0002_auto__chg_field_action_timestamp.py | 8 | 5778 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from actstream.compat import user_model_label
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Action.timestamp'
db.alter_column('actstream_act... | bsd-3-clause |
80vs90/libsaas | libsaas/services/basecamp/calendars.py | 4 | 1639 | from libsaas import http, parsers
from libsaas.services import base
from .resource import BasecampResource
from .comments import Comments
from . import accesses as acc
class CalendarEventResource(BasecampResource):
path = 'calendar_events'
class CalendarEvents(CalendarEventResource):
@base.apimethod
d... | mit |
akvo/akvo-sites-zz-template | code/wp-content/themes/akvo-sites/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py | 1835 | 1748 | #!/usr/bin/env python
# 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.
"""These functions are executed via gyp-flock-tool when using the Makefile
generator. Used on systems that don't have a built-in flock."""
... | agpl-3.0 |
rahul67/hue | desktop/core/ext-py/requests-2.6.0/setup.py | 40 | 2124 | #!/usr/bin/env python
import os
import re
import sys
from codecs import open
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
packages = [
'requests',
'requests.packages'... | apache-2.0 |
Therp/odoo | addons/document/std_index.py | 430 | 7457 | # -*- 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... | agpl-3.0 |
joakim-hove/opm-common | python/pybind11/docs/conf.py | 9 | 10659 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# pybind11 documentation build configuration file, created by
# sphinx-quickstart on Sun Oct 11 19:23:48 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# a... | gpl-3.0 |
mbaijal/incubator-mxnet | example/memcost/inception_memcost.py | 44 | 5758 | # 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 |
Microsoft/Tocino | src/visualizer/bindings/modulegen__gcc_LP64.py | 82 | 361459 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 |
thomazs/geraldo | site/newsite/django_1_0/django/db/backends/__init__.py | 9 | 9142 | try:
# Only exists in Python 2.4+
from threading import local
except ImportError:
# Import copy of _thread_local.py from Python 2.4
from django.utils._threading_local import local
class BaseDatabaseWrapper(local):
"""
Represents a database connection.
"""
ops = None
def __init__(sel... | lgpl-3.0 |
joxer/Baka-No-Voltron | tmp/android.dist/private/renpy/dump.py | 1 | 6422 | # Copyright 2004-2015 Tom Rothamel <pytom@bishoujo.us>
#
# 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, modify, m... | gpl-2.0 |
h4ck3rm1k3/MapNickAutotools | scons/scons-local-1.2.0/SCons/Tool/rpm.py | 12 | 4426 | """SCons.Tool.rpm
Tool-specific initialization for rpm.
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.
The rpm tool calls the rpmbuild command. The first and only argument should a
tar.gz consisting of the sourc... | lgpl-2.1 |
ram8647/gcb-mobilecsp | modules/analytics/page_event_aggregator.py | 1 | 14112 | # Copyright 2014 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 ... | apache-2.0 |
flyher/pymo | symbian/PythonForS60/module-repo/standard-modules/xml/sax/xmlreader.py | 28 | 12656 | """An XML Reader is the SAX 2 name for an XML parser. XML Parsers
should be based on this code. """
import handler
from _exceptions import SAXNotSupportedException, SAXNotRecognizedException
# ===== XMLREADER =====
class XMLReader:
"""Interface for reading an XML document using callbacks.
XMLReader is the... | mit |
diefenbach/django-lfs | lfs/manage/discounts/views.py | 1 | 11722 | import json
# django imports
from django.contrib.auth.decorators import permission_required
from django.core.exceptions import ObjectDoesNotExist
from django.core.paginator import Paginator, EmptyPage
from django.urls import reverse
from django.db.models import Q
from django.http import HttpResponseRedirect
from djang... | bsd-3-clause |
SnappleCap/oh-mainline | mysite/profile/migrations/0032_put_the_last_polled_field_back_into_person.py | 17 | 5659 | # This file is part of OpenHatch.
# Copyright (C) 2009 OpenHatch, Inc.
#
# 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 Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | agpl-3.0 |
Intel-Corporation/tensorflow | tensorflow/python/keras/optimizer_v2/adamax.py | 8 | 7131 | # 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 |
TridentSDK/TridentSDK | scripts/ids/items.py | 1 | 1853 | #!/usr/bin/env python3
import bs4
import json
import urllib.request
from collections import OrderedDict
url = '''
http://minecraft.gamepedia.com/api.php?action=parse&format=json&prop=text&title=Data_values&text=%7B%7B%3AData+values%2FItem+IDs%7D%7D
'''.strip()
def get_items_data():
req = urllib.request.Request(... | apache-2.0 |
NathanAtSamraksh/dart-linux | Documentation/networking/cxacru-cf.py | 14668 | 1626 | #!/usr/bin/env python
# Copyright 2009 Simon Arlott
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program i... | gpl-2.0 |
caisq/tensorflow | tensorflow/python/ops/collective_ops.py | 25 | 5901 | # 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 |
cgstudiomap/cgstudiomap | main/eggs/Shapely-1.5.13-py2.7.egg/shapely/geometry/proxy.py | 17 | 1341 | """Proxy for coordinates stored outside Shapely geometries
"""
from shapely.geometry.base import deserialize_wkb, EMPTY
from shapely.geos import lgeos
class CachingGeometryProxy(object):
context = None
factory = None
__geom__ = EMPTY
_gtag = None
def __init__(self, context):
self.contex... | agpl-3.0 |
fritsvanveen/QGIS | python/plugins/processing/algs/lidar/lastools/las2demPro.py | 5 | 4084 | # -*- coding: utf-8 -*-
"""
***************************************************************************
las2demPro.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
---------------------
... | gpl-2.0 |
lmazuel/azure-sdk-for-python | azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/boot_diagnostics_py3.py | 5 | 1526 | # 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 |
J-CPelletier/webcomix | webcomix/tests/test_search.py | 2 | 4068 | from webcomix.comic import Comic
from webcomix.search import discovery
from webcomix.tests.fake_websites.fixture import (
one_webpage_searchable_uri,
three_webpages_uri,
three_webpages_classes_uri,
)
def test_search_searchable_website(mocker, three_webpages_classes_uri):
expected = Comic(
"Bli... | mit |
j0nathan33/CouchPotatoServer | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/normalboots.py | 19 | 2263 | # encoding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
unified_strdate,
)
class NormalbootsIE(InfoExtractor):
_VALID_URL = r'http://(?:www\.)?normalboots\.com/video/(?P<videoid>[0-9a-z-]*)/?$'
_TEST = {
'url': 'http://normalbo... | gpl-3.0 |
browseinfo/odoo_saas3_nicolas | openerp/addons/base/res/ir_property.py | 9 | 7527 | # -*- 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... | agpl-3.0 |
arhote/exchange | exchange/fileservice/helpers.py | 1 | 1043 | from django.conf import settings
import os
def get_streaming_supported():
"""
example settings file
FILESERVICE_CONFIG = {
'streaming_supported': True
}
"""
conf = getattr(settings, 'FILESERVICE_CONFIG', {})
return conf.get('streaming_supported', False)
def get_fileservice_dir():... | gpl-3.0 |
alaski/nova | nova/api/openstack/compute/evacuate.py | 4 | 5688 | # Copyright 2013 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 a... | apache-2.0 |
awslabs/s2n | tests/integration/common/s2n_test_reporting.py | 3 | 1976 | ##
# Copyright Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or in the "license" file accompany... | apache-2.0 |
SickGear/SickGear | lib/hachoir_py2/parser/video/amf.py | 2 | 3239 | """
AMF metadata (inside Flash video, FLV file) parser.
Documentation:
- flashticle: Python project to read Flash (formats SWF, FLV and AMF)
http://undefined.org/python/#flashticle
Author: Victor Stinner
Creation date: 4 november 2006
"""
from hachoir_py2.field import (FieldSet, ParserError,
... | gpl-3.0 |
schleichdi2/OpenNfr_E2_Gui-6.0 | lib/python/Screens/Ci.py | 5 | 27345 | from Screen import Screen
from Screens.MessageBox import MessageBox
from Components.ConfigList import ConfigListScreen
from Components.ActionMap import ActionMap
from Components.ActionMap import NumberActionMap
from Components.Label import Label
from Components.Pixmap import Pixmap
from Components.Console import Consol... | gpl-2.0 |
DavidPurcell/murano_temp | murano/tests/unit/api/v1/test_sessions.py | 1 | 16337 | # Copyright (c) 2015 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 |
newswangerd/ansible | lib/ansible/template/native_helpers.py | 31 | 3191 | # Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ast import literal_eval
from itertools import islice, chain
i... | gpl-3.0 |
rohitranjan1991/home-assistant | homeassistant/components/notify/instapush.py | 2 | 3638 | """
homeassistant.components.notify.instapush
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Instapush notification service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.instapush.html
"""
import logging
import json
from homeassistant.helpers import... | mit |
amghost/myblog | node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/__init__.py | 194 | 7698 | # -*- coding: utf-8 -*-
"""
pygments.lexers
~~~~~~~~~~~~~~~
Pygments lexers.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
import types
import fnmatch
from os.path import basename
from pygments.lexers._mapping import LEX... | mit |
graik/biskit | biskit/amberResidueLibrary.py | 1 | 8496 | ##
## Biskit, a toolkit for the manipulation of macromolecular structures
## Copyright (C) 2004-2018 Raik Gruenberg
##
## 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
... | gpl-3.0 |
Kraxi/YTplaylist | venv/Lib/site-packages/wheel/pep425tags.py | 220 | 2861 | """Generate and work with PEP 425 Compatibility Tags."""
import sys
try:
import sysconfig
except ImportError: # pragma nocover
# Python < 2.7
import distutils.sysconfig as sysconfig
import distutils.util
def get_abbr_impl():
"""Return abbreviated implementation name."""
if hasattr(sys, 'pypy_ve... | gpl-2.0 |
ninotoshi/tensorflow | tensorflow/python/training/saver_test.py | 3 | 49397 | # Copyright 2015 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... | apache-2.0 |
sestrella/ansible | lib/ansible/modules/network/cloudengine/ce_ip_interface.py | 5 | 24258 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 |
ivansib/sentinel | bin/dbtest.py | 1 | 1930 | # -*- coding: utf-8 -*-
import pdb
from pprint import pprint
import re
import sys
import os
sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '../lib')))
import config
from models import Superblock, Proposal, GovernanceObject, Setting, Signal, Vote, Outcome
from models import VoteSignals, VoteOut... | mit |
robertaabreu/FatecJS | projetoTeckton/backend/appengine/routes/courses/rest.py | 28 | 1086 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from gaebusiness.business import CommandExecutionException
from tekton.gae.middleware.json_middleware import JsonResponse
from course_app import facade
def index():
cmd = facade.list_courses_cmd()
course_list = cmd()
short_fo... | mit |
jendap/tensorflow | tensorflow/python/keras/utils/tf_utils.py | 1 | 10787 | # 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 |
saumishr/django | tests/urls.py | 91 | 1189 | from django.conf.urls import patterns, include
urlpatterns = patterns('',
# test_client modeltest urls
(r'^test_client/', include('modeltests.test_client.urls')),
(r'^test_client_regress/', include('regressiontests.test_client_regress.urls')),
# File upload test views
(r'^file_uploads/', include('... | bsd-3-clause |
3dfxsoftware/cbss-addons | gamification/__openerp__.py | 62 | 2433 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 OpenERP SA (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | gpl-2.0 |
lantianlz/zx | www/misc/oauth2/sina.py | 1 | 2675 | # -*- coding: utf-8 -*-
'''
@author: lizheng
@date: 2014-01-01
'''
import requests
import urllib
import re
import json
from pprint import pprint
from django.conf import settings
CLIENT_ID = '266639437'
CLIENT_SECRET = 'b10ce4a1500d819a2c5437b7d6d1ea79'
API_URL = 'https://api.weibo.com'
REDIRECT_URI = '%s/account/oau... | gpl-2.0 |
moyaproject/moya | moya/tests/test_urlmapper.py | 1 | 3878 | import unittest
from moya import urlmapper
from moya.urlmapper import RouteMatch
class TestURLMapper(unittest.TestCase):
def setUp(self):
self.mapper = urlmapper.URLMapper()
self.mapper.map("/", "front")
self.mapper.map("/page/", "page", defaults={"page": "front"})
self.mapper.map(... | mit |
rdio/translate-toolkit | convert/po2ical.py | 3 | 2540 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2002-2006 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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... | gpl-2.0 |
v1bri/gnuradio | gr-zeromq/python/zeromq/rpc_manager.py | 25 | 3805 | #
# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio.
#
# This 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, or (at your option)
# any later version.
#
# Thi... | gpl-3.0 |
mxOBS/deb-pkg_trusty_chromium-browser | third_party/webpagereplay/httpclient_test.py | 4 | 7389 | #!/usr/bin/env python
# Copyright 2012 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... | bsd-3-clause |
TeamTwisted/external_chromium_org | tools/cr/cr/commands/run.py | 45 | 1663 | # Copyright 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.
"""A module for the run command."""
import cr
class RunCommand(cr.Command):
"""The implementation of the run command.
This first uses Builder to brin... | bsd-3-clause |
chotchki/servo | python/mach/mach/test/test_conditions.py | 28 | 2848 | # 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/.
from __future__ import unicode_literals
import os
from mach.base import MachError
from mach.main import Mach
from mach... | mpl-2.0 |
paulmadore/Eric-IDE | 6-6.0.9/eric/Graphics/AssociationItem.py | 2 | 19298 | # -*- coding: utf-8 -*-
# Copyright (c) 2004 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing a graphics item for an association between two items.
"""
from __future__ import unicode_literals
from PyQt5.QtCore import QPointF, QRectF, QLineF
from PyQt5.QtWidgets import QGraphicsItem
from... | gpl-3.0 |
kelvin13/shifty-octocat | pygments/lexers/d.py | 47 | 9530 | # -*- coding: utf-8 -*-
"""
pygments.lexers.d
~~~~~~~~~~~~~~~~~
Lexers for D languages.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, include, words
from pygments.token import Text, Comment, Ke... | gpl-3.0 |
makaimc/mms-picture-roulette | roulette/views.py | 1 | 1859 | import json
import random
import requests
from flask import request
from twilio.rest import TwilioRestClient
from . import app
from config import FLICKR_API_KEY
client = TwilioRestClient()
@app.route('/', methods=['GET', 'POST'])
def send_image():
if request.method == 'GET':
return 'The deployment work... | bsd-3-clause |
StefanRijnhart/odoo | addons/sale_mrp/tests/test_move_explode.py | 149 | 3045 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
manipopopo/tensorflow | tensorflow/contrib/boosted_trees/python/ops/boosted_trees_ops_loader.py | 79 | 1283 | # 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 |
FearNGreed/unbroken | contrib/spendfrom/spendfrom.py | 2 | 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 |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/operations/_private_dns_zone_groups_operations.py | 1 | 22889 | # 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 may ... | mit |
rokuz/omim | 3party/osrm/osrm-backend/cmake/cmake_options_script.py | 80 | 1514 | # Based on @berenm's pull request https://github.com/quarnster/SublimeClang/pull/135
# Create the database with cmake with for example: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
# or you could have set(CMAKE_EXPORT_COMPILE_COMMANDS ON) in your CMakeLists.txt
# Usage within SublimeClang:
# "sublimeclang_options_scri... | apache-2.0 |
jeremiahmarks/sl4a | python/src/Demo/curses/life.py | 43 | 7349 | #!/usr/bin/env python
# life.py -- A curses-based version of Conway's Game of Life.
# Contributed by AMK
#
# An empty board will be displayed, and the following commands are available:
# E : Erase the board
# R : Fill the board randomly
# S : Step for a single generation
# C : Update continuously until a key is str... | apache-2.0 |
1200wd/1200wd_addons | account_margin_actual_cost/report/account_invoice_report.py | 1 | 2292 | # -*- coding: utf-8 -*-
#
# Account Invoice - Actual Costs and Margins
# © 1200 WebDevelopment <http://1200wd.com/>
# 2016 November
#
# 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 Free Software... | agpl-3.0 |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/DataHandlers/Mcl_Cmd_DomainController_DataHandler.py | 1 | 4370 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: Mcl_Cmd_DomainController_DataHandler.py
def DataHandlerMain(namespace, InputFilename, OutputFilename):
import mcl.imports
import mcl.data.I... | unlicense |
openego/eDisGo | edisgo/flex_opt/storage_integration.py | 1 | 4762 | from math import sqrt
from edisgo.grid.components import Storage, Line, LVStation
from edisgo.grid.grids import MVGrid
from edisgo.grid.tools import select_cable
def storage_at_hvmv_substation(mv_grid, parameters, mode=None):
"""
Place storage at HV/MV substation bus bar.
Parameters
----------
mv... | agpl-3.0 |
luotao1/Paddle | python/paddle/fluid/tests/unittests/test_print_op.py | 2 | 5661 | # 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 |
procangroup/edx-platform | openedx/core/djangoapps/content/block_structure/exceptions.py | 25 | 1044 | """
Application-specific exceptions raised by the block structure framework.
"""
class BlockStructureException(Exception):
"""
Base class for all Block Structure framework exceptions.
"""
pass
class TransformerException(BlockStructureException):
"""
Exception class for Transformer related er... | agpl-3.0 |
krishnazure/Flask | Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/setuptools/tests/test_test.py | 286 | 3710 | # -*- coding: UTF-8 -*-
"""develop tests
"""
import sys
import os, shutil, tempfile, unittest
import tempfile
import site
from distutils.errors import DistutilsError
from setuptools.compat import StringIO
from setuptools.command.test import test
from setuptools.command import easy_install as easy_install_pkg
from set... | apache-2.0 |
almir-sne/backup | Inteligência artificial/EP1/ep1ai_almir/robot.py | 1 | 5657 | # -*- coding: latin-1 -*-
from state import *
from copy import copy
# A classe robot representa um robo
# state_map representa o mapa interno do robo, que é construido conforme ele anda
# start é a posição inicial
# position é a posição atual do robo
# goal é o objetivo
# open_list guarda os estados que estão com t =... | mit |
dasch/avro | lang/py3/avro/tests/av_bench.py | 21 | 3194 | #!/usr/bin/env python3
# -*- mode: python -*-
# -*- 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... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.