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 |
|---|---|---|---|---|---|
erdincay/pjsip-project | pjsip-apps/src/pygui/buddy.py | 27 | 4225 | # $Id$
#
# pjsua Python GUI Demo
#
# Copyright (C)2013 Teluu Inc. (http://www.teluu.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 Software Foundation; either version 2 of the License, or
# (at your option) ... | gpl-2.0 |
neumerance/cloudloon2 | .venv/lib/python2.7/site-packages/setuptools/tests/test_packageindex.py | 66 | 7154 | """Package Index Tests
"""
import sys
import unittest
import pkg_resources
from setuptools.compat import urllib2, httplib, HTTPError, unicode
import distutils.errors
import setuptools.package_index
from setuptools.tests.server import IndexServer
class TestPackageIndex(unittest.TestCase):
def test_bad_url_bad_port... | apache-2.0 |
JPJPJPOPOP/zulip | zerver/views/unsubscribe.py | 8 | 2458 | from __future__ import absolute_import
from django.conf import settings
from django.http import HttpRequest, HttpResponse
from django.shortcuts import render
from typing import Callable
from confirmation.models import Confirmation
from zerver.lib.actions import do_change_enable_offline_email_notifications, \
do_c... | apache-2.0 |
pattisdr/osf.io | api/collections/urls.py | 1 | 1807 | from django.conf.urls import url
from api.collections import views
app_name = 'osf'
urlpatterns = [
url(r'^$', views.CollectionList.as_view(), name=views.CollectionList.view_name),
url(r'^(?P<collection_id>\w+)/$', views.CollectionDetail.as_view(), name=views.CollectionDetail.view_name),
url(r'^(?P<colle... | apache-2.0 |
mcellteam/gamer | tools/blendgamer/src/colormap_enums.py | 1 | 1151 | # ***************************************************************************
# This file is part of the GAMer software.
# Copyright (C) 2016-2018
# by Christopher Lee, Tom Bartol, John Moody, Rommie Amaro, J. Andrew McCammon,
# and Michael Holst
# This library is free software; you can redistribute it and/or
# mod... | gpl-2.0 |
spiceqa/tp-spice | spice/tests/rv_setup.py | 2 | 8349 | #!/usr/bin/env python
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that ... | gpl-2.0 |
numenta-archive/htmresearch | projects/nlp/junit_test8.py | 11 | 6420 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2016, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditio... | agpl-3.0 |
donkirkby/django | django/contrib/gis/geos/coordseq.py | 374 | 5482 | """
This module houses the GEOSCoordSeq object, which is used internally
by GEOSGeometry to house the actual coordinates of the Point,
LineString, and LinearRing geometries.
"""
from ctypes import byref, c_double, c_uint
from django.contrib.gis.geos import prototypes as capi
from django.contrib.gis.geos.base import... | bsd-3-clause |
sajeeshcs/nested_quota_final | nova/tests/unit/virt/libvirt/test_vif.py | 1 | 48234 | # Copyright 2012 Nicira, 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 agr... | apache-2.0 |
tboyce021/home-assistant | homeassistant/components/insteon/fan.py | 7 | 2541 | """Support for INSTEON fans via PowerLinc Modem."""
from pyinsteon.constants import FanSpeed
from homeassistant.components.fan import (
DOMAIN as FAN_DOMAIN,
SPEED_HIGH,
SPEED_LOW,
SPEED_MEDIUM,
SPEED_OFF,
SUPPORT_SET_SPEED,
FanEntity,
)
from homeassistant.helpers.dispatcher import async_di... | apache-2.0 |
aprefontaine/TMScheduler | django/db/backends/creation.py | 11 | 20456 | import sys
import time
from django.conf import settings
from django.core.management import call_command
# The prefix to put on the default database name when creating
# the test database.
TEST_DATABASE_PREFIX = 'test_'
class BaseDatabaseCreation(object):
"""
This class encapsulates all backend-specific diffe... | bsd-3-clause |
praneethkumarpidugu/matchmaking | lib/python2.7/site-packages/django/contrib/postgres/validators.py | 458 | 2718 | import copy
from django.core.exceptions import ValidationError
from django.core.validators import (
MaxLengthValidator, MaxValueValidator, MinLengthValidator,
MinValueValidator,
)
from django.utils.deconstruct import deconstructible
from django.utils.translation import ugettext_lazy as _, ungettext_lazy
clas... | mit |
geoenvo/geonode | geonode/people/urls.py | 29 | 1493 | #########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... | gpl-3.0 |
Jenselme/servo | tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_stream_hixie75.py | 496 | 2285 | #!/usr/bin/env python
#
# 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... | mpl-2.0 |
alexandrucoman/vbox-nova-driver | nova/tests/unit/api/openstack/compute/contrib/test_instance_usage_audit_log.py | 33 | 9872 | # Copyright (c) 2012 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 |
jeremy24/494-graph-algos | python/hw2/timeit.py | 1 | 1308 |
from __future__ import print_function
import time
import os
from graph import Graph
from graph import make
from graph import GraphException
from graph import Matrix
def run(name):
graph = make( name )
ret = [0,0]
start = time.time()
graph.dfs(0)
ret[1] = (time.time()-star... | mit |
MarkTheF4rth/youtube-dl | youtube_dl/extractor/trilulilu.py | 109 | 2890 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import ExtractorError
class TriluliluIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?trilulilu\.ro/(?:video-[^/]+/)?(?P<id>[^/#\?]+)'
_TEST = {
'url': 'http://www.trilulilu.ro/video-... | unlicense |
vseledkin/dl4mt-material | session2/data_iterator.py | 4 | 2352 | import numpy
import cPickle as pkl
from nltk.tokenize import wordpunct_tokenize
class TextIterator:
def __init__(self, source, target,
source_dict, target_dict,
batch_size=128,
maxlen=100,
n_words_source=-1,
n_words_target=-1)... | bsd-3-clause |
Magicjarvis/py | py/_process/cmdexec.py | 273 | 1814 | import sys
import subprocess
import py
from subprocess import Popen, PIPE
def cmdexec(cmd):
""" return unicode output of executing 'cmd' in a separate process.
raise cmdexec.Error exeception if the command failed.
the exception will provide an 'err' attribute containing
the error-output from the comma... | mit |
rgrover/mbed | tools/test/config_test/test07/test_data.py | 38 | 1791 | # This build on top of test6 by adding overrides for libs in the application
expected_results = {
"base": {
"desc": "override values based on labels with libs (no labels)",
"app.app1": "v_app1",
"app.app2": "v_app2",
"lib1.p1": "v_p1_lib1_app",
"lib1.p2": "v_p2_lib1",
... | apache-2.0 |
Jackman3005/CUAutograding | CUAutogradingScripts/GradingScriptLibrary/LocalBatchGrading/BatchGrader.py | 1 | 3612 | #THESE LINES ARE NEEDED TO ADD THE GradingScriptLibrary path to the system path so they can be imported!!!
import os,sys,inspect
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"../../")))
if cmd_subfolder not in sys.path:
sys.path.insert(0, ... | agpl-3.0 |
knittledan/Location_Search_Prediction | thirdParty/requests/packages/urllib3/request.py | 567 | 5808 | # urllib3/request.py
# Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencod... | mit |
MaxxUAV/ardupilot | Tools/LogAnalyzer/tests/TestVibration.py | 261 | 3069 | from LogAnalyzer import Test,TestResult
import DataflashLog
import numpy
class TestVibration(Test):
'''test for accelerometer vibration (accX/accY/accZ) within recommendations'''
def __init__(self):
Test.__init__(self)
self.name = "Vibration"
def run(self, logdata, verbose):
se... | gpl-3.0 |
dav1x/ansible | test/units/playbook/test_play.py | 185 | 4200 | # (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 |
DroneBuster/MissionPlanner | LogAnalyzer/py2exe/tests/TestCompass.py | 66 | 6392 | from LogAnalyzer import Test,TestResult
import DataflashLog
from functools import reduce
import math
class TestCompass(Test):
'''test for compass offsets and throttle interference'''
def __init__(self):
Test.__init__(self)
self.name = "Compass"
def run(self, logdata, verbose):
s... | gpl-3.0 |
Geosyntec/gisutils | gisutils/utils.py | 2 | 2113 | """
General utilities
"""
import os
def add_suffix_to_filename(filename, suffix):
"""
Adds a suffix to a(n output) filename.
Parameters
----------
filename : str or a list of str
The filename that needs a suffix.
suffix : str
The suffix to be added.
Returns
-------
... | bsd-3-clause |
sandeepgupta2k4/tensorflow | tensorflow/python/estimator/export/export.py | 16 | 7446 | # 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 |
shadow4125/qg.core | tests/unit/test_singleton.py | 2 | 1515 | # -*- coding: utf-8 -*-
#
# Copyright 2014, Qunar OPSDEV
#
# 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... | apache-2.0 |
andrius-preimantas/purchase-workflow | product_by_supplier/models/product_supplierinfo.py | 14 | 1188 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2010-2013 Elico Corp.
# Author: Yannick Gouin <yannick.gouin@elico-corp.com>
#
# This program is free software: you can redistribute it and/or m... | agpl-3.0 |
pekeler/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/email/iterators.py | 415 | 2202 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""Various types of useful iterators and generators."""
__all__ = [
'body_line_iterator',
'typed_subpart_iterator',
'walk',
# Do not include _structure() since it's part of the debugging API.
... | apache-2.0 |
twiest/openshift-tools | ansible/roles/lib_gcloud/build/ansible/gcloud_dm_resource_builder.py | 13 | 7097 | # pylint: skip-file
# vim: expandtab:tabstop=4:shiftwidth=4
def get_names(rname, count):
'''generate names and return them in a list'''
return ['%s-%s' % (rname, Utils.generate_random_name(5)) for _ in range(count)]
#pylint: disable=too-many-branches
def main():
''' ansible module for gcloud deployment-ma... | apache-2.0 |
3dfxmadscientist/odoo_vi | addons/website_partner/__openerp__.py | 383 | 1498 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
ulope/django | django/db/models/fields/__init__.py | 7 | 83731 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import collections
import copy
import datetime
import decimal
import math
import uuid
import warnings
from base64 import b64decode, b64encode
from itertools import tee
from django.apps import apps
from django.db import connection
from django.db.models.lo... | bsd-3-clause |
nathanaevitas/odoo | openerp/addons/base_action_rule/test_models.py | 333 | 1131 | from openerp.osv import fields, osv
from openerp import api
AVAILABLE_STATES = [
('draft', 'New'),
('cancel', 'Cancelled'),
('open', 'In Progress'),
('pending', 'Pending'),
('done', 'Closed')
]
class lead_test(osv.Model):
_name = "base.action.rule.lead.test"
_columns = {
'name': f... | agpl-3.0 |
keepkey/python-keepkey | tests/test_msg_signtx_xfer.py | 1 | 22824 | # This file is part of the TREZOR project.
#
# Copyright (C) 2012-2016 Marek Palatinus <slush@satoshilabs.com>
# Copyright (C) 2012-2016 Pavol Rusnak <stick@satoshilabs.com>
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as pu... | lgpl-3.0 |
kaedroho/django | tests/template_tests/syntax_tests/test_include.py | 25 | 12938 | from django.template import (
Context, Engine, TemplateDoesNotExist, TemplateSyntaxError, loader,
)
from django.test import SimpleTestCase
from ..utils import setup
from .test_basic import basic_templates
include_fail_templates = {
'include-fail1': '{% load bad_tag %}{% badtag %}',
'include-fail2': '{% lo... | bsd-3-clause |
ehashman/oh-mainline | vendor/packages/twisted/twisted/web/_stan.py | 18 | 10146 | # -*- test-case-name: twisted.web.test.test_stan -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
An s-expression-like syntax for expressing xml in pure python.
Stan tags allow you to build XML documents using Python.
Stan is a DOM, or Document Object Model, implemented using basic Pyt... | agpl-3.0 |
dliessi/frescobaldi | frescobaldi_app/pitch/pitch.py | 3 | 7721 | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2011 - 2014 by Wilbert Berendsen
#
# 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
... | gpl-2.0 |
gnarula/eden_deployment | modules/s3db/asset.py | 1 | 56243 | # -*- coding: utf-8 -*-
""" Sahana Eden Assets Model
@copyright: 2009-2014 (c) Sahana Software Foundation
@license: MIT
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 withou... | mit |
linus-sherrill/sprokit | src/bindings/python/modules/modules.py | 3 | 2625 | #ckwg +28
# Copyright 2012-2013 by Kitware, 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 con... | bsd-3-clause |
microcom/odoo | addons/website_sale/models/product.py | 12 | 9232 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import openerp
from openerp import tools
from openerp.osv import osv, fields
from openerp.tools.translate import html_translate
class product_style(osv.Model):
_name = "product.style"
_columns = {
'name'... | agpl-3.0 |
ravibhure/ansible | hacking/return_skeleton_generator.py | 118 | 3279 | #!/usr/bin/env python
# (c) 2017, Will Thames <will@thames.id.au>
#
# 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 op... | gpl-3.0 |
klmitch/pbr | pbr/tests/test_hooks.py | 64 | 4039 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# 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 |
ElectryDev/android_kernel_grouper | tools/perf/scripts/python/check-perf-trace.py | 11214 | 2503 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... | gpl-2.0 |
bobobox/ansible | lib/ansible/modules/cloud/cloudstack/cs_configuration.py | 16 | 8628 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.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 version 3 of the Lice... | gpl-3.0 |
SUSE/azure-sdk-for-python | azure-mgmt-redis/azure/mgmt/redis/models/export_rdb_parameters.py | 4 | 1257 | # 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 |
samw3/PyTweeps | pytweeps.py | 1 | 20531 | # PyTweeps: Simple Python program to help manage your twitter followers.
# https://github.com/samw3/PyTweeps
import pkg_resources
import tweepy
import webbrowser
import shelve
import pprint
import sys
import traceback
import time
import collections
from datetime import datetime
from datetime import timedelta
from conf... | gpl-2.0 |
laiqiqi886/kbengine | kbe/src/lib/python/Lib/encodings/iso2022_kr.py | 816 | 1053 | #
# iso2022_kr.py: Python Unicode Codec for ISO2022_KR
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_iso2022, codecs
import _multibytecodec as mbc
codec = _codecs_iso2022.getcodec('iso2022_kr')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEncod... | lgpl-3.0 |
aperigault/ansible | lib/ansible/modules/cloud/openstack/os_ironic_node.py | 6 | 12322 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2015, Hewlett-Packard Development Company, L.P.
# 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 |
3dfxsoftware/cbss-addons | invoice_report_per_journal/report/invoice_report_demo.py | 1 | 2131 | # -*- encoding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
#
# Copyright (c) 2014 Vauxoo - http://www.vauxoo.com/
# All Rights Reserved.
# info Vauxoo (info@vauxoo.com)
####################################... | gpl-2.0 |
FinnStutzenstein/OpenSlides | server/openslides/users/signals.py | 6 | 7902 | from django.apps import apps
from django.contrib.auth.models import Permission
from django.db.models import Q
from openslides.utils.auth import GROUP_ADMIN_PK, GROUP_DEFAULT_PK
from openslides.utils.postgres import restart_id_sequence
from .models import Group, User
def get_permission_change_data(sender, permission... | mit |
bcoca/ansible | test/lib/ansible_test/_internal/commands/integration/__init__.py | 13 | 46686 | """Ansible integration test infrastructure."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import contextlib
import datetime
import difflib
import filecmp
import json
import os
import random
import re
import shutil
import string
import tempfile
import time
from ... import t... | gpl-3.0 |
HalcyonChimera/osf.io | addons/mendeley/tests/utils.py | 13 | 16023 | # -*- coding: utf-8 -*-
from addons.base.tests.base import OAuthAddonTestCaseMixin, AddonTestCase
from addons.base.tests.utils import MockFolder
from addons.mendeley.tests.factories import MendeleyAccountFactory
from addons.mendeley.models import Mendeley
from json import dumps
class MendeleyTestCase(OAuthAddonTestC... | apache-2.0 |
dataplumber/edge | src/main/python/libraries/edge/dateutility.py | 2 | 1665 | from datetime import date, datetime, timedelta
import dateutil.parser
import calendar
"""
Utility class for date and time conversion.
"""
class DateUtility(object):
RFC_822_GMT_FORMAT = "%a, %d %b %Y %H:%M:%S GMT"
@staticmethod
def convertTimeLongToIso(time):
isoTime = ''
try:
... | apache-2.0 |
mrgloom/h2o-3 | py/testdir_multi_jvm/test_gbm_prostate.py | 12 | 1407 | import sys
import os
sys.path.insert(1, os.path.join('..','..','h2o-py'))
#sys.path.insert(0, os.path.join('..','..','h2o-py'))
import h2o
######################################################
# Parse command-line args.
#
# usage: python test_name.py --usecloud ipaddr:port
#
ip_port = sys.argv[2].split(":")
print i... | apache-2.0 |
vlachoudis/sl4a | python/gdata/src/gdata/tlslite/utils/compat.py | 361 | 4060 | """Miscellaneous functions to mask Python version differences."""
import sys
import os
if sys.version_info < (2,2):
raise AssertionError("Python 2.2 or later required")
if sys.version_info < (2,3):
def enumerate(collection):
return zip(range(len(collection)), collection)
class Set:
def ... | apache-2.0 |
fredrikw/scipy | scipy/ndimage/tests/test_measurements.py | 117 | 36240 | from __future__ import division, print_function, absolute_import
import os.path
import warnings
import numpy as np
from numpy.testing import (assert_, assert_array_almost_equal, assert_equal,
assert_almost_equal, assert_array_equal,
assert_raises, run_module_suite... | bsd-3-clause |
MikeFair/www.gittip.com | gittip/csrf.py | 1 | 6543 | """Cross Site Request Forgery middleware, borrowed from Django.
See also:
https://github.com/django/django/blob/master/django/middleware/csrf.py
https://docs.djangoproject.com/en/dev/ref/contrib/csrf/
https://github.com/zetaweb/www.gittip.com/issues/88
"""
import rfc822
import re
import time
import urlpa... | cc0-1.0 |
geopython/QGIS | python/plugins/MetaSearch/dialogs/manageconnectionsdialog.py | 36 | 6685 | # -*- coding: utf-8 -*-
###############################################################################
#
# CSW Client
# ---------------------------------------------------------
# QGIS Catalog Service client.
#
# Copyright (C) 2010 NextGIS (http://nextgis.org),
# Alexander Bruy (alexander.bruy@gmail... | gpl-2.0 |
kustodian/ansible | lib/ansible/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py | 16 | 2748 | #!/usr/bin/python
# Copyright: (c) 2018, Stephan Schwarz <stearz@gmx.de>
# 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'... | gpl-3.0 |
renyi533/tensorflow | tensorflow/python/ops/script_ops_test.py | 18 | 1462 | # Copyright 2020 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 |
nangia/django-allauth | allauth/socialaccount/providers/dropbox/views.py | 65 | 1346 | import json
from allauth.socialaccount.providers.oauth.client import OAuth
from allauth.socialaccount.providers.oauth.views import (OAuthAdapter,
OAuthLoginView,
OAuthCallbackView)
from .provider import D... | mit |
HyperBaton/ansible | lib/ansible/modules/files/assemble.py | 32 | 8572 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2012, Stephen Fromm <sfromm@gmail.com>
# Copyright: (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import ab... | gpl-3.0 |
ksang/error-extractor | lib/markdown.py | 1 | 2193 | '''
MarkDown format generator
'''
class MarkDown:
'convert raw text to markdown syntax'
def __init__(self):
self.escape_table = {"\\": "\\\\", "`": "\`",
"*": "\*", "_": "\_",
"{": "\{", "}": "\}",
"[": ... | mit |
levilucio/SyVOLT | ECore_Copier_MM/transformation-Large/HeoperationlefteAnnotationsSolveRefEOperationEAnnotationEOperationEAnnotation.py | 1 | 5078 |
from core.himesis import Himesis
class HeoperationlefteAnnotationsSolveRefEOperationEAnnotationEOperationEAnnotation(Himesis):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HeoperationlefteAnnotationsSolveRefEOperationEAnnotationEOperationEAnnotation.
"""
... | mit |
zycdragonball/tensorflow | tensorflow/python/kernel_tests/linalg_grad_test.py | 81 | 7619 | # 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 |
draugiskisprendimai/odoo | addons/lunch/lunch.py | 344 | 23407 | # -*- encoding: 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 G... | agpl-3.0 |
Vishluck/sympy | sympy/integrals/manualintegrate.py | 51 | 41607 | """Integration method that emulates by-hand techniques.
This module also provides functionality to get the steps used to evaluate a
particular integral, in the ``integral_steps`` function. This will return
nested namedtuples representing the integration rules used. The
``manualintegrate`` function computes the integra... | bsd-3-clause |
yongshengwang/builthue | desktop/core/ext-py/Pygments-1.3.1/pygments/styles/murphy.py | 75 | 2751 | # -*- coding: utf-8 -*-
"""
pygments.styles.murphy
~~~~~~~~~~~~~~~~~~~~~~
Murphy's style from CodeRay.
:copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyword, Name, Comment,... | apache-2.0 |
vainotuisk/icecreamratings | ENV/lib/python2.7/site-packages/wheel/tool/__init__.py | 238 | 13310 | """
Wheel command-line utility.
"""
import os
import hashlib
import sys
import json
import wheel.paths
from glob import iglob
from .. import signatures
from ..util import (urlsafe_b64decode, urlsafe_b64encode, native, binary,
matches_requirement)
from ..install import WheelFile
def require_pkgre... | bsd-3-clause |
zrhans/pythonanywhere | pyscripts/ply_wrose.py | 1 | 1678 | """
DATA,Chuva,Chuva_min,Chuva_max,VVE,VVE_min,VVE_max,DVE,DVE_min,DVE_max,Temp.,Temp._min,Temp._max,Umidade,Umidade_min,Umidade_max,Rad.,Rad._min,Rad._max,Pres.Atm.,Pres.Atm._min,Pres.Atm._max,Temp.Int.,Temp.Int._min,Temp.Int._max,CH4,CH4_min,CH4_max,HCnM,HCnM_min,HCnM_max,HCT,HCT_min,HCT_max,SO2,SO2_min,SO2_max,O3,O3... | apache-2.0 |
krousey/test-infra | gubernator/third_party/cloudstorage/common.py | 129 | 12326 | # 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 by applicable law or ag... | apache-2.0 |
yaojingwu1992/XlsxWriter | xlsxwriter/test/comparison/test_print_area07.py | 8 | 1330 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | bsd-2-clause |
wujuguang/sqlalchemy | lib/sqlalchemy/dialects/sybase/pysybase.py | 2 | 3313 | # sybase/pysybase.py
# Copyright (C) 2010-2019 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: sybase+pysybase
:name: Python-Sybase
:dbapi: Sybase
... | mit |
Travelport-Czech/apila | tasks/Lambda.py | 1 | 8808 | import zipfile
import tempfile
import shutil
import os
import os.path
import hashlib
import base64
import json
import logging
import subprocess
import re
import botocore
import tasks.name_constructor as name_constructor
import tasks.bototools as bototools
from tasks.Task import Task
class Lambda(Task):
"""Create a ... | mit |
cypsun/FreeCAD | src/Mod/Sandbox/InitGui.py | 57 | 2289 | # Sandbox gui init module
# (c) 2003 Juergen Riegel
#
# Gathering all the information to start FreeCAD
# This is the second one of three init scripts, the third one
# runs when the gui is up
#***************************************************************************
#* (c) Juergen Riegel (juergen.riegel@web... | lgpl-2.1 |
kyuupichan/electrumx | docs/conf.py | 1 | 5054 | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ------------------------------------------------------------... | mit |
puneetgkaur/backup_sugar_shell_for_cordova | src/jarabe/view/buddyicon.py | 12 | 2746 | # Copyright (C) 2006-2007 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; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distribute... | gpl-2.0 |
gcallah/Indra | indraV1/models/markov_attempts/two_pop_markov_model.py | 1 | 1534 | """
You can clone this file and its companion two_pop_m_run.py
to easily get started on a new two pop markov model.
It also is a handy tool to have around for testing
new features added to the base system. The agents
don't move. They have 50% chance of changing color
from red to blue, or from blue to red.
"""
import i... | gpl-3.0 |
randynobx/ansible | lib/ansible/modules/net_tools/dnsimple.py | 63 | 12241 | #!/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 distributed... | gpl-3.0 |
ForrestAlfred/firefox-ios | scripts/mod_pbxproj.py | 54 | 52734 | # Copyright 2012 Calvin Rien
#
# 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... | mpl-2.0 |
wesley1001/formhub | main/tests/test_csv_export.py | 5 | 4136 | import os
from django.core.files.storage import get_storage_class
from django.utils.dateparse import parse_datetime
from odk_viewer.models import DataDictionary, Export
from utils.export_tools import generate_export
from test_base import MainTestCase
class TestExport(MainTestCase):
def setUp(self):
self.... | bsd-2-clause |
destroy/SleekXMPP-gevent | sleekxmpp/thirdparty/ordereddict.py | 254 | 4221 | # Copyright (c) 2009 Raymond Hettinger
#
# 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, merge,
# pu... | mit |
Lessig2016/pledgeservice | lib/validictory/tests/test_properties.py | 16 | 9370 | from unittest import TestCase
import validictory
class TestProperties(TestCase):
props = {
"prop01": {"type": "string"},
"prop02": {"type": "number", "required": False},
"prop03": {"type": "integer"},
"prop04": {"type": "boolean"},
"prop05": {
"type": "object",... | agpl-3.0 |
jainanisha90/WeVoteServer | apis_v1/views/views_issues.py | 2 | 4758 | # apis_v1/views/views_organization.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from issue.models import *
from config.base import get_environment_variable
from django.http import HttpResponse
import json
from issue.controllers import retrieve_issues_not_linked_to_organization_for_api, \
retriev... | mit |
marc-sensenich/ansible | lib/ansible/modules/cloud/vmware/vca_vapp.py | 55 | 11797 | #!/usr/bin/python
# Copyright: (c) 2015, Ansible, 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',
'status': ['preview'],
'... | gpl-3.0 |
UBERMALLOW/external_skia | tools/generate_includes_cpp.py | 62 | 2694 | #!/usr/bin/python
'''
Copyright 2014 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
'''
import os
import optparse
import posixpath
import re
def is_ignored(full_path, ignore_list):
for ignore_path in ignore_list:
if re.search(ignore_path, full_pa... | bsd-3-clause |
Trult/youtube-dl | youtube_dl/extractor/channel9.py | 124 | 11345 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import ExtractorError
class Channel9IE(InfoExtractor):
'''
Common extractor for channel9.msdn.com.
The type of provided URL (video or playlist) is determined according to
meta Search.PageType from web p... | unlicense |
ThomasFeher/audacity | lib-src/lv2/sord/waflib/Tools/dbus.py | 318 | 1142 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
from waflib import Task,Errors
from waflib.TaskGen import taskgen_method,before_method
@taskgen_method
def add_dbus_file(self,filename,prefix,mode):
if not hasattr(self,'dbus... | gpl-2.0 |
joanneko/goodbooks | goodbooks/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/escprober.py | 2936 | 3187 | ######################## 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... | bsd-3-clause |
imankulov/android2po | tests/test_commands.py | 3 | 6703 | """TOOD: We need to test the basic command functionality, ensuring that
at it's core, import, export and init are operative, create the files they
should create, skip the files they should skip when they should be skipped,
etc. In particular, we should test both the case of multiple XML input files
(strings.xml, arrays... | bsd-2-clause |
rrooij/youtube-dl | youtube_dl/extractor/viidea.py | 36 | 7446 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_HTTPError,
compat_str,
compat_urlparse,
)
from ..utils import (
ExtractorError,
js_to_json,
parse_duration,
parse_iso8601,
)
class ViideaIE(InfoExtractor):
_VALID_URL = r... | unlicense |
parksandwildlife/biosys | biosys/apps/main/tests/api/test_species_observation.py | 1 | 71256 | import datetime
import re
from os import path
import json
from django.contrib.gis.geos import Point
from django.core.urlresolvers import reverse
from django.utils import timezone, six
from openpyxl import load_workbook
from rest_framework import status
from main.models import Dataset, Record
from main.tests.api impor... | apache-2.0 |
hwhiskard/hwhiskard.github.io | bower_components/three.js-master/utils/exporters/maya/plug-ins/threeJsFileTranslator.py | 51 | 23623 | __author__ = 'Sean Griffin'
__version__ = '1.0.0'
__email__ = 'sean@thoughtbot.com'
import sys
import os.path
import json
import shutil
from pymel.core import *
from maya.OpenMaya import *
from maya.OpenMayaMPx import *
kPluginTranslatorTypeName = 'Three.js'
kOptionScript = 'ThreeJsExportScript'
kDefaultOptionsStri... | mit |
kapy2010/treeherder | treeherder/etl/management/commands/ingest_push.py | 4 | 3925 | import logging
from cProfile import Profile
from django.conf import settings
from django.core.management.base import (BaseCommand,
CommandError)
from treeherder.etl.buildapi import (Builds4hJobsProcess,
PendingJobsProcess,
... | mpl-2.0 |
toomoresuch/pysonengine | eggs/Jinja2-2.5.5-py2.6.egg/jinja2/testsuite/filters.py | 14 | 10863 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.filters
~~~~~~~~~~~~~~~~~~~~~~~~
Tests for the jinja filters.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import unittest
from jinja2.testsuite import JinjaTestCase
from jinja2 import Markup, Environment
en... | mit |
LinuxChristian/home-assistant | tests/components/test_conversation.py | 5 | 8720 | """The tests for the Conversation component."""
# pylint: disable=protected-access
import asyncio
import unittest
from unittest.mock import patch
from homeassistant.core import callback
from homeassistant.setup import setup_component, async_setup_component
import homeassistant.components as core_components
from homeas... | apache-2.0 |
dparlevliet/zelenka-report-storage | server-db/twisted/python/runtime.py | 35 | 4138 | # -*- test-case-name: twisted.python.test.test_runtime -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from __future__ import division, absolute_import
import os
import sys
import time
import imp
import warnings
from twisted.python import compat
if compat._PY3:
_threadModule = "_thre... | lgpl-3.0 |
aavanian/bokeh | sphinx/source/docs/user_guide/examples/plotting_label.py | 18 | 1174 | from bokeh.plotting import figure, show, output_file
from bokeh.models import ColumnDataSource, Range1d, LabelSet, Label
output_file("label.html", title="label.py example")
source = ColumnDataSource(data=dict(height=[66, 71, 72, 68, 58, 62],
weight=[165, 189, 220, 141, 260, 174],
... | bsd-3-clause |
duqiao/django | tests/syndication_tests/urls.py | 236 | 1027 | from django.conf.urls import url
from . import feeds
urlpatterns = [
url(r'^syndication/rss2/$', feeds.TestRss2Feed()),
url(r'^syndication/rss2/guid_ispermalink_true/$',
feeds.TestRss2FeedWithGuidIsPermaLinkTrue()),
url(r'^syndication/rss2/guid_ispermalink_false/$',
feeds.TestRss2FeedWithG... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.