code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
# -*- coding: utf-8 -*- # # test_refractory.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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...
heplesser/nest-simulator
testsuite/pytests/test_refractory.py
Python
gpl-2.0
8,170
default_app_config = 'nodeshot.community.participation.apps.AppConfig'
SCORE42/nodeshot
nodeshot/community/participation/__init__.py
Python
gpl-3.0
71
#!/usr/bin/env python # # Copyright 2008,2010,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at ...
iohannez/gnuradio
gr-digital/python/digital/qa_scrambler.py
Python
gpl-3.0
5,468
# -*- coding: utf-8 -*- """ jinja2.visitor ~~~~~~~~~~~~~~ This module implements a visitor for the nodes. :copyright: Copyright 2008 by Armin Ronacher. :license: BSD. """ from jinja2.nodes import Node class NodeVisitor(object): """Walks the abstract syntax tree and call visitor functions for...
scyclops/Readable-Feeds
jinja2/visitor.py
Python
gpl-3.0
3,322
#!/usr/bin/env python -u import sys from argparse import ArgumentParser import time import json import yaml import os try: import boto.ec2 import boto.sqs from boto.vpc import VPCConnection from boto.exception import NoAuthHandlerFound, EC2ResponseError from boto.sqs.message import RawMessage fr...
chudaol/configuration
util/vpc-tools/abbey.py
Python
agpl-3.0
27,867
""" Unit tests for the stem.util.tor_tools functions. """ import unittest import stem.util.tor_tools class TestTorTools(unittest.TestCase): def test_is_valid_fingerprint(self): """ Checks the is_valid_fingerprint function. """ valid_fingerprints = ( '$A7569A83B5706AB1B1A9CB52EFF7D2D32E4553E...
leivaburto/stem
test/unit/util/tor_tools.py
Python
lgpl-3.0
2,529
name = "foo" version = "1.0.0" description = "This package exists only to test config overrides." uuid = "28d94bcd1a934bb4999bcf70a21106cc" authors = [ "joe.bloggs" ] with scope("config") as c: c.build_directory = "weeble" c.parent_variables = [ "FOO", "BAH_${FUNK}", "EEK" ...
cwmartin/rez
src/rez/tests/data/config/package.py
Python
lgpl-3.0
766
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
TiVo/kafka
tests/kafkatest/services/kafka/util.py
Python
apache-2.0
2,245
# 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...
glove747/liberty-neutron
neutron/tests/unit/extension_stubs.py
Python
apache-2.0
1,920
# # 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...
spektom/incubator-airflow
airflow/contrib/sensors/emr_step_sensor.py
Python
apache-2.0
1,159
"""Provides functionality to interact with lights.""" import asyncio import csv from datetime import timedelta import logging import os import voluptuous as vol from homeassistant.auth.permissions.const import POLICY_CONTROL from homeassistant.components.group import \ ENTITY_ID_FORMAT as GROUP_ENTITY_ID_FORMAT f...
MartinHjelmare/home-assistant
homeassistant/components/light/__init__.py
Python
apache-2.0
16,431
#!/usr/bin/env python """ mbed SDK Copyright (c) 2011-2013 ARM Limited 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 ...
pi19404/mbed
workspace_tools/export_test.py
Python
apache-2.0
8,840
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.core_task...
kwlzn/pants
src/python/pants/core_tasks/register.py
Python
apache-2.0
4,840
# 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...
Hybrid-Cloud/cinder
cinder/api/v2/views/volumes.py
Python
apache-2.0
6,435
class Base: def __init__(self): self.inherited_attr = 42 class C(Base): pass match C(): case C(inh<caret>): pass
smmribeiro/intellij-community
python/testData/completion/inheritedAttributesSuggestedForKeywordPatterns.py
Python
apache-2.0
145
print 'µble'
slozier/ironpython2
Tests/encoded_files/cp11334_warn.py
Python
apache-2.0
12
from director import applogic from director import cameracontrol from PythonQt import QtCore, QtGui class CameraBookmarks(object): def __init__(self, view): self.bookmarks = {} self.view = view self.flyer = cameracontrol.Flyer(view) self.flyer.flyTime = 1.0 def storeCameraBo...
patmarion/director
src/python/director/camerabookmarks.py
Python
bsd-3-clause
3,155
""" ============= Miscellaneous ============= IEEE 754 Floating Point Special Values: ----------------------------------------------- Special values defined in numpy: nan, inf, NaNs can be used as a poor-man's mask (if you don't care what the original value was) Note: cannot use equality to test NaNs. E.g.: :: >>...
chadnetzer/numpy-gaurdro
numpy/doc/misc.py
Python
bsd-3-clause
5,725
from grano.logic import Loader import unicodecsv # This source URL will be applied to all properties without their own lineage: DEFAULT_SOURCE_URL = 'http://www.opennews.org/' # Any settings (free-form dict): PROJECT_SETTINGS = {} loader = Loader('opennews', project_label='opennews', ...
granoproject/grano
senegal/loader.py
Python
mit
985
# -*- coding: UTF8 -*- # -------------------------------------------------------------- # Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu) # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # #...
sovaa/backdoorme
backdoors/shell/pupy/pupy/modules/memory_exec.py
Python
mit
3,988
from toontown.battle import DistributedBattle from direct.directnotify import DirectNotifyGlobal class DistributedBattleTutorial(DistributedBattle.DistributedBattle): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedBattleTutorial') def startTimer(self, ts = 0): self.townBattle.timer.h...
ksmit799/Toontown-Source
toontown/tutorial/DistributedBattleTutorial.py
Python
mit
449
def _reset_sys_path(): # Clear generic sys.path[0] import sys, os resources = os.environ['RESOURCEPATH'] while sys.path[0] == resources: del sys.path[0] _reset_sys_path() """ sys.argv emulation This module starts a basic event loop to collect file- and url-open AppleEvents. Those get converte...
mtnman38/Aggregate
dist/Aggregate 0.8.9 for Mac.app/Contents/Resources/__boot__.py
Python
gpl-2.0
10,160
# # Copyright 2013-2014 eNovance # # Author: Julien Danjou <julien@danjou.info> # # 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 ...
ChinaMassClouds/copenstack-server
openstack/src/ceilometer-2014.2.2/ceilometer/tests/test_middleware.py
Python
gpl-2.0
4,339
# Copyright (c) 2013, 2015-2017 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the fun...
vineodd/PIMSim
GEM5Simulation/gem5/site_scons/gem5_scons/util.py
Python
gpl-3.0
2,595
import bpy bpy.context.camera.sensor_width = 6.16 bpy.context.camera.sensor_height = 4.62 bpy.context.camera.lens = 2.77 bpy.context.camera.sensor_fit = 'AUTO'
Microvellum/Fluid-Designer
win64-vc/2.78/scripts/presets/camera/GoPro_Hero3_Black.py
Python
gpl-3.0
161
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com> # Stephen Fromm <sfromm@gmail.com> # Brian Coca <briancoca+dev@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 publish...
filipenf/ansible
lib/ansible/plugins/action/assemble.py
Python
gpl-3.0
6,309
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2012 Star2Billing S.L. # # The Initia...
areski/newfies-dialer
newfies/urls.py
Python
mpl-2.0
5,542
"""Django App config for course_modes""" from django.apps import AppConfig class CourseModesConfig(AppConfig): # lint-amnesty, pylint: disable=missing-class-docstring name = 'common.djangoapps.course_modes' verbose_name = "Course Modes" def ready(self): from . import signals # pylint: disable...
eduNEXT/edx-platform
common/djangoapps/course_modes/apps.py
Python
agpl-3.0
335
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from random import randint from odoo import api, fields, models class EventTagCategory(models.Model): _name = "event.tag.category" _description = "Event Tag Category" _order = "sequence" name = fields...
rven/odoo
addons/event/models/event_tag.py
Python
agpl-3.0
1,241
# 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 import llnl.util.tty as tty from llnl.util.filesystem import mkdirp, working_dir import spack.paths from spack...
LLNL/spack
lib/spack/spack/cmd/clone.py
Python
lgpl-2.1
2,958
# 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) from spack import * class PyColorlog(PythonPackage): """A colored formatter for the python logging module""" ho...
LLNL/spack
var/spack/repos/builtin/packages/py-colorlog/package.py
Python
lgpl-2.1
661
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, int_or_none, js_to_json, ) class StreamangoIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?streamango\.com/(?:f|embed)/(?P<id>[^/?#&]+)' _TESTS = [{ ...
fluxw42/youtube-dl
youtube_dl/extractor/streamango.py
Python
unlicense
2,004
#!/usr/bin/env python2 # Copyright 2017 The Kubernetes 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 appl...
grodrigues3/test-infra
triage/summarize_test.py
Python
apache-2.0
9,657
# 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...
tensorflow/tensorflow
tensorflow/compiler/tests/bucketize_op_test.py
Python
apache-2.0
2,955
#!/usr/bin/env python # Jay Smith # jay.smith@fireeye.com # ######################################################################## # Copyright 2013 Mandiant # Copyright 2014 FireEye # # Mandiant licenses this file to you under the Apache License, Version # 2.0 (the "License"); you may not use this file except in com...
CaledoniaProject/flare-ida
python/flare/struct_typer.py
Python
apache-2.0
13,026
# 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 appl...
tensorflow/tensorflow
tensorflow/lite/tutorials/dataset.py
Python
apache-2.0
4,189
# pylint: disable=E1103 from warnings import catch_warnings from numpy.random import randn import numpy as np import pytest import pandas as pd from pandas.compat import lrange import pandas.compat as compat from pandas.util.testing import assert_frame_equal from pandas import DataFrame, MultiIndex, Series, Index, me...
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/tests/reshape/test_join.py
Python
apache-2.0
31,344
# Copyright 2019 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/util/tf_stack_test.py
Python
apache-2.0
2,415
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
akash1808/oslo.log
oslo_log/tests/unit/test_helpers.py
Python
apache-2.0
1,699
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ve...
sparkslabs/kamaelia
Sketches/MPS/BugReports/FixTests/Kamaelia/Examples/UsingChassis/PAR/par_shutdown.py
Python
apache-2.0
3,471
# -*- coding: utf-8 -*- # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """Looks for overlapping exceptions.""" import astroid from pylint import interfaces from pylint import checkers from pylint.checkers import uti...
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/pylint/extensions/overlapping_exceptions.py
Python
apache-2.0
3,292
################################## # Laboratory Server configuration # ################################## from __future__ import print_function, unicode_literals laboratory_assigned_experiments = { 'exp1:dummy1@Dummy experiments': { 'coord_address': 'myexperiment:myprocess@myhost',...
morelab/weblabdeusto
server/src/test/deployments/webclient_dummy/lab_config.py
Python
bsd-2-clause
374
# relay skeleton & normal socks relay import logging import time from gevent import socket from gevent import select from utils import request_fail, basic_handshake_server, read_request, \ sock_addr_info, request_success, pipe_tcp, bind_local_udp, addr_info, \ bind_local_sock_by_addr, pipe_udp from msg import CMD_NOT...
yinghuocho/gsocks
relay.py
Python
bsd-2-clause
6,590
""" ============================================== Scaling the regularization parameter for SVCs ============================================== The following example illustrates the effect of scaling the regularization parameter when using :ref:`svm` for :ref:`classification <svm_classification>`. For SVC classificati...
toastedcornflakes/scikit-learn
examples/svm/plot_svm_scale_c.py
Python
bsd-3-clause
5,404
### # Copyright (c) 2014, Valentin Lorentz # 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 conditi...
ProgVal/Limnoria-test
src/utils/minisix.py
Python
bsd-3-clause
3,909
from django import forms from django.forms.widgets import HiddenInput from django.utils.translation import ugettext_lazy as _ from .models import ICON_CHOICES, Tidbit, Feedback, TagSuggestion from suggestions.forms import InstanceCreateSuggestionForm class SearchForm(forms.Form): q = forms.CharField() class Ti...
DanaOshri/Open-Knesset
auxiliary/forms.py
Python
bsd-3-clause
2,849
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2014 Alex Forencich 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 righ...
elopezga/ErrorRate
ivi/agilent/agilent86146B.py
Python
mit
1,413
"""Test MailChimp OAuth2 v3 Flow.""" from allauth.socialaccount.tests import OAuth2TestsMixin from allauth.tests import MockedResponse, TestCase from .provider import MailChimpProvider class MailChimpTests(OAuth2TestsMixin, TestCase): """Test Class for MailChimp OAuth2 v3.""" provider_id = MailChimpProvide...
joshowen/django-allauth
allauth/socialaccount/providers/mailchimp/tests.py
Python
mit
1,032
##################################################################### # # Utilities for pretty printing of table data # Author: A.Tsaregorodtsev # ##################################################################### __RCSID__ = '$Id$' import StringIO def int_with_commas(i): s = str(i) news = '' while len(s)...
Sbalbp/DIRAC
Core/Utilities/PrettyPrint.py
Python
gpl-3.0
2,481
from datetime import date, datetime, time from warnings import warn from django.db import models from django.db.models import fields from south.db import generic from south.db.generic import delete_column_constraints, invalidate_table_constraints, copy_column_constraints from south.exceptions import ConstraintDropped f...
peterbe/peekaboo
vendor-local/lib/python/south/db/sql_server/pyodbc.py
Python
mpl-2.0
18,409
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details __version__=''' $Id$ ''' #modification of users/robin/ttflist.py. __doc__="""This provides some general-purpose tools for finding fonts. The FontFinder object can search for font files. It aims to build a catalogue of fonts which our fra...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/reportlab/lib/fontfinder.py
Python
agpl-3.0
12,203
# -*- 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 model 'AssessmentWorkflow' db.create_table('workflow_assessmentworkflow', ( ('id', self...
EDUlib/edx-ora2
openassessment/workflow/migrations/0001_initial.py
Python
agpl-3.0
2,344
# -*- coding: utf-8 -*- # (c) 2015 Oihane Crucelaegui - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html import openerp.tests.common as common class TestSaleOrderType(common.TransactionCase): def setUp(self): super(TestSaleOrderType, self).setUp() self.sale_type_model = ...
luistorresm/sale-workflow
sale_order_type/tests/test_sale_order_type.py
Python
agpl-3.0
3,383
"""clicksend_tts platform for notify component.""" import json import logging from aiohttp.hdrs import CONTENT_TYPE import requests import voluptuous as vol from homeassistant.const import ( CONF_API_KEY, CONF_RECIPIENT, CONF_USERNAME, CONTENT_TYPE_JSON) import homeassistant.helpers.config_validation as cv from ...
jnewland/home-assistant
homeassistant/components/clicksend_tts/notify.py
Python
apache-2.0
3,208
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache/incubator-airflow
airflow/contrib/operators/spark_jdbc_operator.py
Python
apache-2.0
1,180
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 New Dream Network, LLC (DreamHost) # 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 # # h...
wallnerryan/quantum_migrate
quantum/tests/unit/test_db_migration.py
Python
apache-2.0
3,637
# 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...
allenlavoie/tensorflow
tensorflow/python/saved_model/signature_def_utils_impl.py
Python
apache-2.0
11,620
# Copyright 2013-2015 ARM Limited # # 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 w...
Sticklyman1936/workload-automation
wlauto/core/resolver.py
Python
apache-2.0
4,535
# encoding: utf-8 """Path utility functions.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. # Derived from IPython.utils.path, which is # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import os import sys i...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/jupyter_core/paths.py
Python
bsd-2-clause
5,264
""" MultiCall - a class which inherits its methods from a Tkinter widget (Text, for example), but enables multiple calls of functions per virtual event - all matching events will be called, not only the most specific one. This is done by wrapping the event functions - event_add, event_delete and event_info. MultiCall r...
yotchang4s/cafebabepy
src/main/python/idlelib/MultiCall.py
Python
bsd-3-clause
18,548
from django.utils.translation import ugettext as _ from wagtail.admin.forms.search import SearchForm from wagtail.search.backends import get_search_backend from wagtail.search.index import class_is_indexed class SearchableListMixin: search_box_placeholder = _("Search") search_fields = None def get_searc...
mikedingjan/wagtail
wagtail/admin/views/mixins.py
Python
bsd-3-clause
1,358
""" Wrapper class that takes a list of template loaders as an argument and attempts to load templates from them in order, caching the result. """ import hashlib import warnings from django.template import Origin, Template, TemplateDoesNotExist from django.utils.deprecation import RemovedInDjango20Warning from django....
samabhi/pstHealth
venv/lib/python2.7/site-packages/django/template/loaders/cached.py
Python
mit
5,775
#!/usr/bin/env python """ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ try: from crypt import crypt except ImportError: from thirdparty.fcrypt.fcrypt import crypt _multiprocessing = None try: import multiprocessing # problems on...
golismero/golismero
tools/sqlmap/lib/utils/hash.py
Python
gpl-2.0
34,425
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Customer References', 'category': 'Website', 'website': 'https://www.odoo.com/page/website-builder', 'summary': 'Publish Your Customer References', 'version': '1.0', 'description': """ ...
ghandiosm/Test
addons/website_customer/__openerp__.py
Python
gpl-3.0
764
""" System Logging Handler """ __RCSID__ = "$Id$" import logging import Queue import threading from DIRAC.Core.Utilities import Network class ServerHandler(logging.Handler, threading.Thread): """ ServerHandler is a custom handler from logging. It has no equivalent in the standard logging library because it i...
andresailer/DIRAC
FrameworkSystem/private/standardLogging/Handler/ServerHandler.py
Python
gpl-3.0
3,460
# -*- coding: utf-8 -*- import itertools from sqlparse import sql from sqlparse import tokens as T try: next except NameError: # Python < 2.6 next = lambda i: i.next() def _group_left_right(tlist, ttype, value, cls, check_right=lambda t: True, check_left=lambda ...
andybab/Impala
shell/ext-py/sqlparse-0.1.7/sqlparse/engine/grouping.py
Python
apache-2.0
13,718
# 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 requ...
tianweizhang/nova
nova/tests/api/openstack/compute/test_server_actions.py
Python
apache-2.0
59,521
# Copyright (c) 2014 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...
Juniper/neutron
neutron/tests/unit/vmware/extensions/test_portsecurity.py
Python
apache-2.0
1,953
from setuptools import setup from nested.source_module import cc from numba.pycc.platform import _patch_exec_command def run_setup(): # Avoid sporadic crashes on Windows due to MSVCRT spawnve() _patch_exec_command() setup(ext_modules=[cc.distutils_extension()]) if __name__ == '__main__': run_setup...
seibert/numba
numba/tests/pycc_distutils_usecase/setup_setuptools_nested.py
Python
bsd-2-clause
323
from __future__ import absolute_import from ..message import Message from . import register @register class pull_doc_req_1(Message): ''' Define the ``PULL-DOC-REQ`` message (revision 1) for requesting a Bokeh server reply with a new Bokeh Document. The ``content`` fragment of for this message is empty. ...
mindriot101/bokeh
bokeh/protocol/messages/pull_doc_req.py
Python
bsd-3-clause
663
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.utils import timezone REASON_CHOICES = ( (0, _("Spam")), (1, _("Other")), ) class CommentFlag(models.Model): ...
ramaseshan/Spirit
spirit/comment/flag/models.py
Python
mit
1,345
#!/usr/bin/env python # encoding: utf-8 # # partially based on boost.py written by Gernot Vormayr # written by Ruediger Sonderfeld <ruediger@c-plusplus.de>, 2008 # modified by Bjoern Michaelsen, 2008 # modified by Luca Fossati, 2008 # rewritten for waf 1.5.1, Thomas Nagy, 2008 # rewritten for waf 1.6.2, Sylvain Rouquet...
Enchufa2/ns-3-dev-git
waf-tools/boost.py
Python
gpl-2.0
12,900
"""Functions that read and write gzipped files. The user of the file doesn't have to worry about the compression, but random access is not allowed.""" # based on Andrew Kuchling's minigzip.py distributed with the zlib module import struct, sys, time, os import zlib import builtins import io import _compression __al...
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/gzip.py
Python
gpl-3.0
20,313
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache/incubator-airflow
tests/providers/mysql/transfers/test_s3_to_mysql.py
Python
apache-2.0
4,602
# Copyright 2016 VMware, 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 a...
venilnoronha/docker-volume-vsphere
esx_service/vsan_policy_test.py
Python
apache-2.0
2,858
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for Chromium WebUI resources. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the...
zcbenz/cefode-chromium
chrome/browser/resources/PRESUBMIT.py
Python
bsd-3-clause
2,027
from django.core.signing import b64_decode from django.test import TestCase, override_settings from django.urls import reverse from .models import SomeObject from .urls import ContactFormViewWithMsg, DeleteFormViewWithMsg @override_settings(ROOT_URLCONF='messages_tests.urls') class SuccessMessageMixinTests(TestCase)...
ar4s/django
tests/messages_tests/test_mixins.py
Python
bsd-3-clause
1,107
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks 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', ...
hryamzik/ansible
lib/ansible/modules/network/f5/bigiq_application_fastl4_tcp.py
Python
gpl-3.0
21,721
# -*- coding: utf-8 -*- """ Unit tests for instructor.enrollment methods. """ import json from abc import ABCMeta import mock from ccx_keys.locator import CCXLocator from django.conf import settings from django.utils.translation import override as override_language from django.utils.translation import get_language fr...
Stanford-Online/edx-platform
lms/djangoapps/instructor/tests/test_enrollment.py
Python
agpl-3.0
33,245
# 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 requ...
TieWei/nova
nova/api/openstack/compute/plugins/v3/limits.py
Python
apache-2.0
16,186
""" Telegram platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.telegram/ """ import io import logging import urllib import requests import voluptuous as vol import homeassistant.helpers.config_validation as cv from ho...
kyvinh/home-assistant
homeassistant/components/notify/telegram.py
Python
apache-2.0
6,190
#!/usr/bin/env bash """ makenpz.py DIRECTORY Build a npz containing all data files in the directory. """ from __future__ import division, print_function, absolute_import import os import numpy as np from optparse import OptionParser def main(): p = OptionParser() options, args = p.parse_args() if len...
pbrod/scipy
scipy/special/utils/makenpz.py
Python
bsd-3-clause
2,226
# -*-coding:utf-8 -* # Copyright (c) 2011-2015, 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 copyright notice, thi...
geekboxzone/mmallow_external_parameter-framework
test/functional-tests/PfwTestCase/Types/tFP32_Q15_16.py
Python
bsd-3-clause
10,981
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import strip_html from frappe import _ from jinja2.utils import concat from jinja2 import meta import re def build_template(context): """Returns...
mbauskar/tele-frappe
frappe/website/template.py
Python
mit
4,737
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import pos_box from . import pos_details from . import pos_open_statement from . import pos_payment
t3dev/odoo
addons/point_of_sale/wizard/__init__.py
Python
gpl-3.0
207
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org> # # 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 Foundatio...
yangming85/lettuce
tests/unit/test_core.py
Python
gpl-3.0
6,094
#/****************************************************************************** # * Copyright (c) 2012 Jan Rheinländer <jrheinlaender@users.sourceforge.net> * # * * # * This file is part of the FreeCAD CAx development system. ...
sanguinariojoe/FreeCAD
src/Mod/PartDesign/FeatureHole/TaskHole.py
Python
lgpl-2.1
33,054
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os.path import warnings import sys try: from setuptools import setup, Command setuptools_available = True except ImportError: from distutils.core import setup, Command setuptools_available = False from distutil...
mxamin/youtube-dl
setup.py
Python
unlicense
4,030
def f(a): return ++a def g(a): return +a def g(a): return --a def foo(): if 1 == None: print "whoa!" else: print "whew!" if None == 1: print "whoa!" else: print "whew!" def bar(): a = b = 0 if 'a' <= b >= 'c': print ""
lavjain/incubator-hawq
tools/bin/pythonSrc/pychecker-0.8.18/pychecker2/tests/op.py
Python
apache-2.0
300
""" ============================================== Estimate covariance matrix from a raw FIF file ============================================== """ # Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # # License: BSD (3-clause) import mne from mne import io from mne.datasets import sample print(_...
aestrivex/mne-python
examples/preprocessing/plot_estimate_covariance_matrix_raw.py
Python
bsd-3-clause
1,087
# For Capstone Engine. AUTO-GENERATED FILE, DO NOT EDIT [xcore_const.py] XCORE_OP_INVALID = 0 XCORE_OP_REG = 1 XCORE_OP_IMM = 2 XCORE_OP_MEM = 3 XCORE_REG_INVALID = 0 XCORE_REG_CP = 1 XCORE_REG_DP = 2 XCORE_REG_LR = 3 XCORE_REG_SP = 4 XCORE_REG_R0 = 5 XCORE_REG_R1 = 6 XCORE_REG_R2 = 7 XCORE_REG_R3 = 8 XCORE_REG_R4 = ...
0vercl0k/rp
src/third_party/capstone/bindings/python/capstone/xcore_const.py
Python
mit
3,201
"""Copyright 2008 Orbitz WorldWide Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
mancdaz/graphite-buildpackage
webapp/graphite/util.py
Python
apache-2.0
2,163
from layer import * class ReplicatedSoftmaxLayer(Layer): def __init__(self, *args, **kwargs): super(ReplicatedSoftmaxLayer, self).__init__(*args, **kwargs) @classmethod def IsLayerType(cls, proto): return proto.hyperparams.activation == \ deepnet_pb2.Hyperparams.REPLICATED_SOFTMAX def ApplyAc...
abdulqayyum/deepnet
deepnet/replicated_softmax_layer.py
Python
bsd-3-clause
5,731
""" This module defines the SFrame class which provides the ability to create, access and manipulate a remote scalable dataframe object. SFrame acts similarly to pandas.DataFrame, but the data is completely immutable and is stored column wise on the GraphLab Server side. """ ''' Copyright (C) 2015 Dato, Inc. All righ...
ypkang/Dato-Core
src/unity/python/graphlab/data_structures/sframe.py
Python
agpl-3.0
196,438
def _path_inject(paths): import sys sys.path[:0] = paths
lovexiaov/SandwichApp
venv/lib/python2.7/site-packages/py2app/bootstrap/path_inject.py
Python
apache-2.0
65
# Copyright 2010 Google Inc. # # 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, publish, dis- # trib...
donny/mako-mori
external/boto/s3/resumable_download_handler.py
Python
mit
15,584
# -*- coding: utf-8 -*- """ flask.blueprints ~~~~~~~~~~~~~~~~ Blueprints are the recommended way to implement larger or more pluggable applications in Flask 0.7 and later. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from functools import update_wrap...
samabhi/pstHealth
venv/lib/python2.7/site-packages/flask/blueprints.py
Python
mit
13,253
#!/usr/bin/python # -*- 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': ['preview'], ...
bregman-arie/ansible
lib/ansible/modules/network/aci/aci_interface_policy_port_security.py
Python
gpl-3.0
6,582
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Tests autojump. """ from __future__ import division import autojump import contextlib import random import os import shutil import sys import tempfile import unittest @contextlib.contextmanager def no_stderr(): savestderr = sys.stderr class DevNull(object...
xuwangyin/autojump
tests/runtests.py
Python
gpl-3.0
6,698
# -*- coding: utf-8 -*- # ConnectorUnit needs to be registered from . import binder from . import import_synchronizer from . import export_synchronizer from . import delete_synchronizer from . import backend_adapter
acsone/connector-magento
magentoerpconnect/unit/__init__.py
Python
agpl-3.0
217