input
stringlengths
2.65k
237k
output
stringclasses
1 value
# coding: utf-8 # Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department # Distributed under the terms of "New BSD License", see the LICENSE file. from __future__ import print_function # import os import sys import copy import numpy as np from collections import Orde...
import MySQLdb import suds from suds.client import Client from suds.xsd.doctor import Import, ImportDoctor from suds.plugin import MessagePlugin import traceback class MagentoApiMessagePlugin(MessagePlugin): def marshalled(self, context): body = context.envelope.getChild("Body") call = context.envelope.childAtPath(...
""" Base class for gdb-remote test cases. """ from __future__ import division, print_function import errno import os import os.path import random import re import select import socket import subprocess import sys import tempfile import time from lldbsuite.test import configuration from lldbsuite.test.lldbtest import...
<reponame>miguelsousa/robothon # pylint: disable-msg=E1002 """MA: a facility for dealing with missing observations MA is generally used as a numpy.array look-alike. by <NAME>. Copyright 1999, 2000, 2001 Regents of the University of California. Released for unlimited redistribution. Adapted for numpy_core 2005 by <NAME...
#!/usr/bin/env python3 """ This module contains the make-toc function which tries to create a valid table of contents file for SE projects. Strictly speaking, the generate_toc() function should be a class member of SeEpub. But the function is very big and it makes editing easier to put in a separate file. """ from en...
of the chief satellite (must be between 0 and 1) cP : float Power charging urgency constant. Higher values implies a lower chance of the spacecraft transiting into charging mode at urgently lower power levels. Returns ------- T : numpy.ndarray Transition matrix of size (N+1) x (N+1), where N is the number of ...
<filename>f3dasm/simulator/abaqus/abaqus_src/modelling/step.py ''' Created on 2020-04-08 14:55:21 Last modified on 2020-04-22 16:06:23 Python 2.7.16 v0.1 @author: <NAME> (<EMAIL>) Main goal --------- Define abaqus steps. References ---------- 1. Simulia (2015). ABAQUS 2016: Scripting Reference Guide ''' #%% import...
= params["R18"] R19 = params["R19"] R20 = params["R20"] R21 = params["R21"] return ( Rs + (R1 / (1 + w * 1j * t_values[0])) + (R2 / (1 + w * 1j * t_values[1])) + (R3 / (1 + w * 1j * t_values[2])) + (R4 / (1 + w * 1j * t_values[3])) + (R5 / (1 + w * 1j * t_values[4])) + (R6 / (1 + w * 1j * t_values[5])) + (R...
# -*- coding: utf-8 -*- import abc import logging import datetime import functools import httplib as http import time import urlparse import uuid from flask import request from oauthlib.oauth2.rfc6749.errors import MissingTokenError from requests.exceptions import HTTPError as RequestsHTTPError from modularodm impor...
% {"value": value, "lineno": lineno, }) return False value = value enumerations = ['yes', 'no', 'highlighted'] if value not in enumerations: lineno = self.gds_get_node_lineno_() self.gds_collector_.add_message('Value "%(value)s"%(lineno)s does not match xsd enumeration restriction on renderInstructionsType1' % {"...
<gh_stars>1-10 """ Copyright 2019 Inmanta 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...
<reponame>icesat-2UT/PhoREAL<filename>source_code/icesatBin.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Oct 13 13:45:53 2020 @author: eguenther """ import os import argparse import ctypes from shutil import copyfile from numpy.ctypeslib import ndpointer import pandas as pd import numpy as np...
# Copyright 2021 Hathor Labs # # 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, soft...
<reponame>mchelen-gov/integrations-core # (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import random import time from typing import Any, Dict, List, Optional, Sequence, Set, Tuple, cast import click from .....fs import basepath, chdir from .....subpr...
<filename>Cinema 4D/appdir_common/plugins/DazToC4D/lib/Materials.py from __future__ import division from xml.etree.ElementTree import TreeBuilder import c4d import os import sys from shutil import copyfile from c4d import documents, gui from .Utilities import dazToC4Dutils from .CustomIterators import ObjectIterator, ...
from typing import Optional, Union, Sequence import math import numpy as np import torch from torch import nn from torch.nn.init import kaiming_normal_ from models.gls_parameters.switch_link_functions import ( IndividualLink, SharedLink, IdentityLink, ) from torch_extensions.ops import ( cov_and_chol_from_invcholes...
from django.contrib import admin from django import forms from django.forms import ValidationError from django.forms.utils import ErrorList from django.db.models import Count from django.urls import reverse from django.utils.safestring import mark_safe from django.contrib.postgres.forms.ranges import RangeWidget from ...
self._drop_collection_if_exists("mycoll9") collection = self.schema.create_collection("mycoll9") collection.add( { "_id": 1, "name": "joy", "age": 21, "additionalinfo": { "company": "xyz", "vehicle": "bike", "hobbies": [ "reading", "music", "playing", {"a1": "x", "b1": "y", "c1": "z"}, ], }, } ).execu...
request.method == 'POST': post_data = request.json stg_list = [] code_value = [] for x in post_data: result = {} c_code = FUND_ESSENTIAL.query.filter_by(wind_code_s=x[1]).first() if c_code is not None: result['wind_code'] = c_code.wind_code else: result['wind_code'] = x[1] result['value'] = x[2] code_value....
import random import numpy as np import torch import torch.nn as nn from torch.nn import Parameter import torch.nn.functional as F from torch_geometric.nn.conv import MessagePassing from torch_geometric.utils import ( remove_self_loops, add_self_loops, softmax, dropout_adj, is_undirected, accuracy, negative_sa...
# Import import asyncio import random from itertools import cycle import discord from discord.ext import commands # Framework import Framework # Cog Initialising class CASINO(commands.Cog): def __init__(self, client): self.client = client self.Uccount = Framework.Mongo.Uccount(client) self.settings = \ { "G...
<filename>codes/orbitm_run_stk.py # -*- coding: utf-8 -*- ############################################################################### ############################################################################### ## ## ## _____ ___ ____ ___ _____ ______ ## ## | _ | _ \| _ \|_ _||_ _| | | ## ## | |_| | <| _ < | | ...
<filename>src/pykeen/losses.py<gh_stars>10-100 # -*- coding: utf-8 -*- r"""Loss functions integrated in PyKEEN. Rather than re-using the built-in loss functions in PyTorch, we have elected to re-implement some of the code from :mod:`pytorch.nn.modules.loss` in order to encode the three different links of loss functio...
long, and supports both new lines, indents and embedded links. Indents of 5 spaces are recommended. Embedded links should look like so; `[displayed text](URL)`. The credits should be passed inside a multi-line code block in order for new lines and tabs to work correctly. If `remove` is passed instead then the additi...
0.10122213733079687, 0.10815111064556049, 0.15441507348973532, 0.21250258967874155, 0.24896898089962366, 0.3253959634471055, 0.42135517906718983, 0.5055255686061185, 0.551874739010259, 0.6575563227830395, 0.7177979465884874, 0.7330599486607571, 0.7352348966378153, 0.735446432018303, 0.7936409320282931, 0...
<filename>utils/maketarget/maketarget.py # You may use, modify and redistribute this module under the terms of the GNU GPL. """ Utility function for creating a morph target (part of the development functionality). =========================== =============================================================== Project Name:...
data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for t...
<reponame>sebastian-software/jasy<gh_stars>1-10 # # Jasy - Web Tooling Framework # Copyright 2013-2014 <NAME> # import re import json import jasy.style.tokenize.Tokenizer as Tokenizer import jasy.style.parse.Node as Node import jasy.style.Util as Util import jasy.core.Console as Console ascii_encoder = json.JSONEnco...
<reponame>c64cryptoboy/ChiptuneSAK<filename>chiptunesak/emulator_6502.py # 6502 instruction-level emulation # # This module emulates 6502 machine language program execution at an instruction-level # of granularity (not a cycle-level). # # runcpu() can be called in a while loop. (Non-error) Exit conditions: # - BRK # - ...
<filename>data_dl.py<gh_stars>0 #!/usr/bin/env python3 """ Open source data downloader Created: 10/15/2020 <NAME> (<EMAIL>) """ __doc__ = """ This python library takes in a list of subjects, the data source, and the data type you want, and downloads them. It then can delete them. """ import pkg_resources as pkgrf im...
<filename>finetune/nn/group_target_blocks.py import math import functools import tensorflow as tf from tensorflow_addons.text.crf import crf_log_likelihood from scipy.optimize import linear_sum_assignment from finetune.base_models.gpt.featurizer import attn, dropout, norm from finetune.util.shapes import shape_list, m...
import IPython import bisect import threading import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar from matplotlib.figure import Figure fr...
<reponame>egiltane/tsd-file-api # -*- coding: utf-8 -*- """ Run this as: python -m tsdfileapi.tests.test_file_api test-config.yaml ------------------------------------------------------------------------------- Exploring Transfer-Encoding: chunked with a minimal python client. From: https://developer.mozilla.org/en...
0.18 34.13 0.02 1 1.33e+06 2821.26 | 1578.01 0.0 244 0 | 1.60 0.18 34.10 0.02 1 1.34e+06 2821.26 | 2315.74 907.4 361 142 | 1.64 0.19 34.61 0.02 1 1.36e+06 2821.26 | 1068.61 0.0 185 0 | 1.65 0.18 34.59 0.02 1 1.37e+06 2821.26 | 780.38 0.0 119 0 | 1.68 0.19 35.22 0.02 1 1.38e+06 2821.26 | 2128.08 909.8 340 138 | 1.68 0.1...
#! /usr/bin/env python import mock import errno import socket import ssl from collections import deque from nsq import connection from nsq import constants from nsq import exceptions from nsq import response from nsq import util from nsq import json from common import MockedSocketTest, HttpClientIntegrationTest cl...
<reponame>lycantropos/symba import math from collections import defaultdict from functools import reduce from numbers import Real from typing import (Any, DefaultDict, Dict, Iterable, List, Optional, Sequence, Tuple, Union) from reprit.base import generate_repr from .constant import (Constant, Finite, NaN, ...
ave will average the outputs, used in the output layer def __init__(self, adjancy, input_dim, output_dim, activation_func, name, total_nodes, attention_head = 1, dropout_prob = None, bias = False, sparse = False, row = None, col = None, indices = None, num_nodes = None, aggregate_mode = 'concate'): su...
""" Bifurcation point classes. Each class locates and processes bifurcation points. * _BranchPointFold is a version based on BranchPoint location algorithms * BranchPoint: Branch process is broken (can't find alternate branch -- see MATCONT notes) <NAME>, March 2006 """ from __future__ import absolute_import, pri...
<gh_stars>0 import math import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers from easydict import EasyDict as edict from tensorflow.python.keras import initializers from visualdet3d.networks.heads.losses import SigmoidFocalLoss, ModifiedSmoothL1Loss from visualdet3d.networks.heads.a...
import os import re import itertools import time from pycparser import CParser, c_ast from srcgen.python import PythonModule from collections import OrderedDict include_pattern = re.compile(r'^\s*#\s*include\s*[<"](.+?)[">]\s*$', re.IGNORECASE) define_pattern = re.compile(r'^\s*#\s*define\s+(\w+)(?:\((.*?)\))?\s*(.*)...
<reponame>remanevy/Package # Copyright 2013-2016 The Salish Sea MEOPAR contributors # and The University of British Columbia # 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.apach...
import json from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.sites.shortcuts import get_current_site from django.core.mail import EmailMessage from django.db.models import Q from django.http import JsonResponse from django.shortcuts ...
np.isclose(integrals, quantpoints) assert(type(quantiles) is np.ndarray) self.quantiles = (quantpoints, quantiles) if vb: print("Resulting "+str(len(quantiles))+" quantiles: "+str(self.quantiles)) self.limits = (min(limits[0], np.min(quantiles)), max(limits[-1], np.max(quantiles))) self.last = 'quantiles' return...
1, 0, 0, 0, 0... # ses-2 - ses-1: -1, 0, 0, 0, etc. contrast_one.update({ "contrasts": "{0}_{1} - {2}_{3}".format(condition_type, conditions[0], condition_type, conditions[1])}) contrast_two.update({ "contrasts": "{0}_{1} - {2}_{3}".format(condition_type, conditions[1], condition_type, conditions[0])}) con...
is NOT visible # then we need to use the data of the refering node def _resolve(node): if node.visible and node.reference_node and not node.reference_node.visible: node.children = node.reference_node.children for referent in node.reference_node.referents: referent.reference_node = node node.reference_node = Non...
import dash import dash_core_components as dcc import dash_html_components as html import plotly.graph_objs as go from ECAgent.Core import Model # Can be used to customize CSS of Visualizer external_stylesheets = ['https://rawgit.com/BrandonGower-Winter/ABMECS/master/Assets/VisualizerCustom.css', 'https://rawgit.com...
# 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 the Li...
# Copyright (c) 2016 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
import asyncio from telethon.errors.rpcerrorlist import YouBlockedUserError from dragons import BOTLOG, BOTLOG_CHATID, drgub from ..core.logger import logging from ..core.managers import edit_delete, edit_or_reply from ..helpers.utils import _format, get_user_from_event, reply_id from ..sql_helper.global_collectionj...
<filename>app/baremetal_service/repository/service_model.py # This is an auto-generated Django model module. # You'll have to do the following manually to clean this up: # * Rearrange models' order # * Make sure each model has one field with primary_key=True # * Make sure each ForeignKey has `on_delete` set to the desi...
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) <NAME> <<EMAIL>> # This program is published under a GPLv2 license """ Implementation of the configuration object. """ from __future__ import absolute_import from __future__ import print_function import functo...
import datetime import getpass import json import sys import mgear import mgear.core.icon as ico import pymel.core as pm from maya.app.general.mayaMixin import MayaQWidgetDockableMixin from mgear import shifter from mgear.core import transform, node, attribute, applyop, pyqt, utils, curve from mgear.vendor.Qt import Q...
"Behavior_CloakOn_Banshee_quick", cmd_quick, 392, 3676), Function.ability(28, "Behavior_CloakOn_Ghost_quick", cmd_quick, 382, 3676), Function.ability(29, "Behavior_GenerateCreepOff_quick", cmd_quick, 1693), Function.ability(30, "Behavior_GenerateCreepOn_quick", cmd_quick, 1692), Function.ability(31, "Behavior_HoldF...
# ##### 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 distributed ...
CHRM_SIZE = clr.chromsizes[chr1] CHUNK_SIZE = max(2 * distance_in_bp / res, 2000) start = 0 end = min(CHUNK_SIZE * res, CHRM_SIZE) # CHUNK_SIZE*res result = [] val = [] ########################### if chr1 == chr2: # try: # normVec = clr.bins()['weight'].fetch(chr1) # result = clr.matrix(balance=True,sparse=Tr...
""" Written by <NAME> and contributed to by <NAME>. Using the NOAA rubrics Dr Habermann created, and his work conceptualizing the documentation language so that rubrics using recommendations from other earth science communities can be applied to multiple metadata dialects as a part of the USGeo BEDI and NSF DIBBs proje...
'__file__'): pkgdir = [] else: pkgdir = getattr(self.module, '__path__', [path.dirname(self.module.__file__)]) if self.is_package(): for (_, root, _) in pkgutil.iter_modules(pkgdir): # Ignore if this module was already doc'd. if root in self.doc: continue # Ignore if it isn't exported, unless we've specifica...
there's only one possible letter left, select it keyboard.set_selected_key(self.possible_alphabet[0]) keyboard.render_keys() elif input in [B.KEY_RIGHT, B.KEY_LEFT, B.KEY_UP, B.KEY_DOWN] and ret_val in self.possible_alphabet: # Live joystick movement; haven't locked this new letter in yet. # Replace the last let...
#walks chronologicly through the booking #intervals of each resource, and reduces #the effort for each free interval #until it becomes 0 alloc_effort = effort effort -= task.performed_effort while effort > 0: date = next_date interval_resource = [] interval_end = to_start(sys.maxint) factor = 0 for r in r...
#!/usr/bin/env python """ Variant of pyscroll.data.TileMapData. ScrollTest was copied and modified from pyscroll/apps/demo.py. Source copied and modified from https://github.com/bitcraft/pyscroll """ from typing import List, Optional import collections import pygame import pyscroll from GameInfo import GameInfo fro...
import argparse import os import sys import random import numpy as np import scipy import torch import torch.optim as optim import torch.multiprocessing as mp import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import torch.utils.data from params import Params import pickle impo...
+ " : " + str(e.args) + " : " + str(e) else: ERROR_MESSAGE += "Error: You do not have permission to access this form type from a different project. Your action has been logged and sent to the admin" else: ERROR_MESSAGE += "Error: You do not have permission to access this tool. Your action has been logged and sent...
<reponame>The-Ludwig/dnn_reco from __future__ import division, print_function import numpy as np import tensorflow as tf # Check and allow for newer TFScripts versions try: from tfscripts.compat.v1 import layers as tfs except ImportError: from tfscripts import layers as tfs from dnn_reco.modules.models.utils.model_...
<filename>solnml/components/models/object_detection/nn_utils/retinanet_utils.py """ RetinaNet code borrowed from https://github.com/yhenon/pytorch-retinanet/tree/master/retinanet """ import numpy as np import torch import torch.nn as nn class Anchors(nn.Module): def __init__(self, pyramid_levels=None, strides=None,...
from __future__ import print_function import numpy, os, spacy, pickle, sys, re, random from itertools import * import multiprocessing # load spacy model for nlp tools encoder = spacy.load('en_core_web_md') pos_tag_idxs = {'#': 1, '$': 2, "''": 3, '(': 4, ')': 5, ',': 6, '-LRB-': 7, '-PRB-': 8, '.': 9, ':': 10, 'ADD':...
<reponame>sloebrich/sage<filename>src/sage/manifolds/continuous_map.py<gh_stars>1-10 r""" Continuous Maps Between Topological Manifolds :class:`ContinuousMap` implements continuous maps from a topological manifold `M` to some topological manifold `N` over the same topological field `K` as `M`. AUTHORS: - <NAME>, <NA...
# from: https://github.com/ericPrince/optical-flow/blob/master/optical_flow.py import numpy as np import scipy.ndimage from functools import partial import skimage def poly_exp(f, c, sigma): """ Calculates the local polynomial expansion of a 2D signal, as described by Farneback Uses separable normalized correl...
'subscribe_to_exploration', self._null_fn ): # User B starts a feedback thread. feedback_services.create_thread( 'exploration', self.EXP_ID_1, self.user_b_id, 'subject', 'text') # User C adds to that thread. thread_id = feedback_services.get_all_threads( 'exploration', self.EXP_ID_1, False)[0].id feedback_servi...
from PyQt5 import QtWidgets as Qtw from PyQt5 import QtCore as Qtc from PyQt5 import QtGui as Qtg from datetime import datetime, timedelta from bu_data_model import BU366 import sys import socket import time import pandas as pd from openpyxl.chart import ScatterChart, Reference, Series class CheckingThrea...
#----------------------------------------------------------------------------- # Do NOT modify or remove this copyright # # Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licens...
Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.406823, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime ...
# SRE test harness for the Python regression suite # this is based on test_re.py, but uses a test function instead # of all those asserts import sys sys.path=['.']+sys.path from test_support import verbose, TestFailed, have_unicode import sre import sys, os, string, traceback # # test support def test(expression, ...
= Constraint(expr= m.x546 + 1.26558121681553*m.b948 <= 1.26558121681553) m.c466 = Constraint(expr= m.x547 + 1.26558121681553*m.b949 <= 1.26558121681553) m.c467 = Constraint(expr= m.x608 - 0.572481933717686*m.b947 <= 0) m.c468 = Constraint(expr= m.x609 - 0.572481933717686*m.b948 <= 0) m.c469 = Constraint(expr= m.x61...
"""Tests for static validation.""" from datetime import datetime import numpy as np import pandas as pd from delphi_validator.datafetcher import FILENAME_REGEX from delphi_validator.report import ValidationReport from delphi_validator.static import StaticValidator class TestCheckMissingDates: def test_empty_filelis...
= subtenant + '/' + uid if (apiType == 'N'): uri = URI_ATMOS_NAMESPACE_PATH.format(keypath) else : uri = URI_ATMOS_OBJECTS_OID.format(keypath) print uri content_type = '*/*' self._headers['x-emc-signature'] = self.atmos_hmac_base64_sig('GET', content_type, uri+'?acl', self._headers['date'], secret) response = s...
<gh_stars>0 #!/usr/bin/env python # coding: utf-8 # # Generate [dividiti](http://dividiti.com)'s submissions to [MLPerf Inference v0.5](https://github.com/mlperf/inference/tree/master/v0.5) # <a id="overview"></a> # ## Overview # This Jupyter notebook covers [dividiti](http://dividiti.com)'s submissions to [MLPerf I...
workflow global to support the onExit handler return { 'name': 'download', 'metadata': { 'labels': {'app': 'transcoder'}, }, 'retryStrategy': { 'retryPolicy': 'Always', 'limit': 3, 'backoff': { 'duration': '5s', 'factor': 2 }, }, 'inputs': {'parameters' : [{'name': 'original'}, {'name': 'url'}]}, 'nodeS...
# Copyright (c) 2020-2021 impersonator.org authors (<NAME> and <NAME>). All rights reserved. from collections import OrderedDict import torch import torch.nn as nn def make_layers(block, no_relu_layers): layers = [] for layer_name, v in block.items(): if 'pool' in layer_name: layer = nn.MaxPool2d(kernel_size=v[...
}, 'location_map': { 'id': 'query', 'attributes': 'query', }, 'collection_format_map': { 'attributes': 'csv', } }, headers_map={ 'accept': [ 'application/json' ], 'content_type': [], }, api_client=api_client ) self.portfolio_transaction_modify_post_endpoint = _Endpoint( settings={ 'response_type': ( ...
fres = stringify(dicttoxml(res)) fmt_ext = 'xml' if pretty: zdom = minidom.parseString(fres) fres = zdom.toprettyxml() else: raise ValueError(f"Output format {out_format!r} is not a valid output format.") if empty(destination, itr=True) or destination in ['', '-', '/dev/stdout']: if pretty: print_std(fres) ...
params["organizationgroup"] is None ): # noqa: E501 raise ValueError( "Missing the required parameter `organizationgroup` when calling `get_all_roles_associated_with_organization_group`" ) # noqa: E501 collection_formats = {} path_params = {} if "organizationgroup" in params: path_params["organizationgroup"] ...
= data_array[:, 4] temperature = data_array[:, 5] crowdedness = data_array[:, 6] knowledge_of_surroundings = data_array[:, 7] season = data_array[:, 8] budget = data_array[:, 9] daytime = data_array[:, 10] weather = data_array[:, 11] companion = data_array[:, 12] mood = data_array[:, 13] weekday = d...
<reponame>jp2011/spatial-poisson-mixtures import numpy as np from scipy.spatial.distance import cdist from sklearn.gaussian_process.kernels import Matern, RBF from src.numeric.kronecker_algebra import kron_invert_matrices, kron_mv_prod, kron_log_det class BetaPriorWithIntercept: """ Normal-InvGamma prior for the ...
import gym import time import os import sys import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from gym import wrappers from gym.wrappers.monitoring import stats_recorder, video_recorder from datetime import datetime import tensorflow as tf import random from sklearn.preprocessin...
""" self.stdout.append("\r\n") def WriteLine2(self, runspace, pipeline, value): """ MI: 16 SHOULD write the specified line on the hosting application. https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.host.pshostuserinterface.writeline :param runspace: The runspace the host call relates ...
<gh_stars>1-10 import concurrent.futures import heisenberg.library.shooting_method_objective import heisenberg.library.util import heisenberg.util import itertools import numpy as np import os import sys import traceback import vorpy import vorpy.pickle import vorpy.symplectic_integration.exceptions subprogram_descrip...
#!/usr/bin/env python from __future__ import print_function import sys import os from xml.etree import ElementTree from glob import glob from collections import OrderedDict import re import argparse validName = re.compile('^[a-zA-Z0-9_]+$') class Device: # dummy pass def getText(element): if element is None: ...
<reponame>calvofl0/rhd_dq #!/usr/bin/env python # -*- coding: utf-8 -*- ''' This nMBP module locates non-magnetic bright points using an indicator based on three parameters: temperature, vorticity and depth at isosurface tau=1. This indicator is a growing function of its parameters. Local maxima above some threshold ...
False) ])) transitions.append(fac.Transition(st_25, [ fac.UpdateInstruction(cc_22, False) ])) transitions.append(fac.Transition(st_26, [ fac.UpdateInstruction(cc_22, False) ])) transitions.append(fac.Transition(st_27, [ fac.UpdateInstruction(cc_22, False) ])) transitions.append(fac.Transition(st_28, [ fac.Updat...
<reponame>preranaandure/wildlifecompliance<filename>wildlifecompliance/components/artifact/api.py import json import re import operator import traceback import os import base64 import geojson from django.db.models import Q, Min, Max from django.db import transaction from django.http import HttpResponse from django.core...
<gh_stars>0 ########################################################################## # If not stated otherwise in this file or this component's Licenses.txt # file the following copyright and licenses apply: # # Copyright 2017 RDK Management # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
] row_rcb = base_cell.row col_rcb = base_cell.col blk_rcb = base_cell.blk self.assertEqual( base_cell.common_rcbs( [] ), [] ) self.assertEqual( base_cell.common_rcbs( [cell_with_none] ), [] ) self.assertEqual( base_cell.common_rcbs( [cell_same_row] ), [row_rcb] ) self.assertEqual( base_cell.common_rcbs( [cell...
have the same length, but nothing deeper assert ak.concatenate(arrays, axis=2).tolist() == [ [[0.0, 1.1, 2.2, 10, 20], [30]], [[3.3, 4.4, 40]], [[5.5, 50, 60, 70], [6.6, 7.7, 8.8, 9.9, 80, 90]], ] def test_negative_axis_concatenate(): arrays = [ ak.Array([[[0.0, 1.1, 2.2], []], [[3.3, 4.4]], [[5.5], [6.6, 7.7,...
in self._attributeMap["edge"].keys() if ":" not in i] d = list(self._attributeMap["detail"].keys()) if allInOne: result = [] result.extend(v) result.extend(f) result.extend(e) result.extend(d) else: result = {'vertex': v, 'face': f, 'edge': e, 'detail': d} return result def _getAttribType(self, attribCla...
#!/usr/bin/python import sqlite3 import datetime import ConfigParser #import calendar #import pprint from operator import itemgetter config = ConfigParser.ConfigParser() config.read("config.txt") DEBUG = int(config.get('main','DEBUG')) class schedule(): def __init__(self): self.holding = False self.active = False...
<gh_stars>0 # -*- coding: utf-8 -*- # ============================================================================== # SBEMimage, ver. 2.0 # Acquisition control software for serial block-face electron microscopy # (c) 2018-2019 <NAME> Institute for Biomedical Research, Basel. # This software is licensed under the term...
#!/usr/bin/python # Copyright 2018 BlueCat Networks (USA) Inc. and its affiliates # # 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 req...
<reponame>balazsdukai/tile-processor # -*- coding: utf-8 -*- """Workers run the executables. Executables can be anything, but most likely they are compiled software that are called in a subprocess, for example *3dfier* (threedfier). In order to implement your own Worker, implement your class/function here and register...
all the information for a saved sample, or empty dictionary if troubles getting the sample. Examples -------- >>> get_sample('sample1') {'time_created': '2021-01-06 11:43:40.701095', 'top_left': [0, 0], 'top_right': [4.0, -1.0], 'bottom_right': [4.4, -3.5], 'bottom_left': [1.0, -3.0], 'M': 10, 'N': 10, 'co...
if verbose: print("Updated output matrix shapes:") for _om in self.output_mtrx: print(_om.shape) print("Updated output names:") print(self.output_names) # Check dimensions of all output matrices defined self.check_outputs() def PrintSystemMatrices(self,printShapes=True,printValues=False): """ Func...