input
stringlengths
2.65k
237k
output
stringclasses
1 value
keyword_parameters): build = keyword_parameters['build'] else: build = 'hg19' if build == 'hg19': L = np.array([249250621, 243199373, 198022430, 191154276, 180915260, 171115067, 159138663, 146364022, 141213431, 135534747, 135006516, 133851895, 115169878, 107349540, 102531392, 90354753, 81195210, 78077248, 591289...
is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users. return: (boolean) - ``false`` if looking up mappings is not authorized, ``true`` otherwise *compliance: mandatory -- This method must be implemented.* """ # Implemented from template for # osid.resource....
+= following_span.tokens span.before_dash += following_span.before_dash following_span.in_base = True # если это ПРИМЫКАЮЩИЙ спан!!! else: if span.after_dash: if span.accept_base(following_span) and span.coordinate(following_span): # print span.tokens[0].content, following_span.tokens[0].content, 777, j # prin...
and data_set_type == TYPE_RESULT_TABLE: tmp_sql += ' and 1=0 ' tmp_sql += """ ${ds_where_cond} and concat(id,'') not in(select target_id from tag_target where active=1 ${bk_biz_id_cond} and target_type in('raw_data','data_id') and tag_code in('metric_domain') and target_id in( select concat(id,'') from access_raw...
. group lisp . lisp_send_map_request ( iI1Ii11iII1 , 0 , O0oOO0O , oO , i1 ) if 7 - 7: o0oOOo0O0Ooo - I1IiiI if 100 - 100: oO0o + I11i . OOooOOo * Ii1I if 73 - 73: i1IIi + I1IiiI if 46 - 46: OoO0O00 . Oo0Ooo - OoooooooOO if 93 - 93: iII111i if 10 - 10: I11i lisp . lisp_write_ipc_map_cache ( True , mc ) return ...
if p <= lowest] if override > 0: partial = partial[:-override] only_mine = 37 - len(placed) lowest_cnt = only_mine + len(partial) if lowest_cnt == 0: return 0 ret = 0.0 ret += lowest * 36.0 * only_mine / float(lowest_cnt) for p in partial: ret += 36.0 * (lowest - p) * 1.0 / lowest_cnt return ret def func_e...
self._get("siteelevation") @SiteElevation.setter def SiteElevation(self, SiteElevation: float): self._put("siteelevation", SiteElevation=SiteElevation) @property def SiteLatitude(self) -> float: """(Read/Write) The latitude (degrees) of the observing site. See Notes. Raises: NotImplementedException: If the pr...
self.machine.processes_per_node, self.codes.keys()) else: node_layout = NodeLayout(node_layout) # TODO: validate node layout against machine model sweep_runs = [Run(inst, self.codes, self.app_dir, os.path.join( group_output_dir, 'run-{}.iteration-{}'.format( group_run_offset + i, repeat_index)), self.input...
<reponame>ehunaj/tkn1 # -*- coding: utf-8 -*- from linepy import * from akad.ttypes import Message from datetime import datetime from time import sleep from bs4 import BeautifulSoup from humanfriendly import format_timespan, format_size, format_number, format_length import time, random, sys, json, codecs, threading, g...
dst_backup_paths): class DriveBackupDaemon(plugin.TaskDaemon): def __init__(self, domain_uuid): super(DriveBackupDaemon, self).__init__(task_spec, 'TakeVolumeBackup', report_progress=False) self.domain_uuid = domain_uuid def __exit__(self, exc_type, exc_val, exc_tb): super(DriveBackupDaemon, self).__exit__(exc_t...
<gh_stars>0 # File: xmlparser.py ; This file is part of Twister. # version: 3.038 # Copyright (C) 2012-2014 , Luxoft # Authors: # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complia...
""" Cisco_IOS_XR_wd_oper This module contains a collection of YANG definitions for Cisco IOS\-XR wd package operational data. This module contains definitions for the following management objects\: watchdog\: Watchdog information Copyright (c) 2013\-2016 by Cisco Systems, Inc. All rights reserved. """ import re...
return redirect('qa:questionDetailView', pk=data.id) getAllReviews = FlagPost.objects.filter( answer_forFlag=getAnswer, actions_Flag_Q="NOT_AN_ANSWER").exclude( ended=True) if getCreateFlag_object.how_many_votes_on_spamANDRude >= 2: for rev in getAllReviews: rev.ended = True rev.save() else: getCreateFlag_obj...
""" Written by <NAME> copyright big willy incorporated """ import jax.numpy as np from jax import random from jax.experimental import stax from jax.experimental.stax import Dense, Relu, Conv from jax.nn import log_sigmoid from utils import squeeze2d, unsqueeze2d """ Probability utils """ def sample_n01(rng, shape): ...
<filename>scene_generation/scene_generation/trainer.py import os import numpy as np from random import randint import torch import torch.nn as nn import torch.nn.functional as F import torchvision from tensorboardX import SummaryWriter import pickle from scene_generation.data import imagenet_deprocess_batch from scen...
or isinstance( args[0], datetime.date ): t = Epoch(args[0].year, args[0].month, args[0].day, **kwargs) else: raise TypeError("Invalid input type") elif len(args) == 2: raise ValueError("Invalid input: Date given is not valid") elif len(args) >= 3: # We will rely on Epoch capacity to handle improper input t = ...
""" Events, for Survol, are RDF triples inserted in a graph database by Python daemons, executing scripts in the background. These scripts are the usual CGI scripts, executed in a daemon controlled by the Python module "supervisor" (supervisor-win" on Windows). Conclusion: Plain CGI scripts which are norammly called by...
<gh_stars>0 #!/usr/bin/env python import copy, math, numpy, os, pdb, sys import chipseq_analysis, cmdlineProgs, random, selexDb, seq_utility, seqUtils, utility import numpy # SUMMARY: I have created this class to encapsulate motifs, for use in my # chipseq qc work. Should possibly have done this earlier, as there are...
<reponame>Niclnx/service-stac<gh_stars>0 import logging import time logger = logging.getLogger(__name__) class CollectionTemporalExtentMixin(): def update_temporal_extent(self, item, trigger, original_item_values): '''Updates the collection's temporal extent if needed when items are inserted, updated or deleted....
<filename>Libraries/Python/wxGlade/v0.9,5/wxGlade-0.9.5-py3.6.egg/wxglade/widgets/menubar/menubar.py """\ wxMenuBar objects @copyright: 2002-2007 <NAME> @copyright: 2014-2016 <NAME> @copyright: 2016-2019 <NAME> @license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY """ import wx import common, compat,...
<reponame>thetisproject/cofs<gh_stars>0 """ TELEMAC-2D `Point Discharge with Diffusion' test case ===================================================== Solves a steady-state tracer advection equation in a rectangular domain with uniform fluid velocity, constant diffusivity and a constant tracer source term. Neumann co...
# Copyright (C) 2013 Ion Torrent Systems, Inc. All Rights Reserved from iondb.rundb import models from django.utils.translation import ugettext_lazy import datetime from django.utils import timezone import logging from django.db import transaction from iondb.rundb import models from iondb.rundb.models import ( Sam...
len(row) >= row_limit: keyboard.append(row) row = [] if len(row) > 0: keyboard.append(row) # If there are no events if len(keyboard) == 0: bot.edit_message_text("You have no events. Use /create to create a new one for your section.",user_id,message_id) temp_modify.del_temp_modify_event(user_id) ret...
"""Type checker test cases""" import os import re import shutil import sys from typing import Dict, List, Optional, Set, Tuple from mypy import build from mypy import defaults from mypy.main import process_options from mypy.test.config import test_temp_dir from mypy.test.data import DataDrivenTestCase, DataSuite, ha...
<filename>tests/examples/testcases.py #!/usr/bin/env python3 import argparse import unittest import itertools import json import subprocess import os import sys import shutil import gzip import aug_out_filter as afilter import aug_comparator as comp # This script executes AUGUSTUS test cases based on the examples # f...
#BEGIN_LEGAL # #Copyright (c) 2019 Intel Corporation # # 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 ag...
""" QT based app to bring together several interactions with the dataset. 2D slicing, 3D visualisation and segmentation and countour tree. Author: <NAME> Date: 29th June 2018 Segmentation and Contour Tree Author: <NAME> """ # Import viewer classes from ccpi.viewer.CILViewer2D import CILViewer2D, Converter from cc...
asset_name = utxo["asset"] if asset_name not in self.assets: self.assets[asset_name] = {"outpoints": []} self.assets[asset_name]["outpoints"].append(utxo) else: # If we don't get a txout from a lock, it's no longer valid (wallet keeps them around for some reason.....) self.logger.info( "Removing Stale Wallet loc...
<filename>Similis/similis.py # -*- coding: utf-8 -*- """ Created on Fri Oct 07 17:56:46 2016 @author: Arenhart """ import PIL.Image as pil import PIL.ImageTk as imagetk import numpy as np import scipy.ndimage as sp import matplotlib.pyplot as plt import skimage as sk import skimage.filters as filters import skimage....
'interest_ids', 'interest_match', 'sort_field', 'sort_dir', 'since_last_campaign', 'unsubscribed_since'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iterit...
777 ~/upload' + '\n' script = '' script+='mkdir ~/efs &> /dev/null'+'\n' script+='sudo apt-get update' + '\n' script+='sudo apt-get install -y nfs-common' + '\n' script+='sudo mount -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport '+filesystem_dns+':/ ~/efs '+'\n' #script+='ec...
= True assert got_exception # test get_parameters() aug = iaa.Invert(p=1, per_channel=False, min_value=10, max_value=20) params = aug.get_parameters() assert isinstance(params[0], iap.Binomial) assert isinstance(params[0].p, iap.Deterministic) assert isinstance(params[1], iap.Deterministic) assert params[0].p....
""" <Author> <NAME> <Start Date> March 14th, 2013 <Description> A basic library that demonstrates PolyHash when applied to passwords (see https://polypasswordhasher.poly.edu/ for details). This includes shielded password support via AES 256. <Usage> import polypasswordhasher # require knowledge of 10 shares ...
and place in VVs. :param vvx: Real X `GXVV <geosoft.gxapi.GXVV>` :param vvy: Real Y `GXVV <geosoft.gxapi.GXVV>` :param vvz: Real Z `GXVV <geosoft.gxapi.GXVV>` :param img: `GXIMG <geosoft.gxapi.GXIMG>` for Z value, or `IMG_NULL <geosoft.gxapi.IMG_NULL>` for no Z. :param prompt: Command line prompt string :param ...
sample in sample_list: out.write('\t\t<dataset>' + sample + '</dataset>\n') out.write('\t</datasets>\n') # Write nodes offset = 1 child_nodes, _ = get_lca_dataseries_tax_xml( tax_profile, sample_list, ROOT_TAXONOMY_ID, offset, metric=metric ) out.write(child_nodes) # Close XML out.write('</krona>') # Run Kr...
<gh_stars>0 # -*- coding: utf-8 -*- # import logging import os import traceback import numpy as np import concurrent.futures from concurrent.futures import ThreadPoolExecutor from module.MOptions import MMultiSplitOptions, MOptionsDataSet from mmd.PmxData import PmxModel # noqa from mmd.VmdData import VmdMotion, VmdBo...
<filename>src/OFS/CopySupport.py ############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. #...
<filename>Detectors/Online_Detectors/Tests/VAE_Covariate_Tests.py import torch import numpy as np import math import torchvision from torch import nn from pytorch_lightning import Trainer import time import os import OnlineShiftDetectors from pytorch_lightning.core.lightning import LightningModule import functools ...
TypeError: pass #Perform some basic sanity checks with parameters if self.parmDict['timeStart'] > self.parmDict['timeStop']: msg = 'Input start time must come before stop time.' raise IOError(msg) if (len(self.parmDict['inFieldNames']) != \ len(self.parmDict['outFieldNames']) or len(self.parmDict['inFieldName...
<filename>blueqat/pauli.py # Copyright 2019 The Blueqat Developers # # 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 applic...
'algo': 'darknet', 'grid': False, 'config_filepath': 'pretrained-v2-pascal', 'species_set' : species_set, 'classify': True, 'p': 1.0, 'classifier_masking': True}, # {'label': 'SS1', 'algo': 'selective-search', 'species_set' : species_set}, # {'label': 'YOLO1', 'algo': 'darknet', 'config_filepath': 'pretrained-tiny-pa...
""" Class for a solver, which can then be used to define other solvers such as gradient descent or SAG. """ import math import warnings from abc import ABC, abstractmethod from typing import List, Optional, Tuple, Type, Union, overload from mpyc.runtime import mpc from mpyc.sectypes import SecureFixedPoint from typing...
2] acted upon by Weyl Group of type ['A', 2] (as a matrix group acting on the weight lattice) sage: W0Pv = E.W0Pv(); W0Pv Extended affine Weyl group of type ['A', 2, 1] realized by Semidirect product of Weyl Group of type ['A', 2] (as a matrix group acting on the weight lattice) acting on Multiplicative form of Weig...
import sys import os import random import math import bpy import numpy as np from os import getenv from os import remove from os.path import join, dirname, realpath, exists from mathutils import Matrix, Vector, Quaternion, Euler from glob import glob from random import choice from pickle import load from b...
of {discrepancy} positions between crystallographic orbits calculated by spglib and given CIF-entries. Wrong space group detected? Try to adjust symmetry tolerance! ' return [warningCache, pathToCif] # allow corrections if occupancy options are enabled if occupancy: if '[' in pathToCif or verbose == False: ...
# /test/test_style_warnings.py # # Test cases for style/* checks # # See /LICENCE.md for Copyright information """Test cases for style/* checks.""" from test.warnings_test_common import DEFINITION_TYPES from test.warnings_test_common import FUNCTIONS_SETTING_VARS from test.warnings_test_common import LinterFailure fro...
'CommonGameTag' = 960 SITUATION_PLAYER_FACING_CAN_HOST: 'CommonGameTag' = 1643 SITUATION_PLAYER_VISITING_NPC: 'CommonGameTag' = 1493 SITUATION_POSSESSED: 'CommonGameTag' = 47124 SITUATION_PROMO_NIGHT: 'CommonGameTag' = 24594 SITUATION_REAPER: 'CommonGameTag' = 959 SITUATION_REPAIRMAN: 'CommonGameTag' = 2153 SITU...
return Concatenate([zpre, InsertAxis(arg, axis, 1), zpost], axis) def diagonalize(arg, axis=-1, newaxis=-1): arg = asarray(arg) axis = numeric.normdim(arg.ndim, axis) newaxis = numeric.normdim(arg.ndim+1, newaxis) assert axis < newaxis return Diagonalize(arg, axis, newaxis) def concatenate(args, axis=0): args =...
<reponame>crazynayan/tpf2<filename>flask_app/test_data_forms.py from typing import List from flask import request from flask_login import current_user from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, BooleanField, IntegerField, SelectField, TextAreaField from wtforms.validators import Inpu...
<reponame>nightjuggler/brc<filename>gensvg.py #!/usr/bin/python import math BLOCK_WIDTH = 200 HALF_STREET_WIDTH = 20 STREET_WIDTH = 2 * HALF_STREET_WIDTH MAN_TO_ESPLANADE = 2500 # Distance from the center of the Man to the center of Esplanade ESPLANADE_TO_A = 400 # Width of the block from Esplanade to A MAN_TO_CENTE...
'bb': fliped_bb, 'gt_classes': roi_gt_ss[i]['gt_classes'], 'gt_overlaps': roi_gt_ss[i]['gt_overlaps'], 'max_overlap_area': roi_gt_ss[i]['max_overlap_area'], 'max_overlap_class': roi_gt_ss[i]['max_overlap_class'], 'img_id': roi_gt_ss[i]['img_id'], 'flipped': True, 'img_file': image_file, 'bb_targets': bb_targets...
<gh_stars>0 #!/usr/bin/env python # coding: utf-8 # ## Our Mission ## # # Spam detection is one of the major applications of Machine Learning in the interwebs today. Pretty much all of the major email service providers have spam detection systems built in and automatically classify such mail as 'Junk Mail'. # # In ...
project progress (default: True) progress -- (bool) whether or not to update project progress (default: True) Returns: None """ if check \ and self.projects[_id].progress < Alaska.PROGRESS['qc_finished']: raise Exception('{}: Quality control has not been performed.' .format(_id)) # The project we are interes...
in r.email_addresses()] else: msg.to.append( infotrope.message.Address( None, header=r.header() ) ) addresses += r.email_addresses() for r in which[ID_CC]: if r.email_addresses()[0].startswith('news:'): msg.newsgroups += [x[5:] for x in r.email_addresses()] else: msg.cc.append( infotrope.message.Address( None, ...
'readStart': 2, 'readEnd': 6, 'readStartInSubject': -2, 'readEndInSubject': 5, }, normalized) def testSubjectExtendsRightAndLeft(self): """ The subject extends to the right and left of the translated query. s...sss ...q """ hsp = FakeHSP(subjectStart=2, subjectEnd=4, queryStart=12, queryEnd=4, frame=-3) ...
import os import ast import datetime import configparser import MyUtilities.common NULL = MyUtilities.common.NULL openPlus = MyUtilities.common.openPlus #Monkey Patches configparser.ConfigParser.optionxform = str class Configuration(MyUtilities.common.EnsureFunctions, MyUtilities.common.CommonFunctions): """Used t...
""" Skeleton example of a Ginga local plugin called 'MyLocalPlugin' To enable it, run ginga with the command $ ginga --plugins=MyLocalPlugin it will then be available from the "Operations" button. """ from ginga import GingaPlugin from ginga.gw import Widgets # import any other modules you want here--it's a pytho...
to match a set of resources by specific criteria, such as tags, attributes, or IDs.\n\nname (string) --The name of the filter. Filter names are case-sensitive.\n\nvalues (list) --The filter values. Filter values are case-sensitive.\n\n(string) --\n\n\n\n\n\n :type maxResults: integer :param maxResults: The maximum i...
"hif", "his", "lc1", "lc2", \ "lc3", "lob", "lof", "los", "mxs", "nbz", "nms", "pai", "rbs", \ "rc1", "rc2", "rc3", "rc4", "rc5", "rev", "rfc", "rls", "ros", \ "sc1", "sc2", "sc3", "sc4", "slf", "sty", "t1c", "t2c", "wbf", \ "wfc", "wty", "ezf", "smf", "loc", "wdf", "unt", \ "ALO", "AOC", "ASC", "AWC", "CBC", "CC1...
conv8 = Activation("relu")(fun(conv8)) conv8 = Conv3D(64, (3, 3, 3), padding="same")(conv8) conv8 = Activation("relu")(fun(conv8)) conv10 = Conv3D(feature_num, out_kernel, activation="linear", padding="same")(conv8) grid_centers = Input((None, 3)) conv10 = Lambda(lambda x: ops.spatial_softmax(x))(conv10) outp...
0: pass else: ARG = 1-G*Y if ARG > SMALL: pass else: if G < 0: CDFKAP = 0 if G > 0: CDFKAP = 1 return(CDFKAP) Y = -sp.log(ARG)/G Y = sp.exp(-Y) if H == 0: CDFKAP = sp.exp(-Y) else: ARG = 1-H*Y if ARG > SMALL: Y = -sp.log(ARG)/H CDFKAP = sp.exp(-Y) return(CDFKAP) else: CDFKAP = 0 return(CDFKAP) ...
%s" % (bp[3], bp[7], bp[6], bp[2], bp[3]) faces.append(gface3) gtop = "%s %s %s %s %s" % (bp[4], bp[5], bp[6], bp[7], bp[4]) faces.append(gtop) else: face1 = "%s %s %s %s %s" % (p[1], p[2], p[6], p[5], p[1]) faces.append(face1) faceBottom = "%s %s %s %s %s" % (p[0], p[3], p[2], p[1], p[0]) faces.append(faceBott...
<reponame>wgordon17/masline-warehouse # Standard library from concurrent.futures import ProcessPoolExecutor from inspect import stack from logging import getLogger from platform import system from sys import exc_info import os from urllib import parse # Third party library from pyodbc import connect, DatabaseError from...
<reponame>Ardibid/Rotrics_arm<gh_stars>1-10 ''' File name: pyArm.py Author: <NAME> Date created: 04/--/2021 Date last modified: 08/10/2021 Python Version: 3.7.7 License: MIT ''' ########################################################################################## ###### Import ##############################...
import uuid import unittest from taurus import Device from taurus.core.tango.tangovalidator import TangoDeviceNameValidator from sardana.pool import AcqSynchType from sardana.taurus.core.tango.sardana.pool import registerExtensions from sardana.tango.pool.test.base_sartest import SarTestTestCase class TestMeasurement...
) self.assertEqual( k.getInterpolation(), newInterpolation ) self.assertTrue( s.undoAvailable() ) self.assertIn( k, ps ) self.assertNotIn( k0, ps ) self.assertNotIn( k1, ps ) ps.clear() s.undo() self.assertEqual( k.getInterpolation(), interpolation ) self.assertTrue( s.redoAvailable() ) self.asse...
553, 968, 239, 810, 651, 132, 185, 14, 644, 474, 645, 200, 503, 600, 467, 884, 2, 280, 425, 105, 226, 557, 661, 814, 881, 477, 546, 801, 231, 378, 550, 482, 673, 320, 63, 847, 795, 792, 240, 474, 989, 203, 442, 595, 482, 277, 18, 116, 762, 557, 532, 610, 944, 171, 241, 484, 919, 987, 116, 255, 374, 300, 948, 323, ...
str :param operation: Operation type: Read, write, delete, etc. :type operation: str """ _attribute_map = { 'provider': {'key': 'provider', 'type': 'str'}, 'resource': {'key': 'resource', 'type': 'str'}, 'operation': {'key': 'operation', 'type': 'str'}, } def __init__(self, **kwargs): super(OperationDisplay...
* self.radius))) else: path.append((Path.LINETO, [x, y])) path.extend([(Path.LINETO, [x, y + sign * length]), (Path.LINETO, [x - self.shoulder, y + sign * length]), (Path.LINETO, tip), (Path.LINETO, [x + self.shoulder - flow, y + sign * length]), (Path.LINETO, [x - flow, y + sign * length])]) path.extend(self...
needs units def __init__( self, energy, theta, U ) : self.energy = energy self.theta = theta self.U = U self.norm = self.evaluateIndefiniteIntegral( energy - U ) @property def domainMin( self ) : return( 0.0 ) @property def domainMax( self ) : return( self.U ) def evaluate( self, energy ) : return...
Else, inflow is 0. self.i[m] = (self.s[m] - self.s_c[m, :].sum()) / self.sf[m,m] # allow for outflow during first year by rescaling with 1/sf[m,m] # Add new inflow to stock and determine future decay of new age-cohort self.s_c[m::, m] = self.i[m] * self.sf[m::, m] self.o_c[m, m] = self.i[m] * (1 - self.sf[m, m]) ...
# -*- coding: UTF-8 -*- """ .. --------------------------------------------------------------------- ___ __ __ __ ___ / | \ | \ | \ / the automatic \__ |__/ |__/ |___| \__ annotation and \ | | | | \ analysis ___/ | | | | ___/ of speech http://www.sppas.org/ Use of this software is governed by the GNU Public ...
""" The Serpent solver! """ from abc import abstractmethod import time import pathlib import logging import numpy from hydep.lib import HighFidelitySolver from hydep.internal import TransportResult import hydep.internal.features as hdfeat from .writer import BaseWriter, SerpentWriter, ExtDepWriter from .runner impor...
(_('Select All'), _('Ctrl+A'))) # Separator self.menuedit.addSeparator() self.menueditpreferences = self.menuedit.addAction( QtGui.QIcon(self.app.resource_location + '/pref.png'), '%s\t%s' % (_('Preferences'), _('Shift+P'))) # ######################################################################## # #########...
<reponame>Engine-B/CDM # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. from typing import cast, TYPE_CHECKING from cdm.enums import CdmAttributeContextType from .applier_state import ApplierState from .attribu...
if not mean: avg = np.nanmedian(data) else: avg = np.nanmean(data) # Generate boostrap resamples, and take averages of them samples = np.array([np.random.choice(data,size=len(data),replace=True) for i in range(n_samples)]) if not mean: samples_avgs = np.nanmedian(samples, axis=1) else: samples_avgs = np.nanme...
'24608596', '24608211', '24604616']}, {'id': 'vrvW_sr8_1en', 'name': 'Kristianstad', 'type': 'municipality', 'code': '1290', 'region_code': '12', 'region_name': 'Skåne län', 'hits': 36, 'ad_ids': ['24649118', '24646547', '24645051', '24642902', '24639033', '24636394', '24636028', '24633571', '24631796', '24623098...
<reponame>bobofei/Mohou_Box-master #Copyright (c) 2015 3D Control Systems LTD #3DPrinterOS client 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...
we don't have a fixed top row then we recalculate it at every resize if self.auto_scroll and height > 0 and len(self.content) > height: self.top_row = len(self.content) - height self.refresh() # end cc_window link_data = zlx.record.make('tui.link_data', 'index command selection_restyler start_row start_col end_ro...
properties bar Set the appearance of the gauge's value bgcolor Sets the gauge background color. bordercolor Sets the color of the border enclosing the gauge. borderwidth Sets the width (in px) of the border enclosing the gauge. shape Set the shape of the gauge steps A tuple of :class:`plotly.graph_objects...
<reponame>mcguenther/ipme<gh_stars>0 from ..interfaces.cell import Cell from ..utils.functions import * from ..utils.stats import kde, pmf, find_x_range from ..utils.js_code import HOVER_CODE from ..utils.constants import COLORS, BORDER_COLORS, PLOT_HEIGHT, PLOT_WIDTH, SIZING_MODE, RUG_DIST_RATIO, RUG_SIZE from funct...
import os,sys,glob,time import obspy import scipy import pycwt import pyasdf import datetime import numpy as np import pandas as pd from obspy.signal.invsim import cosine_taper from obspy.signal.regression import linear_regression from scipy.fftpack import fft,ifft,next_fast_len from seisgo import stacking as stack fro...
#! usr/bin/python3.6 """ Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445 .. warning:: The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus hel...
0: data['summary_writer'] = summary_writer data['summary_writer_step'] = step ####################################################################### # Loss is the MSE between predicted 4pDelta and ground truth 4pDelta # Loss is L1 loss, in which case we have to do additional postprocessing if (type(loss_fn) == ...
traffic in a blue/green deployment. actionOnTimeout (string) --Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment. CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed ...
<filename>redcap2mysql.py #!/usr/bin/python # Export data from a REDCap project and send to a MySQL database. # Track changes to transferred data files in local git repository. # # This is just a *rough* prototype in the *early* stages of development. # # It has been tested on Windows Server 2008 R2 with ActivePython ...
linehatched90(_hatch_base*math.sqrt(4)) linehatched90.LArge = linehatched90(_hatch_base*math.sqrt(8)) linehatched90.LARge = linehatched90(_hatch_base*math.sqrt(16)) linehatched90.LARGe = linehatched90(_hatch_base*math.sqrt(32)) linehatched90.LARGE = linehatched90(_hatch_base*math.sqrt(64)) linehatched135 = linehatched...
Constraint(expr= m.x6513 - 490*m.b6953 <= 0) m.c4849 = Constraint(expr= m.x6515 - 490*m.b6955 <= 0) m.c4850 = Constraint(expr= m.x6517 - 490*m.b6957 <= 0) m.c4851 = Constraint(expr= m.x6519 - 490*m.b6959 <= 0) m.c4852 = Constraint(expr= m.x6521 - 490*m.b6961 <= 0) m.c4853 = Constraint(expr= m.x6523 - 490*m.b6963 <...
<reponame>Autodesk/nanodesign # Copyright 2016 Autodesk 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 l...
# Copyright (C) 2013 by <NAME>. # This file is part of m209, the M-209 simulation. # m209 is released under the MIT License (see LICENSE.txt). """This module contains data used in the generation of key lists.""" # This data was obtained from: # TM-11-380, War Department, Technical Manual, Converter M-209, M-209-A, # ...
<filename>gbpservice/neutron/tests/unit/services/grouppolicy/test_extension_driver_api.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 # # Unle...
Delay_Ckeck.NoCheck) # Case MSG_Trigger.Anforderung_Aus # A_Action.Action_To = Message_Time # Store_Action(Engine_Action.Load_Rampdown, row, Delay_Ckeck.NetzStörung) # Case MSG_Trigger.Netzparallelbetrieb # A_Action.Action_To = Message_Time # Store_Action(Engine_Action.RampUp_Mains_Parallel_Operation, row, Delay_Ckeck....
vim.VirtualMachine, ['name', 'runtime.powerState']) #pylint: disable=no-self-argument, not-callable def _vsphere_session(f): @functools.wraps(f) def wrapped(self, *args, **kwargs): if self.vsphereConnection: self.log.debug2("VirtualMachineVMware reusing vsphere connection") return f(self, *args, **kwargs) else...
<gh_stars>100-1000 import hashlib import logging from flask import g, make_response, request from Pegasus.service import cache from Pegasus.service._serialize import jsonify from Pegasus.service.base import OrderedDict from Pegasus.service.monitoring import monitoring as blueprint from Pegasus.service.monitoring.quer...
<filename>kinto/tests/core/test_storage.py<gh_stars>0 # -*- coding: utf-8 -*- import time import mock import redis from pyramid import testing from kinto.core.utils import sqlalchemy from kinto.core import utils from kinto.core.storage import ( exceptions, Filter, generators, memory, redis as redisbackend, postgres...
= self._matchStatus(status) if not match: return None notification = { 'title': status.user.screen_name, 'icon': status.user.profile_image_url, 'uri': ('https://twitter.com/%s/statuses/%d' % (status.user.screen_name.encode('utf-8'), status.id)), } # Twitter Entities on retweets have incorrect indices. Use ...
<filename>zoomrec.py import csv import logging import os import psutil import pyautogui import random import schedule import signal import subprocess import threading import time import atexit from datetime import datetime, timedelta global ONGOING_MEETING global VIDEO_PANEL_HIDED logging.basicConfig( format='%(asct...
JOIN ( SELECT "Animal_2".uuid AS uuid, array_agg("Location_1".name) AS fold_output_name FROM schema_1."Animal" AS "Animal_2" JOIN schema_1."Location" AS "Location_1" ON "Animal_2".lives_in = "Location_1".uuid GROUP BY "Animal_2".uuid ) AS folded_subquery_1 ON "Animal_1".uuid = folded_subquery_1.uuid """ expe...
import numpy as np import os import tensorflow as tf import tensorflow_addons as tfa from sklearn.metrics import precision_recall_fscore_support, classification_report, confusion_matrix from .data_utils import minibatches, pad_sequences, get_chunks, PAD from .general_utils import Progbar from .base_model import BaseM...
blend should have on the existing values. This is a :class:numpy.ndarray of floats between zero and one, where zero is no effect and one is full effect. See common.can_mask for details. :return: An array that contains the values of the blended arrays. :rtype: np.ndarray """ m = b != 0 ab = np.zeros_like(a) ab[...