code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
# coding: utf-8 """ Test cases for GroupBy.plot """ import numpy as np import pandas.util._test_decorators as td from pandas import DataFrame, Series from pandas.tests.plotting.common import TestPlotBase import pandas.util.testing as tm @td.skip_if_no_mpl class TestDataFrameGroupByPlots(TestPlotBase): def te...
toobaz/pandas
pandas/tests/plotting/test_groupby.py
Python
bsd-3-clause
2,294
# encoding: utf-8 """ Enable pyglet to be used interacive by setting PyOS_InputHook. Authors ------- * Nicolas P. Rougier * Fernando Perez """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under t...
SlicerRt/SlicerDebuggingTools
PyDevRemoteDebug/ptvsd-4.1.3/ptvsd/_vendored/pydevd/pydev_ipython/inputhookpyglet.py
Python
bsd-3-clause
3,345
import numpy as np import pytest from pandas._libs.tslib import iNaT from pandas.core.dtypes.dtypes import PeriodDtype import pandas as pd from pandas.core.arrays import PeriodArray from pandas.tests.extension import base @pytest.fixture def dtype(): return PeriodDtype(freq='D') @pytest.fixture def data(dtyp...
GuessWhoSamFoo/pandas
pandas/tests/extension/test_period.py
Python
bsd-3-clause
4,336
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # 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. """ Builds applications in debug mode: - Copies the module directories into their destinations. - Copies app.h...
youtube/cobalt
third_party/devtools/scripts/build/build_debug_applications.py
Python
bsd-3-clause
2,246
import os try: from nltk.corpus import stopwords stopset = set(stopwords.words('english')) except ImportError: print("Cannot use dbpedia without 'pip install nltk'") try: import ujson as json except ImportError: import json def generate_testables(words, stopword_set, n_grams=4): grams = set(...
bgarrels/sky
sky/dbpedia.py
Python
bsd-3-clause
1,490
#!/usr/bin/env python # Created by Pearu Peterson, September 2002 """ Test functions for fftpack.basic module """ __usage__ = """ Build fftpack: python setup_fftpack.py build Run tests if scipy is installed: python -c 'import scipy;scipy.fftpack.test()' Run tests if fftpack is not installed: python tests/test_bas...
huard/scipy-work
scipy/fftpack/tests/test_basic.py
Python
bsd-3-clause
18,018
import os from setuptools import setup with open('asv_test_repo/build_time_env.py', 'w') as f: f.write("env = {{}}\n".format(repr(dict(os.environ)))) setup(name='asv_test_repo', version="{version}", packages=['asv_test_repo'], # The following forces setuptools to generate .egg-info directory, ...
qwhelan/asv
test/test_repo_template/setup.py
Python
bsd-3-clause
434
from __future__ import division from pyglet.gl import gl, glu class ModelView(object): ''' Manage modelview matrix, performing the MVC's 'view' parts of the 'camera' ''' def __init__(self, camera): self.camera = camera def set_identity(self): gl.glMatrixMode(gl.GL_MO...
tartley/pyweek11-cube
source/view/modelview.py
Python
bsd-3-clause
682
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # $Id: views.py 425 2009-07-14 03:43:01Z tobias $ # ---------------------------------------------------------------------------- # # Copyright (C) 2008-2009 Caktus Consulting Group, LLC # # This file is part of ...
Ksynko/django-crm
sample_project/external_apps/crm/views.py
Python
bsd-3-clause
23,073
# Copyright (c) 2006-2007 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
hoangt/gem5v
tests/configs/o3-timing-mp.py
Python
bsd-3-clause
2,805
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-10-23 19:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('workshops', '0118_auto_20160922_0009'), ] operations = [ migrations.AlterFie...
vahtras/amy
workshops/migrations/0119_auto_20161023_1413.py
Python
mit
1,244
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestTag(unittest.TestCase): pass
vjFaLk/frappe
frappe/desk/doctype/tag/test_tag.py
Python
mit
215
# coding: utf8 # ! /usr/env/python """profiler.py component to create profiles with user-defined endpoints.""" from collections import OrderedDict import numpy as np from matplotlib import cm, colors, pyplot as plt from landlab.components.profiler.base_profiler import _BaseProfiler class Profiler(_BaseProfiler): ...
landlab/landlab
landlab/components/profiler/profiler.py
Python
mit
13,854
# Under MIT License, see LICENSE.txt """ Implémente la logique et les services nécessaires pour communiquer avec le serveur de vision. """ from RULEngine.Communication.protobuf import messages_robocup_ssl_wrapper_pb2 as ssl_wrapper from RULEngine.Communication.util.protobuf_packet_receiver import ProtobufPacke...
MaximeGLegault/StrategyIA
RULEngine/Communication/receiver/vision_receiver.py
Python
mit
843
# Copyright (c) 2008, Aldo Cortesi. All rights reserved. # # 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,...
StephenBarnes/qtile
libqtile/window.py
Python
mit
42,566
#!/usr/bin/env python # -*- coding: utf-8 -*- #HW3 for EECS 598 Motion Planning import time import openravepy import userdefined as us import kdtree import transformationFunction as tf from random import randrange #### YOUR IMPORTS GO HERE #### handles = []; #### END OF YOUR IMPORTS #### if not __openravepy_buil...
willsirius/DualTreeRRTStartMotionPlanning
pythonVision2/HW3_testUpdateFunction.py
Python
mit
3,774
import unittest from os.path import join from unittest import mock from tests.recipes.recipe_lib_test import RecipeCtx class TestPandasRecipe(RecipeCtx, unittest.TestCase): """ TestCase for recipe :mod:`~pythonforandroid.recipes.pandas` """ recipe_name = "pandas" @mock.patch("pythonforandroid.r...
germn/python-for-android
tests/recipes/test_pandas.py
Python
mit
1,651
import theano from theano.gradient import DisconnectedType from theano.gof import Op, Apply, TopoOptimizer from theano import tensor import theano.sandbox.cuda as cuda from theano.tensor.opt import copy_stack_trace def get_diagonal_subtensor_view(x, i0, i1): """ Helper function for DiagonalSubtensor and IncDi...
marcsans/cnn-physics-perception
phy/lib/python2.7/site-packages/theano/tensor/nnet/conv3d2d.py
Python
mit
12,138
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from aleph.core import app from aleph.model import db config = context.config config.set_main_option('sqlalchemy.url', app.config['SQLALCHEMY_DATABASE_URI']) target_metadata = db.metadata def run_migrat...
Luthien123/aleph
aleph/migrate/env.py
Python
mit
1,083
# 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...
sjsucohort6/openstack
python/venv/lib/python2.7/site-packages/keystoneauth1/loading/base.py
Python
mit
3,953
import sys from twisted.python import log from twisted.internet import reactor from twisted.internet.protocol import ServerFactory, ClientFactory, Protocol class EchoServerProtocol(Protocol): def dataReceived(self, data): log.msg('Data received %s' % data) self.transport.write(b'Server push back: %...
sevaivanov/various
python/server/twisted/purely-twisted.py
Python
mit
887
"""SCons.Tool.applelink Tool-specific initialization for the Apple gnu-like linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby...
EmanueleCannizzaro/scons
src/engine/SCons/Tool/applelink.py
Python
mit
2,828
import numpy as np from milk.measures.nfoldcrossvalidation import nfoldcrossvalidation, foldgenerator # Regression test in 2011-01-31 def test_getfoldgenerator(): labels = np.array([ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7...
pombredanne/milk
milk/tests/test_nfoldcrossvalidation_regression.py
Python
mit
10,055
# coding: utf-8 from __future__ import print_function from quokka import create_celery_app celery = create_celery_app() @celery.task def comment_task(): print("Doing something async...")
felipevolpone/quokka
quokka/modules/comments/tasks.py
Python
mit
195
class Excel(object): def __init__(self, H, W): """ :type H: int :type W: str """ self.table = [[{'v': 0, 'sum': None} for _ in range(ord(W) - 64)] for __ in range(H)] def set(self, r, c, v): """ :type r: int :type c: str :type v: int ...
Mlieou/oj_solutions
leetcode/python/ex_631.py
Python
mit
1,437
from django.apps import AppConfig class TransactionsConfig(AppConfig): name = 'transactions'
adamcharnock/swiftwind
swiftwind/transactions/apps.py
Python
mit
99
#!/usr/bin/env python from six import StringIO import yaml from cliff.formatters import yaml_format import mock def test_yaml_format_one(): sf = yaml_format.YAMLFormatter() c = ('a', 'b', 'c', 'd') d = ('A', 'B', 'C', '"escape me"') expected = { 'a': 'A', 'b': 'B', 'c': 'C', ...
sjsucohort6/openstack
python/venv/lib/python2.7/site-packages/cliff/tests/test_formatters_yaml.py
Python
mit
1,048
from test_templatetags import *
acdha/django-google-analytics
google_analytics/tests/__init__.py
Python
mit
32
#!/usr/bin/env python import datetime import logging import os from urllib.parse import urljoin from utils import utils, inspector # http://www.usda.gov/oig/rptsaudits.htm archive = 1978 # options: # standard since/year options for a year range to fetch from. # # Notes for IG's web team: # - Some reports have li...
divergentdave/inspectors-general
inspectors/agriculture.py
Python
cc0-1.0
11,641
from __future__ import absolute_import, division, unicode_literals import unittest import mock from cola.models import selection class SelectionTestCase(unittest.TestCase): def test_union(self): t = mock.Mock() t.staged = ['a'] t.unmerged = ['a', 'b'] t.modified = ['b', 'a', 'c'...
javierrodriguezcuevas/git-cola
test/models_selection_test.py
Python
gpl-2.0
515
# python script to generate configoptions.cpp from config.xml # # Copyright (C) 1997-2013 by Dimitri van Heesch. # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby # granted. No representations are made about the suitabi...
basvodde/doxygen
src/configgen.py
Python
gpl-2.0
5,064
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
TonyThompson/fail2ban-patch
fail2ban/server/transmitter.py
Python
gpl-2.0
10,359
## # Copyright 2011-2017 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
damianam/easybuild-framework
easybuild/tools/repository/__init__.py
Python
gpl-2.0
1,270
""" session --- Reopen files when starting ====================================== """ from PyQt5.QtCore import QTimer import os.path from enki.core.core import core from enki.core.defines import CONFIG_DIR import enki.core.json_wrapper _AUTO_SAVE_INTERVAL_MS = 60 * 1000 def getSessionFilePath(): if core.comma...
bjones1/enki
enki/plugins/session.py
Python
gpl-2.0
4,134
import pytest @pytest.fixture(scope='module') def test_page(browser, datafile): test_page_html = datafile('elements.html').read() pytest.sel.get('data:text/html;base64,{}'.format(test_page_html.encode('base64'))) pytestmark = pytest.mark.usefixtures('test_page') def assert_len(locator, required_len): a...
lehinevych/cfme_tests
utils/tests/test_simple_locators.py
Python
gpl-2.0
1,500
# -*- coding: utf-8 -*- #------------------------------------------------------------ # TV Ultra 7K Regex de direct2watch # Version 0.1 (02.11.2014) #------------------------------------------------------------ # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Gracias a la librería plugintools de Jesús (www.m...
corvorepack/REPOIVAN
plugin.video.tv.ultra.7k/resources/regex/directwatch.py
Python
gpl-2.0
6,185
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 is distrib...
elfnor/sverchok
nodes/generator/image.py
Python
gpl-3.0
6,178
# # Copyright (C) 2019, 2020, 2021 Smithsonian Astrophysical Observatory # # # 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, or # (at your option) any late...
anetasie/sherpa
sherpa/sim/tests/test_asymmetric.py
Python
gpl-3.0
8,923
# vim: ts=4:sw=4:expandtab # -*- coding: UTF-8 -*- # BleachBit # Copyright (C) 2008-2015 Andrew Ziem # http://bleachbit.sourceforge.net # # 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...
uudiin/bleachbit
bleachbit/GuiPreferences.py
Python
gpl-3.0
18,737
from django.conf import settings from django.contrib.auth.models import UserManager from django.core.exceptions import ImproperlyConfigured from django.db import models from django.utils.importlib import import_module from django.utils.translation import ugettext_lazy as _ __all__ = ( 'get_user_document', ) MON...
LethusTI/supportcenter
vendor/mongoengine/mongoengine/django/mongo_auth/models.py
Python
gpl-3.0
3,378
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
t0mk/ansible
lib/ansible/modules/windows/win_stat.py
Python
gpl-3.0
7,000
import os import shutil usage = {} usage['import'] = """catmap import <mkm-file> Open a *.mkm project file and work with it interactively. """ def get_options(args=None, get_parser=False): import optparse import os from glob import glob import catmap parser = optparse.OptionParser( ...
charlietsai/catmap
catmap/cli.py
Python
gpl-3.0
2,874
# This file is part of Checkbox. # # Copyright 2012 Canonical Ltd. # Written by: # Zygmunt Krynicki <zygmunt.krynicki@canonical.com> # # Checkbox 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 versio...
zyga/plainbox
plainbox/impl/__init__.py
Python
gpl-3.0
4,500
import textwrap import yaml from schema import SchemaError def test_trivia_lists(): from redbot.cogs.trivia import InvalidListError, get_core_lists, get_list list_names = get_core_lists() assert list_names problem_lists = [] for l in list_names: try: get_list(l) excep...
palmtree5/Red-DiscordBot
tests/cogs/test_trivia.py
Python
gpl-3.0
799
#Setup Logging import logging log = logging.getLogger(__name__) #Python modules #Local modules #External modules class Alarm(object): _defaults = { "pokemon":{}, "lures":{}, "gyms":{} } #Gather settings and create alarm def __init__(self): raise NotImplementedError("This is an abstract method.") ...
joberembt/PokeAlarm
alarms/alarm.py
Python
gpl-3.0
1,134
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: Radio Impairments Model # Author: mettus # Generated: Thu Aug 1 12:46:10 2013 ################################################## from gnuradio import analog from gnuradio import blocks from gnuradio import g...
mrjacobagilbert/gnuradio
gr-channels/python/channels/impairments.py
Python
gpl-3.0
4,815
""" :mod:`imports` is here to resolve import statements and return the modules/classes/functions/whatever, which they stand for. However there's not any actual importing done. This module is about finding modules in the filesystem. This can be quite tricky sometimes, because Python imports are not always that simple. ...
SamuelDSR/YouCompleteMe-Win7-GVIM
third_party/jedi/jedi/imports.py
Python
gpl-3.0
15,994
import numpy from matplotlib import pyplot as plot import matplotlib.cm as cm def iter_count(C, max_iter): X = C for n in range(max_iter): if abs(X) > 2.: return n X = X ** 2 + C return max_iter N = 512 max_iter = 64 xmin, xmax, ymin, ymax = -0.32, -0.22, 0.8, 0.9 X = numpy.linspace(xmin, xmax, N) Y = numpy...
moonbury/notebooks
github/MatplotlibCookbook/Chapter 6/06.py
Python
gpl-3.0
748
# -*- coding: utf-8 -*- """ feedjack Gustavo Picón fjlib.py """ from django.conf import settings from django.db import connection from django.core.paginator import Paginator, InvalidPage from django.http import Http404 from django.utils.encoding import smart_unicode from oi.feedjack import models from oi.feedjack im...
MehmetNuri/ozgurlukicin
feedjack/fjlib.py
Python
gpl-3.0
9,326
# (c) 2012-2014, 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) an...
hnakamur/ansible
lib/ansible/plugins/lookup/__init__.py
Python
gpl-3.0
1,681
# coding=utf-8 # This file is part of SickRage. # # URL: https://SickRage.GitHub.io # Git: https://github.com/SickRage/SickRage.git # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3...
Jusedawg/SickRage
tests/sickrage_tests/providers/torrent/parsing_tests.py
Python
gpl-3.0
9,387
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
goozbach/ansible
lib/ansible/module_utils/basic.py
Python
gpl-3.0
73,840
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2013, Patrick Callahan <pmc@patrickcallahan.com> # based on # openbsd_pkg # (c) 2013 # Patrik Lundin <patrik.lundin.swe@gmail.com> # # yum # (c) 2012, Red Hat, Inc # Written by Seth Vidal <skvidal at fedoraproject.org> # # GNU ...
kbrebanov/ansible
lib/ansible/modules/packaging/os/zypper.py
Python
gpl-3.0
17,518
from copy import copy import json import time import random import operator from datetime import datetime from dream.plugins import plugin class BatchesWIPSpreadsheet(plugin.InputPreparationPlugin): """ Input prepration read wip-srpeadsheet data and update the wip property of the stations. """ def prepr...
bchiroma/DreamProject_2
dream/plugins/BatchesWIPSpreadsheet.py
Python
gpl-3.0
1,317
# (c) 2012-2014, 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) an...
valentin-krasontovitsch/ansible
lib/ansible/playbook/__init__.py
Python
gpl-3.0
4,859
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt import unittest class TestHRSettings(unittest.TestCase): pass
frappe/erpnext
erpnext/hr/doctype/hr_settings/test_hr_settings.py
Python
gpl-3.0
153
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. class Analyzer(object): """ Analyzers produce data and state models. Examples of analyzers would be the parsing...
MozillaSecurity/peach
Peach/analyzer.py
Python
mpl-2.0
1,607
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ tests for mozfile.NamedTemporaryFile """ import mozfile import os import unittest class Tes...
SlateScience/MozillaJS
js/src/testing/mozbase/mozfile/tests/test_tempfile.py
Python
mpl-2.0
2,461
import unittest import mock import datetime import uuid import random from xmodule.modulestore.inheritance import InheritanceMixin from opaque_keys.edx.locator import CourseLocator, BlockUsageLocator from xmodule.modulestore.split_mongo.split import SplitMongoModuleStore from xmodule.modulestore.mongo import MongoModu...
geekaia/edx-platform
common/lib/xmodule/xmodule/modulestore/tests/test_split_w_old_mongo.py
Python
agpl-3.0
5,708
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or mo...
Rademade/taiga-back
taiga/base/api/renderers.py
Python
agpl-3.0
24,541
#!/usr/bin/python # # \file 1_export.py # \brief Export displace # \date 2009-03-10-21-45-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Export displace # # NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> # Copyright (C) 2010 Winch Gate Property Limited # # This program is ...
osgcc/ryzom
nel/tools/build_gamedata/processes/displace/1_export.py
Python
agpl-3.0
1,885
import Queue from unittest import TestCase import threading import time from storm.wsgi import make_app class TestMakeApp(TestCase): def stub_app(self, environ, start_response): if getattr(self, 'in_request', None): self.in_request() getattr(self, 'calls', []).append('stub_app') ...
nwokeo/supysonic
venv/lib/python2.7/site-packages/tests/wsgi.py
Python
agpl-3.0
4,317
# -*- coding: utf-8 -*- from ..managers.event_manager import UpdateEvent from ..utils.old import safepath class PyPackage: """ Represents a package object at runtime. """ def __init__(self, manager, id, name, folder, site, password, queue, order): self.m = self.manager = manager sel...
vuolter/pyload
src/pyload/core/datatypes/pypackage.py
Python
agpl-3.0
1,788
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
jmesteve/saas3
openerp/addons/base/ir/__init__.py
Python
agpl-3.0
1,426
# Roundware Server is released under the GNU Affero General Public License v3. # See COPYRIGHT.txt, AUTHORS.txt, and LICENSE.txt in the project root directory. from __future__ import unicode_literals from django.conf.urls import patterns, url, include from roundware.api1 import views import logging logger = logging.g...
yangjackascd/roundware-server
roundware/api1/urls.py
Python
agpl-3.0
1,338
"""Drafts as required folder Revision ID: 41a7e825d108 Revises: 269247bc37d3 Create Date: 2014-03-13 21:14:25.652333 """ # revision identifiers, used by Alembic. revision = '41a7e825d108' down_revision = '269247bc37d3' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('imapaccount', ...
nylas/sync-engine
migrations/versions/004_drafts_as_required_folder.py
Python
agpl-3.0
459
# -*- coding: utf-8 -*- # © 2016 ACSONE SA/NV (<http://acsone.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import api, fields, models from dateutil.rrule import (rrule, YEARLY, MONTHLY, WEEKLY, ...
be-cloud-be/horizon-addons
server-tools/date_range/wizard/date_range_generator.py
Python
agpl-3.0
2,576
#! /usr/bin/env python # -*- coding: utf-8 -*- """Merge YAML files of IPP tax and benefit tables with OpenFisca parameters to generate new parameters.""" import argparse import collections import datetime import logging import os import sys import xml.etree.ElementTree as etree from biryani import strings import ya...
benjello/openfisca-france
openfisca_france/scripts/merge_ipp_tax_and_benefit_tables_with_parameters.py
Python
agpl-3.0
22,397
#!/usr/bin/env python import unittest from PySide2.QtCore import QObject, Slot, SIGNAL, SLOT class MyObject(QObject): def __init__(self, parent=None): QObject.__init__(self, parent) self._slotCalledCount = 0 @Slot() def mySlot(self): self._slotCalledCount = self._slotCalledCount ...
gbaty/pyside2
tests/signals/decorators_test.py
Python
lgpl-2.1
2,225
#!/usr/bin/env python # encoding: utf-8 # Ali Sabil, 2007 import os.path, shutil import Task, Runner, Utils, Logs, Build, Node from TaskGen import extension, after, before EXT_VALA = ['.vala', '.gs'] class valac_task(Task.Task): vars = ("VALAC", "VALAC_VERSION", "VALAFLAGS") before = ("cc", "cxx") def run(self)...
oneman/xmms2-oneman-old
wafadmin/Tools/vala.py
Python
lgpl-2.1
8,888
#!/usr/bin/env python # -*- coding: utf-8 -*- """This file is part of the prometeo project. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option...
zuck/prometeo-erp
products/models.py
Python
lgpl-3.0
7,390
# encoding: utf-8 import csv from urllib2 import HTTPError import django from django.db import transaction import urllib2 from datetime import datetime from django.core.exceptions import ObjectDoesNotExist from django.core.management.base import BaseCommand from openfonacide.matcher import Matcher from openfonacide.mo...
nemesiscodex/openfonacide
openfonacide/management/commands/actualizar_datasets.py
Python
lgpl-3.0
3,284
#!/usr/bin/env python # encoding: utf-8 import logging import math import time from django.utils import timezone import django from modularodm import Q from oauthlib.oauth2 import OAuth2Error from dateutil.relativedelta import relativedelta django.setup() from framework.celery_tasks import app as celery_app from sc...
chrisseto/osf.io
scripts/refresh_addon_tokens.py
Python
apache-2.0
3,392
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
zzcclp/carbondata
python/setup.py
Python
apache-2.0
3,483
from __future__ import division, absolute_import from __future__ import print_function, unicode_literals import toolz import numpy as np import theano import theano.tensor as T from .. import utils from .inits import ZeroInit ENABLE_TEST_VALUE = theano.config.compute_test_value != "off" VALID_TAGS = set(""" input o...
diogo149/treeano
treeano/core/variable.py
Python
apache-2.0
7,794
import pytest import A_checking_again as A def test_can_drink(): '''This is a much clearer test now that we're using functions!''' assert A.can_drink(21) == True assert A.can_drink(22) == True assert A.can_drink(20) == False def test_enforce(capsys): '''Notice that we're not restricted to the dat...
RaoUmer/python-fundamentals
challenges/04-Functions/test_A_checking_again.py
Python
apache-2.0
936
# -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "Lic...
sparkslabs/kamaelia_
Sketches/RJL/SMTP/MailShared.py
Python
apache-2.0
2,422
# 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...
bigswitch/horizon
openstack_dashboard/dashboards/project/volumes/backups/forms.py
Python
apache-2.0
4,401
from collections import namedtuple ############### # Structs # ############### # Request payloads ProduceRequest = namedtuple("ProduceRequest", ["topic", "partition", "messages"]) FetchRequest = namedtuple("FetchRequest", ["topic", "partition", "offset", "max...
findhy/kafka-python
kafka/common.py
Python
apache-2.0
4,660
# Copyright (c) 2009 Twisted Matrix Laboratories. # See LICENSE for details. # Originally written by Darryl Vandorp # http://randomthoughts.vandorp.ca/ from twisted.words.protocols.jabber import client, jid from twisted.words.xish import domish from twisted.internet import reactor def authd(xmlstream): p...
movmov/cc
vendor/Twisted-10.0.0/doc/words/examples/jabber_client.py
Python
apache-2.0
881
# Copyright 2011 OpenStack Foundation # Copyright 2011, Piston Cloud Computing, Inc. # Copyright 2011 Nebula, 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 # #...
raildo/python-keystoneclient
python-keystoneclient-0.4.1.7.gdca1d42/keystoneclient/service_catalog.py
Python
apache-2.0
11,013
# Copyright 2011 OpenStack Foundation # Copyright 2013 Rackspace Hosting # 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/lice...
Tesora/tesora-python-troveclient
troveclient/v1/hosts.py
Python
apache-2.0
2,242
# bgscan tests # Copyright (c) 2014, Jouni Malinen <j@w1.fi> # # This software may be distributed under the terms of the BSD license. # See README for more details. import time import logging logger = logging.getLogger() import os import hostapd def test_bgscan_simple(dev, apdev): """bgscan_simple""" hostapd...
wangybgit/Chameleon
hostapd-OpenWrt/tests/hwsim/test_bgscan.py
Python
apache-2.0
6,284
#!Measurement ''' baseline: after: true before: false counts: 180 detector: H1 mass: 34.2 settling_time: 20.0 default_fits: nominal equilibration: eqtime: 1.0 inlet: R inlet_delay: 3 outlet: O use_extraction_eqtime: true post_equilibration_delay: 5 multicollect: counts: 600 detector: H1 is...
USGSDenverPychron/pychron
docs/user_guide/operation/scripts/examples/argus/measurement/jan_unknown_air_for_38Ar_600_180.py
Python
apache-2.0
2,496
from pylons import c from ming.orm.ormsession import ThreadLocalORMSession from allura.websetup import bootstrap from allura.lib import helpers as h from allura.lib import plugin from allura import model as M from alluratest.controller import setup_basic_test def setUp(): setup_basic_test() class BlogTestWithMo...
pombredanne/SourceForge-Allura
ForgeBlog/forgeblog/tests/unit/__init__.py
Python
apache-2.0
1,126
# -*- coding: utf-8 -*- ''' Management of LVS (Linux Virtual Server) Real Server ==================================================== ''' def __virtual__(): ''' Only load if the lvs module is available in __salt__ ''' return 'lvs_server' if 'lvs.get_rules' in __salt__ else False def present(name, ...
smallyear/linuxLearn
salt/salt/states/lvs_server.py
Python
apache-2.0
6,440
__author__ = 'thuy'
cfe-lab/Umberjack
test/simulations/indelible/__init__.py
Python
bsd-2-clause
20
# -*- coding: utf-8 -*- from __future__ import absolute_import import unittest from .estestcase import ESTestCase from pyes.query import * import unittest class PercolatorTestCase(ESTestCase): def setUp(self): super(PercolatorTestCase, self).setUp() mapping = { u'parsedtext': {'boost': 1.0, ...
Yelp/pyes
tests/test_percolator.py
Python
bsd-3-clause
3,235
#!/usr/bin/env python3 """ This file defines a set of system_info classes for getting information about various resources (libraries, library directories, include directories, etc.) in the system. Usage: info_dict = get_info(<name>) where <name> is a string 'atlas','x11','fftw','lapack','blas', 'lapack_src', 'b...
simongibbons/numpy
numpy/distutils/system_info.py
Python
bsd-3-clause
109,490
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('hs_app_timeseries', '0001_initial'), ] operations = [ migrations.DeleteModel('TimeSeriesResource'), ]
RENCI/xDCIShare
hs_app_timeseries/migrations/0002_auto_20150813_1247.py
Python
bsd-3-clause
302
from __future__ import print_function # Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Daniel Strohmeier <daniel.strohmeier@gmail.com> # # License: Simplified BSD from math import sqrt import numpy as np from scipy import linalg from .mxne_debiasing import compute_bias from ..utils im...
teonlamont/mne-python
mne/inverse_sparse/mxne_optim.py
Python
bsd-3-clause
46,824
from kombu.tests.utils import unittest from kombu.transport.virtual import exchange from kombu.tests.mocks import Channel class ExchangeCase(unittest.TestCase): type = None def setUp(self): if self.type: self.e = self.type(Channel()) class test_Direct(ExchangeCase): type = exchang...
pantheon-systems/kombu
kombu/tests/test_virtual_exchange.py
Python
bsd-3-clause
3,747
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Bayesian Gaussian Mixture Model Classes: contains the basic fields and methods of Bayesian GMMs the high level functions are/should be binded in C The base class BGMM relies on an implementation that p...
alexis-roche/nipy
nipy/algorithms/clustering/bgmm.py
Python
bsd-3-clause
36,777
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
gandreello/openthread
tests/scripts/thread-cert/Cert_7_1_04_BorderRouterAsRouter.py
Python
bsd-3-clause
4,738
# Copyright (c) 2016, Xilinx, 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of ...
VectorBlox/PYNQ
python/pynq/iop/tests/test__iop.py
Python
bsd-3-clause
3,522
"""Localizations for meas_date extraction.""" # Authors: Eric Larson <larson.eric.d@gmail.com> # # License: BSD-3-Clause # This file was generated on 2021/01/31 on an Ubuntu system. # When getting "unsupported locale setting" on Ubuntu (e.g., with localepurge), # use "sudo locale-gen de_DE" etc. then "sudo update-loca...
wmvanvliet/mne-python
mne/io/nirx/_localized_abbr.py
Python
bsd-3-clause
2,966
# Created By: Virgil Dupras # Created On: 2007/05/19 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl...
hsoft/hscommon
sqlite.py
Python
bsd-3-clause
4,304
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render from django.conf.urls import url from .views import HomePageView, LeaderboardView, MiscView, Sign_upView urlpatterns = [ url(r'^$', HomePageView.as_view(), name='home'), url(r'^misc$', MiscView.as_view(), nam...
echopen/PRJ-medtec_sigproc
echopen-leaderboard/bootcamp/leaderboard/urls.py
Python
mit
466
import re import sys def lookup(address, port, s): """ Parse the pfctl state output s, to look up the destination host matching the client (address, port). Returns an (address, port) tuple, or None. """ # We may get an ipv4-mapped ipv6 address here, e.g. ::ffff:127.0.0.1. # Th...
cortesi/mitmproxy
mitmproxy/platform/pf.py
Python
mit
1,021
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simple class defining the windows. :copyright: Lion Krischer (krischer@geophysik.uni-muenchen.de), 2014 :license: GNU General Public License, Version 3 (http://www.gnu.org/copyleft/gpl.html) """ from __future__ import (absolute_import, division, print_funct...
KNMI/VERCE
verce-hpc-pe/src/pyflex/window.py
Python
mit
8,376