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 |
|---|---|---|---|---|---|
iPlantCollaborativeOpenSource/libcloud | libcloud/compute/drivers/dimensiondata.py | 3 | 111683 | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | apache-2.0 |
nextgis/ngq_compulink | qgis-plugin/src/ngw_compulink/qt_compulink_proxy_model.py | 2 | 2074 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
CompulinkToolsPlugin
A QGIS plugin
Compulink QGIS tools
-------------------
begin : 2014-10-31
git sha : $... | gpl-2.0 |
bask/or-tools | examples/python/set_covering_skiena.py | 34 | 3500 | # Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com
#
# 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 ... | apache-2.0 |
lemonade512/BluebonnetsPointsApp | bluebonnetspointsapp/lib/flask/testsuite/reqctx.py | 557 | 5960 | # -*- coding: utf-8 -*-
"""
flask.testsuite.reqctx
~~~~~~~~~~~~~~~~~~~~~~
Tests the request context.
:copyright: (c) 2012 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import unittest
try:
from greenlet import greenlet
except ImportError:
greenlet = None... | gpl-3.0 |
nimzco/Environment | Sublime/Packages/TypeScript/typescript/listeners/nav_to.py | 7 | 1797 | from ..commands.nav_to import TypescriptNavToCommand
from ..libs.view_helpers import *
from ..libs import *
from .event_hub import EventHub
class NavToEventListener:
"""Event listeners for the TypescriptNavToCommand"""
def on_activated_special_view(self, view):
if TypescriptNavToCommand.nav_to_panel_s... | mit |
badloop/SickRage | lib/html5lib/tokenizer.py | 1710 | 76929 | from __future__ import absolute_import, division, unicode_literals
try:
chr = unichr # flake8: noqa
except NameError:
pass
from collections import deque
from .constants import spaceCharacters
from .constants import entities
from .constants import asciiLetters, asciiUpper2Lower
from .constants import digits, ... | gpl-3.0 |
BT-fgarbely/l10n-switzerland | l10n_ch_fds_upload_dd/models/__init__.py | 3 | 1102 | # -*- coding: utf-8 -*-
##############################################################################
#
# Swiss Postfinance File Delivery Services module for Odoo
# Copyright (C) 2014 Compassion CH
# @author: Nicolas Tran
#
# This program is free software: you can redistribute it and/or modify
# ... | agpl-3.0 |
wdv4758h/ZipPy | edu.uci.python.benchmark/src/benchmarks/python-graph/tests/unittests-sorting.py | 1 | 3085 | # Copyright (c) Pedro Matiello <pmatiello@gmail.com>
#
# 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... | bsd-3-clause |
jokajak/itweb | data/env/lib/python2.6/site-packages/Pygments-1.1.1-py2.6.egg/pygments/filters/__init__.py | 5 | 9514 | # -*- coding: utf-8 -*-
"""
pygments.filters
~~~~~~~~~~~~~~~~
Module containing filter lookup functions and default
filters.
:copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
try:
set
except NameError:
from sets import Set as... | gpl-3.0 |
mahmoud/wapiti | wapiti/operations/feedback.py | 1 | 1807 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from base import QueryOperation
from params import SingleParam, StaticParam
from utils import OperationExample
#class GetFeedbackV4(QueryOperation):
# """
# This API is no longer available (on en or de wikipedia). As of
# 3/9/2013, this API do... | bsd-3-clause |
havard024/prego | venv/lib/python2.7/site-packages/html5lib/treewalkers/etree.py | 27 | 4383 | import gettext
_ = gettext.gettext
import new
import copy
import re
import _base
from html5lib.constants import voidElements
tag_regexp = re.compile("{([^}]*)}(.*)")
moduleCache = {}
def getETreeModule(ElementTreeImplementation):
name = "_" + ElementTreeImplementation.__name__+"builder"
if name in moduleCa... | mit |
nikitasingh981/scikit-learn | examples/preprocessing/plot_scaling_importance.py | 45 | 5269 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=========================================================
Importance of Feature Scaling
=========================================================
Feature scaling though standardization (or Z-score normalization)
can be an important preprocessing step for many machine learn... | bsd-3-clause |
vladan-m/ggrc-core | src/ggrc/behave.py | 7 | 2604 | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
from __future__ import absolute_import
import ggrc
import ggrc.settings
import... | apache-2.0 |
dims/nova | nova/tests/unit/virt/vmwareapi/test_ds_util.py | 9 | 21554 | # Copyright (c) 2014 VMware, 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 a... | apache-2.0 |
xodus7/tensorflow | tensorflow/python/ops/array_ops.py | 2 | 97810 | # 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 |
fyffyt/pylearn2 | pylearn2/sandbox/cuda_convnet/pool.py | 47 | 28462 | """
.. todo::
WRITEME
"""
import warnings
from theano.gof import Apply
from theano.sandbox.cuda import CudaNdarrayType
from theano.sandbox.cuda.basic_ops import as_cuda_ndarray_variable
from theano.sandbox.cuda.basic_ops import gpu_contiguous
from theano.sandbox.cuda import GpuOp
from theano.tensor import get_sca... | bsd-3-clause |
phargogh/paver | paver/deps/six.py | 271 | 23462 | """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... | bsd-3-clause |
megaumi/django | django/template/loaders/filesystem.py | 418 | 2158 | """
Wrapper for loading templates from the filesystem.
"""
import errno
import io
import warnings
from django.core.exceptions import SuspiciousFileOperation
from django.template import Origin, TemplateDoesNotExist
from django.utils._os import safe_join
from django.utils.deprecation import RemovedInDjango20Warning
fr... | bsd-3-clause |
loganlinn/mlia | resources/Ch10/kMeans.py | 3 | 6419 | '''
Created on Feb 16, 2011
k Means Clustering for Ch10 of Machine Learning in Action
@author: Peter Harrington
'''
from numpy import *
def loadDataSet(fileName): #general function to parse tab -delimited floats
dataMat = [] #assume last column is target value
fr = open(fileName)
... | epl-1.0 |
guijomatos/SickRage | lib/hachoir_parser/container/ogg.py | 95 | 11864 | #
# Ogg parser
# Author Julien Muchembled <jm AT jm10.no-ip.com>
# Created: 10 june 2006
#
from hachoir_parser import Parser
from hachoir_core.field import (Field, FieldSet, createOrphanField,
NullBits, Bit, Bits, Enum, Fragment, MissingField, ParserError,
UInt8, UInt16, UInt24, UInt32, UInt64,
RawBytes, S... | gpl-3.0 |
pazeshun/jsk_apc | demos/grasp_fusion/grasp_fusion_lib/contrib/grasp_fusion/extensions/sigmoid_segmentation_vis_report.py | 2 | 3460 | import copy
import os
import os.path as osp
import shutil
import chainer
from chainer import training
import numpy as np
import skimage.io
import grasp_fusion_lib
class SigmoidSegmentationVisReport(training.Extension):
def __init__(self, iterator, model, channel_names, shape=(3, 3)):
self.model = model... | bsd-3-clause |
fspaolo/scikit-learn | sklearn/datasets/olivetti_faces.py | 10 | 4043 | """Modified Olivetti faces dataset.
The original database was available from (now defunct)
http://www.uk.research.att.com/facedatabase.html
The version retrieved here comes in MATLAB format from the personal
web page of Sam Roweis:
http://www.cs.nyu.edu/~roweis/
There are ten different images of each of 40... | bsd-3-clause |
irinabov/debian-qpid-python | qpid/selector.py | 2 | 6778 | #
# 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... | apache-2.0 |
sunny-wyb/xen-4.1.2 | dist/install/usr/lib/python2.7/site-packages/xen/xm/resources.py | 49 | 2492 | #============================================================================
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope th... | gpl-2.0 |
teltek/edx-platform | openedx/core/djangoapps/theming/template_loaders.py | 16 | 2392 | """
Theming aware template loaders.
"""
from django.core.exceptions import SuspiciousFileOperation
from django.template.loaders.filesystem import Loader as FilesystemLoader
from django.utils._os import safe_join
from edxmako.makoloader import MakoLoader
from openedx.core.djangoapps.theming.helpers import get_all_theme... | agpl-3.0 |
piotroxp/scibibscan | scib/lib/python3.5/site-packages/astropy/vo/client/async.py | 2 | 2392 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Asynchronous VO service requests."""
from __future__ import absolute_import, division, print_function, unicode_literals
# LOCAL
from ...utils.compat.futures import ThreadPoolExecutor
__all__ = ['AsyncBase']
class AsyncBase(object):
"""Base clas... | mit |
frrp/trading-with-python | cookbook/getDataFromYahooFinance.py | 77 | 1391 | # -*- coding: utf-8 -*-
"""
Created on Sun Oct 16 18:37:23 2011
@author: jev
"""
from urllib import urlretrieve
from urllib2 import urlopen
from pandas import Index, DataFrame
from datetime import datetime
import matplotlib.pyplot as plt
sDate = (2005,1,1)
eDate = (2011,10,1)
symbol = 'SPY'
fNa... | bsd-3-clause |
redhat-openstack/django | django/contrib/gis/db/backends/spatialite/introspection.py | 221 | 2147 | from django.contrib.gis.gdal import OGRGeomType
from django.db.backends.sqlite3.introspection import DatabaseIntrospection, FlexibleFieldLookupDict
from django.utils import six
class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict):
"""
Sublcass that includes updates the `base_data_types_reverse` dict
f... | bsd-3-clause |
Xowap/ansible | lib/ansible/plugins/lookup/env.py | 251 | 1071 | # (c) 2012, Jan-Piet Mens <jpmens(at)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) any later ver... | gpl-3.0 |
hnjamba/onaclone | onadata/apps/sms_support/providers/__init__.py | 11 | 2587 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from smssync import (import_submission as imp_sub_smssync,
import_submission_for_form as imp_sub_form_smssync,
... | bsd-2-clause |
django-inplaceedit/django-inplaceedit | inplaceeditform/settings.py | 1 | 2626 | # -*- coding: utf-8 -*-
# Copyright (c) 2010-2013 by Yaco Sistemas <goinnn@gmail.com>
# 2015 by Pablo Martín <goinnn@gmail.com>
# This program 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 Foundatio... | lgpl-3.0 |
kohnle-lernmodule/palama | exe/engine/idevicestore.py | 1 | 36506 | # ===========================================================================
# eXe
# Copyright 2004-2006, University of Auckland
# Copyright 2004-2008 eXe Project, http://eXeLearning.org/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as... | gpl-2.0 |
40223114/2015_g4 | static/Brython3.1.0-20150301-090019/Lib/site-packages/pygame/rect.py | 603 | 13689 | #!/usr/bin/env python
'''Pygame object for storing rectangular coordinates.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id$'
import copy
#import SDL.video
import SDL
class _RectProxy:
'''Proxy for SDL_Rect that can handle negative size.'''
__slots__ = ['x', 'y', 'w', 'h']
def __init__(self... | gpl-3.0 |
Codefans-fan/odoo | addons/stock/wizard/stock_transfer_details.py | 49 | 8368 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.odoo.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... | agpl-3.0 |
someorz/spark | python/pyspark/mllib/linalg/distributed.py | 49 | 54544 | #
# 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 |
mabotech/maboss.py | maboss/models/label/certificate.py | 2 | 1962 | # -*- coding: utf-8 -*-
from sqlalchemy import create_engine, func
from sqlalchemy.orm import sessionmaker
from sqlalchemy import Sequence
from sqlalchemy import Column, DateTime, Integer, String, Unicode
from datetime import datetime
from mabolab.database.dbsession import Base
from mabolab.database.model import... | mit |
seung-lab/neuroglancer | python/neuroglancer/tool/agglomeration_split_tool.py | 1 | 29368 | #!/usr/bin/env python
from __future__ import print_function
import argparse
import collections
import uuid
import copy
import heapq
import json
import re
import sqlite3
import logging
import os
import numpy as np
import six
import neuroglancer
debug_graph = False
verbose_merging = False
def normalize_edge((id_a,... | apache-2.0 |
kenny1352/ratemyhistory | project/server.py | 1 | 16356 | import os
import uuid
import psycopg2
import psycopg2.extras
import crypt, getpass, pwd
import time
import smtplib, json
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from datetime import date
from flask import Flask, redirect, url_for,session, render_template, jsonify, request
fro... | apache-2.0 |
dwightgunning/django | tests/utils_tests/test_jslex.py | 153 | 9837 | # -*- coding: utf-8 -*-
"""Tests for jslex."""
# originally from https://bitbucket.org/ned/jslex
from __future__ import unicode_literals
from django.test import SimpleTestCase
from django.utils.jslex import JsLexer, prepare_js_for_gettext
class JsTokensTest(SimpleTestCase):
LEX_CASES = [
# ids
("... | bsd-3-clause |
CLVsol/odoo_cl_addons | cl_person/category/cl_person_category.py | 2 | 4696 | # -*- encoding: utf-8 -*-
################################################################################
# #
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol #
# ... | agpl-3.0 |
josephnoir/RIOT | tests/gnrc_sixlowpan_iphc_w_vrb/tests/01-run.py | 6 | 3993 | #!/usr/bin/env python3
# Copyright (C) 2019 Freie Universität Berlin
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
from testrunner import run
def testfunc(child):
debug_enabled ... | lgpl-2.1 |
henaras/horizon | openstack_dashboard/api/rest/policy.py | 51 | 1723 | #
# 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 |
filbranden/systemd | tools/make-man-index.py | 4 | 3062 | #!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
import collections
import sys
import re
from xml_helper import xml_parse, xml_print, tree
MDASH = ' — ' if sys.version_info.major >= 3 else ' -- '
TEMPLATE = '''\
<refentry id="systemd.index">
<refentryinfo>
<title>systemd.index</title>
<productn... | gpl-2.0 |
josenavas/QiiTa | qiita_pet/handlers/study_handlers/sample_template.py | 1 | 18227 | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause |
dabrahams/zeroinstall | tests/testdownload.py | 1 | 15513 | #!/usr/bin/env python
from __future__ import with_statement
from basetest import BaseTest
import sys, tempfile, os
from StringIO import StringIO
import unittest, signal
from logging import getLogger, WARN, ERROR
from contextlib import contextmanager
sys.path.insert(0, '..')
os.environ["http_proxy"] = "localhost:8000"... | lgpl-2.1 |
codebu5ter/focus-android | tools/l10n/android2po/program.py | 10 | 8367 | """Implements the command line interface.
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import sys
from os import path
import argparse
from commands import InitCommand, ExportCommand, ImportCommand, CommandError
from env import IncompleteEnvironment, EnvironmentError, Environment... | mpl-2.0 |
venicegeo/eventkit-cloud | eventkit_cloud/core/tests/test_models.py | 1 | 5605 | # -*- coding: utf-8 -*-
from unittest.mock import patch, MagicMock
from eventkit_cloud.auth.models import OAuth
from eventkit_cloud.core.models import AttributeClass, update_all_attribute_classes_with_user, \
update_all_users_with_attribute_class, get_users_from_attribute_class, validate_user_attribute_class, \
... | bsd-3-clause |
mzdaniel/oh-mainline | vendor/packages/Django/django/contrib/admin/templatetags/admin_modify.py | 154 | 2389 | from django import template
register = template.Library()
def prepopulated_fields_js(context):
"""
Creates a list of prepopulated_fields that should render Javascript for
the prepopulated fields for both the admin form and inlines.
"""
prepopulated_fields = []
if context['add'] and 'adminform'... | agpl-3.0 |
LeonidLe/php-buildpack | lib/nginx/extension.py | 17 | 1474 | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | apache-2.0 |
twoh/leevee | env/Lib/encodings/iso2022_jp_3.py | 816 | 1061 | #
# iso2022_jp_3.py: Python Unicode Codec for ISO2022_JP_3
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_iso2022, codecs
import _multibytecodec as mbc
codec = _codecs_iso2022.getcodec('iso2022_jp_3')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class Incrementa... | mit |
ianyh/heroku-buildpack-python-opencv | vendor/.heroku/lib/python2.7/test/test_struct.py | 38 | 24149 | import os
import array
import unittest
import struct
import inspect
from test import test_support as support
from test.test_support import (check_warnings, check_py3k_warnings)
import sys
ISBIGENDIAN = sys.byteorder == "big"
IS32BIT = sys.maxsize == 0x7fffffff
integer_codes = 'b', 'B', 'h', 'H', 'i', 'I', 'l', 'L', '... | mit |
useabode/redash | redash/cli/groups.py | 9 | 3223 | from sys import exit
from sqlalchemy.orm.exc import NoResultFound
from flask.cli import AppGroup
from click import argument, option
from redash import models
manager = AppGroup(help="Groups management commands.")
@manager.command()
@argument('name')
@option('--org', 'organization', default='default',
help=... | bsd-2-clause |
Tejal011089/Medsyn2_app | startup/report_data_map.py | 30 | 8864 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
# mappings for table dumps
# "remember to add indexes!"
data_map = {
"Company": {
"columns": ["name"],
"conditions": ["docstatus < 2"]
},
"F... | agpl-3.0 |
verificarlo/verificarlo | src/tools/ci/vfc_ci_report/inspect_runs.py | 1 | 24408 | #############################################################################
# #
# This file is part of Verificarlo. #
# #
# Copyr... | gpl-3.0 |
lhfei/spark-in-action | spark-2.x/src/main/python/mllib/binary_classification_metrics_example.py | 1 | 2177 | #
# 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 n... | apache-2.0 |
mikewiebe-ansible/ansible | lib/ansible/modules/network/onyx/onyx_ptp_interface.py | 59 | 8135 | #!/usr/bin/python
#
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
UITools/saleor | tests/dashboard/test_staff.py | 1 | 7623 | from django.contrib.auth.tokens import default_token_generator
from django.core import mail
from django.templatetags.static import static
from django.urls import reverse
from django.utils.encoding import force_bytes
from django.utils.http import urlsafe_base64_encode
from templated_email import send_templated_mail
fro... | bsd-3-clause |
thedep2/CouchPotatoServer | libs/xmpp/transports.py | 89 | 15453 | ## transports.py
##
## Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov
##
## 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, or (at your option)
## any later versi... | gpl-3.0 |
linkhub-sdk/popbill.fax.example.py | getFaxResult.py | 1 | 2664 | # -*- coding: utf-8 -*-
# code for console Encoding difference. Dont' mind on it
import sys
import imp
imp.reload(sys)
try:
sys.setdefaultencoding('UTF8')
except Exception as E:
pass
import testValue
from popbill import FaxService, PopbillException
faxService = FaxService(testValue.LinkID, testValue.SecretK... | mit |
thaumos/ansible | lib/ansible/modules/cloud/digital_ocean/digital_ocean_domain_facts.py | 29 | 3912 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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__ = ty... | gpl-3.0 |
broferek/ansible | test/units/modules/network/check_point/test_cp_mgmt_application_site_category.py | 19 | 4081 | # Ansible module to manage CheckPoint Firewall (c) 2019
#
# 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 dist... | gpl-3.0 |
mogoweb/chromium-crosswalk | chrome/test/pyautolib/policy_base.py | 69 | 22428 | # 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.
"""Base class for tests that need to update the policies enforced by Chrome.
Subclasses can call SetUserPolicy (ChromeOS, Linux, Windows) and
SetDeviceP... | bsd-3-clause |
coleifer/scout | scout/validator.py | 1 | 2599 | import json
import sys
from flask import request
from scout.constants import PROTECTED_KEYS
from scout.exceptions import error
from scout.models import Index
if sys.version_info[0] == 2:
json_load = lambda d: json.loads(d)
else:
json_load = lambda d: json.loads(d.decode('utf-8') if isinstance(d, bytes)
... | mit |
Saturn/livestreamer | src/livestreamer/plugins/common_swf.py | 38 | 1135 | from collections import namedtuple
from io import BytesIO
from livestreamer.utils import swfdecompress
from livestreamer.packages.flashmedia.types import U16LE, U32LE
__all__ = ["parse_swf"]
Rect = namedtuple("Rect", "data")
Tag = namedtuple("Tag", "type data")
SWF = namedtuple("SWF", "frame_size frame_rate frame_co... | bsd-2-clause |
ov1d1u/tv-maxe-ng | tv-maxe/tvmaxe.py | 1 | 3058 | #!/usr/bin/env python3
import sys
import os
import logger
import logging
import argparse
from os.path import isfile, join, splitext
from importlib import import_module
from PyQt5 import QtCore, QtWidgets, uic
from PyQt5.QtGui import QIcon, QPixmap
from settingsmanager import SettingsManager
from mainwindow import TVMa... | lgpl-3.0 |
javierder/dogestart.me | django/views/decorators/debug.py | 173 | 2604 | import functools
from django.http import HttpRequest
def sensitive_variables(*variables):
"""
Indicates which variables used in the decorated function are sensitive, so
that those variables can later be treated in a special way, for example
by hiding them when logging unhandled exceptions.
Two f... | mit |
CuonDeveloper/cuon | cuon_client/Client/CUON/cuon/bin/cuon_server.py | 2 | 29501 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
## GNU GENERAL PUBLIC LICENSE
## Version 2, June 1991
## Copyright (C) 1989, 1991 Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
## Everyone is permitted to copy and distribute verbatim ... | gpl-3.0 |
telwertowski/Books-Mac-OS-X | Versions/Books_3.0b4/Library of Congress Importer.app/Contents/Resources/PyZ3950_parsetab.py | 30 | 2739 |
# PyZ3950_parsetab.py
# This file is automatically generated. Do not edit.
_lr_method = 'SLR'
_lr_signature = '\xfc\xb2\xa8\xb7\xd9\xe7\xad\xba"\xb2Ss\'\xcd\x08\x16'
_lr_action_items = {'QUOTEDVALUE':([18,12,14,0,26,],[1,1,1,1,1,]),'LOGOP':([3,5,20,4,6,27,19,24,25,13,22,1,],[-5,-8,-4,-14,14,14,14,-9,-6,-13,-7,-12,]... | mit |
calfonso/ansible | lib/ansible/modules/remote_management/manageiq/manageiq_alert_profiles.py | 59 | 11282 | #!/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)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
tombstone/models | research/object_detection/models/ssd_mobilenet_v1_fpn_feature_extractor_tf2_test.py | 2 | 7748 | # 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 |
jtyr/ansible-modules-core | cloud/openstack/os_server_facts.py | 77 | 2951 | #!/usr/bin/python
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... | gpl-3.0 |
ivandevp/django | tests/queryset_pickle/models.py | 281 | 1904 | import datetime
from django.db import DJANGO_VERSION_PICKLE_KEY, models
from django.utils import six
from django.utils.translation import ugettext_lazy as _
def standalone_number():
return 1
class Numbers(object):
@staticmethod
def get_static_number():
return 2
class PreviousDjangoVersionQuer... | bsd-3-clause |
ppanczyk/ansible | contrib/inventory/openvz.py | 196 | 2818 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# openvz.py
#
# Copyright 2014 jordonr <jordon@beamsyn.net>
#
# This file is part of Ansible.
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either ... | gpl-3.0 |
pombredanne/moksha | moksha.wsgi/moksha/wsgi/widgets/api/socket.py | 2 | 3310 | import tw2.core as twc
from tw2.jqplugins.gritter import gritter_resources, gritter_callback
from collections import defaultdict
from moksha.wsgi.widgets.moksha_js import moksha_js
import moksha.wsgi.lib.utils
class AbstractMokshaSocket(twc.Widget):
""" Abstract socket widget from which the AMQPSocket, STOMPSock... | apache-2.0 |
ChromiumWebApps/chromium | tools/telemetry/third_party/pyserial/serial/tools/list_ports_osx.py | 141 | 6489 | #!/usr/bin/env python
# portable serial port access with python
#
# This is a module that gathers a list of serial ports including details on OSX
#
# code originally from https://github.com/makerbot/pyserial/tree/master/serial/tools
# with contributions from cibomahto, dgs3, FarMcKon, tedbrandston
# and modifications ... | bsd-3-clause |
codeforamerica/skillcamp | ENV/lib/python2.7/site-packages/setuptools/command/install.py | 5 | 4506 | import setuptools
import inspect
import glob
import warnings
import platform
from distutils.command.install import install as _install
from distutils.errors import DistutilsArgError
class install(_install):
"""Use easy_install to install the package, w/dependencies"""
user_options = _install.user_options + [
... | mit |
lazka/pgi | examples/gtk/dialog_example.py | 2 | 1602 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2011 Sebastian Pölsterl
#
# Permission is granted to copy, distribute and/or modify this document
# under the terms of the GNU Free Documentation License, Version 1.3
# or any later version published by the Free Software Foundation;
# with no Invariant Sections, no ... | lgpl-2.1 |
projecthamster/experiments | pulse.py | 1 | 3779 | #!/usr/bin/env python
# - coding: utf-8 -
# Copyright (C) 2010 Toms Bauģis <toms.baugis at gmail.com>
"""
Demo of a a timer based ripple running through nodes and initiating
sub-animations. Not sure where this could come handy.
"""
from gi.repository import Gtk as gtk
from lib import graphics
from lib.pytwee... | mit |
wcmckee/nzcommons-static | conf.py | 1 | 56759 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
# !! This is the configuration of Nikola. !! #
# !! You should edit it to your liking. !! #
# ! Some settings can be different in different languages.
# ! A comment stating (translatable) is used to denote those.
# ! There are two ways to... | mit |
ferriman/SSandSP | pyxel-test/venv/lib/python3.8/site-packages/pip/_internal/utils/logging.py | 18 | 13093 | # The following comment should be removed at some point in the future.
# mypy: disallow-untyped-defs=False
from __future__ import absolute_import
import contextlib
import errno
import logging
import logging.handlers
import os
import sys
from logging import Filter, getLogger
from pip._vendor.six import PY2
from pip.... | gpl-3.0 |
bussiere/pypyjs | website/demo/home/rfk/repos/pypy/lib-python/2.7/distutils/sysconfig_cpython.py | 2 | 22326 | """Provide access to Python's configuration information. The specific
configuration variables available depend heavily on the platform and
configuration. The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys(). Additional convenience functions are a... | mit |
jostep/tensorflow | tensorflow/contrib/labeled_tensor/python/ops/io_ops.py | 172 | 6373 | # 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 |
steventimberman/masterDebater | env/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py | 346 | 2531 | from io import BytesIO
class CallbackFileWrapper(object):
"""
Small wrapper around a fp object which will tee everything read into a
buffer, and when that file is closed it will execute a callback with the
contents of that buffer.
All attributes are proxied to the underlying file object.
Thi... | mit |
mancoast/CPythonPyc_test | cpython/265_test_exception_variations.py | 213 | 4041 |
from test.test_support import run_unittest
import unittest
class ExceptionTestCase(unittest.TestCase):
def test_try_except_else_finally(self):
hit_except = False
hit_else = False
hit_finally = False
try:
raise Exception, 'nyaa!'
except:
hit_except =... | gpl-3.0 |
creasyw/IMTAphy | documentation/toolchain/docutils-0.5-py2.5.egg/docutils/languages/fi.py | 148 | 2026 | # $Id: fi.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: Asko Soukka <asko.soukka@iki.fi>
# 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
# translated f... | gpl-2.0 |
maurizioandreotti/D-Rats-0.3.ev | ENV/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/langhungarianmodel.py | 2763 | 12536 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | gpl-3.0 |
GrimDerp/httpie | httpie/core.py | 44 | 6033 | """This module provides the main functionality of HTTPie.
Invocation flow:
1. Read, validate and process the input (args, `stdin`).
2. Create and send a request.
3. Stream, and possibly process and format, the parts
of the request-response exchange selected by output options.
4. Simultaneously write to `... | bsd-3-clause |
Lyrositor/moul-scripts | Python/system/xmllib.py | 227 | 34865 | """A parser for XML, using the derived class as static DTD."""
# Author: Sjoerd Mullender.
import re
import string
import warnings
warnings.warn("The xmllib module is obsolete. Use xml.sax instead.",
DeprecationWarning, 2)
del warnings
version = '0.3'
class Error(RuntimeError):
pass
# Regular e... | gpl-3.0 |
RianFuro/vint | test/unit/vint/linting/test_cli.py | 1 | 1647 | import unittest
from vint.compat.unittest import mock
from vint.linting.cli import CLI
from vint.bootstrap import import_all_policies
class TestCLI(unittest.TestCase):
@classmethod
def setUpClass(cls):
# For test_start_with_invalid_file_path.
# The test case want to load saveral policies.
... | mit |
CTSRD-SOAAP/chromium-42.0.2311.135 | third_party/pywebsocket/src/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 |
Linutronix/elbe | elbepack/debianize/panels/kernel.py | 1 | 3110 | # ELBE - Debian Based Embedded Rootfilesystem Builder
# Copyright (c) 2016-2017 John Ogness <john.ogness@linutronix.de>
# Copyright (c) 2016-2017 Manuel Traut <manut@linutronix.de>
# Copyright (c) 2017 Torben Hohn <torben.hohn@linutronix.de>
# Copyright (c) 2019 Olivier Dion <dion@linutronix.de>
#
# SPDX-License-Identi... | gpl-3.0 |
jameinel/juju | acceptancetests/assess_cloud_display.py | 1 | 4632 | #!/usr/bin/env python
from __future__ import print_function
import os
from argparse import ArgumentParser
from contextlib import contextmanager
from copy import deepcopy
from difflib import ndiff
from pprint import pformat
import sys
import yaml
from jujupy import client_from_config
from utility import (
add_ar... | agpl-3.0 |
Barmaley-exe/scikit-learn | sklearn/datasets/tests/test_base.py | 39 | 5607 | import os
import shutil
import tempfile
import warnings
import nose
import numpy
from sklearn.datasets import get_data_home
from sklearn.datasets import clear_data_home
from sklearn.datasets import load_files
from sklearn.datasets import load_sample_images
from sklearn.datasets import load_sample_image
from sklearn.da... | bsd-3-clause |
hugobuddel/orange3 | Orange/canvas/gui/tests/test_tooltree.py | 10 | 2571 | """
Test for tooltree
"""
from PyQt4.QtGui import QStandardItemModel, QStandardItem, QAction
from PyQt4.QtCore import Qt
from ..tooltree import ToolTree, FlattenedTreeItemModel
from ...registry.qt import QtWidgetRegistry
from ...registry.tests import small_testing_registry
from ..test import QAppTestCase
class T... | gpl-3.0 |
yephper/django | django/bin/roub/home/migrations/0007_auto_20160414_1100.py | 1 | 2138 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-04-14 03:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0006_auto_20160414_1055'),
]
operations = [
migrations.CreateModel(
... | bsd-3-clause |
codepantry/django | django/db/models/signals.py | 399 | 2734 | from django.apps import apps
from django.dispatch import Signal
from django.utils import six
class_prepared = Signal(providing_args=["class"])
class ModelSignal(Signal):
"""
Signal subclass that allows the sender to be lazily specified as a string
of the `app_label.ModelName` form.
"""
def __in... | bsd-3-clause |
tgalal/yowsup | yowsup/layers/protocol_groups/structs/group.py | 59 | 1287 | class Group(object):
def __init__(self, groupId, creatorJid, subject, subjectOwnerJid, subjectTime, creationTime, participants=None):
self._groupId = groupId
self._creatorJid = creatorJid
self._subject = subject
self._subjectOwnerJid = subjectOwnerJid
... | gpl-3.0 |
onitake/ansible | lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py | 11 | 19909 | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterf... | gpl-3.0 |
Y0SH1M4S73R/-tg-station | tools/midi2piano/easygui/__init__.py | 101 | 87642 | """
@version: 0.96(2010-08-29)
@note:
ABOUT EASYGUI
EasyGui provides an easy-to-use interface for simple GUI interaction
with a user. It does not require the programmer to know anything about
tkinter, frames, widgets, callbacks or lambda. All GUI interactions are
invoked by simple function calls that return results... | agpl-3.0 |
kustodian/ansible | lib/ansible/modules/network/aci/aci_vlan_pool_encap_block.py | 8 | 10366 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Jacob McGill (jmcgill298)
# Copyright: (c) 2018, Dag Wieers (dagwieers) <dag@wieers.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
__meta... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.