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
#!/usr/bin/env python from django.core.management import setup_environ import settings setup_environ(settings) import socket from trivia.models import * irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) irc.connect((settings.IRC_SERVER, settings.IRC_PORT)) def send(msg): irc.send(msg + "\r\n") print "{SE...
relrod/pib
bot.py
Python
bsd-3-clause
1,205
""" Commands that are available from the connect screen. """ import re import traceback from django.conf import settings from src.players.models import PlayerDB from src.objects.models import ObjectDB from src.server.models import ServerConfig from src.comms.models import Channel from src.utils import create, logger, ...
TaliesinSkye/evennia
wintersoasis-master/commands/unloggedin.py
Python
bsd-3-clause
12,835
#!/usr/bin/python # Copyright (c) 2012 The Native Client 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 json import os import subprocess import sys sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import pynacl.p...
wilsonianb/nacl_contracts
buildbot/buildbot_selector.py
Python
bsd-3-clause
16,846
from contextlib import contextmanager from _pytest.python import FixtureRequest import mock from mock import Mock import pyramid.testing from webob.multidict import MultiDict import pyramid_swagger import pyramid_swagger.tween import pytest import simplejson from pyramid.config import Configurator from pyramid.interfa...
prat0318/pyramid_swagger
tests/acceptance/response_test.py
Python
bsd-3-clause
8,642
import ghcnpy # Provide introduction ghcnpy.intro() # Print Latest Version ghcnpy.get_ghcnd_version() # Testing Search Capabilities print("\nTESTING SEARCH CAPABILITIES") ghcnpy.find_station("Asheville") # Testing Search Capabilities print("\nTESTING PULL CAPABILITIES") outfile=ghcnpy.get_data_station("USW00003812"...
jjrennie/GHCNpy
test.py
Python
bsd-3-clause
360
# -*- coding: utf-8 -*- """ eve.io.media ~~~~~~~~~~~~ Media storage for Eve-powered APIs. :copyright: (c) 2014 by Nicola Iarocci. :license: BSD, see LICENSE for more details. """ class MediaStorage(object): """ The MediaStorage class provides a standardized API for storing files, along ...
opticode/eve
eve/io/media.py
Python
bsd-3-clause
2,207
from django.utils.translation import ugettext as _ from django.db import models from jmbo.models import ModelBase class Superhero(ModelBase): name = models.CharField(max_length=256, editable=False) class Meta: verbose_name_plural = _("Superheroes")
praekelt/jmbo-superhero
superhero/models.py
Python
bsd-3-clause
269
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ''' Processor functions for images ''' import numpy as np def squeeze_image(img): ''' Return image, remove axes length 1 at end of image shape For example, an image may have shape (10,20,30,1,1). ...
satra/NiPypeold
nipype/externals/pynifti/funcs.py
Python
bsd-3-clause
2,788
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2021, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
qiime2/q2-types
q2_types/sample_data/_type.py
Python
bsd-3-clause
832
from ..base import BaseTopazTest class TestMarshal(BaseTopazTest): def test_version_constants(self, space): w_res = space.execute("return Marshal::MAJOR_VERSION") assert space.int_w(w_res) == 4 w_res = space.execute("return Marshal::MINOR_VERSION") assert space.int_w(w_res) == 8 ...
babelsberg/babelsberg-r
tests/modules/test_marshal.py
Python
bsd-3-clause
16,593
########################################################################## # # Copyright (c) 2013-2015, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
chippey/gaffer
python/GafferImageTest/ObjectToImageTest.py
Python
bsd-3-clause
3,067
#!/usr/bin/env python2 from __future__ import print_function import sys import os import urllib import argparse import xml.etree.ElementTree as ET def warn(*msgs): for x in msgs: print('[WARNING]:', x, file=sys.stderr) class PDBTM: def __init__(self, filename): #self.tree = ET.parse(filename) #self.root = self...
khendarg/pdbtmtop
dbtool.py
Python
bsd-3-clause
2,933
from django.template import Library, Node, resolve_variable, TemplateSyntaxError from django.core.urlresolvers import reverse register = Library() @register.simple_tag def active(request, pattern): import re if re.search(pattern, request.get_full_path()): return 'active' return ''
Kami/munin_exchange
munin_exchange/apps/core/templatetags/navclass.py
Python
bsd-3-clause
307
''' Given a number, find the next higher number using only the digits in the given number. For example if the given number is 1234, next higher number with same digits is 1243 ''' def FindNext(num): number = str(num) length = len(number) for i in range(length-2,-1,-1): current = number[i] ...
jenniferwx/Programming_Practice
FindNextHigherNumberWithSameDigits.py
Python
bsd-3-clause
578
import requests class Status(object): SKIP_LOCALES = ['en_US'] def __init__(self, url, app=None, highlight=None): self.url = url self.app = app self.highlight = highlight or [] self.data = [] self.created = None def get_data(self): if self.data: ...
willkg/postatus
postatus/status.py
Python
bsd-3-clause
4,559
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
vlegoff/tsunami
src/secondaires/navigation/commandes/debarquer/__init__.py
Python
bsd-3-clause
4,221
# # GtkMain.py -- pygtk threading help routines. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # """ GUI threading help routines. Usage: import GtkMain # See c...
Rbeaty88/ginga
ginga/gtkw/GtkMain.py
Python
bsd-3-clause
5,866
# coding: utf-8 # This file is part of Thomas Aquinas. # # Thomas Aquinas 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. # # Thomas Aq...
shackra/thomas-aquinas
summa/audio/system.py
Python
bsd-3-clause
776
#<pycode(py_choose)> class Choose: """ Choose - class for choose() with callbacks """ def __init__(self, list, title, flags=0, deflt=1, icon=37): self.list = list self.title = title self.flags = flags self.x0 = -1 self.x1 = -1 self.y0 = -1 self.y1 = -1 self.width = -1 self...
nihilus/src
pywraps/py_choose.py
Python
bsd-3-clause
1,595
# -*- coding: utf-8 -*- ''' Production Configurations - Use djangosecure - Use Amazon's S3 for storing static files and uploaded media - Use sendgrid to send emails - Use MEMCACHIER on Heroku ''' from configurations import values # See: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html#settings...
tpugsley/tco2
tco2/config/production.py
Python
bsd-3-clause
4,340
# Author: Immanuel Bayer # License: BSD 3 clause import ffm import numpy as np from .base import FactorizationMachine from sklearn.utils.testing import assert_array_equal from .validation import check_array, assert_all_finite class FMRecommender(FactorizationMachine): """ Factorization Machine Recommender with ...
ibayer/fastFM-fork
fastFM/bpr.py
Python
bsd-3-clause
2,859
#------------------------------------------------------------------------------ # Copyright (c) 2007, Riverbank Computing Limited # All rights reserved. # # This software is provided without warranty under the terms of the BSD license. # However, when used with the GPL version of PyQt the additional terms described in ...
geggo/pyface
pyface/ui/qt4/python_editor.py
Python
bsd-3-clause
6,248
import argparse import glob import hashlib import json import os IRMAS_INDEX_PATH = '../mirdata/indexes/irmas_index.json' def md5(file_path): """Get md5 hash of a file. Parameters ---------- file_path: str File path. Returns ------- md5_hash: str md5 hash of data in file_...
mir-dataset-loaders/mirdata
scripts/legacy/make_irmas_index.py
Python
bsd-3-clause
6,590
import unittest import time import pprint import logging import scanner.logSetup as logSetup import pyximport print("Have Cython") pyximport.install() import dbPhashApi class TestCompareDatabaseInterface(unittest.TestCase): def __init__(self, *args, **kwargs): logSetup.initLogging() super().__init__(*args,...
fake-name/IntraArchiveDeduplicator
Tests/Test_db_BKTree_Compare.py
Python
bsd-3-clause
1,765
from numpy import array, zeros, ones, sqrt, ravel, mod, random, inner, conjugate from scipy.sparse import csr_matrix, csc_matrix, coo_matrix, bmat, eye from scipy import rand, mat, real, imag, linspace, hstack, vstack, exp, cos, sin, pi from pyamg.util.linalg import norm import pyamg from scipy.optimize import fminboun...
pombreda/pyamg
Examples/ComplexSymmetric/one_D_helmholtz.py
Python
bsd-3-clause
3,892
from bluebottle.projects.serializers import ProjectPreviewSerializer from bluebottle.quotes.serializers import QuoteSerializer from bluebottle.slides.serializers import SlideSerializer from bluebottle.statistics.serializers import StatisticSerializer from rest_framework import serializers class HomePageSerializer(ser...
jfterpstra/bluebottle
bluebottle/homepage/serializers.py
Python
bsd-3-clause
554
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 ...
vlegoff/tsunami
src/primaires/scripting/commandes/scripting/alerte_info.py
Python
bsd-3-clause
3,352
#!/usr/bin/env python3 # -*- coding: utf-8 -*- def helloworld(): """ Hello world routine ! """ print("Hello world!")
aboucaud/python-euclid2016
euclid/euclid/hello.py
Python
bsd-3-clause
135
import os import os.path as op import pytest import numpy as np from numpy.testing import (assert_array_equal, assert_equal, assert_allclose, assert_array_less, assert_almost_equal) import itertools import mne from mne.datasets import testing from mne.fixes import _get_img_fdata from mne im...
bloyl/mne-python
mne/tests/test_transforms.py
Python
bsd-3-clause
21,423
from optparse import make_option from django.core.management.base import BaseCommand, CommandError from brambling.utils.payment import dwolla_update_tokens class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option( '--days', action='store', des...
j-po/django-brambling
brambling/management/commands/update_tokens.py
Python
bsd-3-clause
931
# -*- coding: utf-8 -*- """ .. _tut-set-eeg-ref: Setting the EEG reference ========================= This tutorial describes how to set or change the EEG reference in MNE-Python. .. contents:: Page contents :local: :depth: 2 As usual we'll start by importing the modules we need, loading some :ref:`example dat...
mne-tools/mne-tools.github.io
0.19/_downloads/0162af27293b0c7e7c35ef85531280ea/plot_55_setting_eeg_reference.py
Python
bsd-3-clause
10,338
import base64 import json from twisted.internet.defer import inlineCallbacks, DeferredQueue, returnValue from twisted.web.http_headers import Headers from twisted.web import http from twisted.web.server import NOT_DONE_YET from vumi.config import ConfigContext from vumi.message import TransportUserMessage, TransportE...
praekelt/vumi-go
go/apps/http_api/tests/test_vumi_app.py
Python
bsd-3-clause
31,622
from flask import request, current_app, url_for from flask_jsonschema import validate from .. import db from ..models import AHBot as Bot from .decorators import json_response from . import api @api.route('/abusehelper', methods=['GET']) @json_response def get_abusehelper(): """Return a list of available abusehel...
certeu/do-portal
app/api/abusehelper.py
Python
bsd-3-clause
5,478
from django.contrib import admin # Register your models here. from .models import Photos admin.site.register(Photos)
dadisigursveinn/VEF-Lokaverkefni
myphotos/admin.py
Python
bsd-3-clause
118
# Copyright (c) 2014, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only # under the conditions described in the aforementioned license. The license # is also available online at http://www.ent...
tommy-u/chaco
chaco/tools/tests/better_zoom_test_case.py
Python
bsd-3-clause
1,537
import pytest from py4jdbc.dbapi2 import connect, Connection from py4jdbc.resultset import ResultSet from py4jdbc.exceptions.dbapi2 import Error def test_connect(gateway): url = "jdbc:derby:memory:testdb;create=true" conn = connect(url, gateway=gateway) cur = conn.cursor() rs = cur.execute("select * ...
massmutual/py4jdbc
tests/test_Cursor.py
Python
bsd-3-clause
3,513
"""Unit-tests for `tree.visitors` """ from py2c import tree from py2c.tree import visitors from py2c.tests import Test, data_driven_test from nose.tools import assert_equal # TEST:: Add non-node fields # ============================================================================= # Helper classes # ==============...
pradyunsg/Py2C
py2c/tree/tests/test_visitors.py
Python
bsd-3-clause
5,659
from importlib import import_module from inspect import getdoc def attribs(name): mod = import_module(name) print name print 'Has __all__?', hasattr(mod, '__all__') print 'Has __doc__?', hasattr(mod, '__doc__') print 'doc: ', getdoc(mod) if __name__=='__main__': attribs('cairo') attrib...
baharev/apidocfilter
check.py
Python
bsd-3-clause
702
class Requirement(object): """ Requirements are the basis for Dominion. They define what needs to exist on a host/role, or perhaps what *mustn't* exist. Requirements are defined on Roles. """ creation_counter = 0 "The base class for requirements." def __init__(self, required=True, en...
paulcwatts/dominion
dominion/base.py
Python
bsd-3-clause
1,060
import py try: from pypy.rpython.test.test_llinterp import interpret except ImportError: py.test.skip('Needs PyPy to be on the PYTHONPATH') from rply import ParserGenerator, Token from rply.errors import ParserGeneratorWarning from .base import BaseTests from .utils import FakeLexer, BoxInt, ParserState cl...
solanolabs/rply
tests/test_ztranslation.py
Python
bsd-3-clause
2,200
# -*- coding: utf-8 -*- # # zambiaureport documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values ...
unicef-zambia/zambia-ureport
docs/conf.py
Python
bsd-3-clause
7,753
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
ericmjl/bokeh
bokeh/io/output.py
Python
bsd-3-clause
4,608
from django import template from django.utils.safestring import mark_safe from mezzanine.conf import settings from mezzanine_developer_extension.utils import refactor_html register = template.Library() # Checking settings.TEMPLATE_STYLE. # Possible values are: # - mezzanine_developer_extension.styles.macos # -...
educalleja/mezzanine-developer-extension
mezzanine_developer_extension/templatetags/devfilters.py
Python
bsd-3-clause
1,349
from datetime import datetime from pymongo.connection import Connection from django.db import models from eventtracker.conf import settings def get_mongo_collection(): "Open a connection to MongoDB and return the collection to use." if settings.RIGHT_MONGODB_HOST: connection = Connection.paired( ...
ella/django-event-tracker
eventtracker/models.py
Python
bsd-3-clause
1,073
# encoding: utf-8 import sys sys.path.append(sys.path.insert(0,"../src")) def urlopen(*args, **kwargs): # Only parse one arg: the url return Urls[args[0]] # Provide a simple hashtable to contain the content of the urls and # provide a mock object similar to what will be returned from the # real urlopen() fu...
greezybacon/xmlconfig
test/testImport.py
Python
bsd-3-clause
4,610
# -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
simodalla/pympa-affarigenerali-OLD
docs/conf.py
Python
bsd-3-clause
8,210
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
mrahnis/jxl2txt
jxl2txt/_version.py
Python
bsd-3-clause
18,658
from . import Cl, conformalize layout_orig, blades_orig = Cl(3) layout, blades, stuff = conformalize(layout_orig) locals().update(blades) locals().update(stuff) # for shorter reprs layout.__name__ = 'layout' layout.__module__ = __name__
arsenovic/clifford
clifford/g3c.py
Python
bsd-3-clause
240
""" Unit tests to ensure that we can call reset_traits/delete on a property trait (regression tests for Github issue #67). """ from traits import _py2to3 from traits.api import Any, HasTraits, Int, Property, TraitError from traits.testing.unittest_tools import unittest class E(HasTraits): a = Property(Any) ...
burnpanck/traits
traits/tests/test_property_delete.py
Python
bsd-3-clause
730
from django import forms from ncdjango.interfaces.arcgis.form_fields import SrField class PointForm(forms.Form): x = forms.FloatField() y = forms.FloatField() projection = SrField()
consbio/ncdjango
ncdjango/interfaces/data/forms.py
Python
bsd-3-clause
195
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
nuagenetworks/vspk-python
vspk/v6/nuavatar.py
Python
bsd-3-clause
9,831
# -*- coding: utf-8 -*- """ Display currently playing song from Google Play Music Desktop Player. Configuration parameters: cache_timeout: how often we refresh this module in seconds (default 5) format: specify the items and ordering of the data in the status bar. These area 1:1 ma...
Spirotot/py3status
py3status/modules/gpmdp.py
Python
bsd-3-clause
2,411
#!/usr/bin/python import os # With the addition of Keystone, to use an openstack cloud you should # authenticate against keystone, which returns a **Token** and **Service # Catalog**. The catalog contains the endpoint for all services the # user/tenant has access to - including nova, glance, keystone, swift. # # *NO...
wettenhj/mytardis-swift-uploader
openrc.py
Python
bsd-3-clause
994
# -*- coding: utf-8 -*- from __future__ import absolute_import from .local import Local # noqa from .production import Production # noqa # This will make sure the app is always imported when # Django starts so that shared_task will use this app. from .celery import app as celery_app
HEG-Arc/Appagoo
appagoo/config/__init__.py
Python
bsd-3-clause
288
# Possible discounts: # - Node (administer inline with nodes) # - Bulk amounts on nodes # - User # - Group of users # - Order (this is more-or-less a voucher) # - Shipping costs # Possible amounts: # - Percentage # - Fixed amount # Flag indicating if a discount can be combined with other discounts. # Boolean "offer" to...
bhell/jimi
jimi/jimi/price/models/discount.py
Python
bsd-3-clause
478
import matplotlib.pyplot as plt import numpy as np import scalpplot from scalpplot import plot_scalp from positions import POS_10_5 from scipy import signal def plot_timeseries(frames, time=None, offset=None, color='k', linestyle='-'): frames = np.asarray(frames) if offset == None: offset = np.max(np.std(frame...
breuderink/psychic
psychic/plots.py
Python
bsd-3-clause
1,878
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('setlist', '0012_remove_show_leg'), ] operations = [ migrations.CreateModel( name='Show2', fields=[ ...
tylereaves/26md
setlist/migrations/0013_show2.py
Python
bsd-3-clause
970
#!/usr/bin/env python import sys from os.path import * import os from pyflann import * from copy import copy from numpy import * from numpy.random import * import unittest class Test_PyFLANN_nn(unittest.TestCase): def setUp(self): self.nn = FLANN(log_level="warning") #################################...
piskvorky/flann
test/test_nn_autotune.py
Python
bsd-3-clause
2,411
# -*- coding: utf-8 -*- from collections import OrderedDict import locale from optparse import make_option from verify.management.commands import VerifyBaseCommand from verify.models import * from verify.politici_models import * from django.db.models import Q, Count __author__ = 'guglielmo' class Command(VerifyBase...
openpolis/op-verify
project/verify/management/commands/generi_in_istituzioni.py
Python
bsd-3-clause
3,219
#!/usr/bin/env python from distutils.core import setup setup(name='django-modeltranslation', version='0.4.0-alpha1', description='Translates Django models using a registration approach.', long_description='The modeltranslation application can be used to ' 'translate dynamic con...
google-code-export/django-modeltranslation
setup.py
Python
bsd-3-clause
1,631
#!/usr/bin/python # Copyright (c) 2009, Purdue University # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list ...
stephenlienharrell/roster-dns-management
test/credentials_test.py
Python
bsd-3-clause
4,275
#!/usr/bin/env python import sys import hyperdex.client from hyperdex.client import LessEqual, GreaterEqual, Range, Regex, LengthEquals, LengthLessEqual, LengthGreaterEqual c = hyperdex.client.Client(sys.argv[1], int(sys.argv[2])) def to_objectset(xs): return set([frozenset(x.items()) for x in xs]) assert c.put('kv...
hyc/HyperDex
test/python/DataTypeMapIntFloat.py
Python
bsd-3-clause
585
""" Room Typeclasses for the TutorialWorld. This defines special types of Rooms available in the tutorial. To keep everything in one place we define them together with the custom commands needed to control them. Those commands could also have been in a separate module (e.g. if they could have been re-used elsewhere.)...
feend78/evennia
evennia/contrib/tutorial_world/rooms.py
Python
bsd-3-clause
40,655
""" Vision-specific analysis functions. $Id: featureresponses.py 7714 2008-01-24 16:42:21Z antolikjan $ """ __version__='$Revision: 7714 $' from math import fmod,floor,pi,sin,cos,sqrt import numpy from numpy.oldnumeric import Float from numpy import zeros, array, size, empty, object_ #import scipy try: import p...
jesuscript/topo-mpi
topo/analysis/vision.py
Python
bsd-3-clause
11,628
# # product import logging from django.contrib import messages from django.contrib.auth.decorators import user_passes_test from django.urls import reverse from django.http import HttpResponseRedirect from django.shortcuts import render from dojo.utils import add_breadcrumb from dojo.forms import ToolTypeForm from doj...
rackerlabs/django-DefectDojo
dojo/tool_type/views.py
Python
bsd-3-clause
2,344
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
vlegoff/tsunami
src/primaires/pnj/commandes/chemin/voir.py
Python
bsd-3-clause
3,490
#This is where the tests go.
praekelt/ummeli
ummeli/providers/tests.py
Python
bsd-3-clause
29
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license (see the COPYING file). """ This package contains the qibuild actions. """ from __future__ import absolute_import from __future__ import unicode_li...
aldebaran/qibuild
python/qibuild/actions/__init__.py
Python
bsd-3-clause
365
# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (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.mozilla.org/MPL/ # # Softwa...
AdrianGaudebert/configman
configman/converters.py
Python
bsd-3-clause
15,400
### # Copyright (c) 2005, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditi...
octete/octete-supybot-plugins
MyChannelLogger/test.py
Python
bsd-3-clause
1,757
#!/usr/bin/env python import sys def inv(s): if s[0] == '-': return s[1:] elif s[0] == '+': return '-' + s[1:] else: # plain number return '-' + s if len(sys.argv) != 1: print 'Usage:', sys.argv[0] sys.exit(1) for line in sys.stdin: linesplit = line.strip().split() if len(linesplit) == 3: ...
hlzz/dotfiles
graphics/cgal/Segment_Delaunay_graph_Linf_2/developer_scripts/lsprotate90.py
Python
bsd-3-clause
636
def test_default(cookies): """ Checks if default configuration is working """ result = cookies.bake() assert result.exit_code == 0 assert result.project.isdir() assert result.exception is None
vchaptsev/cookiecutter-django-vue
tests/test_generation.py
Python
bsd-3-clause
222
#!/usr/bin/env python # -*- mode: python; sh-basic-offset: 4; indent-tabs-mode: nil; coding: utf-8 -*- # vim: tabstop=4 softtabstop=4 expandtab shiftwidth=4 fileencoding=utf-8 # # Shell command # Copyright 2010, Jeremy Grosser <synack@digg.com> import argparse import os import sys import clusto from clusto import scr...
sanyaade-mobiledev/clusto
src/clusto/commands/console.py
Python
bsd-3-clause
2,107
from unittest import TestCase from django.core.management import call_command class SendAiPicsStatsTestCase(TestCase): def test_run_command(self): call_command('send_ai_pics_stats')
KlubJagiellonski/pola-backend
pola/tests/commands/test_send_ai_pics_stats.py
Python
bsd-3-clause
197
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
prodromou87/gem5
tests/configs/realview-switcheroo-atomic.py
Python
bsd-3-clause
2,428
# -*- coding: utf-8 -*- """ Display a fortune-telling, swimming fish. Wanda has no use what-so-ever. It only takes up disk space and compilation time, and if loaded, it also takes up precious bar space, memory, and cpu cycles. Anybody found using it should be promptly sent for a psychiatric evaluation. Configuration ...
Andrwe/py3status
py3status/modules/wanda_the_fish.py
Python
bsd-3-clause
5,569
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-05 14:25 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("elections", "0049_move_status")] operations = [ migrations.RemoveField(model_name="election", n...
DemocracyClub/EveryElection
every_election/apps/elections/migrations/0050_auto_20181005_1425.py
Python
bsd-3-clause
512
from __future__ import print_function import re import logging logging.basicConfig(level=logging.INFO) class Executor(object): def __init__(self, op_map): processed = {} for pattern, f in op_map.iteritems(): s = self._build_pattern_groups(pattern.lower()) processed[re.com...
martindimondo/PyC8
chip8/operations.py
Python
bsd-3-clause
6,673
# -*- coding: utf-8 -*- """ Created on Thu Jan 03 10:16:39 2013 @author: Grahesh """ import pandas from qstkutil import DataAccess as da import numpy as np import math import copy import qstkutil.qsdateutil as du import datetime as dt import qstkutil.DataAccess as da import qstkutil.tsutil as tsu imp...
grahesh/Stock-Market-Event-Analysis
Examples/Event Analysis/Half-Yearly End/Half_Year_End_Analysis.py
Python
bsd-3-clause
4,522
#!/usr/bin/python # Copyright (c) 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. """ A chain with four possible intermediates with different notBefore and notAfter dates, for testing path bulding prioritization. """ ...
endlessm/chromium-browser
net/data/path_builder_unittest/validity_date_prioritization/generate-certs.py
Python
bsd-3-clause
1,833
# Copyright (c) 2017 David Sorokin <david.sorokin@gmail.com> # # Licensed under BSD3. See the LICENSE.txt file in the root of this distribution. from simulation.aivika.modeler.model import * from simulation.aivika.modeler.port import * from simulation.aivika.modeler.stream import * from simulation.aivika.modeler.data_...
dsorokin/aivika-modeler
simulation/aivika/modeler/stream_random.py
Python
bsd-3-clause
7,405
# apis_v1/documentation_source/voter_star_on_save_doc.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- def voter_star_on_save_doc_template_values(url_root): """ Show documentation about voterStarOnSave """ required_query_parameter_list = [ { 'name': 'api_key...
wevote/WebAppPublic
apis_v1/documentation_source/voter_star_on_save_doc.py
Python
bsd-3-clause
4,125
import numpy as np from nose.tools import (assert_true, assert_false, assert_equal, assert_almost_equal) from numpy.testing import (assert_array_equal, assert_array_almost_equal, assert_) from dipy.sims.voxel import (_check_directions, SingleTensor, MultiTensor, ...
oesteban/dipy
dipy/sims/tests/test_voxel.py
Python
bsd-3-clause
12,904
# License: BSD 3 clause <https://opensource.org/licenses/BSD-3-Clause> # Copyright (c) 2016, Fabricio Vargas Matos <fabriciovargasmatos@gmail.com> # All rights reserved. '''' Tune the 3 most promissing algorithms and compare them ''' # Load libraries import os import time import pandas import numpy import matplotlib....
FabricioMatos/ifes-dropout-machine-learning
lib/eda4.py
Python
bsd-3-clause
9,696
import numpy as np from scipy.linalg import norm from .base import AppearanceLucasKanade class SimultaneousForwardAdditive(AppearanceLucasKanade): @property def algorithm(self): return 'Simultaneous-FA' def _fit(self, lk_fitting, max_iters=20, project=True): # Initial error > eps ...
jabooth/menpo-archive
menpo/fit/lucaskanade/appearance/simultaneous.py
Python
bsd-3-clause
8,583
# 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. """Provides fakes for several of Telemetry's internal objects. These allow code like story_runner and Benchmark to be run and tested without compiling or st...
benschmaus/catapult
telemetry/telemetry/testing/fakes/__init__.py
Python
bsd-3-clause
15,827
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Quality Control based on fuzzy logic. """ import logging import numpy as np from .core import QCCheckVar from .gradient import gradient from .spike import spike from .woa_normbias import woa_normbias from cotede.fuzzy im...
castelao/CoTeDe
cotede/qctests/fuzzylogic.py
Python
bsd-3-clause
2,680
from setuptools import setup, find_packages setup(name='gelato.models', version='0.1.2', description='Gelato models', namespace_packages=['gelato'], long_description='', author='', author_email='', license='', url='', include_package_data=True, packages=find...
washort/gelato.models
setup.py
Python
bsd-3-clause
394
import sys import warnings try: import itertools.izip as zip except ImportError: pass from itertools import product import numpy as np from .. import util from ..dimension import dimension_name from ..element import Element from ..ndmapping import NdMapping, item_check, sorted_context from .interface import...
ioam/holoviews
holoviews/core/data/cudf.py
Python
bsd-3-clause
12,346
# Copyright (c) 2006-2009 The Trustees of Indiana University. # All rights reserved. # # Redistribution and use in source and binary forms, with or without ...
matthiaskramm/corepy
corepy/arch/spu/isa/spu_isa.py
Python
bsd-3-clause
22,294
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
nuagenetworks/vspk-python
vspk/v6/nuvmresync.py
Python
bsd-3-clause
11,928
from mock import patch from nose.tools import eq_ from helper import TestCase import appvalidator.submain as submain class TestSubmainPackage(TestCase): @patch("appvalidator.submain.test_inner_package", lambda x, z: "success") def test_package_pass(self): "Tests the test_package function ...
mattbasta/perfalator
tests/test_submain_package.py
Python
bsd-3-clause
1,268
# Copyright (C) 2010 CENATIC: Centro Nacional de Referencia de # Aplicacion de las TIC basadas en Fuentes Abiertas, Spain. # # 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 reta...
helix84/activae
src/Type.py
Python
bsd-3-clause
2,833
# -*- coding: utf-8 -*- ''' Production Configurations - Use djangosecure - Use mailgun to send emails - Use redis ''' from __future__ import absolute_import, unicode_literals from django.utils import six from .common import * # noqa # SECRET CONFIGURATION # ---------------------------------------------------------...
jayfk/cookiecutter-django-docker
{{cookiecutter.repo_name}}/config/settings/production.py
Python
bsd-3-clause
4,238
# Copyright (c) 2013 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions and th...
v-legoff/croissant
croissant/output/__init__.py
Python
bsd-3-clause
1,636
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
ric2b/Vivaldi-browser
chromium/third_party/blink/tools/blinkpy/common/net/results_fetcher_mock.py
Python
bsd-3-clause
3,794
# -*- coding: utf-8 -*- import access import util @auth.requires_login() def index(): """Produces a list of the feedback obtained for a given venue, or for all venues.""" venue_id = request.args(0) if venue_id == 'all': q = (db.submission.user == get_user_email()) else: q = ((db.su...
lucadealfaro/crowdranker
controllers/feedback.py
Python
bsd-3-clause
10,966
from __future__ import print_function import shutil import os, sys import time import logging from .loaders import PythonLoader, YAMLLoader from .bundle import get_all_bundle_files from .exceptions import BuildError from .updater import TimestampUpdater from .merge import MemoryHunk from .version import get_manifest f...
gi0baro/weppy-assets
weppy_assets/webassets/script.py
Python
bsd-3-clause
22,478
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
ychen820/microblog
y/google-cloud-sdk/platform/google_appengine/google/appengine/datastore/datastore_v3_pb.py
Python
bsd-3-clause
282,355
from .image import Image from .product_category import ProductCategory from .supplier import Supplier, PaymentMethod from .product import Product from .product import ProductImage from .enum_values import EnumValues from .related_values import RelatedValues from .customer import Customer from .expense import Expense fr...
betterlife/psi
psi/app/models/__init__.py
Python
mit
875