repo_name
stringlengths
5
104
path
stringlengths
4
248
content
stringlengths
102
99.9k
Morbotic/pronto-distro
externals/libbot-drc/bot2-procman/python/src/bot_procman/printf_request_t.py
"""LCM type definitions This file automatically generated by lcm. DO NOT MODIFY BY HAND!!!! """ try: import cStringIO.StringIO as BytesIO except ImportError: from io import BytesIO import struct class printf_request_t(object): __slots__ = ["sheriff_id"] def __init__(self): self.sheriff_id = 0...
agry/NGECore2
scripts/mobiles/corellia/greck_mugger.py
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate...
stuarteberg/lazyflow
tests/testJsonConfig.py
############################################################################### # lazyflow: data flow based lazy parallel computation framework # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/o...
wez/watchman
tests/integration/test_invalid_watchmanconfig.py
# vim:ts=4:sw=4:et: # Copyright 2012-present Facebook, Inc. # Licensed under the Apache License, Version 2.0 # no unicode literals from __future__ import absolute_import, division, print_function import os import WatchmanTestCase @WatchmanTestCase.expand_matrix class TestWatchmanConfigValid(WatchmanTestCase.Watchm...
lyft/incubator-airflow
airflow/example_dags/example_kubernetes_executor_config.py
# # 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...
kkdang/synapsePythonClient
tests/unit/unit_test_DictObject.py
import os from synapseclient.dict_object import DictObject def setup(): print('\n') print('~' * 60) print(os.path.basename(__file__)) print('~' * 60) def test_DictObject(): """Test creation and property access on DictObjects""" d = DictObject({'args_working?':'yes'}, a=123, b='foobar', nerds=...
apache/allura
Allura/allura/tests/functional/test_feeds.py
# 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 (t...
12AngryMen/votca-scripts
lib/Carlstuff/ctp/cube2xyz.py
from __future__ import division import numpy as np import sys as sys class Atom(object): def __init__(self, Z, pos): self.Z = Z self.pos = pos self.VdW = 8 # a.u. def DistFrom(self, pos): return np.dot(self.pos - pos, self.pos - pos)**0.5 class ScalarField(object): def __init__(self, atoms, scala...
dunkhong/grr
grr/server/grr_response_server/flows/general/checks_test.py
#!/usr/bin/env python """Test the collector flows.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import os from absl import app from future.utils import iterkeys from grr_response_core import config from grr_response_core.lib.parsers import config_f...
google/resultstoreui
resultstoreui/resultstoreapi/cloud/devtools/resultstore_v2/proto/file_set_pb2.py
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/devtools/resultstore_v2/proto/file_set.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google....
redhat-openstack/trove
trove/common/base_wsgi.py
# Copyright 2014 Tesora, 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 by ...
queria/my-tempest
tempest/api/compute/security_groups/test_security_group_rules_negative.py
# Copyright 2013 Huawei Technologies Co.,LTD. # 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 # # Unl...
tqchen/tvm
tests/python/contrib/test_ethosn/test_sigmoid.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
stdweird/aquilon
tests/broker/test_make.py
#!/usr/bin/env python2.6 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2009,2010,2011,2012,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
dmadeka/bqplot
bqplot/traits.py
# Copyright 2015 Bloomberg Finance L.P. # # 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 i...
eddieruano/Sentinel
assist/Adafruit_Python_MPR121/examples/simpletest.py
# Copyright (c) 2014 Adafruit Industries # Author: Tony DiCola # # 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, m...
oodt-cloud/docker
examples/test-workflow/swarm/wmgr_config/rabbitmq_clients/rabbitmq_producer.py
# -*- coding: utf-8 -*- # Adapted from: # http://pika.readthedocs.io/en/0.10.0/examples/asynchronous_publisher_example.html # Features: # o Requests delivery confirmation from RabbitMQ server # and keeps tracks of which messages have been acknowledged or not acknowledged # o Reconnects if connection to RabbitMQ ser...
ewandor/home-assistant
homeassistant/components/alarm_control_panel/manual.py
""" Support for manual alarms. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/alarm_control_panel.manual/ """ import copy import datetime import logging import voluptuous as vol import homeassistant.components.alarm_control_panel as alarm import homeas...
NonVolatileComputing/arrow
python/pyarrow/filesystem.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
luotao1/Paddle
python/paddle/distributed/fleet/meta_parallel/tensor_parallel.py
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
ntt-sic/python-cinderclient
cinderclient/openstack/common/apiclient/base.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack Foundation # Copyright 2012 Grid Dynamics # Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except i...
pabigot/pyxb
tests/drivers/test-ctd-simple.py
# -*- coding: utf-8 -*- import logging if __name__ == '__main__': logging.basicConfig() _log = logging.getLogger(__name__) import pyxb.binding.generate import pyxb.binding.datatypes as xsd import pyxb.utils.domutils from xml.dom import Node import os.path schema_path = os.path.abspath(os.path.join(os.path.dirname(...
jcnelson/syndicate
old/md-service/SMDS/API/CDN/CDN.py
""" Class that describes a CDN """ from SMDS.user import * from SMDS.content import * class MDCDN: """ Interface for communicating with a CDN's brain to add/remove users and content. """ def __init__(self): pass def setup(self, api): return 1 def shutdown(self): return ...
rdo-management/heat
heat/tests/test_engine_api_utils.py
# # 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 # ...
miurahr/seahub
tools/seahub-admin.py
#!/usr/bin/env python # encoding: utf-8 # Copyright (c) 2012-2016 Seafile Ltd. import sqlite3 import os import sys import time import hashlib import getpass # Get .ccnet directory from argument or user input if len(sys.argv) >= 2: ccnet_dir = sys.argv[1] else: home_dir = os.path.join(os.path.expanduser('~...
memo/tensorflow
tensorflow/python/layers/core_test.py
# 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...
dhermes/google-cloud-python
bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/enums.py
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
evernym/zeno
plenum/common/messages/message_base.py
from collections import OrderedDict from operator import itemgetter from typing import Mapping, Dict from plenum.common.types import f from plenum.common.constants import OP_FIELD_NAME, SCHEMA_IS_STRICT from plenum.common.exceptions import MissingProtocolVersionError from plenum.common.messages.fields import FieldVal...
DLR-SC/F2x
src/F2x/template/ctypes_noerr/lib/glue.py
# Copyright 2018 German Aerospace Center (DLR) # # 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 a...
hyperNURb/ggrc-core
src/tests/ggrc_workflows/notifications/test_recurring_cycles.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@reciprocitylabs.com import random from tests.ggrc import TestCase from freezegun import freeze_time ...
syed/PerfKitBenchmarker
perfkitbenchmarker/disk.py
# Copyright 2014 PerfKitBenchmarker 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 appli...
LabKey/argos_nlp
fhcrc_pathology/SecondaryField.py
'''author@esilgard''' # # Copyright (c) 2015-2016 Fred Hutchinson Cancer Research Center # # Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 # import re, os import global_strings as gb PATH = os.path.dirname(os.path.realpath(__file__)) + os.path.sep class SecondaryField(obje...
aioworkers/aioworkers
aioworkers/worker/supervisor.py
import asyncio import logging import random from .base import Worker logger = logging.getLogger(__name__) class Supervisor(Worker): """ config: children: Union[int, list[str], list[dict]] - count or list child: Mapping - config for child worker """ def __init__(self, *args, **kwargs...
jakev/dtf
python-dtf/tests/unit/test_prop.py
# Android Device Testing Framework ("dtf") # Copyright 2013-2016 Jake Valletta (@jake_valletta) # # 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 ...
citrix-openstack-build/trove
trove/extensions/security_group/views.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 copy of the License at # # ...
UnrememberMe/pants
src/python/pants/backend/docgen/register.py
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.d...
mgagne/nova
nova/api/metadata/handler.py
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
sekikn/ambari
ambari-common/src/main/python/ambari_ws4py/streaming.py
# -*- coding: utf-8 -*- import struct from struct import unpack from ambari_ws4py.utf8validator import Utf8Validator from ambari_ws4py.messaging import TextMessage, BinaryMessage, CloseControlMessage,\ PingControlMessage, PongControlMessage from ambari_ws4py.framing import Frame, OPCODE_CONTINUATION, OPCODE_TEXT,...
zhaochao/fuel-web
fuel_agent/fuel_agent/objects/partition.py
# Copyright 2014 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
MadeiraCloud/salt
sources/salt/utils/validate/path.py
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. salt.utils.validate.path ~~~~~~~~~~~~~~~~~~~~~~~~ Several path related validators ''...
kawamon/hue
desktop/core/ext-py/celery-4.2.1/t/unit/backends/test_redis.py
from __future__ import absolute_import, unicode_literals import random import ssl from contextlib import contextmanager from datetime import timedelta from pickle import dumps, loads import pytest from case import ANY, ContextMock, Mock, call, mock, patch, skip from celery import signature, states, uuid from celery....
AndreasMadsen/tensorflow
tensorflow/python/layers/core.py
# 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...
luotao1/Paddle
python/paddle/fluid/tests/unittests/test_math_op_patch_var_base.py
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
cmlh/Maltego-Recorded_Future
src/RF_Maltego_Package_1.0/rf_csv_maltegoload.py
#!/usr/bin/env python """Transform a CSV file exported from the Recorded Future UI into Maltego entities.""" import json import sys import csv import Tkinter, tkFileDialog from MaltegoTransform import * mt = MaltegoTransform() # Use Tkinter to open up a file dialog. root = Tkinter.Tk() root.lift() root.withdraw() s...
supercheetah/diceroller
pyinstaller/buildtests/import/test_app_with_plugins.py
# # Copyright (C) 2012, Daniel Hyams # # 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 distributed i...
amurzeau/streamlink-debian
src/streamlink/plugins/webtv.py
import base64 import binascii import logging import re from Crypto.Cipher import AES from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream.hls import HLSStream from streamlink.utils.crypto import unpad_pkcs5 from streamlink.utils.parse import parse_json ...
OpenTreeOfLife/peyotl
examples/collection_stats.py
#!/usr/bin/env python # Example of getting trees from a collection, and properties for those # trees and studies # Specifically, prints properties important for synthesis for trees in a # collection from __future__ import print_function from peyotl.api import PhylesystemAPI from peyotl import collection_to_included_tr...
jeffreychan637/fb-cal-tpa-production
app/server/wix_verifications.py
"""This file handles parsing the Wix Instance which is key to the security of this app. """ from os import environ from base64 import urlsafe_b64encode, urlsafe_b64decode from hmac import new from hashlib import sha256 from json import loads if "HEROKU" in environ: wix_secret = environ["wix_secret"] else: fro...
ceball/param
tests/API1/testdefaults.py
""" Do all subclasses of Parameter supply a valid default? """ from param.parameterized import add_metaclass from param import concrete_descendents, Parameter # import all parameter types from param import * # noqa from param import ClassSelector from . import API1TestCase positional_args = { ClassSelector: (obj...
c4mb0t/django-setman
setman/helpers.py
from setman import settings from setman.utils import is_settings_container __all__ = ('get_config', ) def get_config(name, default=None): """ Helper function to easy fetch ``name`` from database or django settings and return ``default`` value if setting key isn't found. But if not ``default`` value...
canvasnetworks/canvas
website/canvas/search.py
import threading import solr from django.conf import settings class SolrConnection(threading.local): _connection = None def __init__(self, core): threading.local.__init__(core) self.core = core @property def connection(self): if self._connection: return s...
chintak/scikit-image
skimage/morphology/setup.py
#!/usr/bin/env python import os from skimage._build import cython base_path = os.path.abspath(os.path.dirname(__file__)) def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs config = Configuration('morphology', parent_package, top_...
DrOctogon/unwash_ecom
oscar/test/testcases.py
from six.moves import http_client from django.core.urlresolvers import reverse from django.contrib.auth.models import Permission from django_webtest import WebTest from purl import URL from oscar.core.compat import get_user_model User = get_user_model() def add_permissions(user, permissions): """ Grant pe...
Ecotrust/growth-yield-batch
scripts/blm/blm_stratified_sampling_batch.py
import sqlite3 import math import random DATABASE = "master.sqlite" RATIO = 0.05 SAMPLE_NAME = 'sample4' if __name__ == "__main__": con = sqlite3.connect(DATABASE) cur = con.cursor() # UPDATE all rows query = """UPDATE stands SET batch = 'all';""" print query cur.execute(query) print ...
Kitware/arctic-viewer
scripts/examples/vtk/medical/head-ct-volume.py
# ----------------------------------------------------------------------------- # Download data: # - Browser: # http://midas3.kitware.com/midas/folder/10409 => VisibleMale/vm_head_frozenct.mha # - Terminal # curl "http://midas3.kitware.com/midas/download?folders=&items=235235" -o vm_head_frozenct.mha # ----...
shankari/e-mission-server
emission/net/usercache/formatters/ios/transition.py
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * import logging import emission.core.wrapper.transition as et import emission...
intelie/pycollector
src/third/SimpleCV/MachineLearning/query_imgs/get_imgs_geo_gps_search.py
#!/usr/bin/python # # So this script is in a bit of a hack state right now. # This script reads # # # # Graciously copied and modified from: # http://graphics.cs.cmu.edu/projects/im2gps/flickr_code.html #Image querying script written by Tamara Berg, #and extended heavily James Hays #9/26/2007 added dynamic timesli...
RonnyPfannschmidt/borg
src/borg/testsuite/crypto.py
from binascii import hexlify, unhexlify from ..crypto.low_level import AES256_CTR_HMAC_SHA256, AES256_OCB, CHACHA20_POLY1305, UNENCRYPTED, \ IntegrityError, blake2b_256, hmac_sha256, openssl10 from ..crypto.low_level import bytes_to_long, bytes_to_int, long_to_bytes from ..crypto.low_lev...
mrshu/iepy
iepy/webui/corpus/migrations/0005_auto_20140923_1502.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('corpus', '0004_auto_20140923_1501'), ] operations = [ migrations.RenameField( model_name='labeledrelationevidenc...
cztomczak/boovix
boovix1/utils/static_types.py
# Copyright (c) 2014, The Boovix authors that are listed # in the AUTHORS file. All rights reserved. Use of this # source code is governed by the BSD 3-clause license that # can be found in the LICENSE file. """ Function annotations in Python 3: http://legacy.python.org/dev/peps/pep-3107/ Type checking in Python 3: *...
AversivePlusPlus/AversivePlusPlus
tools/conan/conans/client/new.py
conanfile = """from conans import ConanFile, CMake, tools import os class {package_name}Conan(ConanFile): name = "{name}" version = "{version}" license = "<Put the package license here>" url = "<Package recipe repository url here, for issues about the package>" settings = "os", "compiler", "build_...
ric2b/Vivaldi-browser
update_notifier/thirdparty/wxWidgets/misc/scripts/png2c.py
#!/usr/bin/python # This script is a slightly modified version of the original found at # # https://wiki.wxwidgets.org/Embedding_PNG_Images-Bin2c_In_Python # # without any copyright attribution so it is assumed it can be used under # wxWindows licence as the rest of the wiki material. import sys import os impor...
phobson/bokeh
examples/app/surface3d/surface3d.py
from os.path import dirname, join from bokeh.core.properties import Any, Dict, Instance, String from bokeh.models import ColumnDataSource, LayoutDOM # This defines some default options for the Graph3d feature of vis.js # See: http://visjs.org/graph3d_examples.html for more details. Note # that we are fixing the size ...
thonkify/thonkify
src/lib/telegram/contrib/botan.py
import logging from future.moves.urllib.parse import quote from future.moves.urllib.error import HTTPError, URLError from future.moves.urllib.request import urlopen, Request logging.getLogger(__name__).addHandler(logging.NullHandler()) class Botan(object): """This class helps to send incoming events to your bot...
MattClarke131/league
app/league/dashboard/views.py
# -*- coding: utf-8 -*- """Dashboard.""" from flask import (Blueprint, current_app, flash, redirect, render_template, request, url_for) from flask_login import login_required, login_user from league.dashboard.forms import (GameCreateForm, PlayerCreateForm, PlayerD...
arunchaganty/presidential-debates
third-party/stanza/stanza/research/output.py
import sys def output_results(results, split_id='results', output_stream=None): ''' Log `results` readably to `output_stream`, with a header containing `split_id`. :param results: a dictionary of summary statistics from an evaluation :type results: dict(str -> object) :param str split_id: an...
nmiranda/dedupe
tests/test_crossvalidation.py
import dedupe import unittest import numpy class KFoldsTest(unittest.TestCase): def test_normal_k(self) : l = list(dedupe.crossvalidation.kFolds(numpy.array(range(6)), 6)) assert len(l) == 6 def test_small_k(self) : self.assertRaises(ValueError, lambda : lis...
rnixx/kivy
kivy/tests/test_filechooser_unicode.py
# -*- coding: utf-8 -*- # XXX: please be careful to only save this file with an utf-8 editor import unittest import pytest from kivy import platform unicode_char = chr class FileChooserUnicodeTestCase(unittest.TestCase): def setUp(self): self.skip_test = platform == 'macosx' or platform == 'ios' ...
FinnStutzenstein/OpenSlides
server/openslides/agenda/migrations/0009_item_tags.py
# Generated by Django 2.2.12 on 2020-05-14 10:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("core", "0031_projector_default_height"), ("agenda", "0008_default_ordering_item"), ] operations = [ migrations.AddField( ...
dungvtdev/upsbayescpm
bayespy/inference/vmp/nodes/tests/test_categorical_markov_chain.py
################################################################################ # Copyright (C) 2014 Jaakko Luttinen # # This file is licensed under the MIT License. ################################################################################ """ Unit tests for bayespy.inference.vmp.nodes.categorical_markov_chai...
Anderson-Lab/anderson-lab.github.io
csc_466_2021_spring/MLCode/Ch18/gp.py
# Code from Chapter 18 of Machine Learning: An Algorithmic Perspective (2nd Edition) # by Stephen Marsland (http://stephenmonika.net) # You are free to use, change, or redistribute the code in any way you wish for # non-commercial purposes, but please maintain the name of the original author. # This code comes with n...
djpine/pyman
Book/chap7/Supporting Materials/daysBtwnDates.py
import numpy as np def leapyear(year): if year%4 != 0: return False elif year%400 == 0: return True elif year%100 == 0: return False else: return True def leapyearcount(years): a = np.where(years%4==0, 1, 0) b = np.where(years%100==0, -1, 0) c = np.where(yea...
slarosa/QGIS
python/plugins/sextante/algs/Explode.py
# -*- coding: utf-8 -*- """ *************************************************************************** Explode.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************************...
FreedomBen/terminator
terminatorlib/prefseditor.py
#!/usr/bin/python """Preferences Editor for Terminator. Load a UIBuilder config file, display it, populate it with our current config, then optionally read that back out and write it to a config file """ import os import gtk from util import dbg, err import config from keybindings import Keybindings, KeymapError f...
innotechsoftware/Quantum-GIS
python/plugins/sextante/saga/SagaAlgorithm.py
# -*- coding: utf-8 -*- """ *************************************************************************** SagaAlgorithm.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************************...
jirikuncar/kwalitee
kwalitee/wsgi.py
# -*- coding: utf-8 -*- # # This file is part of kwalitee # Copyright (C) 2014, 2015 CERN. # # kwalitee 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) an...
brownian/frescobaldi
frescobaldi_app/lydocument.py
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2013 - 2014 by Wilbert Berendsen # # 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 ...
David-Amaro/odoo-brazil-banking
l10n_br_account_payment_boleto/models/__init__.py
# -*- encoding: utf-8 -*- ############################################################################## # # Account Payment Boleto module for Odoo # Copyright (C) 2012-2015 KMEE (http://www.kmee.com.br) # @author Luis Felipe Miléo <mileo@kmee.com.br> # # This program is free software: you can redistribute ...
Eric-Gaudiello/tensorflow_dev
tensorflow_home/tensorflow_venv/lib/python3.4/site-packages/tensorflow/python/ops/seq2seq.py
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
ctrlaltdel/neutrinator
vendor/openstack/tests/unit/cloud/test_port.py
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # 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...
Eigenlabs/EigenD
pisession/oldfixture.py
# # Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com # # This file is part of EigenD. # # EigenD 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) a...
stoqs/stoqs
stoqs/loaders/CANON/loadCN13ID_october2013.py
#!/usr/bin/env python __author__ = 'Mike McCann,Duane Edgington,Reiko Michisaki' __copyright__ = '2013' __license__ = 'GPL v3' __contact__ = 'mccann at mbari.org' __doc__ = ''' Master loader for all Worden's CN13ID Western Flyer cruise in October 2013 CN13ID: CANON 2013 Interdisciplinary Mike McCann MBARI 23 ...
mobiuscoin/p2pool-mobi
p2pool/work.py
from __future__ import division from collections import deque import base64 import random import re import sys import time from twisted.internet import defer from twisted.python import log import bitcoin.getwork as bitcoin_getwork, bitcoin.data as bitcoin_data from bitcoin import helper, script, worker_interface fro...
alirizakeles/tendenci
tendenci/apps/directories/choices.py
from django.utils.translation import ugettext_lazy as _ DURATION_CHOICES = ( (14, _('14 Days from Activation date')), (60, _('60 Days from Activation date')), (90,_('90 Days from Activation date')), (120,_('120 Days from Activation date')), (365,_('1 Year from Activation date')), ) ADMIN_DURATION_C...
jicruz/heroku-bot
lib/youtube_dl/extractor/dailymotion.py
# coding: utf-8 from __future__ import unicode_literals import re import json import itertools from .common import InfoExtractor from ..utils import ( determine_ext, error_to_compat_str, ExtractorError, int_or_none, parse_iso8601, sanitized_Request, str_to_int, unescapeHTML, mimet...
shirou/ansible
test/units/TestModuleUtilsBasic.py
import os import tempfile import unittest from nose.tools import raises from nose.tools import timed from ansible import errors from ansible.module_common import ModuleReplacer from ansible.utils import md5 as utils_md5 TEST_MODULE_DATA = """ from ansible.module_utils.basic import * def get_module(): return Ans...
Gnomescroll/Gnomescroll
server/waflib/Tools/suncxx.py
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006-2010 (ita) # Ralf Habacker, 2006 (rh) import os from waflib import Utils from waflib.Tools import ccroot, ar from waflib.Configure import conf @conf def find_sxx(conf): """ Detect the sun C++ compiler """ v = conf.env cc = None if v['CXX']: cc = v['CXX...
ddserver/ddserver
ddserver/__main__.py
''' Copyright 2013 Sven Reissmann <sven@0x80.io> This file is part of ddserver. ddserver is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
Tanmay28/coala
coalib/tests/bears/LocalBearTest.py
import sys sys.path.insert(0, ".") import unittest from coalib.settings.Section import Section from coalib.bears.LocalBear import LocalBear, BEAR_KIND class LocalBearTest(unittest.TestCase): def test_api(self): test_object = LocalBear(Section("name"), None) self.assertRaises(NotImplementedError, ...
santhoshtr/silpa
src/silpa/modules/dictionary/dictionary.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # Dictionary # Copyright 2008 Santhosh Thottingal <santhosh.thottingal@gmail.com> # http://www.smc.org.in # # 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 Softw...
Stanford-Online/edx-ora2
openassessment/workflow/test/test_api.py
import ddt from mock import patch from nose.tools import raises from django.db import DatabaseError from django.test.utils import override_settings from openassessment.assessment.models import PeerWorkflow, StudentTrainingWorkflow from openassessment.test_utils import CacheResetTest import openassessment.workflow.api...
ingadhoc/odoo-law-tracking
law_tracking_x/commission_treatment.py
# -*- coding: utf-8 -*- ############################################################################## # # Law Follow Up # Copyright (C) 2013 Sistemas ADHOC # No email # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as...
alanjw/GreenOpenERP-Win-X86
python/Lib/pstats.py
"""Class for printing reports on profiled python code.""" # Written by James Roskind # Based on prior profile module by Sjoerd Mullender... # which was hacked somewhat by: Guido van Rossum # Copyright Disney Enterprises, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement # # License...
jmesteve/saas3
openerp/addons_extra/l10n_es_aeat/aeat_report.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2011 # Pexego Sistemas Informáticos. (http://pexego.es) All Rights Reserved # Luis Manuel Angueira Blanco (Pexego) # Copyright (C) 2013 # Ignacio Ibeas - Acysos S.L. (...
system7-open-source/imamd
imam/imam/preset/local_preset.py
"""local_preset.py is imported by default_settings.py when no URL environment variable is defined. """ # # Alter this skeleton to agree with the needs of your local environment # Note: if you are using a URL 12-Factor configuration scheme, you will not be using this file # important thing we do here is to import all ...
iulian787/spack
var/spack/repos/builtin/packages/perl-io-socket-ssl/package.py
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import inspect class PerlIoSocketSsl(PerlPackage): """SSL sockets with IO::Socket interface""" ...
timvideos/flumotion
flumotion/component/base/baseadminnode.py
# -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. # Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. # # This file may be distributed and/or mo...
yrobla/pyjuegos
pgzero/music.py
from pygame.mixer import music as _music from .loaders import ResourceLoader from . import constants __all__ = [ 'rewind', 'stop', 'fadeout', 'set_volume', 'get_volume', 'get_pos', 'set_pos', 'play', 'queue', 'pause', 'unpause', ] _music.set_endevent(constants.MUSIC_END) class _MusicLoader(ResourceLoader):...
rancher/rancher
tests/validation/tests/rke/test_install_config.py
from .conftest import * # NOQA from .common import * # NOQA def test_install_config_1(test_name, cloud_provider, rke_client, kubectl): """ Node Address specified as just IP and using only this in the node spec Specific kubernetes_version can be used """ rke_template = 'cluster_install_config_11....
ilveroluca/pydoop
examples/pydoop_script/grep.py
# BEGIN_COPYRIGHT # # Copyright 2009-2015 CRS4. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...