input
stringlengths
2.65k
237k
output
stringclasses
1 value
to cont') return img_arr def fadeout(img_arr, bb_x1y1x2y2,gc_img): ''' tkae img, gc img, and bb, add background but fade it out outside of bb :param img_arr: :param bb_x1y1x2y2: :param gc_img: :return: ''' fadeout = np.zeros_like(img_arr) fadeout[bb_x1y1x2y2[1]:bb_x1y1x2y2[3],bb_x1y1x2y2[0]:bb_x1y1x2y2[2]] ...
Axe+5", 702800: "Fire Crescent Axe", 702801: "Fire Crescent Axe+1", 702802: "Fire Crescent Axe+2", 702803: "Fire Crescent Axe+3", 702804: "Fire Crescent Axe+4", 702805: "Fire Crescent Axe+5", 702806: "Fire Crescent Axe+6", 702807: "Fire Crescent Axe+7", 702808: "Fire Crescent Axe+8", 702809: "Fire C...
<reponame>chenwenxiao/DOI<filename>ood_regularizer/experiment/models/likelihood/vib.py # -*- coding: utf-8 -*- import functools import sys from argparse import ArgumentParser from contextlib import contextmanager import tensorflow as tf from pprint import pformat from matplotlib import pyplot from tensorflow.contrib.f...
<reponame>sgibson91/magprop import os import numpy as np import matplotlib.pyplot as plt from scipy.integrate import odeint # Global constants G = 6.674e-8 # Gravitational constant - cgs units c = 3.0e10 # Light speed - cm/s R = 1.0e6 # Magnetar radius - cm Rkm = 10.0 # Magnetar radius - km omass = 1.4 # Magnetar mas...
per image side. * If a tuple of four entries, then the entries represent top, right, bottom, left. Each entry may be a single integer (always crop by exactly that value), a tuple of two ints ``a`` and ``b`` (crop by an amount ``a <= x <= b``), a list of ints (crop by a random value that is contained in the list) o...
# from wbia.algo.graph import nx_utils as nxu infr = pblm.infr infr.status() pair_sample = pblm.hyper_params.pair_sample n_pos = sum(ut.take(pair_sample, ['top_gt', 'mid_gt', 'bot_gt', 'rand_gt'])) n_neg = sum(ut.take(pair_sample, ['top_gf', 'mid_gf', 'bot_gf', 'rand_gf'])) logger.info('n_neg = {!r}'.format(n_n...
# pylint: disable=protected-access import os import glob import radical.utils as ru from .. import states as s from .session import fetch_json _debug = os.environ.get('RP_PROF_DEBUG') # ------------------------------------------------------------------------------ # # pilot and task activities: core hours are der...
# Enter a parse tree produced by CSharp4Parser#attribute_argument_expression. def enterAttribute_argument_expression(self, ctx): pass # Exit a parse tree produced by CSharp4Parser#attribute_argument_expression. def exitAttribute_argument_expression(self, ctx): pass # Enter a parse tree produced by CSharp4Parse...
uses it. [lb] thinks the best # it could do is to help a historical trail for a user, e.g., # in the client, highlight all split-intos with the same # split-from, and maybe show the original, split-from line. if first_ref and (not target_item.split_from_stack_id): # FIXME: Add split-from to export Shapefile? # F...
PhoneC. Swap active call on PhoneA. (N times) Args: num_swaps: do swap for 'num_swaps' times. This value can be 0 (no swap operation). Returns: call_ab_id, call_ac_id if succeed; None, None if failed. """ ads = self.android_devices # make sure PhoneA is GSM phone before proceed. if (ads[0].droid.telephon...
JSONSchemaValidatorD53842E83F0538CAb91E097Aa6800Ce_v3_0_0 from .validators.v3_0_0.jsd_f403dda9440503191536993f569cc6f \ import JSONSchemaValidatorF403Dda9440503191536993F569Cc6F \ as JSONSchemaValidatorF403Dda9440503191536993F569Cc6F_v3_0_0 from .validators.v3_0_0.jsd_e6734850fabb2097fa969948cb \ import JSONSchemaVa...
the full name of the service without the 'fabric:' URI scheme. Starting from version 6.0, hierarchical names are delimited with the '~' character. For example, if the service name is 'fabric:/myapp/app1/svc1', the service identity would be 'myapp~app1~svc1' in 6.0+ and 'myapp/app1/svc1' in previous versions." - n...
""" isicarchive.font (Font) This module provides the Font helper class and doesn't have to be imported from outside the main package functionality (IsicApi). To instantiate a Font object, simply call it with the font name: >>> font = isicarchive.font.Font('calibri') At this time, only calibri is available as a font...
= "パスワードを入力してください。" Ary['MOSJA10005'] = "ログインID、パスワードが正しくありません。入力し直してください。<br />ユーザ未登録の場合は、システム管理者にユーザ登録の依頼をしてください。" Ary['MOSJA10006'] = "ログインID、パスワードが正しくありません。入力し直してください。<br />[パスワードをお忘れの場合]をクリックすると再設定できます。" Ary['MOSJA10007'] = "パスワード誤り上限回数に達したため、ユーザをロックしました。<br />しばらくしてから再入力をしてください。ロックが解除されない場合や緊急の場合は、システム管理者にロック解...
import os import shutil import unittest import tempfile import struct from pyoram.storage.block_storage import \ BlockStorageTypeFactory from pyoram.storage.block_storage_file import \ BlockStorageFile from pyoram.storage.block_storage_mmap import \ BlockStorageMMap from pyoram.storage.block_storage_ram import \ B...
"Only the owner can upload objects.") return dict( head=_generate_presigned_url(S3_HEAD_OBJECT, owner, blob_hash), get=_generate_presigned_url(S3_GET_OBJECT, owner, blob_hash), put=_generate_presigned_url(S3_PUT_OBJECT, owner, blob_hash), ) def download_object_preview_impl(owner, obj_hash): resp = s3_client.get_...
<filename>pymedphys/labs/pedromartinez/qc-graticule.py #############################START LICENSE########################################## # Copyright (C) 2019 <NAME> # # 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 ...
return ["\v"] elif c == "a": return ["\a"] elif c == "b": return ["\b"] elif c == "e": return ["\x1b"] elif c == "s": return [" "] elif c in "\r\n": self.newline(c) return ["\n"] elif c == "u": ch = self.peek() brace_seen = (ch == "{") if brace_seen: self.read() return self.read_utf_escape(brace_seen=b...
#!/usr/bin/env python import responses import requests import pytest import time import copy from unittest.mock import Mock, patch from freezegun import freeze_time from owlet_api.owletapi import OwletAPI from owlet_api.owlet import Owlet from owlet_api.owletexceptions import OwletPermanentCommunicationException from...
'dir', None) >>> split_component_path(dst1) >>> ('myrepo1', 'dir/subdir', None) >>> split_component_path(dst2) >>> ('myrepo2', 'dir/subdir', 'file') >>> split_component_path(dst3) >>> ('myrepo3', 'dir/subdir/etc', 'file.ext') :param component_path: the Nexus component path, as described above. :type component_...
:type publisherID: string :param name: the publisher name to be set :type name: string :rtype: ``True``, if successful, ``False`` otherwise """ data = {} if name is not None: data.update(name=name) # https://api.relayr.io/publishers/<id> url = '{0}/publishers/{1}'.format(self.host, publisherID) _, data = sel...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ SELFIES: a robust representation of semantically constrained graphs with an example application in chemistry (https://arxiv.org/abs/1905.13741) by <NAME>, <NAME>, <NAME>, <NAME>, <NAME> Variational Auto Encoder (VAE) for chemistry comparing SMILES and SELFIES re...
<gh_stars>0 """ This module provides an implementation of the Paxos algorithm as a set of composable classes. Copied, with minor alterations for use with Python 3 and JSON from https://github.com/cocagne/python-composable-paxos The MIT License (MIT) Copyright (c) 2015 <NAME> Permission is hereby granted, free of ch...
== 0: # voc_size starts with 0 before first training return 0 vec0 = K.slice(embedding_matrix, [0, 0], [1, em_dims[1]]) # zero vector only, vecs = K.slice(embedding_matrix, [1, 0], [em_dims[0]-1, em_dims[1]]) # all vectors except zero # make sure only vec0 is affected, i.e. vecs change only via global loss: vecs...
import numpy as np import pytest import nengo from nengo.builder import Builder from nengo.builder.operator import Reset, Copy from nengo.builder.signal import Signal from nengo.dists import UniformHypersphere from nengo.exceptions import ValidationError from nengo.learning_rules import LearningRuleTypeParam, PES, BCM...
13) == 0.0199004975124 assert round(zone_attr.r1_ow, 14) == 0.00688468914141 assert round(zone_attr.c1_ow, 5) == 533938.62338 assert round(zone_attr.r1_iw, 14) == 0.00971956114082 assert round(zone_attr.c1_iw, 5) == 319983.51874 assert round(zone_attr.r_rest_ow, 13) == 0.0399903108586 assert round(zone_attr.area...
<gh_stars>0 import os from collections import defaultdict from copy import deepcopy from functools import partial from pathlib import Path from typing import Type import numpy as np from qtpy.QtCore import QByteArray, Qt, Signal, Slot from qtpy.QtGui import QCloseEvent, QGuiApplication, QIcon, QKeySequence, QTextOptio...
# Copyright (c) 2016, <NAME> <<EMAIL>> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer....
<gh_stars>1-10 """Function that routes symbols to the correct API provider. """ import datetime import random import re from logging import critical, debug, error, info, warning import pandas as pd import schedule from cachetools import TTLCache, cached from cg_Crypto import cg_Crypto from IEX_Symbol import IEX_Symb...
import discord import asyncio import random import steam from steam.steamid import SteamId from steam.steamprofile import SteamProfile from steam.steamaccountuniverse import SteamAccountUniverse from steam.steamaccounttype import SteamAccountType from discord.ext import commands from utils import checks from mods.cog i...
aN, L, b0, b1, ..., bN). L must be a power of two. axis: the "L" axis above, aka the axis over which to do the Hadamard transform. All other dimensions are left alone; data on those dimension do not interact. normalize: Whether to normalize the results such that applying the transform twice returns to the origi...
[right] return False return False @register_specialize @register_canonicalize @gof.local_optimizer([T.mul]) def local_mul_switch_sink(node): """ This optimization makes the folowing changes in the graph: T.mul(A,T.switch(cond,0,iff),B) --> T.switch(cond,0,T.mul(A,B,iff)) T.mul(A,T.switch(cond,ift,0),B) --> T.sw...
<filename>tests/integration/test_models/standard_output_tests.py<gh_stars>1-10 # # Standard tests on the standard set of model outputs # import pybamm import numpy as np class StandardOutputTests(object): """Calls all the tests on the standard output variables.""" def __init__(self, model, parameter_values, disc, ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2016 Zomboided # # 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 3 of the License, or # (at your option) any la...
<gh_stars>0 import tkinter as tk from tkinter import filedialog, ttk from pathlib import Path import functions as fn from bs4 import BeautifulSoup import subprocess, csv, json, threading, statistics, time, webbrowser, os, re import concurrent.futures test_case = 0 name='MRANS' version='0.1' # Class for tkinter Treevi...
self.Id def set_Id(self, Id): self.Id = Id def validate_tsNaturezaOperacao(self, value): # Validate type tsNaturezaOperacao, a restriction on xsd:byte. if value is not None and Validate_simpletypes_: if not self.gds_validate_simple_patterns( self.validate_tsNaturezaOperacao_patterns_, value): warnings_.warn('Val...
<reponame>YimengYang/wol<filename>code/utils/tests/test_tree.py #!/usr/bin/env python3 from unittest import TestCase, main from shutil import rmtree from tempfile import mkdtemp from os.path import join, dirname, realpath from skbio import TreeNode from skbio.tree import MissingNodeError from utils.tree import ( sup...
<filename>mmcif/io/BinaryCifReader.py<gh_stars>1-10 ## # File: BinaryCifReader.py # Date: 15-May-2021 jdw # # Reader methods and decoders for binary CIF. # # Updates: ## from collections import OrderedDict import gzip import io import logging import struct from contextlib import closing import msgpack import requests...
<filename>pythonocc/lib/OCC/GeomToStep.py # This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.10 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (3,0,0): new_instanceme...
import re from html.parser import HTMLParser from urllib.parse import urlparse from collections import namedtuple import cssselect from ._selectors import tag_matches, Specificity from .rendering import full_justify from .rendering import Box, BoxSide from .rendering import Renderer, InlineRenderer, BlockRenderer fr...
return squashed def normalize_io(io): ''' Normalize an 'io' specifier in a pragma into either 'input' or 'output' Parameters ---------- io : str The I/O specifier from the pragma Returns ------- {'input', 'output'} Raises ------ ValueError If an invalid specifier is given ''' if io in IO_OUTPUT: re...
<reponame>quedah/cloud-sql-python-connector """ Copyright 2019 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable...
<reponame>Nic30/layeredGraphLayouter<filename>layeredGraphLayouter/p5ortogonalRouter/routingGenerator.py from enum import Enum from typing import Dict, List from layeredGraphLayouter.containers.geometry import Point from layeredGraphLayouter.containers.lPort import LPort from collections import deque from math import i...
= dist return dist def showManyStats(self,spec_name=None): ''' Calculates the "many statistics" by averaging histories across simulated periods. Displays the results as text and saves them to files if spec_name is not None. Parameters ---------- spec_name : string A name or label for the current specificatio...
| Units: C Args: value (float): value for IDD Field `Maximum Setpoint Temperature` Raises: ValueError: if `value` is not a valid value Returns: float: the value of `maximum_setpoint_temperature` or None if not set """ return self["Maximum Setpoint Temperature"] @maximum_setpoint_temperature.setter def ma...
list, since it has been combined when loading data " % seq_len) else: Train_data_keys[seq_len]=(train_featuredata_all) if seq_len in Train_targets_keys: raise Exception("Duplicate seq length %i in Train list, since it has been combined when loading data " % seq_len) else: Train_targets_keys[seq_len]=trai...
<filename>doc/simple-cli/simple_cli.py from nessaid_cli.cmd import NessaidCmd from nessaid_cli.tokens import ( CliToken, StringToken, RangedStringToken, AlternativeStringsToken, RangedIntToken, RangedDecimalToken, BooleanToken, NullTokenValue ) from nessaid_cli.utils import ( convert_to_cli_string, convert_...
= alternatives or [] # type: List[str] self._regex_text = None # type: Optional[str] self._regex = None # type: Optional[Pattern] self._sql_like_fragments = None # type: Optional[List[str]] # --------------------------------------------------------------------- # Things we know about psychotropics # ------------...
<gh_stars>1-10 """ AnalysisNode is the base class that all analysis nodes inherit from. """ import logging import operator from functools import reduce from random import random from time import time from typing import Tuple, Sequence, List, Dict, Optional from celery.canvas import Signature from django.conf import se...
<gh_stars>1-10 # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
't_4'), ('v_9', 't_3'), ('v_8', 't_4'), ('c_1', 't_3')}, '>': {('c_1', 'v_5'), ('t_3', 'v_8'), ('t_3', 'v_9'), ('c_1', 't_4'), ('t_2', 'v_5'), ('t_2', 'v_6'), ('t_3', 'v_10'), ('t_2', 'v_7'), ('c_1', 'v_7'), ('t_4', 'v_8'), ('c_1', 'v_6'), ('t_4', 'v_10'), ('c_1', 't_3'), ('t_2', 'v_9'), ('c_1', 'v_8'), ('c_1', 't_2...
length) - 1 return i def _getuint(self): """Return data as an unsigned int.""" return self._readuint(self.len, 0) def _setint(self, int_, length=None): """Reset the bitstring to have given signed int interpretation.""" # If no length given, and we've previously been given a length, use it. if length is None a...
<reponame>CoeJoder/spawningtool<filename>spawningtool/coop_constants.py """ spawningtool.coop_constants ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Co-op uses Blizzard time like HotS (16 FPS), so it's easier to base the data off of that. Co-op also uses the LotV launch chronoboost that stays continuously on one building """ from sp...
in unset_edges if e in val} else: values = {e: val for e in unset_edges} nx.set_edge_attributes(graph, name=key, values=values) def nx_get_default_edge_attributes(graph, key, default=None): import utool as ut edge_list = list(graph.edges()) partial_attr_dict = nx.get_edge_attributes(graph, key) attr_dict = ut....
import errno from optimus.helpers.core import val_to_list import warnings import os from io import UnsupportedOperation from pprint import pformat from optimus.engines.base.basedataframe import BaseDataFrame from optimus.infer import is_str, is_function, is_list_empty from optimus.helpers.logger import logger class...
# line tests are using the properly scaled noise. if fit_stat=="RCHI2": noise *= np.nanmean([mcpars_line["NOISE_SCALE"]["med"], mcpars_no_line["NOISE_SCALE"]["med"]]) # Determine wavelength bounds of F-test. For [OIII]5007, we use the full profile (core + outflow) # and determine the 0.1 and 99.9 percentiles o...
right_value) taxon_name_id = self.adaptor.taxon_name.insert(taxon_id = taxon_id, name = taxon[2][:255], name_class = 'scientific name') #Note the name field is limited to 255, some SwissProt files #have a multi-species name which can be longer. So truncate this. left_value += 1 right_value -= 1 parent_taxon_id...
''' if not self.stack.parseInner(self.rxPacket): return data = self.rxPacket.data body = self.rxPacket.body.data if not isinstance(body, basestring): emsg = "Invalid format of cookie packet body" console.terse(emsg + '\n') self.stack.incStat('invalid_cookie') self.remove() return #raise raeting.TransactionE...
<reponame>troup-system/troup<filename>troup/infrastructure.py # Copyright 2016 <NAME> # # 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...
brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush) brush = QtGui.QBrush(QtGui.QColor(0, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 25...
to be associated with the message Size of the buffer is zero if no label is present NOTE 2 See description of label above. Returns: outData - Encrypted output """ req = TPM2_RSA_Encrypt_REQUEST(keyHandle, message, inScheme, label) respBuf = self.dispatchCommand(TPM_CC.RSA_Encrypt, req) res = self.processRespo...
import os import numpy as np import pickle import time from collections import deque from mpi4py import MPI import tensorflow as tf from stable_baselines import logger from stable_baselines.common import tf_util, SetVerbosity, TensorboardWriter from stable_baselines import DDPG from stable_baselines.common.buffers i...
""" Tests for the generic MLEModel Author: <NAME> License: Simplified-BSD """ from __future__ import division, absolute_import, print_function import numpy as np import pandas as pd import os import re import warnings from statsmodels.tsa.statespace import (sarimax, varmax, kalman_filter, kalman_smoother) from stat...
a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_escalation_chain_by_id_with_http_info(id, async_req=True) >>> result = thread.get() :param async_req bool :param int id: (required) :return: object If the method is called asynchronous...
#!/usr/bin/env python # -*- coding: utf-8 -*- # CairoPlot.py # # Copyright (c) 2008 <NAME> # # Author: <NAME> <<EMAIL>> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version ...
self.bonus_link and (folder.organization or folder.sponsored_by): self.bonus_link = False user.bonus_links = user.bonus_links + 1 self.save(update_fields=['organization', 'bonus_link']) user.save(update_fields=['bonus_links']) def guid_as_path(self): # For a GUID like ABCD-1234, return a path like AB/CD/12. st...
#Venice, June 15, 2014 #Begin of license #Copyright (c) 2014 <NAME> # #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,...
# -*- coding: utf-8 -*- # # K2HR3 OpenStack Notification Listener # # Copyright 2018 Yahoo! Japan Corporation. # # K2HR3 is K2hdkc based Resource and Roles and policy Rules, gathers # common management information for the cloud. # K2HR3 can dynamically manage information as "who", "what", "operate". # These are stored ...
<reponame>eshanking/fears-figures import numpy as np from numpy.ma.core import get_data import scipy from seascapes_figures.utils import dir_manager, results_manager import matplotlib.pyplot as plt import os class Fitness: def __init__(self): return def gen_fitness_curves(self,pop=None,conc=None): if pop is N...
oute.oute == 0: depth1.append(moves) if re.match(r'\+r|r', Wboard.w2a)and Wboard.w4a==''\ and board.s3a=='': moves = '2a4a' kaihimore(moves) if oute.oute == 0: depth1.append(moves) if re.match(r'\+r|r', Wboard.w2a)and Wboard.w5a==''\ and board.s3a+board.s4a=='': moves = '2a5a' kaihimore(moves) if oute.oute ...
<gh_stars>10-100 #encoding : utf-8 """This file contains the nelpy io functions. This entire module will probably be deprecated soon, so don't rely on any of this to keep working! Example ======= datadirs = ['/home/etienne/Dropbox/neoReader/Data', 'C:/etienne/Dropbox/neoReader/Data', 'C:/Users/etien/Dropbox/neoRea...
# encoding: utf-8 # CachedFeed, WillNotGenerateExpensiveFeed import datetime import logging from collections import namedtuple from sqlalchemy import Column, DateTime, ForeignKey, Index, Integer, Unicode from sqlalchemy.sql.expression import and_ from ..util.datetime_helpers import utc_now from ..util.flask_util imp...
from itertools import product from pathlib import Path from warnings import warn import numpy as np import pandas as pd import sep from astropy.io import fits from astropy.modeling.functional_models import Gaussian2D from astropy.nddata import CCDData, Cutout2D, VarianceUncertainty from astropy.stats import sigma_clip...
is not None: pulumi.set(__self__, "node_size", node_size) if node_size_family is not None: pulumi.set(__self__, "node_size_family", node_size_family) if pool_name is not None: pulumi.set(__self__, "pool_name", pool_name) if resource_group is not None: pulumi.set(__self__, "resource_group", resource_group) if sp...
# # data preprocessing # from src.const import wells, carotage_types, las_dir, log_dir, slices_dir, wellheads, \ raw_cube, sourceX, sourceY, INLINE_3D, CROSSLINE_3D, nsamples, dt, ilines, xlines, \ well_width, slice_coord_path, norm_dict_path, slice_range from src.utils import projection from src.gen1 import dump_no...
<filename>sgmcmcjax/diffusions.py # """A diffusion is modeled as an ``(init_fun, update_fun, get_params)`` triple of # functions, where the component functions have these signatures: # init_fn # :: # init_fn(params) # Args: # params: pytree representing the initial parameters. # Returns: # A pytree representing the in...
""" if variable: index = self.chemicals.get_index(variable) else: index = self._X_index stoichiometry_by_wt = self._get_stoichiometry_by_wt() if self.phases: stoichiometry_by_wt = stoichiometry_by_wt.sum(0) def f(x): stoichiometry_by_wt[index] = x return stoichiometry_by_wt.sum() x = flx.aitken_secant(f, ...
0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.000000...
import json import logging import types import uuid from StringIO import StringIO import validator from validator import constants, unicodehelper from validator.constants import SIGNING_SEVERITIES from validator.outputhandlers.shellcolors import OutputHandler log = logging.getLogger('amo.validator') def maybe_tupl...
""" .. testsetup:: min,sum,value-count,top-hits,stats,percentiles,percentile-ranks from __future__ import print_function from mock import Mock from elasticmagic import agg, Cluster, SearchQuery, DynamicDocument from elasticmagic.compiler import DefaultCompiler class SaleDocument(DynamicDocument): __doc_type__ ...
not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 if 'depth' in local_var_params and local_var_params['depth'] is not None: # noqa: E501 query_params.append(('depth', local_var_params['depth'])) # noqa: E501 header_params = {} if 'x_contract_number' in local_var_param...
tags.tagExists("retry"): retry = int(tags.tagGet("retry")) else: retry = -1 if tags.tagExists("regex"): regex = tags.tagGet("regex") else: regex = None if len(descr) > 30 and ttype not in ("dict", "multiline"): self._log_info(descr) descr = "" # print "type:'%s'"%ttype if ttype == "str": result = j.tool...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division from __future__ import print_function, unicode_literals import os import re import subprocess import time def convert_project(project, repos, svn_repos, authors_file=None, latest_release_version=None): ''' Parameters ...
# coding=utf-8 # ============================================================================== # beelbe # Copyright © 2016 <NAME>. 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 L...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on Thu Sep 21 16:48:12 2017 Simple GUI for automated patterning with an inverted microscope and its controlling by the Micro-Manager (MM) application. An Arduino microcontroller is used as triggering device for UV illumination together with a physical shutter. ...
<reponame>mlweilert/bpnet<gh_stars>10-100 import sys import os import pickle import json import subprocess from pathlib import Path import numpy as np import pandas as pd import papermill as pm # Render the ipython notebook from kipoi_utils.external.flatten_json import flatten, unflatten from weakref import WeakValueDi...
# Linkpad: A command-line bookmark manager # https://github.com/tonyduckles/linkpad # Copyright (c) 2017 <NAME> # Features: # ========= # - Supports multiple separate bookmark databases under ~/.linkpad/<dbname>/. # - Each database is version-controlled via Git, which [aside from version # control!] provides an easy w...
So, well, let's do # that. processor = None if invoice.processor: processor = self.get_invoice_processor(invoice, logger=logger) if not processor: # get_invoice_processor() has already logged return (self.RESULT_PROCESSORFAIL, None, None) try: with transaction.atomic(): processor.process_invoice_payment(invoi...
# py_mob/py_mob.py import numpy, scipy.stats, sklearn.isotonic, sklearn.cluster, lightgbm, tabulate, pkg_resources def get_data(data): """ The function loads a testing dataset. Parameters: data : The name of dataset. It is either "hmeq" or "accepts", both of which are loan performance data. Returns: A dict ...
import fnmatch import inspect import os from importlib.util import spec_from_file_location import logging import sys __dirname, __init_python_script = os.path.split(os.path.abspath(__file__)) logger = logging.getLogger("SimplePlugins") formatter = logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message...
floats > 20 or None, default=None If a list, the list of delays (in miliseconds) of length n_voices. If None, the individual delay parameters are chosen automatically to be between 40 and 60 miliseconds. decays : list of floats or None, default=None If a list, the list of decays (as a fraction of gain_in) of lengt...
<reponame>LRydin/NeuroKit<gh_stars>1-10 import nolds import numpy as np import pandas as pd from pyentrp import entropy as pyentrp import neurokit2 as nk """ For the testing of complexity, we test our implementations against existing and established ones. However, some of these other implementations are not really pa...
""" @package mi.instrument.seabird.sbe16plus_v2.ctdpf_jb.test.test_driver @file marine-integrations/mi/instrument/seabird/sbe16plus_v2/ctdpf_jb/driver.py @author <NAME> @brief Test cases for ctdpf_jb driver USAGE: Make tests verbose and provide stdout * From the IDK $ bin/test_driver $ bin/test_driver -u [-t testn...
<gh_stars>10-100 import tensorflow as tf import tensorflow.contrib as tf_contrib import numpy as np from tensorflow.python.ops import rnn from utils import pytorch_kaiming_weight_factor ################################################################################## # Initialization #################################...
# coding: utf-8 # Copyright 2016 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import base64 import datetime import hashlib import logging import os import threading import time import traceback from six.move...
args and args.has_key('hrn'): hrn = args['hrn'] if credential is None: raise Exception("Register missing credential") # Validate user credential creds = list() creds.append(credential) privs = () self._cred_verifier.verify_from_strings(user_certstr, creds, None, privs) # confirm type is Slice or User if no...
<filename>rdtools/test/soiling_test.py<gh_stars>100-1000 import pandas as pd import numpy as np from rdtools.soiling import soiling_srr from rdtools.soiling import SRRAnalysis from rdtools.soiling import annual_soiling_ratios from rdtools.soiling import monthly_soiling_rates from rdtools.soiling import NoValidIntervalE...
<gh_stars>1-10 # -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import functools from functools import partial from decimal import Decimal from uuid import UUID import logging import os import sys from collections import Iterable, Sized from itertools import chain import django from dja...
431 540 541 431 536 431 430 540 431 537 432 541 542 432 538 432 431 541 432 539 446 530 420 446 540 446 529 530 446 541 452 542 543 452 542 452 432 542 452 543 602 554 603 602 544 602 553 554 602 545 604 556 605 604 546 604 555 556 604 547 603 555 604 603 548 603 554 555 603 549 472 553 602 472 550 472 4...
<reponame>chrahunt/quicken import logging import os import subprocess import sys from contextlib import contextmanager from pathlib import Path from textwrap import dedent import pytest from quicken._internal.cli.cli import get_arg_parser, parse_file from quicken._internal.constants import ( DEFAULT_IDLE_TIMEOUT, ...