code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# -*- coding: utf-8 -*- """ example1-simpleloop ~~~~~~~~~~~~~~~~~~~ This example shows how to use the loop block backend and frontend. :copyright: 2015 by Lantz Authors, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ # From lantz, you import a helper function. from...
varses/awsch
examples/using_blocks/example1-simpleloop.py
Python
bsd-3-clause
1,304
# -*- 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 'UserProfile.is_mysqldba_oncall' db.add_column(u'user_profiles', 'is_mysqldba_oncall', ...
mozilla/inventory
systems/migrations/0002_auto__add_field_userprofile_is_mysqldba_oncall__add_field_userprofile_.py
Python
bsd-3-clause
21,325
from zope.interface import implementer from six import iteritems from twisted.internet.defer import DeferredQueue, inlineCallbacks, maybeDeferred, returnValue from .utils import get_spider_queues from .interfaces import IPoller @implementer(IPoller) class QueuePoller(object): def __init__(self, config): ...
wujuguang/scrapyd
scrapyd/poller.py
Python
bsd-3-clause
1,098
#!/usr/bin/env python # -*- coding: utf-8 -*- if __name__ == '__main__': import sys reload(sys) sys.setdefaultencoding('utf-8') import jam.webserver from jam.server import server jam.webserver.run(server)
dnacreative/jam-py
tests/server.py
Python
bsd-3-clause
232
__author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>" __date__ = "$Mar 30, 2015 08:25:33 EDT$" import collections import json import os import os.path import shutil import tempfile import numpy import h5py import vigra import vigra.impex import nanshe.util.iters import nanshe.util.xnumpy import nanshe.io.xtiff ...
DudLab/nanshe
tests/test_nanshe/test_converter.py
Python
bsd-3-clause
2,908
# -*- coding: utf-8 -*- """ .. _tut-overview: Overview of MEG/EEG analysis with MNE-Python ============================================ This tutorial covers the basic EEG/MEG pipeline for event-related analysis: loading data, epoching, averaging, plotting, and estimating cortical activity from sensor data. It introdu...
Eric89GXL/mne-python
tutorials/intro/plot_10_overview.py
Python
bsd-3-clause
19,522
# stdlib import copy import mock import unittest # project from utils.service_discovery.config_stores import get_config_store from utils.service_discovery.consul_config_store import ConsulStore from utils.service_discovery.etcd_config_store import EtcdStore from utils.service_discovery.abstract_config_store import Abs...
tebriel/dd-agent
tests/core/test_service_discovery.py
Python
bsd-3-clause
15,146
#! /usr/bin/env python import os import sys import glob version = (int(sys.argv[1]), int(sys.argv[2]), int(sys.argv[3]), int(sys.argv[4])) def substitute_file(name): subst = '' f = open(name) for l in f: if '#define LIBTORRENT_VERSION_MAJOR' in l and name.endswith('.hpp'): l = '#define LIBTORRENT_VERSION_MAJO...
steeve/libtorrent
set_version.py
Python
bsd-3-clause
1,975
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2012 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # Copyright (c) 2009-2015 Richard Jones, Claudio Canepa # All rights reserved. # # Redistribution and use in source and binary forms, with o...
dangillet/cocos
cocos/scenes/pause.py
Python
bsd-3-clause
3,820
# -*- coding: utf-8 -*- # Copyright 2010-2015, 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...
takahashikenichi/mozc
src/build_tools/copy_qt_frameworks_mac.py
Python
bsd-3-clause
4,010
import sys import inspect from functools import partial __all__ = ['decorator', 'wraps', 'unwrap', 'ContextDecorator', 'contextmanager'] def decorator(deco): # Any arguments after first become decorator arguments has_args = get_argcounts(deco) != (1, False, False) if has_args: # A decorator wit...
musicpax/funcy
funcy/decorators.py
Python
bsd-3-clause
9,692
import numpy as np from pyquante2.dft.functionals import xs,cvwn5 # Maybe move these to the functionals module and import from there? xname = dict(lda=xs,xs=xs,svwn=xs) cname = dict(lda=cvwn5,svwn=cvwn5,xs=None) def get_xc(grid,D,**kwargs): xcname = kwargs.get('xcname','lda') # Does not work on either gradien...
berquist/pyquante2
pyquante2/dft/dft.py
Python
bsd-3-clause
899
# 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. from gpu_tests.gpu_test_expectations import GpuTestExpectations # See the GpuTestExpectations class for documentation. class ContextLostExpectations(GpuTes...
wuhengzhi/chromium-crosswalk
content/test/gpu/gpu_tests/context_lost_expectations.py
Python
bsd-3-clause
1,984
""" This module loads all the classes from the VTK IO library into its namespace. This is a required module.""" import os if os.name == 'posix': from libvtkIOPython import * else: from vtkIOPython import *
naucoin/VTKSlicerWidgets
Wrapping/Python/vtk/io.py
Python
bsd-3-clause
217
# -*- coding: utf-8 -*- """ lantz.drivers.legacy.olympus.ixbx ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When talking about the z-axis of a microscope, use "near" and "far" instead of "up" and "down." "Nearer" always means the objective ends closer to the sample; "farther" means the objective ends farther away. On ...
varses/awsch
lantz/drivers/legacy/olympus/ixbx.py
Python
bsd-3-clause
8,205
from unicodecsv import DictReader class CSVImporter(object): """ A CSV-backed resource with the datas in it. """ def __init__(self, fh): self.reader = DictReader(fh) self.data = list(self.reader) @property def headers(self): headers = set() for row in self.data: ...
CodeForAfrica/grano
grano/lib/data.py
Python
mit
502
from __future__ import absolute_import, print_function, division import petl as etl table = [['foo', 'bar'], ['a', 1], ['b', None]] # raises exception under Python 3 etl.select(table, 'bar', lambda v: v > 0) # no error under Python 3 etl.selectgt(table, 'bar', 0) # or ... etl.select(table, 'bar', l...
psnj/petl
examples/comparison.py
Python
mit
353
from chainer import cuda from chainer import function from chainer import utils from chainer.utils import type_check import numpy class ClippedReLU(function.Function): """Clipped Rectifier Unit function. Clipped ReLU is written as :math:`ClippedReLU(x, z) = \min(\max(0, x), z)`, where :math:`z(>0)` is a...
masia02/chainer
chainer/functions/clipped_relu.py
Python
mit
1,841
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): pass def backwards(self, orm): pass models = { } ...
r-singh/Test2
webapp_project/website/migrations/0003_initial.py
Python
mit
351
# $Id$ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This module contains practical examples of Docutils client code. Importing this module from client code is not recommended; its contents are subject to change in future Docutils releases. Instead, i...
Lyleo/OmniMarkupPreviewer
OmniMarkupLib/Renderers/libs/python3/docutils/examples.py
Python
mit
3,913
from django.contrib.auth.models import Permission from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from cms.api import create_page from cms.constants import PUBLISHER_STATE_DIRTY from cms.models import Page from cms.test_utils.project.extensionapp.models import MyPageExtension,...
SurfasJones/djcmsrc3
venv/lib/python2.7/site-packages/cms/tests/extensions.py
Python
mit
13,596
#!/usr/bin/env python ## vim:ts=4:et:nowrap """A user-defined wrapper around string objects Note: string objects have grown methods in Python 1.6 This module requires Python 1.6 or later. """ from types import StringType, UnicodeType import sys __all__ = ["UserString","MutableString"] class UserString: def __ini...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.1/Lib/UserString.py
Python
mit
7,530
#!/usr/bin/python # axes3d.py, original mplot3d version by John Porter # Created: 23 Sep 2005 # Parts fixed by Reinier Heeres <reinier@heeres.eu> # Minor additions by Ben Axelrod <baxelrod@coroware.com> # Significant updates and revisions by Ben Root <ben.v.root@gmail.com> """ Module containing Axes3D, an object which...
yuanagain/seniorthesis
venv/lib/python2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py
Python
mit
93,454
""" A neural chatbot using sequence to sequence model with attentional decoder. This is based on Google Translate Tensorflow model https://github.com/tensorflow/models/blob/master/tutorials/rnn/translate/ Sequence to sequence model by Cho et al.(2014) Created by Chip Huyen as the starter code for assignment 3, cla...
adukic/nd101
tf-stanford-tutorials/assignments/chatbot/data.py
Python
mit
9,394
"""This module holds the ``Process``es for NER.""" from copy import deepcopy from dataclasses import dataclass from typing import Any, List from boltons.cacheutils import cachedproperty from cltk.core.data_types import Doc, Process from cltk.ner.ner import tag_ner @dataclass class NERProcess(Process): """To be...
D-K-E/cltk
src/cltk/ner/processes.py
Python
mit
4,577
from ..base import BaseTaskRunnerBackend class SocketIOBackend(BaseTaskRunnerBackend): def __init__(self): from . import sockets def get_detail_template(self): return 'task_runners/deployment_detail_socketio.html'
npardington/fabric-bolt
fabric_bolt/task_runners/socketio/__init__.py
Python
mit
241
# -*- coding: utf-8 -*- """This module tests only cloud specific events""" import pytest import yaml from cfme.common.vm import VM from cfme.cloud.provider.azure import AzureProvider from utils import testgen from utils.generators import random_vm_name pytestmark = [ pytest.mark.tier(3) ] pytest_generate_tests =...
dajohnso/cfme_tests
cfme/tests/cloud/test_cloud_events.py
Python
gpl-2.0
3,400
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2013 Async Open Source ## ## This program is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public License ## as published by the Free Software Foundation; either version 2 ## of the License, or...
tiagocardosos/stoq
stoqlib/lib/test/test_stringutils.py
Python
gpl-2.0
2,658
import os import sys import string filenames = os.listdir(os.getcwd()) for file in filenames: if os.path.splitext(file)[1] == ".o" or os.path.splitext(file)[1] == ".elf" : print "objdumparm.exe -D "+file os.system("C:/WindRiver/gnu/4.1.2-vxworks-6.8/x86-win32/bin/objdumparm.exe -D "+file +" > " +file + "...
honor6-dev/android_kernel_huawei_h60
drivers/vendor/hisi/build/scripts/obj_cmp_tools/vxworks_dassemble.py
Python
gpl-2.0
348
# -*- coding: utf-8 -*- """ *************************************************************************** ConfigDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **************************...
NINAnor/QGIS
python/plugins/processing/gui/ConfigDialog.py
Python
gpl-2.0
10,846
# #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...
karrtikr/ete
ete3/tools/ete_extract.py
Python
gpl-3.0
2,246
# -*- coding: utf-8 -*- # This script is shared under the # Creative Commons Attribution-ShareAlike 3.0 license (CC BY-SA 3.0) # Added clause to Attribution: # - You may not remove or hide the '<Bot_name> who created you?' functionality # and you may not modify the name given in the response. #CREDITS # Auth...
Chiefwaffles/-tg-station
bot/NanoTrasenBot.py
Python
gpl-3.0
71,195
import re from django import template from django.template.loader import get_template from django.template import RequestContext register = template.Library() INSTALLED_ARTIFACTS = dict() def install(artifact_class): INSTALLED_ARTIFACTS[artifact_class.key] = artifact_class def find(data): from fir_artifa...
gcrahay/FIR
fir_artifacts/artifacts.py
Python
gpl-3.0
3,764
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # 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 Li...
hyperized/ansible
lib/ansible/modules/network/eos/eos_vrf.py
Python
gpl-3.0
10,723
# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = typ...
caphrim007/ansible
lib/ansible/plugins/action/__init__.py
Python
gpl-3.0
50,188
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os from spack import * class Casacore(CMakePackage): """A suite of c++ libraries for radio astronomy data pr...
LLNL/spack
var/spack/repos/builtin/packages/casacore/package.py
Python
lgpl-2.1
4,875
# 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...
eaplatanios/tensorflow
tensorflow/python/ops/sparse_ops.py
Python
apache-2.0
82,052
# Copyright 2014, Doug Wiegley, A10 Networks. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
dougwig/acos-client
acos_client/v21/partition.py
Python
apache-2.0
1,617
# Copyright 2012 Anton Beloglazov # # 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...
beloglazov/openstack-neat
setup.py
Python
apache-2.0
4,540
#!/usr/bin/python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
wubr2000/googleads-python-lib
examples/dfp/v201502/line_item_service/update_line_items.py
Python
apache-2.0
2,671
""" Test multiword commands ('platform' in this case). """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * class MultiwordCommandsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @no_debug_info_test def test_ambiguous_subcommand(self): self.e...
llvm-mirror/lldb
packages/Python/lldbsuite/test/functionalities/multiword-commands/TestMultiWordCommands.py
Python
apache-2.0
1,161
# 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...
Acehaidrey/incubator-airflow
airflow/providers/google/suite/transfers/sql_to_sheets.py
Python
apache-2.0
5,101
# Copyright (c) 2012 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. from __future__ import print_function import os import gyp import gyp.common import gyp.msvs_emulation import json generator_supports_multiple_toolsets = True g...
arangodb/arangodb
3rdParty/V8/gyp/generator/dump_dependency_json.py
Python
apache-2.0
3,418
from nose.tools import * from tests.base import ApiTestCase from tests.factories import InstitutionFactory, AuthUserFactory, NodeFactory from framework.auth import Auth from api.base.settings.defaults import API_BASE class TestInstitutionNodeList(ApiTestCase): def setUp(self): super(TestInstitutionNodeLi...
brandonPurvis/osf.io
api_tests/institutions/views/test_institution_nodes_list.py
Python
apache-2.0
2,103
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2011 Openstack, LLC. # 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...
prometheanfire/openstack-guest-agents-unix
commands/kms.py
Python
apache-2.0
1,790
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
coxmediagroup/googleads-python-lib
examples/dfp/v201411/network_service/get_all_networks.py
Python
apache-2.0
1,545
# Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import import os from flask.ext.wtf import Form from wtforms import validators from digits import utils from digits.utils import subclass from digits.utils.forms import validate_required_iff @subclass class Dataset...
ethantang95/DIGITS
digits/extensions/data/imageProcessing/forms.py
Python
bsd-3-clause
3,146
from __future__ import absolute_import from .analytics import * # NOQA from .base import * # NOQA from .manager import IntegrationManager # NOQA default_manager = IntegrationManager() all = default_manager.all get = default_manager.get exists = default_manager.exists register = default_manager.register unregister...
ifduyue/sentry
src/sentry/integrations/__init__.py
Python
bsd-3-clause
350
from __future__ import absolute_import from datetime import timedelta from django.utils import timezone from django.test import RequestFactory from exam import fixture from sentry.middleware.user import UserActiveMiddleware from sentry.testutils import TestCase class UserActiveMiddlewareTest(TestCase): middlewa...
ifduyue/sentry
tests/sentry/middleware/test_useractive.py
Python
bsd-3-clause
912
from .betweenness import * from .betweenness_subset import * from .closeness import * from .subgraph_alg import * from .current_flow_closeness import * from .current_flow_betweenness import * from .current_flow_betweenness_subset import * from .degree_alg import * from .dispersion import * from .eigenvector import * fr...
andnovar/networkx
networkx/algorithms/centrality/__init__.py
Python
bsd-3-clause
382
### # Copyright (c) 2002-2005, Jeremiah Fincher # Copyright (c) 2009, James McCoy # 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 copyr...
ProgVal/Limnoria-test
plugins/Channel/test.py
Python
bsd-3-clause
13,250
# encoding: utf-8 import datetime import logging import os import re import urllib import urllib2 from HTMLParser import HTMLParseError from urlparse import urlparse from BeautifulSoup import BeautifulSoup, Comment, NavigableString from django.contrib.contenttypes.models import ContentType from django.core.files.base ...
OriHoch/Open-Knesset
simple/parsers/parse_laws.py
Python
bsd-3-clause
21,686
from django.http import HttpResponse from django.test import TestCase from ..pipeline import make_staff class Backend(object): name = None def __init__(self, name, *args, **kwargs): super(Backend, self).__init__(*args, **kwargs) self.name = name class MockSuperUser(object): is_staff = ...
dan-gamble/cms
cms/tests/test_pipeline.py
Python
bsd-3-clause
978
#!/usr/bin/env python ''' gsconfig is a python library for manipulating a GeoServer instance via the GeoServer RESTConfig API. The project is distributed under a MIT License . ''' __author__ = "David Winslow" __copyright__ = "Copyright 2012-2015 Boundless, Copyright 2010-2012 OpenPlans" __license__ = "MIT" from geo...
scottp-dpaw/gsconfig
examples/postgislayers.py
Python
mit
662
#!/usr/bin/env python # Copyright (c) 2021 by # Donatas Abraitis <donatas.abraitis@gmail.com> # # Permission to use, copy, modify, and/or distribute this software # for any purpose with or without fee is hereby granted, provided # that the above copyright notice and this permission notice appear # in all copies. # # T...
freerangerouting/frr
tests/topotests/bgp_community_alias/test_bgp-community-alias.py
Python
gpl-2.0
4,645
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsLayoutItemLegend. .. 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 version. "...
SrNetoChan/Quantum-GIS
tests/src/python/test_qgslayoutlegend.py
Python
gpl-2.0
28,136
# Check translations of pango markup # # This will look for translatable strings that appear to contain markup and # check that the markup in the translation matches. # # Copyright (C) 2015 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subjec...
wgwoods/anaconda
translation-canary/translation_canary/translated/test_markup.py
Python
gpl-2.0
2,842
# coding: utf-8 # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.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 o...
ganeshrn/ansible
test/units/parsing/yaml/test_loader.py
Python
gpl-3.0
17,230
#!/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...
cmelange/ansible
lib/ansible/modules/network/nxos/nxos_vlan.py
Python
gpl-3.0
13,912
import dbus from gwibber.microblog import util class GwibberPublic: """ GwibberPublic is the public python class which provides convience methods for using Gwibber. """ def __init__(self): self.bus = dbus.SessionBus() self.accounts = self.getbus("Accounts") self.service = ...
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/gwibber/lib/__init__.py
Python
gpl-3.0
2,740
#!/usr/bin/env python # coding=utf-8 # aeneas is a Python/C library and a set of tools # to automagically synchronize audio and text (aka forced alignment) # # Copyright (C) 2012-2013, Alberto Pettarin (www.albertopettarin.it) # Copyright (C) 2013-2015, ReadBeyond Srl (www.readbeyond.it) # Copyright (C) 2015-2017, A...
danielbair/aeneas
aeneas/tests/test_cew.py
Python
agpl-3.0
3,056
"""MySQLdb Cursors This module implements Cursors of various types for MySQLdb. By default, MySQLdb uses the Cursor class. """ import re import sys try: from types import ListType, TupleType, UnicodeType except ImportError: # Python 3 ListType = list TupleType = tuple UnicodeType = str restr = r...
ecolitan/fatics
venv/lib/python2.7/site-packages/MySQLdb/cursors.py
Python
agpl-3.0
17,253
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import event_event from . import event_registration from . import event_type from . import website from . import website_event_menu from . import website_menu from . import website_visitor
rven/odoo
addons/website_event/models/__init__.py
Python
agpl-3.0
296
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, getdate from frappe import _ from erpnext.utilities.transaction_base import delete_events from frappe.m...
indictranstech/focal-erpnext
projects/doctype/project/project.py
Python
agpl-3.0
2,450
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 import copy from rapidsms.connection import Connection from rapidsms.person import Person from datetime import datetime from rapidsms import utils class StatusCodes: '''Enum for representing status types of a message or response.''' NONE = "N...
icomms/rapidsms
lib/rapidsms/message.py
Python
lgpl-3.0
4,140
from temboo.Library.Google.Drive.Changes.Get import Get, GetInputSet, GetResultSet, GetChoreographyExecution from temboo.Library.Google.Drive.Changes.List import List, ListInputSet, ListResultSet, ListChoreographyExecution
jordanemedlock/psychtruths
temboo/core/Library/Google/Drive/Changes/__init__.py
Python
apache-2.0
223
# 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...
sjperkins/tensorflow
tensorflow/contrib/__init__.py
Python
apache-2.0
3,181
def pre_listen(task_id, transport, attr_array): new_attrs = [] for (scope, name, value) in attr_array: if scope == transport and name == 'port': value = str(int(value) + 1) new_attr = (scope, name, value) new_attrs.append(new_attr) return new_attrs
gridcf/gct
gridftp/net_manager/test/port_plus_one.py
Python
apache-2.0
297
"""Support for the Airly air_quality service.""" from homeassistant.components.air_quality import ( ATTR_AQI, ATTR_PM_2_5, ATTR_PM_10, AirQualityEntity, ) from homeassistant.const import CONF_NAME from .const import ( ATTR_API_ADVICE, ATTR_API_CAQI, ATTR_API_CAQI_DESCRIPTION, ATTR_API_C...
pschmitt/home-assistant
homeassistant/components/airly/air_quality.py
Python
apache-2.0
3,907
# Copyright 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 requ...
leeseuljeong/leeseulstack_neutron
neutron/agent/linux/ip_lib.py
Python
apache-2.0
20,419
# Copyright 2013 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...
rickerc/cinder_audit
cinder/tests/db/test_name_id.py
Python
apache-2.0
2,344
# http://www.creatis.insa-lyon.fr/~bernard/creaseg/ # http://ascratchpad.blogspot.com/2011/03/image-segmentation-using-active.html #------------------------------------------------------------------------ # Region Based Active Contour Segmentation # # seg = region_seg(I,init_mask,max_its,alpha,display) # # Inputs: I ...
BioMedIA/irtk-legacy
wrapping/cython/irtk/ext/chanvese.py
Python
bsd-3-clause
9,929
""" /****************************************************************************** This source file is part of the Avogadro project. Copyright 2013 Kitware, Inc. This source code is released under the New BSD License, (the "License"). Unless required by applicable law or agreed to in writing, software di...
OpenChemistry/avogadrolibs
avogadro/qtplugins/scriptfileformats/formatScripts/zyx.py
Python
bsd-3-clause
2,841
# # [The "BSD license"] # Copyright (c) 2012 Terence Parr # Copyright (c) 2012 Sam Harwell # Copyright (c) 2014 Eric Vergnaud # 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. Redis...
cocosli/antlr4
runtime/Python2/src/antlr4/BufferedTokenStream.py
Python
bsd-3-clause
11,959
#!/usr/bin/env python # GoodFET SPI and SPIFlash Client Library # # (C) 2009 Travis Goodspeed <travis at radiantmachines.com> # # This code is being rewritten and refactored. You've been warned! import sys, time, string, cStringIO, struct, glob, os; from GoodFET import GoodFET; class GoodFETAVR(GoodFET): AVRAP...
rfmcpherson/killerbee
killerbee/GoodFETAVR.py
Python
bsd-3-clause
5,235
#!/usr/bin/env python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2017 Intel Corporation. # # The MIT License # # 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 restrictio...
pylbert/upm
examples/python/lsm303d.py
Python
mit
2,423
#!/usr/bin/env python # coding: utf-8 import unittest import sys import os PROJECT_PATH = os.path.sep.join(os.path.abspath(__file__).split(os.path.sep)[:-2]) ROOT_PATH = os.path.dirname(__file__) if __name__ == '__main__': if 'GAE_SDK' in os.environ: SDK_PATH = os.environ['GAE_SDK'] sys.path.in...
renzon/blob_app
test/testloader.py
Python
mit
630
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
nucular/AutobahnPython
examples/twisted/websocket/echo_variants/client.py
Python
mit
2,386
# Django settings for test_remote_project project. import os.path import posixpath PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) FIXTURE_DIRS = [ os.path.join(PROJECT_ROOT, 'fixtures'...
dsanders11/django-autocomplete-light
test_remote_project/test_remote_project/settings.py
Python
mit
5,785
"""engine.SCons.Tool.f03 Tool-specific initialization for the generic Posix f03 Fortran compiler. 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 - 2014 The SCons Foundation # # Permis...
Bforartists/scons
scons-local/SCons/Tool/f03.py
Python
mit
1,990
# SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2016 Google, Inc # Written by Simon Glass <sjg@chromium.org> # # Test for the fdt modules import os import sys import tempfile import unittest from dtoc import fdt from dtoc import fdt_util from dtoc.fdt import FdtScan from patman import tools class TestFdt(unittes...
Digilent/u-boot-digilent
tools/binman/fdt_test.py
Python
gpl-2.0
2,920
import datetime import gzip from itertools import count import os curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) import sys import threading import time import urllib import cherrypy from cherrypy._cpcompat import next, ntob, quote, xrange from cherrypy.lib import httputil gif_bytes = ntob( 'GIF89a...
flakey-bit/plugin.audio.spotify
resources/libs/cherrypy/test/test_caching.py
Python
gpl-3.0
12,738
import orange data = orange.ExampleTable("lenses") print "\nAssociation rules" rules = orange.AssociationRulesInducer(data, support = 0.3) for r in rules: print "%5.3f %5.3f %s" % (r.support, r.confidence, r) print "\nClassification rules" rules = orange.AssociationRulesInducer(data, support = 0.3, classificat...
yzl0083/orange
Orange/testing/regression/tests_20/reference_assoc.py
Python
gpl-3.0
410
# -*- coding: utf-8 -*- from nose.tools import * # flake8: noqa import urlparse from api.base.settings.defaults import API_BASE from website.identifiers.model import Identifier from tests.base import ApiTestCase from osf_tests.factories import ( RegistrationFactory, AuthUserFactory, IdentifierFactory, ...
hmoco/osf.io
api_tests/identifiers/views/test_identifier_detail.py
Python
apache-2.0
2,841
# 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...
jiaphuan/models
research/object_detection/utils/np_mask_ops.py
Python
apache-2.0
4,214
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
freedomtan/tensorflow
tensorflow/python/saved_model/nested_structure_coder_test.py
Python
apache-2.0
14,586
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
tensorflow/tensorflow
tensorflow/python/framework/combinations.py
Python
apache-2.0
2,998
# ============================================================================== # 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 ...
tensorflow/tensorflow
tensorflow/lite/schema/upgrade_schema.py
Python
apache-2.0
12,866
# 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...
jbedorf/tensorflow
tensorflow/python/ops/distributions/transformed_distribution.py
Python
apache-2.0
27,637
from pyjamas.ui.Sink import Sink, SinkInfo from pyjamas.ui.Frame import Frame class Frames(Sink): def __init__(self): Sink.__init__(self) self.frame=Frame(self.baseURL() + "rembrandt/LaMarcheNocturne.html") self.frame.setWidth("100%") self.frame.setHeight("48em") self.initW...
spaceone/pyjs
examples/kitchensink/sink/Frames.py
Python
apache-2.0
522
# $Id: __init__.py 6141 2009-09-25 18:50:30Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This is ``docutils.parsers.rst`` package. It exports a single class, `Parser`, the reStructuredText parser. Usage ===== 1. Create a parser:: pa...
edisonlz/fruit
web_project/base/site-packages/docutils/parsers/rst/__init__.py
Python
apache-2.0
14,192
# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
dbbhattacharya/kitsune
vendor/packages/logilab-common/db.py
Python
bsd-3-clause
2,037
from __future__ import division, absolute_import import numpy as np from .. import EulerDeconv, EulerDeconvEW, EulerDeconvMW, sphere from ...mesher import Sphere from ... import utils, gridder model = None xp, yp, zp = None, None, None inc, dec = None, None struct_ind = None base = None pos = None field, dx, dy, dz = ...
rafaelmds/fatiando
fatiando/gravmag/tests/test_euler.py
Python
bsd-3-clause
3,153
# -*- coding: utf-8 -*- """ amqp.five ~~~~~~~~~~~ Compatibility implementations of features only available in newer Python versions. """ from __future__ import absolute_import import io import sys try: from collections import Counter except ImportError: # pragma: no cover from collections ...
kalefranz/auxlib
auxlib/_vendor/five.py
Python
isc
7,109
# -*- coding: utf-8 -*- from __future__ import division from qsrlib_qsrs.qsr_qtc_simplified_abstractclass import QSR_QTC_Simplified_Abstractclass import numpy as np from qsrlib_io.world_qsr_trace import * class QSR_QTC_BC_Simplified(QSR_QTC_Simplified_Abstractclass): """QTCBC simplified relations. Values of ...
pet1330/strands_qsr_lib
qsr_lib/src/qsrlib_qsrs/qsr_qtc_bc_simplified.py
Python
mit
6,319
# -*- coding: utf-8 -*- # Copyright (c) 2013 Romain Command& # # 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, mod...
muhammad-ammar/factory_boy
tests/test_mongoengine.py
Python
mit
3,452
#!/usr/bin/env python # ****************************************************** # Copyright 2004: Commonwealth of Australia. # # Developed by the Computer Network Vulnerability Team, # Information Security Group. # Department of Defence. # # Michael Cohen <scudette@users.sourceforge.net> # # ****************************...
backupManager/pyflag
src/pyflag/TEXTUI.py
Python
gpl-2.0
8,684
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: https://sickrage.github.io # # This file is part of SickRage. # # SickRage 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 L...
b0ttl3z/SickRage
sickbeard/metadata/helpers.py
Python
gpl-3.0
1,452
"""Extract reference documentation from the NumPy source tree. """ import inspect import textwrap import re import pydoc from io import StringIO from warnings import warn import collections class Reader(object): """A line-based string reader. """ def __init__(self, data): """ Paramete...
vidartf/hyperspy
doc/sphinxext/docscrape.py
Python
gpl-3.0
15,590
class constant(): folder_name = 'results' MAX_HELP_POSITION = 27 CURRENT_VERSION = '0.9.1' output = None file_logger = None # jitsi options jitsi_masterpass = None # mozilla options manually = None path = None bruteforce = None specific_path = None mozilla_software = '' # ie optio...
theoneandonly-vector/LaZagne
Windows/src/LaZagne/config/constant.py
Python
lgpl-3.0
416