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 |
|---|---|---|---|---|---|
saeidadli/Python-ArcGIS-Convertor | arcgdfconvertor/convertor.py | 1 | 3491 | import os
import sys
import tempfile
from pathlib import Path
import arcpy
import pandas as pd
import numpy as np
import geopandas as gpd
#constants
#WGS_1984 coordinate system
WGS_1984 = \
"GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984', "+\
"SPHEROID['WGS_1984',6378137.0,298.257223563]], "+\
"PRIMEM['Greenwi... | mit |
Centre-Alt-Rendiment-Esportiu/att | old_project/Python/win_libs/scipy/signal/tests/test_savitzky_golay.py | 18 | 9463 | from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import (run_module_suite, assert_allclose, assert_equal,
assert_almost_equal, assert_array_equal)
from scipy.ndimage import convolve1d
from scipy.signal import savgol_coeffs, savgol_filte... | gpl-3.0 |
rcarrillocruz/ansible | lib/ansible/modules/network/nxos/nxos_snmp_location.py | 55 | 5795 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 |
AravindK95/ee106b | project3/src/lab3/src/extra/grasp_ctrl.py | 1 | 5226 | #!/usr/bin/env python
import sys
import rospkg
import rospy
import tf
import numpy as np
from std_msgs.msg import String, Bool
from geometry_msgs.msg import Transform, Pose, Vector3, Quaternion, Point
from lab3.msg import FrameCall
PROJECT_PATH = rospkg.RosPack().get_path('lab3')
sys.path.append(PROJECT_PATH+'/src/lab... | mit |
googleads/google-ads-python | google/ads/googleads/v7/services/services/mobile_device_constant_service/transports/grpc.py | 1 | 10591 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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 |
clero/parameter-framework | tools/xmlGenerator/hostConfig.py | 22 | 2759 | #!/usr/bin/python
# -*-coding:utf-8 -*
# Copyright (c) 2011-2014, Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above cop... | bsd-3-clause |
hdinsight/hue | desktop/core/ext-py/pysqlite/pysqlite2/test/types.py | 45 | 14943 | #-*- coding: ISO-8859-1 -*-
# pysqlite2/test/types.py: tests for type conversion and detection
#
# Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for... | apache-2.0 |
sve-odoo/odoo | addons/account/wizard/account_move_line_unreconcile_select.py | 385 | 1864 | # -*- 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 |
dcrosta/nymwit | nymwit/game/management/commands/advancegamestate.py | 1 | 2917 | # Copyright (c) 2011, Daniel Crosta
# 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... | bsd-2-clause |
michaelkirk/QGIS | python/ext-libs/jinja2/meta.py | 659 | 4190 | # -*- coding: utf-8 -*-
"""
jinja2.meta
~~~~~~~~~~~
This module implements various functions that exposes information about
templates that might be interesting for various kinds of applications.
:copyright: (c) 2010 by the Jinja Team, see AUTHORS for more details.
:license: BSD, see LICENSE fo... | gpl-2.0 |
kartikdhar/djangotest | virt1/lib/python2.7/site-packages/setuptools/depends.py | 462 | 6370 | import sys
import imp
import marshal
from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN
from distutils.version import StrictVersion
from setuptools import compat
__all__ = [
'Require', 'find_module', 'get_module_constant', 'extract_constant'
]
class Require:
"""A prerequisite to building or inst... | mit |
premanandchandrasekar/boto | boto/ec2/elb/policies.py | 24 | 3857 | # Copyright (c) 2010 Reza Lotun http://reza.lotun.name
#
# 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... | mit |
ikool/metact06-djan | lib/Crypto/Cipher/CAST.py | 116 | 4498 | # -*- coding: utf-8 -*-
#
# Cipher/CAST.py : CAST
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is granted a worldwide, perpetual, royalty-free,
#... | bsd-3-clause |
raymondnijssen/QGIS | tests/src/python/test_provider_tabfile.py | 24 | 4558 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for the OGR/MapInfo tab provider.
.. 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 version 2 of the License, or
(at your option) any later v... | gpl-2.0 |
lscheinkman/nupic | examples/prediction/category_prediction/clean.py | 9 | 1148 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 |
blitzmann/Pyfa | service/port/shared.py | 2 | 2923 | # =============================================================================
# Copyright (C) 2014 Ryan Holmes
#
# This file is part of pyfa.
#
# pyfa 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 v... | gpl-3.0 |
pombredanne/pylearn2 | pylearn2/scripts/tutorials/gae_demo/test_gae.py | 39 | 1861 | """
This module tests gae_demo/gae_random.yaml
"""
import os
import logging
from pylearn2.testing import no_debug_mode
from pylearn2.config import yaml_parse
from pylearn2.scripts.tutorials.gae_demo.make_random_dataset import generate
@no_debug_mode
def train_yaml(yaml_file):
"""
Executes the the main_loop()... | bsd-3-clause |
Cheaterman/kivy | examples/canvas/lines_extended.py | 21 | 3977 | '''
Lines Extended Demo
===================
This demonstrates how to use the extended line drawing routines such
as circles, ellipses, and rectangles. You should see a static image of
labelled shapes on the screen.
'''
from kivy.app import App
from kivy.uix.gridlayout import GridLayout
from kivy.uix.widget import Wid... | mit |
randynobx/ansible | lib/ansible/modules/commands/script.py | 4 | 3031 | # 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 in the hope that ... | gpl-3.0 |
mdhaman/superdesk-aap | server/aap/publish/formatters/aap_text_formatter.py | 2 | 3163 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
from .aap_i... | agpl-3.0 |
timlinux/inasafe | safe/metadata/test/test_generic_metadata.py | 2 | 4110 | # coding=utf-8
"""Test Generic Metadata."""
import os
import uuid
from unittest import TestCase
from safe.common.utilities import unique_filename
from safe.metadata import GenericLayerMetadata
from safe.metadata.test import (
TEMP_DIR,
EXISTING_GENERIC_FILE,
EXISTING_GENERIC_JSON,
EXISTING_NO_METADATA... | gpl-3.0 |
srekcah/infer | infer/bin/inferlib.py | 3 | 22567 | # Copyright (c) 2013 - present Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
from __future__ import ... | bsd-3-clause |
Sylrob434/CouchPotatoServer | libs/requests/packages/charade/gb2312freq.py | 3132 | 36011 | ######################## 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 |
FireWRT/OpenWrt-Firefly-Libraries | staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/xmlrpc/server.py | 96 | 36597 | r"""XML-RPC Servers.
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.
The Doc* classes can b... | gpl-2.0 |
pmleveque/cross-site-navigation | authentification.py | 1 | 1642 | from cefbase import *
from google.appengine.api import users
# Permet de savoir si c'est le bon utilisateur qui cherche a avoir acces aux donnees
# Si l'utlisateur a aucun droit, il n'a acces a rien
# Si le contributeur est un admin de diocese, il n'a acees qu'a ses barres propres, ses menus propres et les menus pu... | mit |
szimszon/filecatalog | gluon/tests/test_contribs.py | 20 | 2128 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Unit tests for contribs """
import unittest
import os
from fix_path import fix_sys_path
fix_sys_path(__file__)
from gluon.storage import Storage
import gluon.contrib.fpdf as fpdf
import gluon.contrib.pyfpdf as pyfpdf
from gluon.contrib.appconfig import AppConfig
d... | gpl-2.0 |
overtherain/scriptfile | software/googleAppEngine/lib/django_1_3/django/contrib/markup/templatetags/markup.py | 289 | 3522 | """
Set of "markup" template filters for Django. These filters transform plain text
markup syntaxes to HTML; currently there is support for:
* Textile, which requires the PyTextile library available at
http://loopcore.com/python-textile/
* Markdown, which requires the Python-markdown library from
... | mit |
jrsupplee/django-activity-stream | actstream/runtests/testapp/models.py | 8 | 1629 | import django
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Player(models.Model):
state = models.IntegerField(default=0)
def __str__(self):
return '#%d' % self.pk
@python_2_unicode_compatible
class Abstract(models.Model... | bsd-3-clause |
upsuper/servo | tests/wpt/web-platform-tests/tools/third_party/pytest/testing/test_unittest.py | 14 | 25317 | from __future__ import absolute_import, division, print_function
from _pytest.main import EXIT_NOTESTSCOLLECTED
import pytest
import gc
def test_simple_unittest(testdir):
testpath = testdir.makepyfile("""
import unittest
class MyTestCase(unittest.TestCase):
def testpassing(self):
... | mpl-2.0 |
zobe123/Plex-CS | lib/unidecode/x0af.py | 253 | 5012 | data = (
'ggyeols', # 0x00
'ggyeolt', # 0x01
'ggyeolp', # 0x02
'ggyeolh', # 0x03
'ggyeom', # 0x04
'ggyeob', # 0x05
'ggyeobs', # 0x06
'ggyeos', # 0x07
'ggyeoss', # 0x08
'ggyeong', # 0x09
'ggyeoj', # 0x0a
'ggyeoc', # 0x0b
'ggyeok', # 0x0c
'ggyeot', # 0x0d
'ggyeop', # 0x0e
'ggy... | gpl-3.0 |
2013Commons/HUE-SHARK | build/env/lib/python2.7/site-packages/eventlet-0.9.14-py2.7.egg/eventlet/support/stacklesss.py | 14 | 1864 | """
Support for using stackless python. Broken and riddled with print statements
at the moment. Please fix it!
"""
import sys
import types
import stackless
caller = None
coro_args = {}
tasklet_to_greenlet = {}
def getcurrent():
return tasklet_to_greenlet[stackless.getcurrent()]
class FirstSwitch(object):
... | apache-2.0 |
gqwest-erp/server | openerp/tools/import_email.py | 105 | 6375 | # -*- 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 |
lenstr/rethinkdb | test/rql_test/connections/http_support/flask/testsuite/signals.py | 554 | 4807 | # -*- coding: utf-8 -*-
"""
flask.testsuite.signals
~~~~~~~~~~~~~~~~~~~~~~~
Signalling.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import unittest
from flask.testsuite import FlaskTestCase
class SignalsTestCase(FlaskTestCase):
def ... | agpl-3.0 |
sloanyang/android_external_webkit | Tools/Scripts/webkitpy/common/net/layouttestresults.py | 15 | 7908 | # Copyright (c) 2010, 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... | gpl-2.0 |
TakayukiSakai/tensorflow | tensorflow/python/platform/sysconfig.py | 15 | 1583 | # 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 |
settingout/android_kernel_oneplus_msm8974 | scripts/rt-tester/rt-tester.py | 11005 | 5307 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# 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 Software Foundation.
#
import os
import sys
import getopt
import sh... | gpl-2.0 |
landlab/drivers | scripts/ecohydrology_flat_surface/run_driver.py | 1 | 4929 | """
Created on Wed Jul 20 2016
This tutorial is on:
landlab/tutorials/ecohydrology/cellular_automaton_vegetation_flat_surface.ipynb
Creating a (.py) version of the same.
@author: Sai Nudurupati & Erkan Istanbulluoglu
"""
import os
import time
import numpy as np
from landlab import RasterModelGrid, load_params
fro... | mit |
danielnyga/dnutils | src/dnutils/tools.py | 1 | 10478 | '''
Created on May 22, 2017
@author: nyga
'''
import re
def ifnone(if_, else_, transform=None):
'''Returns the condition ``if_`` iff it is not ``None``, or if a transformation is
specified, ``transform(if_)``. Returns ``else_`` if the condition is ``None``.
``transform`` can be any callable, which will b... | mit |
dulems/hue | desktop/core/ext-py/Django-1.6.10/django/contrib/sites/tests.py | 124 | 3406 | from __future__ import unicode_literals
from django.conf import settings
from django.contrib.sites.models import Site, RequestSite, get_current_site
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.http import HttpRequest
from django.test import TestCase
from django.test.utils import ... | apache-2.0 |
TechBK/horizon-dev | openstack_dashboard/api/rest/glance.py | 25 | 5296 |
# Copyright 2015, 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 applicabl... | apache-2.0 |
intellisense/django-loginas | loginas/tests/tests.py | 1 | 11032 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function, absolute_import
try:
from urllib.parse import urlsplit
except ImportError:
from urlparse import urlsplit
from datetime import timedelta
from django.conf import settings as django_settings
from django.test import Client
from djang... | bsd-3-clause |
hsorby/neon | src/opencmiss/neon/ui/views/ui_visualisationview.py | 3 | 1326 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'res/designer/visualisationview.ui'
#
# Created: Mon Jan 25 15:25:10 2016
# by: pyside-uic 0.2.15 running on PySide 1.2.4
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_VisualisationV... | apache-2.0 |
aringh/odl | examples/tomo/backends/astra_performance_cuda_parallel_2d_cg.py | 1 | 2880 | """Performance example of running native ASTRA vs using ODL for reconstruction.
In this example, a 512x512 image is reconstructed using the Conjugate Gradient
Least Squares method on the GPU.
In general, ASTRA is faster than ODL since it does not need to perform any
copies and all arithmetic is performed on the GPU. ... | mpl-2.0 |
eLBati/odoo | setup.py | 5 | 7484 | # -*- 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 |
dgquintas/grpc | tools/run_tests/performance/massage_qps_stats.py | 25 | 28679 | # Copyright 2017 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 writing... | apache-2.0 |
matteoalessiocarrara/FigaFind | src/lib/figafind/src/version.py | 2 | 1619 | #!/usr/bin/python2
# -*- coding: utf-8 -*-
#
# Copyright 2015 - 2016 Matteo Alessio Carrara <sw.matteoac@gmail.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 ... | gpl-3.0 |
piotrmaslanka/satella | satella/configuration/sources/from_dict.py | 1 | 2451 | import copy
import importlib
import warnings
from satella.coding.recast_exceptions import rethrow_as
from satella.configuration import sources
from satella.configuration.sources.base import BaseSource
from satella.exceptions import ConfigurationError, ConfigurationMisconfiguredError
__all__ = [
'load_source_from_... | bsd-3-clause |
michaelkirk/QGIS | python/plugins/GdalTools/tools/optionsTable.py | 11 | 2859 | # -*- coding: utf-8 -*-
"""
***************************************************************************
optionsTable.py
---------------------
Date : June 2010
Copyright : (C) 2010 by Giuseppe Sucameli
Email : brush dot tyler at gmail dot com
***************... | gpl-2.0 |
SUSE/azure-sdk-for-python | azure-mgmt-cdn/azure/mgmt/cdn/models/validate_custom_domain_output.py | 3 | 1369 | # 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 |
gustavo-guimaraes/siga | backend/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py | 1730 | 2278 | from __future__ import absolute_import, division, unicode_literals
from genshi.core import QName
from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT
from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT
from . import _base
from ..constants import voidElements, namespaces
class ... | mit |
40223123/raven | static/Brython3.1.0-20150301-090019/Lib/xml/dom/expatbuilder.py | 733 | 35733 | """Facility to use the Expat parser to load a minidom instance
from a string or file.
This avoids all the overhead of SAX and pulldom to gain performance.
"""
# Warning!
#
# This module is tightly bound to the implementation details of the
# minidom DOM and can't be used with other DOM implementations. This
# is due... | gpl-3.0 |
k3nnyfr/s2a_fr-nsis | s2a/Python/Lib/ctypes/_endian.py | 124 | 2212 | ######################################################################
# This file should be kept compatible with Python 2.3, see PEP 291. #
######################################################################
import sys
from ctypes import *
_array_type = type(Array)
def _other_endian(typ):
"""Return the type ... | gpl-3.0 |
apixandru/intellij-community | python/helpers/pydev/pydev_ipython/qt_loaders.py | 10 | 7826 | """
This module contains factory functions that attempt
to return Qt submodules from the various python Qt bindings.
It also protects against double-importing Qt with different
bindings, which is unstable and likely to crash
This is used primarily by qt and qt_for_kernel, and shouldn't
be accessed directly from the o... | apache-2.0 |
lalpert/gradsearch-scala | scrapers/gradsearch/spiders/princetonee_spider.py | 1 | 1145 | import scrapy
import urlparse
from gradsearch.items import Professor
class PrincetonEESpider(scrapy.Spider):
name = "princeton_ee"
allowed_domains = ["princeton.edu"]
start_urls = ["http://ee.princeton.edu/people/faculty"]
def cleanup(self, sel):
return sel.xpath('normalize-space(text())').extract()
def parse... | mit |
williamfeng323/py-web | flask/lib/python3.6/site-packages/pbr/util.py | 22 | 26697 | # 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... | mit |
nagyistoce/edx-platform | lms/lib/comment_client/thread.py | 58 | 8410 | import logging
from eventtracking import tracker
from .utils import merge_dict, strip_blank, strip_none, extract, perform_request
from .utils import CommentClientRequestError
import models
import settings
log = logging.getLogger(__name__)
class Thread(models.Model):
# accessible_fields can be set and retrieved... | agpl-3.0 |
KousikaGanesh/purchaseandInventory | openerp/addons/l10n_it/__openerp__.py | 165 | 2072 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010
# OpenERP Italian Community (<http://www.openerp-italia.org>)
# Servabit srl
# Agile Business Group sagl
# Domsense srl
# Albato... | agpl-3.0 |
cedk/odoo | addons/account_payment/report/payment_order.py | 378 | 2974 | # -*- 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 |
shogo2022/uda-gae | Lesson_5/00_Conference_Central/models.py | 5 | 3736 | #!/usr/bin/env python
"""models.py
Udacity conference server-side Python App Engine data & ProtoRPC models
$Id: models.py,v 1.1 2014/05/24 22:01:10 wesc Exp $
created/forked from conferences.py by wesc on 2014 may 24
"""
__author__ = 'wesc+api@google.com (Wesley Chun)'
import httplib
import endpoints
from protor... | gpl-3.0 |
kratman/psi4public | psi4/driver/p4util/numpy_helper.py | 2 | 16894 | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of ... | gpl-2.0 |
alexbruy/QGIS | python/plugins/processing/gui/GetScriptsAndModels.py | 1 | 14193 | # -*- coding: utf-8 -*-
"""
***************************************************************************
GetScriptsAndModels.py
---------------------
Date : June 2014
Copyright : (C) 2014 by Victor Olaya
Email : volayaf at gmail dot com
*********************... | gpl-2.0 |
inveniosoftware/invenio-accounts-rest | invenio_accounts_rest/errors.py | 2 | 1555 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2017 CERN.
#
# Invenio is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... | gpl-2.0 |
Itxaka/st2 | st2reactor/tests/unit/test_partitioners.py | 11 | 4920 | # Licensed to the StackStorm, Inc ('StackStorm') 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 th... | apache-2.0 |
FrankBian/kuma | vendor/packages/pyparsing/docs/examples/chemicalFormulas.py | 16 | 2052 | # chemicalFormulas.py
#
# Copyright (c) 2003, Paul McGuire
#
from pyparsing import Word, Optional, OneOrMore, Group, ParseException, Regex
atomicWeight = {
"O" : 15.9994,
"H" : 1.00794,
"Na" : 22.9897,
"Cl" : 35.4527,
"C" : 12.0107
}
def test( bnf, strg, fn=None ):
... | mpl-2.0 |
quarckster/cfme_tests | fixtures/disable_forgery_protection.py | 5 | 1178 | from cfme.utils.log import logger
import pytest
from cfme.utils.ssh import SSHClient
import time
@pytest.yield_fixture(scope='session')
def disable_forgery_protection():
starttime = time.time()
ssh_client = SSHClient()
logger.info('Turning off "allow_forgery_protection"')
ssh_client.run_command(
... | gpl-2.0 |
arael120/App-Beicor | node_modules/node-gyp/gyp/pylib/gyp/input_test.py | 1841 | 3207 | #!/usr/bin/env python
# Copyright 2013 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.
"""Unit tests for the input.py file."""
import gyp.input
import unittest
import sys
class TestFindCycles(unittest.TestCase):
def setUp(self... | gpl-3.0 |
powellc/hacklabs-wiki | hacklabs-wiki/apps/wiki/south_migrations/0008_auto__add_simpleplugin__add_revisionpluginrevision__add_imagerevision_.py | 2 | 21354 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
try:
from django.contrib.auth import get_user_model
except ImportError: # django < 1.5
from django.contrib.auth.models import User
else:
User = get_user_model()
user_orm_label... | bsd-3-clause |
yanchen036/tensorflow | tensorflow/contrib/learn/python/learn/estimators/dnn.py | 26 | 38241 | # 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 |
italiangrid/grinder-load-testsuite | storm/base/rf.py | 1 | 1096 | from common import TestID, log_surl_call_result
from eu.emi.security.authn.x509.impl import PEMCredential
from exceptions import Exception
from jarray import array
from java.io import FileInputStream
from javax.net.ssl import X509ExtendedKeyManager
from net.grinder.plugin.http import HTTPRequest
from net.grinder.script... | apache-2.0 |
danielmellado/tempest | tempest/api_schema/response/compute/v2_1/migrations.py | 17 | 2080 | # Copyright 2014 NEC Corporation. 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 ... | apache-2.0 |
SnappleCap/oh-mainline | vendor/packages/Django/django/utils/baseconv.py | 238 | 2981 | # Copyright (c) 2010 Guilherme Gondim. All rights reserved.
# Copyright (c) 2009 Simon Willison. All rights reserved.
# Copyright (c) 2002 Drew Perttula. All rights reserved.
#
# License:
# Python Software Foundation License version 2
#
# See the file "LICENSE" for terms & conditions for usage, and a DISCLAIMER OF
# ... | agpl-3.0 |
cogeorg/black_rhino | examples/firesales_simple/abm_template/src/basemarket.py | 9 | 31624 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = """Paweł Fiedor (pawel.fiedor@uct.ac.za)"""
import abc
import logging
# -------------------------------------------------------------------------
#
# class Market
#
# -------------------------------------------------------------------------
class BaseMarket... | gpl-3.0 |
glogiotatidis/mozillians-new | vendor-local/lib/python/kombu/__init__.py | 10 | 2677 | """Messaging Framework for Python"""
from __future__ import absolute_import
VERSION = (2, 1, 8)
__version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:])
__author__ = "Ask Solem"
__contact__ = "ask@celeryproject.org"
__homepage__ = "http://github.com/ask/kombu/"
__docformat__ = "restructuredtext en"
# -eo... | bsd-3-clause |
chauhanhardik/populo | openedx/core/djangoapps/credit/tasks.py | 14 | 7285 | """
This file contains celery tasks for credit course views.
"""
import datetime
from pytz import UTC
from django.conf import settings
from celery import task
from celery.utils.log import get_task_logger
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
from .api import set_credit_r... | agpl-3.0 |
mne-tools/mne-python | examples/connectivity/mne_inverse_connectivity_spectrum.py | 6 | 3460 | """
==============================================================
Compute full spectrum source space connectivity between labels
==============================================================
The connectivity is computed between 4 labels across the spectrum
between 7.5 Hz and 40 Hz.
"""
# Authors: Alexandre Gramfort... | bsd-3-clause |
tdtrask/ansible | lib/ansible/modules/utilities/logic/pause.py | 23 | 3313 | # -*- coding: utf-8 -*-
# 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': ['stableinterface'],
... | gpl-3.0 |
snap-stanford/ogb | examples/lsc/mag240m/label_prop.py | 1 | 2884 | # NOTE: More than 256GB CPU memory required to run this script.
# Use `--low-memory` to reduce memory consumption by using half-precision
import os.path as osp
import time
import argparse
import torch
import torch.nn.functional as F
from torch_sparse import SparseTensor
from torch_geometric.nn import LabelPropa... | mit |
SDSG-Invenio/invenio | invenio/modules/access/scripts/webaccessadmin.py | 16 | 5067 | # This file is part of Invenio.
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
# 2012, 2013, 2014 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of th... | gpl-2.0 |
kmuehlbauer/wradlib | wradlib/qual.py | 1 | 8000 | #!/usr/bin/env python
# Copyright (c) 2011-2018, wradlib developers.
# Distributed under the MIT License. See LICENSE.txt for more info.
"""
Data Quality
^^^^^^^^^^^^
This module will serve two purposes:
#. provide routines to create simple radar data quality related fields.
#. provide routines to decide ... | mit |
mei3am/androguard | tests/test_analysis_offset.py | 38 | 4153 | #!/usr/bin/env python
import sys, re
PATH_INSTALL = "./"
sys.path.append(PATH_INSTALL)
from androguard.core.androgen import AndroguardS
from androguard.core.analysis import analysis
from androguard.core.bytecodes.jvm import BRANCH2_JVM_OPCODES, determineNext
TEST_CASE = 'examples/java/TC/orig/TCE.class'
VALUES =... | apache-2.0 |
dstaple/z3test | scripts/mk_copyright.py | 3 | 1766 | # Copyright (c) 2015 Microsoft Corporation
import os
import re
cr = re.compile("Copyright")
aut = re.compile("Automatically generated")
aut2 = re.compile("auto-generated")
cr_notice = """
/*++
Copyright (c) 2015 Microsoft Corporation
--*/
"""
smt2_cr_notice = """
; Copyright (c) 2015 Microsoft Corporation
"""
py... | mit |
ligature/ansible-modules-extras | commands/expect.py | 80 | 5079 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Matt Martz <matt@sivel.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 License, ... | gpl-3.0 |
pblottiere/QGIS | python/plugins/processing/algs/gdal/ClipVectorByExtent.py | 15 | 4300 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ClipVectorByExtent.py
---------------------
Date : November 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
******************... | gpl-2.0 |
sburnett/seattle | autograder/emulab/sample_client.py | 1 | 2122 | #from remote_emulab import *
import remote_emulab
# This is a very rough sample of what a client
# to the remote_emulab.py library will look like
#
# Everything below is hardcoded and is not intended
# to be executed (it will fail because it assumes a
# new and unique exp name). It is just an exmaple
# senerio.
# ... | mit |
kennethgillen/ansible | lib/ansible/modules/network/panos/panos_dag.py | 78 | 4264 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage PaloAltoNetworks Firewall
# (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish... | gpl-3.0 |
DXCanas/kolibri | kolibri/core/discovery/test/dummydata/linux_data.py | 11 | 2523 | popen_responses = {
"mount": """
/dev/mapper/ubuntu--vg-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug ty... | mit |
ToontownUprising/src | toontown/minigame/DistributedMinigameTemplate.py | 5 | 2352 | from pandac.PandaModules import *
from toontown.toonbase.ToonBaseGlobal import *
from DistributedMinigame import *
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from toontown.toonbase import TTLocalizer
class DistributedMinigameTemplate(DistributedMinigame):
def __init__(self, cr):
... | mit |
buqing2009/MissionPlanner | Lib/site-packages/scipy/optimize/nonlin.py | 53 | 46004 | r"""
Nonlinear solvers
=================
.. currentmodule:: scipy.optimize
This is a collection of general-purpose nonlinear multidimensional
solvers. These solvers find *x* for which *F(x) = 0*. Both *x*
and *F* can be multidimensional.
Routines
--------
Large-scale nonlinear solvers:
.. autosummary::
newton... | gpl-3.0 |
rosenpapazov/one_plus_one | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | 1935 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... | gpl-2.0 |
lindamar/ecclesi | env/lib/python2.7/site-packages/wtforms/ext/sqlalchemy/fields.py | 177 | 6848 | """
Useful form fields for use with SQLAlchemy ORM.
"""
from __future__ import unicode_literals
import operator
from wtforms import widgets
from wtforms.compat import text_type, string_types
from wtforms.fields import SelectFieldBase
from wtforms.validators import ValidationError
try:
from sqlalchemy.orm.util im... | mit |
abdoosh00/edx-platform | common/djangoapps/student/auth.py | 30 | 2925 | """
The application interface to roles which checks whether any user trying to change
authorization has authorization to do so, which infers authorization via role hierarchy
(GlobalStaff is superset of auths of course instructor, ...), which consults the config
to decide whether to check course creator role, and other ... | agpl-3.0 |
40223209/test1 | static/Brython3.1.3-20150514-095342/Lib/fnmatch.py | 894 | 3163 | """Filename matching with shell patterns.
fnmatch(FILENAME, PATTERN) matches according to the local convention.
fnmatchcase(FILENAME, PATTERN) always takes case in account.
The functions operate by translating the pattern into a regular
expression. They cache the compiled regular expressions for speed.
The function... | agpl-3.0 |
Cinntax/home-assistant | homeassistant/components/alarmdotcom/alarm_control_panel.py | 2 | 3916 | """Interfaces with Alarm.com alarm control panels."""
import logging
import re
import voluptuous as vol
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_CODE,
CONF_NAME,
CONF_PASSWOR... | apache-2.0 |
FlaPer87/glance.store | glance/store/openstack/common/local.py | 378 | 1677 | # Copyright 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/LICENSE-2.0
#
# Unless req... | apache-2.0 |
PokeHunterProject/pogom-updated | pogom/pgoapi/protos/POGOProtos/Networking/Requests/Messages/CatchPokemonMessage_pb2.py | 15 | 5388 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: POGOProtos/Networking/Requests/Messages/CatchPokemonMessage.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _mess... | mit |
AlexanderSavelyev/rdkit | Contrib/mmpa/indexing.py | 1 | 21045 | # Copyright (c) 2012, GlaxoSmithKline Research & Development Ltd.
# 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
# ... | bsd-3-clause |
msneddon/narrative | src/biokbase/narrative/common/tests/util.py | 6 | 3349 | """
Test utility functions
"""
__author__ = 'Dan Gunter <dkgunter@lbl.gov>'
import logging
import pickle
import struct
import threading
import time
import unittest
import SocketServer
from biokbase.narrative.common import util
_log = logging.getLogger('kbtest')
_hnd = logging.StreamHandler()
_hnd.setFormatter(logging... | mit |
rahul-ramadas/BagOfTricks | InsertMarkdownLink.py | 1 | 1987 | import sublime
import sublime_plugin
MARKDOWN_LINK_SNIPPET = "[${{1:{}}}](${{2:{}}})"
class InsertMarkdownLinkCommand(sublime_plugin.TextCommand):
def decode_page(self, page_bytes, potential_encoding=None):
if potential_encoding:
try:
text = page_bytes.decode(pot... | unlicense |
djaodjin/djaodjin-signup | signup/serializers.py | 1 | 13054 | # Copyright (c) 2021, DjaoDjin 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:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | bsd-2-clause |
AutorestCI/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/application_gateway_probe_health_response_match.py | 5 | 1248 | # 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.