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
# 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...
jiajiechen/mxnet
example/multivariate_time_series/src/train.py
Python
apache-2.0
17,882
"""'Null' auth backend This backend requires no authentication and permits everything. Useful for testing, do not use in production.""" from hil import auth import logging from hil.rest import ContextLogger logger = ContextLogger(logging.getLogger(__name__), {}) class NullAuthBackend(auth.AuthBackend): """A nu...
SahilTikale/haas
hil/ext/auth/null.py
Python
apache-2.0
816
#!/usr/bin/python # # 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 # dist...
life-beam/j2objc
scripts/parse_proto.py
Python
apache-2.0
3,256
# Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
ddepaoli3/fuel-main-dev
fuelweb_test/helpers/eb_tables.py
Python
apache-2.0
2,523
# coding: utf8 # $Id: __init__.py 7338 2012-02-03 12:22:14Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Miscellaneous utilities for the documentation utilities. """ __docformat__ = 'reStructuredText' import sys import os import os.path impor...
ddd332/presto
presto-docs/target/sphinx/docutils/utils/__init__.py
Python
apache-2.0
26,763
"""Cover for Shelly.""" from aioshelly import Block from homeassistant.components.cover import ( ATTR_POSITION, SUPPORT_CLOSE, SUPPORT_OPEN, SUPPORT_SET_POSITION, SUPPORT_STOP, CoverEntity, ) from homeassistant.core import callback from . import ShellyDeviceWrapper from .const import COAP, DAT...
tboyce1/home-assistant
homeassistant/components/shelly/cover.py
Python
apache-2.0
3,273
#!/usr/bin/env python # Copyright (c) 2008, Donovan Preston # # 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, mo...
2013Commons/HUE-SHARK
desktop/core/ext-py/Spawning-0.9.6/src/spawning/spawning_controller.py
Python
apache-2.0
21,469
# # Copyright (c) 2004 Conectiva, Inc. # # Written by Gustavo Niemeyer <niemeyer@conectiva.com> # # This file is part of Smart Package Manager. # # Smart Package Manager 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 Fou...
blackPantherOS/packagemanagement
smartpm/smart/channels/deb_dir_info.py
Python
apache-2.0
1,215
# Copyright (C) 2014 VA Linux Systems Japan K.K. # Copyright (C) 2014 Fumihiko Kakuma <kakuma at valinux co jp> # 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...
sebrandon1/neutron
neutron/tests/unit/plugins/ml2/drivers/l2pop/rpc_manager/test_l2population_rpc.py
Python
apache-2.0
12,332
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from tapi_server.models.base_model_ import Model from tapi_server.models.tapi_path_computation_path_objective_function import TapiPathComputationPathObjectiveFunction ...
karthik-sethuraman/ONFOpenTransport
RI/flask_server/tapi_server/models/tapi_path_computation_computep2ppath_input.py
Python
apache-2.0
5,982
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # 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...
iwaseyusuke/ryu
ryu/services/protocols/bgp/model.py
Python
apache-2.0
5,796
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
joshbruning/selenium
py/selenium/webdriver/remote/webdriver.py
Python
apache-2.0
41,544
# Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
axbaretto/beam
sdks/python/.tox/py27gcp/lib/python2.7/site-packages/google/cloud/bigquery/client.py
Python
apache-2.0
15,061
from __future__ import division from __future__ import print_function from builtins import range from past.utils import old_div # 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 Licen...
tombstone/models
research/steve/toy_demo.py
Python
apache-2.0
16,727
# Copyright 2009 Owen Taylor # # This file is part of Reinteract and distributed under the terms # of the BSD license. See the file COPYING in the Reinteract # distribution for full details. # ######################################################################## import gtk from global_settings import global_settin...
rschroll/reinteract
lib/reinteract/preferences_dialog.py
Python
bsd-2-clause
4,634
from __future__ import absolute_import from django.db import connection, connections, transaction, DEFAULT_DB_ALIAS, DatabaseError from django.db.transaction import commit_on_success, commit_manually, TransactionManagementError from django.test import TransactionTestCase, skipUnlessDBFeature from django.test.utils imp...
RichardLitt/wyrd-django-dev
tests/regressiontests/transactions_regress/tests.py
Python
bsd-3-clause
10,745
#!/usr/bin/env python from mate_invest.defs import GTK_API_VERSION import gi gi.require_version("Gtk", GTK_API_VERSION) from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GdkPixbuf from gi.repository import GObject import os import mate_invest from gettext import gettext as _ from ma...
nmercier/linux-cross-gcc
linux/lib/python2.7/dist-packages/mate_invest/chart.py
Python
bsd-3-clause
7,393
"""Calxeda: simg.py""" # Copyright (c) 2012-2013, Calxeda 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, ...
SilverLiningSystems/cxmanage-test2
cxmanage_api/simg.py
Python
bsd-3-clause
7,401
#!/usr/bin/python # -*- coding: utf-8 -*- """ ======================================================================== Gaussian Processes regression: goodness-of-fit on the 'diabetes' dataset ======================================================================== This example consists in fitting a Gaussian Process m...
florian-f/sklearn
examples/gaussian_process/gp_diabetes_dataset.py
Python
bsd-3-clause
2,017
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import uuid def gen_uuid(apps, schema_editor): WooeyJob = apps.get_model('wooey', 'WooeyJob') for obj in WooeyJob.objects.all(): obj.uuid = uuid.uuid4() obj.save() class Migration(migrat...
wooey/Wooey
wooey/migrations/0013_wooeyjob_uuid_populate.py
Python
bsd-3-clause
517
import sys from json import loads try: from StringIO import StringIO except ImportError: from io import StringIO try: from unittest import mock except ImportError: import mock from django.conf import settings from django.utils.translation import activate from django.template.base import Template,...
RamezIssac/django-sitetree
sitetree/tests.py
Python
bsd-3-clause
33,020
"""SCons.Tool.SCCS.py Tool-specific initialization for SCCS. 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__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy...
Distrotech/scons
src/engine/SCons/Tool/SCCS.py
Python
mit
2,283
from django.contrib import admin from django.urls import path urlpatterns = [ path("admin/", admin.site.urls), ]
MarkusH/django-osm-field
tests/urls.py
Python
mit
118
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008 Zuza Software Foundation # # This file is part of translate. # # translate 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 t...
tzabian/fuego-pootle
local_apps/pootle_app/models/permissions.py
Python
gpl-2.0
6,275
import sys import os import re import imp from itertools import count from Tkinter import * import tkSimpleDialog import tkMessageBox import webbrowser import idlever import WindowList import SearchDialog import GrepDialog import ReplaceDialog import PyParse from configHandler import idleConf import aboutDialog, textV...
trivoldus28/pulsarch-verilog
tools/local/bas-release/bas,3.9-SunOS-i386/lib/python/lib/python2.4/idlelib/EditorWindow.py
Python
gpl-2.0
52,368
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-22 23:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('fleetactivitytracking', '0003_auto_20160906_2354'), ] operations = [ migrat...
Adarnof/allianceauth
allianceauth/fleetactivitytracking/migrations/0004_make_strings_more_stringy.py
Python
gpl-2.0
478
# -*- coding: utf-8 -*- import json import re from time import sleep from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.network.RequestFactory import getURL class OpenloadIo(SimpleHoster): __name__ = "OpenloadIo" __type__ = "hoster" __version__ = "0.06" __...
mationic/pyload
module/plugins/hoster/OpenloadIo.py
Python
gpl-3.0
2,286
from __future__ import absolute_import # Use 3.x import model. #------------------------------------------------------------------------------- __all__ = () from numpy.linalg import * from numpy.fft import * from numpy.random import * from numpy.ma import * from numpy import * from . import gui
jpbarraca/dRonin
python/logviewer/__init__.py
Python
gpl-3.0
300
""" Views related to Account Settings. """ import logging from datetime import datetime import six from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required from django.shortcuts import redirect from django.urls import reverse from django.utils.tra...
edx-solutions/edx-platform
openedx/core/djangoapps/user_api/accounts/settings_views.py
Python
agpl-3.0
11,596
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2015 Smile (<http://www.smile.fr>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
tiexinliu/odoo_addons
smile_subscription_access_rights/__openerp__.py
Python
agpl-3.0
1,615
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
EmreAtes/spack
var/spack/repos/builtin/packages/r-rlang/package.py
Python
lgpl-2.1
1,824
from temboo.Library.Amazon.CloudDrive.Folders.CreateFolder import CreateFolder, CreateFolderInputSet, CreateFolderResultSet, CreateFolderChoreographyExecution from temboo.Library.Amazon.CloudDrive.Folders.GetFolderMetadata import GetFolderMetadata, GetFolderMetadataInputSet, GetFolderMetadataResultSet, GetFolderMetadat...
jordanemedlock/psychtruths
temboo/core/Library/Amazon/CloudDrive/Folders/__init__.py
Python
apache-2.0
497
# 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...
frreiss/tensorflow-fred
tensorflow/python/tools/print_selective_registration_header.py
Python
apache-2.0
3,254
# This file is part of the MapProxy project. # Copyright (C) 2010-2012 Omniscale <http://omniscale.de> # # 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/LI...
geoadmin/mapproxy
mapproxy/test/system/test_renderd_client.py
Python
apache-2.0
11,857
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
TieWei/nova
nova/api/ec2/cloud.py
Python
apache-2.0
81,753
from temboo.Library.PayPal.AdaptivePayments.ConvertCurrency import ConvertCurrency, ConvertCurrencyInputSet, ConvertCurrencyResultSet, ConvertCurrencyChoreographyExecution from temboo.Library.PayPal.AdaptivePayments.PaymentDetails import PaymentDetails, PaymentDetailsInputSet, PaymentDetailsResultSet, PaymentDetailsCho...
jordanemedlock/psychtruths
temboo/core/Library/PayPal/AdaptivePayments/__init__.py
Python
apache-2.0
339
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tank.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
zxl200406/minos
tank/manage.py
Python
apache-2.0
225
# -*- coding: utf-8 -*- ############################################################################### # # GetRelatedWords # Retrieves the related words of a given word. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not ...
jordanemedlock/psychtruths
temboo/core/Library/Wordnik/Word/GetRelatedWords.py
Python
apache-2.0
4,782
# -*- coding: utf-8 -*- # # 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 ...
mtdewulf/incubator-airflow
airflow/contrib/operators/qubole_operator.py
Python
apache-2.0
7,509
# 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...
horance-liu/tensorflow
tensorflow/contrib/data/python/kernel_tests/range_dataset_op_test.py
Python
apache-2.0
25,983
# ================================================================== # Copyright (c) 2007,2008,2009 Metaweb Technologies, 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: # * Redistribut...
yuvadm/freebase-python
examples/freebase-images-appengine/freebase/fcl/fbutil.py
Python
bsd-2-clause
3,369
########################################################################## # # Copyright (c) 2010-2013, Image Engine Design 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: # # * Redis...
code-google-com/cortex-vfx
test/IECoreHoudini/FromHoudiniGroupConverter.py
Python
bsd-3-clause
30,705
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Red...
paulondc/gaffer
python/GafferSceneUI/StandardOptionsUI.py
Python
bsd-3-clause
3,747
from itertools import chain, imap, groupby import re from dhcp_objects import (Option, Group, Host, Parameter, Pool, Allow, Deny, Subnet, ) key_table = [(Option, 'options'), (Group, 'groups'), (Host, 'hosts'), (Parameter, 'parameters'), (Poo...
drkitty/cyder
cyder/management/commands/lib/dhcpd_compare/utils.py
Python
bsd-3-clause
1,370
"""tests/test_output_format.py. Tests the output format handlers included with Hug Copyright (C) 2015 Timothy Edmund Crosley 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, ...
jean/hug
tests/test_output_format.py
Python
mit
2,679
from core.himesis import Himesis, HimesisPostConditionPattern import cPickle as pickle from uuid import UUID class HMoveOneInputRepeatedDirectApplyDiffRulesRHS(HimesisPostConditionPattern): def __init__(self): """ Creates the himesis graph representing the AToM3 model HMoveOneInputRepeatedDirectA...
levilucio/SyVOLT
UMLRT2Kiltera_MM/merge_preprocess_rules/Himesis/HMoveOneInputRepeatedDirectApplyDiffRulesRHS.py
Python
mit
12,860
#------------------------------------------------------------------------------- # elftools: port of OrderedDict to work on Python < 2.7 # # Taken from http://code.activestate.com/recipes/576693/ , revision 9 # Code by Raymond Hettinger. License: MIT #--------------------------------------------------------------------...
g0t3n/Ksymhunter-gui
utils/elftools/common/ordereddict.py
Python
gpl-2.0
8,998
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2007 Lukáš Lalinský # Copyright (C) 2006 Matthias Friedrich # Copyright (C) 2013 Laurent Monin # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as p...
dufferzafar/picard
picard/disc.py
Python
gpl-2.0
2,517
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from lxml impo...
alexston/calibre-webserver
src/calibre/ebooks/mobi/writer8/toc.py
Python
gpl-3.0
4,948
#!/usr/bin/python # (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or # https://www.gnu.org/licenses/gpl-3.0.txt) ''' Element Software Initialize Cluster ''' from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
veger/ansible
lib/ansible/modules/storage/netapp/na_elementsw_cluster.py
Python
gpl-3.0
7,424
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
veger/ansible
lib/ansible/plugins/action/ios.py
Python
gpl-3.0
4,289
# -*- coding: utf-8 -*- """ *==LICENSE==* CyanWorlds.com Engine - MMOG client, server and tools Copyright (C) 2011 Cyan Worlds, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3...
TOC-Shard/moul-scripts
Python/nglnUrwinBrain.py
Python
gpl-3.0
17,059
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2008-2015 Canonical # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any...
santoshsahoo/filesync-server
lib/ubuntuone/supervisor/start-supervisord.py
Python
agpl-3.0
2,561
# 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 PyAgateSql(PythonPackage): """agate-sql adds SQL read/write support to agate.""" home...
LLNL/spack
var/spack/repos/builtin/packages/py-agate-sql/package.py
Python
lgpl-2.1
694
# 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 DtDiamond(Package): """This package has an indirect diamond dependency on dt-diamond-botto...
LLNL/spack
var/spack/repos/builtin.mock/packages/dt-diamond/package.py
Python
lgpl-2.1
548
# 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 Maq(AutotoolsPackage): """Maq is a software that builds mapping assemblies from short read...
LLNL/spack
var/spack/repos/builtin/packages/maq/package.py
Python
lgpl-2.1
826
x = 1 x += 2 assert type(x) == int del x pass exec('x = 1') from sys import winver global x import sys print(x) try: x = 1 except: pass try: x = 1 finally: pass with open('fob.txt', 'w+'): x = 1
DinoV/PTVS
Python/Tests/TestData/Coverage/Statements/test.py
Python
apache-2.0
225
"""JOSE interfaces.""" import abc import collections import json import six from acme.jose import errors from acme.jose import util # pylint: disable=no-self-argument,no-method-argument,no-init,inherit-non-class # pylint: disable=too-few-public-methods @six.add_metaclass(abc.ABCMeta) class JSONDeSerializable(objec...
hsduk/lets-encrypt-preview
acme/acme/jose/interfaces.py
Python
apache-2.0
7,747
# # Copyright 2013 Rackspace Hosting. # # 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...
cernops/ceilometer
ceilometer/tests/unit/event/test_converter.py
Python
apache-2.0
32,666
# Generated by Django 3.1.8 on 2021-05-01 12:34 from django.db import migrations, models from django.db.backends.postgresql.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps # Set starred_message_count for already existing users to True. def set_starred_message_count_to_true(apps: S...
andersk/zulip
zerver/migrations/0323_show_starred_message_counts.py
Python
apache-2.0
1,048
# Copyright (c) 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
saeki-masaki/glance
glance/common/artifacts/definitions.py
Python
apache-2.0
21,600
# 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...
phenoxim/cinder
cinder/tests/functional/__init__.py
Python
apache-2.0
799
import warnings from pilkit.processors.base import * warnings.warn('imagekit.processors.base is deprecated use imagekit.processors instead', DeprecationWarning) __all__ = ['ProcessorPipeline', 'Adjust', 'Reflection', 'Transpose', 'Anchor', 'MakeOpaque']
FundedByMe/django-imagekit
imagekit/processors/base.py
Python
bsd-3-clause
257
from trac.perm import PermissionCache, PermissionSystem from trac.ticket.api import TicketSystem from trac.ticket.model import Ticket from trac.test import EnvironmentStub, Mock import unittest class TicketSystemTestCase(unittest.TestCase): def setUp(self): self.env = EnvironmentStub() self.perm...
netjunki/trac-Pygit2
trac/ticket/tests/api.py
Python
bsd-3-clause
6,430
import numpy as np from bokeh.models import ColumnDataSource, DataRange1d, Plot, LinearAxis, Grid, HoverTool from bokeh.models.widgets import Tabs, Panel, Paragraph from bokeh.models.layouts import VBox from bokeh.models.glyphs import ( AnnularWedge, Annulus, Arc, Bezier, Gear, Circle, ImageURL, Line, MultiLine, O...
pombredanne/bokeh
examples/models/glyphs.py
Python
bsd-3-clause
5,266
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2010 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of c...
chatelak/RMG-Py
rmgpy/data/kinetics/groups.py
Python
mit
26,065
#!/usr/bin/env python import unittest, re from unittest import TestCase from plasTeX.TeX import TeX from plasTeX import Command, Environment class Document(TestCase): def testParentage(self): class myenv(Environment): pass class foo(Command): args = 'self' s = TeX(...
dav94/plastex
unittests/Document.py
Python
mit
1,288
# -*- coding: utf-8 -*- """Tests for the services module.""" # These tests require pytest, and mock. Mock comes with Python 3.3, but has # also been backported for Python 2.7. It is available on pypi. from __future__ import unicode_literals import pytest from soco.exceptions import SoCoUPnPException from soco.servi...
dundeemt/SoCo
tests/test_services.py
Python
mit
8,183
#!/usr/bin/env python """ Test AMQP library. Repeatedly receive messages from the demo_send.py script, until it receives a message with 'quit' as the body. 2007-11-11 Barry Pederson <bp@barryp.org> """ from optparse import OptionParser import amqplib.client_0_8 as amqp def callback(msg): for key, val in msg.p...
mzdaniel/oh-mainline
vendor/packages/amqplib/demo/demo_receive.py
Python
agpl-3.0
2,026
# Miro - an RSS based video player application # Copyright 2009 - Participatory Culture Foundation # # This file is part of vidscraper. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of sour...
norayr/unisubs
libs/vidscraper/metasearch/util.py
Python
agpl-3.0
1,646
from django.conf import settings from typing import Text from zerver.lib.utils import make_safe_digest from zerver.models import UserProfile import hashlib def gravatar_hash(email: Text) -> Text: """Compute the Gravatar hash for an email address.""" # Non-ASCII characters aren't permitted by the currently ...
mahim97/zulip
zerver/lib/avatar_hash.py
Python
apache-2.0
1,623
# Copyright 2016 Intel Corporation # # 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...
lcnature/brainiak
brainiak/factoranalysis/tfa.py
Python
apache-2.0
30,560
# Copyright (c) 2012 OpenStack Foundation. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
yuewko/neutron
neutron/extensions/securitygroup.py
Python
apache-2.0
13,464
from django.conf import settings from django.db.models import Sum from django.db.models.query import F from django.db.models.functions import Length from zerver.models import BotConfigData, UserProfile from typing import List, Dict, Optional from collections import defaultdict import os import configparser import i...
jackrzhang/zulip
zerver/lib/bot_config.py
Python
apache-2.0
3,149
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE...
ntt-sic/neutron
neutron/db/migration/alembic_migrations/versions/38335592a0dc_nvp_portmap.py
Python
apache-2.0
1,775
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Helper script to apply pull requests from github.com to local hg working copy. Example: cd jython-hg-workdir apply-github-pull-request.py 4 ''' import argparse import getpass import os import requests import subprocess import sys import tempfile def get_pull_url(...
p4datasystems/CarnotKE
jyhton/Misc/apply-github-pull-request.py
Python
apache-2.0
3,868
#! /usr/bin/env python import os import sys from barf.barf import BARF if __name__ == "__main__": # # Open file # try: filename = os.path.abspath("../../samples/toy/x86/branch4") barf = BARF(filename) except Exception as err: print err print "[-] Error opening fil...
ignaeche/barf-project
barf/examples/x86/translate_reil.py
Python
bsd-2-clause
651
# -*- encoding: utf-8 -*- """ Tests for django.core.servers. """ from __future__ import unicode_literals import os import socket from django.core.exceptions import ImproperlyConfigured from django.test import LiveServerTestCase from django.test import override_settings from django.utils.http import urlencode from dja...
deployed/django
tests/servers/tests.py
Python
bsd-3-clause
5,943
# Copyright (c) 2012, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) #import numpy as np #import Tango #from base_plots import gpplot, x_frame1D, x_frame2D from . import plotting_library as pl def plot_optimizer(optimizer, **kwargs): if optimizer.trace == None: ...
befelix/GPy
GPy/plotting/gpy_plot/inference_plots.py
Python
bsd-3-clause
1,233
#!/usr/bin/python2.4 # Copyright (c) 2006-2008 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. ''' Base class for postprocessing of RC files. ''' import sys class PostProcessor(object): ''' Base class for postprocessin...
meego-tablet-ux/meego-app-browser
tools/grit/grit/tool/postprocess_interface.py
Python
bsd-3-clause
1,033
import ocl as cam import camvtk import time import vtk import math import datetime red= (1,0,0) green= (0,1,0) blue= (0,0,1) cyan= (0,1,1) yellow= (1,1,0) pink = ( float(255)/255,float(192)/255,float(203)/255) grey = ( float(127)/255,float(127)/255,float(127)/255) orange = ( float(255)/255,float(165)/255,float(0)/255...
AlanZatarain/opencamlib
scripts/offset-ellipse/oellipse2_tst.py
Python
gpl-3.0
11,549
import binascii import json import warnings from collections import Mapping from .algorithms import ( Algorithm, get_default_algorithms, has_crypto, requires_cryptography # NOQA ) from .compat import binary_type, string_types, text_type from .exceptions import ( DecodeError, InvalidAlgorithmError, InvalidSign...
dfalt974/SickRage
lib/jwt/api_jws.py
Python
gpl-3.0
7,599
"""Make sure that Mysa Living is enumerated properly.""" from homeassistant.helpers import device_registry as dr, entity_registry as er from tests.components.homekit_controller.common import ( Helper, setup_accessories_from_file, setup_test_accessories, ) async def test_mysa_living_setup(hass): """T...
lukas-hetzenecker/home-assistant
tests/components/homekit_controller/specific_devices/test_mysa_living.py
Python
apache-2.0
2,910
from __future__ import unicode_literals import time import warnings from datetime import datetime, timedelta from StringIO import StringIO from django.conf import settings from django.core.handlers.wsgi import WSGIRequest, LimitedStream from django.http import HttpRequest, HttpResponse, parse_cookie, build_request_re...
cobalys/django
tests/regressiontests/requests/tests.py
Python
bsd-3-clause
19,041
from __future__ import unicode_literals from reviewboard.signals import initializing def connect_signals(**kwargs): """ Listens to the ``initializing`` signal and tells other modules to connect their signals. This is done so as to guarantee that django is loaded first. """ from reviewboard.no...
chipx86/reviewboard
reviewboard/notifications/__init__.py
Python
mit
455
# 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 ...
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/retention_policy_parameters.py
Python
mit
1,157
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
andmos/ansible
lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py
Python
gpl-3.0
18,291
#!/usr/bin/python # # Cppcheck - A tool for static C/C++ code analysis # Copyright (C) 2007-2016 Cppcheck team. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License,...
Blubbz0r/cppcheck
tools/extracttests.py
Python
gpl-3.0
10,133
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2015 Cristian van Ee <cristian at cvee.org> # Copyright 2015 Igor Gnatenko <i.gnatenko.brain@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 pu...
dimid/ansible-modules-extras
packaging/os/dnf.py
Python
gpl-3.0
15,510
# Copyright 2020 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
ctiller/grpc
src/python/grpcio_tests/tests_aio/health_check/health_servicer_test.py
Python
apache-2.0
10,755
# Natural Language Toolkit: Zen Chatbot # # Copyright (C) 2001-2008 University of Pennsylvania # Author: Peter Spiller <pspiller@csse.unimelb.edu.au> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT from util import * pairs = ( (r'We (.*)', ("What do you mean, 'we'?", "Don't ...
hectormartinez/rougexstem
taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/chat/rude.py
Python
apache-2.0
2,684
from __future__ import unicode_literals from django.conf import settings from django.contrib import admin if 'django.contrib.auth' in settings.INSTALLED_APPS: from tastypie.models import ApiKey class ApiKeyInline(admin.StackedInline): model = ApiKey extra = 0 class ApiKeyAdmin(admin.Mode...
Perkville/django-tastypie
tastypie/admin.py
Python
bsd-3-clause
804
# -*- coding: utf-8 -*- """ pygments.formatters.latex ~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for LaTeX fancyvrb output. :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments.token import T...
sysbot/pastedown
vendor/pygments/pygments/formatters/latex.py
Python
mit
13,946
from __future__ import absolute_import from .browser import * from .store import * __all__ = [] __all__ += browser.__all__ __all__ += store.__all__
zejn/cubes
cubes/sql/__init__.py
Python
mit
152
# # Copyright (c) 2008--2016 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
shastah/spacewalk
client/tools/rhncfg/actions/ModeControllerCreator.py
Python
gpl-2.0
2,535
""" Test Help links in LMS """ from common.test.acceptance.fixtures.course import CourseFixture from common.test.acceptance.pages.lms.instructor_dashboard import InstructorDashboardPage from common.test.acceptance.tests.discussion.helpers import CohortTestMixin from common.test.acceptance.tests.lms.test_lms_instructor...
BehavioralInsightsTeam/edx-platform
common/test/acceptance/tests/lms/test_lms_help.py
Python
agpl-3.0
4,387
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 requ...
tylertian/Openstack
openstack F/keystone/keystone/common/sql/__init__.py
Python
apache-2.0
663
# we purposefully raise a NameError at the top level here undefined_variable
DESHRAJ/fjord
vendor/packages/nose/functional_tests/test_multiprocessing/support/nameerror.py
Python
bsd-3-clause
79
# -*- coding: utf-8 -*- """ *************************************************************************** v_net_iso.py --------------------- Date : December 2015 Copyright : (C) 2015 by Médéric Ribreux Email : medspx at medspx dot fr *************************...
geopython/QGIS
python/plugins/processing/algs/grass7/ext/v_net_iso.py
Python
gpl-2.0
1,466
#!/usr/bin/python # # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # # Copyright (c) 2016 Dell Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versi...
romain-dartigues/ansible-modules-core
network/dellos6/dellos6_command.py
Python
gpl-3.0
6,526