input
stringlengths
2.65k
237k
output
stringclasses
1 value
# from __future__ import unicode_literals # import compiler from django.contrib.gis import forms, admin from django.contrib.gis.geos import GEOSGeometry from django.contrib import messages from django.core.management import settings from django.core.exceptions import ObjectDoesNotExist from django.forms import CharFiel...
+= self.storage_assets[i].Qnet if N_BLDGs > 0: #calculate the total real and reactive power demand at each bus for i in range(N_BLDGs): bus_id = self.building_assets[i].bus_id P_demand_buses[:,bus_id] += self.building_assets[i].Pnet Q_demand_buses[:,bus_id] += self.building_assets[i].Qnet for i in range(N_nondis...
<filename>src/pymor/discretizers/builtin/cg.py # This file is part of the pyMOR project (http://www.pymor.org). # Copyright 2013-2020 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) """This module provides some operators for continuo...
al zijn iMacs standaard met een ssd.<img src=\"http://feeds.feedburner.com/~r/tweakers/mixed/~4/U3EBLwd6ZWY\" height=\"1\" width=\"1\" alt=\"\"/>" }, "tags": [ { "label": "null", "scheme": "null", "term": "Nieuws - : Computers / PC's" } ], "title_detail": { "base": "https://feeds.feedburner.com/tweakers/mixed...
start,end for regulation [TEG] if part['fwd'] == True: part['start'] = prev_start part['end'] = prev_end else: part['start'] = prev_end part['end'] = prev_start if first_part == True: first_start = prev_start first_part = False part_num += 1 # first pass to get all of the arcranges if regs != None: fo...
34564, 34565, 34566, 34567, 34568, 34569, 34570, 34571, 34572, 34573, 34574, 34575, 34583, 34584, 34585, 34587, 34592, 34593, 34594, 34595, 34601, 34602, 34603, 34604, 34605, 34606, 34607, 34608, 34609, 34610, 34611, 34612, 34613, 34614, 34615, 34616, 34625, 34664, 34665, 34666, ...
at the end of this converter to create a chain. Dont change this except if it really can never make sense. :param function_args: kwargs that will be passed to the function at every call :param unpack_options: if False, the full options dictionary will be passed to the conversion method, instead of the unpacked opti...
index_to_alg(newfrom), index_to_alg(step[1]))) if (self.last_piece != Piece.EMPTY and step[1] == self.last_from and pstrength < (self.last_piece & Piece.DECOLOR)): ispull = True else: if self.steps > 2: raise IllegalStepException("Tried to push on last step") stronger = False for noffset in [-1, 1, -16, 16]: ...
# -*- coding: utf-8 -*- ''' Operations on regular files, special files, directories, and symlinks ===================================================================== Salt States can aggressively manipulate files on a system. There are a number of ways in which files can be managed. Regular files can be enforced wit...
f'{img_name[0]}-lg.{img_name[-1]}' resized_image.save(f'{resized_image_lg}') os.remove(f'{i}') else: # Opens the facade image image = Image.open(i) # Saves the interior images into 1280px resized_image = resizer(image, 1280) resized_image.save(f'{i}') # Creating image's name with included folder n...
= parse_global_arg(parsed_globals) if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]: cred = credential.CVMRoleCredential() elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]: cred = credential.STSAssumeRoleCredential( g_param[OptionsDefine.Secr...
#!/usr/bin/env python3 import tempfile __doc__ = f"""convert graphml files to ttl files Usage: graphml-to-ttl [options] <file> graphml-to-ttl methods [options] <file> graphml-to-ttl workflow [options] <file> graphml-to-ttl paper [options] <file> Options: -o --output-location=LOC write converted files to [default...
################################################################################ # # Custom resolvers for hydra configuration # # Author(s): <NAME> ################################################################################ import random import uuid from typing import Union #####################################...
def __init__(self, cl=None, verbose=True, opts=None, feedback_fn=None): self.queue = [] if cl is None: cl = GetClient() self.cl = cl self.verbose = verbose self.jobs = [] self.opts = opts self.feedback_fn = feedback_fn self._counter = itertools.count() @staticmethod def _IfName(name, fmt): """Helper functi...
<gh_stars>0 #!/usr/bin/env python3 # <NAME>, 2020, based on an implementation by Isabelle and <NAME> distibuted under the MIT license. #The three bug algorithms differ only in how they decide to leave the wall and return to the path through free space to the goal. To implement this, a single Bug class was created tha...
<filename>improver/generate_ancillaries/generate_topographic_zone_weights.py<gh_stars>1-10 # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2021 Met Office. # All rights reserved. # # Redistribution and use in source and binary fo...
9.0 (the default). For the standard definition of `biweight midvariance <https://en.wikipedia.org/wiki/Robust_measures_of_scale#The_biweight_midvariance>`_, :math:`n` is the total number of points in the array (or along the input ``axis``, if specified). That definition is used if ``modify_sample_size`` is `Fals...
<gh_stars>0 # <NAME> <EMAIL> # <NAME> <EMAIL> import streamlit as st import pandas as pd import altair as alt import numpy as np import numpy as np import pandas as pd import altair as alt import streamlit as st from PIL import Image from sklearn import preprocessing from sklearn.linear_model import Ridge from sklearn...
""" Here we collect only those functions needed scipy.optimize.least_squares() based minimization the RAC-models fit negative energies E depending on a strength parameter lambda: E(lambda) E is is written as E = -k**2 and the model actually used is lambda(k) the data to fit are passed as arrays: k, ksq = k**2, lbs...
import sys from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow, QGridLayout, QMessageBox, QAction, QGroupBox,\ QFileDialog, QSizePolicy, QProgressBar, QLabel, QPushButton, QScrollArea, QFrame import flSaveFileDialog as fsd import dataDisplay as dd import dataControlWidget as dcw import fitDataInfo as fdi i...
total, prop_id) sys.stdout.write("\r" + str(msg).ljust(200, " ")) prop_count += 1 project_id, node, prop = prop_id.split(".") comparison["prop_id"][prop_id] = prop_id comparison["project_id"][prop_id] = project_id comparison["node"][prop_id] = node comparison["property"][prop_id] = prop df = report.loc[repo...
- 1 else: # regular nested if ( positions is None or positions[0] is None or positions[0][0] is None ): # [0][0] positions = [[[0, 0, 0]]] else: if radii is not None: delta = numpy.array(positions[0]) rM = sqrt(max(numpy.sum(delta * delta, 1))) self.encapsulatingRadius = max(rM, self.encapsulatingRadius) # ...
import copy import os import re from collections import defaultdict import marshmallow as ma import paramtools as pt import numpy as np import requests import taxcalc from taxcalc.growfactors import GrowFactors from taxcalc.utils import json_to_dict class CompatibleDataSchema(ma.Schema): """ Sche...
= GEOM.hadec2altaz(pc, self.ia.latitude, units='degrees') pc_dircos = GEOM.altaz2dircos(pc_altaz, units='degrees') elif pc_coords == 'altaz': pc_dircos = GEOM.altaz2dircos(pc, units='degrees') npad = int(self.f.size * pad) lags = DSP.spectral_axis(self.f.size + npad, delx=self.df, use_real=False, shift=False) d...
mdata[..., h:] else: rdata = mdata # write the data out, flush and close rdata[sy, sx] = data.real[i] rdata.flush() if data.dtype == 'complex64': idata[sy, sx] = data.imag[i] idata.flush() del(idata) # clean up del(rdata) del(mdata) # iter3D tools (xyz2pipe and pipe2xyz replacements) # Notes for iter3D i...
import logging import tool_shed.grids.admin_grids as admin_grids from galaxy import ( util, web ) from galaxy.util import inflector from galaxy.web.base.controller import BaseUIController from galaxy.web.framework.helpers import grids from tool_shed.metadata import repository_metadata_manager from tool_shed.util imp...
<reponame>OrionDark7/Deeper import pygame, random, datetime, pickle, time, os, webbrowser from pygame.color import THECOLORS blockImages = ["stone.png", "dirt.png", "coalore.png", "ironore.png", "goldore.png", "clay.png", "bricks.png", "mud.png", "grass.png", "lamp.png", "legacypc.png", "craftshelf.png", "crate.png",...
<reponame>DaleProctor/tscharts<filename>apps/xrayuploader/xrayuploader.py<gh_stars>10-100 #(C) Copyright <NAME> 2020 #(C) Copyright Thousand Smiles Foundation 2020 # #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 cop...
u'Minimum Lift', 'pyname': u'minimum_lift', 'default': 11.1, 'required-field': False, 'autosizable': False, 'autocalculatable': False, 'type': u'real', 'unit': u'deltaC'}), (u'maximum condenser entering water temperature', {'name': u'Maximum Condenser Entering Water Temperature', 'pyname': u'maximum_condenser...
<reponame>petobens/dotfiles #!/usr/bin/env python3 """Launch programs adjusting fonts if necessary.""" import os from time import sleep import i3ipc from i3_helpers import sh, sh_no_block from multimon_move import get_output_width APPS = { 'about-arch': { 'type': 'tui', 'args': { 'title': 'About Arch', 'cmd': "...
"Got an unexpected keyword argument '%s'" " to method get_device_datasource_instance_group_by_id" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'device_id' is set if ('device_id' not in params or params['device_id'] is None): raise ValueError("Missing the required parameter `dev...
`Demand Calculation 7 Node Name` Args: value (str): value for IDD Field `Demand Calculation 7 Node Name` Raises: ValueError: if `value` is not a valid value Returns: str: the value of `demand_calculation_7_node_name` or None if not set """ return self["Demand Calculation 7 Node Name"] @demand_calculation_...
except the respective # attacker itself or the node being attacked. self.potential_edges = np.row_stack([np.column_stack((np.tile(infl, self.N - 2), np.setdiff1d(np.arange(self.N), np.array([self.u,infl])))) for infl in self.influencer_nodes]) if self.verbose: print("Influencer nodes: {}".format(self.influencer_...
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
<reponame>disktnk/chainer-compiler import chainer import chainer.functions as F import chainer.links as L import inspect import ast, gast from elichika.parser import config from elichika.parser import nodes from elichika.parser import values from elichika.parser import functions from elichika.parser import utils from ...
os.path.join(self.TEMP_PATH, "sphere.cdb") sh.copytree(self.SOURCE_DATA, self.SPHERE_DATA) self.SPHERE_TABLE = "sphere" # make some backups self.d_csv = os.path.join(self.SPHERE_DATA, d.SPEC_D_CSV_FILENAME) self.d_backup = os.path.join(self.SPHERE_DATA, "csv.good") sh.copyfile(self.d_csv, self.d_backup) os.unl...
= '%s';" % (bfid, bfid) q2 = "select bfid,alt_bfid from file_copies_map,migration " \ "where ((bfid = src_bfid and alt_bfid = dst_bfid) " \ " or (bfid = dst_bfid and alt_bfid = src_bfid)) " \ " and (bfid = '%s' or alt_bfid = '%s');" % (bfid, bfid) #Determine if the file is a duplicated file. if debug: prin...
#! /usr/bin/env python3 # # Copyright 2020 maximumG, xtonousou # # 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...
= list(_filter_handles(chain(args, kwargs.values()))) if not WINDOWS: # Restore default signal handlers (SIG_DFL). Orphaned libev signal # watchers may not become properly deactivated otherwise. Note: here, we # could even reset sigprocmask (Python 2.x does not have API for it, but # it could be done via ctypes). ...
key in old_entry: if not key in new_entry: changed = True break if old_entry[key] != new_entry[key]: changed = True break for key in new_entry: if not key in old_entry: changed = True break if changed: db_entry_list[pos] = new_entry changed_list.append(new_entry) break if not found: db_entry_list.append...
<reponame>CATER-UCF/idaes-pse ################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright ...
# Leo colorizer control file for ahk mode. # This file is in the public domain. # Properties for ahk mode. properties = { "doubleBracketIndent": "false", "indentCloseBrackets": "}", "indentOpenBrackets": "{", "lineComment": ";", "lineUpClosingBracket": "true", "wordBreakChars": ",+-=<>/?^&*", } # A...
str(y)) self.assertTrue("246.0 m" in str(y)) def test5(self): print("Test 5: testing mixed nbody and physical units") phys_parameter_definition = parameters.ModuleMethodParameterDefinition( "get_test", "set_test", "phys_test_name", "a test parameter with physical units", 11.0 | units.m ) nbody_parameter_def...
<filename>vm_automation/esxiVm.py from atexit import register from pyVim.connect import SmartConnect, Disconnect from pyVmomi import vim, vmodl from random import choice from requests.packages.urllib3.exceptions import InsecureRequestWarning from socket import error as SocketError from string import ascii_lowerca...
GL/glext.h:3860 PFNGLVERTEXATTRIB4NBVPROC = CFUNCTYPE(None, GLuint, POINTER(GLbyte)) # GL/glext.h:3861 PFNGLVERTEXATTRIB4NIVPROC = CFUNCTYPE(None, GLuint, POINTER(GLint)) # GL/glext.h:3862 PFNGLVERTEXATTRIB4NSVPROC = CFUNCTYPE(None, GLuint, POINTER(GLshort)) # GL/glext.h:3863 PFNGLVERTEXATTRIB4NUBPROC = CFUNCTYPE(No...
'COVERAGE_AT_15X', 'COVERAGE_AT_1X', 'DELETIONS', 'DELETIONS_ALL', 'DELETIONS_IN_CODING_REGIONS', 'DELETIONS_IN_EXONS', 'DELETIONS_IN_GENES', 'DELETIONS_IN_MATURE_MIRNA', 'DELETIONS_IN_SPLICE_SITE_REGIONS', 'DELETIONS_IN_UTR_REGIONS', 'DELETIONS_PERCENT_FOUND_IN_DBSNP', 'DELETION_HET_HOM_RATIO', 'DIVERSITY', 'FR...
custom_structs = [] for struct_name, struct_members in six.iteritems(c_data.CustomStructs): members = [] for struct_member_name, struct_member in six.iteritems(struct_members): members += struct_member.GetOutputInfo( struct_member_name, is_struct_member=True, ).ParameterDecl custom_structs.append( textwrap....
# Copyright 2018 The Batfish Open Source Project # # 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...
import glob import gzip import json import os.path import sys from pathlib import Path from typing import Protocol, List, Union from PySide2.QtCore import Slot, QThreadPool, QObject, Signal, QSize, QUrl, Property from PySide2.QtQuick import QQuickView from PySide2.QtWidgets import QApplication from sqlalchemy import o...
<filename>tacker/tests/unit/vnflcm/test_controller.py # Copyright (C) 2020 NTT DATA # 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/L...
<gh_stars>0 from application import Application from error_checker import ErrorChecker from errors import InvalidDateException import add_person class RecordViolation(Application): def start_application(self, c): self.cursor = c self.list_of_inputs = [ None for i in range(8) ] self.get_violation_no(0) self.fie...
<filename>mtgcompiler/frontend/AST/mtypes.py import abc import mtgcompiler.AST.core as core from enum import Enum class MgAbstractType(core.MgNode): """MgAbstractType is an uninstantiable parent class for types, subtypes, and supertypes. It provides the functionalities common to all (sub|super)*type objects.""" ...
<filename>azure-deb/blobxfer.py #!/usr/bin/env python # blobxfer.py Code Sample # # Copyright (c) Microsoft Corporation # # All rights reserved. # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Softw...
json.loads(rv.get_data(as_text=True)) self.assertEqual(response['first_name'], 'Helga') self.assertEqual(response['birth_city'], 'Staunton') self.assertEqual(response['is_first_name_preferred'], True) self.assertEqual(response['user_id'], u2.id) self.assertNotEqual(orig_date, response['last_updated']) def test_d...
<reponame>Blue-Giant/FourierBase-MscaleDNN """ @author: LXA Date: 2020 年 5 月 31 日 """ import os import sys import tensorflow as tf import numpy as np import matplotlib import platform import shutil import time import DNN_base import DNN_tools import DNN_data import MS_LaplaceEqs import MS_BoltzmannEqs ...
Sequence['outputs.GetInstanceBackupsAutomaticDiskResult'], finished: str, id: int, label: str, status: str, type: str, updated: str): """ :param Sequence[str] configs: A list of the labels of the Configuration profiles that are part of the Backup. :param str created: The date the Backup was taken. :param str ...
deadline=None): self._id_value = None self._id_present = False self._url_value = None self._url_present = False self._title_value = None self._title_present = False self._destination_value = None self._destination_present = False self._created_value = None self._created_present = False self._deadline_value =...
_bootstrap._verbose_message('{}', message) raise EOFError(message) flags = _unpack_uint32(data[4:8]) # Only the first two flags are defined. if flags & ~0b11: message = f'invalid flags {flags!r} in {name!r}' raise ImportError(message, **exc_details) return flags def _validate_timestamp_pyc(data, source_mtime, ...
True: reply = await client.wait_for('message', check=channel_check) if reply.author not in activeplayerlist: continue #If blocking Foreign Aid if reply.content == "block" and prevaction[0] == "Foreign Aid": if reply.author == prevaction[1]: await message.channel.send("You cannot block your own Foreign Aid!") ...
= datamap[module] if (datamap[module]) is not None: for zone in modules.keys(): if datamap[module][zone] is not None: for pragma in datamap[module][zone]: if module == 'top_module': target_module_label = self.cfg.design_setting.design_model else: target_module_label = module temp = self.combinational_pragma_ge...
<gh_stars>0 ################################################################################ # Module: utils.py # Description: Utility functions for configuration, logging # License: MIT, see full license in LICENSE.txt # Web: https://github.com/samuelduchesne/archetypal ################################################...
import proton_pol_vec_mean, neutron_pol_vec_mean, proton_pol_vec_std, neutron_pol_vec_std proton_pol_cov = np.diag(proton_pol_vec_std) neutron_pol_cov = np.diag(neutron_pol_vec_std) groups = df.groupby(['observable', 'nucleon', 'order']) compton_obs = {} lin_vec = ['B1', 'B2', 'B3', 'B4', 'B5', 'B6'] quad_vec = ...
['critical thinking'], 'tibco esb': ['microservices'], 'ticket': ['artifact'], 'ticketing tool': ['software'], 'tika': ['apache software'], 'time': ['state'], 'time management': ['soft skill', 'work ethic'], 'time series': ['statistics', 'supervised learning'], 'time series clustering': ['clustering model'], '...
check=False) def product_on_basis(self, b1, b2): r""" Compute the product `b1 * b2` of decorated TL diagrams `b1` and `b2`. Let `n` be the order of `b1` and `b2`. To obtain `b1 * b2`, first stack `b1` on top of `b2` and identity the bottom vertex `-i` in `b1` with the top vertex `i` in `b2` for all `1 \le i \l...
There were attribute changes. Store those with the field. changed_fields[field_name] = changed_field_attrs else: # The field has been deleted. deleted_fields.append(field_name) # Go through the list of added fields and add any that don't # exist in the original field list. added_fields = [ field_sig.field_name...
<reponame>toopazo/live_ars<gh_stars>0 #!/usr/bin/env python import os from toopazo_tools.matplotlib import plt # Check if this is running inside toopazo_ulg/ or deployed as a module if os.path.isfile('ars_dec22_data.py'): from ars_dec22_data import ArsDec22Data else: from live_ars.ars_dec22_data import ArsDec22Data...
0x00, 0x00, 0x00, # 0x00, 0x00, 0x00, # # @9216 '{' (21 pixels wide) 0x00, 0x00, 0x00, # 0x00, 0x00, 0x00, # 0x00, 0x00, 0x00, # 0x00, 0x00, 0x00, # 0x00, 0x00, 0x00, # 0x00, 0x00, 0x00, # 0x03, 0x8E, 0x00, # OOO OOO 0x06, 0x73, 0x00, # OO OOO OO 0x04, 0x01, 0x00, # O O 0x1C, 0x01, 0xE0, # OOO...
clsend; setArea(uint32) required broadcast ram; }; dclass DistributedFishingTarget : DistributedNode { setPondDoId(uint32) required broadcast ram; setState(uint8, int16/10, uint16/100, uint16/10, int16) required broadcast ram; }; dclass DistributedFishingSpot : DistributedObject { setPondDoId(uint32) required bro...
x = Encode_LearnMI(domain, GetState().GetFeatureString(), m_chosen, task+" "+ " ".join([str(j) for j in taskArgs])) np_x = numpy.array(x) x_tensor = torch.from_numpy(np_x).float() y = model(x_tensor) pList.append(Decode_LearnMI(GLOBALS.GetDomain(), m_chosen, p, y)) for i in range(len(candidates)): if m_ch...
import pytest from django.contrib.auth import get_user_model from rest_framework.reverse import reverse from boards.models import Column, Board, Task User = get_user_model() @pytest.fixture def board(create_user): user = create_user() uni_board = Board.objects.create(name="University", owner=user) uni_board.memb...
ID: 10.189.5.253, Metric: 120, Bidirectional Type: PointToPoint, Node ID: 10.169.14.240, Metric: 5, Bidirectional Aging timer 00:37:23 Installed 00:22:30 ago, expires in 00:37:24, sent 00:22:28 ago Last changed 2w6d 04:10:26 ago, Change count: 280 Router *0.0.0.0 10.189.5.252 0x80001890 1010 0xae6c 56 bits 0x2, O...
from __future__ import division import numpy as np from scipy.constants import mu_0, pi, epsilon_0 from scipy.special import erf from SimPEG import utils import warnings def hzAnalyticDipoleF(r, freq, sigma, secondary=True, mu=mu_0): """ The analytical expression is given in Equation 4.56 in Ward and Hohmann, 1988...
autojunk = False) # Dict pairing original to modified nodes that the sequencer matched. orig_mod_matches = {} # get_matching_blocks returns a series of tuples of # (i, j, n) where a[i:i+n] == b[j:j+n] # Note: this may end up matching nodes from one parent's child elements # to those of another parent. However...
FileBasicInformation(FileInformation): file_information_class = FILE_BASIC_INFORMATION def __init__(self, parent = None): FileInformation.__init__(self, parent) self.creation_time = 0 self.last_access_time = 0 self.last_write_time = 0 self.change_time = 0 self.file_attributes = 0 def _decode(self, cur): sel...
<gh_stars>0 # -*- coding: utf-8 -*- # @File Name: dual_robotic_prm.py # @File Path: M:\MAS2\PRM_Robotic_Arm\Klampt_Robotic_Arm_Script\dual_robotic_prm\dual_robotic_prm.py # @Author: Ruige_Lee # @Date: 2019-02-18 11:32:13 # @Last Modified by: Ruige_Lee # @Last Modified time: 2019-04-15 11:36:16 # @Email: <EMAIL>" # @Fi...
(X,y) are considered as candidates. If candidates is of shape (n_candidates) and of type int, candidates is considered as the indices of the samples in (X,y). If candidates is of shape (n_candidates, n_features), the candidates are directly given in candidates (not necessarily contained in X). This is not support...
<gh_stars>0 from random import choice ### function for computer to play specific moves def computerAI(liste, side): opposite = "" empty = "-" if side == "O": opposite = "X" elif side == "X": opposite = "O" ################################### put 3rd side if there are 2 ################################### ###...
set `recipients` attribute. Attributes ---------- root : Root Low-level output that is a root of this branch. status : bool Status for this particular output. address : str The email address using to send messages. host : str The host on which SMTP server is running. port : str or int, optional The port on...
""" Plot numeric data from stdio as text to stdout. """ import os import sys if __name__ == "__main__": from csv_translate import CsvTranslateProcessor else: from .csv_translate import CsvTranslateProcessor HELP_TEXT = """{program_name} tool version 20201201 print a graph of numeric data from a CSV stream onto std...
# Copyright 2018-19 Spirent Communications. # # 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...
# Copyright 2012-2013, <NAME> and argcomplete contributors. # Licensed under the Apache License. See https://github.com/kislyuk/argcomplete for more info. from __future__ import print_function import os, sys, argparse, contextlib, subprocess, locale, re from . import my_shlex as shlex python2 = True if sys.version_...
import os import numpy as np import plotly.plotly as py import plotly.graph_objs as go import plotly.figure_factory as ff from scipy.special import erf from scipy import stats import pandas as pd import seaborn as sns cp = sns.color_palette() from sklearn.neighbors.kde import KernelDensity #%% # loading data and...
m.b1837 <= 0) m.c2840 = Constraint(expr= m.b1838 - m.b1839 <= 0) m.c2841 = Constraint(expr= m.b1838 - m.b1840 <= 0) m.c2842 = Constraint(expr= m.b1839 - m.b1840 <= 0) m.c2843 = Constraint(expr= m.b1841 - m.b1842 <= 0) m.c2844 = Constraint(expr= m.b1841 - m.b1843 <= 0) m.c2845 = Constraint(expr= m.b1842 - m.b1843 ...
<gh_stars>0 import numpy as np import rdkit import rdkit.Chem import rdkit.Chem.AllChem import rdkit.Chem.Descriptors import logging # For this module please install rdkit. See: https://www.rdkit.org/docs/Install.html # or check https://pypi.org/project/rdkit-pypi/ via `pip install rdkit-pypi` # or try `conda install ...
from copy import deepcopy import compas from compas.data import Data from compas.datastructures import Mesh from compas.geometry import Frame, Transformation, Translation, Vector, Shape, Cylinder, dot_vectors from compas.robots import RobotModel from compas.rpc import Proxy from compas_fab.robots import Configuration ...
test-task" not in result.output assert u'Changed environment' not in result.output assert u"Successfully started 2 instances of task: test-task:2" in result.output assert u"- arn:foo:bar" in result.output assert u"- arn:lorem:ipsum" in result.output @patch('ecs_deploy.cli.get_client') def test_run_task_with_error...
be: # - a string: uses AstNode._from_fields as visitor # - a tuple ('node_name', 'ast_node_class_method_name'): uses ast_node_class_method_name as visitor # subclasses use _bind_to_visitor to create visit methods for the nodes in _rules on the ParseTreeVisitor # using this information _rules = [] _priority = 1 ...
<gh_stars>0 """ Description : This file implements the IPLoM algorithm for log parsing Author : LogPAI team License : MIT """ import copy import sys from datetime import datetime import os import gc import re import pandas as pd import hashlib import string class Partition: """ Wrap around the log...
<reponame>pyccel/psydac<gh_stars>10-100 # coding: utf-8 # # Copyright 2018 <NAME> from itertools import product from collections import OrderedDict import numpy as np import string import random import h5py import yaml import yamlloader from sympde.topology.mapping import Mapping from psydac.fem.tensor import Tenso...
( int(year), month, int(day), int(hour), int(minute)) title = extract('<h2 class="itemTitle">', '</h2>', html) or '' content = extract('<div class="itemFullText">', '<div class="itemContentFooter">', html) or '' paras = clean_paragraphs('<p/>'.join([title, content])) if paras: out.write('# Location: %s\n' % url)...
# coding: utf-8 """ Thingsboard REST API For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>. OpenAPI spec version: 2.0 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __futu...
must not contain monitored resource labels. moneyValue: A money value. startTime: The start of the time period over which this metric value's measurement applies. The time period has different semantics for different metric types (cumulative, delta, and gauge). See the metric definition documentation in the servi...
stored = True if not stored: # Pickle and store (not a reference, list of keys, etc.) value = repr(pickle.dumps(raw_value)) properties_code += u'%s=pickle.loads(%s), ' % (field, value) # Update any old datastore numeric keys in reference properties to # their key_name equivalents for the new datastore. referen...
<reponame>lcirrott/Kratos from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # importing the Kratos Library from KratosMultiphysics import * from KratosMultiphysics.IncompressibleFluidApplication import * from KratosMultiphysics.Th...
import operator import unittest import pytest from src.iterfun import Iter class TestIter(unittest.TestCase): def test_iter_domain(self): iter = Iter([1, 4]) self.assertEqual(iter.domain, iter.image) self.assertNotEqual(iter.domain, iter.filter(lambda x: x % 2 == 0).image) def test_iter_image(self): self.ass...
return render(request, 'herders/profile/monster_view/base.html', context) else: return render(request, 'herders/profile/not_public.html') @username_case_redirect def monster_instance_view_runes(request, profile_name, instance_id): try: summoner = Summoner.objects.select_related('user').get(user__username=profile_...
import numpy as np import pytest import psyneulink.core.llvm as pnlvm from psyneulink.core.components.functions.transferfunctions import Linear, Identity from psyneulink.core.components.mechanisms.processing.compositioninterfacemechanism import CompositionInterfaceMechanism from psyneulink.core.components.mechanisms.p...
<filename>fhir/resources/testreport.py # -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/TestReport Release: R4 Version: 4.0.1 Build ID: 9346c8cc45 Last updated: 2019-11-01T09:29:23.356+11:00 """ from typing import List as ListType from pydantic import Field from . import backboneelement, d...
<gh_stars>10-100 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import os.path as osp import pickle import random import numpy as np from scipy.stats import special_ortho_group ...
<gh_stars>0 import sys import matplotlib.pyplot as plt import numpy as np import torch import torch.nn as nn import torchvision def plot_translated(imgs, translated, w_translations, h_translations, num_display=10): n, h, w, c = imgs.shape import matplotlib.pyplot as plt for i in range(num_display): if c == 3: f...