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 |
|---|---|---|---|---|---|
HaraldWeber/client | src/ladder/__init__.py | 1 | 1144 | from PyQt4 import QtCore
from PyQt4 import QtWebKit
import logging
import urllib
import util
logger = logging.getLogger(__name__)
class Ladder(QtCore.QObject):
def __init__(self, client, *args, **kwargs):
QtCore.QObject.__init__(self, *args, **kwargs)
logger.debug("Ladder tab instantiating.")
... | gpl-3.0 |
vmanoria/bluemix-hue-filebrowser | hue-3.8.1-bluemix/apps/pig/src/pig/management/commands/pig_setup.py | 29 | 2462 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | gpl-2.0 |
normtown/SickRage | autoProcessTV/lib/requests/packages/urllib3/_collections.py | 156 | 10473 | from collections import Mapping, MutableMapping
try:
from threading import RLock
except ImportError: # Platform-specific: No threads available
class RLock:
def __enter__(self):
pass
def __exit__(self, exc_type, exc_value, traceback):
pass
try: # Python 2.7+
from ... | gpl-3.0 |
lmazuel/azure-sdk-for-python | azure-cognitiveservices-search-websearch/azure/cognitiveservices/search/websearch/models/news.py | 2 | 3015 | # 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 |
duncanwp/iris | lib/iris/tests/unit/analysis/area_weighted/test_AreaWeightedRegridder.py | 16 | 4139 | # (C) British Crown Copyright 2014 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | lgpl-3.0 |
auduny/home-assistant | tests/components/group/test_reproduce_state.py | 11 | 1521 | """The tests for reproduction of state."""
from asyncio import Future
from unittest.mock import patch
from homeassistant.components.group import async_reproduce_states
from homeassistant.core import Context, State
async def test_reproduce_group(hass):
"""Test reproduce_state with group."""
context = Context(... | apache-2.0 |
BeDjango/intef-openedx | common/test/acceptance/pages/lms/login_and_register.py | 57 | 12289 | """Login and Registration pages """
from urllib import urlencode
from bok_choy.page_object import PageObject, unguarded
from bok_choy.promise import Promise, EmptyPromise
from . import BASE_URL
from .dashboard import DashboardPage
class RegisterPage(PageObject):
"""
Registration page (create a new account)
... | agpl-3.0 |
Arable/evepod | lib/python2.7/site-packages/newrelic-2.12.0.10/newrelic/admin/validate_config.py | 2 | 5729 | from __future__ import print_function
from newrelic.admin import command, usage
def _run_validation_test():
import time
from newrelic.agent import (background_task, error_trace,
external_trace, function_trace, wsgi_application,
add_custom_parameter, record_exception)
@external_tr... | apache-2.0 |
anshengme/Angelina | apps/users/views.py | 1 | 15715 | import json
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.hashers import make_password
from django.core.exceptions import ObjectDoesNotExist # ORM get查询不到数据
from django.core.urlresolvers import reverse
from django.db.models i... | mit |
stshine/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/dispatch.py | 652 | 14786 | # Copyright 2012, 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... | mpl-2.0 |
frobnitzem/slack | gen/plan.py | 1 | 1926 | # Plan a parallel copy using n workers into output shape s.
# The algorithm requires prod(s) to be a multiple of n and
# works by matching factors from n with those of s,
# with preference to the right (for R) or left (for L).
# This means as many workers as possible for the most sig. dimensions,
# each doing as many c... | gpl-3.0 |
doduytrung/odoo-8.0 | addons/subscription/__openerp__.py | 261 | 1885 | # -*- 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 |
Lab603/PicEncyclopedias | jni-build/jni/include/tensorflow/contrib/distributions/python/kernel_tests/bernoulli_test.py | 4 | 8826 | # 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... | mit |
ShineFan/odoo | openerp/report/render/render.py | 457 | 2524 | # -*- 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 |
ejona86/grpc | src/python/grpcio_tests/tests_aio/unit/auth_context_test.py | 10 | 7432 | # Copyright 2020 The gRPC Authors
#
# 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 |
huobaowangxi/scikit-learn | sklearn/calibration.py | 137 | 18876 | """Calibration of predicted probabilities."""
# Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Balazs Kegl <balazs.kegl@gmail.com>
# Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
# Mathieu Blondel <mathieu@mblondel.org>
#
# License: BSD 3 clause
from __future__ impo... | bsd-3-clause |
pbrod/scipy | scipy/special/basic.py | 3 | 70421 | #
# Author: Travis Oliphant, 2002
#
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
import math
from scipy._lib.six import xrange
from numpy import (pi, asarray, floor, isscalar, iscomplex, real,
imag, sqrt, where, mgrid, sin, place, issubdtype,... | bsd-3-clause |
jolyonb/edx-platform | lms/djangoapps/instructor/enrollment_report.py | 24 | 3296 | """
Defines abstract class for the Enrollment Reports.
"""
import abc
import collections
import json
from django.contrib.auth.models import User
from student.models import UserProfile
class AbstractEnrollmentReportProvider(object):
"""
Abstract interface for Detailed Enrollment Report Provider
"""
... | agpl-3.0 |
greenoaktree/MissionPlanner | Lib/email/__init__.py | 61 | 2979 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""A package for parsing, handling, and generating email messages."""
__version__ = '4.0.3'
__all__ = [
# Old names
'base64MIME',
'Charset',
'Encoders',
'Errors',
'Generat... | gpl-3.0 |
HyperBaton/ansible | lib/ansible/modules/cloud/centurylink/clc_publicip.py | 47 | 12152 | #!/usr/bin/python
#
# Copyright (c) 2015 CenturyLink
# 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': ['previe... | gpl-3.0 |
valurhrafn/chrome-sync-server | tlslite/utils/aes.py | 149 | 1064 | # Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""Abstract class for AES."""
class AES(object):
def __init__(self, key, mode, IV, implementation):
if len(key) not in (16, 24, 32):
raise AssertionError()
if mode != 2:
raise A... | mit |
Denisolt/IEEE-NYIT-MA | local/lib/python2.7/site-packages/pip/wheel.py | 338 | 32010 | """
Support for installing and building the "wheel" binary package format.
"""
from __future__ import absolute_import
import compileall
import csv
import errno
import functools
import hashlib
import logging
import os
import os.path
import re
import shutil
import stat
import sys
import tempfile
import warnings
from ba... | gpl-3.0 |
cryptapus/electrum | electrum/plugins/audio_modem/qt.py | 2 | 4199 | from functools import partial
import zlib
import json
from io import BytesIO
import sys
import platform
from electrum.plugin import BasePlugin, hook
from electrum.gui.qt.util import WaitingDialog, EnterButton, WindowModalDialog
from electrum.util import print_msg, print_error
from electrum.i18n import _
from PyQt5.Qt... | mit |
Nicop06/ansible | lib/ansible/modules/cloud/azure/azure_rm_loadbalancer_facts.py | 44 | 4560 | #!/usr/bin/python
#
# Copyright (c) 2016 Thomas Stringer, <tomstr@microsoft.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... | gpl-3.0 |
armersong/zato | code/zato-web-admin/src/zato/admin/web/views/message/namespace.py | 6 | 1761 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2013 Dariusz Suchojad <dsuch at zato.io>
Licensed under LGPLv3, see LICENSE.txt for terms and conditions.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
# stdlib
import logging
# Zato
from zato.admin.web.forms.message.namespace impor... | gpl-3.0 |
thopiekar/Cura | cura/Settings/CuraContainerRegistry.py | 1 | 45586 | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os
import re
import configparser
from typing import Any, cast, Dict, Optional, List, Union
from PyQt5.QtWidgets import QMessageBox
from UM.Decorators import override
from UM.Settings.ContainerFormatError... | lgpl-3.0 |
agdsn/hades | src/hades/common/cli.py | 1 | 5189 | """Functionality for the Hades command-line utilities in :mod:`hades.bin`."""
import argparse
import logging.handlers
import os
import sys
import textwrap
from gettext import gettext as _
from hades import constants
class ArgumentParser(argparse.ArgumentParser):
"""ArgumentParser subclass that exists with :data:... | mit |
molebot/brython | www/src/Lib/test/test_gzip.py | 24 | 18015 | #! /usr/bin/env python3
"""Test script for the gzip module.
"""
import unittest
from test import support
import os
import io
import struct
gzip = support.import_module('gzip')
data1 = b""" int length=DEFAULTALLOC, err = Z_OK;
PyObject *RetVal;
int flushmode = Z_FINISH;
unsigned long start_total_out;
"""
data... | bsd-3-clause |
kubaszostak/gdal-dragndrop | osgeo/apps/Python27/Lib/site-packages/numpy/core/tests/test_abc.py | 25 | 2402 | from __future__ import division, absolute_import, print_function
from numpy.testing import assert_
import numbers
import numpy as np
from numpy.core.numerictypes import sctypes
class TestABC(object):
def test_abstract(self):
assert_(issubclass(np.number, numbers.Number))
assert_(issubclass(np.i... | mit |
chainer/chainer | examples/memnn/test_memnn.py | 8 | 2673 | #!/usr/bin/env python
import argparse
import numpy
import chainer
import babi
import memnn
def main():
parser = argparse.ArgumentParser(
description='Chainer example: End-to-end memory networks')
parser.add_argument('MODEL',
help='Path to model directory specified with `-m`... | mit |
dims/nova | plugins/xenserver/networking/etc/xensource/scripts/vif_rules.py | 113 | 4858 | #!/usr/bin/env python
# Copyright 2010-2011 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/LIC... | apache-2.0 |
etingof/pyasn1-modules | tests/test_rfc3657.py | 2 | 6803 | #
# This file is part of pyasn1-modules software.
#
# Created by Russ Housley
# Copyright (c) 2019, Vigil Security, LLC
# License: http://snmplabs.com/pyasn1/license.html
#
import sys
import unittest
from pyasn1.codec.der.decoder import decode as der_decoder
from pyasn1.codec.der.encoder import encode as der_encoder
... | bsd-2-clause |
OAPDF/oapdf_tools | oapdf/GenPage/touchpage.py | 2 | 4564 | #! /usr/bin/env python
#### Usage:
# put this script in a repository root directory
# It will scan the whole subdir pdf and generate html link for it in "html" and "pages" subdirectory
# Update: 2016.1.19 3:26AM
import os,sys,glob
import re, requests,urllib2
from itertools import chain
doilink='C:\\Users\\Hom\\Des... | mit |
lintzc/gpdb | gpMgmt/sbin/gpsetdbid.py | 45 | 2723 | #!/usr/bin/env python
'''
Copyright (c) Greenplum Inc 2010. All Rights Reserved.
This is a private script called by the Greenplum Management scripts.
With the script you can create the gp_dbid file within a segment's data
directory.
This script does NOT modify the configuration information stored within
the databas... | apache-2.0 |
souravbadami/oppia | core/domain/exp_jobs_one_off_test.py | 1 | 92168 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | apache-2.0 |
jscn/django | django/db/backends/oracle/schema.py | 404 | 5313 | import binascii
import copy
import datetime
import re
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from django.db.utils import DatabaseError
from django.utils import six
from django.utils.text import force_text
class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
sql_create_column = "ALT... | bsd-3-clause |
sunlightlabs/tcamp | tcamp/sked/migrations/0012_auto__add_field_location_has_sessions.py | 1 | 9931 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Location.has_sessions'
db.add_column(u'sked_location', 'has_sessions',
... | bsd-3-clause |
xodus7/tensorflow | tensorflow/python/feature_column/feature_column_lib.py | 23 | 1038 | # 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 |
sametmax/Django--an-app-at-a-time | ignore_this_directory/django/contrib/gis/geos/libgeos.py | 38 | 5127 | """
This module houses the ctypes initialization procedures, as well
as the notice and error handler function callbacks (get called
when an error occurs in GEOS).
This module also houses GEOS Pointer utilities, including
get_pointer_arr(), and GEOM_PTR.
"""
import logging
import os
from ctypes import CDLL, CFUNCT... | mit |
indautgrp/erpnext | erpnext/patches/v5_0/update_projects.py | 70 | 1198 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import frappe
def execute():
# convert milestones to tasks
frappe.reload_doctype("Project")
frappe.reload_doc("projects", "doctype", "project_task")
frappe.reload_doctype("Task")
frappe.reload_doc("projects", "doctype", "task_depends_on")
frappe.rel... | gpl-3.0 |
YvonnPfeif3/Yvonne | py/openage/testing/tests.py | 46 | 1814 | # tests for the openage.testing package
import sys
from . import testing
def test_testspec():
"""
tests whether the testspec exists, and is well-formed
"""
tests, demos = testing.read_testspec()
testcount, democount = len(tests), len(demos)
def test_run_test():
"""
tests testing.run_test... | gpl-3.0 |
tangowhisky37/RaspiPythonProjects | Write_To_LCD_Screen/RPi_I2C_driver.py | 1 | 4851 | # -*- coding: utf-8 -*-
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
# Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library
# adde... | gpl-3.0 |
JCBarahona/edX | openedx/core/djangoapps/course_groups/migrations/0004_auto__del_field_coursecohortssettings_cohorted_discussions__add_field_.py | 100 | 6379 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changed 'CourseCohortsSettings.cohorted_discussions' to 'CourseCohortsSettings._cohorted_discussions' without
... | agpl-3.0 |
santoshsahoo/personfinder | app/admin_review.py | 1 | 5813 | #!/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 |
richard-willowit/odoo | addons/payment_authorize/models/authorize_request.py | 3 | 15401 | # -*- coding: utf-8 -*-
import io
import requests
from lxml import etree, objectify
from xml.etree import ElementTree as ET
from uuid import uuid4
from odoo import _
from odoo.exceptions import ValidationError, UserError
from odoo import _
XMLNS = 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'
def strip_ns(xml, ns):
... | gpl-3.0 |
arangodb/arangodb | 3rdParty/rocksdb/6.8/tools/advisor/test/test_db_log_parser.py | 14 | 4605 | # Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
# This source code is licensed under both the GPLv2 (found in the
# COPYING file in the root directory) and Apache 2.0 License
# (found in the LICENSE.Apache file in the root directory).
from advisor.db_log_parser import DatabaseLogs, Log, NO_COL_FA... | apache-2.0 |
project-zerus/blade | src/blade/sh_test_target.py | 1 | 3937 | # Copyright (c) 2016 Tencent Inc.
# All rights reserved.
#
# Author: Li Wenting <wentingli@tencent.com>
# Date: June 2, 2016
"""
This module defines sh_test target which executes a shell script.
"""
import os
import blade
import build_rules
import console
from blade_util import var_to_list
from blade_util import... | bsd-3-clause |
marado/youtube-dl | youtube_dl/extractor/ntvru.py | 124 | 5022 | # encoding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
clean_html,
xpath_text,
int_or_none,
)
class NTVRuIE(InfoExtractor):
IE_NAME = 'ntv.ru'
_VALID_URL = r'http://(?:www\.)?ntv\.ru/(?P<id>.+)'
_TESTS = [
{
'url'... | unlicense |
naparuba/shinken | test/test_objects_and_notifways.py | 18 | 1812 | #!/usr/bin/env python
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
#
# 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 F... | agpl-3.0 |
TangHao1987/intellij-community | python/lib/Lib/site-packages/django/contrib/staticfiles/utils.py | 71 | 1665 | import fnmatch
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
def get_files(storage, ignore_patterns=[], location=''):
"""
Recursively walk the storage directories gathering a complete list of files
that should be copied, returning this list.
"""
def i... | apache-2.0 |
Huyuwei/tvm | rust/runtime/tests/test_tvm_basic/src/build_test_lib.py | 2 | 1336 | #!/usr/bin/env python3
# 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
# "L... | apache-2.0 |
etetoolkit/ete | ete3/tools/ete_ncbiquery.py | 3 | 8531 | # #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://etetoolkit.org
#
# ETE is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the... | gpl-3.0 |
h2oloopan/easymerge | EasyMerge/tests/scrapy/scrapy/utils/python.py | 8 | 9323 | """
This module contains essential stuff that should've come with Python itself ;)
It also contains functions (or functionality) which is in Python versions
higher than 2.5 which used to be the lowest version supported by Scrapy.
"""
import os
import re
import inspect
import weakref
import errno
from functools import... | mit |
laperry1/android_external_chromium_org | chrome/test/ispy/ispy_api_unittest.py | 100 | 2835 | #!/usr/bin/env python
#
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import unittest
from PIL import Image
import ispy_api
from common import cloud_bucket
from common import mock_cloud_buck... | bsd-3-clause |
supersven/intellij-community | python/lib/Lib/site-packages/django/contrib/localflavor/it/util.py | 436 | 1807 | from django.utils.encoding import smart_str, smart_unicode
def ssn_check_digit(value):
"Calculate Italian social security number check digit."
ssn_even_chars = {
'0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8,
'9': 9, 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': ... | apache-2.0 |
lambder/bigcouch | couchjs/scons/scons-local-2.0.1/SCons/Tool/tex.py | 61 | 31828 | """SCons.Tool.tex
Tool-specific initialization for TeX.
Generates .dvi files from .tex files
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, ... | apache-2.0 |
JeyZeta/Dangerous | Dangerous/Golismero/thirdparty_libs/chardet/utf8prober.py | 216 | 2663 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | mit |
jisqyv/p2pool | wstools/XMLname.py | 291 | 2479 | """Translate strings to and from SOAP 1.2 XML name encoding
Implements rules for mapping application defined name to XML names
specified by the w3 SOAP working group for SOAP version 1.2 in
Appendix A of "SOAP Version 1.2 Part 2: Adjuncts", W3C Working Draft
17, December 2001, <http://www.w3.org/TR/soap12-part2/#namem... | gpl-3.0 |
rossasa/server-tools | scheduler_error_mailer/__openerp__.py | 23 | 1823 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Scheduler Error Mailer module for OpenERP
# Copyright (C) 2012-2013 Akretion (http://www.akretion.com/)
# @author: Sébastien Beau <sebastien.beau@akretion.com>
# @author David Beal <bealdavid@gmail.c... | agpl-3.0 |
pombredanne/func | funcweb/funcweb/identity/visit.py | 13 | 1504 | from datetime import datetime
from sqlalchemy import *
from sqlalchemy.orm import class_mapper
from turbogears import config
from turbogears.util import load_class
from turbogears.visit.api import BaseVisitManager, Visit
from turbogears.database import get_engine, metadata, session, mapper
import logging
log = loggi... | gpl-2.0 |
gauribhoite/personfinder | env/google_appengine/google/storage/speckle/proto/client_pb2.py | 6 | 135852 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
ximion/Clementine-LibDanceTag | data/pythonlibs/uic/properties.py | 1 | 14787 | import logging
import sys
from uic.exceptions import UnsupportedPropertyError
from uic.icon_cache import IconCache
if sys.hexversion >= 0x03000000:
from uic.port_v3.ascii_upper import ascii_upper
else:
from uic.port_v2.ascii_upper import ascii_upper
logger = logging.getLogger(__name__)
DEBUG = logger.debug
... | gpl-3.0 |
OpenUpgrade/OpenUpgrade | addons/mail/tests/test_mail_group.py | 56 | 6517 | # -*- 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 |
villaverde/iredadmin | libs/iredutils.py | 1 | 17090 | # encoding: utf-8
# Author: Zhang Huangbin <zhb@iredmail.org>
from os import urandom, getloadavg
import re
import time
import urllib2
import socket
from base64 import b64encode, b64decode
from xml.dom.minidom import parseString as parseXMLString
import random
import subprocess
import web
import settings
from libs impo... | gpl-2.0 |
valentin-krasontovitsch/ansible | lib/ansible/modules/network/radware/vdirect_runnable.py | 14 | 12867 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2017 Radware LTD.
#
# 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... | gpl-3.0 |
MountainWei/nova | nova/virt/disk/api.py | 35 | 25175 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
#
# Copyright 2011, Piston Cloud Computing, Inc.
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in ... | apache-2.0 |
andrewhao/dotfiles | weechat.symlink/python/autoload/wee_slack.py | 1 | 141239 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from functools import wraps
import time
import json
import pickle
import sha
import os
import re
import urllib
import sys
import traceback
import collections
import ssl
import random
import string
from websocket import create_connection, WebSocketConne... | mit |
RPGOne/Skynet | pytorch-master/torch/nn/modules/linear.py | 1 | 1934 | import math
import torch
from torch.nn.parameter import Parameter
from .module import Module
class Linear(Module):
r"""Applies a linear transformation to the incoming data: :math:`y = Ax + b`
Args:
in_features: size of each input sample
out_features: size of each output sample
bias:... | bsd-3-clause |
dgoedkoop/QGIS | tests/src/python/test_qgsserver_wms_getprint.py | 9 | 16033 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsServer WMS GetPrint.
From build dir, run: ctest -R PyQgsServerWMSGetPrint -V
.. note:: 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 versi... | gpl-2.0 |
Huyuwei/tvm | python/setup.py | 1 | 5411 | # 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 |
andrewklau/openshift-tools | openshift/installer/vendored/openshift-ansible-3.5.13/filter_plugins/oo_filters.py | 2 | 41534 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: expandtab:tabstop=4:shiftwidth=4
# pylint: disable=no-name-in-module, import-error, wrong-import-order, ungrouped-imports
"""
Custom filters for use in openshift-ansible
"""
import os
import pdb
import pkg_resources
import re
import json
import yaml
import random
from a... | apache-2.0 |
dariemp/odoo | addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py | 332 | 13610 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | agpl-3.0 |
shujaatak/UAV_MissionPlanner | Lib/SimpleXMLRPCServer.py | 73 | 25682 | """Simple XML-RPC Server.
This module can be used to create simple XML-RPC servers
by creating a server and either installing functions, a
class instance, or by extending the SimpleXMLRPCServer
class.
It can also be used to handle XML-RPC requests in a CGI
environment using CGIXMLRPCRequestHandler.
A list of possibl... | gpl-2.0 |
TheNain38/qBittorrent | src/searchengine/nova/nova2dl.py | 63 | 2588 | #VERSION: 1.20
# Author:
# Christophe DUMEZ (chris@qbittorrent.org)
# 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 co... | gpl-2.0 |
Mj258/weiboapi | srapyDemo/envs/Lib/site-packages/twisted/test/test_socks.py | 10 | 17646 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.protocol.socks}, an implementation of the SOCKSv4 and
SOCKSv4a protocols.
"""
import struct, socket
from twisted.trial import unittest
from twisted.test import proto_helpers
from twisted.internet import defer, address
fro... | mit |
Alphadelta14/ansible | v1/ansible/runner/action_plugins/copy.py | 109 | 16890 | # (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... | gpl-3.0 |
deepsrijit1105/edx-platform | common/lib/xmodule/xmodule/modulestore/tests/test_split_w_old_mongo.py | 45 | 6040 | import datetime
import random
import unittest
import uuid
from nose.plugins.attrib import attr
import mock
from opaque_keys.edx.locator import CourseLocator, BlockUsageLocator
from xmodule.modulestore import ModuleStoreEnum
from xmodule.x_module import XModuleMixin
from xmodule.modulestore.inheritance import Inherita... | agpl-3.0 |
40423157/2017springcd_hw | plugin/liquid_tags/video.py | 296 | 2360 | """
Video Tag
---------
This implements a Liquid-style video tag for Pelican,
based on the octopress video tag [1]_
Syntax
------
{% video url/to/video [width height] [url/to/poster] %}
Example
-------
{% video http://site.com/video.mp4 720 480 http://site.com/poster-frame.jpg %}
Output
------
<video width='720' hei... | agpl-3.0 |
Azulinho/ansible | lib/ansible/plugins/action/ios_config.py | 126 | 4162 | #
# (c) 2017, Red Hat, Inc.
#
# 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... | gpl-3.0 |
Kagami/kisa | lib/twisted/internet/_sslverify.py | 20 | 24219 | # -*- test-case-name: twisted.test.test_sslverify -*-
# Copyright (c) 2005 Divmod, Inc.
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
# Copyright (c) 2005-2008 Twisted Matrix Laboratories.
import itertools
from OpenSSL import SSL, crypto
from twisted.python import reflect, util
from twisted.... | cc0-1.0 |
PyPlanet/PyPlanet | pyplanet/core/storage/storage.py | 1 | 3977 | import asyncio_extras
import os
import importlib
from async_generator import yield_
from pyplanet.conf import settings
from pyplanet.core.storage import StorageDriver, StorageInterface
class Storage(StorageInterface):
"""
The storage component manager is managing the storage access trough drivers that can be cust... | gpl-3.0 |
mgagne/nova | nova/api/openstack/compute/contrib/floating_ips_bulk.py | 6 | 6197 | # Copyright 2012 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 |
tpaszkowski/quantum | quantum/tests/unit/linuxbridge/test_linuxbridge_plugin.py | 5 | 2464 | # Copyright (c) 2012 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 |
Inspq/ansible | lib/ansible/modules/packaging/os/pacman.py | 1 | 15030 | #!/usr/bin/python -tt
# -*- coding: utf-8 -*-
# (c) 2012, Afterburn <http://github.com/afterburn>
# (c) 2013, Aaron Bull Schaefer <aaron@elasticdog.com>
# (c) 2015, Indrajit Raychaudhuri <irc+code@indrajit.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it un... | gpl-3.0 |
sourabhjains/Selfconfiguring-red | utils/tests/TestBase.py | 52 | 4875 | #! /usr/bin/env python
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
#
# Copyright (c) 2014 Siddharth Santurkar
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Softw... | gpl-2.0 |
scottgmaduri/shpescape | ft_auth/views.py | 18 | 3592 | #!/usr/bin/env python
#
# Copyright 2007 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 |
scalative/haas | haas/loader.py | 3 | 3777 | # -*- coding: utf-8 -*-
# Copyright (c) 2013-2014 Simon Jagoe
# All rights reserved.
#
# This software may be modified and distributed under the terms
# of the 3-clause BSD license. See the LICENSE.txt file for details.
from __future__ import absolute_import, unicode_literals
import unittest
from .suite import TestS... | bsd-3-clause |
kg-bot/SupyBot | plugins/Mailbox/plugin.py | 1 | 6690 | ###
# Copyright (c) 2005, Jeremiah Fincher
# Copyright (c) 2006, Jon Phillips
# Copyright (c) 2006, Creative Commons
# All rights reserved.
###
import time
import rfc822
import poplib
import textwrap
from cStringIO import StringIO as sio
import supybot.utils as utils
import supybot.world as world
from supybot.command... | gpl-3.0 |
Tancata/phylo | test_for_lgt_more_groups.py | 1 | 6655 | from ete3 import Tree, TreeStyle
import sys, re
#read in the bootstrapped consensus tree from one of Cedric's families. Ask whether the candidate LGT has phylogenetic support at some bootstrap threshold by checking various tree-based criteria for LGTs
#Arguments: treefile target_sequence_tag
#euk_supergroups = ['Vir... | mit |
edcast-inc/edx-platform-edcast | lms/djangoapps/instructor/tests/utils.py | 121 | 2732 | """
Utilities for instructor unit tests
"""
import datetime
import json
import random
from django.utils.timezone import utc
from util.date_utils import get_default_time_display
class FakeInfo(object):
"""Parent class for faking objects used in tests"""
FEATURES = []
def __init__(self):
for featur... | agpl-3.0 |
trdean/grEME | gr-analog/python/analog/wfm_tx.py | 40 | 3172 | #
# Copyright 2005,2007,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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 ve... | gpl-3.0 |
xkollar/spacewalk | client/rhel/rhn-client-tools/src/firstboot-legacy-rhel6/rhn_start_gui.py | 8 | 4484 | # Copyright 2006--2010 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT... | gpl-2.0 |
davidyezsetz/kuma | vendor/packages/django-threadedcomments/examples/tut1/settings.py | 9 | 2902 | # Django settings for exampleproj project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'sampledb.db' # Or path... | mpl-2.0 |
taimur97/Feeder | server/flaskapp/feeder/rest.py | 1 | 7265 | # -*- coding: utf-8 -*-
'''
The REST-API of Feeder
'''
from feeder import app
from .database import db
from .models import (Feed, FeedItem, UserFeed, UserDeletion,
get_user, get_feed, get_userfeed)
#from flask_oauthlib.client import OAuth
from flask.ext.restful import (Resource, Api, reqparse, fie... | gpl-2.0 |
nyuszika7h/youtube-dl | youtube_dl/extractor/lego.py | 11 | 6113 | # coding: utf-8
from __future__ import unicode_literals
import re
import uuid
from .common import InfoExtractor
from ..compat import compat_HTTPError
from ..utils import (
ExtractorError,
int_or_none,
qualities,
)
class LEGOIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?lego\.com/(?P<locale>[a... | unlicense |
SamYaple/neutron | neutron/extensions/external_net.py | 29 | 2023 | # Copyright (c) 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... | apache-2.0 |
Godmaster49/mtasa-blue | vendor/google-breakpad/src/tools/gyp/test/win/gyptest-cl-enable-enhanced-instruction-set.py | 67 | 1214 | #!/usr/bin/env python
# Copyright (c) 2014 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.
"""
Test VCCLCompilerTool EnableEnhancedInstructionSet setting.
"""
import TestGyp
import os
import sys
if sys.platform == 'win32':
tes... | gpl-3.0 |
ampax/edx-platform | common/lib/xmodule/xmodule/conditional_module.py | 17 | 10100 | """Conditional module is the xmodule, which you can use for disabling
some xmodules by conditions.
"""
import json
import logging
from lazy import lazy
from lxml import etree
from pkg_resources import resource_string
from xmodule.x_module import XModule, STUDENT_VIEW
from xmodule.seq_module import SequenceDescriptor
... | agpl-3.0 |
leansoft/edx-platform | lms/djangoapps/dashboard/management/commands/git_add_course.py | 102 | 1968 | """
Script for importing courseware from git/xml into a mongo modulestore
"""
import logging
from django.core.management.base import BaseCommand, CommandError
from django.utils.translation import ugettext as _
import dashboard.git_import
from dashboard.git_import import GitImportError
from xmodule.modulestore.django... | agpl-3.0 |
gochist/horizon | openstack_dashboard/dashboards/router/dashboard.py | 7 | 1046 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.