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
# AUTOMATICALLY GENERATED FILE # DO NOT EDIT # Generated from outputs.png icon_outputs = b'iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAA'\ b'BHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAA'\ b'CuNJREFUaIHVmltsXcd1hr+Z2ftceZVoi4xFS6KdSlHkooGr'\ b'JgpyqWQEKFwkqNvaemrhINV...
gion86/awlsim
awlsim/gui/icons/outputs.py
Python
gpl-2.0
5,539
# Copyright 2016 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. import unittest from webkitpy.common.net.git_cl import GitCL from webkitpy.common.system.executive_mock import MockExecutive2 from webkitpy.common.host_mock...
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py
Python
gpl-3.0
3,618
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL 3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from itertools import izip from calibre.customize import Plugin as _Plugin FONT_SIZES = [('xx-small', 1), ...
hazrpg/calibre
src/calibre/customize/profiles.py
Python
gpl-3.0
26,074
# -*- coding: iso-8859-1 -*- # Copyright (C) 2011 Daniele Simonetti # # 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. # ...
tectronics/l5rcm
dal/skill.py
Python
gpl-3.0
2,619
''' *** SHED SKIN Python-to-C++ Compiler *** Copyright 2005-2013 Mark Dufour; License GNU GPL version 3 (See LICENSE) graph.py: build constraint graph used in dataflow analysis constraint graph: graph along which possible types 'flow' during an 'abstract execution' of a program (a dataflow analysis). consider the ass...
shedskin/shedskin
shedskin/graph.py
Python
gpl-3.0
71,909
#!/usr/bin/env python3 # # PLASMA : Generate an indented asm code (pseudo-C) with colored syntax. # Copyright (C) 2015 Joel # # 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 ...
joelpx/plasma
plasma/lib/generate_ast.py
Python
gpl-3.0
25,145
import collections class AsaList(object): @classmethod def flatten(cls, lst): """ Returns Generator of non-iterable values """ for x in lst: if not isinstance(x, collections.Iterable): yield x else: for x in AsaList.fl...
asascience-open/paegan
paegan/utils/asalist.py
Python
gpl-3.0
358
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from .util import Specification from . import compat class Field(Specification): """ Field object for adding fields to a resource schema...
tryggvib/datapackage
datapackage/schema.py
Python
gpl-3.0
11,045
__author__ = 'Sun' from sandbox.dynamic_title.creator.char_corpus import CharacterCorpus import cPickle import click @click.command() @click.argument("text_file", type=click.File(mode='r', encoding='gb18030')) @click.argument("char_cropus_file", type=click.File(mode='wb')) def make_char_corpus(text_file, char_cropu...
rudaoshi/neural_machine
char_rnn/make_char_corpus.py
Python
gpl-3.0
520
# Part of Cosmos by OpenGenus Foundation def replace_0_5_iterative(user_input): modified = [] for i in user_input: if i == "0": modified.append("5") else: modified.append(i) return "".join(modified) def replace_0_5_pythonic(user_input): return user_input.repla...
OpenGenus/cosmos
code/mathematical_algorithms/src/replace_0_with_5/replace_0_with_5.py
Python
gpl-3.0
629
# -*- coding: utf-8 -*- '''Core plugins unit tests''' import os import tempfile import unittest import time from contextlib import contextmanager from tempfile import mkdtemp from shutil import rmtree from hashlib import md5 import gzip_cache @contextmanager def temporary_folder(): """creates a temporary folder...
mikitex70/pelican-plugins
gzip_cache/test_gzip_cache.py
Python
agpl-3.0
4,627
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
Johnzero/OE7
openerp/addons/mail/mail_mail.py
Python
agpl-3.0
16,471
""" Unit tests for user messages. """ import warnings import ddt from django.contrib.messages.middleware import MessageMiddleware from django.test import RequestFactory, TestCase from common.test.utils import normalize_repr from openedx.core.djangolib.markup import HTML, Text from common.djangoapps.student.tests.fa...
eduNEXT/edx-platform
openedx/core/djangoapps/util/tests/test_user_messages.py
Python
agpl-3.0
5,683
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import CuraProfileReader from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "plugin": { "name": catalog.i18nc("@label", "Cura Profile Reader"), ...
senttech/Cura
plugins/CuraProfileReader/__init__.py
Python
agpl-3.0
807
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals import time from django ...
suutari-ai/shoop
shuup/addons/admin_module/views/reload.py
Python
agpl-3.0
3,004
"""Offers a simple XML-RPC dispatcher for django_xmlrpc Author:: Graham Binns Credit must go to Brendan W. McAdams <brendan.mcadams@thewintergrp.com>, who posted the original SimpleXMLRPCDispatcher to the Django wiki: http://code.djangoproject.com/wiki/XML-RPC New BSD License =============== Copyright (c) 2007, ...
gnowgi/gnowsys-studio
gstudio/xmlrpc/dispatcher.py
Python
agpl-3.0
3,078
# -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). # All Rights Reserved ###############Credits############################################...
kailIII/emaresa
trunk.pe/account_financial_report/wizard/__init__.py
Python
agpl-3.0
1,490
# Copyright 2016-2017 Jairo Llopis <jairo.llopis@tecnativa.com> # Copyright 2016 Tecnativa - Vicent Cubells # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). import logging from lxml import etree, html from odoo import api, models _logger = logging.getLogger(__name__) class IrFieldsConverter(models.A...
brain-tec/server-tools
html_text/models/ir_fields_converter.py
Python
agpl-3.0
2,350
# Copyright (C) 2007, Red Hat, Inc. # # This library 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 (at your option) any later version. # # This library is distrib...
quozl/sugar-toolkit-gtk3
examples/ticket2855.py
Python
lgpl-2.1
1,719
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. # Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. # # This file may be distributed and/or modified under the terms of # the GNU Lesser General Pub...
flumotion-mirror/flumotion
flumotion/worker/checks/gst010.py
Python
lgpl-2.1
8,378
############################################################################## # Copyright (c) 2013-2017, 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...
TheTimmy/spack
var/spack/repos/builtin/packages/libice/package.py
Python
lgpl-2.1
1,709
############################################################################## # Copyright (c) 2013-2017, 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...
TheTimmy/spack
var/spack/repos/builtin/packages/font-isas-misc/package.py
Python
lgpl-2.1
2,105
# 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...
jiahaoliang/group-based-policy
gbpservice/tests/contrib/nfp_service/reference_configurator/api/setup.py
Python
apache-2.0
1,008
# 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...
superstack/nova
nova/db/sqlalchemy/migration.py
Python
apache-2.0
3,168
# -*- coding: utf-8 -*- from __future__ import absolute_import # Generated by Django 1.9 on 2016-05-03 02:48 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('podcasts', '0014_auto_20160503_0247'), ] operations = [...
AlmostBetterNetwork/podmaster-host
podcasts/migrations/0015_auto_20160503_0248.py
Python
apache-2.0
667
# -*- coding: utf-8 -*- u"""Test auth.guest :copyright: Copyright (c) 2019 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function import pytest def test_happy_path(auth_fc): fc = auth_fc from pykern...
mkeilman/sirepo
tests/auth/guest1_test.py
Python
apache-2.0
1,794
#!/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...
falbassini/googleads-dfa-reporting-samples
python/v2.0/download_floodlight_tag.py
Python
apache-2.0
1,952
""" Platform for Ecobee Thermostats. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/climate.ecobee/ """ import logging import voluptuous as vol from homeassistant.components import ecobee from homeassistant.components.climate import ( DOMAIN, STATE...
PetePriority/home-assistant
homeassistant/components/ecobee/climate.py
Python
apache-2.0
16,743
# 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...
sarvex/tensorflow
tensorflow/python/keras/utils/vis_utils_test.py
Python
apache-2.0
3,671
""" pygments.lexers.stata ~~~~~~~~~~~~~~~~~~~~~ Lexer for Stata :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, default, include, words from pygments.token import Comment, Keyword, Name...
sonntagsgesicht/regtest
.aux/venv/lib/python3.9/site-packages/pygments/lexers/stata.py
Python
apache-2.0
6,414
# 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...
rh-s/heat
heat_integrationtests/scenario/test_ceilometer_alarm.py
Python
apache-2.0
2,412
from __future__ import (absolute_import, division, print_function, unicode_literals) import six from six.moves import xrange from nose.tools import assert_equal, assert_true from matplotlib.testing.decorators import image_comparison, cleanup from matplotlib.axes import Axes import matplotlib.p...
andyraib/data-storage
python_scripts/env/lib/python3.6/site-packages/matplotlib/tests/test_figure.py
Python
apache-2.0
6,508
#!/usr/bin/env python # -*- coding: utf-8 -*- import io import os import sys from setuptools import setup from setuptools import find_packages with io.open('README.md', 'rt', encoding='utf8') as f: README = f.read() if sys.argv[-1] == 'test': os.system('python -sm unittest discover tests "*_test.py"') ...
condad/google-objects
setup.py
Python
apache-2.0
1,680
"""OpenGLDemo.py -- A simple demo of using OpenGL with Cocoa To build the demo program, run this line in Terminal.app: $ python setup.py py2app -A This creates a directory "dist" containing OpenGLDemo.app. (The -A option causes the files to be symlinked to the .app bundle instead of copied. This means you don't ...
albertz/music-player
mac/pyobjc-framework-Cocoa/Examples/OpenGL/OpenGLDemo/OpenGLDemo.py
Python
bsd-2-clause
1,734
from PyQt4.QtCore import QSize from PyQt4.QtGui import QVBoxLayout # This is really really ugly, but the QDockWidget for some reason does not notice when # its child widget becomes smaller... # Therefore we manually set its minimum size when our own minimum size changes class MyVBoxLayout(QVBoxLayout): def __init...
bitmingw/FindYourSister
sloth/sloth/gui/utils.py
Python
bsd-2-clause
994
from Foundation import * from PyObjCTools.TestSupport import * class TestNSXMLNodeOptions (TestCase): def testConstants(self): self.assertEqual(NSXMLNodeOptionsNone, 0) self.assertEqual(NSXMLNodeIsCDATA, 1 << 0) self.assertEqual(NSXMLNodeExpandEmptyElement, 1 << 1) self.assertEqual(...
albertz/music-player
mac/pyobjc-framework-Cocoa/PyObjCTest/test_nsxmlnodeoptions.py
Python
bsd-2-clause
2,358
#!/usr/bin/env python import os.path as path import sys root=path.abspath(path.dirname(__file__)) sys.path.insert(0,root)
stiletto/bnw
bnw_shell.py
Python
bsd-2-clause
122
from __future__ import absolute_import from sentry.models import Activity from .mail import ActivityMailDebugView class DebugUnassignedEmailView(ActivityMailDebugView): def get_activity(self, request, event): return {"type": Activity.UNASSIGNED, "user": request.user}
mvaled/sentry
src/sentry/web/frontend/debug/debug_unassigned_email.py
Python
bsd-3-clause
284
# Django settings for celery_http_gateway project. DEBUG = True TEMPLATE_DEBUG = DEBUG CARROT_BACKEND = "amqp" CELERY_RESULT_BACKEND = "database" BROKER_HOST = "localhost" BROKER_VHOST = "/" BROKER_USER = "guest" BROKER_PASSWORD = "guest" ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS ...
frac/celery
examples/celery_http_gateway/settings.py
Python
bsd-3-clause
2,931
import logging logger = logging.getLogger(__name__) logger.warning('DEPRECATED: pyface.grid, use pyface.ui.wx.grid instead.') from pyface.ui.wx.grid.inverted_grid_model import *
geggo/pyface
pyface/grid/inverted_grid_model.py
Python
bsd-3-clause
180
# Copyright 2015 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 string import Template import optparse import os import sys try: grit_module_path = os.path.join( os.path.dirname(__file__), '..', '..', '..'...
CTSRD-SOAAP/chromium-42.0.2311.135
mojo/services/html_viewer/generate_blink_resource_map.py
Python
bsd-3-clause
4,259
'''This allows running a bit of code on couchdb docs. code should take a json python object, modify it and hand back to the code Not quite that slick yet, need way to pass in code or make this a decorator ''' import importlib from harvester.collection_registry_client import Collection from harvester.couchdb_init import...
ucldc/harvester
harvester/post_processing/run_transform_on_couchdb_docs.py
Python
bsd-3-clause
3,271
# -*- coding: utf-8 -*- import pytest import six from sqlalchemy_utils import Currency, i18n @pytest.fixture def set_get_locale(): i18n.get_locale = lambda: i18n.babel.Locale('en') @pytest.mark.skipif('i18n.babel is None') @pytest.mark.usefixtures('set_get_locale') class TestCurrency(object): def test_ini...
konstantinoskostis/sqlalchemy-utils
tests/primitives/test_currency.py
Python
bsd-3-clause
1,823
# Copyright 2020 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. """Various custom data types for use throughout the unexpected pass finder.""" from __future__ import print_function import collections import copy import f...
nwjs/chromium.src
testing/unexpected_passes_common/data_types.py
Python
bsd-3-clause
22,630
""" 42. Storing files according to a custom storage system ``FileField`` and its variations can take a ``storage`` argument to specify how and where files should be stored. """ import random import tempfile from django.db import models from django.core.files.base import ContentFile from django.core.files.storage imp...
skevy/django
tests/modeltests/files/models.py
Python
bsd-3-clause
1,085
#!/usr/bin/env python # Copyright 2021 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. # This is generated, do not edit. Update BuildConfigGenerator.groovy and # 3ppFetch.template instead. from __future__ import print_fun...
nwjs/chromium.src
third_party/android_deps/libs/com_google_firebase_firebase_messaging/3pp/fetch.py
Python
bsd-3-clause
1,389
from __future__ import absolute_import import numpy.linalg as npla from .numpy_wrapper import wrap_namespace, dot from . import numpy_wrapper as anp wrap_namespace(npla.__dict__, globals()) def atleast_2d_col(x): # Promotes a 1D array into a column rather than a row. return x if x.ndim > 1 else x[:,None] # S...
t1m0thy/autograd
autograd/numpy/linalg.py
Python
mit
1,757
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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, publ...
sidzan/netforce
netforce_stock/netforce_stock/models/barcode_issue_line.py
Python
mit
2,232
from txaws.server.method import Method from txaws.server.tests.fixtures import method @method class TestMethod(Method): pass
lud4ik/txAWS
txaws/server/tests/fixtures/importerror/amodule.py
Python
mit
131
import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc = DocumentManager.Instance.CurrentDBDocument faminstances = UnwrapElement(I...
andydandy74/ClockworkForDynamo
nodes/2.x/python/FamilyInstance.FlipFromToRoom.py
Python
mit
612
import sys from healthcareai.common.healthcareai_error import HealthcareAIError def validate_pyodbc_is_loaded(): """ Simple check that alerts user if they are do not have pyodbc installed, which is not a requirement. """ if 'pyodbc' not in sys.modules: raise HealthcareAIError('Using this function req...
HealthCatalystSLC/healthcareai-py
healthcareai/common/database_library_validators.py
Python
mit
626
# 2014-12-18 # build by qianqians # deletenonespacelstrip def deleteNoneSpacelstrip(str): while(str.lstrip('\n') is not str):str = str.lstrip('\n') while(str.lstrip('\t') is not str):str = str.lstrip('\t') while(str.lstrip('\0') is not str):str = str.lstrip('\0') while(str.lstrip('\n') is not str):str ...
yinchunlong/abelkhan-1
juggle/parser/deletenonespacelstrip.py
Python
mit
843
'''OpenGL extension ARB.fragment_program This module customises the behaviour of the OpenGL.raw.GL.ARB.fragment_program to provide a more Python-friendly API Overview (from the spec) Unextended OpenGL mandates a certain set of configurable per- fragment computations defining texture application, texture envir...
D4wN/brickv
src/build_data/windows/OpenGL/GL/ARB/fragment_program.py
Python
gpl-2.0
3,247
import base64 import json from pcs_test.tools.command_env.mock_node_communicator import ( place_multinode_call, ) class FilesShortcuts: def __init__(self, calls): self.__calls = calls def put_files( self, node_labels=None, pcmk_authkey=None, corosync_authkey=None,...
feist/pcs
pcs_test/tools/command_env/config_http_files.py
Python
gpl-2.0
4,688
# orm/exc.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """SQLAlchemy ORM exceptions.""" from .. import exc as sa_exc from .. import util NO_ST...
gltn/stdm
stdm/third_party/sqlalchemy/orm/exc.py
Python
gpl-2.0
6,616
# TODO: this must be a stub!
vg/netsukuku
pyntk/ntk/sim/network/route.py
Python
gpl-2.0
29
#!/usr/bin/python # -*- coding: utf-8 -*- ''' script.skin.helper.service Helper service and scripts for Kodi skins mainmodule.py All script methods provided by the addon ''' import xbmc import xbmcvfs import xbmcgui import xbmcaddon from skinsettings import SkinSettings from simplecache import SimpleC...
mrquim/mrquimrepo
script.skin.helper.service/resources/lib/main_module.py
Python
gpl-2.0
31,819
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
jonathon-love/snapcraft
snapcraft/tests/test_plugin_maven.py
Python
gpl-3.0
19,419
# # Contain unparsing procedures. # import sys #------------------------------------------- def unparseToC(vars, annot_body_code, indent, extra_indent): '''Unparse to C/C++ code''' if len(vars) == 0: return annot_body_code s = '\n' s += indent + '#pragma disjoint (' for i, v in enumerat...
tajkhan/pluto-pocc
annotations/module/align/unparser.py
Python
gpl-3.0
2,012
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
china-quant/backtrader
tests/test_ind_wmaenvelope.py
Python
gpl-3.0
1,720
""" Parses the results found for the ETW started on a machine, downloads the results and stops the ETW. All credit to pauldotcom- http://pauldotcom.com/2012/07/post-exploitation-recon-with-e.html Module built by @harmj0y """ import settings from lib import command_methods from lib import helpers from lib im...
Exploit-install/Veil-Pillage
modules/enumeration/host/etw_results.py
Python
gpl-3.0
3,006
# -*- encoding: utf-8 -*- ############################################################################## # # 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...
jorsea/odoomrp-wip
mrp_operations_extension/models/mrp_bom.py
Python
agpl-3.0
4,254
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Mesh.MeshWriter import MeshWriter from UM.Math.Vector import Vector from UM.Logger import Logger from UM.Math.Matrix import Matrix from UM.Application import Application import UM.Scene.SceneNode import Savitar ...
Curahelper/Cura
plugins/3MFWriter/ThreeMFWriter.py
Python
agpl-3.0
7,998
# run using env as parameter: python run_exporter.py cad id api_key import exporter #parse into data type files import dataset_export import update_datastore_content #enter key as an argument from sys import argv script, env, res_id, api_key = argv with open(env + '.csv', 'w') as f: csv_string = exporter.export('...
gjlawran/ckanext-bcgov
ckanext/bcgov/scripts/export/run_exporter.py
Python
agpl-3.0
518
############################################################################## # 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...
tmerrick1/spack
var/spack/repos/builtin/packages/cuda/package.py
Python
lgpl-2.1
3,901
#!/usr/bin/python from ming import * import sys srcdir=sys.argv[1] m = SWFMovie(); font = SWFFont(srcdir + "/../Media/test.ttf") text = SWFText(1) w = font.getStringWidth("The quick brown fox jumps over the lazy dog. 1234567890") text.setFont(font) text.setColor(0,0,0,255) text.setHeight(20) text.moveTo(w,0) text...
pombredanne/libming
test/Font/test03.py
Python
lgpl-2.1
384
"""Tests for certbot.plugins.disco.""" import unittest import mock import pkg_resources import zope.interface from certbot import errors from certbot import interfaces from certbot.plugins import standalone from certbot.plugins import webroot EP_SA = pkg_resources.EntryPoint( "sa", "certbot.plugins.standalone",...
wteiken/letsencrypt
certbot/plugins/disco_test.py
Python
apache-2.0
10,343
#!/usr/bin/env python #-*- coding:utf-8 -*- from poster.encode import multipart_encode from poster.streaminghttp import register_openers import urllib2,urllib,sys,time import cookielib,mechanize import re DEBUG =0 reload(sys) sys.setdefaultencoding('utf8') #@UndefinedVariable register_openers() headers = { ...
ptphp/PyLib
src/webpy1/webpy1.1/post/post_anju.py
Python
apache-2.0
4,425
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # 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...
stdweird/aquilon
lib/python2.6/aquilon/worker/commands/show_hostlink_hostlink.py
Python
apache-2.0
951
# # 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 # ...
cwolferh/heat-scratch
heat/db/sqlalchemy/migrate_repo/versions/071_stack_owner_id_index.py
Python
apache-2.0
897
"""Support for Axis camera streaming.""" from homeassistant.components.camera import SUPPORT_STREAM from homeassistant.components.mjpeg.camera import ( CONF_MJPEG_URL, CONF_STILL_IMAGE_URL, MjpegCamera, filter_urllib3_logging, ) from homeassistant.const import ( CONF_AUTHENTICATION, CONF_DEVICE...
leppa/home-assistant
homeassistant/components/axis/camera.py
Python
apache-2.0
3,117
# 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...
karllessard/tensorflow
tensorflow/python/keras/applications/efficientnet.py
Python
apache-2.0
24,166
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
idaholab/raven
tests/framework/fail_xml/calc.py
Python
apache-2.0
899
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
ging/horizon
horizon/test/tests/templatetags.py
Python
apache-2.0
5,342
"""Platform for retrieving meteorological data from Environment Canada.""" import datetime import re from env_canada import ECData # pylint: disable=import-error import voluptuous as vol from homeassistant.components.weather import ( ATTR_FORECAST_CONDITION, ATTR_FORECAST_PRECIPITATION_PROBABILITY, ATTR_...
sdague/home-assistant
homeassistant/components/environment_canada/weather.py
Python
apache-2.0
8,104
import json import logging import inspect from .decorators import pipeline_functions, register_pipeline from indra.statements import get_statement_by_name, Statement logger = logging.getLogger(__name__) class AssemblyPipeline(): """An assembly pipeline that runs the specified steps on a given set of statem...
johnbachman/indra
indra/pipeline/pipeline.py
Python
bsd-2-clause
16,636
#!/usr/bin/env python """ sha1Hash_test.py Unit tests for sha1.py """ from crypto.hash.sha1Hash import SHA1 import unittest import struct assert struct.calcsize('!IIIII') == 20, '5 integers should be 20 bytes' class SHA1_FIPS180_TestCases(unittest.TestCase): """ SHA-1 tests from FIPS180-1 Appendix A, B and ...
realms-team/basestation-fw
libs/smartmeshsdk-REL-1.3.0.1/external_libs/cryptopy/crypto/hash/sha1Hash_test.py
Python
bsd-3-clause
2,119
from datetime import datetime from django.contrib.contenttypes.models import ContentType from actstream.managers import ActionManager, stream class MyActionManager(ActionManager): @stream def testfoo(self, object, time=None): if time is None: time = datetime.now() return object....
WW-Digital/django-activity-stream
example_project/testapp/streams.py
Python
bsd-3-clause
444
from neo.io.basefromrawio import BaseFromRaw from neo.rawio.plexonrawio import PlexonRawIO class PlexonIO(PlexonRawIO, BaseFromRaw): """ Class for reading the old data format from Plexon acquisition system (.plx) Note that Plexon now use a new format PL2 which is NOT supported by this IO. Co...
samuelgarcia/python-neo
neo/io/plexonio.py
Python
bsd-3-clause
594
#!/usr/bin/env python ''' Copyright (c) 2013 Potential Ventures Ltd Copyright (c) 2013 SolarFlare Communications 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 ...
stuarthodgson/cocotb
cocotb/generators/packet.py
Python
bsd-3-clause
2,962
"""Add mod versioning Revision ID: 1d46e8d4483 Revises: 2650a2191fe Create Date: 2014-06-10 01:29:49.567535 """ # revision identifiers, used by Alembic. revision = '1d46e8d4483' down_revision = '2650a2191fe' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic -...
Kerbas-ad-astra/KerbalStuff
alembic/versions/1d46e8d4483_add_mod_versioning.py
Python
mit
786
import pyspeckit import os from pyspeckit.spectrum.models import nh2d import numpy as np import astropy.units as u if not os.path.exists('p-nh2d_spec.fits'): import astropy.utils.data as aud from astropy.io import fits f = aud.download_file('https://github.com/pyspeckit/pyspeckit-example-files/raw/master/...
jpinedaf/pyspeckit
examples/example_pNH2D.py
Python
mit
1,329
# Some useful functions to extract data out of emails # Copyright (C) 2002-2012 John Goerzen & contributors # # 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 Lic...
styk-tv/offlineimap
offlineimap/emailutil.py
Python
gpl-2.0
1,573
class BookmarkData: def __init__(self, _id, _title, _url, _parent, _type): self.mId = _id self.mTitle = _title self.mUrl = _url self.mParent = _parent self.mType = _type def dump(self, _intent=' '): print "%s-> %d, %s, %s, %d, %d" % (_intent, self.mId, self.mTitle, self.mUrl, self.mParent, self.mType...
popazerty/dvbapp2-gui
lib/python/Plugins/Extensions/IniHbbTV/bookmark.py
Python
gpl-2.0
8,456
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2015 CERN. # # Zenodo is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later v...
tiborsimko/zenodo
zenodo/modules/deposit/config.py
Python
gpl-2.0
1,816
# -*- coding: utf-8 -*- from .Base import Base from .misc import parse_name, safename class Crypter(Base): __name__ = "Crypter" __type__ = "crypter" __version__ = "0.20" __status__ = "stable" __pattern__ = r'^unmatchable$' __config__ = [("activated", "bool", "Activated", True), ...
Arno-Nymous/pyload
module/plugins/internal/Crypter.py
Python
gpl-3.0
3,435
# (c) 2015, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
datsfosure/ansible
lib/ansible/plugins/action/template.py
Python
gpl-3.0
8,281
############################################################################## # 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...
krafczyk/spack
var/spack/repos/builtin/packages/xgc/package.py
Python
lgpl-2.1
1,806
#!/usr/bin/env python # # This file is part of Scalable COncurrent Operations in Python (SCOOP). # # SCOOP 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 3 of # the Licens...
IGITUGraz/scoop
test/tests.py
Python
lgpl-3.0
21,163
from typing import Any from django.db import connection from zerver.lib.management import ZulipBaseCommand def create_indexes() -> None: # Creating concurrent indexes is kind of a pain with current versions # of Django/postgres, because you will get this error with seemingly # reasonable code: # ...
brainwane/zulip
zerver/management/commands/create_large_indexes.py
Python
apache-2.0
3,096
# Copyright (c) 2010-2012 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-2.0 # # Unless required by applicable law or agree...
larsbutler/swift
swift/container/replicator.py
Python
apache-2.0
12,083
# Copyright 2016 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RyanWolfe/cloud-custodian
c7n/resources/apigw.py
Python
apache-2.0
781
# Copyright (c) 2018 PaddlePaddle 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 app...
Canpio/Paddle
python/paddle/fluid/tests/unittests/test_smooth_l1_loss_op.py
Python
apache-2.0
3,483
# 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...
hfp/tensorflow-xsmm
tensorflow/python/grappler/layout_optimizer_test.py
Python
apache-2.0
58,406
import os from unittest import TestCase from mock import patch from os.path import exists import shutil from carbon.tests.util import TestSettings from carbon.database import WhisperDatabase, CeresDatabase class WhisperDatabaseTest(TestCase): def setUp(self): self._sep_patch = patch.object(os.path, 'sep...
deniszh/carbon
lib/carbon/tests/test_database.py
Python
apache-2.0
6,229
# 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...
yanheven/glance
glance/image_cache/client.py
Python
apache-2.0
4,184
# flake8: noqa ############################################################################### # Compat file to import the correct modules for each platform and python # version. # # author: Thomas Moreau and Olivier grisel # import sys if sys.version_info[:2] >= (3, 3): import queue else: import Queue as queu...
vortex-ape/scikit-learn
sklearn/externals/joblib/externals/loky/backend/compat.py
Python
bsd-3-clause
635
# Copyright 2015 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. import unittest import webapp2 import webtest from google.appengine.ext import ndb from dashboard import group_report from dashboard import test_owner fro...
modulexcite/catapult
dashboard/dashboard/group_report_test.py
Python
bsd-3-clause
6,327
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..model import Level1Design def test_Level1Design_inputs(): input_map = dict(bases=dict(mandatory=True, ), contrasts=dict(), ignore_exception=dict(nohash=True, usedefault=True, ), interscan_i...
mick-d/nipype
nipype/interfaces/fsl/tests/test_auto_Level1Design.py
Python
bsd-3-clause
1,023
""" sentry.client.celery.tasks ~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from celery.decorators import task from sentry.client.base import SentryClient from sentry.client.celery import conf @task(routing_key=conf...
dcramer/sentry-old
sentry/client/celery/tasks.py
Python
bsd-3-clause
396