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 # -------------------------------------------------------------------------- # 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 ...
v-iam/azure-sdk-for-python
azure-mgmt-redis/azure/mgmt/redis/models/redis_access_keys.py
Python
mit
1,325
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from os.path import abspath LOADER = "thumbor.loaders.file_loader" F...
gi11es/thumbor
tests/fixtures/max_age_conf.py
Python
mit
455
#!/usr/bin/python __author__ = "raphtee@google.com (Travis Miller)" import mock, mock_demo_MUT class MyError(Exception): pass class A(object): var = 8 def __init__(self): self.x = 0 def method1(self): self.x += 1 return self.x def method2(self, y): return y * ...
wuzhy/autotest
client/common_lib/test_utils/mock_demo.py
Python
gpl-2.0
3,145
#!/usr/bin/python # # Copyright (C) 2011 Google 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 2 of the License, or # (at your option) any later version. # # This program...
kawamuray/ganeti
test/py/ganeti.utils.retry_unittest.py
Python
gpl-2.0
7,310
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
hajjboy95/crazyflie-clients-python
lib/cflib/crazyflie/mem.py
Python
gpl-2.0
30,173
# PyDia Code Generation from UML Diagram # Copyright (c) 2005 Hans Breuer <hans@breuer.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 Foundation; either version 2 of the License, or # (at y...
montsuqi/monpe
plug-ins/python/codegen.py
Python
gpl-2.0
17,391
'''OpenGL extension EXT.vertex_weighting This module customises the behaviour of the OpenGL.raw.GL.EXT.vertex_weighting to provide a more Python-friendly API Overview (from the spec) The intent of this extension is to provide a means for blending geometry based on two slightly differing modelview matrices. The...
D4wN/brickv
src/build_data/windows/OpenGL/GL/EXT/vertex_weighting.py
Python
gpl-2.0
1,493
### Author: Dag Wieers <dag$wieers,com> global mysql_options mysql_options = os.getenv('DSTAT_MYSQL') class dstat_plugin(dstat): def __init__(self): self.name = 'innodb ops' self.nick = ('ins', 'upd', 'del', 'rea') self.vars = ('inserted', 'updated', 'deleted', 'read') self.type = ...
nckx/dstat
plugins/dstat_innodb_ops.py
Python
gpl-2.0
1,728
# # The abstract class for annotation module. # class Module: def __init__(self): '''To instantiate an annotation module''' pass def transform(self, leader_info, annot_body_code, trailer_code, lang): ''' The transformation procedure that is used to transform the annotated c...
tajkhan/pluto-pocc
annotations/module/module.py
Python
gpl-3.0
1,420
#! /usr/bin/env python import sys from aubio import pvoc, source from numpy import zeros, hstack def get_waveform_plot(filename, samplerate = 0, block_size = 4096, ax = None): import matplotlib.pyplot as plt if not ax: fig = plt.figure() ax = fig.add_subplot(111) hop_s = block_size al...
owenwuef/aubio
python/demos/demo_waveform_plot.py
Python
gpl-3.0
2,074
import unittest import warnings import sys from test import test_support class TestSpecifics(unittest.TestCase): def test_debug_assignment(self): # catch assignments to __debug__ self.assertRaises(SyntaxError, compile, '__debug__ = 1', '?', 'single') import __builtin__ prev = __bui...
mancoast/CPythonPyc_test
cpython/252_test_compile.py
Python
gpl-3.0
14,209
"""Python script to trigger a dump on a MUCK and wait for it. Uses pyfuzzball repo here: https://github.com/tanabi/pyfuzzball Change the password, please :) Returns status code 0 on success, or 1 on failure. Failure will only be if there happens to be another dump triggered at the exact moment you're triggering you...
revarbat/fuzzball
scripts/trigger-dump.py
Python
gpl-3.0
1,212
from __future__ import print_function import os, sys, json, json5, re import collections script_directory = os.path.dirname(os.path.abspath(__file__)) template_directory = os.path.abspath( os.path.join(script_directory, 'template')) test_root_directory = os.path.abspath( os.path.join(script_directory, '..', '...
asajeffrey/servo
tests/wpt/web-platform-tests/common/security-features/tools/util.py
Python
mpl-2.0
7,698
# -*- coding: utf-8 -*- ############################################################################## # # Copyright 2015 Vauxoo # Author: Osval Reyes, Yanina Aular # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
Endika/rma
crm_rma_lot_mass_return/models/crm_claim.py
Python
agpl-3.0
2,135
import factory from student.tests.factories import UserFactory from survey.models import SurveyAnswer, SurveyForm class SurveyFormFactory(factory.DjangoModelFactory): class Meta(object): model = SurveyForm name = 'Test Survey Form' form = '<form>First name:<input type="text" name="firstname"/></...
edx-solutions/edx-platform
lms/djangoapps/survey/tests/factories.py
Python
agpl-3.0
530
# -*- coding: utf-8 -*- #*************************************************************************** #* * #* Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * #* ...
timthelion/FreeCAD
src/Mod/Path/PathScripts/PathCompoundExtended.py
Python
lgpl-2.1
5,730
# (c) Copyright 2014 Brocade Communications Systems Inc. # All Rights Reserved. # # Copyright 2014 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 # # ...
e0ne/cinder
cinder/tests/zonemanager/test_brcd_fc_san_lookup_service.py
Python
apache-2.0
6,398
# 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...
titusfortner/selenium
py/test/selenium/webdriver/common/network.py
Python
apache-2.0
1,977
# Copyright 2013 OpenStack Foundation # Copyright 2013 Rackspace Hosting # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 co...
CMSS-BCRDB/RDS
trove/tests/unittests/common/test_remote.py
Python
apache-2.0
26,195
# Copyright 2016 Intel Corporation # Copyright 2014 International Business Machines Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # htt...
SauloAislan/ironic
ironic/conf/console.py
Python
apache-2.0
2,354
# # 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 us...
spark0001/spark2.1.1
python/pyspark/ml/clustering.py
Python
apache-2.0
41,639
""" ASV benchmarks for detect clear sky function. """ import pandas as pd from pvlib import clearsky, solarposition import numpy as np class DetectClear: params = [1, 10, 100] # number of days param_names = ['ndays'] def setup(self, ndays): self.times = pd.date_range(start='20180601', freq='1mi...
mikofski/pvlib-python
benchmarks/benchmarks/detect_clearsky.py
Python
bsd-3-clause
1,151
""" Cart-pole balancing with continuous / Kernelized iFDD """ from rlpy.Domains import InfCartPoleBalance from rlpy.Agents import SARSA, Q_LEARNING from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp from rlpy.Represent...
imanolarrieta/RL
examples/cartpole2d/kifdd_triangle.py
Python
bsd-3-clause
2,580
from __future__ import print_function from __future__ import absolute_import import numpy as nm import sys from six.moves import range sys.path.append('.') from sfepy.base.base import output, assert_ from sfepy.base.ioutils import ensure_path from sfepy.linalg import cycle from sfepy.discrete.fem.mesh import Mesh from...
vlukes/sfepy
sfepy/mesh/mesh_generators.py
Python
bsd-3-clause
27,209
from __future__ import division, print_function def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('fft', parent_package, top_path) config.add_data_dir('tests') # Configure pocketfft_internal config.add_extension('_pocke...
MSeifert04/numpy
numpy/fft/setup.py
Python
bsd-3-clause
542
import pytest import numpy as np from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_false from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_greater from sklearn.utils.testing import assert_array_almo...
vortex-ape/scikit-learn
sklearn/feature_selection/tests/test_from_model.py
Python
bsd-3-clause
13,321
import warnings from django.template import TemplateSyntaxError from django.test import ignore_warnings, SimpleTestCase from django.test.utils import reset_warning_registry from django.utils.deprecation import RemovedInDjango20Warning from ..utils import setup, TestObj class IfTagTests(SimpleTestCase): @setup(...
Sonicbids/django
tests/template_tests/syntax_tests/test_if.py
Python
bsd-3-clause
25,371
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'voicex_dev', # Or path to database file if using sqlite3. 'USER': 'postgres', # Not used with sqlite3...
imclab/voicex
http_handler/rename_to_local_settings.py
Python
mit
2,387
from django.conf.urls.defaults import * urlpatterns = patterns('', url(r'^login/$', 'authsub.views.login'), )
pombreda/django-hotclub
apps/local_apps/authsub/urls.py
Python
mit
114
# -*- coding:utf-8 -*- """ /*************************************************************************** Plugin Installer module ------------------- Date : May 2013 Copyright : (C) 2013 by Borys Jurgiel Email :...
DelazJ/QGIS
python/pyplugin_installer/installer.py
Python
gpl-2.0
35,174
from django.conf.urls import patterns, url from .views import ContactFormView, ContactCompleted form_urls = patterns('', url('^$', ContactFormView.as_view(), name='form'), ) success_urls = patterns('', url('^success/$', ContactCompleted.as_view(), name='completed'), ) urlpatterns = form_urls + success_urls...
596acres/django-livinglots-template
project_name/contact/urls.py
Python
gpl-3.0
321
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Mark Theunissen <mark.theunissen@gmail.com> # Sponsored by Four Kitchens http://fourkitchens.com. # 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 __metacl...
valentin-krasontovitsch/ansible
lib/ansible/modules/database/mysql/mysql_db.py
Python
gpl-3.0
15,512
# coding=utf-8 from __future__ import absolute_import, unicode_literals # noqa import os import numpy as np import oslotest.base import lda import lda.utils class TestLDANewsReuters(oslotest.base.BaseTestCase): @classmethod def setUpClass(cls): test_dir = os.path.dirname(__file__) reuters_...
ariddell/lda-debian
lda/tests/test_lda_reuters.py
Python
mpl-2.0
3,924
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Nicolas Duhamel # # This file is part of weboob. # # weboob 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 yo...
sputnick-dev/weboob
modules/orange/pages/login.py
Python
agpl-3.0
2,090
from django.conf import settings # Dashboard JET_INDEX_DASHBOARD = getattr(settings, 'JET_INDEX_DASHBOARD', 'jet.dashboard.dashboard.DefaultIndexDashboard') JET_APP_INDEX_DASHBOARD = getattr(settings, 'JET_APP_INDEX_DASHBOARD', 'jet.dashboard.dashboard.DefaultAppIndexDashboard')
pombredanne/django-jet
jet/dashboard/settings.py
Python
agpl-3.0
280
# -*- coding: utf-8 -*- from odoo import models, fields, api from math import fabs import calendar class BalanceSheet(models.Model): """资产负债表模板 模板用来定义最终输出的 资产负债表的格式, 每行的 科目的顺序 科目的大分类的所属的子科目的顺序 -- 本模板适合中国会计使用. """ _name = "balance.sheet" _order = "sequence,id" _description = u'资产负债表模...
floraXiao/gooderp_addons
finance/models/balance_sheet.py
Python
agpl-3.0
13,962
# -*- coding: UTF-8 -*- import time from odoorpc.tests import LoginTestCase from odoorpc import error from odoorpc.models import Model from odoorpc.env import Environment class TestModel(LoginTestCase): def setUp(self): LoginTestCase.setUp(self) self.partner_obj = self.odoo.env['res.partner'] ...
Danisan/odoorpc
odoorpc/tests/test_model.py
Python
lgpl-3.0
5,538
# 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 # distributed under t...
hughsaunders/keystone
keystone/contrib/revoke/core.py
Python
apache-2.0
9,549
"""Support for WUnderground weather service.""" import asyncio from datetime import timedelta import logging import re import aiohttp import async_timeout import voluptuous as vol from homeassistant.helpers.typing import HomeAssistantType, ConfigType from homeassistant.components import sensor from homeassistant.comp...
auduny/home-assistant
homeassistant/components/wunderground/sensor.py
Python
apache-2.0
36,257
#! /usr/bin/env python # -*- coding: utf-8 -*- ''' Copyright (C) 2012 Diego Torres Milano Created on Feb 5, 2012 @author: diego ''' import sys import os import time import StringIO import unittest import exceptions import platform # PyDev sets PYTHONPATH, use it try: for p in os.environ['PYTHONPATH'].split(':')...
venomJ/AndroidViewClient
tests/com/dtmilano/android/viewclienttests.py
Python
apache-2.0
44,976
""" mbed SDK Copyright (c) 2011-2017 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 writin...
CalSol/mbed
tools/export/sw4stm32/__init__.py
Python
apache-2.0
17,980
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
mikalstill/nova
nova/virt/hyperv/imagecache.py
Python
apache-2.0
10,063
#!/usr/bin/env python # Copyright 2012 Michael Still and Canonical Inc # Copyright 2014 SoftLayer Technologies, 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 Lice...
yanheven/glance
glance/cmd/replicator.py
Python
apache-2.0
25,493
# encoding: utf-8 from __future__ import unicode_literals import os import datetime from nose.tools import * # noqa from framework.auth.core import Auth from website.addons.osfstorage.tests.utils import ( StorageTestCase, Delta, AssertDeltas, recursively_create_file, ) from website.addons.osfstorage.tests im...
ckc6cz/osf.io
website/addons/osfstorage/tests/test_views.py
Python
apache-2.0
19,055
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
annarev/tensorflow
tensorflow/python/ops/histogram_ops_test.py
Python
apache-2.0
6,797
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import Release, TagValue @register(Release) class ReleaseSerializer(Serializer): def get_attrs(self, item_list, user): tags = { tk.value: tk for tk in TagValue.objects...
wong2/sentry
src/sentry/api/serializers/models/release.py
Python
bsd-3-clause
1,382
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Provides implementations of basic image processing functions. Implements basic image processing functions, such as reading/writing images, cropping, find...
guorendong/iridium-browser-ubuntu
tools/telemetry/telemetry/image_processing/image_util.py
Python
bsd-3-clause
3,897
from __future__ import unicode_literals from django.db import models from django.db.models import Max, F from django.utils.translation import pgettext_lazy from versatileimagefield.fields import VersatileImageField, PPOIField from .base import Product class ImageManager(models.Manager): def first(self): ...
rodrigozn/CW-Shop
saleor/product/models/images.py
Python
bsd-3-clause
1,791
#!/usr/bin/env python from django.conf import settings from django.test import TransactionTestCase from django.test.client import Client from django.utils import simplejson as json from panda.models import SearchSubscription, UserProxy from panda.tests import utils class TestAPISearchSubscriptions(TransactionTestCa...
ibrahimcesar/panda
panda/tests/test_api_search_subscriptions.py
Python
mit
5,736
from __future__ import print_function import os import sys import subprocess import traceback import glob print('Using python: {prefix}'.format(prefix=sys.prefix)) repo_tag = os.environ.get('APPVEYOR_REPO_TAG', 'false') tag_name = os.environ.get('APPVEYOR_REPO_TAG_NAME', '') token = os.environ.get('PYPI_PASS', 'NOT...
SiccarPoint/landlab
.ci/appveyor/pypi_upload.py
Python
mit
756
# test builtin print function, using file= argument import sys try: sys.stdout except AttributeError: print("SKIP") raise SystemExit print(file=sys.stdout) print("test", file=sys.stdout) try: print(file=1) except (AttributeError, OSError): # CPython and uPy differ in error message print("Error"...
tobbad/micropython
tests/io/builtin_print_file.py
Python
mit
322
"""C and C++ analysis using a clang compiler plugin This plugin handles structural analysis of C++ code by building the project under clang while interposing a custom compiler plugin that dumps out structural data to CSV files during compilation. This is then pulled into elasticsearch as a post-processing phase. """ ...
pombredanne/dxr
dxr/plugins/clang/__init__.py
Python
mit
765
"""If you have Ned Batchelder's coverage_ module installed, you may activate a coverage report with the ``--with-coverage`` switch or NOSE_WITH_COVERAGE environment variable. The coverage report will cover any python source module imported after the start of the test run, excluding modules that match testMatch. If you ...
Reagankm/KnockKnock
venv/lib/python3.4/site-packages/nose/plugins/cover.py
Python
gpl-2.0
11,677
# The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/license/. # # Software di...
sulaweyo/torrentflux-b4rt-php7
html/bin/clients/mainline/BitTorrent/PiecePicker.py
Python
gpl-2.0
8,356
'''Parser for gromacs edr''' from .base import IOHandler import numpy as np import xdrlib import difflib class QuantityNotAvailable(Exception): pass class EdrIO(IOHandler): '''EDR files store per-frame information for gromacs trajectories. Examples of properties obtainable from EDR files are:: - temp...
chemlab/chemlab
chemlab/io/handlers/edr.py
Python
gpl-3.0
5,949
def hide_traj_controls(): viewer.traj_controls.hide() def show_traj_controls(): viewer.traj_controls.show()
chemlab/chemlab
chemlab/mviewer/api/ui.py
Python
gpl-3.0
120
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Replica.replication_ip' db.add_column(u'smart_manager_rep...
schakrava/rockstor-core
src/rockstor/smart_manager/south_migrations/0007_auto__add_field_replica_replication_ip.py
Python
gpl-3.0
22,078
from datetime import datetime, timedelta from webdriver.transport import Response from tests.support.asserts import assert_error, assert_success from tests.support.helpers import clear_all_cookies def add_cookie(session, cookie): return session.transport.send( "POST", "session/{session_id}/cookie".format...
peterjoel/servo
tests/wpt/web-platform-tests/webdriver/tests/add_cookie/add.py
Python
mpl-2.0
5,180
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010-2013 Elico Corp. All Rights Reserved. # Author: Yannick Gouin <yannick.gouin@elico-corp.com> # # This program is free software: you c...
iw3hxn/LibrERP
office_automation/gap_analysis/wizard/__init__.py
Python
agpl-3.0
1,141
import sys import os import json import hashlib import logging import collections import urlparse import re import copy import pprint from StringIO import StringIO from . import validate from .aslist import aslist from .flatten import flatten import requests from cachecontrol.wrapper import CacheControl from cachecon...
ohsu-computational-biology/common-workflow-language
v1.1.0-dev1/salad/schema_salad/ref_resolver.py
Python
apache-2.0
32,490
__version__ = '0.3.5'
texastribune/the-dp
tx_highered/__init__.py
Python
apache-2.0
22
# Copyright 2015: Mirantis 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...
vishnu-kumar/PeformanceFramework
tests/unit/task/test_atomic.py
Python
apache-2.0
4,257
#Importing libraries import discord from discord.ext import commands from sys import argv class Load: """ Load commands. """ def __init__(self, bot): self.bot = bot print('Addon "{}" loaded'.format(self.__class__.__name__)) # Load test @commands.has_permissions(ban_members=True...
helpyellowsn0w/Kurisu
addons/load.py
Python
apache-2.0
1,977
# 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...
tensorflow/tensorflow
tensorflow/python/eager/function_defun_collection_test.py
Python
apache-2.0
3,653
# # The Python Imaging Library. # $Id$ # # image palette object # # History: # 1996-03-11 fl Rewritten. # 1997-01-03 fl Up and running. # 1997-08-23 fl Added load hack # 2001-04-16 fl Fixed randint shadow bug in random() # # Copyright (c) 1997-2001 by Secret Labs AB # Copyright (c) 1996-1997 by Fredrik Lundh # ...
Amechi101/concepteur-market-app
venv/lib/python2.7/site-packages/PIL/ImagePalette.py
Python
mit
5,792
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-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...
elopezga/ErrorRate
ivi/tektronix/tektronixAWG2005.py
Python
mit
1,490
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Stderr built-in backend. """ __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi"...
marioli/qemu
scripts/tracetool/backend/log.py
Python
gpl-2.0
1,521
import docker import yaml import sys yamlFile = sys.argv[1] client = docker.from_env() images={} result = open('test_result.txt', 'w') ## Build Image ## def build_image(ipath, itag): try: print "Building " + image client.images.build(pull=True, path=ipath, tag=itag, rm=True, stream=True) except dock...
fqez/JdeRobot
test/packages/run_test.py
Python
gpl-3.0
1,058
import numpy as np import pele.potentials.lj as lj #import potentials.ljcpp as lj from pele.mc import MonteCarlo from pele.takestep import RandomDisplacement, AdaptiveStepsize from ptmc import PTMC, getTemps import copy from pele.utils.histogram import EnergyHistogram, PrintHistogram from pele.optimize import mylbfgs ...
smcantab/pele
playground/parallel_tempering/run_ptmc.py
Python
gpl-3.0
4,924
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com> # 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_...
kustodian/ansible
lib/ansible/modules/network/aci/aci_fabric_node.py
Python
gpl-3.0
7,804
# Part of Odoo. See LICENSE file for full copyright and licensing details. # -*- coding: utf-8 -*- from odoo.tests import tagged from odoo.tests.common import TransactionCase @tagged('post_install', '-at_install') class TestWebsiteEvent(TransactionCase): def test_event_app_name(self): website0 = self.en...
jeremiahyan/odoo
addons/website_event_track/tests/test_website_event.py
Python
gpl-3.0
818
from collections import defaultdict import mock from searx.engines import searchcode_code from searx.testing import SearxTestCase class TestSearchcodeCodeEngine(SearxTestCase): def test_request(self): query = 'test_query' dicto = defaultdict(dict) dicto['pageno'] = 0 params = sear...
misnyo/searx
tests/unit/engines/test_searchcode_code.py
Python
agpl-3.0
2,524
# # 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/hooks/gcp_video_intelligence_hook.py
Python
apache-2.0
1,179
#!/usr/bin/env python from translate.storage import txt from translate.storage import test_monolingual from translate.misc import wStringIO class TestTxtUnit(test_monolingual.TestMonolingualUnit): UnitClass = txt.TxtUnit class TestTxtFile(test_monolingual.TestMonolingualStore): StoreClass = txt.TxtFile ...
dbbhattacharya/kitsune
vendor/packages/translate-toolkit/translate/storage/test_txt.py
Python
bsd-3-clause
1,437
import numpy as np import pytest from pandas import ( DataFrame, Index, MultiIndex, ) import pandas._testing as tm class TestDataFrameRenameAxis: def test_rename_axis_inplace(self, float_frame): # GH#15704 expected = float_frame.rename_axis("foo") result = float_frame.copy() ...
rs2/pandas
pandas/tests/frame/methods/test_rename_axis.py
Python
bsd-3-clause
4,091
# -*- coding: utf-8 -*- """ XForms - Controllers """ module = request.controller # ----------------------------------------------------------------------------- def create(): """ Given a Table, returns an XForms to create an instance: http://code.javarosa.org/wiki/buildxforms http://w...
madhurauti/Map-Polygon
controllers/xforms.py
Python
mit
14,374
""" homeassistant.components.keyboard ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Provides functionality to emulate keyboard presses on host machine. """ import logging from homeassistant.const import ( SERVICE_VOLUME_UP, SERVICE_VOLUME_DOWN, SERVICE_VOLUME_MUTE, SERVICE_MEDIA_NEXT_TRACK, SERVICE_MEDIA_PREVIOUS_TRACK, ...
vitorespindola/home-assistant
homeassistant/components/keyboard.py
Python
mit
2,654
import unittest from rope.base.oi import objectdb, memorydb from ropetest import testutils def _do_for_all_dbs(function): def called(self): for db in self.dbs: function(self, db) return called class _MockValidation(object): def is_value_valid(self, value): return value != -...
timwee/emacs-starter-kit-mr-flip-forked
vendor/rope/ropetest/objectdbtest.py
Python
gpl-3.0
5,054
"""This file is part of DING0, the DIstribution Network GeneratOr. DING0 is a tool to generate synthetic medium and low voltage power distribution grids based on open data. It is developed in the project open_eGo: https://openegoproject.wordpress.com DING0 lives at github: https://github.com/openego/ding0/ The docume...
openego/dingo
ding0/grid/mv_grid/util/__init__.py
Python
agpl-3.0
612
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.core.backends import codepen_credentials_backend from telemetry.core.backends import form_based_credentials_backend_unittest_base class TestC...
guorendong/iridium-browser-ubuntu
tools/telemetry/telemetry/core/backends/codepen_credentials_backend_unittest.py
Python
bsd-3-clause
804
import unittest from google.appengine.api import datastore from google.appengine.api import datastore_errors from google.appengine.ext.db import non_transactional from django.db import models from django.http import HttpRequest from django.core.signals import request_finished, request_started from django.core.cache i...
wangjun/djangae
djangae/tests/test_caching.py
Python
bsd-3-clause
25,805
#!/bin/env python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) gluon.rewrite parses incoming URLs and formats outgoing URLs for gluon.html.URL. In addition, it rewrite...
manuelep/openshift_v3_test
wsgi/web2py/gluon/rewrite.py
Python
mit
52,811
from cms.utils.compat.type_checks import string_types from cms.utils.compat.string_io import StringIO from django.conf import settings from django.core.handlers.wsgi import WSGIRequest from django.http import SimpleCookie from django.test.client import (FakePayload, MULTIPART_CONTENT, encode_multipart, BOUNDARY, C...
SurfasJones/djcmsrc3
venv/lib/python2.7/site-packages/cms/test_utils/util/request_factory.py
Python
mit
5,923
'''tzinfo timezone information for Europe/Tirane.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Tirane(DstTzInfo): '''Europe/Tirane timezone definition. See datetime.tzinfo for details''' zone = 'Europe/Tirane' _ut...
newvem/pytz
pytz/zoneinfo/Europe/Tirane.py
Python
mit
5,688
#!/usr/bin/env python # -*- coding: utf-8 -*- # # lv2docgen, a documentation generator for LV2 plugins # Copyright 2012 David Robillard <d@drobilla.net> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notic...
moddevices/mod-sdk
lv2specgen/lv2docgen.py
Python
gpl-3.0
4,319
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
crmccreary/openerp_server
openerp/addons/hr_timesheet_sheet/report/timesheet_report.py
Python
agpl-3.0
6,314
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
Johnzero/erp
openerp/addons/account_sequence/account_sequence_installer.py
Python
agpl-3.0
3,925
# Natural Language Toolkit: Parser API # # Copyright (C) 2001-2008 University of Pennsylvania # Author: Steven Bird <sb@csse.unimelb.edu.au> # Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT # import itertools from nltk.internals import depre...
hectormartinez/rougexstem
taln2016/icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/parse/api.py
Python
apache-2.0
6,878
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
laosiaudi/tensorflow
tensorflow/python/framework/graph_util_test.py
Python
apache-2.0
12,229
# Copyright 2017 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. """Check to see if the various BadMessage enums in histograms.xml need to be updated. This can be called from a chromium PRESUBMIT.py to ensure updates to ba...
scheib/chromium
tools/metrics/histograms/presubmit_bad_message_reasons.py
Python
bsd-3-clause
1,619
""" homeassistant.components.sensor.vera ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support for Vera sensors. Configuration: To use the Vera sensors you will need to add something like the following to your config/configuration.yaml sensor: platform: vera vera_controller_url: http://YOUR_VERA_IP:3480/ device_...
michaelarnauts/home-assistant
homeassistant/components/sensor/vera.py
Python
mit
6,024
# # 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...
ogajduse/spacewalk
backend/server/rhnSession.py
Python
gpl-2.0
4,431
# -*- coding: utf-8 -*- """ Tests of the Capa XModule """ # pylint: disable=C0111 # pylint: disable=R0904 # pylint: disable=C0103 # pylint: disable=C0302 import datetime import json import random import os import textwrap import unittest from mock import Mock, patch import webob from webob.multidict import MultiDict ...
malishevg/edugraph
common/lib/xmodule/xmodule/tests/test_capa_module.py
Python
agpl-3.0
72,072
""" Schema differencing support. """ import logging import sqlalchemy from sqlalchemy.types import Float log = logging.getLogger(__name__) def getDiffOfModelAgainstDatabase(metadata, engine, excludeTables=None): """ Return differences of model against database. :return: object which will evaluate to...
davidvon/pipa-pay-server
site-packages/migrate/versioning/schemadiff.py
Python
apache-2.0
8,767
# Generated by Django 3.0.6 on 2020-05-26 09:29 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tests', '0050_customimagewithauthor_customrenditionwithauthor'), ] operations = [ migrations.AlterField( model_name='restaurantt...
zerolab/wagtail
wagtail/tests/testapp/migrations/0051_tag_verbose_name.py
Python
bsd-3-clause
646
"""Geometry classes and factories """ from .base import CAP_STYLE, JOIN_STYLE from .geo import box, shape, asShape, mapping from .point import Point, asPoint from .linestring import LineString, asLineString from .polygon import Polygon, asPolygon, LinearRing, asLinearRing from .multipoint import MultiPoint, asMultiPoi...
jdmcbr/Shapely
shapely/geometry/__init__.py
Python
bsd-3-clause
900
# Generated by Django 2.2 on 2019-04-26 15:48 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import taggit.managers import wagtail.core.models import wagtail.images.models import wagtail.search.index class Migration(migrations.Migration): dependencies ...
zerolab/wagtail
wagtail/tests/testapp/migrations/0050_customimagewithauthor_customrenditionwithauthor.py
Python
bsd-3-clause
3,649
#!/usr/bin/env python3 # 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. """Command-line tool for generating modularization stats.""" import argparse import json from typing import Dict, List import class_d...
nwjs/chromium.src
tools/android/dependency_analysis/modularization_stats.py
Python
bsd-3-clause
5,404
""" ================================ Recognizing hand-written digits ================================ This example shows how scikit-learn can be used to recognize images of hand-written digits, from 0-9. """ print(__doc__) # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # License: BSD 3 clause #...
glemaitre/scikit-learn
examples/classification/plot_digits_classification.py
Python
bsd-3-clause
3,787
""" Acceptance tests for Studio related to the acid xblock. """ from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc from common.test.acceptance.pages.common.auto_auth import AutoAuthPage from common.test.acceptance.pages.studio.overview import CourseOutlinePage from common.test.acceptanc...
fintech-circle/edx-platform
common/test/acceptance/tests/studio/test_studio_acid_xblock.py
Python
agpl-3.0
7,011